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 - AntiNSA2

Pages: 1 2 3 [4] 5
46
Chit Chat / how to ad image to this forum frofile signature?
« on: March 06, 2009, 02:17:09 PM »
Hi! not really important... but Im trying to ad a banner to my forum profile signature with this code :

<a href="www.thelifephotography.com"><img src="thelifephotography.com/logoad.jpg" longdesc="http://thelifephotography.com/logoad.jpg" /></a>


And it doesnt work... any ideas?


47
I am sorry I could not figure this out my self.

I need to create 2 rows of 6 new image pictures, each 161 pixel thumbnails, in one column on the home page... and if possible  I would like to include the ability to add this as on details......

As always, any help id greatly appreciated.


Robert

www.thelifephotography.com

48
Hi!

I went to bed early this morning after trying to install guestbook...

I am now getting this error:

Parse error: syntax error, unexpected T_VARIABLE in /home/lifephotography/htdocs/includes/page_header.php on line 62

And cant get site to load.

So I have tried to erase every modification from the guestbook mod, and even replaced the pageheader with a back up and still getting this error.

here is a copy of my pageheader:


<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: page_header.php                                      *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.6                                                *
 *                                                                        *
 *    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 {
"url_categories"
        
$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'];
}

// --- Start Mod: Ajax Starrating by KW ----------------------------------------

$rating_details $config['starrating_details'];
$rating_images $config['starrating_details_images'];
$rating_images_file $config['starrating_details_images_file'];
$rating_image_width $config['starrating_details_width'];
$rating_image_height $config['starrating_details_height'];
$rating_thumbs $config['starrating_thumbs'];
$thumbnails_rating_images $config['starrating_thumbs_images'];
$thumbnails_rating_images_file $config['starrating_thumbs_images_file'];
$thumbnails_rating_image_width $config['starrating_thumbs_width'];
$thumbnails_rating_image_height $config['starrating_thumbs_height'];
$imagepath TEMPLATE_PATH."/images";
$pixel "px";

$width_2 = @number_format($rating_image_width*2);
$width_3 = @number_format($rating_image_width*3);
$width_4 = @number_format($rating_image_width*4);
$width_5 = @number_format($rating_image_width*5);
$width_6 = @number_format($rating_image_width*6);
$width_7 = @number_format($rating_image_width*7);
$width_8 = @number_format($rating_image_width*8);
$width_9 = @number_format($rating_image_width*9);
$width_10 = @number_format($rating_image_width*10);

