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 - b.o.fan

Pages: [1] 2
1
Mods & Plugins (Requests & Discussions) / Lang Support
« on: October 12, 2010, 06:54:28 AM »
Hello.

I Have An Idea!

The Lang Support can do into the Database.

i Think this would be great :-)

I Think following database structure ca be yoused



lang_id, lang_variable, lang_language, lang_word

now in the database  you fill in

1, email, deutsch, eMail
2, email, english, email

in the /lang/YOUR_LANG/main.php

there a SQL like SELECT * FROM 4images_database WHERE lang_language = YOUR_LANG


i think that's a good idea. ;-)

2
Installation, Update & Configuration / 4images - Datenbank Struktur.
« on: October 08, 2010, 09:04:50 AM »
Hallo.
Ich hatte 1.7.3 installiert, die Version will irgendwie nicht  mehr.

Nun bin ich auf der Suche nach der Frischen/Neuen Datenbankstruktur (Tabellen inkl. der Felder) um diese mit meiner vorhanden zu vergleichen.

Ich hatte einige Änderunegn vorgenommen (Mods usw.)

Kann mir einer Helfen?

3
Hello @ all... I have made a littel thing to show the last User on User's Profil.

Here is the Requestion: look here

SAVE YOUR FILES, AND MAKE A BACKUP!

Changed Files:

./member.php
./includes/constants.php
./lang/<your_language>/main.php
./templates/<your_tempalte>/member_profile.html

Make a new database-field.

You can use this Code:

Code: [Select]
CREATE TABLE `4images_lastuser` (
  `lastuser_id` smallint(5) NOT NULL auto_increment,
  `userprofil_id` smallint(10) NOT NULL default '0',
  `user_on_id` smallint(10) NOT NULL default '0',
  `last_date` int(15) NOT NULL default '0',
  PRIMARY KEY  (`lastuser_id`)
) TYPE=MyISAM ;


1.

Open ./includes/constants.php

Find there:
Code: [Select]
define('WORDLIST_TABLE', $table_prefix.'wordlist');
add after

Code: [Select]
define('LASTUSER_TABLE', $table_prefix.'lastuser');
2.
Open ./member.php

2.1.Find there:

Code: [Select]
  if ($user_row = get_user_info($user_id)) {
    $user_homepage = (isset($user_row['user_homepage'])) ? format_url($user_row['user_homepage']) : REPLACE_EMPTY;
    if (!empty($user_homepage) && $user_homepage != REPLACE_EMPTY) {
      $user_homepage_button = "<a href=\"".$user_homepage."\" target=\"_blank\"><img src=\"".get_gallery_image("homepage.gif")."\" border=\"0\" alt=\"".$user_homepage."\" /></a>";
    }
    else {
      $user_homepage_button = REPLACE_EMPTY;
    }
 
add after

Code: [Select]
    if($user_info['user_id'] <> GUEST)
    {
    if($user_info[user_id] <>  $user_row['user_id'])
    {
     $query = "SELECT COUNT(*) FROM ".LASTUSER_TABLE." WHERE userprofil_id = '".$user_row['user_id']."' AND user_on_id = '".$user_info[user_id]."' ";
     $sql = mysql_query($query);
     $on = mysql_result($sql,0);
     if($on == "0")
     {
       $time = time();
       $query = "INSERT INTO ".LASTUSER_TABLE." (userprofil_id, user_on_id, last_date) VALUES ('".$user_row['user_id']."', '".$user_info[user_id]."', '".$time."') ";
       $sql = mysql_query($query);
     }
     if($on == "1")
     {
       $new_time = time();
       $query = "UPDATE ".LASTUSER_TABLE." SET last_date = '".$new_time."' WHERE userprofil_id = '".$user_row['user_id']."' AND user_on_id = '".$user_info[user_id]."' ";
       $sql = mysql_query($query);
     }
    }
    $limit = 5;  // IF YOU WANT SHOW MORE THEN 5 CHANGE IT ;)
    $query = "SELECT lastuser_id, userprofil_id, user_on_id, last_date, u.user_id, user_name FROM (".LASTUSER_TABLE." i)
              LEFT JOIN ".USERS_TABLE." u ON (u.user_id) = i.user_on_id
              WHERE userprofil_id = ".$user_row['user_id']." ORDER BY i.last_date DESC LIMIT 0 , ".$limit."";
    $sql = mysql_query($query);

    while($ds = mysql_fetch_object($sql))
    {
      $on_time = date("d.m.Y H:i", $ds->last_date);
      $last_user .= "<a href='member.php?action=showprofile&user_id=".$ds->user_id."'>".$ds->user_name."</a> <small>(".$on_time.")</small> | ";
    }

    $query = "SELECT COUNT(*) FROM ".LASTUSER_TABLE." WHERE userprofil_id = '".$user_row['user_id']."' ";
    $sql = mysql_query($query);
    $on = mysql_result($sql,0);

    if($on > $limit)
    {
      $query = "SELECT * FROM ".LASTUSER_TABLE." WHERE userprofil_id = '".$user_row['user_id']."' ORDER BY last_date DESC LIMIT ".$limit.", ".$limit." ";
      $sql = mysql_query($query);
      $ds = mysql_fetch_object($sql);

      $query = "DELETE FROM ".LASTUSER_TABLE." WHERE userprofil_id = '".$user_row['user_id']."' AND last_date <= ".$ds->last_date." ";
      $sql = mysql_query($query);
    }
    }
   
2.2.Find

Code: [Select]
"user_icq" => $user_icq,
add before

Code: [Select]
"last_user" => $last_user,
      "lang_last_user" => $lang['last_user'],


3.Open ./lang/<your_language>/main.php

add before

Code: [Select]
?>
this here:
/// GERMAN ///
Code: [Select]
//-------------------------------------------
//----Last User on Profil -------------------
//-------------------------------------------
$lang['last_user'] = "Letze User: ";

/// ENGLISH ///
Code: [Select]
//-------------------------------------------
//----Last User on Profil -------------------
//-------------------------------------------
$lang['last_user'] = "Last User: ";

Open ./template/<your_template>/member_profile.html

add where you want:

Code: [Select]
<b>{lang_last_user}</b> {last_user}
pls feedback ;)

Have Fun ;)

4
Hello @ all!

NEW VERSION  1.0.2 ;) with templates... and for the Gender - MOD [here]  and Member - Photo from V@no [here] and with BB-CODE (like details.php ;) )

Look @ this Request! http://www.4homepages.de/forum/index.php?topic=11679.45 !

i made i little php. its only a betha. i test it ONLY 1.72 and 1.73 WITHOUT ANY MOD'S!
i think with the help in this great forum we can instert the bbcode-function, the badword-function, and the smiles-function, chypta-function, and so on ;) ;)  and make the code smaller and faster^^

PLEASE NOTE I'M A PHP BEGINNER....


So i beginn ;)

SAVE YOUR FILES, AND MAKE A BACKUP!

new files:
/gb.php
/template/<your_template>/user_gb.html
/template/<your_template>/user_gb_bit.html
/template/<your_template>/user_gb_delete.html
/template/<your_template>/user_gb_new.html
/template/<your_template>/user_gb_showgb.html
/template/<your_template>/images/gb_english.gif (if you have an other language rename your button to gb_[language_dir].gif)
/template/<your_template>/images/gb_deutsch.gif
/template/<your_template>/images/entry_new_english.gif (if you have an other language rename your button to entry_new_[language_dir].gif)
/template/<your_template>/images/entry_new_deutsch.gif

changed files
/includes/constants.php
/includes/page_header.php
/member.php
/lang/<your_language>/main.php
/template/default/user_logininfo.html
/template/default/member_profil.html




create a new database field with
1.
Code: [Select]
CREATE TABLE `4images_users_gb` (
  `users_gb_id` smallint(5) NOT NULL auto_increment,
  `user_id_gb` smallint(5) NOT NULL default '0',
  `user_id_ein` smallint(5) NOT NULL default '0',
  `user_name_gb` varchar(50) NOT NULL default '',
  `user_gb_text` text NOT NULL,
  `user_gb_date` timestamp NOT NULL default '0000-00-00 00:00:00',
  `user_gb_read` timestamp NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`users_gb_id`)
) TYPE=MyISAM;
2. UPDATEED 08-18-2006
create a new file called: gb.php
with this code
Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: gb.php                                               *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.3                                                *
 *                                                                        *
 *    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.                              *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    User-Guestbook Version 1.0 betha for 4images                        *
 *                                                                        *
 *    Tested on 1.72 and 1.73                                             *
 *                                                                        *
 *    (C) 2006 by bofan                                                   *
 *                                                                        *
 *************************************************************************/

$main_template "user_gb";

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

if (
$action == "")
{
  
$action "showgb";
}

