Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Sunny C.

Pages: 1 ... 3 4 5 6 [7] 8 9 10 11 ... 19
91
Wordpress must in the Same DB at 4images
Wordpress muss in der gleichen DB liegen wie 4images


Open register.php
Öffne register.php
Search / Suche:
    $sql "INSERT INTO ".USERS_TABLE."
            ("
.get_user_table_field("""user_id").get_user_table_field(", ""user_level").get_user_table_field(", ""user_name").get_user_table_field(", ""user_password").get_user_table_field(", ""user_email").get_user_table_field(", ""user_showemail").get_user_table_field(", ""user_allowemails").get_user_table_field(", ""user_invisible").get_user_table_field(", ""user_joindate").get_user_table_field(", ""user_activationkey").get_user_table_field(", ""user_lastaction").get_user_table_field(", ""user_lastvisit").get_user_table_field(", ""user_comments").get_user_table_field(", ""user_homepage").get_user_table_field(", ""user_icq").$additional_field_sql.")
            VALUES
            (
$user_id$user_level, '$user_name', '".md5($user_password)."', '$user_email', $user_showemail$user_allowemails$user_invisible$current_time, '$activationkey', $current_time$current_time, 0, '$user_homepage', '$user_icq'".$additional_value_sql.")";
    
$result $site_db->query($sql);

Add after / Danach einfügen:
// Wordpress Register START
$sql "INSERT INTO wp_users
(ID, user_login, user_pass, user_nicename, user_email, user_registered)
VALUES
('"
.$user_id."', '".$user_name."', '".md5($user_password)."', '".$user_name."', '".$user_email."', '".$current_time."')";
$result $site_db->query($sql);
$umetaID mysql_insert_id();
$schreiber 'a:1:{s:10:"subscriber";s:1:"1";}';

/* User Meta Config */
$sql "INSERT INTO wp_usermeta
(user_id, meta_key, meta_value)
VALUES
('"
.$user_id."', 'nickname', '".$user_name."')";
$result $site_db->query($sql);

$sql "INSERT INTO wp_usermeta
(user_id, meta_key, meta_value)
VALUES
('"
.$user_id."', 'rich_editing', 'true')";
$result $site_db->query($sql);

$sql "INSERT INTO wp_usermeta
(user_id, meta_key, meta_value)
VALUES
('"
.$user_id."', 'comment_shortcuts', 'false')";
$result $site_db->query($sql);

$sql "INSERT INTO wp_usermeta
(user_id, meta_key, meta_value)
VALUES
('"
.$user_id."', 'admin_color', 'fresh')";
$result $site_db->query($sql);

$sql "INSERT INTO wp_usermeta
(user_id, meta_key, meta_value)
VALUES
('"
.$user_id."', 'use_ssl', '0')";
$result $site_db->query($sql);

$sql "INSERT INTO wp_usermeta
(user_id, meta_key, meta_value)
VALUES
('"
.$user_id."', 'wp_capabilities', '".$schreiber."')";
$result $site_db->query($sql);

$sql "INSERT INTO wp_usermeta
(user_id, meta_key, meta_value)
VALUES
('"
.$user_id."', 'wp_user_level', '0')";
$result $site_db->query($sql);

$sql "INSERT INTO wp_usermeta
(user_id, meta_key, meta_value)
VALUES
('"
.$user_id."', 'default_password_nag', '1')";
$result $site_db->query($sql);
// Wordpress Register ENDE!


Eine bessere Variante habe ich nicht geschafft zu erstellen. Eventuell hilft es jemanden weiter.

92
I have few errors on my Site:
Quote
Warning: sprintf() [function.sprintf]: Too few arguments in /www/htdocs/w00b2576/gn/index.php on line 111
Quote
Bad SQL Query: SELECT news_title, news_image, news_text, user_name, news_date
FROM 4images_news
ORDER BY news_date
DESC LIMIT '0',
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4

und
Quote
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/htdocs/w00b2576/gn/includes/db_mysql.php on line 116
Ich kann damit nichts anfangen, hat jemand eine Idee?

This is the Code:
//-----------------------------------------------------
// ----- Show news ------------------------------------
//-----------------------------------------------------

if (!isset($config['news_home_display']) || $config['news_home_display'] == 1)
$sql "SELECT news_title, news_image, news_text, user_name, news_date 
    FROM "
.NEWS_TABLE."
ORDER BY news_date
DESC LIMIT 0, "
.((isset($config['news_nb']))?$config['news_nb']:5);
else if (
$config['news_home_display'] == 2)
$sql "SELECT news_title, news_text, news_image, user_name, news_date 
   FROM "
.NEWS_TABLE."
   WHERE news_date > "
.(time() - ((isset($config['news_nb_days']))?$config['news_nb_days']:15)*86400).
   ORDER BY news_date DESC"
;
$result $site_db->query($sql);
$num_rows $site_db->get_numrows($result);

if (!
$num_rows)  {
  
$news "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  
$news .= $lang['no_news'];
  
$news .= "</td></tr></table>";
}
else  {
$news .= "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
$news .= "<img src=\"".$site_sess->url(TEMPLATE_PATH."/images".$config['news_image_verzeichnis']."".$image_row['news_image']."")."\" width=\"200\" height=\"266\">\n";
$news .= "</td></tr></table>\n";
$news .= "<div class=\"post type-post hentry category-allgemeines tag-kushina-uzumaki tag-kyuubi tag-manga-color tag-naruto tag-naruto-manga-497\">";

  while (
$image_row $site_db->fetch_array($result))
  {
$new_is_new .= ($image_row['news_date'] > time() - ((isset($config['news_cutoff']))?$config['news_cutoff']:3)*86400);
$news .= "<h2><a class=\"title\" href=\"#\">".$image_row['news_title']."</a></h2>\n";
$news .= "<div class=\"info\">\n";
$news .= "<span class=\"date\">\n";
$news .= "".(($new_is_new)?"<sup>".$lang['new']."</sup>":"").sprintf($lang['news_posted_by'], $image_row['user_name']);
$news .= "</span>\n";
$news .= "<span class=\"comments\">\n";
$news .= "".(($new_is_new)?"":"").sprintf(format_date($config['date_format']." ".$config['time_format'], $image_row['news_date']));
$news .= "".$lang['news_uhr']."";
$news .= "</span>\n";
$news .= "<div class=\"fixed\"></div>\n";
$news .= "</div\n";
$news .= "<div class=\"content\">\n";
$news .= "<div class='snap_preview'>\n";
$news .= "<p>";
$news .= format_text($image_row['news_text'], ((isset($config['news_html']))?$config['news_html']:0), 0, ((isset($config['news_bbcode']))?$config['news_bbcode']:1), ((isset($config['news_bbcodeimg']))?$config['news_bbcodeimg']:1));
$news .= "</p>\n";
$news .= "</tr>\n";
$news .= "</div>\n";
$news .= "<div class=\"fixed\"></div>\n";
$news .= "</div>\n";
$news .= "<div class=\"under\">\n";
$news .= "<span></span>\n";
$news .= "<span></span>\n";
$news .= "</div>\n";

  } 
// end while

  
$news .= "</div>\n";
// end else

$site_template->register_vars(array(
"news" => $news,
"news_main" => $lang['news_main']
));
unset(
$news);


Full index.php
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: index.php                                            *
 *        Copyright: (C) 2002-2009 Jan Sorgalla                           *
 *            Email: jan@4homepages.de                                    * 
 *              Web: http://www.4homepages.de                             * 
 *    Scriptversion: 1.7.7                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

$templates_used 'home,category_bit,whos_online,thumbnail_bit';
$main_template 'home';

define('GET_CACHES'1);
define('ROOT_PATH''./');
define('GET_USER_ONLINE'1);
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');
$user_access get_permission();

if (isset(
$HTTP_GET_VARS['template']) || isset($HTTP_POST_VARS['template'])) {
  
$template = (isset($HTTP_GET_VARS['template'])) ? get_basefile(stripslashes($HTTP_GET_VARS['template'])) : get_basefile(stripslashes($HTTP_POST_VARS['template']));
  if (!
file_exists(TEMPLATE_PATH."/".$template.".".$site_template->template_extension)) {
    
$template "";
  }
  else {
    
$main_template $template;
  }
}
else {
  
$template "";
}
include(
ROOT_PATH.'includes/page_header.php');

if (!empty(
$template)) {
  
$clickstream "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].str_replace("_"" "ucfirst($template));
  
$site_template->register_vars("clickstream"$clickstream);
  
$site_template->print_template($site_template->parse_template($main_template));
  include(
ROOT_PATH.'includes/page_footer.php');
}

$cache_id create_cache_id(
  
'page.index',
  array(
    
$user_info[$user_table_fields['user_id']],
    isset(
$user_info['lightbox_image_ids']) ? substr(md5($user_info['lightbox_image_ids']), 08) : 0,
    
$config['template_dir'],
    
$config['language_dir']
  )
);

if (!
$cache_page_index || !$content get_cache_file($cache_id)) {
// Always append session id if cache is enabled
if ($cache_page_index) {
  
$old_session_mode $site_sess->mode;
  
$site_sess->mode 'get';
}

ob_start();

//-----------------------------------------------------
//--- Show Categories ---------------------------------
//-----------------------------------------------------
$categories get_categories(0);
if (!
$categories)  {
  
$categories $lang['no_categories'];
}
$site_template->register_vars("categories"$categories);
unset(
$categories);

//-----------------------------------------------------
// ----- Show news ------------------------------------
//-----------------------------------------------------

if (!isset($config['news_home_display']) || $config['news_home_display'] == 1)
	
$sql "SELECT news_title, news_image, news_text, user_name, news_date 
	
        FROM "
.NEWS_TABLE."
	
	
	
ORDER BY news_date
	
	
	
DESC LIMIT 0, "
.((isset($config['news_nb']))?$config['news_nb']:5);
else if (
$config['news_home_display'] == 2)
	
$sql "SELECT news_title, news_text, news_image, user_name, news_date 
	
       FROM "
.NEWS_TABLE."
	
	
   WHERE news_date > "
.(time() - ((isset($config['news_nb_days']))?$config['news_nb_days']:15)*86400).
	
	
   ORDER BY news_date DESC"
;
$result $site_db->query($sql);
$num_rows $site_db->get_numrows($result);

if (!
$num_rows)  {
  
$news "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  
$news .= $lang['no_news'];
  
$news .= "</td></tr></table>";
}
else  {
    
$news .= "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
	
$news .= "<img src=\"".$site_sess->url(TEMPLATE_PATH."/images".$config['news_image_verzeichnis']."".$image_row['news_image']."")."\" width=\"200\" height=\"266\">\n";
	
$news .= "</td></tr></table>\n";
    
$news .= "<div class=\"post type-post hentry category-allgemeines tag-kushina-uzumaki tag-kyuubi tag-manga-color tag-naruto tag-naruto-manga-497\">";

  while (
$image_row $site_db->fetch_array($result))
  {
	
$new_is_new .= ($image_row['news_date'] > time() - ((isset($config['news_cutoff']))?$config['news_cutoff']:3)*86400);
	
$news .= "<h2><a class=\"title\" href=\"#\">".$image_row['news_title']."</a></h2>\n";
	
$news .= "<div class=\"info\">\n";
	
$news .= "<span class=\"date\">\n";
	
$news .= "".(($new_is_new)?"<sup>".$lang['new']."</sup>":"").sprintf($lang['news_posted_by'], $image_row['user_name']);
	
$news .= "</span>\n";
	
$news .= "<span class=\"comments\">\n";
	
$news .= "".(($new_is_new)?"":"").sprintf(format_date($config['date_format']." ".$config['time_format'], $image_row['news_date']));
	
$news .= "".$lang['news_uhr']."";
	
$news .= "</span>\n";
	
$news .= "<div class=\"fixed\"></div>\n";
    
$news .= "</div\n";
    
$news .= "<div class=\"content\">\n";
    
$news .= "<div class='snap_preview'>\n";
	
$news .= "<p>";
	
$news .= format_text($image_row['news_text'], ((isset($config['news_html']))?$config['news_html']:0), 0, ((isset($config['news_bbcode']))?$config['news_bbcode']:1), ((isset($config['news_bbcodeimg']))?$config['news_bbcodeimg']:1));
	
$news .= "</p>\n";
    
$news .= "</tr>\n";
	
$news .= "</div>\n";
	
$news .= "<div class=\"fixed\"></div>\n";
	
$news .= "</div>\n";
	
$news .= "<div class=\"under\">\n";
	
$news .= "<span></span>\n";
	
$news .= "<span></span>\n";
	
$news .= "</div>\n";

  } 
// end while

  
$news .= "</div>\n";
// end else

$site_template->register_vars(array(
"news" => $news,
"news_main" => $lang['news_main']
));
unset(
$news);

//-----------------------------------------------------
//--- Show New Images ---------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  
"has_rss"   => true,
  
"rss_title" => "RSS Feed: ".format_text($config['site_name'], 2)." (".str_replace(':'''$lang['new_images']).")",
  
"rss_url"   => $script_url."/rss.php?action=images"
));

$imgtable_width ceil(intval($config['image_table_width']) / $config['image_cells']);
if ((
substr($config['image_table_width'], -1)) == "%") {
  
$imgtable_width .= "%";
}

$additional_sql "";
if (!empty(
$additional_image_fields)) {
  foreach (
$additional_image_fields as $key => $val) {
    
$additional_sql .= ", i.".$key;
  }
}

$num_new_images $config['image_cells'];
$sql "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.""user_name")."
        FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
        LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
        WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id NOT IN ("
.get_auth_cat_sql("auth_viewcat""NOTIN").")
        ORDER BY i.image_date DESC
        LIMIT 
$num_new_images";
$result $site_db->query($sql);
$num_rows $site_db->get_numrows($result);

if (!
$num_rows)  {
  
$new_images "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  
$new_images .= $lang['no_new_images'];
  
$new_images .= "</td></tr></table>";
}
else  {
  
$new_images "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
  
$count 0;
  
$bgcounter 0;
  while (
$image_row $site_db->fetch_array($result)){
    if (
$count == 0) {
      
$row_bg_number = ($bgcounter++ % == 0) ? 2;
      
$new_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    
$new_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";

    
show_image($image_row);
    
$new_images .= $site_template->parse_template("thumbnail_bit");
    
$new_images .= "\n</td>\n";
    
$count++;
    if (
$count == $config['image_cells']) {
      
$new_images .= "</tr>\n";
      
$count 0;
    }
  } 
// end while

  
if ($count 0)  {
    
$leftover = ($config['image_cells'] - $count);
    if (
$leftover >= 1) {
      for (
$f 0$f $leftover$f++) {
        
$new_images .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      
$new_images .= "</tr>\n";
    }
  }
  
$new_images .= "</table>\n";
// end else

$site_template->register_vars("new_images"$new_images);
unset(
$new_images);

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  
"msg" => $msg,
  
"clickstream" => $clickstream
));
$site_template->print_template($site_template->parse_template($main_template));

$content ob_get_contents();
ob_end_clean();

if (
$cache_page_index) {
  
// Reset session mode
  
$site_sess->mode $old_session_mode;

  
save_cache_file($cache_id$content);
}

// end if get_cache_file()

echo $content;

include(
ROOT_PATH.'includes/page_footer.php');
?>

93
Programming / 01-Artikel- & Newsscript 3.0.0.4 include
« on: June 24, 2010, 11:23:30 AM »
Hallo zusammen,

ich wollte ein Newsscript von 01-Script [http://www.01-scripts.de/01article.php] in 4images integrieren, aber das geht einfach nicht!
So wird das aufgerufen:
http://new.germannaruto.de/news/iframe.php

Wenn ich das in der home.html einfüge:
<?PHP
include("news/iframe.php");
?>


dann bekomme ich diese Fehler:
Quote
Warning: include_once(01_config.php) [function.include-once]: failed to open stream: No such file or directory in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php  on line 42

Warning: include_once() [function.include]: Failed opening '01_config.php' for inclusion (include_path='.:/usr/share/php:..') in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 42

Warning: include_once(01acp/system/headinclude.php) [function.include-once]: failed to open stream: No such file or directory in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 43

Warning: include_once() [function.include]: Failed opening '01acp/system/headinclude.php' for inclusion (include_path='.:/usr/share/php:..') in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 43

Warning: include_once(01acp/system/functions.php) [function.include-once]: failed to open stream: No such file or directory in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 44

Warning: include_once() [function.include]: Failed opening '01acp/system/functions.php' for inclusion (include_path='.:/usr/share/php:..') in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 44

Warning: include_once(01article/_headinclude.php) [function.include-once]: failed to open stream: No such file or directory in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 48

Warning: include_once() [function.include]: Failed opening '01article/_headinclude.php' for inclusion (include_path='.:/usr/share/php:..') in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 48

Warning: include_once(01article/_functions.php) [function.include-once]: failed to open stream: No such file or directory in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 49

Warning: include_once() [function.include]: Failed opening '01article/_functions.php' for inclusion (include_path='.:/usr/share/php:..') in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 49

Fatal error: Call to undefined function addparameter2link() in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 81

Es muss doch machbar sein, dass es klappt. Und auf Object oder iframe will ich nicht zurückgreifen, da die höhe und Breite nie richtig stimmen wird bei sowas!

Hat jemand eine Idee?

Und wenn ich das so mache: Wie vorgegeben
<?PHP
$subfolder 
"news/"// Unterverzeichnis
$modul "01article";      // Modul- und Verzeichnisname (ID-Name), ggf. ändern

// Weitere mögliche Parameter...

include($subfolder."01module/".$modul."/01article.php");
?>


Bekomme ich diese Fehler:
Quote
Warning: mysql_num_fields(): supplied argument is not a valid MySQL result resource in /www/htdocs/w00b2576/gn/news/01acp/system/functions.php  on line 249

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /www/htdocs/w00b2576/gn/news/01acp/system/functions.php on line 250

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /www/htdocs/w00b2576/gn/news/01acp/system/functions.php on line 1804

Warning: include_once(news/01module/01acp/_headinclude.php) [function.include-once]: failed to open stream: No such file or directory in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 48

Warning: include_once() [function.include]: Failed opening 'news/01module/01acp/_headinclude.php' for inclusion (include_path='.:/usr/share/php:..') in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 48

Warning: include_once(news/01module/01acp/_functions.php) [function.include-once]: failed to open stream: No such file or directory in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 49

Warning: include_once() [function.include]: Failed opening 'news/01module/01acp/_functions.php' for inclusion (include_path='.:/usr/share/php:..') in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 49

Warning: include(news/01module/01acp/main_top.html) [function.include]: failed to open stream: No such file or directory in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 117

Warning: include(news/01module/01acp/main_top.html) [function.include]: failed to open stream: No such file or directory in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 117

Warning: include() [function.include]: Failed opening 'news/01module/01acp/main_top.html' for inclusion (include_path='.:/usr/share/php:..') in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 117

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/htdocs/w00b2576/gn/news/01acp/system/functions.php on line 32

Warning: Division by zero in /www/htdocs/w00b2576/gn/news/01acp/system/functions.php on line 33

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 167

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 208

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 215

Warning: include(news/01module/01acp/pages.html) [function.include]: failed to open stream: No such file or directory in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 520

Warning: include(news/01module/01acp/pages.html) [function.include]: failed to open stream: No such file or directory in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 520

Warning: include() [function.include]: Failed opening 'news/01module/01acp/pages.html' for inclusion (include_path='.:/usr/share/php:..') in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 520

Warning: include(news/01module/01acp/main_bottom.html) [function.include]: failed to open stream: No such file or directory in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 523

Warning: include(news/01module/01acp/main_bottom.html) [function.include]: failed to open stream: No such file or directory in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 523

Warning: include() [function.include]: Failed opening 'news/01module/01acp/main_bottom.html' for inclusion (include_path='.:/usr/share/php:..') in /www/htdocs/w00b2576/gn/news/01module/01article/01article.php on line 523

94
Changelog:

v1.0
- FIXED: WBB_WCF_PFAD
- FIXED: Passwort Variable

v1.2
- NEW: Lostpassword

Addons:
- Extern Avatar from WBB in 4images Comments

 :flag-de:
Mit dieser Modifikation können sich die User im Woltlab Burning Board und in 4images zu gleich registrieren. Die User erhalten dadurch einheitlich die gleiche ID.

Es ist wichtig, dass das Forum in der gleichen Datenbank wie 4images installiert ist.
Wo das Forum hochgeladen wurde ist im Grunde egal, da man den Pfad angeben kann.
Ich habe es im root/forum angelegt.

 :flag-en:
With this modification, the user can in WoltLab Burning Board, and in 4images to register the same. The users will thus uniformly the same ID.

It is important that the forum is installed into the same database as 4images.
Where the forum was uploaded is basically no matter, because you can specify the path.
I have it in root / forum created.

Installation:
Step 1
Open / Öffne: include/constants.php
Search / Suche:
// User levels
Add above / Füge darüber:
// WBB 1zu1 Registrierung
define('WBB_WCF_PFAD''./forum/wcf/');     // Pfad zum Forum


Step 2
Open / Öffne: register.php
Search / Suche:
    if ($result) {
      
$activation_url $script_url."/register.php?action=activate&activationkey=".$activationkey;

      include(
ROOT_PATH.'includes/email.php');
      
$site_email = new Email();
      
$site_email->set_to($user_email);
      
$site_email->set_subject($lang['register_success_emailsubject']);
      
$site_email->register_vars(array(
        
"activation_url" => $activation_url,
        
"user_name" => $user_name,
        
"user_password" => $user_password,
        
"site_name" => $config['site_name']
      ));

Add above / Füge darüber:
// User im WBB direkt anlegen
require_once(''.WBB_WCF_PFAD.'lib/util/StringUtil.class.php');
 
$salt StringUtil::getRandomID();
$user_password_wbb =   StringUtil::getDoubleSaltedHash($user_password$salt);
 
$sql "INSERT INTO wcf1_user
(username, password, salt, email, registrationDate)
VALUES
('"
.$user_name."', '".$user_password_wbb."', '".$salt."', '".$user_email."', '".time()."')";
$result $site_db->query($sql);
$userID mysql_insert_id();
 
$sql "INSERT INTO wcf1_user_to_groups
(userID, groupID)
VALUES
("
.$userID.", '3')";
$result $site_db->query($sql);
// User im WBB direkt anlegen


Step 3
Open / Öffne: member.php
Search / Suche:
      $sql "UPDATE ".USERS_TABLE."
              SET "
.get_user_table_field("""user_password")." = '".$user_password_hashed."'
              WHERE "
.get_user_table_field("""user_id")." = ".$checkuser[$user_table_fields['user_id']];
      
$site_db->query($sql);

Add after / Füge danach ein:
    require_once(''.WBB_WCF_PFAD.'lib/util/StringUtil.class.php');
    
$salt StringUtil::getRandomID();
    
$user_password_wbb =   StringUtil::getDoubleSaltedHash($user_password$salt);
	
  
      
$sql "UPDATE wcf1_user
              SET password = '"
.$user_password_wbb."', salt = '".$salt."'
              WHERE userID = "
.$checkuser[$user_table_fields['user_id']];
      
$site_db->query($sql);


Finish / Fertig

95
 :flag-de:
Mit dieser Modifikation ist es möglich, dass beim einstellen eines Bildes, automatisch ein Thread mit dem Bildname erstellt wird.
Getestet wurde das ganze mit: Wbb3.1.* / Wbblite2*

 :flag-en:
With this modification, it is possible to adjust that when an image is automatically created a thread with the image name.
We tested the whole thing with: Wbb3.1 .* / * WBBLite2

Voraussetzung / Important:
 :flag-de:
Das Forum muss in der gleichen Datenbank wie 4images installiert sein.
 :flag-en:
The forum must be installed in the same database as 4images.

Installation:
Step 1
Öffne / Open: includes/constants.php
Suche/ Search:
define('URL_PAGE''page');
define('URL_ID''id');

Füge darunter / Add after:
// Forenpost erstellen
define('FOREN_USER_NAME''GameVote.Net');     // Admin Name aus dem Forum
define('FOREN_THREAD_NAME_ZUSATZ''Diskussion zu:');     // Was vor dem Bildernname stehen soll
define('FOREN_USER_ID''3');                // Admin ID aus dem Forum
define('FOREN_BOARD_ID''5');               // In welchem Teil der Thread erstellt werden soll
define('FOREN_HTML''1');                   // Ob HTML aktiviert sein soll (Sollte!)


Step 2
Öffne / Open: admin/images.php
Suche / Search:
        if ($result) {
          
$search_words = array();
          foreach (
$search_match_fields as $image_column => $match_column) {
            if (isset(
$HTTP_POST_VARS[$image_column.'_'.$i])) {
              
$search_words[$image_column] = stripslashes($HTTP_POST_VARS[$image_column.'_'.$i]);
            }
          }
          
add_searchwords($image_id$search_words);
          
$log[] = $lang['image_add_success'].": <b>".format_text(stripslashes($image_name), 2)."</b> (".$new_name.")";
        }
        else {
          
$log[] = $lang['image_add_error'].": <b>".format_text(stripslashes($image_name), 2)."</b> (".$new_name.")";
        }
      }

Füge darüber / Add above:
// FORENBEITRAG AUTOMATISCH ERSTELLEN ANFANG
// Forenthread erstellen
        
$sql "INSERT INTO wbb1_1_thread
                (boardID, time, topic, username)
                VALUES
                ("
.FOREN_BOARD_ID.", UNIX_TIMESTAMP(), '".FOREN_THREAD_NAME_ZUSATZ." ".$image_name."', '".FOREN_USER_NAME."')";
        
$result $site_db->query($sql);
$threadID mysql_insert_id();

// Forenpost erstellen
        
$sql "INSERT INTO wbb1_1_post
                 (threadID, enableHtml, username, subject, userID, message)
                 VALUES
                ("
.$threadID.", ".FOREN_HTML.", '".FOREN_USER_NAME."', '".FOREN_THREAD_NAME_ZUSATZ." ".$image_name."',  '".FOREN_USER_ID."', '".$image_description."')";
        
$result =  $site_db->query($sql);
$postID mysql_insert_id();

//Thread updaten:
$sql "UPDATE wbb1_1_thread 
SET firstPostID = "
.$postID.",
lastPosterID = "
.FOREN_USER_ID.",
lastPoster = '"
.FOREN_USER_NAME."',
lastPostTime = "
.time()."
WHERE threadID="
.$threadID;

$result $site_db->query($sql);

//Foren threadpost count
$sql "SELECT * FROM wbb1_1_board WHERE boardID = ".FOREN_BOARD_ID;
$result $site_db->query($sql);
$row mysql_fetch_assoc($result);

$threads $row['threads'];
$posts $row['posts'];

//Forum updaten:
$sql "UPDATE wbb1_1_board SET threads = ".($threads 1)." AND posts = ".($posts 1);
$result $site_db->query($sql);

//board_lastPost updaten:
$sql "UPDATE wbb1_1_board_last_post SET threadID = ".$threadID." WHERE boardID = ".FOREN_BOARD_ID;
$result $site_db->query($sql);

//user daten:
$sql "SELECT posts FROM wbb1_1_user WHERE userID = ".FOREN_USER_ID;
$result $site_db->query($sql);
$row mysql_fetch_assoc($result);
$userPosts $row['posts'];

//user Updaten:
$sql "UPDATE wbb1_1_user SET posts = ".$userPosts." WHERE userID = ".FOREN_USER_ID;
$result $site_db->query($sql);
// FORENBEITRAG AUTOMATISCH ERSTELLEN ENDE


Das wars / Finish

96
Open / Öffne: index.php
Search / Suche:
$site_template->register_vars("new_images"$new_images);
unset(
$new_images);

Add after / Füge danach ein:
//-----------------------------------------------------
//--- Show New Images By Category ---------------------
//-----------------------------------------------------
$imgtable_width ceil(intval($config['image_table_width']) / $config['image_cells']);
if ((
substr($config['image_table_width'], -1)) == "%") {
  
$imgtable_width .= "%";
}

$additional_sql "";
if (!empty(
$additional_image_fields)) {
  foreach (
$additional_image_fields as $key => $val) {
    
$additional_sql .= ", i.".$key;
  }
}

$num_news_images_bycat $config['image_cells'];
// Option Start
$bycat_in = array(72,132); // Change the Number in your category-id - ID ripping by commas
                           // Ändere die Nummer in deine Kategorie-ID - ID trennen durch Komma
// Option Ende
$sql "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.""user_name")."
        FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
        LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
        WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN ("
.get_auth_cat_sql("auth_viewcat").") AND i.cat_id IN (".implode(", "$bycat_in).") 
        ORDER BY i.image_date DESC
        LIMIT 
$num_news_images_bycat";
$result $site_db->query($sql);
$num_rows $site_db->get_numrows($result);

if (!
$num_rows)  {
  
$news_images_bycat "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  
$news_images_bycat .= $lang['no_news_images_bycat'];
  
$news_images_bycat .= "</td></tr></table>";
}
else  {
  
$news_images_bycat "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
  
$count 0;
  
$bgcounter 0;
  while (
$image_row $site_db->fetch_array($result)){
    if (
$count == 0) {
      
$row_bg_number = ($bgcounter++ % == 0) ? 2;
      
$news_images_bycat .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    
$news_images_bycat .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";

    
show_image($image_row);
    
$news_images_bycat .= $site_template->parse_template("thumbnail_bit");
    
$news_images_bycat .= "\n</td>\n";
    
$count++;
    if (
$count == $config['image_cells']) {
      
$news_images_bycat .= "</tr>\n";
      
$count 0;
    }
  } 
// end while

  
if ($count 0)  {
    
$leftover = ($config['image_cells'] - $count);
    if (
$leftover >= 1) {
      for (
$f 0$f $leftover$f++) {
        
$news_images_bycat .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      
$news_images_bycat .= "</tr>\n";
    }
  }
  
$news_images_bycat .= "</table>\n";
// end else

$site_template->register_vars("news_images_bycat"$news_images_bycat);
unset(
$news_images_bycat);


Suche nach // Option Start. Dort müssen die ID´s der Kategorien eingetragen werden
Search / / Start option. Where the ID's of the categories listed


Add this code in your home.html
Füge diesen Code in deiner home.html ein
{news_images_bycat}

Finish
Fertig

97
Discussion & Troubleshooting / download url - Kein Counter!?
« on: May 20, 2010, 11:37:06 AM »
Hallo zusammen,

wenn ich via download url (sonst noch nie genutzt) ein Pfad zu einer Datei angebe und diese gedownloaded wird, wird der download nicht gezählt. Ist das gewollt? Wenn ja, gibt es denn eine Möglichkeit, dass er trotzdem zählt?

98
Hallo,

wie bekomme ich das hin, dass im ACP Bilddatei und Thumbnail keine Pflichtfelder mehr sind? Ist das möglich?

99
Discussion & Troubleshooting / Links in TXT eintragen
« on: May 12, 2010, 08:16:32 AM »
Hallo zusammen,

ich möchte beim Bilder einstellen, die Links mit ID in einer TXT übernehmen.

Folgendes habe ich gemacht:

öffne admin/images.php
Suche:
// Start Upload
include(ROOT_PATH.'includes/upload.php');
$site_upload = new Upload();

Darunter habe ich schonmal das eingefügt
// DL-COUNTER START
$editlink="links.txt";
$editcount="counter.txt";
// DL-COUNTER ENDE

Die Dateien liegen im admin/ Ordner

Dann habe ich folgendes gesucht:
  show_hidden_input("num_newimages"$num_newimages);
  
show_form_footer($lang['add'], $lang['reset'], 2""" onClick='showProgress()'");
}

Und darunter das eingefügt:
// DL-COUNTER START
if ($_POST[Senden] == "Einfügen")
{
if (
$image_id == "" || $image_download_url == "")
      {
        echo 
"<b><div align=\"center\"><font color=\"red\">du hast vergessen, eine ID oder URL einzugeben, bitte nochmal probieren!</font></div></b>";
}
else 
	

{
	
$id $image_id;
	
$url $image_download_url;
	
$file file($editlink);
	
$fd=fopen($editlink"a+");
      
	
foreach (
$file as $line
	
	
{
	
	
$exp_line explode("|"$line);
        
	
if (
$id == $exp_line[0]) 
        
	
	
{
        
	
	
$Zähler=TRUE;
	
	

	
	
	
echo 
"<b><div align=\"center\"><font color=\"red\">Diese ID existiert bereits, eine ID kann nicht doppelt belegt werden!</font></div></b>";
        
	
	
}
        
	
else
        
	
	
{
        
	
	
continue;
        
	
	
}
	
	
}
	
if (
$Zähler==FALSE)
	
	
{
	
	
//schreibe neuen Link in links.txt
	
	
fwrite($fd"$image_id|$image_download_url\n");
	
	
fclose($fd);
	
	
//schreibe initialisierenden Datensatz in counter.txt
	
	
$fd=fopen($editcount"a+");
	
	
$date date("d.m.y");
	
	
$time date("H:i");
	
	
fwrite($fd"$id|0|$date|$time\n");
	
	
fclose($fd);
	
	
}
}
}
// DL-COUNTER ENDE


Aber es wird nichts in die links.txt oder counter.php eingetragen! Kann mir jemand helfen?

100
Discussion & Troubleshooting / New images Error
« on: May 05, 2010, 10:33:53 AM »
I have this Problem:
http://gamevote.net/search.htm?search_new_images=1

Quote
Notice: Undefined variable: newsticker_info in /www/htdocs/w00b2576/gamevote/includes/page_header.php  on line 104

Notice: Undefined variable: coverurl in /www/htdocs/w00b2576/gamevote/includes/page_header.php on line 113

Notice: Undefined variable: newsticker_warning in /www/htdocs/w00b2576/gamevote/includes/page_header.php on line 117

Notice: Undefined variable: newsticker_success in /www/htdocs/w00b2576/gamevote/includes/page_header.php on line 118

includes/page_header.php
I Can find the Problem
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: page_header.php                                      *
 *        Copyright: (C) 2002-2009 Jan Sorgalla                           *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.7                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/
if (!defined('ROOT_PATH')) {
  die(
"Security violation");
}

// Cache Templates
/*$template_list = 'header,footer,category_dropdown_form,user_logininfo,user_loginform';
if (isset($templates_used) && $templates_used != "") {
  $template_list = $template_list.",".$templates_used;
}
$site_template->cache_templates($template_list);*/

//-----------------------------------------------------
//--- Register Global Vars ----------------------------
//-----------------------------------------------------
$total_images 0;
$total_categories 0;
$auth_cat_sql['auth_viewcat']['IN'] = 0;
$auth_cat_sql['auth_viewcat']['NOTIN'] = 0;

$cache_id create_cache_id(
  
'data.auth_and_info',
  array(
$user_info[$user_table_fields['user_id']])
);

if (!
$data get_cache_file($cache_idnull)) {
  if (!empty(
$cat_cache)) {
    foreach (
$cat_cache as $key => $val) {
      if (
check_permission("auth_viewcat"$key)) {
        
$total_categories++;
        if (isset(
$val['num_images'])) {
          
$total_images += $val['num_images'];
        }
        else {
          
$cat_cache[$key]['num_images'] = 0;
        }
        
$auth_cat_sql['auth_viewcat']['IN'] .= ", ".$key;
      }
      else {
        
$auth_cat_sql['auth_viewcat']['NOTIN'] .= ", ".$key;
      }
    }
  }

  
$data = array();

  
$data['total_images'] = $total_images;
  
$data['total_categories'] = $total_categories;
  
$data['auth_viewcat']['IN'] = $auth_cat_sql['auth_viewcat']['IN'];
  
$data['auth_viewcat']['NOTIN'] = $auth_cat_sql['auth_viewcat']['NOTIN'];

  
save_cache_file($cache_idserialize($data));

} else {
  
$data unserialize($data);

  
$total_images $data['total_images'];
  
$total_categories $data['total_categories'];
  
$auth_cat_sql['auth_viewcat']['IN'] = $data['auth_viewcat']['IN'];
  
$auth_cat_sql['auth_viewcat']['NOTIN'] = $data['auth_viewcat']['NOTIN'];
}

$file get_included_files();
$file get_file_name(basename($file[0]));
$list = array("categories""details""index""member""postcards""register""search""top");
$array = array();
foreach (
$list as $name)
{
  
$array[$name] = ($name == $file);
}
$site_template->register_vars($array);
$news_ticker_warning $config['news_ticker_warning'];
$news_ticker_success $config['news_ticker_success'];
$news_ticker_info $config['news_ticker_info'];
   if(
$config['news_ticker_warning'] == 1)  {
   
$newsticker_warning .= "warningbox";
   }
   if(
$config['news_ticker_success'] == 1)  {
   
$newsticker_success .= "successbox";
   }
   if(
$config['news_ticker_info'] == 1)  {
   
$newsticker_info .= "infobox";
   }
   
$news_ticker $config['news_ticker'];
   
$headline "<table style=\"width:".$config['image_table_width']."; border-style:none;\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
   
$headline .= "<tr>\n";
   
$headline .= "<td>".$news_ticker."</td>\n";
   
$headline .= "</tr>\n";
   
$headline .= "</table>\n";
   
$cover_url $config['cover_url'];
   
$coverurl .= "".$cover_url."";
$site_template->register_vars(array(
  
"news_ticker" => $headline,
  
"cover_url" => $coverurl//News Ticker Mod
  
"news_ticker_warning" => $newsticker_warning,
  
"news_ticker_success" => $newsticker_success,
  
"news_ticker_info" => $newsticker_info,
  
"home_url"  => ROOT_PATH,
  
"media_url" => MEDIA_PATH,
  
"thumb_url" => THUMB_PATH,
  
"icon_url" => ICON_PATH,
  
"template_url" => TEMPLATE_PATH,
  
"template_image_url" => TEMPLATE_PATH."/images",
  
"template_lang_image_url" => TEMPLATE_PATH."/images_".$config['language_dir'],
  
"site_name" => $config['site_name'],
  
"site_email" => $config['site_email'],
  
"user_loggedin" => ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER_AWAITING) ? 1,
  
"user_loggedout" => ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER_AWAITING) ? 0,
  
"is_admin" => ($user_info['user_level'] == ADMIN) ? 0,
  
"self" => $site_sess->url($self_url),
  
"self_full" => $site_sess->url($script_url."/".$self_url),
  
"script_version" => SCRIPT_VERSION,
  
"cp_link" => ($user_info['user_level'] != ADMIN) ? "" "\n<p align=\"center\">[<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php")."\">Admin Control Panel</a>]</p>\n",
  
"total_categories" => $total_categories,
  
"total_images" => $total_images,
  
"url_new_images" => $site_sess->url(ROOT_PATH."search.php?search_new_images=1"),
  
"url_top_images" => $site_sess->url(ROOT_PATH."top.php"),
  
"url_top_cat_images" => $site_sess->url(ROOT_PATH."top.php".(($cat_id && preg_match("/categories.php/"$self_url)) ? "?".URL_CAT_ID."=".$cat_id "")),
  
"url_register" => (!empty($url_register)) ? $site_sess->url($url_register) : $site_sess->url(ROOT_PATH."register.php"),
  
"url_search" => $site_sess->url(ROOT_PATH."search.php"),
  
"url_lightbox" => $site_sess->url(ROOT_PATH."lightbox.php"),
  
"url_control_panel" => (!empty($url_control_panel)) ? $site_sess->url($url_control_panel) : $site_sess->url(ROOT_PATH."member.php?action=editprofile"),
  
"url_categories" => $site_sess->url(ROOT_PATH."categories.php"),
  
"url_report_image" => $site_sess->url(ROOT_PATH."report_pic.php?action=send_image_report"),
  
"url_home" => $site_sess->url(ROOT_PATH."index.php"),
  
"url_login" => (!empty($url_login)) ? $site_sess->url($url_login) : $site_sess->url(ROOT_PATH."login.php"),
  
"url_logout" => (!empty($url_logout)) ? $site_sess->url($url_logout) : $site_sess->url(ROOT_PATH."logout.php"),
  
"url_member" => (!empty($url_member)) ? $site_sess->url($url_member) : $site_sess->url(ROOT_PATH."member.php"),
  
"url_upload" => (!empty($url_upload)) ? $site_sess->url($url_upload) : $site_sess->url(ROOT_PATH."member.php?action=uploadform"),
  
"url_lost_password" => (!empty($url_lost_password)) ? $site_sess->url($url_lost_password) : $site_sess->url(ROOT_PATH."member.php?action=lostpassword"),
  
"url_captcha_image" => $site_sess->url(ROOT_PATH."captcha.php"),
  
"recaptcha" => ($captcha_recaptcha) ? recaptcha_image() : "",
  
"recaptcha_public" => @$captcha_recaptcha[0],
  
"recaptcha_private" => @$captcha_recaptcha[1],
  
"thumbnails" => "",
  
"paging" => "",
  
"paging_stats" => "",
  
"has_rss" => false,
  
"rss_title" => "",
  
"rss_url" => "",
  
"copyright" => '
<p id="copyright" align="center">
  Powered by <b>4images</b> '
.SCRIPT_VERSION.'
  <br />
  Copyright &copy; 2002-'
.date('Y').' <a href="http://www.4homepages.de" target="_blank">4homepages.de</a>
</p>
'
,
));