$thumbnails_width_2 = @number_format($thumbnails_rating_image_width*2);
$thumbnails_width_3 = @number_format($thumbnails_rating_image_width*3);
$thumbnails_width_4 = @number_format($thumbnails_rating_image_width*4);
$thumbnails_width_5 = @number_format($thumbnails_rating_image_width*5);
$thumbnails_width_6 = @number_format($thumbnails_rating_image_width*6);
$thumbnails_width_7 = @number_format($thumbnails_rating_image_width*7);
$thumbnails_width_8 = @number_format($thumbnails_rating_image_width*8);
$thumbnails_width_9 = @number_format($thumbnails_rating_image_width*9);
$thumbnails_width_10 = @number_format($thumbnails_rating_image_width*10);
// --- css starrating in details/ ecard ---
// --- active for members, static for guests ---
if ($rating_details == '4' && $user_info['user_level'] == GUEST) {
$css_starratings  "\n<style type=\"text/css\">\n.ratingblock { display:block; border-bottom:0px solid #999; padding-bottom:0px; margin-bottom:0px; }\n.container { background-color: #fff; width: 100%; border: 0px solid #ccc; padding: 5px; }\n.loading { height: $rating_image_height$pixel;}\n";
$css_starratings .= ".unit-rating {list-style:none; margin: 0px; padding:0px; height: $rating_image_height$pixel; position: relative; background: url('$imagepath/$rating_images_file') top left repeat-x; }\n.unit-rating li{ text-indent: -90000px; padding:0px; margin:0px; float: left;}\n.unit-rating li a:hover{ background: url('$imagepath/$rating_images_file') left center; z-index: 2; left: 0px;}\n.unit-rating li a { outline: none; display:block; width: $rating_image_width$pixel; height: $rating_image_height$pixel; text-decoration: none; text-indent: -9000px; z-index: 20; position: absolute; padding: 0px; }\n.unit-rating li.current-rating { background: url('$imagepath/$rating_images_file') left bottom; position: absolute; height: $rating_image_height$pixel; display: block; text-indent: -9000px; z-index: 1;}\n";
$css_starratings .= ".unit-rating a.r1-unit{left: 0px;}\n.unit-rating a.r1-unit:hover{width: $rating_image_width$pixel;}\n.unit-rating a.r2-unit{left: $rating_image_width$pixel;}\n.unit-rating a.r2-unit:hover{width: $width_2$pixel;}\n.unit-rating a.r3-unit{left: $width_2$pixel;}\n.unit-rating a.r3-unit:hover{width: $width_3$pixel;}\n.unit-rating a.r4-unit{left: $width_3$pixel;}\n.unit-rating a.r4-unit:hover{width: $width_4$pixel;}\n.unit-rating a.r5-unit{left: $width_4$pixel;}\n.unit-rating a.r5-unit:hover{width: $width_5$pixel;}\n.unit-rating a.r6-unit{left: $width_5$pixel;}\n.unit-rating a.r6-unit:hover{width: $width_6$pixel;}\n.unit-rating a.r7-unit{left: $width_6$pixel;}\n.unit-rating a.r7-unit:hover{width: $width_7$pixel;}\n.unit-rating a.r8-unit{left: $width_7$pixel;}\n.unit-rating a.r8-unit:hover{width: $width_8$pixel;}\n.unit-rating a.r9-unit{left: $width_8$pixel;}\n.unit-rating a.r9-unit:hover{width: $width_9$pixel;}\n.unit-rating a.r10-unit{left: $width_9$pixel;}\n.unit-rating a.r10-unit:hover{width: $width_10$pixel;}\n";
} elseif (
$rating_details == '4' && $user_info['user_level'] >= USER)  {
$css_starratings  "\n<style type=\"text/css\">\n.ratingblock { display:block; border-bottom:0px solid #999; padding-bottom:0px; margin-bottom:0px; }\n.container { background-color: #fff; width: 100%; border: 0px solid #ccc; padding: 5px; }\n.loading { height: $rating_image_height$pixel;}\n";
$css_starratings .= ".unit-rating {list-style:none; margin: 0px; padding:0px; height: $rating_image_height$pixel; position: relative; background: url('$imagepath/$rating_images_file') top left repeat-x; }\n.unit-rating li{ text-indent: -90000px; padding:0px; margin:0px; float: left;}\n.unit-rating li a:hover{ background: url('$imagepath/$rating_images_file') left center; z-index: 2; left: 0px;}\n.unit-rating li a { outline: none; display:block; width: $rating_image_width$pixel; height: $rating_image_height$pixel; text-decoration: none; text-indent: -9000px; z-index: 20; position: absolute; padding: 0px; }\n.unit-rating li.current-rating { background: url('$imagepath/$rating_images_file') left bottom; position: absolute; height: $rating_image_width$pixel; display: block; text-indent: -9000px; z-index: 1;}\n";
$css_starratings .= ".unit-rating a.r1-unit{left: 0px;}\n.unit-rating a.r1-unit:hover{width: $rating_image_width$pixel;}\n.unit-rating a.r2-unit{left: $rating_image_width$pixel;}\n.unit-rating a.r2-unit:hover{width: $width_2$pixel;}\n.unit-rating a.r3-unit{left: $width_2$pixel;}\n.unit-rating a.r3-unit:hover{width: $width_3$pixel;}\n.unit-rating a.r4-unit{left: $width_3$pixel;}\n.unit-rating a.r4-unit:hover{width: $width_4$pixel;}\n.unit-rating a.r5-unit{left: $width_4$pixel;}\n.unit-rating a.r5-unit:hover{width: $width_5$pixel;}\n.unit-rating a.r6-unit{left: $width_5$pixel;}\n.unit-rating a.r6-unit:hover{width: $width_6$pixel;}\n.unit-rating a.r7-unit{left: $width_6$pixel;}\n.unit-rating a.r7-unit:hover{width: $width_7$pixel;}\n.unit-rating a.r8-unit{left: $width_7$pixel;}\n.unit-rating a.r8-unit:hover{width: $width_8$pixel;}\n.unit-rating a.r9-unit{left: $width_8$pixel;}\n.unit-rating a.r9-unit:hover{width: $width_9$pixel;}\n.unit-rating a.r10-unit{left: $width_9$pixel;}\n.unit-rating a.r10-unit:hover{width: $width_10$pixel;}\n";
}
// --- active for members and guests ---
elseif ($rating_details == '5') {
$css_starratings  "\n<style type=\"text/css\">\n.ratingblock { display:block; border-bottom:0px solid #999; padding-bottom:0px; margin-bottom:0px; }\n.container { background-color: #fff; width: 100%; border: 0px solid #ccc; padding: 5px; }\n.loading { height: $rating_image_height$pixel;}\n";
$css_starratings .= ".unit-rating {list-style:none; margin: 0px; padding:0px; height: $rating_image_height$pixel; position: relative; background: url('$imagepath/$rating_images_file') top left repeat-x; }\n.unit-rating li{ text-indent: -90000px; padding:0px; margin:0px; float: left;}\n.unit-rating li a:hover{ background: url('$imagepath/$rating_images_file') left center; z-index: 2; left: 0px;}\n.unit-rating li a { outline: none; display:block; width: $rating_image_width$pixel; height: $rating_image_height$pixel; text-decoration: none; text-indent: -9000px; z-index: 20; position: absolute; padding: 0px; }\n.unit-rating li.current-rating { background: url('$imagepath/$rating_images_file') left bottom; position: absolute; height: $rating_image_height$pixel; display: block; text-indent: -9000px; z-index: 1;}\n";
$css_starratings .= ".unit-rating a.r1-unit{left: 0px;}\n.unit-rating a.r1-unit:hover{width: $rating_image_width$pixel;}\n.unit-rating a.r2-unit{left: $rating_image_width$pixel;}\n.unit-rating a.r2-unit:hover{width: $width_2$pixel;}\n.unit-rating a.r3-unit{left: $width_2$pixel;}\n.unit-rating a.r3-unit:hover{width: $width_3$pixel;}\n.unit-rating a.r4-unit{left: $width_3$pixel;}\n.unit-rating a.r4-unit:hover{width: $width_4$pixel;}\n.unit-rating a.r5-unit{left: $width_4$pixel;}\n.unit-rating a.r5-unit:hover{width: $width_5$pixel;}\n.unit-rating a.r6-unit{left: $width_5$pixel;}\n.unit-rating a.r6-unit:hover{width: $width_6$pixel;}\n.unit-rating a.r7-unit{left: $width_6$pixel;}\n.unit-rating a.r7-unit:hover{width: $width_7$pixel;}\n.unit-rating a.r8-unit{left: $width_7$pixel;}\n.unit-rating a.r8-unit:hover{width: $width_8$pixel;}\n.unit-rating a.r9-unit{left: $width_8$pixel;}\n.unit-rating a.r9-unit:hover{width: $width_9$pixel;}\n.unit-rating a.r10-unit{left: $width_9$pixel;}\n.unit-rating a.r10-unit:hover{width: $width_10$pixel;}\n";
} else {
$css_starratings "\n";
}
if (
$rating_details == '6' && $rating_thumbs >= '0')  {
$css_starratings  "\n<style type=\"text/css\">\n.ratingblock { display:block; border-bottom:0px solid #999; padding-bottom:0px; margin-bottom:0px; }\n.container { background-color: #fff; width: 100%; border: 0px solid #ccc; padding: 5px; }\n.loading { height: $thumbnails_rating_image_height$pixel;}\n";
}
// --- css starrating in all thumbnails ---
// --- static for all ---
$thumb_starrating_view 1;
if (
$rating_thumbs == '1') {
$css_starratings .= ".unit-rating-thumbnails {list-style:none; margin: 0px; padding:0px; height: $thumbnails_rating_image_height$pixel; position: relative; background: url('$imagepath/$thumbnails_rating_images_file') top left repeat-x; }\n.unit-rating-thumbnails li{ text-indent: -90000px; padding:0px; margin:0px; float: left;}\n.unit-rating-thumbnails li a:hover{ background: url('$imagepath/$thumbnails_rating_images_file') left center; z-index: 2; left: 0px;}\n.unit-rating-thumbnails li a { outline: none; display:block; width: $thumbnails_rating_image_width$pixel; height: $thumbnails_rating_image_height$pixel; text-decoration: none; text-indent: -9000px; z-index: 20; position: absolute; padding: 0px; }\n.unit-rating-thumbnails li.current-rating-thumbnails { background: url('$imagepath/$thumbnails_rating_images_file') left bottom; position: absolute; height: $thumbnails_rating_image_height$pixel; display: block; text-indent: -9000px; z-index: 1;}\n";
$css_starratings .= ".unit-rating-thumbnails a.r1-unit-thumbnails{left: 0px;}\n.unit-rating-thumbnails a.r1-unit-thumbnails:hover{width: $thumbnails_rating_image_width$pixel;}\n.unit-rating-thumbnails a.r2-unit-thumbnails{left: $thumbnails_rating_image_width$pixel;}\n.unit-rating-thumbnails a.r2-unit-thumbnails:hover{width: $thumbnails_width_2$pixel;}\n.unit-rating-thumbnails a.r3-unit-thumbnails{left: $thumbnails_width_2$pixel;}\n.unit-rating-thumbnails a.r3-unit-thumbnails:hover{width: $thumbnails_width_3$pixel;}\n.unit-rating-thumbnails a.r4-unit-thumbnails{left: $thumbnails_width_3$pixel;}\n.unit-rating-thumbnails a.r4-unit-thumbnails:hover{width: $thumbnails_width_4$pixel;}\n.unit-rating-thumbnails a.r5-unit-thumbnails{left: $thumbnails_width_4$pixel;}\n.unit-rating-thumbnails a.r5-unit-thumbnails:hover{width: $thumbnails_width_5$pixel;}\n.unit-rating-thumbnails a.r6-unit-thumbnails{left: $thumbnails_width_5$pixel;}\n.unit-rating-thumbnails a.r6-unit-thumbnails:hover{width: $thumbnails_width_6$pixel;}\n.unit-rating-thumbnails a.r7-unit-thumbnails{left: $thumbnails_width_6$pixel;}\n.unit-rating-thumbnails a.r7-unit-thumbnails:hover{width: $thumbnails_width_7$pixel;}\n.unit-rating-thumbnails a.r8-unit-thumbnails{left: $thumbnails_width_7$pixel;}\n.unit-rating-thumbnails a.r8-unit-thumbnails:hover{width: $thumbnails_width_8$pixel;}\n.unit-rating-thumbnails a.r9-unit-thumbnails{left: $thumbnails_width_8$pixel;}\n.unit-rating-thumbnails a.r9-unit-thumbnails:hover{width: $thumbnails_width_9$pixel;}\n.unit-rating-thumbnails a.r10-unit-thumbnails{left: $thumbnails_width_9$pixel;}\n.unit-rating-thumbnails a.r10-unit-thumbnails:hover{width: $thumbnails_width_10$pixel;}\n";
}
// --- active for members, static for guests ---
elseif ($rating_thumbs == '2' && $user_info['user_level'] == GUEST)  {
$css_starratings .= ".unit-rating-thumbnails {list-style:none; margin: 0px; padding:0px; height: $thumbnails_rating_image_height$pixel; position: relative; background: url('$imagepath/$thumbnails_rating_images_file') top left repeat-x; }\n.unit-rating-thumbnails li{ text-indent: -90000px; padding:0px; margin:0px; float: left;}\n.unit-rating-thumbnails li a:hover{ background: url('$imagepath/$thumbnails_rating_images_file') left center; z-index: 2; left: 0px;}\n.unit-rating-thumbnails li a { outline: none; display:block; width: $thumbnails_rating_image_width$pixel; height: $thumbnails_rating_image_height$pixel; text-decoration: none; text-indent: -9000px; z-index: 20; position: absolute; padding: 0px; }\n.unit-rating-thumbnails li.current-rating-thumbnails { background: url('$imagepath/$thumbnails_rating_images_file') left bottom; position: absolute; height: $thumbnails_rating_image_height$pixel; display: block; text-indent: -9000px; z-index: 1;}\n";
$css_starratings .= ".unit-rating-thumbnails a.r1-unit-thumbnails{left: 0px;}\n.unit-rating-thumbnails a.r1-unit-thumbnails:hover{width: $thumbnails_rating_image_width$pixel;}\n.unit-rating-thumbnails a.r2-unit-thumbnails{left: $thumbnails_rating_image_width$pixel;}\n.unit-rating-thumbnails a.r2-unit-thumbnails:hover{width: $thumbnails_width_2$pixel;}\n.unit-rating-thumbnails a.r3-unit-thumbnails{left: $thumbnails_width_2$pixel;}\n.unit-rating-thumbnails a.r3-unit-thumbnails:hover{width: $thumbnails_width_3$pixel;}\n.unit-rating-thumbnails a.r4-unit-thumbnails{left: $thumbnails_width_3$pixel;}\n.unit-rating-thumbnails a.r4-unit-thumbnails:hover{width: $thumbnails_width_4$pixel;}\n.unit-rating-thumbnails a.r5-unit-thumbnails{left: $thumbnails_width_4$pixel;}\n.unit-rating-thumbnails a.r5-unit-thumbnails:hover{width: $thumbnails_width_5$pixel;}\n.unit-rating-thumbnails a.r6-unit-thumbnails{left: $thumbnails_width_5$pixel;}\n.unit-rating-thumbnails a.r6-unit-thumbnails:hover{width: $thumbnails_width_6$pixel;}\n.unit-rating-thumbnails a.r7-unit-thumbnails{left: $thumbnails_width_6$pixel;}\n.unit-rating-thumbnails a.r7-unit-thumbnails:hover{width: $thumbnails_width_7$pixel;}\n.unit-rating-thumbnails a.r8-unit-thumbnails{left: $thumbnails_width_7$pixel;}\n.unit-rating-thumbnails a.r8-unit-thumbnails:hover{width: $thumbnails_width_8$pixel;}\n.unit-rating-thumbnails a.r9-unit-thumbnails{left: $thumbnails_width_8$pixel;}\n.unit-rating-thumbnails a.r9-unit-thumbnails:hover{width: $thumbnails_width_9$pixel;}\n.unit-rating-thumbnails a.r10-unit-thumbnails{left: $thumbnails_width_9$pixel;}\n.unit-rating-thumbnails a.r10-unit-thumbnails:hover{width: $thumbnails_width_10$pixel;}\n";
} elseif (
$rating_thumbs == '2' && $user_info['user_level'] >= USER)  {
$css_starratings .= ".unit-rating-thumbnails {list-style:none; margin: 0px; padding:0px; height: $thumbnails_rating_image_height$pixel; position: relative; background: url('$imagepath/$thumbnails_rating_images_file') top left repeat-x; }\n.unit-rating-thumbnails li{ text-indent: -90000px; padding:0px; margin:0px; float: left;}\n.unit-rating-thumbnails li a:hover{ background: url('$imagepath/$thumbnails_rating_images_file') left center; z-index: 2; left: 0px;}\n.unit-rating-thumbnails li a { outline: none; display:block; width: $thumbnails_rating_image_width$pixel; height: $thumbnails_rating_image_height$pixel; text-decoration: none; text-indent: -9000px; z-index: 20; position: absolute; padding: 0px; }\n.unit-rating-thumbnails li.current-rating-thumbnails { background: url('$imagepath/$thumbnails_rating_images_file') left bottom; position: absolute; height: $thumbnails_rating_image_height$pixel; display: block; text-indent: -9000px; z-index: 1;}\n";
$css_starratings .= ".unit-rating-thumbnails a.r1-unit-thumbnails{left: 0px;}\n.unit-rating-thumbnails a.r1-unit-thumbnails:hover{width: $thumbnails_rating_image_width$pixel;}\n.unit-rating-thumbnails a.r2-unit-thumbnails{left: $thumbnails_rating_image_width$pixel;}\n.unit-rating-thumbnails a.r2-unit-thumbnails:hover{width: $thumbnails_width_2$pixel;}\n.unit-rating-thumbnails a.r3-unit-thumbnails{left: $thumbnails_width_2$pixel;}\n.unit-rating-thumbnails a.r3-unit-thumbnails:hover{width: $thumbnails_width_3$pixel;}\n.unit-rating-thumbnails a.r4-unit-thumbnails{left: $thumbnails_width_3$pixel;}\n.unit-rating-thumbnails a.r4-unit-thumbnails:hover{width: $thumbnails_width_4$pixel;}\n.unit-rating-thumbnails a.r5-unit-thumbnails{left: $thumbnails_width_4$pixel;}\n.unit-rating-thumbnails a.r5-unit-thumbnails:hover{width: $thumbnails_width_5$pixel;}\n.unit-rating-thumbnails a.r6-unit-thumbnails{left: $thumbnails_width_5$pixel;}\n.unit-rating-thumbnails a.r6-unit-thumbnails:hover{width: $thumbnails_width_6$pixel;}\n.unit-rating-thumbnails a.r7-unit-thumbnails{left: $thumbnails_width_6$pixel;}\n.unit-rating-thumbnails a.r7-unit-thumbnails:hover{width: $thumbnails_width_7$pixel;}\n.unit-rating-thumbnails a.r8-unit-thumbnails{left: $thumbnails_width_7$pixel;}\n.unit-rating-thumbnails a.r8-unit-thumbnails:hover{width: $thumbnails_width_8$pixel;}\n.unit-rating-thumbnails a.r9-unit-thumbnails{left: $thumbnails_width_8$pixel;}\n.unit-rating-thumbnails a.r9-unit-thumbnails:hover{width: $thumbnails_width_9$pixel;}\n.unit-rating-thumbnails a.r10-unit-thumbnails{left: $thumbnails_width_9$pixel;}\n.unit-rating-thumbnails a.r10-unit-thumbnails:hover{width: $thumbnails_width_10$pixel;}\n";
}
// --- active for members and guests ---
elseif ($rating_thumbs == '3') {
$css_starratings .= ".unit-rating-thumbnails {list-style:none; margin: 0px; padding:0px; height: $thumbnails_rating_image_height$pixel; position: relative; background: url('$imagepath/$thumbnails_rating_images_file') top left repeat-x; }\n.unit-rating-thumbnails li{ text-indent: -90000px; padding:0px; margin:0px; float: left;}\n.unit-rating-thumbnails li a:hover{ background: url('$imagepath/$thumbnails_rating_images_file') left center; z-index: 2; left: 0px;}\n.unit-rating-thumbnails li a { outline: none; display:block; width: $thumbnails_rating_image_width$pixel; height: $thumbnails_rating_image_height$pixel; text-decoration: none; text-indent: -9000px; z-index: 20; position: absolute; padding: 0px; }\n.unit-rating-thumbnails li.current-rating-thumbnails { background: url('$imagepath/$thumbnails_rating_images_file') left bottom; position: absolute; height: $thumbnails_rating_image_height$pixel; display: block; text-indent: -9000px; z-index: 1;}\n";
$css_starratings .= ".unit-rating-thumbnails a.r1-unit-thumbnails{left: 0px;}\n.unit-rating-thumbnails a.r1-unit-thumbnails:hover{width: $thumbnails_rating_image_width$pixel;}\n.unit-rating-thumbnails a.r2-unit-thumbnails{left: $thumbnails_rating_image_width$pixel;}\n.unit-rating-thumbnails a.r2-unit-thumbnails:hover{width: $thumbnails_width_2$pixel;}\n.unit-rating-thumbnails a.r3-unit-thumbnails{left: $thumbnails_width_2$pixel;}\n.unit-rating-thumbnails a.r3-unit-thumbnails:hover{width: $thumbnails_width_3$pixel;}\n.unit-rating-thumbnails a.r4-unit-thumbnails{left: $thumbnails_width_3$pixel;}\n.unit-rating-thumbnails a.r4-unit-thumbnails:hover{width: $thumbnails_width_4$pixel;}\n.unit-rating-thumbnails a.r5-unit-thumbnails{left: $thumbnails_width_4$pixel;}\n.unit-rating-thumbnails a.r5-unit-thumbnails:hover{width: $thumbnails_width_5$pixel;}\n.unit-rating-thumbnails a.r6-unit-thumbnails{left: $thumbnails_width_5$pixel;}\n.unit-rating-thumbnails a.r6-unit-thumbnails:hover{width: $thumbnails_width_6$pixel;}\n.unit-rating-thumbnails a.r7-unit-thumbnails{left: $thumbnails_width_6$pixel;}\n.unit-rating-thumbnails a.r7-unit-thumbnails:hover{width: $thumbnails_width_7$pixel;}\n.unit-rating-thumbnails a.r8-unit-thumbnails{left: $thumbnails_width_7$pixel;}\n.unit-rating-thumbnails a.r8-unit-thumbnails:hover{width: $thumbnails_width_8$pixel;}\n.unit-rating-thumbnails a.r9-unit-thumbnails{left: $thumbnails_width_8$pixel;}\n.unit-rating-thumbnails a.r9-unit-thumbnails:hover{width: $thumbnails_width_9$pixel;}\n.unit-rating-thumbnails a.r10-unit-thumbnails{left: $thumbnails_width_9$pixel;}\n.unit-rating-thumbnails a.r10-unit-thumbnails:hover{width: $thumbnails_width_10$pixel;}\n";
} else {
$thumb_starrating_view 0;
$css_starratings .= "\n";
}
$css_starratings .= "</style>\n";
// --- End Mod: Ajax Starrating by KW ------------------------------------------