if (
$action == "showgb_new")
{
  
$update_query "UPDATE ".USERS_GB_TABLE." SET user_gb_read = NOW() WHERE user_id_gb =".$user_info['user_id']." AND user_gb_read = 0";
  
$sql mysql_query($update_query);
  
$action "showgb";
}

  
$msg_del $_GET['msg_del'];
  if(
$msg_del == "yes"$msg $lang['user_gb_delete_ok'];
  elseif(
$msg_del == "no"$msg $lang['user_gb_delete_not'];
  elseif(
$msg_del == ""$msg "";

if (
$action == "showgb") {
    if (
$user_info['user_level'] == GUEST) {
    
show_error_page($lang['no_permission']);
    exit;
  }
  if(
$_GET['id'] == ""$id $user_info[user_id]; else $id $_GET['id'];
  if(isset(
$id))
  {
   
$query "SELECT user_id, user_name FROM ".USERS_TABLE." WHERE user_id = ".$id."";
   
$sql mysql_query($query);
   
$ds mysql_fetch_object($sql);
   
$user_name "<a href='member.php?action=showprofile&user_id=".$ds->user_id."' target=_self>".$ds->user_name."</a>";
   
$user_name2 $ds->user_name;
  } else {
  
$user_name $user_info['user_name'];
  
$user_name2 $user_info['user_name'];
  }
  if(isset(
$id)) {$abf_id $id;} else {$abf_id $user_info['user_id'];}
  
$user_gb_own $lang['user_gb'].$user_name2."";
  
$button_in "<a href='gb.php?action=new&id=".$abf_id."'><img border = 0 src = '".ROOT_PATH.TEMPLATE_PATH."/images/entry_new_".$config['language_dir'].".gif'></a>";
  
$query2 "SELECT COUNT(*) FROM ".USERS_GB_TABLE." WHERE user_id_gb = ".$abf_id."";
  
$sql2 mysql_query($query2);
  
$erg mysql_result($sql2,0);
  if(
$erg == "0"){$user_gb_entry $erg.$lang['user_gb_entry'];}
  elseif(
$erg == "1"){$user_gb_entry $erg.$lang['user_gb_entrys'];}
  elseif(
$erg "1"){$user_gb_entry $erg.$lang['user_gb_entrys'];}

  
$offset = @$_GET['off'];
  if(isset(
$offset)) {$offset $_GET['off'];} else {$offset "0";}
  
// Without V@no's Member photo MOD and the GenderMod
  //$gb_query = "SELECT users_gb_id,user_id_gb,user_id_ein,user_name_gb,user_gb_text,user_gb_date,DATE_FORMAT(user_gb_date,'%e.%c.%Y') AS user_gb_datum,DATE_FORMAT(user_gb_date,'%H:%i:%s') AS user_gb_uhr, user_id, user_name, user_level
  //              FROM (".USERS_GB_TABLE." i)
  //              LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id_ein)
  //              WHERE user_id_gb = ".$abf_id."
  //              ORDER BY user_gb_date DESC
  //              LIMIT $offset, 10";
  //Only the Gender - MOD
  //$gb_query = "SELECT users_gb_id,user_id_gb,user_id_ein,user_name_gb,user_gb_text,user_gb_date,DATE_FORMAT(user_gb_date,'%e.%c.%Y') AS user_gb_datum,DATE_FORMAT(user_gb_date,'%H:%i:%s') AS user_gb_uhr, user_id, user_name, user_level,user_sex
  //              FROM (".USERS_GB_TABLE." i)
  //              LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id_ein)
  //              WHERE user_id_gb = ".$abf_id."
  //              ORDER BY user_gb_date DESC
  //              LIMIT $offset, 10";
  //Only the MemberPhoto MOD
  //$gb_query = "SELECT users_gb_id,user_id_gb,user_id_ein,user_name_gb,user_gb_text,user_gb_date,DATE_FORMAT(user_gb_date,'%e.%c.%Y') AS user_gb_datum,DATE_FORMAT(user_gb_date,'%H:%i:%s') AS user_gb_uhr, user_id, user_name, user_level,user_sex,userpic
  //              FROM (".USERS_GB_TABLE." i)
  //              LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id_ein)
  //              WHERE user_id_gb = ".$abf_id."
  //              ORDER BY user_gb_date DESC
  //              LIMIT $offset, 10";
  //With both MOD's
    
$gb_query "SELECT users_gb_id,user_id_gb,user_id_ein,user_name_gb,user_gb_text,user_gb_date,DATE_FORMAT(user_gb_date,'%e.%c.%Y') AS user_gb_datum,DATE_FORMAT(user_gb_date,'%H:%i:%s') AS user_gb_uhr, user_id, user_name, user_level,user_sex,userpic
                  FROM ("
.USERS_GB_TABLE." i)
                  LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id_ein)
                  WHERE user_id_gb = "
.$abf_id."
                  ORDER BY user_gb_date DESC
                  LIMIT 
$offset, 10";

  
$gb_sql mysql_query($gb_query);

  while(
$ds mysql_fetch_object($gb_sql))
    {
    if(
$ds->user_id_ein == $user_info[user_id] AND $ds->user_id != $ds->user_id_gb)
    {
      
$user_link_del "<a href='gb.php?action=delete_entry&entry=".$ds->users_gb_id."&id=".$ds->user_id_gb."'>".$lang['delete']."</a>";} else {$user_link_del ="";
    }
    if(
$abf_id == $user_info[user_id])
    {
      
$user_gb_delete "<a href='gb.php?action=delete_entry&entry=".$ds->users_gb_id."&user=".$ds->user_id_gb."'>".$lang[delete]."</a> ".$user_link_del;
    }
    else {
$user_gb_delete $user_link_del;}

    
//For the Gender-MOD ;)
    
if ($ds->user_sex "m"$gender "<img border = 0 src = '".ROOT_PATH.TEMPLATE_PATH."/images/m.gif'>";
    elseif (
$ds->user_sex "w"$gender "<img border = 0 src = '".ROOT_PATH.TEMPLATE_PATH."/images/w.gif'>";
    elseif (
$ds->user_sex "b"$gender "<img border = 0 src = '".ROOT_PATH.TEMPLATE_PATH."/images/b.gif'>";

    if (
$ds->user_id == "")
    {
      
$user $ds->user_name_gb;
      
$gb_link "";
      
$gender "";
    }
    else
    {
      
$user "<b><a href='member.php?action=showprofile&user_id=".$ds->user_id_ein."'>".$ds->user_name_gb."</a></b>";
      
$gb_link "<a href='gb.php?action=showgb&id=".$ds->user_id."'\n target=_self><img src='".ROOT_PATH.TEMPLATE_PATH."/images/gb_".$config['language_dir'].".gif' border=0></a>";
    }

    
//if installed PERSONAL_PHOTO FROM V@noyou can uncomment
    
$userpic $ds->userpic;
    if (
$userpic == ""$user_pic "<img src='".ROOT_PATH."data/userpic/default.jpg' width=90px>";
    else 
$user_pic "<img src='".ROOT_PATH."data/userpic/".$userpic."'width=90px>";

    
$text $ds->user_gb_text;

    
$gb_time $ds->user_gb_datum.$lang['user_gb_at'].$ds->user_gb_uhr;
    
$level $ds->user_level;
    if(
$level == "9") {$level $lang['level_admin'];}
    elseif(
$level == "2") {$level $lang['level_user'];}
    else {
$level "";}

  
$site_template->register_vars(array(
    
"user" => $user,
    
"gb_time" => $gb_time,
    
"admin_link" => $user_gb_delete,
    
"userpic" => $user_pic,
    
"gender" => $gender,
    
"gb_link" => $gb_link,
    
"level" => $level,
    
"text" => format_text($text$config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments'])
    ));
  
$gb_entrys .= $site_template->parse_template("user_gb_bit");
  }

  
//Pageing
  
if($offset == 0) {$vor $lang['user_gb_prev'];}
  else
  {
    
$offset2 $offset 10;
    
$vor "<a href='gb.php?action=showgb&id=".$abf_id."&off=".$offset2."'>".$lang['user_gb_prev']."</a>";
  }
  
$offset3 $offset 10;
  if(
$offset3 >= $erg ) { $weiter $lang['user_gb_next'];}
  else {
$weiter "<a href='gb.php?action=showgb&id=".$abf_id."&off=".$offset3."'>".$lang['user_gb_next']."</a>";}
  
$gb_pageing $vor."&nbsp;".$weiter;

   
$site_template->register_vars(array(
    
"gb_entrys" => $gb_entrys,
    
"user_gb_own" => $user_gb_own,
    
"gb_pageing" => $gb_pageing,
    
"button_in" => $button_in,
    
"user_gb_entry" => $user_gb_entry,
    
"user_gb_entry_text" => $user_gb_entry_text
  
));
  
$txt_clickstream $lang['user_gb'].$user_name;
  
$content $site_template->parse_template("user_gb_showgb");
}

if (
$action == "delete_entry")
{
  if(isset(
$_GET['aktion']))
  {
    if(
$_GET['aktion'] == $lang['user_gb_delete_yes'])
    {
      
$query "DELETE FROM ".USERS_GB_TABLE." WHERE users_gb_id = ".@$_GET['entry']."";
      
$sql $site_db->query($query);
      
$user_gb .= "<meta http-equiv=refresh content=\"0; URL=gb.php?action=showgb&id=".$_GET['id']."&msg_del=yes\">";
      
$txt_clickstream $lang['user_gb_delete_ok'];
    }
    if(
$_GET['aktion'] == $lang['user_gb_delete_no'])
    {
      
$user_gb .= "<meta http-equiv=refresh content=\"0; URL=gb.php?action=showgb&id=".$_GET['id']."&msg_del=no\">";
    }
  }
  else
  {
    
$txt_clickstream $lang['user_gb_delete_click'];
  }
    if (
$user_info['user_level'] == GUEST)
    {
       
show_error_page($lang['no_permission']);
    exit;
    }

    
$site_template->register_vars(array(
    
"user_gb" => $user_gb,
    
"entry" => $_GET['entry'],
    
"id" => $_GET['id'],
    
"delete_entry" => $lang['user_gb_delete_quest'],
    
"delete_entry_yes" => $lang['user_gb_delete_yes'],
    
"delete_entry_no" => $lang['user_gb_delete_no']
    ));
    
$content $site_template->parse_template("user_gb_delete");
}

if (
$action == "new")
{
  if(
$_GET['ent'] == ""$afg "false"; else $afg $_GET['ent'];
  if (
$_POST['comment_text'] == "" $_GET['ent'] == "true")
    {
      
$msg $lang['error_no_text'];
      
$afg "false";
    }
  if(
$afg == "true")
  {
    
$text $_POST['comment_text'];

    if(
$_POST['id'] == $user_info[user_id]) { $a "NOW()";}
    else {
$a "'0'";}
    
$query "INSERT INTO ".USERS_GB_TABLE."
              (user_id_gb, user_id_ein, user_name_gb, user_gb_text, user_gb_date, user_gb_read)
              VALUES
              ('"
.$_POST['id']."', '".$user_info[user_id]."', '".$user_info[user_name]."','".$text."', NOW(), ".$a.")";
    
$sql mysql_query($query);

    
$msg .= "<meta http-equiv=refresh content=\"5; URL=gb.php?action=showgb&ent=true&id=".$_POST['id']."\">\n
    <fieldset style=border : 1px solid blue><legend style=color: black;><b>"
.$lang['user_gb_new_ok']."</b>\n
    </legend>\n<table border=0 cellspacing=0 cellpadding=8><tr><td><img src='"
.TEMPLATE_PATH."/images/danger.gif' /></td>\n
    <td><p>&nbsp;"
.$lang['user_gb_new_wait']."
    <a href=gb.php?action=showgb&id="
.$_POST['id'].">".$lang['user_gb_new_to']."</a><br></p></td></tr></table></fieldset>";
  }
  elseif (
$afg == "false")
  {
    
$id $_GET['id'];
  }
    if (
$user_info['user_level'] == GUEST)
    {
       
show_error_page($lang['no_permission']);
    exit;
  }

    if (
$config['bb_comments'] == 1) {
    
$site_template->register_vars(array(
      
"lang_bbcode" => $lang['bbcode'],
      
"lang_tag_prompt" => $lang['tag_prompt'],
      
"lang_link_text_prompt" => $lang['link_text_prompt'],
      
"lang_link_url_prompt" => $lang['link_url_prompt'],
      
"lang_link_email_prompt" => $lang['link_email_prompt'],
      
"lang_list_type_prompt" => $lang['list_type_prompt'],
      
"lang_list_item_prompt" => $lang['list_item_prompt']
    ));
    
$bbcode $site_template->parse_template("bbcode"); }

    
$site_template->register_vars(array(
    
"user_gb" => $user_gb,
    
"bbcode" => $bbcode,
    
"head_gb" => $lang['user_gb_new'],
    
"button_send" => $lang['submit'],
    
"button_reset" => $lang['reset'],
    
"gb_id" => $id
    
));
    
$txt_clickstream $lang['user_gb_new'];
    
$content $site_template->parse_template("user_gb_new");
}

//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
if($txt_clickstream == ""){
  
$txt_clickstream $lang['bug'];
}

$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>";

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  
"content" => $content,
  
"msg" => $msg,
  
"clickstream" => $clickstream,
  
"lang_control_panel" => $lang['control_panel']
));
$site_template->print_template($site_template->parse_template($main_template));
include(
ROOT_PATH.'includes/page_footer.php');
?>

3.
then open includes/constants.php
and find

Code: [Select]
define('USERS_TABLE', $table_prefix.'users');
add after:

Code: [Select]
define('USERS_GB_TABLE', $table_prefix.'users_gb');
4.1
open includes/page_header.php

find there

Code: [Select]
"url_lightbox" => $site_sess->url(ROOT_PATH."lightbox.php"),
add after

Code: [Select]
"url_own_gb" => (!empty($url_own_gb)) ? $site_sess->url($url_own_gb) : $site_sess->url(ROOT_PATH."gb.php?action=showgb_new"),
4.2. changed
find
Code: [Select]
  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);
}

add after

Code: [Select]
//-----------------------------------------
//---[MOD] User_Guestbook V.1.0.2 betha -----
//----2006 by bofan for 4images gallery ---
//-----------------------------------------
$query = "SELECT COUNT(*) FROM ".USERS_GB_TABLE."
          WHERE user_id_gb = ".$user_info['user_id']."
          AND user_gb_read = '0'";
$sql = mysql_query($query);
$erg = mysql_result($sql,0);
  if($erg == "0"){$user_gb_neu = $erg." ".$lang['lang_gb_new'].$lang['user_gb_entrys'];}
  elseif($erg == "1"){$user_gb_neu = "<b>".$erg." ".$lang['lang_gb_new'].$lang['user_gb_entrys']."</b>";}
  elseif($erg > "1"){$user_gb_neu = "<b>".$erg." ".$lang['lang_gb_new'].$lang['user_gb_entrys']."</b>";}

//--END USER-Guestbook MOD---

4.3.

Code: [Select]
"lang_lightbox" => $lang['lightbox'],
add after

Code: [Select]
"lang_own_gb" => $user_gb_neu,
5.
open member.php

find there:

Code: [Select]
    else {
      $user_icq_button = REPLACE_EMPTY;
    }

add after

Code: [Select]
//-----------------------------------------
//---[MOD] User_Guestbook V.1.0.2 betha -----
//----2006 by bofan for 4images gallery ---
//-----------------------------------------
    $query = "SELECT COUNT(*) FROM ".USERS_GB_TABLE." WHERE user_id_gb = ".$user_row['user_id']."";
    $sql = mysql_query($query);
    $erg = mysql_result($sql,0);
    $user_gb_ein = $erg;

    $query = "SELECT COUNT(*) FROM ".USERS_GB_TABLE." WHERE user_id_ein = ".$user_row['user_id']."";
    $sql = mysql_query($query);
    $erg = mysql_result($sql,0);
    $user_gb_ge = $erg;


    $user_gb_link = "<a href='gb.php?action=showgb&id=".$user_row['user_id']."'>".$lang['user_gb_too_gb'].$user_row['user_name']." (".$user_gb_ein.")</a>";

    $site_template->register_vars(array(
    "user_gb_ein" => $user_gb_ein,
    "user_gb_ge" => $user_gb_ge,
    "lang_gb_ein" => $lang['user_gb_ein'],
    "lang_user_gb_er" => $lang['user_gb_er'],
    "lang_user_gb_ge" => $lang['user_gb_ge'],
    "user_gb_link" => $user_gb_link
    ));
//--END USER-Guestbook MOD---

6. changed

open your lang/<your_language>/main.php

for GERMAN this
Code: [Select]
//---[MOD] User_Guestbook V.1.0.2 betha -----
//----2006 by bofan for 4images gallery ---
//-----------------------------------------

$lang['user_gb'] = "Gästebuch von ";
$lang['user_gb_entry'] = " Eintrag";
$lang['user_gb_entrys'] = " Einträge";
$lang['lang_gb_new'] = "neue(r)";
$lang['user_gb_back'] = "Zur Übersicht";
$lang['user_gb_delete'] = "Der Eintrag wurde gelöscht";
$lang['user_gb_delete_quest'] = "Wollen Sie den Gästebucheintrag löschen?";
$lang['user_gb_delete_yes'] = "Ja";
$lang['user_gb_delete_no'] = "Nein";
$lang['user_gb_delete_click'] = "Eintrag löschen?";
$lang['user_gb_delete_ok'] = "Eintrag gelöscht!";
$lang['user_gb_delete_not'] = "Eintrag nicht gelöscht!";
$lang['user_gb_new'] = "Neuer Gästebucheintrag";
$lang['user_gb_new_ok'] = "Eintrag war erfolgreich!";
$lang['user_gb_new_to'] = "Zum Eintrag";
$lang['user_gb_new_wait'] ="Bitte warten Sie 5 Sekunden bis zur automatischen Weiterleitung!<br> Oder Klicken Sie\n";
$lang['user_gb_too_gb'] = "Zum Gästebuch von ";
$lang['user_gb_at'] = " um ";
$lang['error_no_text'] = "Eintrag fehlt!";
$lang['bug'] = "Fehler";
$lang['user_gb_er'] = "erhaltene GB - Einträge:";
$lang['user_gb_ge'] = "geschriebene GB - Einträge:";
$lang['user_gb_next'] = "weiter";
$lang['user_gb_prev'] = "vor";
$lang['level_user'] = "Member";
$lang['level_admin'] = "Administrator";

or ENGLISH

Code: [Select]
//---[MOD] User_Guestbook V.1.0.2 betha -----
//----2006 by bofan for 4images gallery ---
//-----------------------------------------

$lang['user_gb'] = "Guestbook from ";
$lang['user_gb_entry'] = " Entry";
$lang['user_gb_entrys'] = " Entrys";
$lang['lang_gb_new'] = "new";
$lang['user_gb_back'] = "To the Overview";
$lang['user_gb_delete'] = "The entry was deleted";
$lang['user_gb_delete_quest'] = "Do you want to delete this Guestbook-Entry? ";
$lang['user_gb_delete_yes'] = "Yes";
$lang['user_gb_delete_no'] = "No";
$lang['user_gb_delete_click'] = "Delete Entry?";
$lang['user_gb_delete_ok'] = "Entry deleted!";
$lang['user_gb_delete_not'] = "Entry not deleted";
$lang['user_gb_new'] = "New Guestbook-Entry";
$lang['user_gb_new_ok'] = "The entry was successful";
$lang['user_gb_new_to'] = "To the new entry";
$lang['user_gb_new_wait'] ="Please you wait 5 seconds up to the automatic forwarding! <br> Or you klick\n";
$lang['user_gb_too_gb'] = "Too the Guestbook from ";
$lang['user_gb_at'] = " at ";
$lang['error_no_text'] = "Entry is missing!";
$lang['bug'] = "Error";
$lang['user_gb_er'] = "received  Entrys:";
$lang['user_gb_ge'] = "written Entrys:";
$lang['user_gb_next'] = "next";
$lang['user_gb_prev'] = "prev";
$lang['level_user'] = "Member";
$lang['level_admin'] = "Administrator";

add before
Code: [Select]
?>
7.

open template/default/user_logininfo.html

find there

Code: [Select]
      &raquo; <a href="{url_lightbox}">{lang_lightbox}</a> <br />
add after

Code: [Select]
  &raquo; <a href="{url_own_gb}">{lang_own_gb}</a><br />
8.

open template/default/member_profil.html

find there

Code: [Select]
        <tr>

          <td class="row1"><b>{lang_comments}</b></td>
          <td class="row1">{user_comments}</td>
        </tr>

add after

Code: [Select]
<tr>
          <td class="row2"><b>{lang_user_gb_er}</b></td>
          <td class="row2">{user_gb_ein}</td>
        </tr>

        <tr>
          <td class="row1"><b>{lang_user_gb_ge}</b></td>
          <td class="row1">{user_gb_ge}</td>
        </tr>

and at the End of the file, you make this

Code: [Select]
<b>{user_gb_link}</b>
9.

make 3 new templates. save this in your template-file.

9.1.
call the first user_gb.html
like this
Code: [Select]
{header}
<table width="640" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td>

      <table width="640" border="0" cellspacing="0" cellpadding="0" class="tablehead">
        <tr>
          <td colspan="4"><img src="{template_url}/images/header_top.gif" width="640" height="6" alt="" /></td>
        </tr>
        <tr>
          <td width="6"><img src="{template_url}/images/header_left.gif" width="6" height="60" alt="" /></td>
          <td width="405"><img src="{template_url}/images/header_logo.gif" width="405" height="60" alt="" /></td>
          <td width="225" align="right">
            <form method="post" action="{url_search}">

              <table border="0" cellspacing="0" cellpadding="1">
                <tr>
                  <td>
                    <input type="text" name="search_keywords" size="15" class="searchinput" />
                  </td>
                  <td>
                    <input type="submit" value="{lang_search}" class="button" name="submit" />
                  </td>
                </tr>

                <tr valign="top">
                  <td colspan="2"><a href="{url_search}" class="smalltext">{lang_advanced_search}</a></td>
                </tr>
              </table>
            </form>
          </td>
          <td align="right" width="6"><img src="{template_url}/images/header_right.gif" width="6" height="60" alt="" /></td>
        </tr>

      </table>
    </td>
  </tr>
  <tr>
    <td class="bordercolor">
      <table width="640" border="0" cellspacing="1" cellpadding="0">
        <tr>
          <td class="tablebgcolor">
            <table width="638" border="0" cellspacing="1" cellpadding="0">

              <tr>
                <td class="navbar" height="23">
                  <table width="636" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td><img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" />{clickstream}</td>
                      <td align="right">
    <a href="{url_top_images}"><b>{lang_top_images}</b></a>&nbsp;
<a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;

  </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            <table width="638" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="150" class="row2" valign="top">

                  <table width="150" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="head2" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_registered_user}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                    <tr>

                      <td align="center" class="row1">{user_box}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                  </table>
  {if random_image}
                  <table width="150" border="0" cellspacing="0" cellpadding="0">
                    <tr>

                      <td class="head2" height="20"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_random_image}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                    <tr>
                      <td align="center" class="row1">
    <br />

                        {random_image}
<br />
                        <br />
                      </td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                  </table>

  {endif random_image}
                </td>
                <td width="1" class="bordercolor" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                <td width="18" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="18" height="18" /></td>
                <td width="450" valign="top">
  <br />
  <table width="100%">
    <tr>
      <td><span class="title">{user_gb_own}</span></td>

      <td align="right">{button_ein}</td>
        </tr>
      </table>
                    {if msg}<b>{msg}</b><br />
                  <br />
                  {endif msg}
  {content}
                  <p>&nbsp;</p>
</td>

                <td width="19" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="19" height="19" /></td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>

    <td>
      <table width="640" border="0" cellspacing="0" cellpadding="0" class="tablebottom">
        <tr>
          <td width="6"><img src="{template_url}/images/footer_left.gif" width="6" height="19" alt="" /></td>
          <td width="405">&nbsp;</td>
          <td width="225">&nbsp;</td>
          <td width="6"><img src="{template_url}/images/footer_right.gif" width="6" height="19" alt="" /></td>
        </tr>
      </table>

    </td>
  </tr>
</table>
{footer}

9.2.

an file user_gb_bit.html

like this:
Code: [Select]
<table width="100%" class=head1 cellpadding="1" cellspacing="0">
<tr>
<td><table class=row2 cellpadding="3" cellspacing="0" width=100%><tr>
  <td width="100px" rowspan="2" align="left" valign="top"><b>{user}</b> {gender}<br>
    {level}<br>    {userpic}<br>

    {gb_link}</td>
  <td align="left" valign="top">{text}  </td>
</tr>
    <tr>
      <td valign="bottom" height="1"><hr size="1">
      <table cellpadding="0" cellspacing="0" width="100%"><tr>
    <td align="left"><small>{gb_time}</small></td>
    <td align="right"><small>{admin_link}</small></td></tr></table></td>

    </tr>
</table></td></tr><tr><td class="row1"></td></tr></table>


9.3.

an file user_gb_delete.html

like this:
Code: [Select]
{user_gb}
<table cellpadding="1" cellspacing="0" width=100% class=head2><tr><td><form action='?action=delete_entry' method=get>
<table cellpadding="3" cellspacing="0">
<tr>
<td colspan=2 width=600px align="center" class="head1">{delete_entry}
</td></tr>
    <tr>
    <td class="row2" align="center">
    <input type=hidden name=action value=delete_entry>
    <input type=hidden name=entry value="{entry}">
    <input type=hidden name=id value="{id}">

    <input type=submit name=aktion value='{delete_entry_yes}' class=button>
    <input type=submit name=aktion value='{delete_entry_no}' class=button>
    </td>
    </tr>
    </table></form></td></tr></table>

9.4. V.1.0.2

file user_gb_new.html

like this:
Code: [Select]
<table width=450px cellpadding="1" cellspacing="0" align="center">
<tr>
<td>
<table align="center" width="100%" border="0" cellpadding="3" cellspacing="0"><form name=commentform action='?action=new&ent=true&id={gb_id}' method=post>
<tr><td class=head1 colspan=11>{head_gb}</td></tr>
<tr><td class=row1 align="center"><textarea class=input name=comment_text rows=6 cols=120></textarea>

    <br>
    {bbcode}<br>
    <input type=hidden name=id value={gb_id}></td></tr>
<tr><td class=row1 align="center"><input type=submit class=button value={button_send}><input type=reset class=button value={button_reset}></td></tr>
</form>
</table>
</td>
</tr>
</table>

9.5.

and a file user_gb_showgb.html

like this:
Code: [Select]
<table width="100%" class=head1 cellpadding="1" cellspacing="0">
<tr>
<td><table class=row2 cellpadding="3" cellspacing="0" width=100%><tr><td align="left" width=22%>{user_gb_entry}</td><td align="center">{gb_pageing}<td align="right" width=22%>{button_in}</td></tr>

  <tr>
    <td colspan="3" align=center>{gb_entrys}  </td>
    </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td align="center">{gb_pageing}
    <td align="right">&nbsp;</td>
  </tr>
</table>

</td>
</tr>
</table>


so the attatched file load into your template/<your_template>/images/!

i hope this [MOD] can help somebody :)

Demo? not yet ;)

5
Mods & Plugins (Requests & Discussions) / i want publish a mod
« on: August 13, 2006, 08:28:54 PM »
Hello @ all!

i have programmed a little mod.

but i want show the code bevor i publish this, an "old" 4images-programmer (v@no, or somebody), because they can say, here can you make shorter. or my problem with the bbcodes/smilies...

who i have to ask ?

Thankx

6
hello to all!

i can't save things in my profil? why?

here is my member.php & member_editprofil.htm

7
Discussion & Troubleshooting / problem with detail.php
« on: June 08, 2006, 09:24:30 PM »
Hello!

if my user klick on a link like "details.php?image_id=2866" the side load... but then came the index.php?

why?

this is my details.php

Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: details.php                                          *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.2                                                *
 *                                                                        *
 *    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.                              *
 *                                                                        *
 *************************************************************************/

$main_template 'details';

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

if (!
$image_id) {
redirect($url);
}

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

$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").get_user_table_field(", u.""user_email")."
        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_id = 
$image_id AND c.cat_id = i.cat_id";
$image_row $site_db->query_firstrow($sql);
$cat_id = (isset($image_row['cat_id'])) ? $image_row['cat_id'] : 0;
$is_image_owner = ($image_row['user_id'] > USER_AWAITING && $user_info['user_id'] == $image_row['user_id']) ? 0;

if (!
check_permission("auth_viewcat"$cat_id) || !check_permission("auth_viewimage"$cat_id) || !$image_row) {
  
redirect($url);
}

$random_cat_image = (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0) ? "" get_random_image($cat_id);
$site_template->register_vars("random_cat_image"$random_cat_image);
unset(
$random_cat_image);

//-----------------------------------------------------
//--- Show Image --------------------------------------
//-----------------------------------------------------
$image_allow_comments = (check_permission("auth_readcomment"$cat_id)) ? $image_row['image_allow_comments'] : 0;
$image_name format_text($image_row['image_name']);
show_image($image_row$mode01);

$in_mode 0;

$sql "";
if (
$mode == "lightbox") {
if (!empty(
$user_info['lightbox_image_ids'])) {
    
$image_id_sql str_replace(" "", "trim($user_info['lightbox_image_ids']));
    
$sql "SELECT image_id, cat_id, image_name, image_media_file, image_thumb_file
            FROM "
.IMAGES_TABLE."
            WHERE image_active = 1 AND image_id IN (
$image_id_sql) AND (cat_id NOT IN (".get_auth_cat_sql("auth_viewimage""NOTIN").", ".get_auth_cat_sql("auth_viewcat""NOTIN")."))
            ORDER BY "
.$config['image_order']." ".$config['image_sort'];
    
$in_mode 1;
  }
}
elseif (
$mode == "search") {
  if (!isset(
$session_info['searchid']) || empty($session_info['searchid'])) {
    
$session_info['search_id'] = $site_sess->get_session_var("search_id");
  }

  if (!empty(
$session_info['search_id'])) {
    
$search_id unserialize($session_info['search_id']);
  }

  
$sql_where_query "";

  if (!empty(
$search_id['image_ids'])) {
    
$sql_where_query .= "AND image_id IN (".$search_id['image_ids'].") ";
  }

  if (!empty(
$search_id['user_ids'])) {
    
$sql_where_query .= "AND user_id IN (".$search_id['user_ids'].") ";
  }

  if (!empty(
$search_id['search_new_images']) && $search_id['search_new_images'] == 1) {
    
$new_cutoff time() - 60 60 24 $config['new_cutoff'];
    
$sql_where_query .= "AND image_date >= $new_cutoff ";
  }

  if (!empty(
$search_id['search_cat']) && $search_id['search_cat'] != 0) {
    
$cat_id_sql 0;
    
$sub_cat_ids get_subcat_ids($search_id['search_cat'], $search_id['search_cat'], $cat_parent_cache);
    if (
check_permission("auth_viewcat"$search_id['search_cat'])) {
      
$cat_id_sql .= ", ".$search_id['search_cat'];
      if (!empty(
$sub_cat_ids[$search_id['search_cat']])) {
        foreach (
$sub_cat_ids[$search_id['search_cat']] as $val) {
          if (
check_permission("auth_viewcat"$val)) {
            
$cat_id_sql .= ", ".$val;
          }
        }
      }
    }
  }
  else {
    
$cat_id_sql get_auth_cat_sql("auth_viewcat");
  }

  if (!empty(
$sql_where_query)) {
    
$sql "SELECT image_id, cat_id, image_name, image_media_file, image_thumb_file
            FROM "
.IMAGES_TABLE."
            WHERE image_active = 1
            
$sql_where_query
            AND cat_id IN (
$cat_id_sql)
            ORDER BY "
.$config['image_order']." ".$config['image_sort'];
    
$in_mode 1;
  }
}
if (!
$in_mode || empty($sql)) {
  
$sql "SELECT image_id, cat_id, image_name, image_media_file, image_thumb_file
          FROM "
.IMAGES_TABLE."
          WHERE image_active = 1 AND cat_id = 
$cat_id
          ORDER BY "
.$config['image_order']." ".$config['image_sort'].", image_id ASC";
}
$result $site_db->query($sql);

$image_id_cache = array();
$next_prev_cache = array();
$break 0;
$prev_id 0;
while(
$row $site_db->fetch_array($result)) {
  
$image_id_cache[] = $row['image_id'];
  
$next_prev_cache[$row['image_id']] = $row;
  if (
$break) {
    break;
  }
  if (
$prev_id == $image_id) {
    
$break 1;
  }
  
$prev_id $row['image_id'];
}
$site_db->free_result();

if (!
function_exists("array_search")) {
  function 
array_search($needle$haystack) {
    
$match false;
    foreach (
$haystack as $key => $value) {
      if (
$value == $needle) {
        
$match $key;
      }
    }
    return 
$match;
  }
}

$act_key array_search($image_id$image_id_cache);
$next_image_id = (isset($image_id_cache[$act_key 1])) ? $image_id_cache[$act_key 1] : 0;
$prev_image_id = (isset($image_id_cache[$act_key 1])) ? $image_id_cache[$act_key 1] : 0;
unset(
$image_id_cache);

// Get next and previous image
if (!empty($next_prev_cache[$next_image_id])) {
  
$next_image_name format_text($next_prev_cache[$next_image_id]['image_name']);
  
$next_image_url $site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$next_image_id.((!empty($mode)) ? "&amp;mode=".$mode ""));
  if (!
get_file_path($next_prev_cache[$next_image_id]['image_media_file'], "media"$next_prev_cache[$next_image_id]['cat_id'], 00)) {
    
$next_image_file ICON_PATH."/404.gif";
  }
  else {
    
$next_image_file get_file_path($next_prev_cache[$next_image_id]['image_media_file'], "media"$next_prev_cache[$next_image_id]['cat_id'], 01);
  }
  if (!
get_file_path($next_prev_cache[$next_image_id]['image_thumb_file'], "thumb"$next_prev_cache[$next_image_id]['cat_id'], 00)) {
    
$next_thumb_file ICON_PATH."/".get_file_extension($next_prev_cache[$next_image_id]['image_media_file']).".gif";
  }
  else {
    
$next_thumb_file get_file_path($next_prev_cache[$next_image_id]['image_thumb_file'], "thumb"$next_prev_cache[$next_image_id]['cat_id'], 01);
  }
}
else {
  
$next_image_name REPLACE_EMPTY;
  
$next_image_url REPLACE_EMPTY;
  
$next_image_file REPLACE_EMPTY;
  
$next_thumb_file REPLACE_EMPTY;
}

if (!empty(
$next_prev_cache[$prev_image_id])) {
  
$prev_image_name format_text($next_prev_cache[$prev_image_id]['image_name']);
  
$prev_image_url $site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$prev_image_id.((!empty($mode)) ? "&amp;mode=".$mode ""));
  if (!
get_file_path($next_prev_cache[$prev_image_id]['image_media_file'], "media"$next_prev_cache[$prev_image_id]['cat_id'], 00)) {
    
$prev_image_file ICON_PATH."/404.gif";
  }
  else {
    
$prev_image_file get_file_path($next_prev_cache[$prev_image_id]['image_media_file'], "media"$next_prev_cache[$prev_image_id]['cat_id'], 01);
  }
  if (!
get_file_path($next_prev_cache[$prev_image_id]['image_thumb_file'], "thumb"$next_prev_cache[$prev_image_id]['cat_id'], 00)) {
    
$prev_thumb_file ICON_PATH."/".get_file_extension($next_prev_cache[$prev_image_id]['image_media_file']).".gif";
  }
  else {
    
$prev_thumb_file get_file_path($next_prev_cache[$prev_image_id]['image_thumb_file'], "thumb"$next_prev_cache[$prev_image_id]['cat_id'], 01);
  }
}
else {
  
$prev_image_name REPLACE_EMPTY;
  
$prev_image_url REPLACE_EMPTY;
  
$prev_image_file REPLACE_EMPTY;
  
$prev_thumb_file REPLACE_EMPTY;
}

$site_template->register_vars(array(
  
"next_image_id" => $next_image_id,
  
"next_image_name" => $next_image_name,
  
"next_image_url" => $next_image_url,
  
"next_image_file" => $next_image_file,
  
"next_thumb_file" => $next_thumb_file,
  
"prev_image_id" => $prev_image_id,
  
"prev_image_name" => $prev_image_name,
  
"prev_image_url" => $prev_image_url,
  
"prev_image_file" => $prev_image_file,
  
"prev_thumb_file" => $prev_thumb_file
));
unset(
$next_prev_cache);

//-----------------------------------------------------
//--- Save Comment ------------------------------------
//-----------------------------------------------------
$error 0;
if (
$action == "postcomment" && isset($HTTP_POST_VARS[URL_ID])) {
  
$id intval($HTTP_POST_VARS[URL_ID]);
  
$sql "SELECT cat_id, image_allow_comments
          FROM "
.IMAGES_TABLE."
          WHERE image_id = 
$id";
  
$row $site_db->query_firstrow($sql);

  if (
$row['image_allow_comments'] == || !check_permission("auth_postcomment"$row['cat_id']) || !$row) {
    
$msg $lang['comments_deactivated'];
  }
  else {
    
$user_name un_htmlspecialchars(trim($HTTP_POST_VARS['user_name']));
    
$comment_headline un_htmlspecialchars(trim($HTTP_POST_VARS['comment_headline']));
    
$comment_text un_htmlspecialchars(trim($HTTP_POST_VARS['comment_text']));

    
// Flood Check
    
$sql "SELECT comment_ip, comment_date
            FROM "
.COMMENTS_TABLE."
            WHERE image_id = 
$id
            ORDER BY comment_date DESC
            LIMIT 1"
;
    
$spam_row $site_db->query_firstrow($sql);
    
$spamtime $spam_row['comment_date'] + 180;

    if (
$session_info['session_ip'] == $spam_row['comment_ip'] && time() <= $spamtime && $user_info['user_level'] != ADMIN)  {
      
$msg .= (($msg != "") ? "<br />" "").$lang['spamming'];
      
$error 1;
    }

    
$user_name_field get_user_table_field("""user_name");
    if (!empty(
$user_name_field)) {
      if (
$site_db->not_empty("SELECT $user_name_field FROM ".USERS_TABLE." WHERE $user_name_field = '".strtolower($user_name)."' AND ".get_user_table_field("""user_id")." <> '".$user_info['user_id']."'")) {
        
$msg .= (($msg != "") ? "<br />" "").$lang['username_exists'];
        
$error 1;
      }
    }
    if (
$user_name == "")  {
      
$msg .= (($msg != "") ? "<br />" "").$lang['name_required'];
      
$error 1;
    }
    
    if (
$comment_text == "")  {
      
$msg .= (($msg != "") ? "<br />" "").$lang['comment_required'];
      
$error 1;
    }

    if (!
$error)  {
      
$sql "INSERT INTO ".COMMENTS_TABLE."
              (image_id, user_id, user_name, comment_headline, comment_text, comment_ip, comment_date)
              VALUES
              (
$id, ".$user_info['user_id'].", '$user_name', '$comment_headline', '$comment_text', '".$session_info['session_ip']."', ".time().")";
      
$site_db->query($sql);
      
$commentid $site_db->get_insert_id();
      
update_comment_count($id$user_info['user_id']);
    }
  }
  unset(
$row);
  unset(
$spam_row);
}