if (!empty(
$additional_urls)) {
  
$register_array = array();
  foreach (
$additional_urls as $key => $val) {
    
$register_array[$key] = $site_sess->url($val);
  }
  
$site_template->register_vars($register_array);
}

// Replace Globals in $lang
$lang $site_template->parse_array($lang);

$site_template->register_vars(array(
  
"lang_site_stats" => $lang['site_stats'],
  
"lang_date" => $lang['date'],
  
"lang_doc_language" => $lang['doc_language'],
  
"lang_meta_robots" => $lang['meta_robots'],
  
"lang_meta_robots_revisit" => $lang['meta_robots_revisit'],
  
"lang_meta_autor" => $lang['meta_autor'],
  
"lang_font_big" => $lang['font_big'],
  
"lang_font_small" => $lang['font_small'],
  
"lang_font_standard" => $lang['font_standard'],
  
"lang_hp_home" => $lang['hp_home'],
  
"lang_hp_forum" => $lang['hp_forum'],
  
"lang_hp_mehr" => $lang['hp_mehr'],
  
"lang_hp_profil" => $lang['hp_profil'],
  
"lang_file_size" => $lang['file_size'],
  
"lang_description" => $lang['description'],
  
"lang_registered_user" => $lang['registered_user'],
  
"lang_random_image" => $lang['random_image'],
  
"lang_categories" => $lang['categories'],
  
"lang_sub_categories" => $lang['sub_categories'],
  
"lang_new_images" => $lang['new_images'],
  
"lang_top_images" => $lang['top_images'],
  
"lang_search" => $lang['search'],
  
"lang_advanced_search" => $lang['advanced_search'],
  
"lang_lightbox" => $lang['lightbox'],
  
"lang_register" => $lang['register'],
  
"lang_control_panel" => $lang['control_panel'],
  
"lang_login" => $lang['login'],
  
"lang_auto_login" => $lang['lang_auto_login'],
  
"lang_logout" => $lang['logout'],
  
"lang_lost_password" => $lang['lost_password'],
  
"lang_user_name" => $lang['user_name'],
  
"lang_password" => $lang['password'],
  
"lang_go" => $lang['go'],
  
"lang_images_per_page" => $lang['images_per_page'],
  
"charset" => $lang['charset'],
  
"direction" => $lang['direction']
));