$site_template->register_vars(array(
// --- Start Mod: Ajax Starrating by KW ----------------------------------------
  
"css_starratings" => $css_starratings,
  
"rating_details" => $rating_details,
  
"thumb_starrating_view" => $thumb_starrating_view,
// --- End Mod: Ajax Starrating by KW ------------------------------------------
  
"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'],
  
"current_user_id" => $user_info['user_id'], 
  
"current_user_name" => ($user_info['user_level'] == GUEST) ? $lang['userlevel_guest'] : addslashes($user_info['user_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"),
  
//--- Start Mod: Flash-Tag-Clouds by KW ---------------
  
"flash_keyword_clouds" => get_flash_keyword_clouds(),
//--- End Mod: Flash-Tag-Clouds by KW -----------------
  
"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_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"),
  
//--- Start mod: Ajax Slideshow/Diashow with piclens ---------------------------
  
"slideshow_rss" => "",
  
"ajax_slideshow_piclens_button" => "",
//--- End mod: Ajax Slideshow/Diashow with piclens -----------------------------
  
"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_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 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 && 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'];
  }
}

//-----------------------------------------------------
//--- Save Rating -------------------------------------
//-----------------------------------------------------
if ($action == "rateimage" && $id) {
  
$rating intval($HTTP_POST_VARS['rating']);
  if (
$user_info['user_level'] != GUEST) {
    
$sql "SELECT user_id, image_id, vote
            FROM "
.VOTED_TABLE."
            WHERE image_id = "
.$id." AND user_id = ".$user_info['user_id'];
    
$rated $site_db->query_firstrow($sql);
    
$rating = ($rated['vote']) ? $rated['vote'] : $rating;
  }else{
    
$rated FALSE;
  }
  
$cookie_name = (defined("COOKIE_NAME")) ? COOKIE_NAME "4images_";
  
$cookie_rated = isset($HTTP_COOKIE_VARS[$cookie_name.'rated']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name.'rated'])) : array();
  if (
$rating && $rating <= MAX_RATING && $id) {
    if (!isset(
$session_info['rated_imgs'])) {
      
$session_info['rated_imgs'] = $site_sess->get_session_var("rated_imgs");
    }
    
$split_list = array();
    if (!empty(
$session_info['rated_imgs'])) {
      
$split_list explode(" "$session_info['rated_imgs']);
    }
  
	

if (!
in_array($id$split_list) && !in_array($id$cookie_rated) && !$rated) {
      
$session_info['rated_imgs'] .= " ".$id;
      
$session_info['rated_imgs'] = trim($session_info['rated_imgs']);
      
$site_sess->set_session_var("rated_imgs"$session_info['rated_imgs']);
      
$cookie_rated[] = $id;
      
$cookie_expire time() + 60 60 24 4;
      
setcookie($cookie_name.'rated'serialize($cookie_rated), $cookie_expireCOOKIE_PATHCOOKIE_DOMAINCOOKIE_SECURE);
      
update_image_rating($id$rating);
      
$msg $lang['voting_success'];
    }
    else {
      
$msg $lang['already_voted'];
    }
  }
  else {
    
$msg $lang['voting_error'];
  }
}