//-----------------------------------------------------
//--- Show Comments -----------------------------------
//-----------------------------------------------------
if ($image_allow_comments == 1) {
$additional_sql "";
  if (!empty(
$additional_user_fields)) {
    
$table_fields $site_db->get_table_fields(USERS_TABLE);
    foreach (
$additional_user_fields as $key => $val) {
      if (isset(
$table_fields[$key])) {
        
$additional_sql .= ", u.$key";
      }
    }
  }
  
$sql "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.""user_level").get_user_table_field(", u.""user_name").get_user_table_field(", u.""user_email").get_user_table_field(", u.""user_showemail").get_user_table_field(", u.""user_invisible").get_user_table_field(", u.""user_joindate").get_user_table_field(", u.""user_lastaction").get_user_table_field(", u.""user_comments").get_user_table_field(", u.""user_homepage").get_user_table_field(", u.""user_icq").get_user_table_field(", u.""user_id").$additional_sql."
          FROM "
.COMMENTS_TABLE." c
          LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = c.user_id)
          WHERE c.image_id = 
$image_id
          ORDER BY c.comment_date ASC"
;
  
$result $site_db->query($sql);

  
$comment_row = array();
  while (
$row $site_db->fetch_array($result)) {
    
$comment_row[] = $row;
  }
  
