• [MOD] Per User Shouts/Guestbook V1.1 5 0 5 1
Currently:  

Author Topic: [MOD] Per User Shouts/Guestbook V1.1  (Read 46276 times)

0 Members and 1 Guest are viewing this topic.

Offline Deskcom

  • Newbie
  • *
  • Posts: 41
    • View Profile
[MOD] Per User Shouts/Guestbook V1.1
« on: August 17, 2008, 06:23:52 AM »
NOTE: Nov 26 2012
All further support and development for this addon have been moved over to Sumale.nin. Which will provide support and furture development. Thank you for all your support guys and wish you all the best of luck.


NOTE:
I been working on the script for about 2 days now, It has been tested for 1.7.6 Gallery only, no other gallery versions have been tested. If others do work. Please let me know so I may update this post. This idea was started from b.o.fan orignal design and still contains code from his design as well. So I still credit b.o.fan for the original script. I hope you enjoy.

Features:
-- Display/Post shouts on a users profile
-- Notifies you of new shouts in the Shouts Tab
-- Mark shouts that you have read in the Shouts Tab
-- Delete Controls for ease of deletion on the profile page.
-- View new shouts in the control panel.

Version Changes:
-- 1.1 Fixed guest view bug.
-- 1.0 Original Release.

More Features to come.

WARNING: PLEASE BACKUP DATABASE AND WEBSITE DATA. I can not stress this enough.


Below is a list of new files and changed files.

Changed Files:
./includes/constants.php
./includes/db_mysql.php
./includes/page_header.php
./member.php
./lang/YOUR LANG/main.php
./template/YOUR TEMPLATE/member_profile.html
./template/YOUR TEMPLATE/user_logininfo.html

New Files:
./template/YOUR TEMPLATE/user_gb_bit.html
./template/YOUR TEMPLATE/user_gb_new.html
./template/YOUR TEMPLATE/user_gb_delete.html
./template/YOUR TEMPLATE/user_gb_showgb.html

Step 1.First use you sql editor or phpmyadmin to insert this table into you database.

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;

Or download this package, place install_gd.php in your root directory and run it. It will auto install the database for you.


Step2. Open ./includes/constants.php and Find:

Code: [Select]
define('LIGHTBOXES_TABLE', $table_prefix.'lightboxes');
After it paste:
Code: [Select]
define('USERS_GB_TABLE', $table_prefix.'users_gb');


Step 3. Open ./includes/db_mysql.php and Find:

Code: [Select]
 function get_fieldname($query_id = -1, $offset) {
    if ($query_id != -1) {
      $this->query_id = $query_id;
    }
    return @mysql_field_name($this->query_id, $offset);
  }

Paste After:

Code: [Select]
 function fetch_object($offset) {
    return @mysql_fetch_object($offset);
  }



Step 4. Open ./lang/english/main.php and paste code before the ?> at the end of the file

Code: [Select]
//-----------------------------------------------------
//--- Shout Mod ---------------------------------------
//-----------------------------------------------------
$lang['user_gb'] = "Shouts from ";
$lang['user_gb_entry'] = " Shout";
$lang['user_gb_entrys'] = " Shouts";
$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 Shout-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 Shout-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 Shouts 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";
$lang['read_shout'] = "Mark as Read";



Step 5a. Open ./member.php and Find:

Code: [Select]
 }

  $sql = "DELETE FROM ".COMMENTS_TABLE."
          WHERE comment_id = $comment_id";
  $result = $site_db->query($sql);
  $msg = ($result) ? $lang['comment_delete_success'] : $lang['comment_delete_error'];
}

Paste after it:

Code: [Select]
/////////////////////////////////////////////////////////////////
if ($action == "showgb_read")
{
  $update_query = "UPDATE ".USERS_GB_TABLE." SET user_gb_read = NOW() WHERE user_id_gb =".$user_info['user_id']." AND users_gb_id = ".@$_GET['entry'];
  $sql = $site_db->query($update_query);
  $action = "showgb_new";
}
if ($action == "showgb_new")
{
    if ($user_info['user_level'] == GUEST) {
    show_error_page($lang['no_permission']);
    exit;
  }

  if($_GET['user_id'] == "") $id = $user_info[user_id]; else $id = $_GET['user_id'];
  if(isset($id))
  {
   $query = "SELECT user_id, user_name FROM ".USERS_TABLE." WHERE user_id = ".$id."";
   $sql = $site_db->query($query);
   $ds = $site_db->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."";
  $query2 = "SELECT COUNT(*) FROM ".USERS_GB_TABLE." WHERE user_id_gb = ".$abf_id."";
  $erg = $site_db->query_firstrow($query2);
  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";}
    $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." AND user_gb_read = '0000-00-00 00:00:00'
                  ORDER BY user_gb_date DESC
                  LIMIT $offset, 10";
  
  $gb_sql = $site_db->query($gb_query);
  while($ds = $site_db->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='member.php?action=showgb_read&entry=".$ds->users_gb_id."&user_id=".$ds->user_id_gb."'>".$lang['read_shout']."</a>";} else {$user_link_del ="";
    }
    if($abf_id == $user_info[user_id])
    {
      $user_gb_delete = "<a href='member.php?action=showgb_read&entry=".$ds->users_gb_id."&user_id=".$ds->user_id_gb."'>".$lang['read_shout']."</a> ".$user_link_del;
    }
    else {$user_gb_delete = $user_link_del;}

    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>";
    }


    $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,
    "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='member.php?action=showgb_new&user_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='member.php?action=showgb_new&user_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,
    "user_gb_entry" => $user_gb_entry,
    "user_gb_entry_text" => $user_gb_entry_text
  ));


  //Pageing
  if($offset == 0) {$vor = $lang['user_gb_prev'];}
  else
  {
    $offset2 = $offset - 10;
    $vor = "<a href='member.php?action=showgb_new&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='member.php?action=showgb_new&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,
    "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=member.php?action=showprofile&user_id=".$_GET['user_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=member.php?action=showprofile&user_id=".$_GET['user_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'],
    "user_id" => $_GET['user_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");
}
/////////////////////////////////////////////////////////////////



Step 5b. Find:

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://www.icq.com/people/about_me.php?uin=".$user_icq."\" target=\"_blank\"><img src=\"http://status.icq.com/online.gif?icq=".$user_icq."&img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"".$user_icq."\" /></a>";
    }
    else {
      $user_icq_button = REPLACE_EMPTY;
    }

Paste this after:

Code: [Select]
/////////////////////////////////////////////////////
  $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($_GET['user_id'] == "") $id = $user_info[user_id]; else $id = $_GET['user_id'];
  if(isset($id))
  {
   $query = "SELECT user_id, user_name FROM ".USERS_TABLE." WHERE user_id = ".$id."";
   $sql = $site_db->query($query);
   $ds = $site_db->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."";
  $query2 = "SELECT COUNT(*) FROM ".USERS_GB_TABLE." WHERE user_id_gb = ".$abf_id."";
  $erg = $site_db->query_firstrow($query2);
  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";}
    $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";

  $gb_sql = $site_db->query($gb_query);

  while($ds = $site_db->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='member.php?action=delete_entry&entry=".$ds->users_gb_id."&user_id=".$ds->user_id_gb."'>".$lang['delete']."</a>";} else {$user_link_del ="";
    }
    if($abf_id == $user_info[user_id])
    {
      $user_gb_delete = "<a href='member.php?action=delete_entry&entry=".$ds->users_gb_id."&user_id=".$ds->user_id_gb."'>".$lang[delete]."</a> ".$user_link_del;
    }
    else {$user_gb_delete = $user_link_del;}

    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='member.php?action=showprofile&user_id=".$ds->user_id."'\n target=_self><img src='".TEMPLATE_PATH."/images/gb_".$config['language_dir'].".gif' border=0></a>";
    }


    $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='member.php?action=showprofile&user_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='member.php?action=showprofile&user_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,
    "user_gb_entry" => $user_gb_entry,
    "user_gb_entry_text" => $user_gb_entry_text
  ));

  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['user_id'] == $user_info[user_id]) { $a = "NOW()";}
    else {$a = "'0000-00-00 00:00: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['user_id']."', '".$user_info[user_id]."', '".$user_info[user_name]."','".$text."', NOW(), ".$a.")";
    $sql = $site_db->query($query);

    $msg .= "<meta http-equiv=refresh content=\"5; URL=member.php?action=showprofile&user_id=".$_POST['user_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>\n
    <td><p>&nbsp;".$lang['user_gb_new_wait']."
    <a href=member.php?action=showprofile&user_id=".$_POST['user_id'].">".$lang['user_gb_new_to']."</a><br></p></td></tr></table></fieldset>";
  }
  elseif ($afg == "false")
  {
    $id = $_GET['user_id'];
  }

    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" => $user_id
    ));

    $query = "SELECT COUNT(*) FROM ".USERS_GB_TABLE." WHERE user_id_gb = ".$user_row['user_id']."";
    $erg = $site_db->query_firstrow($query);
    $user_gb_ein = $erg;

    $query = "SELECT COUNT(*) FROM ".USERS_GB_TABLE." WHERE user_id_ein = ".$user_row['user_id']."";
    $erg = $site_db->query_firstrow($query);
    $user_gb_ge = $erg;


    $user_gb_link = "<a href='member.php?action=showprofile&user_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
    ));