//-----------------------------------------------------
//--- 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']));
  
$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);
}
$site_template->register_vars(array(
  
"lang_keyword" => $lang['keywords'], //---[/[MOD] Tag Clouds]
  
"show_tag_clouds" => get_tag_clouds() //---[/[MOD] Tag Clouds]
));
?>



Line 62 is this:

         else {"url_categories"
        $auth_cat_sql['auth_viewcat']['NOTIN'] .= ", ".$key;



Any ideas where I can look?

Thanks for any help... I am trying everything here...

49
Hi, I am trying to get my stock photography site open ASAP. A vital part of the site is the vidblog located in the news section. I installed the news blog which is basically a selection of private comments.


I have enabled the HTML in posts in the Admin panel.

I have installed the spanish Youtube mod.

it you go to www.thelifephotography.com you can see the embedded code, however no streaming.

I really need this before I can open and promote my site. This is an urgent thing and one of the last things I need before launching.

50
Id like a news mod that:

1) Works with member pic
2) allows ajax comment and rate
3) allows RSS subscription
4) files all previous news release into a category that looks like an image category viewable on basic categories page
5) allows youtube includes...
6) only for mod/admin use
7) possible different sub category of news articles...

Oh yeah if you can make one lie this in the next hour that would be great.

Even better tell me there is already one made which does this :)