$site_db->free_result($result);
  
$num_comments sizeof($comment_row);

  if (!
$num_comments) {
    
$comments "<tr><td class=\"commentrow1\" colspan=\"2\">".$lang['no_comments']."</td></tr>";
  }
  else {
    
$comments "";
    
$bgcounter 0;
    for (
$i 0$i $num_comments$i++) {
      
$row_bg_number = ($bgcounter++ % == 0) ? 2;

      
$comment_user_email "";
      
$comment_user_email_save "";
      
$comment_user_mailform_link "";
      
$comment_user_email_button "";
      
$comment_user_homepage_button "";
      
$comment_user_icq_button "";
      
$comment_user_profile_button "";
      
$comment_user_status_img REPLACE_EMPTY;
      
$comment_user_name format_text($comment_row[$i]['comment_user_name']);
      
$comment_user_info $lang['userlevel_guest'];

      
$comment_user_id $comment_row[$i]['user_id'];
      
$user_row_comment get_user_info($comment_user_id);

      if (isset(
$comment_row[$i][$user_table_fields['user_name']]) && $comment_user_id != GUEST) {
        
$comment_user_name format_text($comment_row[$i][$user_table_fields['user_name']]);

        
$comment_user_profile_link = !empty($url_show_profile) ? $site_sess->url(preg_replace("/{user_id}/"$comment_user_id$url_show_profile)) : $site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$comment_user_id);
        
$comment_user_profile_button "<a href=\"".$comment_user_profile_link."\"><img src=\"".get_gallery_image("profile.gif")."\" border=\"0\" alt=\"".$comment_user_name."\" /></a>";

        
$comment_user_status_img = ($comment_row[$i][$user_table_fields['user_lastaction']] >= (time() - 300) && ((isset($comment_row[$i][$user_table_fields['user_invisible']]) && $comment_row[$i][$user_table_fields['user_invisible']] == 0) || $user_info['user_level'] == ADMIN)) ? "<img src=\"".get_gallery_image("user_online.gif")."\" border=\"0\" alt=\"Online\" />" "<img src=\"".get_gallery_image("user_offline.gif")."\" border=\"0\" alt=\"Offline\" />";

        
$comment_user_homepage = (isset($comment_row[$i][$user_table_fields['user_homepage']])) ? format_url($comment_row[$i][$user_table_fields['user_homepage']]) : "";
        if (!empty(
$comment_user_homepage)) {
          
$comment_user_homepage_button "<a href=\"".$comment_user_homepage."\" target=\"_blank\"><img src=\"".get_gallery_image("homepage.gif")."\" border=\"0\" alt=\"".$comment_user_homepage."\" /></a>";
        }

        
$comment_user_icq = (isset($comment_row[$i][$user_table_fields['user_icq']])) ? format_text($comment_row[$i][$user_table_fields['user_icq']]) : "";
        if (!empty(
$comment_user_icq)) {
          
$comment_user_icq_button "<a href=\"http://wwp.icq.com/scripts/search.dll?to=".$comment_user_icq."\" target=\"_blank\"><img src=\"http://web.icq.com/whitepages/online?icq=".$comment_user_icq."&img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"".$comment_user_icq."\" /></a>";
        }

        if (!empty(
$comment_row[$i][$user_table_fields['user_email']]) && (!isset($comment_row[$i][$user_table_fields['user_showemail']]) || (isset($comment_row[$i][$user_table_fields['user_showemail']]) && $comment_row[$i][$user_table_fields['user_showemail']] == 1))) {
          
$comment_user_email format_text($comment_row[$i][$user_table_fields['user_email']]);
          
$comment_user_email_save format_text(str_replace("@"" at "$comment_row[$i][$user_table_fields['user_email']]));
          if (!empty(
$url_mailform)) {
            
$comment_user_mailform_link $site_sess->url(preg_replace("/{user_id}/"$comment_user_id$url_mailform));
          }
          else {
            
$comment_user_mailform_link $site_sess->url(ROOT_PATH."member.php?action=mailform&amp;".URL_USER_ID."=".$comment_user_id);
          }
          
$comment_user_email_button "<a href=\"".$comment_user_mailform_link."\"><img src=\"".get_gallery_image("email.gif")."\" border=\"0\" alt=\"".$comment_user_email_save."\" /></a>";
        }

        if (!isset(
$comment_row[$i][$user_table_fields['user_level']]) || (isset($comment_row[$i][$user_table_fields['user_level']]) && $comment_row[$i][$user_table_fields['user_level']] == USER)) {
          
$comment_user_info $lang['userlevel_user'];
        }
        elseif (
$comment_row[$i][$user_table_fields['user_level']] == ADMIN) {
          
$comment_user_info $lang['userlevel_admin'];
        }

        
$comment_user_info .= "<br />";
        
$comment_user_info .= (isset($comment_row[$i][$user_table_fields['user_joindate']])) ? "<br />".$lang['join_date']." ".format_date($config['date_format'], $comment_row[$i][$user_table_fields['user_joindate']]) : "";
        
$comment_user_info .= (isset($comment_row[$i][$user_table_fields['user_comments']])) ? "<br />".$lang['comments']." ".$comment_row[$i][$user_table_fields['user_comments']] : "";
      }

      
$comment_user_ip = ($user_info['user_level'] == ADMIN) ? $comment_row[$i]['comment_ip'] : "";

      
$admin_links "";
      if (
$user_info['user_level'] == ADMIN) {
        
$admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=editcomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"_blank\">".$lang['edit']."</a>&nbsp;";
        
$admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=removecomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"_blank\">".$lang['delete']."</a>";
      }
      elseif (
$is_image_owner) {
        
$admin_links .= ($config['user_edit_comments'] != 1) ? "" "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editcomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['edit']."</a>&nbsp;";
        
$admin_links .= ($config['user_delete_comments'] != 1) ? "" "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removecomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['delete']."</a>";
      }

      
//--- Kommentar-Autor COUNTRY FLAGS ---
    
if (!class_exists("GeoIP"))
    {
      include(
ROOT_PATH."includes/geoip.inc");
    }
    
$gi geoip_open(ROOT_PATH."includes/GeoIP.dat",GEOIP_STANDARD);
    
$countries = array();
    
$cid geoip_country_code_by_addr($gi$comment_row[$i]['comment_ip']);
    if (empty(
$cid)) $cid "lan";
    
$countries[$cid] = isset($countries[$cid]) ? $countries[$cid]+1;
    
$comment_user_flag "<img src=\"".ROOT_PATH."flags/".strtolower($cid).".gif"."\" alt=\"".(($cid != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$cid]] : "Unknown or LAN")."\" border=0>";
//--- Kommentar-Autor COUNTRY FLAGS ---

      
$site_template->register_vars(array(
        
"comment_id" => $comment_row[$i]['comment_id'],
        
"comment_user_flag" => $comment_user_flag,
        
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row_comment['user_avatar'] == "") ? "blank.gif" $user_row_comment['user_avatar'])."\" name=\"icons\" border=\"0\" hspace=\"15\" alt=\"\">" "",
        
