Author Topic: [MOD] User-Guestbook / User-Gästebuch V1.0.2[beta]  (Read 246841 times)

0 Members and 1 Guest are viewing this topic.

b.o.fan

  • Guest
[MOD] User-Guestbook / User-Gästebuch V1.0.2[beta]
« on: August 14, 2006, 07:28:46 PM »
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 ;)
« Last Edit: August 21, 2007, 11:39:33 AM by KurtW »

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [MOD] USER-GUESTBOOK / USER-GÄSTEBUCH [BETHA]
« Reply #1 on: August 14, 2006, 07:44:24 PM »
AWESOME !!!!!!!!!!!!!!!!!!!!!!

Great work !!!!!  :mrgreen:

b.o.fan

  • Guest
Re: [MOD] USER-GUESTBOOK / USER-GÄSTEBUCH [BETHA]
« Reply #2 on: August 14, 2006, 07:49:40 PM »
AWESOME !!!!!!!!!!!!!!!!!!!!!!

Great work !!!!!  :mrgreen:

dit it work??

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [MOD] USER-GUESTBOOK / USER-GÄSTEBUCH [BETHA]
« Reply #3 on: August 14, 2006, 08:05:18 PM »
Well seems yes :)

when i get it done , i ill give you my site link (pm) for you see by yourself :)

b.o.fan

  • Guest
Re: [MOD] USER-GUESTBOOK / USER-GÄSTEBUCH [BETHA]
« Reply #4 on: August 14, 2006, 08:11:37 PM »
ok. send it me ;)

i wait only for a feedback from V@no or Jan, or mawenzi ;)


Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [MOD] USER-GUESTBOOK / USER-GÄSTEBUCH [BETHA]
« Reply #5 on: August 14, 2006, 08:29:05 PM »
well this work great :D

now ill be nice make userpic show there :)

[solved] ....  :lol:

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [MOD] USER-GUESTBOOK / USER-GÄSTEBUCH [BETHA]
« Reply #6 on: August 14, 2006, 08:32:18 PM »
Just one little suggestion.

I didn't looked at the code in detail,
but wouldn't it be better to split html and php code to templates,
so layout changes could be done more easily?
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

b.o.fan

  • Guest
Re: [MOD] USER-GUESTBOOK / USER-GÄSTEBUCH [BETHA]
« Reply #7 on: August 14, 2006, 08:33:05 PM »
well this work great :D

now ill be nice make userpic show there :)

only uncomment the this

Code: [Select]
    //if installed PERSONAL_PHOTO FROM V@noyou can uncomment
    //if(file_exists(ROOT_PATH."data/userpic/".$ds->user_id_ein.".gif")) {$user_gb_entry_text .= "<br><a href='gb.php?action=showgb&id=".$ds->user_id."'\n target=_self><img src='".ROOT_PATH."/data/userpic/".$ds->user_id_ein.".gif' width=90px></a><br>";}
    //if(file_exists(ROOT_PATH."data/userpic/".$ds->user_id_ein.".jpg")) {$user_gb_entry_text .= "<br><a href='gb.php?action=showgb&id=".$ds->user_id."'\n target=_self><img src='".ROOT_PATH."/data/userpic/".$ds->user_id_ein.".jpg' width=90px></a><br>";}
    //else $user_gb_entry_text .= "<br>";

it is not THE best solution...but it works ;)

b.o.fan

  • Guest
Re: [MOD] USER-GUESTBOOK / USER-GÄSTEBUCH [BETHA]
« Reply #8 on: August 14, 2006, 08:33:49 PM »
Just one little suggestion.

I didn't looked at the code in detail,
but wouldn't it be better to split html and php code to templates,
so layout changes could be done more easily?

it's my first MOD...

i hope somebody help me to make it fine :)

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [MOD] USER-GUESTBOOK / USER-GÄSTEBUCH [BETHA]
« Reply #9 on: August 14, 2006, 08:40:25 PM »
Just one little suggestion.

I didn't looked at the code in detail,
but wouldn't it be better to split html and php code to templates,
so layout changes could be done more easily?

yea would be more easy to edit :)

script  works fine, its more about "layout" :)

b.o.fan

  • Guest
Re: [MOD] USER-GUESTBOOK / USER-GÄSTEBUCH [BETHA]
« Reply #10 on: August 14, 2006, 08:42:28 PM »
can i see yours??


 :lol: :lol:

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [MOD] User-Guestbook / User-Gästebuch [betha]
« Reply #11 on: August 14, 2006, 09:17:01 PM »
I think i need help about make it look like my layout ...

comments rows (commentrow$row_bg_counter) like in details... :roll:

b.o.fan

  • Guest
Re: [MOD] User-Guestbook / User-Gästebuch [betha]
« Reply #12 on: August 14, 2006, 09:19:19 PM »
I think i need help about make it look like my layout ...

comments rows (commentrow$row_bg_counter) like in details... :roll:
i dont understand...

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [MOD] User-Guestbook / User-Gästebuch [betha]
« Reply #13 on: August 14, 2006, 09:22:04 PM »
I think i need help about make it look like my layout ...

comments rows (commentrow$row_bg_counter) like in details... :roll:
i dont understand...

alternate comments row / background colors :) like in details :)

b.o.fan

  • Guest
Re: [MOD] User-Guestbook / User-Gästebuch [betha]
« Reply #14 on: August 14, 2006, 09:27:12 PM »
I think i need help about make it look like my layout ...

comments rows (commentrow$row_bg_counter) like in details... :roll:
i dont understand...

alternate comments row / background colors :) like in details :)

yeah and that is the problem, i have it not make it with templates... :(
sorry. when somebody with enough knowledge to help me, to make a better version ;)

PS: great site ;)