///////////////////////////////////////////////



Step 6a. Open ./include/page_header.php and Find:

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

Code: [Select]
 "url_own_gb" => (!empty($url_own_gb)) ? $site_sess->url($url_own_gb) : $site_sess->url(ROOT_PATH."member.php?action=showgb_new"),


Step 6b. 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);
}

Paste After it:

Code: [Select]
//////////////////////////////////////////////
$query = "SELECT COUNT(*) FROM ".USERS_GB_TABLE."
          WHERE user_id_gb = ".$user_info['user_id']."
          AND user_gb_read = '0000-00-00 00:00:00'";
$erg = $site_db->query_firstrow($query);
  if($erg == "0"){$user_gb_neu = $lang['user_gb_entry']."(".$erg.")";}
  elseif($erg == "1"){$user_gb_neu = $lang['user_gb_entrys']."<b>(".$erg.")</b>";}
  elseif($erg > "1"){$user_gb_neu = $lang['user_gb_entrys']."<b>(".$erg.")</b>";}

////////////////////////////////////////////////



Step 6c. Find:

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

Code: [Select]
 "lang_own_gb" => $user_gb_neu,


Step 7. Open ./template/YOUR TEMPLATE/user_logininfo.html and Find:

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

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


Step 8a. Open ./template/YOUR TEMPLATE/member_profile.html and Find:

Code: [Select]
       <tr>
          <td class="row1"><b>{lang_comments}</b></td>
          <td class="row1">{user_comments}</td>
        </tr>

Paste after it:

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>



Step 8b. Paste this at the end of your member_profile.html