"comment_user_pm" => ($config['pm'] && $comment_row[$i]['user_id']  != GUEST && $user_info['user_level'] > GUEST && $user_info['user_id'] != $comment_row[$i]['user_id']) ? "<a href=\"".$site_sess->url(ROOT_PATH."pm.php?action=quote&mode=comment&id=".$comment_row[$i]['comment_id']."&user_id=".$comment_row[$i]['user_id'])."\" /><img src=\"".get_gallery_image("pm.gif")."\" border=\"0\" alt=\"".$lang['pm_user_pm_alt']."\" /></a>" "",
        
"comment_user_id" => $comment_user_id,
        
"comment_user_status_img" => $comment_user_status_img,
        
"comment_user_name" => $comment_user_name,
        
"comment_user_info" => $comment_user_info,
        
"comment_user_profile_button" => $comment_user_profile_button,
        
"comment_user_email" => $comment_user_email,
        
"comment_user_email_save" => $comment_user_email_save,
        
"comment_user_mailform_link" => $comment_user_mailform_link,
        
"comment_user_email_button" => $comment_user_email_button,
        
"comment_user_homepage_button" => $comment_user_homepage_button,
        
"comment_user_icq_button" => $comment_user_icq_button,
        
"comment_user_ip" => $comment_user_ip,
        