//-----------------------------------------------------
//--- Category Dropdown -------------------------------
//-----------------------------------------------------

if (!$cache_enable) {
    
$category_dropdown_selfjump get_category_dropdown($cat_id1);
} else {
  
$cache_id create_cache_id(
    
'data.dropdown_selfjump',
    array(
      
$user_info[$user_table_fields['user_id']],
      
$config['template_dir'],
      
$config['language_dir']
    )
  );

  if (!
$category_dropdown_selfjump get_cache_file($cache_id)) {
    
// Always append session id if cache is enabled
    
$old_session_mode $site_sess->mode;
    
$site_sess->mode 'get';

    
// Set $cat_id to 0 to ensure that no category is selected
    
$category_dropdown_selfjump get_category_dropdown(01);

    
$site_sess->mode $old_session_mode;

    
save_cache_file($cache_id$category_dropdown_selfjump);
  }
}

$site_template->register_vars("category_dropdown_selfjump"$category_dropdown_selfjump);
unset(
$category_dropdown_selfjump);

// -------------------------------------
if (!$cache_enable) {
    
$category_dropdown_form $site_template->parse_template("category_dropdown_form");
} else {
  
$cache_id create_cache_id(
    
'data.dropdown_form',
    array(
      
$user_info[$user_table_fields['user_id']],
      
// $cat_id, // uncomment if the current category should be selected, will increase the number of cache files
      
$config['template_dir'],
      
$config['language_dir']
    )
  );

  if (!
$category_dropdown_form get_cache_file($cache_id)) {
    
// Always append session id if cache is enabled
    
$old_session_mode $site_sess->mode;
    
$site_sess->mode 'get';

    
$category_dropdown_form $site_template->parse_template("category_dropdown_form");

    
$site_sess->mode $old_session_mode;

    
save_cache_file($cache_id$category_dropdown_form);
  }
}