Code: [Select]
<br />
<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%></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>
<br />
<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=showprofile&ent=true&user_id={user_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=user_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>

Step 9. Download the attached file containing the 4 new files and place them in you ./template/YOUR TEMPLATE/ folder. And that should be it. An y changes to the script post here and I will test and get it updated. Hope you enjoy and thanks again b.o.fan for the original idea.
« Last Edit: November 26, 2012, 03:57:28 PM by Deskcom »

Offline sigma.

  • Full Member
  • ***
  • Posts: 148
  • cydonian.com/potd
    • View Profile
    • sigma's gallery
Re: [MOD] Per User Shouts/Guestbook V1.0
« Reply #1 on: August 17, 2008, 07:03:37 AM »
Very cool Idea. Its like a Facebook wall for your 4images Profile.
I will give it a test.

Offline Benny Change

  • Addicted member
  • ******
  • Posts: 1.788
  • #WWG1WGA
    • View Profile
    • Qlobal-Change
Re: [MOD] Per User Shouts/Guestbook V1.0
« Reply #2 on: August 17, 2008, 02:38:03 PM »
NICE!!!!!!!!!!!!
NICE!!!!!!!!!!!!

more of that :D
Beste Grüße
Benny

SnaFy

  • Guest
Re: [MOD] Per User Shouts/Guestbook V1.0
« Reply #3 on: August 17, 2008, 03:04:13 PM »
so hot man this mod

thanks.

Offline sigma.

  • Full Member
  • ***
  • Posts: 148
  • cydonian.com/potd
    • View Profile
    • sigma's gallery
Re: [MOD] Per User Shouts/Guestbook V1.0
« Reply #4 on: August 17, 2008, 04:25:14 PM »
so how does one do step 1 in phpmyadmin?
I know i could do each individually but how can i do them all at once?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Per User Shouts/Guestbook V1.0
« Reply #5 on: August 17, 2008, 04:52:58 PM »
so how does one do step 1 in phpmyadmin?
I know i could do each individually but how can i do them all at once?
In phpmyadmin select your 4images database, then you should see SQL tab on top
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline sigma.

  • Full Member
  • ***
  • Posts: 148
  • cydonian.com/potd
    • View Profile
    • sigma's gallery
Re: [MOD] Per User Shouts/Guestbook V1.0
« Reply #6 on: August 23, 2008, 08:02:21 PM »
works great. thank you!

Offline sigma.

  • Full Member
  • ***
  • Posts: 148
  • cydonian.com/potd
    • View Profile
    • sigma's gallery
Re: [MOD] Per User Shouts/Guestbook V1.0
« Reply #7 on: August 23, 2008, 09:13:16 PM »
Question /  Request

I would like to display the users Avatar like the comment_bit.html but it only displays the avatar for that user, not from other users.

{user_avatar_current} does not seem to work correctly inside the user_gb_bit.html

Also another idea. How about an email notification when someone posts on your profile?
« Last Edit: August 24, 2008, 12:48:30 AM by sigma. »

Offline Deskcom

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: [MOD] Per User Shouts/Guestbook V1.0
« Reply #8 on: September 03, 2008, 02:20:00 AM »
Please disclose what mod you are using for the avatar and i will be able to look into it

Offline Dirk_K

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: [MOD] Per User Shouts/Guestbook V1.0
« Reply #9 on: September 07, 2008, 11:13:58 AM »
Hallo,

ich kenne mich nicht so aus und habe hier im Forum auch schon versucht eine Lösung zu finden.

Das Problem fängst schon bei der Erstellung der Tabelle an...was mache ich falsch?
Habe mal ein Screen anbei
img src="http://mitglied.lycos.de/wenighaare/ebay/tabelle.jpg"

Wenn ich auf speichern gehe kommt diese fehlermeldung
img src="http://mitglied.lycos.de/wenighaare/ebay/tabelle01.jpg"

Offline Deskcom

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: [MOD] Per User Shouts/Guestbook V1.0
« Reply #10 on: September 07, 2008, 11:36:50 AM »
I have made an installer to install the database. place install_gd.php in your root directory and run it. It will auto install the database for you.

Offline Benny Change

  • Addicted member
  • ******
  • Posts: 1.788
  • #WWG1WGA
    • View Profile
    • Qlobal-Change
Re: [MOD] Per User Shouts/Guestbook V1.0
« Reply #11 on: September 07, 2008, 01:03:00 PM »
@ Dirk,

wenn dein Problem weiterhin besteht, nutze dieses:
http://www.4homepages.de/forum/index.php?action=dlattach;topic=22492.0;attach=3772

Lade es in deinem Root Verzeichnis und führe es aus!
Beste Grüße
Benny

Offline Dirk_K

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: [MOD] Per User Shouts/Guestbook V1.0
« Reply #12 on: September 07, 2008, 03:38:44 PM »
vielen dank für die schnelle Hilfe.
Thank you for the quick help

Habe die Dateien alle wie beschrieben geändert.Wenn ich jetzt die install_gd aufrufe kommt danach dann diese Fehlermeldung

Warning: mysql_result(): supplied argument is not a valid MySQL result resource in F:\xampp\htdocs\4images\includes\page_header.php on line 147


wäre nett wenn ihr mir da noch mal helfen könntet

Danke und Grüße Dirk

Offline Deskcom

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: [MOD] Per User Shouts/Guestbook V1.0
« Reply #13 on: September 10, 2008, 12:18:10 AM »
Please post your page_header.php file and any mods that are installed in your gallery

Offline Dirk_K

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: [MOD] Per User Shouts/Guestbook V1.0
« Reply #14 on: September 10, 2008, 05:06:43 PM »
I am grateful to have the problem resolved itself already