"comment_headline" => format_text($comment_row[$i]['comment_headline'], 0$config['wordwrap_comments'], 0011),
        
"comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments'], 1),
        
"comment_date" => format_date($config['date_format']." ".$config['time_format'], $comment_row[$i]['comment_date']),
        
"row_bg_number" => $row_bg_number,
        
"admin_links" => $admin_links
      
));
      
$comments .= $site_template->parse_template("comment_bit");
    } 
// end while
  
//end else
  
$site_template->register_vars("comments"$comments);
  unset(
$comments);

  
//-----------------------------------------------------
  //--- BBCode & Form -----------------------------------
  //-----------------------------------------------------
  
$allow_posting check_permission("auth_postcomment"$cat_id);
  
$bbcode "";
  if (
$config['bb_comments'] == && $allow_posting) {
    
$site_template->register_vars(array(
      
"lang_bbcode" => $lang['bbcode'],
      
"lang_tag_prompt" => $lang['tag_prompt'],
      
"lang_link_text_prompt" => $lang['link_text_prompt'],
      
"lang_link_url_prompt" => $lang['link_url_prompt'],
      
"lang_link_email_prompt" => $lang['link_email_prompt'],
      
"lang_list_type_prompt" => $lang['list_type_prompt'],
      
"lang_list_item_prompt" => $lang['list_item_prompt']
    ));
    
$bbcode $site_template->parse_template("bbcode");
  }

  if (!
$allow_posting) {
    
$comment_form "";
  }
  else {
    
$user_name = (isset($HTTP_POST_VARS['user_name']) && $error) ? format_text(trim(stripslashes($HTTP_POST_VARS['user_name'])), 2) : (($user_info['user_level'] != GUEST) ? format_text($user_info['user_name'], 2) : "");
    
$comment_headline = (isset($HTTP_POST_VARS['comment_headline']) && $error) ? format_text(trim(stripslashes($HTTP_POST_VARS['comment_headline'])), 2) : "";
    
$comment_text = (isset($HTTP_POST_VARS['comment_text']) && $error) ? format_text(trim(stripslashes($HTTP_POST_VARS['comment_text'])), 2) : "";

    
$site_template->register_vars(array(
      
"bbcode" => $bbcode,
      
"user_name" => $user_name,
      
"comment_headline" => $comment_headline,
      
"comment_text" => $comment_text,
      
"lang_post_comment" => $lang['post_comment'],
      
"lang_name" => $lang['name'],
      
"lang_headline" => $lang['headline'],
      
"lang_comment" => $lang['comment']
    ));
    
$comment_form $site_template->parse_template("comment_form");
  }
  
$site_template->register_vars("comment_form"$comment_form);
  unset(
$comment_form);
// end if allow_comments

// Admin Links
$admin_links "";
if (
$user_info['user_level'] == ADMIN) {
  
$admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("images.php?action=editimage&amp;image_id=".$image_id))."\" target=\"_blank\">".$lang['edit']."</a>&nbsp;";
  
$admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("images.php?action=removeimage&amp;image_id=".$image_id))."\" target=\"_blank\">".$lang['delete']."</a>";
}
elseif (
$is_image_owner) {
  
$admin_links .= ($config['user_edit_image'] != 1) ? "" "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editimage&amp;".URL_IMAGE_ID."=".$image_id)."\">".$lang['edit']."</a>&nbsp;";
  
$admin_links .= ($config['user_delete_image'] != 1) ? "" "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removeimage&amp;".URL_IMAGE_ID."=".$image_id)."\">".$lang['delete']."</a>";
}
$site_template->register_vars("admin_links"$admin_links);

// Update Hits
if ($user_info['user_level'] != ADMIN) {
  
$sql "UPDATE ".IMAGES_TABLE."
          SET image_hits = image_hits + 1
          WHERE image_id = 
$image_id";
  
$site_db->query($sql);
}

//-----------------------------------------------------
//---Clickstream---------------------------------------
//-----------------------------------------------------
$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."bilder.php")."\" class=\"clickstream\">".$lang['bilder']."</a>".$config['category_separator'];

if (
$mode == "lightbox" && $in_mode) {
  
$page_url "";
  if (
preg_match("/".URL_PAGE."=([0-9]+)/"$url$regs)) {
    if (!empty(
$regs[1]) && $regs[1] != 1) {
      
$page_url "?".URL_PAGE."=".$regs[1];
    }
  }
  
$clickstream .= "<a href=\"".$site_sess->url(ROOT_PATH."lightbox.php".$page_url)."\" class=\"clickstream\">".$lang['lightbox']."</a>".$config['category_separator'];
}
elseif (
$mode == "search" && $in_mode) {
  
$page_url "";
  if (
preg_match("/".URL_PAGE."=([0-9]+)/"$url$regs)) {
    if (!empty(
$regs[1]) && $regs[1] != 1) {
      
$page_url "&amp;".URL_PAGE."=".$regs[1];
    }
  }
  
$clickstream .= "<a href=\"".$site_sess->url(ROOT_PATH."search.php?show_result=1".$page_url)."\" class=\"clickstream\">".$lang['search']."</a>".$config['category_separator'];
}
else {
  
$clickstream .= get_category_path($cat_id1).$config['category_separator'];
}
$clickstream .= $image_name."</span>";

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  
"msg" => $msg,
  
"clickstream" => $clickstream,
  
"lang_category" => $lang['category'],
  
"lang_added_by" => $lang['added_by'],
  
"lang_description" => $lang['description'],
  
"lang_keywords" => $lang['keywords'],
  
"lang_date" => $lang['date'],
  
"lang_hits" => $lang['hits'],
  
"lang_downloads" => $lang['downloads'],
  
"lang_rating" => $lang['rating'],
  
"lang_votes" => $lang['votes'],
  
"lang_author" => $lang['author'],
  
"lang_comment" => $lang['comment'],
  
"lang_prev_image" => $lang['prev_image'],
  
"lang_next_image" => $lang['next_image'],
  
"lang_file_size" => $lang['file_size']
));

$site_template->print_template($site_template->parse_template($main_template));
include(
ROOT_PATH.'includes/page_footer.php');
?>

has anybody a idea???

8
hello @ all...

i allways get this
Quote
DB Error: Bad SQL Query: UPDATE 4images_users SET user_email = 'b.o.fan@freenet.de', user_showemail = 1, user_allowemails = 1, user_invisible = 0, user_homepage = 'http://www.wartenaufden15.de', user_icq = '217052007', = '', user_sex = 'm' WHERE user_id = 127
You have an error in your SQL syntax near '= '', user_sex = 'm' WHERE user_id = 127' at line 2
Error.

i have done this in my member.php

Code: [Select]
$user_skype = (isset($user_row['user_skype'])) ? $user_row['user_skype'] : REPLACE_EMPTY;
    if (!empty($user_skype) && $user_skype != REPLACE_EMPTY) {
      $user_skype_button = "<A HREF=\"CALLTO://".$user_skype."\"><IMG SRC=\"http://goodies.skype.com/graphics/skypeme_btn_small_white.gif\" BORDER=0></a>";
    }
    else {
      $user_skype_button = REPLACE_EMPTY;
    }

add this after
Code: [Select]
    $user_icq = (isset($user_row['user_icq'])) ? $user_row['user_icq'] : REPLACE_EMPTY;
    if (!empty($user_icq) && $user_icq != REPLACE_EMPTY) {
      $user_icq_button = "<a href=\"http://wwp.icq.com/scripts/search.dll?to=".$user_icq."\" target=\"_blank\"><img src=\"http://web.icq.com/whitepages/online?icq=".$user_icq."&img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"".$user_icq."\" /></a>";
    }
   
    else {
      $user_icq_button = REPLACE_EMPTY;
    }

and this

Code: [Select]
      "user_skype" => $user_skype,
      "user_skype_button" => $user_skype_button,

after:

Code: [Select]
      "user_icq" => $user_icq,
      "user_icq_button" => $user_icq_button,

this:

Code: [Select]
      "lang_skype" => $lang['skype'],after
Code: [Select]
      "lang_icq" => $lang['icq'],
this:

Code: [Select]
  $user_skype = (isset($HTTP_POST_VARS['user_skype'])) ? ((intval(trim($HTTP_POST_VARS['user_skype']))) ? intval(trim($HTTP_POST_VARS['user_skype'])) : "") : "";
Code: [Select]
$user_icq = (isset($HTTP_POST_VARS['user_icq'])) ? ((intval(trim($HTTP_POST_VARS['user_icq']))) ? intval(trim($HTTP_POST_VARS['user_icq'])) : "") : "";
and replace this

Code: [Select]
           SET ".get_user_table_field("", "user_email")." = '$user_email', ".get_user_table_field("", "user_showemail")." = $user_showemail, ".get_user_table_field("", "user_allowemails")." = $user_allowemails, ".get_user_table_field("", "user_invisible")." = $user_invisible, ".get_user_table_field("", "user_homepage")." = '$user_homepage', ".get_user_table_field("", "user_icq")." = '$user_icq', user_sex = '$user_gender'
with this:

Code: [Select]
SET ".get_user_table_field("", "user_email")." = '$user_email', ".get_user_table_field("", "user_showemail")." = $user_showemail, ".get_user_table_field("", "user_allowemails")." = $user_allowemails, ".get_user_table_field("", "user_invisible")." = $user_invisible, ".get_user_table_field("", "user_homepage")." = '$user_homepage', ".get_user_table_field("", "user_icq")." = '$user_icq', ".get_user_table_field("", "user_skype")." = '$user_skype', user_sex = '$user_gender'
and i updated my database in 4images_users with a new field user_skype VARCHAR 20.

and in the templates all is right. when i go to my database an give the in my datas hey shows my the entry. but when i will save it in the contoll panel i get the error.


can help somebody?


thx b.o.fan

9
hello,

i have seen this on a homepage.
if somebody want link a picture with the full url like this  :arrow: http://www.bruno-fischer.de/jappy/03.png there is showing not the pic like this .
it´s showing this .

how can i realise this on 4images?!?

thanx for help...

b.o.fan

10
Mods & Plugins (Requests & Discussions) / [MOD´s] on V@no´s Site
« on: June 14, 2005, 10:57:53 PM »
hello v@no and the others...

ich want too ask you somethink.

when i click on your memberlist, i can search the membernames.

and when a user is create a new account the get an new PM. with info´s of the site....

how can i do this on my site???

thankx

bofan

11
hello @ all

i have my gallery on a own bilder.php
when i look on my pic the clickstream is HOME / CATEGORY 1 / SUBCATEGORY / PIC

but i have a bilder.php.
now there should to read
HOME / BILDER / cATEGORY 1 /PIC.

you understandß

what i have to change in my bilder.php, the details.php and category.php?
must i change my main.php too?

my bilder.php u can see in the attecment.

thanx bofan

12
Hello @ all

i´ve got found this script in the web.
i want build this in into my gallery.
i think i must insert this all into the header.html

first look @ the code
Code: [Select]
<html>
<head>
<title>Test</title>
<style>

<!--

/* TestStyle fuer einigermassen konforme Anzeige ... */

caption

{

font-family: Arial;

font-size: 8pt;

TEXT-ALIGN: left;

color: #FFFFFF;

font-weight: bold;

BACKGROUND-COLOR: blue

}



TABLE

{

    BORDER-RIGHT: 0px solid;

    BORDER-TOP: 0px solid;
   
    BORDER-LEFT: 0px solid;

    WIDTH: 150px;

    BORDER-BOTTOM: 0px solid;

    BACKGROUND-COLOR: #E8E8E8;


}

TD

{

    FONT-SIZE: 8pt;

    COLOR: #0000ff;

    FONT-FAMILY: Arial;

}

-->

</style>



<script language="JavaScript">

<!--
        var bInit = false; // Initialisierung von Browser-Variablen

var bIE = false; // wenn IE

var bNS = false; // wenn Netscape

var bMouse = false; // wenn Klick rechts

var sPatentmenue = 'wartenaufden15.de'; // Menue-Ueberschrift

var sColorBackOver = '#0000FF'; // Hintergrund Menue bei Over

var sColorForeOver = '#FFFFFF'; // Vordergrund Menue bei Over

var sColorBackOut = '#E8E8E8'; // Hintergrund Menue bei Out

var sColorForeOut = '#0000FF'; // Vordergrund Menue bei Out

var nTop = 0; // Klickpunkt von oben

var nLeft = 0; // Klickpunkt von rechts

var iFensterRechts = 0; // Hilfswert fuer Sichtbarkeit

var iFensterUnten = 0; // Hilfswert fuer Sichtbarkeit





/* Browser-Variablen, Mouse usw. (ausbauen...) */

function init(StartOrStop,mouseEvent) {

switch(StartOrStop) {

case 'start':

document.body.id = 'derBody'; // Body-ID festlegen



if(navigator.appName == 'Netscape') {

bNS = true; bIE = false;

if((mouseEvent.which == 3 || mouseEvent.which == 2)) {

bMouse = true;

}

}

else {

bNS = false; bIE = true;

if((event.button == 2 || event.button == 3)) {

bMouse = true;

}

}

bInit = true;

break;



case 'stop':

bMouse = false;

bInit = false;

break;



default:

/* wozu auch immer */

alert('es ist ein Fehler bei der Initialisierung aufgetreten.\n')

break;

}

}