$site_template->register_vars("category_dropdown_form"$category_dropdown_form);
unset(
$category_dropdown_form);

//######################################### Random Images Start #########################################################
$num_random_images 13;

$sql "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name".get_user_table_field(", u.""user_name")."
        FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
        LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
        WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id NOT IN ("
.get_auth_cat_sql("auth_viewcat""NOTIN").")
        ORDER BY RAND()
        LIMIT 
$num_random_images ";
$result $site_db->query($sql);
$num_rows $site_db->get_numrows($result);

if (!
$num_rows)  {
    
$random_images $lang['no_random_images'];
  }
else  {
$random_images ="";
  while (
$image_row $site_db->fetch_array($result)){
   
show_image($image_row);
   
$random_images .= $site_template->parse_template("random_image");
  } 
// end while

// end else

$site_template->register_vars(array(
"random_images" => $random_images

)); 
unset(
$random_images);
//######################################### Random Images END #########################################################

//-----------------------------------------------------
//--- Random Image ------------------------------------
//-----------------------------------------------------
$random_image = (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0) ? "" get_random_image();
$site_template->register_vars("random_image"$random_image);
unset(
$random_image);

//-----------------------------------------------------
//--- Set Paging Vars ---------------------------------
//-----------------------------------------------------
if (isset($HTTP_POST_VARS['setperpage'])) {
  
$setperpage intval($HTTP_POST_VARS['setperpage']);
  if (
$setperpage) {
    
$site_sess->set_session_var("perpage"$setperpage);
    
$session_info['perpage'] = $setperpage;
  }
}

if (isset(
$session_info['perpage'])) {
  
$perpage $session_info['perpage'];
}
else {
  
$perpage ceil($config['default_image_rows'] * $config['image_cells']);
}

//-----------------------------------------------------
//--- Set Perpage Dropdown ----------------------------
//-----------------------------------------------------
$setperpage_dropdown "\n<select onchange=\"if (this.options[this.selectedIndex].value != 0 &amp;&amp; typeof forms['perpagebox'] != 'undefined'){ forms['perpagebox'].submit() }\" name=\"setperpage\" class=\"setperpageselect\">\n";
for(
$i 1$i <= $config['custom_row_steps']; $i++) {
  
$setvalue $config['image_cells'] * $i;
  
$setperpage_dropdown .= "<option value=\"".$setvalue."\"";
    if (
$setvalue == $perpage) {
    
$setperpage_dropdown .= " selected=\"selected\"";
  }
  
$setperpage_dropdown .= ">";
  
$setperpage_dropdown .= $setvalue;
  
$setperpage_dropdown .= "</option>\n";
}
$setperpage_dropdown .= "</select>\n";
if (
$cat_id != 0) {
  
$setperpage_dropdown .= "<input type=\"hidden\" name=\"cat_id\" value=\"".$cat_id."\" />\n";
}
if (isset(
$show_result) && $show_result == 1) {
  
$setperpage_dropdown .= "<input type=\"hidden\" name=\"show_result\" value=\"1\" />\n";
}
$site_template->register_vars("setperpage_dropdown"$setperpage_dropdown);
$setperpage_dropdown_form $site_template->parse_template("setperpage_dropdown_form");
$site_template->register_vars("setperpage_dropdown_form"$setperpage_dropdown_form);

$site_template->un_register_vars("setperpage_dropdown");
unset(
$setperpage_dropdown);
unset(
$setperpage_dropdown_form);

//-----------------------------------------------------
//--- Add & Delete from Lists -------------------------
//-----------------------------------------------------
if ($action == "addtolightbox" && $id) {
  if (
$user_info['user_level'] >= USER) {
    
$msg = (add_to_lightbox($id)) ? $lang['lightbox_add_success'] : $lang['lightbox_add_error'];
  }
  else {
    
$msg $lang['lightbox_register'];
  }
}
if (
$action == "removefromlightbox" && $id) {
  if (
$user_info['user_level'] >= USER) {
    
$msg = (remove_from_lightbox($id)) ? $lang['lightbox_remove_success'] : $lang['lightbox_remove_error'];
  }
  else {
    
$msg $lang['lightbox_register'];
  }
}
if (
$action == "clearlightbox") {
  if (
$user_info['user_level'] >= USER) {
    
$msg = (clear_lightbox()) ? $lang['lightbox_delete_success'] : $lang['lightbox_delete_error'];
  }
  else {
    
$msg $lang['lightbox_register'];
  }
}

//-----------------------------------------------------
//--- User Box ----------------------------------------
//-----------------------------------------------------
if ($user_info['user_level'] >= USER) {
  
$site_template->register_vars("lang_loggedin_msg"preg_replace("/".$site_template->start."loggedin_user_name".$site_template->end."/siU"format_text($user_info['user_name'], 2), $lang['lang_loggedin_msg']));
  if (!empty(
$user_info['lightbox_image_ids']))  {
    
$image_id_sql str_replace(" "", "trim($user_info['lightbox_image_ids']));
    
$sql "SELECT COUNT(image_id) AS images
            FROM "
.IMAGES_TABLE."
            WHERE image_active = 1 AND image_id IN (
$image_id_sql) AND cat_id NOT IN (".get_auth_cat_sql("auth_viewcat""NOTIN").")";
    
$result $site_db->query_firstrow($sql);
    
$lightbox_rows $result['images'];
    } else {
    
$lightbox_rows 0;
   }
  
  
$site_template->register_vars(array(
    
"lightbox_count" => $lightbox_rows,
    
"bold_start" => (!empty($lightbox_rows)) ? "<b>":"",
    
"bold_end" => (!empty($lightbox_rows)) ? "</b>":""
  
));
  
$user_box $site_template->parse_template("user_logininfo");
  
$site_template->register_vars(array(
    
"user_box" => $user_box,
    
"user_loggedin" => 1,
    
"user_loggedout" => 0,
    
"is_admin" => ($user_info['user_level'] == ADMIN) ? 0
  
));
  
$site_template->un_register_vars("user_logininfo");
  unset(
$user_box);
}
else {
  
$user_box $site_template->parse_template("user_loginform");
  
$site_template->register_vars(array(
    
"user_box" => $user_box,
    
"user_loggedin" => 0,
    
"user_loggedout" => 1,
    
"is_admin" => 0
  
));
  
$site_template->un_register_vars("user_loginform");
  unset(
$user_box);
}

?>

101
Chit Chat / -
« on: April 30, 2010, 04:09:47 PM »
-

102
Discussion & Troubleshooting / Großes Problem
« on: April 30, 2010, 02:05:57 PM »
Hallo zusammen,

ich habe ein Problem. Und zwar ist es nun so, egal wieviele Bilder ich hochladen, es wird IMMER nur "EIN" neues angezeigt. In der index.php steht:
$num_new_images = 9;

Wenn ein Bild z.B in der Kategorie "Abenteuer" liegt und man auf dieser Kategorie klickt, wird es dort nicht angezeigt, aber im Clickstream steht das es dort hinterlegt ist.
Was ist passiert? Das kam auf einmal!

Edit://
Hat sich erledigt, hatte da was im Code falsch. Hatte was mit den Gruppenbilder zu tun!

103
Chit Chat / Werbebanner Verwaltung
« on: April 29, 2010, 09:42:29 PM »
Huhu,

kennt jemand von euch ein Script in dem man Banner einfügen kann, wo klicks etc gezählt werden?
Ich hatte sowas mal aber ich finde es einfach nicht mehr.

Bin für jede Hilfe dankbar!

104
Wie kann man denn in den eigens angefertigten Seiten die Kategorien anzeigen?

edit::
Hat niemand eine Idee? Ich weis absolut nicht wie das klappen soll. Mir wäre das sehr wichtig.

105
Discussion & Troubleshooting / Delete
« on: March 24, 2010, 12:10:45 AM »
Delete

Pages: 1 ... 3 4 5 6 [7] 8 9 10 11 ... 19