51
Mods & Plugins (Requests & Discussions) / RSS READER INSIDE 4images
« on: July 10, 2007, 04:46:20 AM »
OK, I think perhaps the old topic request I started was confusing to those who dont know rss...

I would like to have a rss tag

like <rss here> that would place rss news inside 4images category template pages. And it would get the news automatically from other websites cahing it in the 4images database to prevent it from having to contact other sites durring each page refresh.

rproctor made a great mod which did this using magpie
http://sourceforge.net/project/showfiles.php?group_id=55691
and now it is gone......

I need this badly//

I hope you guys understand what I mean. Or please tell me how to get into googles cache..

it is extremely difficult to accessed any of googles cache within china. the normal proxy servece I use can not get to this.

http://anonymouse.org/cgi-bin/anon-www.cgi/http://72.14.235.104/search?q=cache:UfelyujkHSkJ:www.4homepages.de/+4homepages&hl=en&ct=clnk&cd=1

52
Language Packs / Traditional Chinese
« on: July 06, 2007, 03:08:47 PM »
Is there anyone that has or seen a traditional Chinese Languange Pack???

I cant believe with 1.4 billion people over here there isnt a traditional chinese language pack.

You know I live here and its a pretty important thing for me and my chinese sucks so bad but I know there are some smart well paid engineers out there makking either less than someone that works at Mc Donalds or enough to own 2 benzes that could use this or already have it....


53
Discussion & Troubleshooting / Captcha Timeout? Problem
« on: July 06, 2007, 04:29:12 AM »
I am having a strange problelm with captcha .  80% of the time I need to click on it and reload it in order for it to appear on my wite at www.thecenterofthenet.com/4images/

any ideas whats wrong and what I can do?

Thanks!
Robert

54
Chit Chat / RPROCTOR Still Come around 4images????? Where are you?
« on: July 05, 2007, 09:32:39 AM »
Hey Rproctor, it has been a long time since I have seen you on this board. A while abo you helped me creatign thatrss mod that is really really important mod on my site...

But our thread is gone and I am trying to rebuild.... if you are still around and have time please pm me...

55
Greetings, Long Ago RPROCTOR helped to make a RSS mod that worked great on my 4images 1.7 version. Now after upgrading I am trying to find that mod, and it is difficult since the old forum was lost :evil:

The way the RSS feed/scraper worked is in the Admin control panel there was a place to enter rss feeds to be used with certain categories.


When using the 4images different templates for differend categories page, you could a custom rss feed for each category.

Let me explain,

Say you have a transportation category
and also a        photography category
Each a different category, on the category template page you would find transportation related news scraped from a transportation based website rss feed,
and a photography news feed on the photography template.

I have searched but cand find a mod which does this or the original one we spent so much time working to get working before the forum was lost.

Another good thing about this is that it kept the news from the rss feed, like lets say the one from www.dpreview.com in the 4images database, which was updated daily, in order to display quicker instead of loading the feed from an external site everytime your category page loaded.

Is there anyone that knows of a mod or way to acess the old threads cached from the old forum?

Thanks-
Robert

56
I am using the diferent template for different categories mod, and am using a different layout for cats with subcats vs. cats without.


It takes so long to save a custom template for each and every category which has no subcats.........

Can you PLEASE show me how what when and were I can get a default template to be used on categories which contain no subcategories?


57
ok...

I guess I will let my other mod thread die as nobody knew/understood.had time to help me with it. This is a simple question.

How do you add category description to random cat image template?

And, does random_cat_image display all images from its own subcats?


Thanks!
Robert

58
Once again a request for a new mod with an old subject.....
Really easy???

1).If the category has no subcats, then use template x, unless there is a template specifically made for that category...

Example:
Category 23 no subcats

uses nosubcat.html template.....

Category 24  no cubcate,you have a custom template.
It uses category_24.html, saved in your default/template directory/


I am currently using the different templates for different categories mod....



Thanks for the help on this old subject.

Robert

59
Warning: Invalid argument supplied for foreach() in /home/cyberfan/htdocs/4images/includes/page_header.php on line 224
 which is:
Code: [Select]
foreach ($rss->items as $item) {

This is part of a rss mod that is no longer on the board. The thing is the mod works great. I have no idea why I get the error... it pauses my page from loading...

the rss mod is one of the coolest thing on my site no way I can kill it... but it seems as though this is because of some simple common error?  I appreciate any help you can give.

Thanks-
Robert
Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: page_header.php                                      *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.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&#40693; 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;
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;
    }
  }
}