/* Style fuer OnMouseOver */

function KDOver(zObj) {



if(bIE) {

if(!zObj.contains(window.event.fromElement)){

zObj.bgColor = sColorBackOver;

zObj.style.color = sColorForeOver;

zObj.style.cursor = 'hand';

}

}



if(bNS) {

zObj.bgColor=sColorBackOver;

zObj.style.color = sColorForeOver;

zObj.style.cursor = 'pointer';

}

}



/* Style fuer OnMouseOut */

function KDOut(zObj) {

if(bIE) {

if (!zObj.contains(window.event.toElement)){

zObj.bgColor = sColorBackOut;

zObj.style.color = sColorForeOut;

}

}



if(bNS) {

zObj.bgColor = sColorBackOut;

zObj.style.color = sColorForeOut;

}

}



/* Menue */

function right(e) {



/* BrowserVariablen initialisieren */

if(!bInit) {init('start',e);}



/* HTML fuer DIV setzen Anfang */

var sInner = '<TABLE class=\"ABLE\" id=\"tableMenue\">';

sInner = sInner + ' <CAPTION>' + sPatentmenue + '<BR>' + 'Menü<\/CAPTION>'



sInner = sInner + ' <tr><td class=\"KD\" ' +

  ' onmouseover=\"KDOver(this);"\ ' +

  ' onmouseout=\"KDOut(this);\" ' +

  ' onclick=\"MenuTodo(\'druck\');\">' +

  ' · drucken<\/td><\/tr>';



sInner = sInner + ' <tr><td class=\"KD\" ' +

  ' onmouseover=\"KDOver(this);"\ ' +

  ' onmouseout=\"KDOut(this);\" ' +

  ' onclick=\"MenuTodo(\'zurueck\');\">' +

  ' · zurück<\/td><\/tr>';



sInner = sInner + ' <tr><td class=\"KD\" ' +

  ' onmouseover=\"KDOver(this);"\ ' +

  ' onmouseout=\"KDOut(this);\" ' +

  ' onclick=\"MenuTodo(\'refresh\');\">' +

  ' · aktualisieren<\/td><\/tr>';


                sInner = sInner + ' <tr><td KD ' +

  ' onmouseover=\"KDOver(this);"\ ' +

  ' onmouseout=\"KDOut(this);\" ' +

  ' onclick=\"MenuTodo(\'profil\');\">' +

  ' · Profil<\/td><\/tr>';
                sInner = sInner + ' <tr><td class=\"KD\"> <b>PM-Menü</b> </td></tr> <tr><td KD ' +

  ' onmouseover=\"KDOver(this);"\ ' +

  ' onmouseout=\"KDOut(this);\" ' +

  ' onclick=\"MenuTodo(\'PM\');\">' +

  ' · PM-Inbox<\/td><\/tr>';




sInner = sInner + ' <tr><td class=\"KD\" ' +

  ' onmouseover=\"KDOver(this);"\ ' +

  ' onmouseout=\"KDOut(this);\" ' +

  ' onclick=\"MenuTodo(\'abbrechen\');\">' +

  ' <B>ausblenden</B>'

  ' <\/td><\/tr>' +



'<\/TABLE>';

/* HTML fuer DIV setzen Ende */





/* Klickpunkt festlegen */

if(bNS) {

nTop = (e.pageY - 10);

nLeft = (e.pageX - 10);

iFensterRechts = (window.innerWidth - nLeft);

iFensterUnten = (window.innerHeight - nTop);

}

if(bIE) {

nTop = (window.event.y - 10);

nLeft = (window.event.x - 10);

iFensterRechts = document.body.offsetWidth - nLeft;

iFensterUnten = document.body.offsetHeight - nTop;

}



/* Sichtbarkeit rechts/unten anhand Fenstergroesse sicherstellen */

if(iFensterRechts < 150) {nLeft = (nLeft-90);}

if(iFensterUnten < 120) {nTop = (nTop-110);}





/* Netscape-Variante */

if (bNS && bMouse) {



// --- falls das Menue schon da ist, DIV ausblenden

if(document.getElementById('menue')) {

document.getElementById('menue').innerHTML = '';

}



var menue = document.createElement('div');

menue.id = 'menue';

var sHtmlDiv = document.createTextNode('');

menue.appendChild(sHtmlDiv);



var ausgabe = document.getElementById('derBody');

ausgabe.appendChild(menue);



with(document.getElementById('menue')) {

style.position = 'absolute';

style.left = nLeft;

style.top = nTop;



innerHTML = sInner;

}

}



/* IE-Variante */

if (bIE && bMouse) {



/* falls das Menue schon da ist, DIV ausblenden */

if(document.getElementById('menue')) {

document.all.menue.outerHTML = '';

}



var sHtmlDiv = '<div id=\"menue\" style=\"LEFT:'+nLeft+'px; TOP:'+nTop+'px; POSITION: absolute;\"></div>';

document.body.insertAdjacentHTML('AfterBegin',sHtmlDiv);



document.all.menue.innerHTML = sInner;

}

init('stop',e);

}



/* Funktionen fuer Menue */

function MenuTodo(what) {



if(bIE) {document.all.menue.outerHTML = '';}

if(bNS) {document.getElementById('menue').innerHTML = '';}



switch(what) {

case 'druck':

/* erweitern */

print();

break;



case 'zurueck':

/* adaequat zu zurueck in buttonframe, fuer was auch immer */

if(window.history.length == 0) {

alert('keine Seiten fuer zurueck');

}

else {window.history.back();}

break;



case 'refresh':

/* aktuelles Template neu laden */

location.reload();

break;



                         case 'profil':

                                /*      Profil anzeigen         */
                               
                                window.location.href="{url_control_panel}";
                               
                                break;

                         case 'PM':

                                /*      PM schreiben            */
                               
                                window.location.href="./pm?action=inbox";
                               
                                break;

default:

break;

}

}



/* Event Mouse */

document.onmousedown=right;



//-->

</script>
</head>
<BODY oncontextmenu="return false">

</BODY></html>

can somebody help me to create a MOD.
I think with a new right-klick-menue the Problem with the Right-Klick-Picture-Saving is away. :) or not... ???
i think the is a way, too make CUT, COPY, PASTE into the new Menu. for text... :)

// DEUTSCH

Hallo,

ich habe dieses Script im Netz gefunden und wollte es in meine Gallery einbauen.
Ich denke, ich muss das irgendwie in die header.html einbauen.

schaut euch erst mal das script an. :)
siehe oben oder im anhang [kontextmenu.zip]

Kann mir jemand dabei helfen um ggf. dann einen MOD zu erstellen?
ich denke dass man AUSSCHNEIDEN; KOPIEREN und EINFÜGEN ins neue Menu einfügen kann. :)
danke für eure hilfe.

Thx / MfG

b.o.fan

13
wo find ich die bedeutung von {thumbnail} (das ist diversen Templates). ich brauch nähmlich die Anweisung <a href ="detail.php?blabla.>

versteht ihr?!?


english.

where i can find the {thumbnail} (witch is used in Templates).

i want to have the Tag (<a href="details.php?.... ) you know...?!?


b.o.fan

14
Now, Here is my first MOD. Please not so hart, if something is not right. :?

If you want show the name of Next and Previous image on status bar than look @ this here.

Files to edit:

/templates/<YOUR_TEMPLATE>/header.html
/templates/<YOUR_TEMPLATE>/details.html
/templates/<YOUR_TEMPLATE>/category_bit.html

1.) Find in header.html

Code: [Select]
</head>
add above

Code: [Select]
<script language="JavaScript">
        function a(txt) {
                self.status = txt
        }
        function b() {
                self.status = ""
        }
</script>

2.) Find in details.html

2.1.)
Code: [Select]
<a href="{prev_image_url}">{prev_image_name}</a>
replace with

Code: [Select]
<a href="{prev_image_url}" onMouseOver="a('{prev_image_name}');return true"
onMouseOut="b()">{prev_image_name}</a>

2.2.)
Code: [Select]
<a href="{prev_image_url}">{prev_image_name}</a>
replace with

Code: [Select]
<a href="{prev_image_url}" onMouseOver="a('{next_image_name}');return true"
onMouseOut="b()">{prev_image_name}</a>

// if you show the NEXT and PREV Picture with a Tumb. You must change this. //
Like the Picure above. :)

Find this:
Code: [Select]
<a href="{prev_image_url}"><img src="{prev_thumb_file}" border="1"></a>
Replace with:
Code: [Select]
<a href="{prev_image_url}" onMouseOver="a('{prev_image_name}');return true"
onMouseOut="b()"><img src="{prev_thumb_file}" border="1"></a>

And Find:

Code: [Select]
<a href="{next_image_url}"><img src="{next_thumb_file}" border="1"></a>
Replace with:

Code: [Select]
<a href="{next_image_url}" onMouseOver="a('{next_image_name}');return true"
onMouseOut="b()"><img src="{next_thumb_file}" border="1"></a>

3. Find in category_bit.html

Code: [Select]
<a href="{cat_url}" class="maincat"><img src="{cat_image}">
Replace with:

Code: [Select]
<a href="{cat_url}" class="maincat" onMouseOver="a('{cat_name}');return true"
onMouseOut="b()"><img src="{cat_image}">

now the Category Name is shown in the Statusline too.

Now i wish you a lot of Fun.

 :D :D

b.o.fan

15
hallo.

ich habe per index.php?templates=deutschland eine .html eingefügt.

wenn meine User da drauf klicken werden sie ausgeloggt.
Problem besteht mit IE6 und Firefox (aktuelle version)
http://wartenaufden15.de/index.php
http://wartenaufden15.de/index.php?template=deutschland
teste es mit USER: test
Passwort: test


danke für eure hilfe


b.o.fan


//------------- English

hello

i have with index.php?templates=deutschland an .html included. but when the user click on the link he will be logged out. =)

the problem is with IE6 and Firefox (Newest Version)

test it http://wartenaufden15.de/index.php
with
USER: test
Password: test

look @ left menu.
and klick on DEUTSCHLAND. and see you are logged off
http://wartenaufden15.de/index.php?template=deutschland
=(



thanx for help!

b.o.fan

Pages: [1] 2