//----------------------------------------------------- 
//--- pm --------------------------------------------- 
//----------------------------------------------------- 
$inbox ""
$outbox ""
$sentbox ""
$newpm ""
$pm_popup_script ""
$pm_popup_head ""
$pm ""
if (
$config['pm'] && $user_info['user_level'] >= USER) { 
  
$sql "SELECT COUNT(pm_id) AS total 
              FROM "
.PM_TABLE.
              WHERE pm_to = "
.$user_info['user_id']." AND (pm_type = ".PM_SENT." OR pm_type = ".PM_SDLT." OR pm_type = ".PM_UNREAD." OR pm_type = ".PM_USDLT.")"
  
$result $site_db->query_firstrow($sql); 
  
$pm_inbox $result['total']; 
  
$sql "SELECT COUNT(pm_id) AS total 
              FROM "
.PM_TABLE.
              WHERE pm_from = "
.$user_info['user_id']." AND (pm_type = ".PM_UNREAD." OR pm_type = ".PM_USDLT.")"
  
$result $site_db->query_firstrow($sql); 
  
$pm_outbox $result['total']; 
  
$sql "SELECT COUNT(pm_id) AS total 
              FROM "
.PM_TABLE.
              WHERE pm_from = "
.$user_info['user_id']." AND (pm_type = ".PM_SENT." OR pm_type = ".PM_RDLT.")"
  
$result $site_db->query_firstrow($sql); 
  
$pm_sentbox $result['total']; 
  
$sql "SELECT COUNT(pm_id) AS new 
              FROM "
.PM_TABLE.
              WHERE pm_to = "
.$user_info['user_id']." AND (pm_type = ".PM_UNREAD." OR pm_type = ".PM_USDLT.") 
              ORDER BY pm_date DESC"

  
$result $site_db->query_firstrow($sql); 
  
$pm_new_count $result['new']; 
  
$sql "SELECT pm_date 
              FROM "
.PM_TABLE.
              WHERE pm_to = "
.$user_info['user_id']." AND (pm_type = ".PM_UNREAD." OR pm_type = ".PM_USDLT.") 
              ORDER BY pm_date DESC"

  
$result $site_db->query_firstrow($sql); 
  
$pm_new "<a href=\"".$site_sess->url(ROOT_PATH."pm.php")."\">".(($pm_new_count) ? "<blink>".$pm_new_count."</blink>" 0)."</a>"
  
$pm preg_replace("/".$site_template->start."msg_new_count".$site_template->end."/siU"$pm_new$lang['pm_link']); 
  
$pm preg_replace("/".$site_template->start."inbox".$site_template->end."/siU""<a href=\"".$site_sess->url(ROOT_PATH."pm.php")."\">".$lang['pm_inbox']."</a>"$pm); 
  
$blink "<script language=\"JavaScript\">\n<!--\nvar flg=0;\nfunction blink(){\nvar myElement=document.getElementById('blnk');\nflg^=1;\nif(flg==1){\nmyElement.style.visibility='hidden';\n}\nelse{\nmyElement.style.visibility='visible';\n}\ntimerID = setTimeout( 'blink()' , 500 );\n}\n//-->\n</script>\n"
  
$show_inbox = ($pm_new_count) ? $blink."<span id=\"blnk\">".$lang['pm_inbox']."</span><script language=\"JavaScript\">blink();</script>" $lang['pm_inbox']; 
  
$inbox "<a href=\"".$site_sess->url(ROOT_PATH."pm.php?action=inbox")."\" title=\"".(($pm_new_count) ? $lang['pm_new_messages'].": ".$pm_new_count."\n" "").$lang['pm_total'].": ".$pm_inbox."\">".$show_inbox."</a>"
  
$sentbox "<a href=\"".$site_sess->url(ROOT_PATH."pm.php?action=sentbox")."\" title=\"".$lang['pm_total'].": ".$pm_sentbox."\">".$lang['pm_sentbox']."</a>"
  
$outbox "<a href=\"".$site_sess->url(ROOT_PATH."pm.php?action=outbox")."\" title=\"".$lang['pm_total'].": ".$pm_outbox."\">".$lang['pm_outbox']."</a>"
  
$newpm "<a href=\"".$site_sess->url(ROOT_PATH."pm.php?action=new")."\">".$lang['pm_new']."</a>"

  if (
$result && $user_info['user_pm_popup']) { 
     
$cookie_name = (defined("COOKIE_NAME")) ? COOKIE_NAME "4images_"
     
$cookie_pmnewpopup = isset($HTTP_COOKIE_VARS[$cookie_name.'pmnewpopup']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name.'pmnewpopup'])) : 0
     if (
$cookie_pmnewpopup $result['pm_date']) { 
      if (
ereg("pm.php"$self_url) && $action == "inbox") { 
          
$cookie_expire time() + 60 60 24 90
          
setcookie($cookie_name.'pmnewpopup'serialize($result['pm_date']), $cookie_expireCOOKIE_PATHCOOKIE_DOMAINCOOKIE_SECURE); 
      }elseif (!
ereg("pm.php"$self_url) || (ereg("pm.php"$self_url) && ($action == "sentbox" || $action == "outbox"))){ 
        
$cookie_expire gmdate('D, d M Y H:i:s \G\M\T'time() + 60 60 24 90); 
        
$pm_popup_script " <script language=\"JavaScript\"> 
        <!-- 
        function SetCookie (name, value, expire, path, domain, secure) { 
          document.cookie = name + '=' + escape(value) + ((expire)?(';expires=' + expire):'') + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:'') + ((secure && (secure == true))?'; secure':''); 
        } 
        function confirm_newpm() { 
          input_box=confirm('"
.$lang['pm_popup_confirm']."'); 
          if (input_box==true) { // Output when OK is clicked 
            second_box=confirm('"
.$lang['pm_popup_newwindow']."'); 
            if (second_box==true) { 
              SetCookie('"
.$cookie_name."pmnewpopup','".serialize($result['pm_date'])."','".$cookie_expire."','".COOKIE_PATH."','".COOKIE_DOMAIN."','".COOKIE_SECURE."'); 
              window.open('"
.$site_sess->url(ROOT_PATH."pm.php")."','pmnew','width=600,height=500,menubar=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,resizable=yes,top=50,left=50'); 
            } else { 
              SetCookie('"
.$cookie_name."pmnewpopup','".serialize($result['pm_date'])."','".$cookie_expire."','".COOKIE_PATH."','".COOKIE_DOMAIN."','".COOKIE_SECURE."'); 
              window.location='"
.$site_sess->url(ROOT_PATH."pm.php")."'; 
            } 
          } else { 
            SetCookie('"
.$cookie_name."pmnewpopup','".serialize($result['pm_date'])."','".$cookie_expire."','".COOKIE_PATH."','".COOKIE_DOMAIN."','".COOKIE_SECURE."'); 
          } 
        } 
        // --> 
      </script>"

        
$pm_popup_header " onload=\"Javascript:confirm_newpm()\""
       } 
    } 
  } 

$sql "SELECT c.comment_id 
      FROM "
.COMMENTS_TABLE." c 
      LEFT JOIN "
.IMAGES_TABLE." i ON i.image_id = c.image_id 
      WHERE i.user_id = "
.$user_info['user_id']." AND c.is_read = 0"
$result $site_db->query($sql); 
$new_comments $site_db->get_numrows($result);
$query_string ''
if (!empty(
$HTTP_GET_VARS)) { 
  foreach (
$HTTP_GET_VARS as $key => $val) { 
    if (
$key != "l") { 
      
$query_string .= ($query_string != '' '&' '?').$key."=".$val
    } 
  } 

$lang_url $site_sess->url($PHP_SELF.$query_string'&'); 
$lang_url preg_replace("'&(amp|#38);'i""&"$lang_url); 
$lang_url preg_replace("/[?|&]l=[^?|&]*/"""$lang_url); 
$lang_url str_replace("&""&amp;"$lang_url); 
$handle opendir(ROOT_PATH."lang"); 
$lang_select ""
while (
$folder = @readdir($handle)) { 
  if (@
is_dir(ROOT_PATH."lang/".$folder) && $folder != "." && $folder != "..") { 
    if (
$folder != $config['language_dir']) { 
      
$lang_select .= "<a class=\"lang\" href=\"".$lang_url.(preg_match("/".$config['language_dir_default']."/i",$folder) ? "" : ((preg_match("/\?/"$lang_url) ? "&" "?")."l=".$folder))."\" onMouseOver=\"(window.status='$folder'); return true\" onMouseOut=\"window.status=''; return true\"><img src=\"".TEMPLATE_PATH."/images/".$folder.".gif\" border=\"0\" alt=\"".$folder."\"></a>&nbsp;"
    }else{ 
    
$lang_select .= "<img src=\"".TEMPLATE_PATH."/images/".$folder."2.gif\" border=\"0\" alt=\"".$folder."\">&nbsp;"
    } 
  } 

// Register the dropdown code for the template engine 

$site_template->register_vars("lang_select"$lang_select);
require_once(
"rss/rss_fetch.inc"); 

if (
$cat_id) { 
  
$sql "SELECT * 
          FROM rssfeed 
          WHERE cat_id = 
$cat_id"
        
  
$result $site_db->query($sql); 
  
$num_rows $site_db->get_numrows($result); 
  if (!
$num_rows) { 
    
$rss_list "No feeds available."
  } 
  else { 
    
$rss_list ""
    while(
$rss_row $site_db->fetch_array($result)) { 
      
$url $rss_row['url']; 
      
$rss fetch_rss($url); 
      
$rss_list .= "<b>Channel Title: " $rss->channel['title'] . "</b><p>"
      
$rss_list .= "<ul>"
      foreach (
$rss->items as $item) { 
        
$href $item['link']; 
        
$title $item['title']; 
        
$rss_list .= "<li><a href=$href>$title</a></li>"
      }
      
$rss_list .= "</ul>"
    } 
  } 
  
$site_template->register_vars(array( 
    
"rss_list" => $rss_list 
  
)); 

else { 
  if (
$user_info['user_id'] == GUEST) { 
    
$sql "SELECT * 
              FROM rssfeed 
            LIMIT 3"

        
    
$result $site_db->query($sql); 
    
$num_rows $site_db->get_numrows($result); 
    if (!
$num_rows) { 
      
$rss_list "No feeds available."
    } 
    else { 
      
$rss_list ""
      while(
$rss_row $site_db->fetch_array($result)) { 
        
$url $rss_row['url']; 
        
$rss fetch_rss($url); 
        
$rss_list .= "<b>Channel Title: " $rss->channel['title'] . "</b><p>"
        
$rss_list .= "<ul>"
        foreach (
$rss->items as $item) {
        
$href $item['link']; 
        
$title $item['title']; 
        
$rss_list .= "<li><a href=$href>$title</a></li>"
      } 
      
$rss_list .= "</ul>"
    } 
  }
    
$site_template->register_vars(array( 
      
"rss_list" => $rss_list 
    
)); 
  } 
  else { 
    
$sql "SELECT * 
            FROM user_to_rss_feed b 
            LEFT JOIN rssfeed r ON r.rowID = b.rssid 
            WHERE b.userid = "
.$user_info['user_id'].""

    
$result $site_db->query($sql); 
    
$num_rows $site_db->get_numrows($result); 
    if (!
$num_rows) { 
      
$rss_list "You have not selected any feeds"
    } 
    else { 
      
$rss_list ""

      while(
$rss_row $site_db->fetch_array($result)) { 
        if (
$rss_row['rssid'] != 0) { 
          
$url $rss_row['url']; 
          
$rss fetch_rss($url); 
          
$rss_list .= (!$rss_row['title']) ? "<b>".$rss->channel['title']."</b><p>" "<b>".$rss_row['title']."</b><p>"
        } 
        else { 
          
$url $rss_row['rss_url']; 
          
$rss fetch_rss($url); 
          
$rss_list .= (!$rss_row['rss_title']) ? "<b>".$rss->channel['title']."</b><p>" "<b>".$rss_row['rss_title']."</b><p>"
        } 
        
$rss_list .= "<ul>"
        foreach (
$rss->items as $item) { 
          
$href $item['link']; 
          
$title $item['title']; 
          
$rss_list .= "<li><a href=$href>$title</a></li>"
        } 
        
$rss_list .= "</ul>"
      } 
    } 
    
$feed_url $site_sess->url(ROOT_PATH."member.php?action=editfeeds"); 
    
$rss_list .= "<br><br> <a href=\"".$feed_url."\"> Edit and Add your personal feeds </a> "
    
$site_template->register_vars(array( 
      
"rss_list" => $rss_list 
    
));
  } 
}
$site_template->register_vars(array( 
  
"pm" => $pm
  
"pm_boxes" => ($inbox) ? $inbox."&nbsp;&nbsp;|&nbsp;&nbsp;".$sentbox."&nbsp;&nbsp;|&nbsp;&nbsp;".$outbox."&nbsp;&nbsp;|&nbsp;&nbsp;".$newpm ""
  
"pm_inbox" => $inbox
  
"pm_sentbox" => $sentbox
  
"pm_outbox" => $outbox
  
"pm_newpm" => $newpm
  
"pm_popup_script" => $pm_popup_script
  
"pm_popup_header" => $pm_popup_header
  
"bbcode2" => (BBCODE == "bbcode") ? 1
  
"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'],
   
"current_user_id" => $user_info['user_id'], 
  
"current_user_name" => ($user_info['user_level'] == GUEST) ? $lang['userlevel_guest'] : addslashes($user_info['user_name']),
  
"lang" => $l,
  
"site_email" => $config['site_email'],
  
"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")."\">Control Panel</a>]</p>\n",
  
"total_categories" => $total_categories,
  
"total_images" => $total_images,
  
"new_comments" => $new_comments
  
"url_comments" => $site_sess->url(ROOT_PATH."member.php?action=readcomments"),
  
"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_warenkorb" => $site_sess->url(ROOT_PATH."warenkorb.php"),
  
"url_userlist" => $site_sess->url(ROOT_PATH."memberlist.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_guestbook" => (!empty($url_guestbook)) ? $site_sess->url($url_guestbook) : $site_sess->url(ROOT_PATH."guestbook.php"),
  
"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"),
  
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_info['user_avatar'] == "") ? "blank.gif" $user_info['user_avatar'])."\" name=\"icons\" border=\"0\" alt=\"\">" "",
  
"url_lost_password" => (!empty($url_lost_password)) ? $site_sess->url($url_lost_password) : $site_sess->url(ROOT_PATH."member.php?action=lostpassword")
));

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_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_warenkorb" => $lang['warenkorb'],
  
"lang_userlist_title" => $lang['lang_userlist_title'],
  
"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'],
  
"lang_user_online" => $lang['user_online'],
  
"lang_user_online_detail" => $lang['user_online_detail'],
  
"charset" => $lang['charset'],
  
"direction" => $lang['direction']
));

//-----------------------------------------------------
//--- Category Dropdown -------------------------------
//-----------------------------------------------------
$category_dropdown_selfjump get_category_dropdown($cat_id1);
$site_template->register_vars("category_dropdown_selfjump"$category_dropdown_selfjump);
$category_dropdown_form $site_template->parse_template("category_dropdown_form");
$site_template->register_vars(array("category_dropdown_form" => $category_dropdown_form));

$site_template->un_register_vars("category_dropdown_selfjump");
unset(
$category_dropdown_selfjump);
unset(
$category_dropdown_form);

//-----------------------------------------------------
//--- 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);
//--- Shop System -------- 
function FormatPrice ($nPrice

   
$nPrice number_format($nPrice"2"",""."); 
   return 
$nPrice

$kunde $user_info['user_id'];
//----------------------------------------------------- 
//--- 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
    
$site_sess->set_cookie_data("perpage"$setperpage); 
  } 


if (isset(
$session_info['perpage'])) { 
  
$perpage $session_info['perpage']; 

else if(
$site_sess->read_cookie_data("perpage")) { 
  
$perpage $site_sess->read_cookie_data("perpage"); 
  
$site_sess->set_session_var("perpage"$perpage); 
  
$session_info['perpage'] = $perpage

else { 
  
$perpage ceil($config['default_image_rows'] * $config['image_cells']); 
  
$site_sess->set_cookie_data("perpage"$perpage); 
}
//-----------------------------------------------------
//--- Set Perpage Dropdown ----------------------------
//-----------------------------------------------------
$setperpage_dropdown "\n<select 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'];
  }
}
if (
$action == "addtowarenkorb" && $id) { 
  if (
$user_info['user_level'] >= USER) { 
    
$msg = (add_to_warenkorb($id)) ? $lang['warenkorb_add_success'] : $lang['warenkorb_add_error']; 
  } 
  else { 
    
$msg $lang['warenkorb_register']; 
  } 

if (
$action == "removefromwarenkorb" && $id) { 
  if (
$user_info['user_level'] >= USER) { 
    
$msg = (remove_from_warenkorb($id)) ? $lang['warenkorb_remove_success'] : $lang['warenkorb_remove_error']; 
  } 
  else { 
    
$msg $lang['warenkorb_register']; 
  } 


if (
$action == "anzahlverkleinernwarenkorb" && $id) { 
  if (
$user_info['user_level'] >= USER) { 
    
$msg = (anzahl_verkleinern_warenkorb($id)) ? $lang['anzahl_verkleinern_success'] : $lang['warenkorb_remove_error']; 
  } 
  else { 
    
$msg $lang['warenkorb_register']; 
  } 


if (
$action == "clearwarenkorb") { 
  if (
$user_info['user_level'] >= USER) { 
    
$msg = (clear_warenkorb()) ? $lang['warenkorb_delete_success'] : $lang['warenkorb_delete_error']; 
  } 
  else { 
    
$msg $lang['warenkorb_register']; 
  } 
}
//----------------------------------------------------- 
//--- Save Rating ------------------------------------- 
//----------------------------------------------------- 

//----- Settings ------------ 

//change to $rate_suffix = ""; if u dont want remmber votes for different users on same computer 
$rate_suffix "_".$user_info['user_id']; 

//--- End Settings ---------- 

if ($action == "rateimage" && $id) { 
  
$rating intval($HTTP_POST_VARS['rating']); 
  
$cookie_name = (defined("COOKIE_NAME")) ? COOKIE_NAME "4images_"
  
$cookie_rated_array = isset($HTTP_COOKIE_VARS[$cookie_name.'rated'.$rate_suffix]) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name.'rated'.$rate_suffix])) : array(); 
  if (
$rating && $rating <= MAX_RATING && $id) { 
    if (!isset(
$session_info['rated_imgs'.$rate_suffix])) { 
      
$session_info['rated_imgs'.$rate_suffix] = $site_sess->get_session_var("rated_imgs".$rate_suffix); 
    } 
    
$split_list_array = array(); 
    if (!empty(
$session_info['rated_imgs'.$rate_suffix])) { 
      
$split_list_array explode(" "$session_info['rated_imgs'.$rate_suffix]); 
    } 
    
$split_list = array(); 
      foreach (
$split_list_array as $key) { 
         
$key explode(","$key); 
         
$split_list[] = $key[0]; 
     } 
    
$cookie_rated = array(); 
      foreach (
$cookie_rated_array as $key) { 
         
$key explode(","$key); 
         
$cookie_rated[] = $key[0]; 
      } 
    if (!
in_array($id$split_list) && !in_array($id$cookie_rated)) { 
      
$session_info['rated_imgs'.$rate_suffix] .= " ".$id.",".$rating
      
$session_info['rated_imgs'.$rate_suffix] = trim($session_info['rated_imgs'.$rate_suffix]); 
      
$site_sess->set_session_var("rated_imgs".$rate_suffix$session_info['rated_imgs'.$rate_suffix]); 
      
$cookie_rated_array[] = $id.",".$rating
      
$cookie_expire time() + 60 60 24 4
      
setcookie($cookie_name.'rated'.$rate_suffixserialize($cookie_rated_array), $cookie_expireCOOKIE_PATHCOOKIE_DOMAINCOOKIE_SECURE); 
      
update_image_rating($id$rating); 
      
//-------------------------------------------[ [Mod] Keep Track Of Each action ] 
//  if ($user_info['user_level'] >= USER)  
   
add_to_stats_user_ids($image_id"v"); // Mod: Track User action (voted pics) 
//-------------------------------------------[/[Mod] Keep Track Of Each action ]
      
$msg $lang['voting_success']; 
    } 
    else { 
      
$msg $lang['already_voted']; 
    } 
  } 
  else { 
    
$msg $lang['voting_error']; 
  } 


//----------------------------------------------------- 
//--- Parse Header & Footer --------------------------- 
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
  
$header $site_template->parse_template("header");
  
$footer $site_template->parse_template("footer");
  
$site_template->register_vars(array(
    
"header" => $header,
    
"footer" => $footer
  
));
  unset(
$header);
  unset(
$footer);
}
//--- Warenkorb Summen --------- 
$sql "SELECT sum( w.image_quantity * i.price_1 ) AS total_price 
FROM "
.WARENKORB_TABLE." w, ".IMAGES_TABLE." i 
WHERE image_active = 1 
AND w.user_id = "
.$kunde.
AND i.image_id = w.warenkorb_image_id"

$result $site_db->query_firstrow($sql); 
$total_sum $result['total_price']; 
$porto $config['porto']; 
$bearbeitung $config['bearbeitung']; 
$sum_porto_bear_t = ($total_sum $porto $bearbeitung); 
$sum_porto_bear FormatPrice ($sum_porto_bear_t); 
$total_sum FormatPrice ($total_sum); 
$porto FormatPrice ($config['porto']); 
$bearbeitung FormatPrice ($config['bearbeitung']); 
$sql "SELECT sum( w.image_quantity) AS total_images_sum 
FROM "
.WARENKORB_TABLE." w, ".IMAGES_TABLE." i 
WHERE image_active = 1 
AND w.user_id = "
.$kunde.
AND i.image_id = w.warenkorb_image_id"

$result $site_db->query_firstrow($sql); 
$total_images_sum $result['total_images_sum']; 
$site_template->register_vars(array( 
"total_sum" => $total_sum
"total_images_sum" => $total_images_sum
"bearbeitung" => $bearbeitung
"sum_porto_bear" => $sum_porto_bear
"porto" => $porto 
));

//-----------------------------------------------------
//--- 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"$user_info['user_name'], $lang['lang_loggedin_msg']));
  
$user_box $site_template->parse_template("user_logininfo");
  
$site_template->register_vars(array(
  
"user_box" => $user_box,
   
"lang_warenkorb" => $lang['warenkorb'], 
  
"bestellung" => $bestellung
  
"total_images_sum" => $total_images_sum
  
"total_sum" => $total_sum,
  
"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);
}
//----------------------------------------------------- 
//---Show New Image count in category------------------ 
//----------------------------------------------------- 

$new_image_category "<table border=0 cellpadding=2 cellspacing=1 width=\"100%\">"

foreach (
$new_image_cache as $key => $val) { 
     if (
$val && check_permission("auth_viewcat"$key)) { 
     
$category_link "<a href=\"".$site_sess->url(ROOT_PATH."search.php?search_new_images=1&cat_id=".$key."&sub_cat=no")."\" class=bigmenusubCopy6 >".$val."</a>"
     
$new_image_category .= "<tr><td class=bigmenusubCopy6><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$cat_cache[$key]['cat_id'])."\">".$cat_cache[$key]['cat_name']."</a></td><td><b>".$category_link."</b></td></tr>"
   } 

    
  
$new_image_category .= "</table>"
  
$site_template->register_vars("new_image_cats"$new_image_category); 
  unset(
$new_image_category);
//----------------------------------------------------- 
//--- Last active User -------------------------------- 
//----------------------------------------------------- 
$sql "SELECT user_name, user_id, user_lastaction FROM ".USERS_TABLE.
                 WHERE user_level >= '"
.GUEST."' 
                    ORDER BY user_lastaction DESC 
                 LIMIT 5"

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

    while (
$row $site_db->fetch_array($result)) { 
    
$last_action_user_list .= "<a href =\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&user_id=".$row['user_id'])."\"><b>".$row['user_name']."</b></a><br ><span class=\"smalltext\">".format_date($config['date_format']." ".$config['time_format'], $row['user_lastaction'])."</span><br >"
    } 

$user_last_action_box $site_template->parse_template("user_last_action_box"); 
$site_template->register_vars(array( 
  
"user_last_action_box" => $user_last_action_box
  
"lang_user_last_action" => $lang['lang_user_last_action'],    
  
"user_last_action_list" => $last_action_user_list 
)); 
  unset(
$user_last_action_box); 
  unset(
$last_action_user_list);
 
?>

is the whole php....

60
Hi, I was wondering if someone can help me out. I am trying to create a random category mod....

This mod should display-
1)Display Random Category Thumbnail Of the Category
2)Display Category description
3)Display cat hits, total cat images, total cat comments.


The important thing is-
[1)the categories from which the random cat is chosen from must be from itseslf and all of its childrens subcategories, and there subsub categories, etc.....
2)there must be a random_category_bit.html template....



I need this mod pretty bad as I want to get as many people as I can to the different categories. This is an excellent way for them to preview categories. I actually got this mod working in for index.php

You can see it at www.thecenerofthenet.com/4images/

The problem is its musch easier to just randmise everything...... but I have know Idea how to randomise only the subcategories of the current category.

Thanks I appreciate it....
Robert

Pages: 1 2 3 [4] 5