4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: funpersian on April 14, 2005, 09:53:08 AM

Title: [MOD] guestbook
Post by: funpersian on April 14, 2005, 09:53:08 AM
hi all
::;recovery cache google:::


this is MOD by chlee

I created a guest book page. Administrator can specify if guests are allowed to view, post, edit, delete the guestbook entries. The edit and delete function was ip oriented. You could take a look and try it over  Feel free to sign my guestbook but please don't register unless you are a medical specialist and are willing to share you medical images for educational purpose.

First, created a new file guestbook.php in your root directory

Code:
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                                                  * 
 *                                                                        * 
 *    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 'guestbook'
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 (
$config['guestbook_view'] != 1) { 
  
header("Location: ".$site_sess->url(ROOT_PATH."index.php")); 
  exit; 


if (
$action == "") { 
   
$action "showcomments"


if (isset(
$HTTP_GET_VARS[URL_COMMENT_ID]) || isset($HTTP_POST_VARS[URL_COMMENT_ID])) { 
  
$comment_id = (isset($HTTP_GET_VARS[URL_COMMENT_ID])) ? intval($HTTP_GET_VARS[URL_COMMENT_ID]) : intval($HTTP_POST_VARS[URL_COMMENT_ID]); 

else { 
  
$comment_id 0

if (
$action == "deletecomment") { 
  if (!
$comment_id || ($config['user_delete_guestbook'] != && $user_info['user_level'] != ADMIN)) { 
    
show_error_page($lang['no_permission']); 
    exit; 
  } 
  
  
$sql "SELECT comment_id, comment_ip 
          FROM "
.GUESTBOOK_TABLE.
          WHERE comment_id = 
$comment_id"
  
$comment_row $site_db->query_firstrow($sql); 
  if (!
$comment_row || ($comment_row['comment_ip'] != $session_info['session_ip'] && $user_info['user_level'] != ADMIN)) { 
    
show_error_page($lang['no_permission']); 
    exit; 
  } 
  
  
$txt_clickstream $lang['comment_delete']; 
  
  
$sql "DELETE FROM ".GUESTBOOK_TABLE.
          WHERE comment_id = 
$comment_id"
  
$result $site_db->query($sql); 
  
  
$msg = ($result) ? $lang['comment_delete_success'] : $lang['comment_delete_error']; 


if (
$action == "removecomment") { 
  if (!
$comment_id || ($config['user_delete_guestbook'] != && $user_info['user_level'] != ADMIN)) { 
    
header("Location: ".$site_sess->url($url"&")); 
    exit; 
  } 

  
$sql "SELECT comment_id, user_name AS comment_user_name, comment_site, comment_text, comment_ip 
          FROM "
.GUESTBOOK_TABLE.
          WHERE comment_id = 
$comment_id"
  
$comment_row $site_db->query_firstrow($sql); 
  if (!
$comment_row || ($comment_row['comment_ip'] != $session_info['session_ip'] && $user_info['user_level'] != ADMIN)) { 
    
header("Location: ".$site_sess->url($url"&")); 
    exit; 
  } 

  
$txt_clickstream $lang['comment_delete']; 
  
$comment_user_name $comment_row['comment_user_name']; 
  
  
$site_template->register_vars(array( 
    
"comment_id" => $comment_id
    
"comment_user_name" => htmlspecialchars($comment_user_name), 
    
"comment_site" => format_text($comment_row['comment_site'], 0$config['wordwrap_comments'], 00), 
    
"comment_text" => format_text($comment_row['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']), 
    
"lang_delete_comment" => $lang['comment_delete'], 
    
"lang_delete_comment_confirm" => $lang['comment_delete_confirm'], 
    
"lang_name" => $lang['name'], 
    
"lang_site" => $lang['site'], 
    
"lang_comment" => $lang['comment'], 
    
"lang_submit" => $lang['submit'], 
    
"lang_reset" => $lang['reset'], 
    
"lang_yes" => $lang['yes'], 
    
"lang_no" => $lang['no'
  )); 
  
$contents $site_template->parse_template("guestbook_deletecomment"); 


if (
$action == "updatecomment") { 
  if (!
$comment_id || ($config['user_edit_guestbook'] != && $user_info['user_level'] != ADMIN)) { 
    
show_error_page($lang['no_permission']); 
    exit; 
  } 
  
$sql "SELECT comment_id, comment_ip 
          FROM "
.GUESTBOOK_TABLE."  
          WHERE comment_id = 
$comment_id"
  
$comment_row $site_db->query_firstrow($sql); 
  if (!
$comment_row || ($comment_row['comment_ip'] != $session_info['session_ip'] && $user_info['user_level'] != ADMIN)) { 
    
show_error_page($lang['no_permission']); 
    exit; 
  } 
  
  
$txt_clickstream $lang['comment_edit']; 
  
  
$error 0
  
  
$comment_site un_htmlspecialchars(trim($HTTP_POST_VARS['comment_site'])); 
  
$comment_text un_htmlspecialchars(trim($HTTP_POST_VARS['comment_text'])); 
  
$comment_user_name un_htmlspecialchars(trim($HTTP_POST_VARS['comment_user_name'])); 
  
  if (
$comment_user_name == "")  { 
      
$msg .= (($msg != "") ? "<br />" "").$lang['name_required']; 
      
$error 1
    } elseif (
$site_db->not_empty("SELECT user_name FROM "
                              
GUESTBOOK_TABLE
                           
" WHERE user_name= '".strtolower($comment_user_name)."' AND comment_date > ".(time()-60 60 24))) { 
      
$msg .= (($msg != "") ? "<br />" "").$lang['username_exists']; 
      
$error 1
   } 
    if (
$comment_text == "")  { 
      
$msg .= (($msg != "") ? "<br />" "").$lang['comment_required']; 
      
$error 1
    } 

   if (!
$error)  { 
      if (
$comment_site =="http://") { 
         
$comment_site ""
      } 
      
$sql "UPDATE ".GUESTBOOK_TABLE.
               SET comment_site = '
$comment_site', comment_text = '$comment_text', user_name= '$comment_user_name
            WHERE comment_id = 
$comment_id"
      
$result $site_db->query($sql); 
      
$msg = ($result) ? $lang['comment_edit_success'] : $lang['comment_edit_error']; 
   } else { 
      
$action "editcomment"
      
$sendprocess 1
   } 


if (
$action == "editcomment") { 
  if (!
$comment_id || ($config['user_edit_guestbook'] != && $user_info['user_level'] != ADMIN)) { 
    
show_error_page($lang['no_permission']); 
    exit; 
  } 

  
$sql "SELECT comment_id, user_name AS comment_user_name, comment_site, comment_text, comment_ip 
          FROM "
.GUESTBOOK_TABLE.
        WHERE comment_id = 
$comment_id"
  
$comment_row $site_db->query_firstrow($sql); 
  if (!
$comment_row || ($comment_row['comment_ip'] != $session_info['session_ip'] && $user_info['user_level'] != ADMIN)) { 
    
show_error_page($lang['no_permission']); 
    exit; 
  } 
  
  
$txt_clickstream $lang['comment_edit']; 

  
$comment_site = (isset($HTTP_POST_VARS['comment_site'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['comment_site']))) : (empty($comment_row['comment_site']) ? "http://" $comment_row['comment_site']); 
  
$comment_text = (isset($HTTP_POST_VARS['comment_text'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['comment_text']))) : $comment_row['comment_text']; 
  
$comment_user_name = (isset($HTTP_POST_VARS['comment_user_name'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['comment_user_name']))) : $comment_row['comment_user_name']; 

  
$bbcode ""
  if (
$config['bb_comments'] == 1) { 
    
$site_template->register_vars(array( 
      
"lang_bbcode" => $lang['bbcode'], 
     
"smiles_text" => get_smiles_text(), 
      
"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( 
    
"bbcode" => $bbcode
    
"comment_id" => $comment_id
    
"comment_user_name" => htmlspecialchars($comment_user_name), 
    
"comment_site" => htmlspecialchars($comment_site), 
    
"comment_text" => htmlspecialchars($comment_text), 
    
"lang_edit_comment" => $lang['comment_edit'], 
    
"lang_name" => $lang['name'], 
    
"lang_site" => $lang['site'], 
    
"lang_comment" => $lang['comment'], 
    
"lang_submit" => $lang['submit'], 
    
"lang_reset" => $lang['reset'], 
    
"lang_yes" => $lang['yes'], 
    
"lang_no" => $lang['no'], 
  )); 
  
$contents $site_template->parse_template("guestbook_editcomment"); 


//----------------------------------------------------- 
//--- Save Comment ------------------------------------ 
//----------------------------------------------------- 
$error 0
if (
$action == "postcomment" && $config['guestbook_post'] == 1) { 
    
$comment_user_name un_htmlspecialchars(trim($HTTP_POST_VARS['comment_user_name'])); 
    
$comment_text un_htmlspecialchars(trim($HTTP_POST_VARS['comment_text'])); 
   
$comment_site un_htmlspecialchars(trim($HTTP_POST_VARS['comment_site'])); 
    
// Flood Check 
   
$sql "SELECT comment_ip, comment_date 
              FROM "
.GUESTBOOK_TABLE.
         WHERE comment_ip = '"
.$session_info['session_ip']."'  
         ORDER BY comment_date DESC 
         LIMIT 1"

   
$spam_row $site_db->query_firstrow($sql); 
   
$spamtime $spam_row['comment_date'] + 360

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

   if (
$comment_user_name == "")  { 
      
$msg .= (($msg != "") ? "<br />" "").$lang['name_required']; 
      
$error 1
    } elseif (
$site_db->not_empty("SELECT user_name FROM "
                              
GUESTBOOK_TABLE
                           
" WHERE user_name= '".strtolower($comment_user_name)."' AND comment_date > ".(time()-60 60 24))) { 
      
$msg .= (($msg != "") ? "<br />" "").$lang['username_exists']; 
      
$error 1
   } 
    if (
$comment_text == "")  { 
      
$msg .= (($msg != "") ? "<br />" "").$lang['comment_required']; 
      
$error 1
    } 

   if (!
$error)  { 
      if (
$comment_site =="http://") { 
         
$comment_site ""
      } 
      
$sql "INSERT INTO ".GUESTBOOK_TABLE.
               (user_name, comment_site, comment_text, comment_ip, comment_date) 
            VALUES 
            ('
$comment_user_name', '$comment_site', '$comment_text', '".$session_info['session_ip']."', ".time().")"
      
$site_db->query($sql); 
   } 
   unset(
$spam_row); 



//----------------------------------------------------- 
//---Show Guestbook Comments--------------------------- 
//----------------------------------------------------- 

if (($action == "showcomments" || $action == "postcomment" ) && $config['guestbook_view'] == 1) { 
     if (isset(
$HTTP_POST_VARS['commentsetperpage']) || isset($HTTP_GET_VARS['commentsetperpage'])) { 
      
$commentsetperpage = (intval($HTTP_POST_VARS['commentsetperpage']) ) ? intval($HTTP_POST_VARS['commentsetperpage']) : intval($HTTP_GET_VARS['commentsetperpage']); 
      if (
$commentsetperpage) { 
         
$site_sess->set_session_var("commentperpage"$commentsetperpage); 
         
$session_info['commentperpage'] = $commentsetperpage
      } 
   } 

   if (isset(
$session_info['commentperpage'])) { 
      
$commentperpage $session_info['commentperpage']; 
   } else { 
      
$commentperpage 8
   } 
  
   
$sql "SELECT COUNT(user_name) AS comments 
          FROM "
.GUESTBOOK_TABLE
   
$result $site_db->query_firstrow($sql); 
   
$num_comments $result['comments']; 
   
$site_db->free_result(); 
   
$num_rows_all = (isset($num_comments)) ? $num_comments 0
   
$link_arg $site_sess->url(ROOT_PATH."guestbook.php");  
   include_once(
ROOT_PATH.'includes/paging.php'); 
   
$getpaging = new Paging($page$commentperpage$num_rows_all$link_arg); 
   
$offset $getpaging->get_offset(); 
   
$site_template->register_vars(array( 
        
"paging" => $getpaging->get_paging(), 
      
"paging_stats" => $getpaging->get_paging_stats() 
   )); 

   
$sql "SELECT comment_id, user_name AS comment_user_name, comment_site, comment_text, comment_ip, comment_date 
         FROM "
.GUESTBOOK_TABLE.
         ORDER BY comment_date DESC 
         LIMIT 
$offset$commentperpage"
  
   
$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); 
   
$comments ""
    
   
$site_template->register_vars(array( 
        
"lang_guest_from" => $lang['guest_from'], 
      
"lang_guest_site" => $lang['guest_site'
   )); 
   if (
$num_comments) { 
      
$bgcounter 0
      for (
$i 0$i $num_comments$i++) { 
         
$row_bg_number = ($bgcounter++ % == 0) ? 2

         
$comment_user_name htmlspecialchars($comment_row[$i]['comment_user_name']); 
         
$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."guestbook.php?action=editcomment&amp;comment_id="
                                         
$comment_row[$i]['comment_id']). 
                          
"\" target=\"admin_edit\">".$lang['edit']."</a>&nbsp;"
            
$admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."guestbook.php?action=removecomment&amp;comment_id=".$comment_row[$i]['comment_id'])."\" target=\"admin_edit\">".$lang['delete']."</a>"
         } elseif (
$comment_row[$i]['comment_ip'] == $session_info['session_ip']) { // if ip equals, permit to edit 
            
$admin_links .= ($config['user_edit_guestbook'] != 1) ? "" 
                          
"<a href=\"".$site_sess->url(ROOT_PATH."guestbook.php?action=editcomment&amp;comment_id=".$comment_row[$i]['comment_id'])."\" target=\"admin_edit\">".$lang['edit']."</a>&nbsp;"
            
$admin_links .= ($config['user_delete_guestbook'] != 1) ? "" 
                          
"<a href=\"".$site_sess->url(ROOT_PATH."guestbook.php?action=removecomment&amp;comment_id=".$comment_row[$i]['comment_id'])."\" target=\"admin_edit\">".$lang['delete']."</a>"
         } 
         
$site_template->register_vars(array( 
            
"comment_id" => $comment_row[$i]['comment_id'], 
            
"comment_user_name" => $comment_user_name
            
"comment_user_ip" => $comment_user_ip
            
"comment_site" => format_text($comment_row[$i]['comment_site'], 0$config['wordwrap_comments'], 00), 
            
"comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']), 
            
"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("guestbook_comment_bit"); 
          
      } 
// end for 
   
} else { 
      
$comments $lang['be_the_first']; 
   } 
   
//---End Show Guestbook Comments---- 


  //----------------------------------------------------- 
  //--- BBCode & Form ----------------------------------- 
  //----------------------------------------------------- 
  
$bbcode ""
  if (
$config['bb_comments'] == 1) { 
    
$site_template->register_vars(array( 
      
"lang_bbcode" => $lang['bbcode'], 
     
"smiles_text" => get_smiles_text(), 
      
"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 (
$config['guestbook_post'] != 1) { 
     
$comment_form ""
  } else { 
  
$comment_user_name = (isset($HTTP_POST_VARS['comment_user_name']) && $error) ? stripslashes(htmlspecialchars(trim($HTTP_POST_VARS['comment_user_name']))) : (($user_info['user_level'] != GUEST) ? htmlspecialchars($user_info['user_name']) : ""); 
  
$comment_site = (isset($HTTP_POST_VARS['comment_site']) && $error) ? stripslashes(htmlspecialchars(trim($HTTP_POST_VARS['comment_site']))) : "http://"

  
$site_template->register_vars(array( 
     
"bbcode" => $bbcode
      
"comment_user_name" => $comment_user_name
      
"comment_site" => $comment_site
      
"comment_text" => $comment_text
      
"lang_post_guestbook" => $lang['post_guestbook'], 
      
"lang_name" => $lang['name'], 
      
"lang_site" => $lang['site'], 
      
"lang_comment" => $lang['comment'
    )); 
    
$comment_form $site_template->parse_template("guestbook_form"); 
   
$site_template->register_vars("guestbook_form"$comment_form); 
   
$contents $site_template->parse_template("guestbook_showcomments"); 
   unset(
$comment_form); 
  } 
// end if allow_comments 
  
$txt_clickstream $lang['post_guestbook']; 


//----------------------------------------------------- 
//---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."guestbook.php?action=showcomments")."\">".$lang['guestbook']."</a>".$config['category_separator'].$txt_clickstream."</span>"

//----------------------------------------------------- 
//--- Print Out --------------------------------------- 
//----------------------------------------------------- 
$site_template->register_vars(array( 
  
"contents" => $contents
  
"guestbook_comments" => $comments
  
"lang_sign_my_guestbook" => $lang['sign_my_guestbook'], 
  
"msg" => $msg
  
"clickstream" => $clickstream 
)); 
unset(
$contents); 
$site_template->print_template($site_template->parse_template($main_template)); 
include(
ROOT_PATH.'includes/page_footer.php'); 

?>


Then open lang/your_lang/main.php and add these definitions

code:
Code: [Select]
$lang['guestbook'] = "GuestBook";
$lang['site'] = "Your Homepage:";
$lang['post_guestbook'] = "Sign our GuestBook";
$lang['sign_my_guestbook'] = "Please sign our GuestBook";
$lang['be_the_first'] = "Be the first to sign our GuestBook";
$lang['guest_site'] = "Homepage:";
$lang['guest_from'] = "From:";


And these into lang/your_lang/admin.php

code:
Code: [Select]
/*-- Setting-Group 11 --*/
$setting_group[11]="GuestBook";
$setting['guestbook_view'] = "Allow view GuestBook";
$setting['guestbook_post'] = "Allow post GuestBook";
$setting['user_delete_guestbook'] = "Allow delete post in GuestBook";
$setting['user_edit_guestbook'] = "Allow edit post in GuestBook";

Find this in admin/settings.php

Code:
Code: [Select]
show_form_footer($lang['save_changes'], "", 2);
Add these before it
Code:
Code: [Select]
 show_table_separator($setting_group[11], 2, "#setting_group_11");
  show_setting_row("guestbook_view", "radio");
  show_setting_row("guestbook_post", "radio");
  show_setting_row("user_edit_guestbook", "radio");
  show_setting_row("user_delete_guestbook", "radio");
 


NOTICE: You might need to change the 11 in above code.

Open includes/constants.php and find
Code:
Code: [Select]
// URL Parameters
 


Add these before it
Code:
Code: [Select]
define('GUESTBOOK_TABLE', $table_prefix.'guestbook');
 


Open includes/page_header.php and find
Code:
Code: [Select]
"url_categories" => $site_sess->url(ROOT_PATH."categories.php"),
 


Add this after it
Code:
Code: [Select]
"url_guestbook" => (!empty($url_guestbook)) ? $site_sess->url($url_guestbook) : $site_sess->url(ROOT_PATH."guestbook.php"),
 


Now you need several new template html files. You might need to modify these to make it beautifully incoporated into your site because I am not using a standard theme.

templates/your_template/guestbook.html
Code:
Code: [Select]
{header}
{if msg}<br /><b>{msg}</b>{endif msg}

<br />
{contents}

<br />

{footer}
 


Or just copy the member.html and change the tag {content} to {contents}.

templates/your_template/guestbook_form.html
Code:
Code: [Select]
<script language="JavaScript" src="bbcode.js" type="text/javascript"></script>
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
        <tr>
          <td valign="top" class="row1" width="100%">
            <form name="commentform" action="{self}#comments" method="post" onSubmit="return checkForm(this)">
              <table cellpadding="4" cellspacing="0" border="0">
              <tr>
                  <td width="90"><b>{lang_name}</b></td>
                  <td>
                    <input type="text" name="comment_user_name" size="40" value="{comment_user_name}" class="commentinput" />
                  </td>
                </tr>
                <tr>
                  <td width="90"><b>{lang_site}</b></td>
                  <td>
                    <input type="text" name="comment_site" size="40" value="{comment_site}" class="commentinput" />
                  </td>
                </tr>
                <tr>
                  <td width="90" valign="top"><b>{lang_comment}</b></td>
                  <td>
                    <textarea name="comment_text" cols="85" rows="10" class="commenttextarea" wrap="virtual" onSelect="storeCaret(this);" onClick="storeCaret(this);" onKeyUp="storeCaret(this);">{comment_text}</textarea>
                  </td>
                </tr>
            <tr>
                  <td width="90" valign="top">&nbsp;</td>
                  <td>{bbcode}</td>
                </tr>
                <tr>
                  <td width="90" valign="top">&nbsp;</td>
                  <td>
                    <input type="hidden" name="action" value="postcomment" />
                    <input type="hidden" name="id" value="{image_id}" />
                    <input type="submit" name="postbutton" value="{lang_post_guestbook}" class="button" />
                  </td>
                </tr>
              </table>
            </form>
          </td>
        </tr>
      </table>
 

templates/your_template/guestbook_editcomment.html
Code:
Code: [Select]
<script language="JavaScript" src="bbcode.js" type="text/javascript"></script>
<form name="commentform" action="{url_guestbook}" method="post" onsubmit="uploadbutton.disabled=true;">
  <input type="hidden" name="action" value="updatecomment" />
  <input type="hidden" name="comment_id" value="{comment_id}" />

<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="cat" colspan="2">{lang_edit_guestbook}</td>
</tr>

<tr>
  <td class="row2"><b>{lang_name}</b></td>
  <td class="row2">
    <input type="text" name="comment_user_name" size="30" value="{comment_user_name}" class="commentinput" />
  </td>
</tr>
<tr>
  <td class="row2"><b>{lang_site}</b></td>
  <td class="row2">
    <input type="text" name="comment_site" size="30" value="{comment_site}" class="commentinput" />
  </td>
</tr>
<tr>
  <td class="row1" valign="top"><b>{lang_comment}</b></td>
  <td class="row1">
    <textarea name="comment_text" cols="30" rows="10" wrap="virtual" class="commenttextarea"
      onSelect="storeCaret(this);" onClick="storeCaret(this);" onKeyUp="storeCaret(this);">{comment_text}</textarea>
  </td>
</tr>
<tr>
  <td class="row2" valign="top">&nbsp;</td>
  <td class="row2">{bbcode}</td>
</tr>
<tr>
<td class="cat" colspan="2">
  <p align="center">
    <input type="submit" name="uploadbutton" value="{lang_submit}" class="button" />
    <input type="reset" value="{lang_reset}" class="button" />
  </p>
</td>
</tr>
</table>
</form>
 

templates/your_template/guestbook_showcomments.html
Code:
Code: [Select]
<table width="100%" border="0" cellspacing="1" cellpadding="6" class="forumline">
    <tr>
        <td align="left" class="cat" width="100%" >{lang_sign_my_guestbook}</td>
    </tr>
    <tr>
        <td class="row1">
        {guestbook_comments}
      {if paging}
         <br/>
         <span align="center">{paging}</span>
      {endif paging}
        </td>
    </tr>
   <tr>
        <td class="row2">
        {guestbook_form}
        </td>
    </tr>
</table>
 

templates/your_template/guestbook_deletecomment.html
Code:
Code: [Select]
<form method="post" action="{url_guestbook}" onsubmit="uploadbutton.disabled=true;">
  <input type="hidden" name="action" value="deletecomment" />
  <input type="hidden" name="comment_id" value="{comment_id}" />
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="cat">{lang_delete_comment}</td>
</tr>

<tr>
<td class="row2">{lang_delete_comment_confirm}</td>
</tr>

<tr>
<td class="cat">
  <p align="center">
    <input type="submit" name="uploadbutton" value="{lang_yes}" class="button" />
    <input type="button" value="{lang_no}" class="button" onclick="javascript:history.go(-1)" />
  </p>
</td>
</tr>
</table>
</form>
 

templates/your_templates/guestbook_comment_bit.html
Code:
Code: [Select]
<table width="100%" cellspacing="0" cellpadding="4" style="border:solid 1 #CCCCEE">
<tr>
   <td class="commentrow{row_bg_number}" width="80%" ><b>{comment_user_name}</b></td>
   <td class="commentrow{row_bg_number}" align="right" ><small>({lang_release_date}{comment_date})</small></td>
</tr>
<tr>
   <td colspan=2 class="commentrow{row_bg_number}" align="left" style="border-top:solid 1 #DDDDFF">
     {comment_text}
   </td>
</tr>
{if comment_site}
<tr>
   <td colspan=2 class="commentrow{row_bg_number}" align="left" style="border-top:solid 1 #DDDDFF">
     <b>{lang_guest_site}&nbsp;</b>{comment_site}
   </td>
</tr>
{endif comment_site}
{if admin_links}
<tr>
   <td class="commentrow{row_bg_number}" align="left" style="border-top:solid 1 #DDDDFF">
     <b>{lang_guest_from}&nbsp;</b>{comment_user_ip}</td>
   <td class="commentrow{row_bg_number}" align="right" style="border-top:solid 1 #DDDDFF">{admin_links}</td>
</tr>
{endif admin_links}
</table>
<br/>
 
now download this file http://140.112.132.43/install_guestbook.zip (http://140.112.132.43/install_guestbook.zip)


Visit that page

http://your_4images_site/install_guestbook.php


install complete  :wink:


------------------------------------------------------------------------------- :wink:------------------------------------------------------------------------


 :!:this is support for guestbook :?:



 
Some users requested template files for default 4images theme. Basically, you could just copy your templates/your_template/member.html to templates/your_template/guestbook.html and replace the tag {content} to {contents}.

Replace all
Code:
class="forumline"
 

to
Code:

class="bordercolor"
 

in all guestbook_XXXX.html


--------------------------------------------------------- :lol:------------------------------------------

Quote:
- Add badword check to headline
 


To filter user_name for bad words
Find this in guestbook.php
Code:
Code: [Select]
"comment_user_name" => $comment_user_name,
 


change it to
Code:
Code: [Select]
"comment_user_name" => format_text($comment_user_name, $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
 
------------------------------------------------------------ :wink:------------------------------------------------------------

Hello.
I put everything in as you wrote,but in my main page ,there is no "Guestbook" to see.
What did I wrong?

here is the text of the link:

Code: [Select]
<td><img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" />{clickstream}</td>
<td align="right">
<a href="{url_guestbook}"><b>{Guestbook}</b></a>&nbsp;
<a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;
<a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;
Thanks for any lhelp


Open includes/page_header.php and find
Code:

Code: [Select]
"url_categories" => $site_sess->url(ROOT_PATH."categories.php"),
  
 


Add this after it

Code:
Code: [Select]
"lang_guestbook" => $lang['guestbook'],
 

Now you code should be
Code:
Code: [Select]
<td><img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" />{clickstream}</td>
<td align="right">
<a href="{url_guestbook}"><b>{lang_guestbook}</b></a>&nbsp;
<a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;
<a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;

 
------------------------------------------------------ :wink:-----------------------------------------------------------------

Johnny_H wrote:
Works fine this mod  

but i have a little slight problem...

"User name already exists."

when i try to post an entry.... seems only one nick can post.. how to disable?

It is set to restrict one nick can post once each day. If you want to disable it. Find two times in guestbook.php
Code:
Code: [Select]
if ($comment_user_name == "")  {
      $msg .= (($msg != "") ? "<br />" : "").$lang['name_required'];
      $error = 1;
    } elseif ($site_db->not_empty("SELECT user_name FROM ".
                              GUESTBOOK_TABLE.
                           " WHERE user_name= '".strtolower($comment_user_name)."' AND comment_date > ".(time()-60 * 60 * 24))) {
      $msg .= (($msg != "") ? "<br />" : "").$lang['username_exists'];
      $error = 1;
   }
 
change them to
Code:
Code: [Select]
if ($comment_user_name == "")  {
      $msg .= (($msg != "") ? "<br />" : "").$lang['name_required'];
      $error = 1;
    }
 
--------------------------------------------------------------- :wink:----------------------------------------------

JensF wrote:
Hi there,

what must i do to become a Mail or a PM when a Guest or a Member sign in the Guestbook??


In guestbook.php, find
Code:
Code: [Select]
$sql = "UPDATE ".GUESTBOOK_TABLE."
 

Add before
Code:
Code: [Select]
  //-----------------------------------------------------
   // Start Emailer for guestbook
   //-----------------------------------------------------
   if (!empty($config['guestbook_manager'])) {
      $current_time = time();
      include_once(ROOT_PATH.'includes/email.php');
      $site_email = new Email();
      $site_email->set_to($config['guestbook_manager']);
      $site_email->set_from($config['site_email'], $config['site_name']);
      $site_email->set_subject("Guestbook Edited");
      $site_email->register_vars(array(
        "recipient_name" => "GuestBook Manager",
        "comment_date" => format_date($config['date_format']." ".$config['time_format'], $current_time),
        "comment_username" => $comment_user_name,
        "comment_text" => $comment_text,
        "comment_site" => $comment_site,
        "site_name" => $config['site_name'],
        "user_country" => $user_country
      ));
      $site_email->set_body("guestbook_email", $config['language_dir']);
      $site_email->send_email();
   }
   //--end emailer
 
Find
Code:
Code: [Select]
$sql = "INSERT INTO ".GUESTBOOK_TABLE."
 

Add before
Code:
Code: [Select]
//-----------------------------------------------------
   // Start Emailer for guestbook
   //-----------------------------------------------------
   if (!empty($config['guestbook_manager'])) {
      $current_time = time();
      include_once(ROOT_PATH.'includes/email.php');
      $site_email = new Email();
      $site_email->set_to($config['guestbook_manager']);
      $site_email->set_from($config['site_email'], $config['site_name']);
      $site_email->set_subject("Guestbook Signed");
      $site_email->register_vars(array(
        "recipient_name" => "GuestBook Manager",
        "comment_date" => format_date($config['date_format']." ".$config['time_format'], $current_time),
        "comment_username" => $comment_user_name,
        "comment_text" => $comment_text,
        "comment_site" => $comment_site,
        "site_name" => $config['site_name'],
        "user_country" => $user_country
      ));
      $site_email->set_body("guestbook_email", $config['language_dir']);
      $site_email->send_email();
   }
   //--end emailer
 
In lang/your_lang/admin.php, find
Code:
Code: [Select]
$setting['user_edit_guestbook'] = "Allow edit post in GuestBook";
 
Add after
Code:
Code: [Select]
$setting['guestbook_manager'] = "Email for monitoring GuestBook";
 

In admin/settings.php, find
Code:
Code: [Select]
 show_setting_row("user_delete_guestbook", "radio");
 

Add after
Code:
Code: [Select]
show_setting_row("guestbook_manager");
 


Add a new file: lang/your_lang/email/guestbook_email.html
Code:
Code: [Select]
Dear {recipient_name},

{comment_username} signed our guestbook on {comment_date}
at {site_name}.
...............................................................
{comment_text}

{comment_site}
{user_country}
---------------------------------------------------------------
Thanks for you support to our site.

Best Regards,

{site_name}
 


In phpMyAdmin, add this setting into 4images_settings table
Code:
Code: [Select]
INSERT INTO `4images_settings` ( `setting_name` , `setting_value` )
VALUES (

'guestbook_manager', 'your_email_account@your_emailserver'
)
 

That should work. If you want to disable this feature, keep guestbook_manager field blank.


------------------------------------------------------------ :wink:--------------------------------------------------------

tikle wrote:
Fatal error: Call to undefined function: get_smiles_text() in /home/www/web22/html/foto/guestbook.php on line 362

 


Remove this line in guestbook.php
Code:
Code: [Select]
"smiles_text" => get_smiles_text(),
 


 :wink: :wink: :wink: :wink: :roll:

Edited by mawenzi :
- 22.06.2009 : install_guestbook.zip attached
Title: Re: [MOD] guestbook
Post by: universal on April 18, 2005, 03:26:58 PM
http://www.pramoga.net/guestbook.php

Any sugestions?
Title: Re: [MOD] guestbook
Post by: V@no on April 19, 2005, 02:24:21 AM
Any sugestions?
yes, I have one:
See your explanation/description along with the question.
With 108 posts, u should know better by now ;)
Title: Re: [MOD] guestbook
Post by: universal on April 19, 2005, 04:49:56 AM
Sorry  :oops:
Guestbook posts everything to db, but I can`t see anything (posts in guestbook).
Title: Re: [MOD] guestbook
Post by: V@no on April 19, 2005, 04:52:11 AM
perhaps u removed something when edited the template?
Title: Re: [MOD] guestbook
Post by: universal on April 19, 2005, 05:05:49 AM
Hmm, I tryed to do these steps few times... Maybe it`s time for me to buy reading-glass.
Title: Re: [MOD] guestbook
Post by: emersontiago on April 23, 2005, 06:57:47 PM
Thanks funpersian !

http://www.emersontiago.com/4images/guestbook.php


[]´s

-emersontiago-

 
 
Title: Re: [MOD] guestbook
Post by: universal on April 24, 2005, 10:24:57 AM
Hmm I redid all the steps, and now I can`t even see guestbook  :lol:  :oops:
An I don`t get it why? When I go to http://www.pramoga.net/guestbook.php
It redirects to index.php ... Something with headers?  :?
Title: Re: [MOD] guestbook
Post by: Sopur on April 25, 2005, 11:22:14 AM
Hallo Zusammen!
Ich habe das Gästebuch nun installiert. Leider kann ich es nirgends sehen. Die Anleitung oben versuchte ich zu befolgen, jedoch ohne Erfolt.
Ich hätte gerne einen Eintrag oben auf der Seite neben "Top Bilder" und "Neue Bilder".
Wo finde ich das? Bzw. wie muss so ein Link aussehen?
Vielen Dank für Eure Hilfe!
M
F
G
Sopur
Title: Re: [MOD] guestbook
Post by: Schwarz Liesi on April 25, 2005, 09:58:11 PM
Hallo Zusammen!
Ich habe das Gästebuch nun installiert. Leider kann ich es nirgends sehen. Die Anleitung oben versuchte ich zu befolgen, jedoch ohne Erfolt.
Ich hätte gerne einen Eintrag oben auf der Seite neben "Top Bilder" und "Neue Bilder".
Wo finde ich das? Bzw. wie muss so ein Link aussehen?
Vielen Dank für Eure Hilfe!
M
F
G
Sopur

Hallo!

Du kannst es im jeweiligen Template einfach einfügen!
in der Template-Datei home.html zB:

suche:


Code: [Select]
<td class="navbar" align="right">
<a href="{url_top_images}"><b>{lang_top_images}</b></a>&nbsp;|&nbsp;
<a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;
 </td>


Du könntest den Link zB vor dem Link zu den Top-Bildern einfügen:

Code: [Select]
<td class="navbar" align="right">
<a href="LINK ZU GB"><b>TEXT FÜR GB-LINK</b></a>&nbsp;|&nbsp;
<a href="{url_top_images}"><b>{lang_top_images}</b></a>&nbsp;|&nbsp;
<a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;
 </td>

Wenn noch Fragen, einfach stellen!  :wink:
Title: Re: [MOD] guestbook
Post by: Sopur on April 26, 2005, 03:23:41 PM
Hm - leider habe ich den entsprechenden Abschnitt in der home.html nicht gefunden. Kann es sein, dass Du Version 1.7.1 benutzt? (Ich benutze nur 1.7)
MFG
Sopur
Title: Re: [MOD] guestbook
Post by: Sopur on April 27, 2005, 06:41:12 PM
Habe die richtige Datei nun gefunden. Nun habe ich aber folgendes Problem: wenn ich den BB-Code aktiviere, erhalte ich beim Aufruf des Gästebuches immer folgende Fehlermeldung:
Fatal error: Call to undefined function: get_smiles_text() in /home/schwabch/public_html/harassenlauf/guestbook.php on line 354

Was kann man dagegen tun?
Vielen Dank!
M
F
G
Sopur
Title: Re: [MOD] guestbook
Post by: funpersian on April 28, 2005, 02:05:45 AM
Habe die richtige Datei nun gefunden. Nun habe ich aber folgendes Problem: wenn ich den BB-Code aktiviere, erhalte ich beim Aufruf des Gästebuches immer folgende Fehlermeldung:
Fatal error: Call to undefined function: get_smiles_text() in /home/schwabch/public_html/harassenlauf/guestbook.php on line 354

Was kann man dagegen tun?
Vielen Dank!
M
F
G
Sopur

Remove this line in guestbook.php
Code:

Code:
Code: [Select]
"smiles_text" => get_smiles_text(),
Title: Re: [MOD] guestbook
Post by: Sopur on April 28, 2005, 03:47:48 PM
Thank you! It worked. But you have to remove the line twice :-)
Regards
Sopur
Title: Re: [MOD] guestbook
Post by: Sopur on April 29, 2005, 05:00:39 PM
So, das Gästebuch läuft einwandfrei. Nun habe ich erst jetzt nach ein paar Einträgen gemerkt, dass der Benutzer seine EMail gar nicht angeben kann. Gibt es eine Möglichkeit dies noch einzubauen?
M
F
G
Sopur
Title: Re: [MOD] guestbook
Post by: max.cady on May 01, 2005, 06:15:37 PM
Quote
Sorry  Embarassed
Guestbook posts everything to db, but I can`t see anything (posts in guestbook).

Hi universal,
you are not alone, I have the same problem

I can post a message but it won't appear on the guestbook page ...   :?
Title: Re: [MOD] guestbook
Post by: groucho on May 02, 2005, 12:42:40 PM
same is true with me.
No comments are displayed but there's a Warning:
Undefined variable 'comment_text'

any clues?
Title: Re: [MOD] guestbook
Post by: Legendary on May 03, 2005, 04:22:34 AM
this happens because of the version differences of 1.7 and 1.71

I tested the installation on both versions, and in 1.71 the guestbook will not work.  It works in 1.7 though.
Title: Re: [MOD] guestbook
Post by: mightyrox on May 06, 2005, 06:49:07 PM
i´ve got the same problem with version 1.7.1 .. it looks like there is problem with the template system.
Title: Re: [MOD] guestbook
Post by: chicksor on May 12, 2005, 03:11:31 PM
Hallöchen, habe alles so gemacht, wie es hier steht. Jedoch sehe ich nur das Formular zum eintragen und keine Einträge.
Ich verwende 4images 1.7.1.

Gruß
Christoph
Title: Re: [MOD] guestbook
Post by: Xandra on May 17, 2005, 04:02:22 PM
Hi

I finally had to register to be able to post  :lol: I have been installing mods in peace yesterday - everything went fine (with a lot of testing and checking out errors on my own) but I am stuck on this one.  :(

I have version 4images 1.7.1 and I use IE6 as browser - just the basic info.

Now to the problem - I am able to sign the guestbook, but I do not see any entries. After so many entry tests, my guestbook has 2 pages but on each page I only see the part to sign the guestbook. Can someone pls check this out for me to see what is missing? Anyone who speaks english or german. Here's the link to the guestbook: http://www.d-zynez.net/grfx/guestbook.php

If there is no one who can find out what is wrong, then on to this other query:
Since I want to continue installing other mods, how do I uninstall this guestbook MOD?
And is it safe to delete the installer of a particular MOD from my root directory after the MOD has been installed?

TYVM in advance.
Xandra
Title: Re: [MOD] guestbook
Post by: max.cady on May 17, 2005, 10:09:28 PM
Quote
And is it safe to delete the installer of a particular MOD from my root directory after the MOD has been installed?

It is not only safe but also recommended  :wink:

The problem with the guestbook entries appears to be a version 1.7.1 problem. I found a thread which explains the differences in the two versions
http://www.4homepages.de/forum/index.php?topic=6728.0

Maybe someone who is more experienced in programming than me can have a look into the differences in the member_uploadform.html? This is obviously the only template related page that has been changed in version 1.7.1. I tried to find the answer but I have to admit I could not succeed ..  :?
Title: Re: [MOD] guestbook
Post by: Xandra on May 18, 2005, 12:47:17 PM
Quote
And is it safe to delete the installer of a particular MOD from my root directory after the MOD has been installed?

It is not only safe but also recommended  :wink:

Thanks, I did when I did another mod yesterday that explicitly said to delete the installer. :D

I give up on this guestbook mod lol, after over 24hrs of checking where the mistakes could be (and I have NO php knowledge - tough to read the codes when I cannot understand them  :roll:) although I think it has something to do with showing the guesbook comments, but where the problem is exactly I cannot fathom.
Title: Re: [MOD] guestbook
Post by: santadirk on May 27, 2005, 02:15:22 PM
Hallo zusammen

Gibt es hir mittlerweile was neues zu dem Gästebuch?
Ich habe auch das  Problem das das Gästebuch schon angezeigt wird aber die Einträge Fehlen.
Ich habe gerade mal in meine SQL Datenbank geschaut und dort werden die Einträge auch fehlerfrei angelegt.
Es scheint doch aber nicht unbedingt an der Version zu liegen denn die Seite http://emersontiago.com/4images/guestbook.php funzt ja auch und es ist die neuere Version. Ist denn keiner in der Lage das Problem zu lokalisieren?

HILFE :|

Dirk
Title: Re: [MOD] guestbook
Post by: emersontiago on May 28, 2005, 07:33:18 PM
correcting...

http://www.emersontiago.com/4images/guestbook.php

[]´s

-emersontiago-





Hallo zusammen

Gibt es hir mittlerweile was neues zu dem Gästebuch?
Ich habe auch das  Problem das das Gästebuch schon angezeigt wird aber die Einträge Fehlen.
Ich habe gerade mal in meine SQL Datenbank geschaut und dort werden die Einträge auch fehlerfrei angelegt.
Es scheint doch aber nicht unbedingt an der Version zu liegen denn die Seite http://emersontiago.com/4images/guestbook.php funzt ja auch und es ist die neuere Version. Ist denn keiner in der Lage das Problem zu lokalisieren?

HILFE :|

Dirk
Title: Re: [MOD] guestbook
Post by: santadirk on May 30, 2005, 11:43:15 AM
Hy zusammen

Ist denn hier keiner in der Lage den Fehler oder sonstiges zu finden, das das Gästebuch auch unter der neuen Version läuft?
Bin zwar kein php Profi aber das kann doch nicht so extrem schwer sein oder wenn es unter der alten Version läuft?

@Jan Gib uns doch einen Tipp was man machen kann um es auch in der neuen Version zum laufen zu bekommen

Dirk
Title: Re: [MOD] guestbook
Post by: santadirk on June 02, 2005, 09:38:05 AM
Hallo zusammen

Ich habe noch einmal eine kleine Frage vielleicht kann ja jemand helfen.
Ich bin nun auf die Version 1.7 zurückgewechselt und das Gästebuch funktioniert auch soweit.
Was mir nur aufgefallen ist, ist das wenn ich als Admin Einträge löschen oder bearbeiten möchte dieses nicht funktioniert.
Ich hätte zwar die Möglichkeit das direkt in der SQL Datenbank zu ändern aber es wäre doch toll wenn das auch über das Gästebucg direkt funktioniert.
Vielleicht habt ihr ja eine Idee

Dirk
Title: Re: [MOD] guestbook
Post by: Xandra on June 02, 2005, 06:30:40 PM
Hallo zusammen

Ich habe noch einmal eine kleine Frage vielleicht kann ja jemand helfen.
Ich bin nun auf die Version 1.7 zurückgewechselt und das Gästebuch funktioniert auch soweit.
Was mir nur aufgefallen ist, ist das wenn ich als Admin Einträge löschen oder bearbeiten möchte dieses nicht funktioniert.
Ich hätte zwar die Möglichkeit das direkt in der SQL Datenbank zu ändern aber es wäre doch toll wenn das auch über das Gästebucg direkt funktioniert.
Vielleicht habt ihr ja eine Idee

Dirk

hehe, auf die ältere Version gewechselt - nur weil der MOD nicht funktioniert? Du hättest es nicht machen sollen. Zur Zeit, benutze ich ein CGI Guestbook bis ich herausfinden kann, wo bei diesem MOD der Fehler liegt.  :roll:

Ich habe ebenfalls etwas herausgefunden, es würde dich vielleicht interessieren. Einfacher Trick ein Gästebuch für 4images hehe - obwohl ich weiss nicht, ob das die Tabelle "Letzte Kommentare" beinflussen wird (wenn du diesen MOD installiert hast)

http://www.mini.rustynet.de/index.php?action=vthread&forum=1&topic=8

Xandra
Title: Ältere Version
Post by: santadirk on June 02, 2005, 07:37:09 PM
Hy

Das Gästebuch kenne ich schon fand ich aber nicht so toll.Habe im Moment noch die neue und die alte Version am laufen aber da in diesem Beitrag ja kaum einmal jemand antwortet, rechne ich irgendwie nicht damit, das der Fehler so schnell behoben wird und das Gästebuch unter der neuen Version läuft.
Na ja mal abwarten

Dirk
Title: Re: [MOD] guestbook
Post by: santadirk on June 03, 2005, 09:08:57 AM
@ PHP Könner

Ich habe mich noch einmal in ein paar anderen Foren schlau gemacht und die Info bekommen das HTTP_POST_VARS und Co veraltet sind und nur noch die superglobalen zu verwenden sind.Kann das ein Grund sein warum das Gästebuch nicht fehlerfrei läuft?
$_POST, $_GET, $_COOKIE, $_SERVER, $_SESSION, ...
Title: Danke für ihren Eintrag Seite
Post by: santadirk on June 03, 2005, 10:58:02 AM
Noch eine Frage
Wie kann ich eigentlich nachdem ein Eintrag in das Gästebuch gemacht wurde eine Seite anzeigen lassen, auf der ein kurzer Text steht wie z.b Danke für den Eintrag? Ich hoffe jemand kann mir helfen
Title: Re: [MOD] guestbook
Post by: santadirk on June 03, 2005, 11:23:47 AM
Hy hat sich erledigt.Es läuft alles habe eine Änderung in der page_header.php vorgenommen.
Title: Re: [MOD] guestbook
Post by: mag on June 07, 2005, 12:04:41 AM
ich schließe mich jetz mal dem problem an, ich sehe leider keine einträge:(
Title: Re: [MOD] guestbook
Post by: max.cady on June 07, 2005, 07:22:39 AM
I think the php-pros are all english speaking :D ... maybe it will help if I put the question in English.

Does anybody of you php professionals have an idea why it won't work with 4images 1.7.1 while there are no problems with 1.7?

santadirk assumed the problem could lie with the variables $_post etc.

The problem with the new 4images version is that nobody can see the posts. They are stored in the database though.

Any suggestions would greatly be appreciated  :D
Title: Re: [MOD] guestbook
Post by: knuffi on June 07, 2005, 10:07:41 PM
Hallo

Ich habe Das Gästebuch instaliert und ich kann es auch aufrufen... Super....

Nur wenn ich einen Eintrag mache passiert nichts...

An was kann das liegen.?

Gruss Knuffi
Title: Re: [MOD] guestbook
Post by: djkamp on June 08, 2005, 11:16:07 AM
i have the same problem, my gb doesn't schow any entry....


come on!

are only n00bs posting mods? with no support???

oO(insane...)
Title: Re: [MOD] guestbook
Post by: Xandra on June 09, 2005, 09:44:47 PM
well I got it to work.. I did a lot of tinkling with the pages so I am not sure what really made it to work..  :lol:

http://www.d-zynez.net/grfx/guestbook.php
(just ignore the ugly bordercolors of the entries- that's cosmetic problems lol & from testing my GB there were a lot who did some tests, I see haha!)

The last thing I did was modify the template "guestbook.html":

I added {comments} as follows:

Quote
<span class="title">{lang_guestbook}</span>
                  <hr size="1" />
                  {if msg}<b>{msg}</b><br /><br />{endif msg}<br>
              {comments}<br>{contents}
              <p>&nbsp;</p>
            </td>
[/color]

Let me know, if that was the only problem because otherwise, I would have to paste here the entire pages that I have somehow changed.

Title: Re: [MOD] guestbook
Post by: Xandra on June 09, 2005, 10:30:24 PM
Pls take note, I was only able to make the entries show
but there is another problem...
I cannot edit or delete any entries - somehow the guestbook_editcomment.html is calling for an external JS file but this file is not included in this mod (or was I blond in my previous life?  :roll:) :lol:
Title: Re: [MOD] guestbook
Post by: marod0er on June 10, 2005, 01:07:22 PM
This could be very useful. Thanks to the creator :D
Title: Re: [MOD] guestbook
Post by: maziggy on June 13, 2005, 02:25:40 PM
In the meantime is there any way to get it work with 1.7.1 ?

Cheers, Martin
Title: Re: [MOD] guestbook
Post by: maziggy on June 16, 2005, 12:43:55 PM
Just found out that you have to use {guestbook_comments} instead of {comments} to get the entries displayed. After i changed that the guestbook is working fine for me with 4images 1.7.1.

http://www.nyc-guide-gallery.de/guestbook.php

Voilla ;-)

Cheers, Martin
Title: Re: [MOD] guestbook
Post by: HaKkE on June 16, 2005, 02:03:00 PM
Hallo

Also das Gästebuch funktioniert wunderbar. Hab trotzdem noch 2 Probleme/Fragen.

1. Ich habe die Zeile $lang['guestbook'] = "Gästebuch";  in meiner main.php eingefügt, aber trotzdem wird der Titel nicht angezeigt, wenn ich im Template schreibe {lang_guestbook}. Genauso ist es auch bei den anderen Definitionen.

2. Die Frage mit den Smilies wurde schon mehrfach gestellt und wenn man die Zeile (362) rauslöscht geht es auch, aber gibt es trotzdem eine MÖglichkeit Smilies einzubauen? Wo müsste ich den einen Ordner mit den Smilies drin hinkopieren, damit sie erkannt werden?

Danke
HaKkE

P.S.: Echt super Sache mit dem Gästebuch. Vielen Danke für dieses MOD.  :lol:
Title: Re: [MOD] guestbook
Post by: maziggy on June 16, 2005, 02:13:39 PM
Ich habe die Smilies direkt in 4images eingebaut. Obwohl ich sie im Gaestebuch ausdokumentiert habe, werden sie angezeit und funktionieren  :o

Gruss, Martin
Title: Re: [MOD] guestbook
Post by: HaKkE on June 16, 2005, 07:52:03 PM
Hab heute den ganzen tag rumprobiert und im forum gesucht, aber so richtig habe ich nix gefunden :( Kannst mir deinen Code zeigen? Irgendwie bekomme ich es nicht hin, dass die smilies dann auch in der textbox eingefügt werden. Wie muss der entsprechende link dazu aussehen? Habe es mit javasript versucht und bis jetzt sieht das so aus:

Code: [Select]
<a href="javascript:smilies(':)')"><img border="0" src="{template_url}/smiles/smiley.gif" width="15" height="15"></a>

In der funcion.php habe ich dementsprechend eine funktion die eigentlich die smilies in die textbox einfügen soll. Anklicken kann ich sie ja, aber es passiert nix.

thx
HaKkE
Title: Re: [MOD] guestbook
Post by: mag on June 16, 2005, 10:15:07 PM
Just found out that you have to use {guestbook_comments} instead of {comments} to get the entries displayed. After i changed that the guestbook is working fine for me with 4images 1.7.1.


where can i found it i the mod?
Title: Re: [MOD] guestbook
Post by: HaKkE on June 17, 2005, 12:31:05 AM
This you have to write in your template (f.e. guestbook.html).

Code: [Select]
<span class="title">{lang_guestbook}</span>
                  <hr size="1" />
                  {if msg}<b>{msg}</b><br /><br />{endif msg}<br>
              {guestbook_comments}<br>{contents}
              <p>&nbsp;</p>
            </td>

I have copy the home.html. Rename it to guestbook.html and deleted the code in the middle column. That I copied this code above and ready.
Title: Re: [MOD] guestbook
Post by: max.cady on June 18, 2005, 10:04:55 AM
Woohoo !!! Es hat geklappt ...  !!!   :D
Danke für die Tips!

Title: Re: [MOD] guestbook
Post by: kev on June 21, 2005, 03:47:48 PM
ok...everythings works so far...

the only things that is bugging me, is the fact that i can´t edit any posts.
it´s always telling me that the username already exist...

does anyone know how to fix that issue?

cheers
-kev
Title: Re: [MOD] guestbook
Post by: obmob01 on July 14, 2005, 03:48:57 AM
ok...everythings works so far...

the only things that is bugging me, is the fact that i can´t edit any posts.
it´s always telling me that the username already exist...

does anyone know how to fix that issue?

cheers
-kev
Check first page, there is a way to disable that, i did it :)

This is great, thanks, finally working...  :lol:

Now i have a doubt, in comments you can display more info about the user and post some status icons, like the online offline status, the website, the email icon... is there a way to add it to the guestbook?

Maybe like this...

    {guestbook_user_status_img}
    {guestbook_user_profile_button}
    {guestbook_user_email_button}
    {guestbook_user_homepage_button}
    {guestbook_user_icq_button}

but where to call it from? :?:
thanks
Title: Re: [MOD] guestbook
Post by: HaKkE on July 17, 2005, 01:46:02 PM
Hi

Ich habe das selbe problem wie kev / I have the same problem how kev

ok...everythings works so far...

the only things that is bugging me, is the fact that i can´t edit any posts.
it´s always telling me that the username already exist...

does anyone know how to fix that issue?

cheers
-kev

Was muss ich deáktivieren? Kann nichts finden. What I have to disable? I can`t find it.
Hat jemand eine Lösung dafür? / Someone out there who fix that problem?

thanks
HaKkE
Title: Re: [MOD] guestbook
Post by: Gray on July 19, 2005, 02:14:33 PM
Sorry, hab das Gästebuch in Version 1.7.1 installiert und nach dem befolgen der ganzen Anleitungen (Löschen einzelner Zeilen, Umbenennen etc.) funzt es nun auch. Habe aber jetzt leider den letzten Teil für die Installation der E-Mail Benachrichtigung nicht ganz verstanden.
"In phpMyAdmin, add this setting into 4images_settings table Code: "
Wo muß ich jetzt genau den Code einfügen? Wo ist die phpMyAdmin?  :oops:
Mein Englisch ist leider sehr schlecht.  :(
Title: Re: [MOD] guestbook
Post by: Gray on July 19, 2005, 04:49:13 PM
Falls damit die Einstellung "Email for monitoring GuestBook" im Control panel gemeint ist. Die funzt noch nicht.
Die Adresse verschwindet jedes mal wenn man speichert. :(
Title: Re: [MOD] guestbook
Post by: paburmester on July 20, 2005, 07:30:40 AM
DB Error: Bad SQL Query: INSERT INTO 4images_settings (setting_name, setting_value) VALUES ('guestbook_view', '1')
Duplicate entry 'guestbook_view' for key 1

DB Error: Bad SQL Query: INSERT INTO 4images_settings (setting_name, setting_value) VALUES ('user_delete_guestbook', '0')
Duplicate entry 'user_delete_guestbook' for key 1

DB Error: Bad SQL Query: INSERT INTO 4images_settings (setting_name, setting_value) VALUES ('guestbook_post', '1')
Duplicate entry 'guestbook_post' for key 1

DB Error: Bad SQL Query: INSERT INTO 4images_settings (setting_name, setting_value) VALUES ('user_edit_guestbook', '0')
Duplicate entry 'user_edit_guestbook' for key 1

what did that means?
Title: Re: [MOD] guestbook
Post by: V@no on July 20, 2005, 02:30:50 PM
what did that means?
that means "dont worry, the database was previously updated"
Title: Re: [MOD] guestbook
Post by: paburmester on July 20, 2005, 05:24:35 PM
Quote
"dont worry, the database was previously updated"

hi, thank for the help. but i cant see my guestbook. :(
look: http://galeriadelcucurucho.com/galeria/guestbook.php
whats wrong??
Title: Re: [MOD] guestbook
Post by: Gray on July 20, 2005, 06:35:54 PM
Irgendwie funzt jetzt auch das löschen von Gästebucheinträgen nicht mehr.
Es hat aber im Test schon mehrmals funktioniert. Ich habe zwischenzeitlich
nur den Kalender eingebaut. :-(
Title: Re: [MOD] guestbook
Post by: Gray on July 20, 2005, 10:53:56 PM
Die Abfrageseite noch dem anklicken der Löschfunktion kommt noch, aber dann passiert garnichts.
Und wenn mann bearbeiten anklickt kommt folgende Fehlermeldung:

Fatal error: Call to undefined function: get_smiles_text() in /homepages/27/d83893053/htdocs/Galerie/4images/4images/guestbook.php on line 210

Habe ich ausversehen etwas gelöscht es hat doch vorher schon mal funktioniert. zumindest die Löschfunktion. Das bearbeiten hatte ich bisher
noch nicht getestet. Soll ich die Dateien sonst mal posten?
Title: Re: [MOD] guestbook
Post by: Gray on July 21, 2005, 07:45:20 AM
Dies ist die betroffene zeile in der guestbook.php:
 
    "smiles_text" => get_smiles_text(),
Title: Re: [MOD] guestbook
Post by: Gray on July 21, 2005, 03:07:26 PM
So.  :D Habe alles noch einmal installiert und es funzt. Ein kleiner Fehler ist beim Löschen der Zeile:
"smiles_text" => get_smiles_text(), 
passiert. Daher hat das bearbeiten nicht geklappt. Die Zeile ist zweimal zu löschen  :oops: :
1. Zeile 184
2. Zeile 364
dann funktioniert es! Der zweite Fehler ist mir wohl beim Installieren des Kalender-Tools
passiert.  :oops: Habe etwas zuviel gelöscht. Daher funktionierte nichts mehr.

Das e-Mail Monitoring-Tool funktioniert immer noch nicht habe es mit einer Änderung der
settings.php im Verzeichnis admin versucht. Hat aber nicht funktioniert. Also hier noch einmal
meine Frage Was verstehe ich unter: "in phpMyAdmin, add this settings into 4image_setting table" ???
Wo muss ich hier was ändern, damit ich über Gästebucheinträge per E-Mail informiert werde?
 :?:
Title: Re: [MOD] guestbook
Post by: paburmester on July 21, 2005, 08:13:47 PM
Quote
"dont worry, the database was previously updated"

hi, thank for the help. but i cant see my guestbook. Sad
look: http://galeriadelcucurucho.com/galeria/guestbook.php
whats wrong??

please somebody help me!
Title: Re: [MOD] guestbook
Post by: kief24 on July 26, 2005, 01:14:45 AM
guestbook works fine. Thx for the mod !

Question : the "allow edit post" and "allow delete post" items in the control panel.
If you put the options to "yes", who can edit and delete the messages ?
only adinistrators ?
the one who posted it ?

thx
Title: Re: [MOD] guestbook
Post by: maximi on July 27, 2005, 05:49:21 PM
Es funktioniert. Man musste erst etwas basteln, aber dann geht es.
Anmerkung: Es geht nur mit VErsion 1.7.0.
maximi
Title: Re: [MOD] guestbook
Post by: max.cady on July 29, 2005, 05:05:07 PM
Quote
Anmerkung: Es geht nur mit VErsion 1.7.0.

Es geht auch in 1.7.1 ... die Lösung dazu wurde in #45 gepostet.
Title: Re: [MOD] guestbook
Post by: paburmester on July 30, 2005, 12:41:12 PM
hi, this gallery works with 4images 1.7.0? because it seems like not... http://galeriadelcucurucho.com/galeria/guestbook.php :(
Title: Re: [MOD] guestbook
Post by: kief24 on July 30, 2005, 12:50:18 PM
it works for me with 1.7.0

http://www.edupics.com/guestbook.php
Title: Re: [MOD] guestbook
Post by: paburmester on July 30, 2005, 06:30:42 PM
i really dont understand why this guestbook doesn´t work for me... i need to install a previous mod installed?
how can a i delete all the guestbook files and data from phpmyadmin to reinstall again??
please help me
http://galeriadelcucurucho.com/galeria/guestbook.php
Title: Re: [MOD] guestbook
Post by: kief24 on July 30, 2005, 06:43:42 PM
i just followed the steps described in the mod.

Maybe you have forgotten something, or made a mistake.

You could try all the steps again and see if it works...
Title: Re: [MOD] guestbook
Post by: paburmester on July 30, 2005, 08:27:19 PM
but how can i start again from the beginnig? how can i delete my guestbook from database??
Title: Re: [MOD] guestbook
Post by: kief24 on July 30, 2005, 09:53:27 PM
hmm.... good question.

Could it hurt if you just try every step again ?

is it necessary to go back to the beginning point before starting again ?
or could you just do the installation without returning to the starting point ?

i would backup the database and try the installation again, without returning.

but i have no idea if it would work or not. But it's worth to try i think.



Title: Re: [MOD] guestbook
Post by: paburmester on July 30, 2005, 10:41:28 PM
i think this is necesary, cause i all ready tried and nothing changes... i try a lot of times without a good result..
Title: Re: [MOD] guestbook
Post by: kief24 on July 31, 2005, 10:07:22 AM
maybe you have an earlier backup you can restore ?

otherwise i can't help you any further, sorry...
Title: Re: [MOD] guestbook
Post by: Kauterbak on August 09, 2005, 12:47:43 AM
Zum ersten mal ein super Gästebuch! Allerdings wollte ich noch mehr Felder zum EInfügen reinhauen. zb: emailadresse, wohnort usw... hat jemand ne idee, hab es versucht, allerdings hat er mir es nicht in die datenbank übernommen. Wurde aus der guestbook.php nicht schlau...

und ist es vieleicht möglich dieses formular zum eintragen auf einej extra page zu verlegen und wenn man sich eingetragen hat das man dann zu den einträgen weitergeleitet wird?!?  8) :lol: :?:
Title: Re: [MOD] guestbook
Post by: paburmester on August 09, 2005, 04:53:21 AM
i really dont know what to do!? please help me  :cry:
look my guestbook: http://galeriadelcucurucho.com/galeria/guestbook.php
why! why!! why!!!?? doesnt work!!
please i really need your help
Title: Re: [MOD] guestbook
Post by: obmob01 on August 12, 2005, 12:33:28 AM
i really dont know what to do!? please help me  :cry:
look my guestbook: http://galeriadelcucurucho.com/galeria/guestbook.php
why! why!! why!!!?? doesnt work!!
please i really need your help
Nothing shows... only 500 error :?:
Title: Re: [MOD] guestbook
Post by: Kauterbak on August 12, 2005, 05:57:42 AM
I cannot see {admin_links} no more at any time if I am logged in as admin, but i see the IP of entry. the guestbook.php and guestbook_comment... are unchanged! Does someone have a idea???
Title: Re: [MOD] guestbook
Post by: paburmester on August 17, 2005, 09:58:38 PM
Nothing shows... only 500 error :?:

my server was down, but please keep trying, i dont know why but only shows a blank page... :S
please help me!
Title: Guestbook installed on 1.7.1 and now I´m tired
Post by: Flo2005 on August 18, 2005, 01:00:45 AM
Okay I´m part of these victims  :D

But my problem "I hope" is not so big...

@ 1st

kief24 said it before on post #60

Quote
Question : the "allow edit post" and "allow delete post" items in the control panel.
If you put the options to "yes", who can edit and delete the messages ?
only adinistrators ?
the one who posted it ?
there was no help for him  :(  perhaps somebody give me an advice  :?

Another thing is that if I want delete an entrie from my guestbook it opens on blank target!?!??!!!   :roll:

THX by Flo2005

Edit: Okay, I found out that this option is for user!

Quote
$setting['user_delete_guestbook'] = "...text...";
$setting['user_edit_guestbook'] = "...text...";

But if I want delete or edit the guestbook entries, my browser always opens a new target! What must I change?

THX by Flo2005
Title: Re: [MOD] guestbook
Post by: JensF on August 23, 2005, 03:34:29 PM
Hello,

i have one Problem with the Guestbook.

Every Day at the same time i become a Spam Entry in my Guestbook.

Is there a way to Ban them???

Quote
cheapest phentermine on internet (23.08.2005 10:37)
Hi! I'm first time here, nice to meet u people!  
Homepage: http://cheapest-phentermine-on-internet.aboutall.ath.cx/  
Title: Re: [MOD] guestbook
Post by: Flo2005 on August 23, 2005, 07:23:02 PM
Perhaps you can try to block the IP !?!!
Title: Re: [MOD] guestbook
Post by: Lucifix on August 23, 2005, 11:00:53 PM
I quickly check this mod but haven't seen answer to my question. Does anyone know if it's possible to make personalize guestbook for each member?
Title: Re: [MOD] guestbook
Post by: Kauterbak on August 31, 2005, 09:14:08 PM
How can I add more fields in the entry-form and show this in the posts? :lol:
Title: Re: [MOD] guestbook
Post by: darkknight on September 01, 2005, 01:36:38 AM
now download this file http://140.112.132.43/install_guestbook.zip

Ist eigentlich die Datei noch irgendwo zu haben. Der Link ist ja offensichtlich abgeschalet!!
Title: Re: [MOD] guestbook
Post by: paburmester on September 01, 2005, 10:10:46 AM
Fatal error: Call to undefined function: get_smiles_text() in c:\appserv\www\gdc\guestbook.php on line 362

:( what did i do wrong?
Title: Re: [MOD] guestbook
Post by: max.cady on September 04, 2005, 04:29:51 PM
Quote
Every Day at the same time i become a Spam Entry in my Guestbook.

I have the same problem ...

I tried this mod

http://www.4homepages.de/forum/index.php?topic=6989.0

but I either did something wrong or it does not work ...  :|
Title: Re: [MOD] guestbook
Post by: Amosnet on September 04, 2005, 10:47:21 PM
i have installed everything, like its descriped.

But i am not able to download die install_guestbook.zip, does anybody know whats into that Zip?
Can anybody please copy it, and but it on rapidshare or send it to me, i will link it into this thread.

I cant see my guestbook, if i wanna enable the guestbook in my admin panel, the setting are not stored
after pressing the store button.

anybody a idea?
Title: Re: [MOD] guestbook
Post by: kleene on September 06, 2005, 06:32:28 PM
I also need that zip-file !!!
I can't find it. http://140.112.132.43/install_guestbook.zip didn't work anymore !!!!

Please help me !!
Title: Re: [MOD] guestbook
Post by: gifwav on September 11, 2005, 08:30:23 PM
Me too!
Title: Re: [MOD] guestbook
Post by: fuzionative on September 11, 2005, 11:18:37 PM
someone have got to have that zip file stored somewhere.. I too need it
Title: Re: [MOD] guestbook
Post by: Lucifix on September 11, 2005, 11:21:34 PM
Here you go:

http://www.slo-foto.net/download-file-17.html

 :wink:
Title: Re: [MOD] guestbook
Post by: gifwav on September 12, 2005, 10:01:09 AM
I tried several times, but only this text appears:
Quote
Stran ne obstaja!

www.slo-foto.net
Title: Re: [MOD] guestbook
Post by: Lucifix on September 12, 2005, 10:03:08 AM
Are you sure you click on this link?

http://www.slo-foto.net/download-file-17.html
Title: Re: [MOD] guestbook
Post by: gifwav on September 12, 2005, 10:11:22 AM
Yes, I've tried it in Internet Explorer and Firefox and no result.
I retyped the displayed (red) password and clicked "Fetch It".
A new screen appears with the text:
Quote
Stran ne obstaja!

www.slo-foto.net
Title: Re: [MOD] guestbook
Post by: Lucifix on September 12, 2005, 10:22:49 AM
You're right, I'll fix this as soon as I come home (4 hours) ;)
Title: Re: [MOD] guestbook
Post by: Lucifix on September 12, 2005, 03:56:58 PM
It should work now!
Title: Re: [MOD] guestbook
Post by: fuzionative on September 12, 2005, 03:57:41 PM
Great, much apreciated  :D
Title: Re: [MOD] guestbook
Post by: Amosnet on September 13, 2005, 10:10:32 PM
Also a big thank you from me

Can anybody tell me, how can i only allow registered user to write into the book`?
Title: Re: [MOD] guestbook
Post by: obmob01 on September 25, 2005, 05:03:41 PM
You know, i never neede to delete or edit guestbook posts, as an admin i tried, it opens the right template, but empty, no options to edit or delete the item.

I must do this via PHPmyAdmin, anyone has this same problem? 8O
Title: Re: [MOD] guestbook
Post by: kief24 on September 25, 2005, 07:11:26 PM
Quote
Every Day at the same time i become a Spam Entry in my Guestbook.

I have the same problem ...

I tried this mod

http://www.4homepages.de/forum/index.php?topic=6989.0

but I either did something wrong or it does not work ...  :|

the same for me.
I installed it. Everything looks good, no error messages, but it doesn't stop the spam

V@no says something there about editing the code from simonconsulting.com to make it work with 4 images, but i don't understand.

Quote
there are two things I must add:
1) 4images prepare "super globals" (_GET and _POST) to work properly with "magic quotes" turned on, so for better compability u should use $HTTP_POST_VARS (dont foget add them to global list.)
2) $session_info['session_ip'] should be replace with $site_sess->session_info['session_ip'] and global $site_sess; should be used for that too.

Maybe it's because of that that the mod doesn't work properly.
Title: Re: [MOD] guestbook
Post by: Flo2005 on October 11, 2005, 07:16:05 PM
Hi!

My Guestbook is missing the bbcode.js

Now I build this file

Quote
tag_prompt = "{lang_tag_prompt}";

link_text_prompt = "{lang_link_text_prompt}";
link_url_prompt = "{lang_link_url_prompt}";
link_email_prompt = "{lang_link_email_prompt}";

list_type_prompt = "{lang_list_type_prompt}";
list_item_prompt = "{lang_list_item_prompt}";

tags = new Array();

function getarraysize(thearray) {
  for (i = 0; i < thearray.length; i++) {
    if ((thearray == "undefined") || (thearray == "") || (thearray == null)) {
      return i;
    }
  }
  return thearray.length;
}

function arraypush(thearray,value) {
  thearraysize = getarraysize(thearray);
  thearray[thearraysize] = value;
}

function arraypop(thearray) {
  thearraysize = getarraysize(thearray);
  retval = thearray[thearraysize - 1];
  delete thearray[thearraysize - 1];
  return retval;
}

function bbcode(theform,bbcode,prompttext) {
  inserttext = prompt(tag_prompt+"\n["+bbcode+"]xxx[/"+bbcode+"]",prompttext);
  if ((inserttext != null) && (inserttext != "")) {
    theform.comment_text.value += "["+bbcode+"]"+inserttext+"[/"+bbcode+"] ";
    theform.comment_text.focus();
  }
}

function namedlink(theform,thetype) {
  linktext = prompt(link_text_prompt,"");
  var prompttext;
  if (thetype == "URL") {
    prompt_text = link_url_prompt;
    prompt_contents = "http://";
  }
  else {
    prompt_text = link_email_prompt;
    prompt_contents = "";
  }
  linkurl = prompt(prompt_text,prompt_contents);
  if ((linkurl != null) && (linkurl != "")) {
    if ((linktext != null) && (linktext != "")) {
      theform.comment_text.value += "["+thetype+"="+linkurl+"]"+linktext+"[/"+thetype+"] ";
    }
    else {
      theform.comment_text.value += "["+thetype+"]"+linkurl+"[/"+thetype+"] ";
    }
  }
  theform.comment_text.focus();
}

function dolist(theform) {
  listtype = prompt(list_type_prompt, "");
  if ((listtype == "a") || (listtype == "1")) {
    thelist = "[list="+listtype+"]\n";
    listend = "[/list="+listtype+"] ";
  }
  else {
    thelist = "
    \n";
        listend = "
";
  }
  listentry = "initial";
  while ((listentry != "") && (listentry != null)) {
    listentry = prompt(list_item_prompt, "");
    if ((listentry != "") && (listentry != null)) {
      thelist = thelist+"
  • "+listentry+"\n";

    }
  }
  theform.comment_text.value += thelist+listend;
  theform.comment_text.focus();
}

function smilie(theform,smiliecode) {
  theform.comment_text.value += smiliecode;
  theform.comment_text.focus();
}

Is this bbcode.js okay?

But still I get an error message "error on this page" in MS Internet Explorer when I want write a comment in my guestbook.

THX by Flo
Title: Re: [MOD] guestbook
Post by: djith on November 03, 2005, 08:51:46 PM
Hello,
i'm about to install this mod... my template version is 1.7.1 ... will it work ? many people had troubles whit version 1.7.1...
what to correct or change to let it work in 1.7.1 ?

another question.... what to do whit install guestbook.php ?
the link http://your_4images_site/install_guestbook.php
seems dead to me and maybe it had the instructions how to use it .....

i think a guestbook on your site make the site more communicable to the site owner and find it very usefull .... so hopefull i can run it on my site :)

 
Title: Re: [MOD] guestbook
Post by: kief24 on November 03, 2005, 10:24:12 PM

another question.... what to do whit install guestbook.php ?
the link http://your_4images_site/install_guestbook.php
seems dead to me and maybe it had the instructions how to use it .....


upload install_guestbook.php to root folder
backup database
go to the link http://avatarcorner.com/install_guestbook.php
delete install_guestbook.php

 :wink:

Title: Re: [MOD] guestbook
Post by: Bear on November 04, 2005, 10:54:17 PM
working great with 1.7.1 and does pay to read all the posts/replies to find the answer for youe problems.

thanks to all
Title: Re: [MOD] guestbook
Post by: iicee on November 14, 2005, 02:43:09 PM
For spamming and bad word read;

http://www.4homepages.de/forum/index.php?topic=6989.msg51759#msg51759

Title: Re: [MOD] guestbook
Post by: lemccoy on November 16, 2005, 05:23:58 AM
I have a problem with the "edit" link for the admin.  Only thing that comes up is the Name that is editable and then "Your Homepage: " with no box or following text. any ideas?
Title: Re: [MOD] guestbook
Post by: Olphi on November 25, 2005, 10:14:27 PM
Salü

I am a Newbie in .php and i have no Idea what I should do:  Fatal error: Call to undefined function: get_smiles_text() in c:\appserv\www\gdc\guestbook.php on line 362 Paburmester had the same problem, but nobody helped him.....
I use the version 1.7.1!

My questions: - Can someone help me with the Fatal error....?
                        - Is it possible to post the full installation way with more details (eg. where can I place a link, that means i want the guestbook link on the leftside and the opened guestbook on the right side with the template style....)


Thanks for your help....
Title: Re: [MOD] guestbook
Post by: mawenzi on November 25, 2005, 10:54:51 PM
Fatal error: Call to undefined function: get_smiles_text()

Du hast keine Smiles-Funktion installiert ... und vorne war dazu zu lesen ...
Remove this line in guestbook.php
Code: [Select]
"smiles_text" => get_smiles_text(),


where can I place a link, that means i want the guestbook link on the leftside

in /templates/<dein_template>/unser_loginifo.html und user_logiform.html ... dann sind die Guestbook-Links in jedem Template (eingeloggt oder nicht-eingeloggt) im Menü zu finden ...

mawenzi
Title: Re: [MOD] guestbook
Post by: Olphi on November 25, 2005, 11:13:19 PM
Diese Zeile hab ich sicher gelöscht, kann ja die Postings auch lesen ;-) hat aber nichts gebracht....
Title: Re: [MOD] guestbook
Post by: mawenzi on November 25, 2005, 11:31:04 PM
diese Zeile ist 2x im Code zu finden also auch 2x zu löschen ...  :wink:
Title: Re: [MOD] guestbook
Post by: Olphi on November 26, 2005, 11:25:55 AM
Danke!!! Tip: wenn statt "line" "lines" stehen würde, wäre ich selbst darauf gekommen.....

Nun habe ich das Link problem immer noch nicht im Girff. "....4images/guestbook.php" funktioniert, ich kan posten, nur sehe ich die Einträge nirgends? Dazu steht darüber Kontrollzentrum, wo liegt der Fehler???

Ich habe wie schon am Anfang gezeigt die folgenden Schritte getan:


Hello.
I put everything in as you wrote,but in my main page ,there is no "Guestbook" to see.
What did I wrong?

here is the text of the link:



Code: [Select]
<td><img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" />{clickstream}</td>
<td align="right">
<a href="{url_guestbook}"><b>{Guestbook}</b></a>&nbsp;
<a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;
<a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;
Thanks for any lhelp


Open includes/page_header.php and find


Code: [Select]
"url_categories" => $site_sess->url(ROOT_PATH."categories.php"),


Add this after it

Code: [Select]
"lang_guestbook" => $lang['guestbook'],

Now you code should be


Code: [Select]
<td><img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" />{clickstream}</td>
<td align="right">
<a href="{url_guestbook}"><b>{lang_guestbook}</b></a>&nbsp;
<a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;
<a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;

------------------------------------------------------------------------------------------------------------------------


Ich verstehe den letzten Codeblock überhaupt nicht.....
Irgenwie will das einfach nicht klappen, es ist mir momentan gleich wo der Link zum Gästebuch steht, da ich das ja dann nachvollziehen kann und verändern kann.... Wie sieht das an einem konkreten Beispiel aus? Brauche mal zum verstehen detaillierte Angaben wo, was und wie, etc...!!!

Vielen Dank für Eure Ratschläge.....
 
Title: Re: [MOD] guestbook
Post by: Olphi on November 28, 2005, 10:23:50 PM
Endlich..........!!!! :lol:  Habs geschnallt!!!!

Nur noch eine kleine Frage: Wenn ich auf bearbeiten gehe, dann öffnet er immer ein neues Fenster! Ich möchte aber, dass er alles im selben macht!!!
Daneben möchte ich, dass ich gleich nach dem bearbeiten und löschen wieder die Gästebucheinträge anschauen kann! Wie mache ich das? (Bin mir wegen dem Php-Code nicht sicher....)
Title: Re: [MOD] guestbook
Post by: obmob01 on December 16, 2005, 01:05:38 AM
Suddenly i've been attacked by a spammer, i can't ban IP cause he seems to use dynamic IPs or something, and i can't ban the whole IP range ><

Is there a way to avoid this spam messages?

EDIT:
OH, found something to try to prevent some spam, i'll test it... but now i realize i can't edit posts or delete them by clicking on the guestbook link :(

When i click it opens new window but nothing happens or prompts me if i really want to delete the message.

Also am i supposed to see something new in admin's control panel? I see some options, but nothing to edit or delete the messages, any advice? :(
Title: Re: [MOD] guestbook
Post by: obmob01 on December 17, 2005, 03:08:31 AM
Not the best results so far, anyone knows if i can make posts in guestbook exclusive to registered members?
Title: Re: [MOD] guestbook - Probleme nach Serverumzug
Post by: Gray on December 29, 2005, 03:25:15 PM
Hallo, ich bin mit meiner Page auf einen anderen Server umgezogen.
Sowohl der Export als auch der Import haben gut funktioniert, aber
leider funktionieren jetzt einzelne Mods nicht mehr u.a. das Gästebuch
beim Aufruf kommt eine Fehlermeldung in der Form:
Table 'db xxxx .GUESTBOOK_TABLE' doesn't exist
Ich habe aber sämtliche Dateien sowohl der Page als auch der Datenbank
mit übertragen. Auch sämtliche Einträge im Gästebuch sind noch
vorhanden. Man kann Sie über PHPmyAdmin anschauen.

Wie kann ich dieses Problem lösen?
Title: Re: [MOD] guestbook
Post by: mawenzi on December 29, 2005, 07:22:16 PM
ist die "GUESTBOOK_TABLE" in deiner /includes/constants.php eingetragen ... ?
Code: [Select]
define('GUESTBOOK_TABLE', $table_prefix.'guestbook');
Title: Re: [MOD] guestbook
Post by: Acidgod on December 29, 2005, 07:47:57 PM
Also so wie ich ihn verstehe lief es ja vorher und ohne diesen Eintrag hätte es vorher ja nicht funzen können oder?
Title: Re: [MOD] guestbook
Post by: mawenzi on December 29, 2005, 07:54:59 PM
... man kann auch Tabellen einbinden ohne Prefix ...  :wink: ... das geht !
... ist aber natürlich nicht die elegante Art und Weise ...
... aber irgendetwas muss ja nun offensichtlich fehlen, wenn die Tabelle da ist (in der Datenbank) nur nicht erkannt wird.
... ich denke irgendwo muss eine Definition richtig gestellt werden !
Title: Re: [MOD] guestbook
Post by: Gray on December 29, 2005, 08:26:42 PM
Danke !
Ich habe ausversehen eine ältere Version der constants.php hochgeladen.
Alle anderen Änderungen sind in den entsprechenden dateien eingetragen
daher ist mir das beim durchschauen nicht aufgefallen  :oops:
Aber jetzt funzt wieder alles auch alle Einträge sind wieder sichtbar   :)

Also, nochmal danke !
Title: Re: [MOD] guestbook
Post by: rosi on January 25, 2006, 11:14:00 PM
moin
Quote
now download this file http://140.112.132.43/install_guestbook.zip
diese datei kann ich nicht downloaden da der server nicht gefunden wird
könnte evtl jemand den inhalt hier posten?
thx
rosi
Title: Re: [MOD] guestbook
Post by: DarkNeo on January 26, 2006, 09:47:06 PM
Hello,

Can someone help me please i searched the whole forum but nothing with my problem. This is my problem,

When i want to open www.mywebsite.com/foto/guestbook.php  than i see the next thing
Quote
"url_guestbook" => (!empty($url_guestbook)) ? $site_sess->url($url_guestbook) : $site_sess->url(ROOT_PATH."guestbook.php"),

Please let me know..

Thx
Title: Re: [MOD] guestbook
Post by: DarkNeo on January 27, 2006, 01:40:13 PM
Hello,

Can someone help me please i searched the whole forum but nothing with my problem. This is my problem,

When i want to open www.mywebsite.com/foto/guestbook.php  than i see the next thing
Quote
"url_guestbook" => (!empty($url_guestbook)) ? $site_sess->url($url_guestbook) : $site_sess->url(ROOT_PATH."guestbook.php"),

Please let me know..

Thx

I found the problem and now its working fine.
THX
Title: Re: [MOD] guestbook
Post by: Alex_Ok on January 29, 2006, 07:28:39 PM
Подскажите почему не выводятся сообщения на страничку гостевой, хотя в базу всё идёт нормально? :?:
Title: Re: [MOD] guestbook
Post by: Frebee on January 30, 2006, 01:45:47 AM
Hi !

Hab 2 Fehler

1. Ich finde keinen Link auf der Home Seite fürs Gästebuch !

2. Wenn ich direkt auf die Url gehe ./guestbook.php kommt zwar des gästebuch aber ohne den rest vom Template

Link : http://nmf.mine.nu/smc/4images/index.php

MfG Frebee

Title: Re: [MOD] guestbook
Post by: Miranda on February 11, 2006, 05:20:28 PM
Hi,

ich versuche auch gerade das Gästebuch einzubauen und mir fehlt die Datei "http://140.112.132.43/install_guestbook.zip"
Die Datei wurde auf dem Server nicht gefunden. Kann da evtl. jemand aushelfen ?

Danke,
Miranda
Title: Re: [MOD] guestbook
Post by: Olphi on February 11, 2006, 06:57:43 PM
 :wink:
Title: Re: [MOD] guestbook
Post by: TheOracle on February 11, 2006, 07:02:09 PM
A little security precaution from this installation file.

Find :

Quote

require(ROOT_PATH.'includes/sessions.php');


add below :

Code: [Select]

$user_access = get_permission();

if ($user_info['user_level'] != ADMIN) {
show_error_page($lang['no_permission']);
} ###### End of if statement.


Then, log in under your admin account and run this file after. Once successfully executed, you may delete this file. ;)
Title: Re: [MOD] guestbook
Post by: Miranda on February 11, 2006, 11:50:27 PM
:wink:

Danke  :D
Title: db trouble
Post by: Svenni70 on February 12, 2006, 02:21:26 PM
Hello

i get this after i run the install_guestbook.php

DB Error: Bad SQL Query: INSERT INTO 4images_1settings (setting_name, setting_value) VALUES ('guestbook_view', '1')
Duplicate entry 'guestbook_view' for key 1

DB Error: Bad SQL Query: INSERT INTO 4images_1settings (setting_name, setting_value) VALUES ('user_delete_guestbook', '0')
Duplicate entry 'user_delete_guestbook' for key 1

DB Error: Bad SQL Query: INSERT INTO 4images_1settings (setting_name, setting_value) VALUES ('guestbook_post', '1')
Duplicate entry 'guestbook_post' for key 1

DB Error: Bad SQL Query: INSERT INTO 4images_1settings (setting_name, setting_value) VALUES ('user_edit_guestbook', '0')
Duplicate entry 'user_edit_guestbook' for key 1

DB Error: Bad SQL Query: CREATE TABLE `4images_guestbook` ( `comment_id` mediumint(8) NOT NULL auto_increment, `user_name` varchar(100) NOT NULL default '', `comment_site` varchar(255) NOT NULL default '', `comment_date` int(10) unsigned NOT NULL default '0', `comment_text` text NOT NULL, `comment_ip` varchar(20) NOT NULL default '', PRIMARY KEY (`comment_id`), KEY `comment_date` (`comment_date`) ) TYPE=MyISAM
Table '4images_guestbook' already exists


maybe someone no wgat i can do to fix it

Svenni
Title: Re: [MOD] guestbook
Post by: IcEcReaM on February 13, 2006, 08:29:04 AM
Then you already executed the install before,
cause all needed DB entries are already made.

If you already had all other installtion steps,
you can try it now, it should work.
Title: Re: [MOD] guestbook
Post by: Svenni70 on February 13, 2006, 11:03:42 AM
when i trey to open the guestbook i get this message

Warning: Cannot send session cache limiter - headers already sent (output started at /home/sites/site6/web/foto/guestbook.php:2) in /home/sites/site6/web/foto/includes/sessions.php on line 84

DB Error: Bad SQL Query: SELECT COUNT(user_name) AS comments FROM 4images_1guestbook
Table 'svenn21.4images_1guestbook' doesn't exist

DB Error: Bad SQL Query: SELECT comment_id, user_name AS comment_user_name, comment_site, comment_text, comment_ip, comment_date FROM 4images_1guestbook ORDER BY comment_date DESC LIMIT 0, 8
Table 'svenn21.4images_1guestbook' doesn't exist

Fatal error: Call to undefined function: get_smiles_text() in /home/sites/site6/web/foto/guestbook.php on line 363
Title: Re: [MOD] guestbook
Post by: IcEcReaM on February 13, 2006, 11:57:02 AM
Look at your includes/constants.php
Search for the line:
Code: [Select]
define('GUESTBOOK_TABLE', $table_prefix.'1guestbook');
the line must be
Code: [Select]
define('GUESTBOOK_TABLE', $table_prefix.'guestbook');
if you can't find it, please post your constants.php here.
Title: Re: [MOD] guestbook
Post by: Svenni70 on February 13, 2006, 12:19:26 PM
i cheek the file,and it is the corect file

 define('GUESTBOOK_TABLE', $table_prefix.'guestbook');
Title: Re: [MOD] guestbook
Post by: TheOracle on February 13, 2006, 12:29:35 PM
Quote

Fatal error: Call to undefined function: get_smiles_text() in /home/sites/site6/web/foto/guestbook.php on line 363


In the mean time, you might want to follow the latest code block from the first post in order to remove the smilies line from guestbook.php file. ;)

Also, if you have the correct definition table from includes/constants.php file, which mySQL version are you using ? mySQL 5 probably ?
Title: Re: [MOD] guestbook
Post by: Svenni70 on February 13, 2006, 12:32:15 PM
hello

im new in this things  :roll: what is the latest code
Title: Re: [MOD] guestbook
Post by: IcEcReaM on February 13, 2006, 01:18:07 PM
hello

im new in this things  :roll: what is the latest code
^

he means the last error message with the smileys.
This problem has here solved already in the prevoius posts.

Title: Re: [MOD] guestbook
Post by: Svenni70 on February 13, 2006, 02:57:51 PM
no i only get this messages 

DB Error: Bad SQL Query: SELECT COUNT(user_name) AS comments FROM 4images_1guestbook
Table 'svenn21.4images_1guestbook' doesn't exist

DB Error: Bad SQL Query: SELECT comment_id, user_name AS comment_user_name, comment_site, comment_text, comment_ip, comment_date FROM 4images_1guestbook ORDER BY comment_date DESC LIMIT 0, 8
Table 'svenn21.4images_1guestbook' doesn't exist

i removed the get_smiles_text() line,and i can no se the page   http://www.svenni.net/foto/guestbook.php


my sql is mysql 3
Title: Re: [MOD] guestbook
Post by: IcEcReaM on February 13, 2006, 03:49:13 PM
as i already said,
please post your constants.php and guestbook.php here.
Title: Re: [MOD] guestbook
Post by: Svenni70 on February 13, 2006, 04:01:22 PM
here is the constants.php


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

// If 4images has problems to find out the right URL, define it here.
// define('SCRIPT_URL', 'http://www.yourdomain.com/4images'); //no trailing slash

// Table names
define('CATEGORIES_TABLE', $table_prefix.'categories');
define('COMMENTS_TABLE', $table_prefix.'comments');
define('GROUP_ACCESS_TABLE', $table_prefix.'groupaccess');
define('GROUP_MATCH_TABLE', $table_prefix.'groupmatch');
define('GROUPS_TABLE', $table_prefix.'groups');
define('IMAGES_TABLE', $table_prefix.'images');
define('IMAGES_TEMP_TABLE', $table_prefix.'images_temp');
define('LIGHTBOXES_TABLE', $table_prefix.'lightboxes');
define('POSTCARDS_TABLE', $table_prefix.'postcards');
define('SESSIONS_TABLE', $table_prefix.'sessions');
define('SESSIONVARS_TABLE', $table_prefix.'sessionvars');
define('SETTINGS_TABLE', $table_prefix.'settings');
define('USERS_TABLE', $table_prefix.'users');
define('WORDLIST_TABLE', $table_prefix.'wordlist');
define('WORDMATCH_TABLE', $table_prefix.'wordmatch');
define('GUESTBOOK_TABLE', $table_prefix.'guestbook');

// URL Parameters
define('URL_IMAGE_ID', 'image_id');
define('URL_CAT_ID', 'cat_id');
define('URL_USER_ID', 'user_id');
define('URL_POSTCARD_ID', 'postcard_id');
define('URL_COMMENT_ID', 'comment_id');
define('URL_PAGE', 'page');
define('URL_ID', 'id');


// User levels
define('GUEST', -1);
define('USER_AWAITING', 1);
define('USER', 2);
define('ADMIN', 9);


// Permission levels
define('AUTH_ALL', 0);
define('AUTH_USER', 2);
define('AUTH_ACL', 3);
define('AUTH_ADMIN', 9);


// Group types
define('GROUPTYPE_GROUP', 1);
define('GROUPTYPE_SINGLE', 2);


// Chmod for files and directories created by 4images
define('CHMOD_FILES', 0666);
define('CHMOD_DIRS', 0777);


// Will be used to replace the {xxx} tage if the value is empty.
// Netscape Browser sometimes need this to display table cell background colors.
define('REPLACE_EMPTY', '&nbsp;');


// Max rating value
define('MAX_RATING', 5);


// Days postcards will be held in the database
define('POSTCARD_EXPIRY', 10);


// Time offset for your website. Sometimes usefull if your server is located
// in other timezones.
define('TIME_OFFSET', 0);


// All words <= MIN_SEARCH_KEYWORD_LENGTH and >= MAX_SEARCH_KEYWORD_LENGTH
// are not added to the search index
define('MIN_SEARCH_KEYWORD_LENGTH', 3);
define('MAX_SEARCH_KEYWORD_LENGTH', 25);

// If you set this to 1, admins will authenticated additionally with cookies.
// If you use "User Integration", you should set this to 0.
define('ADMIN_SAFE_LOGIN', 0);


// If you use GD higher 2.0.1 and PHP higher 4.0.6 set this to 1.
// Your thumbnails will be created with better quality
define('CONVERT_IS_GD2', 0);


// If you have a lot of images in your database,
// the random image function could make your programm slow.
// Try first to set "SHOW_RANDOM_CAT_IMAGE" to 0.
define('SHOW_RANDOM_IMAGE', 1);
define('SHOW_RANDOM_CAT_IMAGE', 0);


// Check existence of remote image files.
// If you choose 1, you could get sometimes timeout errors
define('CHECK_REMOTE_FILES', 0);


// Allow execution of PHP code in templates
define('EXEC_PHP_CODE', 1);

// Data paths
define('MEDIA_DIR', 'data/media');
define('THUMB_DIR', 'data/thumbnails');
define('MEDIA_TEMP_DIR', 'data/tmp_media');
define('THUMB_TEMP_DIR', 'data/tmp_thumbnails');
define('DATABASE_DIR', 'data/database');
define('TEMPLATE_DIR', 'templates');


// Script version
define('SCRIPT_VERSION', '1.7.1');


// Debug contants
// define("PRINT_STATS", 1);
// define("PRINT_QUERIES", 1);
// define('PRINT_CACHE_MESSAGES', 1);

?>
Title: Re: [MOD] guestbook
Post by: Svenni70 on February 13, 2006, 04:02:40 PM
here is the guestbook.php


<?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                                                  *
 *                                                                        *
 *    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 = 'guestbook';
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 ($config['guestbook_view'] != 1) {
  header("Location: ".$site_sess->url(ROOT_PATH."index.php"));
  exit;
}

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

if (isset($HTTP_GET_VARS[URL_COMMENT_ID]) || isset($HTTP_POST_VARS[URL_COMMENT_ID])) {
  $comment_id = (isset($HTTP_GET_VARS[URL_COMMENT_ID])) ? intval($HTTP_GET_VARS[URL_COMMENT_ID]) : intval($HTTP_POST_VARS[URL_COMMENT_ID]);
}
else {
  $comment_id = 0;
}
if ($action == "deletecomment") {
  if (!$comment_id || ($config['user_delete_guestbook'] != 1 && $user_info['user_level'] != ADMIN)) {
    show_error_page($lang['no_permission']);
    exit;
  }
 
  $sql = "SELECT comment_id, comment_ip
          FROM ".GUESTBOOK_TABLE."
          WHERE comment_id = $comment_id";
  $comment_row = $site_db->query_firstrow($sql);
  if (!$comment_row || ($comment_row['comment_ip'] != $session_info['session_ip'] && $user_info['user_level'] != ADMIN)) {
    show_error_page($lang['no_permission']);
    exit;
  }
 
  $txt_clickstream = $lang['comment_delete'];
 
  $sql = "DELETE FROM ".GUESTBOOK_TABLE."
          WHERE comment_id = $comment_id";
  $result = $site_db->query($sql);
 
  $msg = ($result) ? $lang['comment_delete_success'] : $lang['comment_delete_error'];
}

if ($action == "removecomment") {
  if (!$comment_id || ($config['user_delete_guestbook'] != 1 && $user_info['user_level'] != ADMIN)) {
    header("Location: ".$site_sess->url($url, "&"));
    exit;
  }

  $sql = "SELECT comment_id, user_name AS comment_user_name, comment_site, comment_text, comment_ip
          FROM ".GUESTBOOK_TABLE."
          WHERE comment_id = $comment_id";
  $comment_row = $site_db->query_firstrow($sql);
  if (!$comment_row || ($comment_row['comment_ip'] != $session_info['session_ip'] && $user_info['user_level'] != ADMIN)) {
    header("Location: ".$site_sess->url($url, "&"));
    exit;
  }

  $txt_clickstream = $lang['comment_delete'];
  $comment_user_name = $comment_row['comment_user_name'];
 
  $site_template->register_vars(array(
    "comment_id" => $comment_id,
    "comment_user_name" => htmlspecialchars($comment_user_name),
    "comment_site" => format_text($comment_row['comment_site'], 0, $config['wordwrap_comments'], 0, 0),
    "comment_text" => format_text($comment_row['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
    "lang_delete_comment" => $lang['comment_delete'],
    "lang_delete_comment_confirm" => $lang['comment_delete_confirm'],
    "lang_name" => $lang['name'],
    "lang_site" => $lang['site'],
    "lang_comment" => $lang['comment'],
    "lang_submit" => $lang['submit'],
    "lang_reset" => $lang['reset'],
    "lang_yes" => $lang['yes'],
    "lang_no" => $lang['no']
  ));
  $contents = $site_template->parse_template("guestbook_deletecomment");
}

if ($action == "updatecomment") {
  if (!$comment_id || ($config['user_edit_guestbook'] != 1 && $user_info['user_level'] != ADMIN)) {
    show_error_page($lang['no_permission']);
    exit;
  }
  $sql = "SELECT comment_id, comment_ip
          FROM ".GUESTBOOK_TABLE." 
          WHERE comment_id = $comment_id";
  $comment_row = $site_db->query_firstrow($sql);
  if (!$comment_row || ($comment_row['comment_ip'] != $session_info['session_ip'] && $user_info['user_level'] != ADMIN)) {
    show_error_page($lang['no_permission']);
    exit;
  }
 
  $txt_clickstream = $lang['comment_edit'];
 
  $error = 0;
 
  $comment_site = un_htmlspecialchars(trim($HTTP_POST_VARS['comment_site']));
  $comment_text = un_htmlspecialchars(trim($HTTP_POST_VARS['comment_text']));
  $comment_user_name = un_htmlspecialchars(trim($HTTP_POST_VARS['comment_user_name']));
 
  if ($comment_user_name == "")  {
      $msg .= (($msg != "") ? "<br />" : "").$lang['name_required'];
      $error = 1;
    } elseif ($site_db->not_empty("SELECT user_name FROM ".
                              GUESTBOOK_TABLE.
                           " WHERE user_name= '".strtolower($comment_user_name)."' AND comment_date > ".(time()-60 * 60 * 24))) {
      $msg .= (($msg != "") ? "<br />" : "").$lang['username_exists'];
      $error = 1;
   }
    if ($comment_text == "")  {
      $msg .= (($msg != "") ? "<br />" : "").$lang['comment_required'];
      $error = 1;
    }

   if (!$error)  {
      if ($comment_site =="http://") {
         $comment_site = "";
      }
      $sql = "UPDATE ".GUESTBOOK_TABLE."
               SET comment_site = '$comment_site', comment_text = '$comment_text', user_name= '$comment_user_name'
            WHERE comment_id = $comment_id";
      $result = $site_db->query($sql);
      $msg = ($result) ? $lang['comment_edit_success'] : $lang['comment_edit_error'];
   } else {
      $action = "editcomment";
      $sendprocess = 1;
   }
}

if ($action == "editcomment") {
  if (!$comment_id || ($config['user_edit_guestbook'] != 1 && $user_info['user_level'] != ADMIN)) {
    show_error_page($lang['no_permission']);
    exit;
  }

  $sql = "SELECT comment_id, user_name AS comment_user_name, comment_site, comment_text, comment_ip
          FROM ".GUESTBOOK_TABLE."
        WHERE comment_id = $comment_id";
  $comment_row = $site_db->query_firstrow($sql);
  if (!$comment_row || ($comment_row['comment_ip'] != $session_info['session_ip'] && $user_info['user_level'] != ADMIN)) {
    show_error_page($lang['no_permission']);
    exit;
  }
 
  $txt_clickstream = $lang['comment_edit'];

  $comment_site = (isset($HTTP_POST_VARS['comment_site'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['comment_site']))) : (empty($comment_row['comment_site']) ? "http://" : $comment_row['comment_site']);
  $comment_text = (isset($HTTP_POST_VARS['comment_text'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['comment_text']))) : $comment_row['comment_text'];
  $comment_user_name = (isset($HTTP_POST_VARS['comment_user_name'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['comment_user_name']))) : $comment_row['comment_user_name'];

  $bbcode = "";
  if ($config['bb_comments'] == 1) {
    $site_template->register_vars(array(
      "lang_bbcode" => $lang['bbcode'],
     "smiles_text" => get_smiles_text(),
      "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(
    "bbcode" => $bbcode,
    "comment_id" => $comment_id,
    "comment_user_name" => htmlspecialchars($comment_user_name),
    "comment_site" => htmlspecialchars($comment_site),
    "comment_text" => htmlspecialchars($comment_text),
    "lang_edit_comment" => $lang['comment_edit'],
    "lang_name" => $lang['name'],
    "lang_site" => $lang['site'],
    "lang_comment" => $lang['comment'],
    "lang_submit" => $lang['submit'],
    "lang_reset" => $lang['reset'],
    "lang_yes" => $lang['yes'],
    "lang_no" => $lang['no'],
  ));
  $contents = $site_template->parse_template("guestbook_editcomment");
}

//-----------------------------------------------------
//--- Save Comment ------------------------------------
//-----------------------------------------------------
$error = 0;
if ($action == "postcomment" && $config['guestbook_post'] == 1) {
    $comment_user_name = un_htmlspecialchars(trim($HTTP_POST_VARS['comment_user_name']));
    $comment_text = un_htmlspecialchars(trim($HTTP_POST_VARS['comment_text']));
   $comment_site = un_htmlspecialchars(trim($HTTP_POST_VARS['comment_site']));
    // Flood Check
   $sql = "SELECT comment_ip, comment_date
              FROM ".GUESTBOOK_TABLE."
         WHERE comment_ip = '".$session_info['session_ip']."' 
         ORDER BY comment_date DESC
         LIMIT 1";
   $spam_row = $site_db->query_firstrow($sql);
   $spamtime = $spam_row['comment_date'] + 360;

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

   if ($comment_user_name == "")  {
      $msg .= (($msg != "") ? "<br />" : "").$lang['name_required'];
      $error = 1;
    } elseif ($site_db->not_empty("SELECT user_name FROM ".
                              GUESTBOOK_TABLE.
                           " WHERE user_name= '".strtolower($comment_user_name)."' AND comment_date > ".(time()-60 * 60 * 24))) {
      $msg .= (($msg != "") ? "<br />" : "").$lang['username_exists'];
      $error = 1;
   }
    if ($comment_text == "")  {
      $msg .= (($msg != "") ? "<br />" : "").$lang['comment_required'];
      $error = 1;
    }

   if (!$error)  {
      if ($comment_site =="http://") {
         $comment_site = "";
      }
      $sql = "INSERT INTO ".GUESTBOOK_TABLE."
               (user_name, comment_site, comment_text, comment_ip, comment_date)
            VALUES
            ('$comment_user_name', '$comment_site', '$comment_text', '".$session_info['session_ip']."', ".time().")";
      $site_db->query($sql);
   }
   unset($spam_row);
}


//-----------------------------------------------------
//---Show Guestbook Comments---------------------------
//-----------------------------------------------------

if (($action == "showcomments" || $action == "postcomment" ) && $config['guestbook_view'] == 1) {
     if (isset($HTTP_POST_VARS['commentsetperpage']) || isset($HTTP_GET_VARS['commentsetperpage'])) {
      $commentsetperpage = (intval($HTTP_POST_VARS['commentsetperpage']) ) ? intval($HTTP_POST_VARS['commentsetperpage']) : intval($HTTP_GET_VARS['commentsetperpage']);
      if ($commentsetperpage) {
         $site_sess->set_session_var("commentperpage", $commentsetperpage);
         $session_info['commentperpage'] = $commentsetperpage;
      }
   }

   if (isset($session_info['commentperpage'])) {
      $commentperpage = $session_info['commentperpage'];
   } else {
      $commentperpage = 8;
   }
 
   $sql = "SELECT COUNT(user_name) AS comments
          FROM ".GUESTBOOK_TABLE;
   $result = $site_db->query_firstrow($sql);
   $num_comments = $result['comments'];
   $site_db->free_result();
   $num_rows_all = (isset($num_comments)) ? $num_comments : 0;
   $link_arg = $site_sess->url(ROOT_PATH."guestbook.php"); 
   include_once(ROOT_PATH.'includes/paging.php');
   $getpaging = new Paging($page, $commentperpage, $num_rows_all, $link_arg);
   $offset = $getpaging->get_offset();
   $site_template->register_vars(array(
        "paging" => $getpaging->get_paging(),
      "paging_stats" => $getpaging->get_paging_stats()
   ));

   $sql = "SELECT comment_id, user_name AS comment_user_name, comment_site, comment_text, comment_ip, comment_date
         FROM ".GUESTBOOK_TABLE."
         ORDER BY comment_date DESC
         LIMIT $offset, $commentperpage";
 
   $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);
   $comments = "";
   
   $site_template->register_vars(array(
        "lang_guest_from" => $lang['guest_from'],
      "lang_guest_site" => $lang['guest_site']
   ));
   if ($num_comments) {
      $bgcounter = 0;
      for ($i = 0; $i < $num_comments; $i++) {
         $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;

         $comment_user_name = htmlspecialchars($comment_row[$i]['comment_user_name']);
         $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."guestbook.php?action=editcomment&amp;comment_id=".
                                         $comment_row[$i]['comment_id']).
                          "\" target=\"admin_edit\">".$lang['edit']."</a>&nbsp;";
            $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."guestbook.php?action=removecomment&amp;comment_id=".$comment_row[$i]['comment_id'])."\" target=\"admin_edit\">".$lang['delete']."</a>";
         } elseif ($comment_row[$i]['comment_ip'] == $session_info['session_ip']) { // if ip equals, permit to edit
            $admin_links .= ($config['user_edit_guestbook'] != 1) ? "" :
                          "<a href=\"".$site_sess->url(ROOT_PATH."guestbook.php?action=editcomment&amp;comment_id=".$comment_row[$i]['comment_id'])."\" target=\"admin_edit\">".$lang['edit']."</a>&nbsp;";
            $admin_links .= ($config['user_delete_guestbook'] != 1) ? "" :
                          "<a href=\"".$site_sess->url(ROOT_PATH."guestbook.php?action=removecomment&amp;comment_id=".$comment_row[$i]['comment_id'])."\" target=\"admin_edit\">".$lang['delete']."</a>";
         }
         $site_template->register_vars(array(
            "comment_id" => $comment_row[$i]['comment_id'],
            "comment_user_name" => $comment_user_name,
            "comment_user_ip" => $comment_user_ip,
            "comment_site" => format_text($comment_row[$i]['comment_site'], 0, $config['wordwrap_comments'], 0, 0),
            "comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
            "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("guestbook_comment_bit");
         
      } // end for
   } else {
      $comments = $lang['be_the_first'];
   }
   //---End Show Guestbook Comments----


  //-----------------------------------------------------
  //--- BBCode & Form -----------------------------------
  //-----------------------------------------------------
  $bbcode = "";
  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");
  }

  if ($config['guestbook_post'] != 1) {
     $comment_form = "";
  } else {
  $comment_user_name = (isset($HTTP_POST_VARS['comment_user_name']) && $error) ? stripslashes(htmlspecialchars(trim($HTTP_POST_VARS['comment_user_name']))) : (($user_info['user_level'] != GUEST) ? htmlspecialchars($user_info['user_name']) : "");
  $comment_site = (isset($HTTP_POST_VARS['comment_site']) && $error) ? stripslashes(htmlspecialchars(trim($HTTP_POST_VARS['comment_site']))) : "http://";

  $site_template->register_vars(array(
     "bbcode" => $bbcode,
      "comment_user_name" => $comment_user_name,
      "comment_site" => $comment_site,
      "comment_text" => $comment_text,
      "lang_post_guestbook" => $lang['post_guestbook'],
      "lang_name" => $lang['name'],
      "lang_site" => $lang['site'],
      "lang_comment" => $lang['comment']
    ));
    $comment_form = $site_template->parse_template("guestbook_form");
   $site_template->register_vars("guestbook_form", $comment_form);
   $contents = $site_template->parse_template("guestbook_showcomments");
   unset($comment_form);
  } // end if allow_comments
  $txt_clickstream = $lang['post_guestbook'];
}

//-----------------------------------------------------
//---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."guestbook.php?action=showcomments")."\">".$lang['guestbook']."</a>".$config['category_separator'].$txt_clickstream."</span>";

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  "contents" => $contents,
  "guestbook_comments" => $comments,
  "lang_sign_my_guestbook" => $lang['sign_my_guestbook'],
  "msg" => $msg,
  "clickstream" => $clickstream
));
unset($contents);
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');

?>
Title: Re: [MOD] guestbook
Post by: TheOracle on February 13, 2006, 04:31:24 PM
I have another question over this :

Quote

my sql is mysql 3


Could you tell, from your phpinfo page, the 'exact build number' of mySQL 3 ? 4images requires a minimum version build of mySQL 3 actually. ;)
Title: Re: [MOD] guestbook
Post by: IcEcReaM on February 13, 2006, 05:04:36 PM
Let me guess.

You are not using the default 4images config?

You have set your own table_prefix?

$table_prefix = "4images_1"; in your config.php?

If yes, than that is the error,
cause the installtion script doesn't read the info for the table prefix.

I attached you an correct installer.
Run this, then it should work.
Title: Re: [MOD] guestbook
Post by: Svenni70 on February 13, 2006, 05:56:25 PM
no i get away the wrong message but i loose my image so i upload but thats ok i can upload it again,

http://www.svenni.net/foto/guestbook.php

when i try to post a message in the guestbook i can not se it after
Title: Re: [MOD] guestbook
Post by: TheOracle on February 13, 2006, 06:00:30 PM
Sounds like you're looking to access your guestbook remotely. Is it the case ?
Title: Re: [MOD] guestbook
Post by: Svenni70 on February 13, 2006, 06:08:06 PM
i really dont no,i have follow the steps in the begining of this post 
Title: Re: [MOD] guestbook
Post by: elvedix on March 02, 2006, 08:06:44 PM
Also a big thank you from me

Can anybody tell me, how can i only allow registered user to write into the book`?


guestbook.php

After
 
Code: [Select]
include(ROOT_PATH.'includes/page_header.php');
Add
Code: [Select]
if ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER_AWAITING) {
  show_error_page($lang['no_permission']);
  exit;
}
Title: Re: [MOD] guestbook
Post by: Fastian on March 14, 2006, 03:10:09 PM
Is this possible to use some other filed while submitting in the Guestbook.
Like e-mail & Country ??

How can i Enable Smiles in guestbook post.
Title: Re: [MOD] guest book
Post by: Bear on March 22, 2006, 08:26:43 AM
I realise that this is a guest book, for guests.  :wink:

I am having a problem with looks like one of those advertiser bots and i am getting loads of bulk advert links posted on the guest book.
Quote
wow!!! . http://casino-royale.gamblingand.net/casino-royale-script.htm * http://lott (22.03.2006 06:55)
wow!!! . http://casino-royale.gamblingand.net/casino-royale-script.htm * http://lotto.fcpages.com/lotto-super-7.htm * http://bankrupt.prevedmundo.com/credit-card-bankrupt.htm * http://benzene.prevedmundo.com/benzene-intermediate.htm * http://black-jack.gamblingand.net/black-casino-jack.htm  
Homepage: wow!!! . [url]http://casino-royale.gamblingand.net/casino-royale-script.htm * http://lotto.fcpages.com/lotto-super-7.htm * http://bankrupt.prevedmundo.com/credit-card-bankrupt.htm * [url]http://benzene.prevedmundo.com/benzene-  

Tried banning them by ip but the ip keeps changing, any one have any ideas to stop them or if not how can i change the permissions for members only as an alternative cure.

Thank you
Title: Re: [MOD] guestbook
Post by: Fastian on March 22, 2006, 10:40:53 AM
I installed the guest book a week ago, I did some modification, installed smiles & comment spam check.
2 days ago, when I checked my guestbook, everything was working fine. I posted some msgs to test and it was all right.

Today I decided to make the guest book available for users. (Was doing test myself before)

But when I opened the guestbook. I got this error msg
Code: [Select]
DB Error: Bad SQL Query: SELECT COUNT(user_name) AS comments FROM GUESTBOOK_TABLE
Table 'mysite_wallpaper.GUESTBOOK_TABLE' doesn't exist

DB Error: Bad SQL Query: SELECT comment_id, user_name AS comment_user_name, comment_site, comment_text, comment_ip, comment_date FROM GUESTBOOK_TABLE ORDER BY comment_date DESC LIMIT 0, 8
Table 'mysite_wallpaper.GUESTBOOK_TABLE' doesn't exist

I havn't changed anything since last 2 days.
Why i m getting this error ??  Help Please.  :(
Title: Re: [MOD] guestbook
Post by: mawenzi on March 22, 2006, 10:52:54 AM
Why i m getting this error ??

because :
'mysite_wallpaper.GUESTBOOK_TABLE' doesn't exist
Title: Re: [MOD] guestbook
Post by: Fastian on March 22, 2006, 10:58:54 AM
BUT 2 days ago, everything was working just fine  :(

How a table from database can be deleted ??  ( I m going to check my DB)

And if this is the case, what I can I do to remove this error??
 
Install database update from guestbook mode once again??

//Edited

Ok I checked my DB. The table is still there. I do have my old entries in it. Something else is wrong.
Title: Re: [MOD] guestbook
Post by: mawenzi on March 22, 2006, 11:24:22 AM
1. check your DB with myPhpAdmin if GUESTBOOK_TABLE exist
2. if GUESTBOOK_TABLE exist check your includes/constants.php
Code: [Select]
define('GUESTBOOK_TABLE', $table_prefix.'guestbook');

Title: Re: [MOD] guestbook
Post by: Fastian on March 22, 2006, 11:32:02 AM
Oopssss  :oops:

Sorry for the trouble.
 
While editing the Time-Zone setting i mistakenly uploaded the old constants.php file.

Didn’t remember this change

Thanks  mawenzi
Title: Re: [MOD] guestbook
Post by: mawenzi on March 22, 2006, 11:52:11 AM
... but I hope you are a good learner ...  :wink:
Title: Re: [MOD] guestbook
Post by: waleed on April 09, 2006, 01:15:47 AM
theres away to make a security code before click the post ? ( for spammers )
Title: Re: [MOD] guestbook
Post by: Flo2005 on April 09, 2006, 01:25:48 AM
View this MOD from IceCream -> http://www.4homepages.de/forum/index.php?topic=12268.0

Or this one from gheelho -> http://www.4homepages.de/forum/index.php?topic=11405.0
Title: Re: [MOD] guestbook
Post by: waleed on April 09, 2006, 02:05:33 AM
Thanks alot
Title: Re: [MOD] guestbook
Post by: havanna on April 13, 2006, 11:33:20 AM
Hallo Zusammen

Wie kann ich es hinbekommen, das ich die Gästebucheinträge freischalten muss, bevor sie im Gästebuch zu erkennen sind.
Ich verwende noch die 1.7 

Dirk
Title: Re: [MOD] guestbook
Post by: IWS_steffen on April 17, 2006, 10:32:39 AM
toller Guestbook MOD

klappt alles super. Danke

Grüsse aus Hamburg

Steffen
Title: Re: [MOD] guestbook
Post by: Stebo83 on April 18, 2006, 10:12:29 AM
Hallo!

Wie beschränke ich die Gästebucheinträge pro Seite d.h. wo gebe ich an, wieviele Einträge pro Seite angezeigt werden?

Gruß und vielen Dank schon mal für die Antwort.

How do I limit the guest book entries per side i.e. where I indicate, how many entries per side are indicated?
Title: Re: [MOD] guestbook
Post by: Stebo83 on April 21, 2006, 08:53:38 PM
Hat keiner eine Lösung zu meinem Problem????  :cry:
Title: Re: [MOD] guestbook
Post by: IcEcReaM on April 21, 2006, 09:11:07 PM
das:

Code: [Select]
   if (isset($session_info['commentperpage'])) {
      $commentperpage = $session_info['commentperpage'];
   } else {
      $commentperpage = 8;
   }
ändern in:
Code: [Select]
$commentperpage = xx;
wobei xx die anzahl ist.
Title: Re: [MOD] guestbook
Post by: Stebo83 on April 22, 2006, 06:05:24 PM
Vielen Dank!
Title: Re: [MOD] guestbook
Post by: e-trader_2002 on April 23, 2006, 04:55:50 PM
Hi IcEcReaM,

habe heute Deinen MOD unter 4images 1.7.2 installiert. Klappt soweit alles super, dafür vielen Dank.
Mir ist noch eine Kleinigkeit im ACP (Admin Control Panel) aufgefallen, die sich wahrscheinlich ohne großen Aufwand beheben läßt:

Der Link oben im ACP zu den Gästebuch-Einstellungen funktioniert bei mir nicht, d. h. beim Anklicken erfolgt keine entsprechende Positionierung innerhalb der Seite.

Bitte poste doch bei Gelegenheit, wo welche Code-Änderungen zu machen sind, damit auch das funktioniert.

Vielen Dank im voraus
Title: Re: [MOD] guestbook
Post by: Stebo83 on April 27, 2006, 09:20:29 PM
Zum Gästebuch hätte ich noch eine Frage:

Welche Zeile in der guestbook.php muss ich ersetzen, damit beim Eintragsformular im Punkt "Hompepage" "http://" als Vorgabe nicht angezeigt wird.

Vielen Dank schon für Eure Hilfe.
Title: Re: [MOD] guestbook
Post by: Stebo83 on April 30, 2006, 01:55:52 PM
Hat sich erledigt!!!!
Title: Re: [MOD] guestbook
Post by: TheBrain99 on May 01, 2006, 12:47:19 PM
Great Mod, Thx  :D
Title: Re: [MOD] guestbook
Post by: sbex55 on May 13, 2006, 03:19:52 PM
Hello.  Could someone provide me the code change to 1.7.2 to get the GuestBook link displayed on my site?  I've added the code to get it working but I don't like the location of the link.  I would like to add the link on the clickstream line right before the 'Top Images  New Images" links.

Thanks for the help!

Scott
Title: Re: [MOD] guestbook
Post by: b.o.fan on June 04, 2006, 11:26:24 AM
hello

if you installed this [MOD] Country flags (based on IP) in whos online in ACP http://www.4homepages.de/forum/index.php?topic=6709.0

you can show the flag of the guestbook writer in the entry.

open

guestbook.php an find:

Code: [Select]
$site_template->register_vars(array(
"comment_id" => $comment_row[$i]['comment_id'],

Replace this with:
Code: [Select]
    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 : 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>";

      $site_template->register_vars(array(
            "comment_id" => $comment_row[$i]['comment_id'],
            "comment_user_flag" => $comment_user_flag,

Then open your template/<your template>/guestbook_comment_bit.html

there you can use {comment_user_flag} to show the flag!

b.o.fan
Title: Re: [MOD] guestbook
Post by: Stoleti on June 07, 2006, 03:43:07 AM
any ideia about  insert member profile pic in guestbook comments ? or avatar ....

 :?:
Title: Re: [MOD] guestbook
Post by: b.o.fan on June 07, 2006, 12:30:33 PM
hello to all:

i ve my guestbook.php on www.wartenaufen15.de

but the user can't make entrys.

in ACP all is on.

here is my guestbook.php


thx for help!

SOLVED
Title: Re: [MOD] guestbook
Post by: Stoleti on June 08, 2006, 01:50:28 AM
Another question... about added headline ??
Title: Re: [MOD] guestbook
Post by: b.o.fan on June 11, 2006, 09:53:26 PM
hello to all:

i ve my guestbook.php on www.wartenaufen15.de

but the user can't make entrys.

in ACP all is on.

here is my guestbook.php


thx for help!

nobody can help?

here is my guestbook_form.html#

SOLVED
Title: Re: [MOD] guestbook
Post by: havanna28 on August 23, 2006, 12:33:53 PM
Hallo zusammen

wenn ich die install_guestbook starten möchte bekomme ich immer wieder folgende Fehlermeldung angezeigt...
An unexpected error occured. Please try again later.

An unexpected error occured. Please try again later.

An unexpected error occured. Please try again later.

An unexpected error occured. Please try again later.


Hat jemand eine Idee woran das liegen kann?

Dirk
Title: Re: [MOD] guestbook
Post by: *Marco* on August 24, 2006, 12:29:27 AM
Hello there,

Has anyone build this MOD successfully into version 1.7.3  :?:
I did, but I'm getting no responce when I open .../guestbook.php in my root.
Or do I need to do any changes in the SQL-statements :?:
Title: Re: [MOD] guestbook
Post by: dzsin on August 27, 2006, 04:50:25 PM
Hi

I tried to install this mod with the 1.7.3. doesnt work correctly.

Code: [Select]
An unexpected error occured. Please try again later.

An unexpected error occured. Please try again later.

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampplite\htdocs\gallery\includes\db_mysql.php on line 171

An unexpected error occured. Please try again later.

If i click guestbook (load the guestbook.php) i can see a form and the message An unexpected error occured. Please try again later. if i want to add a message the error above happens.

anyone knows why?
Title: Re: [MOD] guestbook
Post by: his-luke on August 30, 2006, 08:50:43 PM
http://his.web.my-ct.de/pics/guestbook.php

any sugestions?

strange that there are no comments shown but pages oO
Title: Re: [MOD] guestbook
Post by: markus1689 on August 31, 2006, 03:08:30 AM
http://his.web.my-ct.de/pics/guestbook.php

any sugestions?

strange that there are no comments shown but pages oO
I've the same problem!!!!
there are no comments shown (they are in the database) but always the form to create enteries.

please help!!!

thanks markus
Title: Re: [MOD] guestbook
Post by: robi1a on August 31, 2006, 02:32:06 PM
Hi!

I have the same problem with version 1.7.3!!
I can only see the form to create my entries.

All the entries are in the database but nothing is shown!

How knows the trick to change the guestbook.php so that
the guestbook entries are displayed correctly????

Robert
Title: Re: [MOD] guestbook
Post by: juliano on September 02, 2006, 03:04:07 AM
Put this in your template file:

{if msg}<br /><b>{msg}</b>{endif msg}
                  <br />
                  {guestbook_comments}
                  {contents}

Anyone put captcha code at guestbook?
Title: Re: [MOD] guestbook
Post by: paburmester on September 22, 2006, 05:36:30 AM
hi, this mod is supported by 1.7.3? please someone let me know to install it
regards
Title: Re: [MOD] guestbook
Post by: Darkness2001 on September 22, 2006, 11:41:35 PM
This you have to write in your template (f.e. guestbook.html).

Code: [Select]
<span class="title">{lang_guestbook}</span>
                  <hr size="1" />
                  {if msg}<b>{msg}</b><br /><br />{endif msg}<br>
              {guestbook_comments}<br>{contents}
              <p>&nbsp;</p>
            </td>

I have copy the home.html. Rename it to guestbook.html and deleted the code in the middle column. That I copied this code above and ready.

Hallo,

is allready running...  :D

Klappt alles wenn man nur das richtige einbaut ;-)

Grüße Darkness
Title: Re: [MOD] guestbook
Post by: Flo2005 on October 01, 2006, 08:55:59 PM
You have 4images 1.7.3 and want to use the captcha function for this guestbook MOD?

I have done a little tutorial: http://www.4homepages.de/forum/index.php?topic=14873.0

Ciao by Flo[/b]
Title: Re: [MOD] guestbook
Post by: dzsin on October 06, 2006, 08:56:40 PM
It does work for 1.7.3

For everybody with database problems. check if your prefix for the table guestbook maches with the prefixes of your other tables...

ex.

default is 4images_guestbook

if you change the prefix when you install 4images to something else (gallery_) change the guestbook prefix manually in phpmyadmin as it automatically creates 4images_guestbook and not gallery_guestbook

that worked for me...
Title: Re: [MOD] guestbook
Post by: Flo2005 on October 14, 2006, 09:32:44 AM
When I want to edit a guestbook comment, it says: username still exists

Thats right but...
Title: Re: [MOD] guestbook - delete comments on the control panel
Post by: fgabriel on November 10, 2006, 08:17:44 PM
how can i delete comments on the control panel
any chance?
i couldnt delete in user session because i dont login in my site
i use control panel to set all and upload photos
 :roll:
Title: Re: [MOD] guestbook
Post by: Alessio on November 19, 2006, 12:47:42 PM
When I want to edit a guestbook comment, it says: username still exists

Thats right but...

Hi Flo,
here's the solution:

Quote

Johnny_H wrote:
Works fine this mod  

but i have a little slight problem...

"User name already exists."

when i try to post an entry.... seems only one nick can post.. how to disable?

It is set to restrict one nick can post once each day. If you want to disable it. Find two times in guestbook.php

Code: [Select]
if ($comment_user_name == "")  {
      $msg .= (($msg != "") ? "<br />" : "").$lang['name_required'];
      $error = 1;
    } elseif ($site_db->not_empty("SELECT user_name FROM ".
                              GUESTBOOK_TABLE.
                           " WHERE user_name= '".strtolower($comment_user_name)."' AND comment_date > ".(time()-60 * 60 * 24))) {
      $msg .= (($msg != "") ? "<br />" : "").$lang['username_exists'];
      $error = 1;
   }


change them to
Code: [Select]
if ($comment_user_name == "")  {
      $msg .= (($msg != "") ? "<br />" : "").$lang['name_required'];
      $error = 1;
    }
Title: Re: [MOD] guestbook
Post by: mikevid on November 21, 2006, 07:39:28 PM
I have this mod and working great in one installation, and I'm trying to install it for another site.  I really like this mod, so much that I'm installing it again!  :)

I'm using a clean installation of 1.7.3 but I'm getting an error whenever I load it.  I've re-read all posts in this thread and I can't find an answer.  

Here's the error: Line 72 Char 16 - Unterminated string constant.  I checked line 72, and here's an excerpt from that section of the code:
Code: [Select]
if ($action == "removecomment") {
  if (!$comment_id || ($config['user_delete_guestbook'] != 1 && $user_info['user_level'] != ADMIN)) {
    header("Location: ".$site_sess->url($url, "&"));
    exit;
  }

Does anyone have any ideas?
Title: Re: [MOD] guestbook - delete comments on the control panel
Post by: fgabriel on November 21, 2006, 08:17:30 PM
how can i delete comments on the control panel
any chance?
i couldnt delete in user session because i dont login in my site
i use control panel to set all and upload photos
 :roll:


well the phpadmin work :!:  delete sql values
Title: Re: [MOD] guestbook
Post by: fgabriel on December 01, 2006, 07:07:22 AM
how to show number o entrys of the guestbook in a html page?
thanks
Title: Re: [MOD] guestbook
Post by: Alessio on December 12, 2006, 09:28:32 AM
I have installed this mod and it worked fine for several days, now it works but with some error messages.

when I go to http://www.webax.it/guestbook.php I have this error
Notice: Undefined variable: comment_text in /mounted-storage/home28b/sub001/sc24851-FNHZ/www/guestbook.php on line 422

when I write a message I have this error
Notice: Undefined variable: user_country in /mounted-storage/home28b/sub001/sc24851-FNHZ/www/guestbook.php on line 287

when I delete a message I have these errors
Notice: Undefined variable: comments in /mounted-storage/home28b/sub001/sc24851-FNHZ/www/guestbook.php on line 447
Notice: Undefined variable: contents in /mounted-storage/home28b/sub001/sc24851-FNHZ/www/guestbook.php on line 446

These errors occours perhaps after installing MOD Multi-Language support for any text.


UPDATE: I have resolved the problems adding to php file this code
error_reporting(E_ALL ^ E_NOTICE);
Title: Re: [MOD] guestbook
Post by: live@ct on January 10, 2007, 08:55:28 AM
How can I implement a function to autodelete msgs every day

Thanks!! :D
Title: Re: [MOD] guestbook
Post by: LabSen on January 14, 2007, 12:01:08 AM
ich habe mit 4images 1.7.4 das Problem, dass ich, wenn ich alle Ausfülle für eine GB EIntrag diese Meldung bekomme: Das Feld Kommentar muss ausgefüllt werden!

Ihr könnt es selber unter www.pascalsenn.info/guestbook.php testen. Wie kann man das Problem lösen?

------------------------------------

I have a problem with 4images 1.7.4. wehn I make a register in my GB, then comes the message: The field comment must be stuffed (ausgefüllt?)!

You can self visit on www.pascalsenn.info/guestbook.php. How I can to resolve the problem?
Title: Re: [MOD] guestbook
Post by: KurtW on January 14, 2007, 09:00:10 AM
Hallo LabSen,

habs mal getestet...
bei mir klappt alles, bis:
Code: [Select]
Es existiert bereits ein User mit diesem Usernamen. Name: test

Hab mich mit diesem Mod jedoch noch nie beschäftigt, daher kann ich Dir hier nicht weiterhelfen.

Gruß
Kurt
Title: Re: [MOD] guestbook
Post by: LabSen on January 14, 2007, 10:17:16 AM
Hallo LabSen,

habs mal getestet...
bei mir klappt alles, bis:
Code: [Select]
Es existiert bereits ein User mit diesem Usernamen. Name: test

Hab mich mit diesem Mod jedoch noch nie beschäftigt, daher kann ich Dir hier nicht weiterhelfen.

Gruß
Kurt

Dein Fehler sollte behoben sein. Abedr hat bei mir nichts genützt
Title: Re: [MOD] guestbook
Post by: callmefreak on March 23, 2007, 09:32:32 AM
uh could someone reupload the install file?
Title: Re: [MOD] guestbook
Post by: dgandy on March 23, 2007, 07:58:31 PM
Please re-upload the install zip. I installed everything but get an error whrn I go to download the zip http://140.112.132.43/install_guestbook.zip (http://140.112.132.43/install_guestbook.zip)
Title: Re: [MOD] guestbook
Post by: lemccoy on March 28, 2007, 08:42:34 PM
ditto i need the reinstall file thanks to the stupid tra-la-laing hackers
Title: Re: [MOD] guestbook
Post by: callmefreak on March 29, 2007, 08:06:31 AM
or could anyone at least give us the mysql attributes so we can install that way?
Title: Re: [MOD] guestbook
Post by: mihagriha on April 01, 2007, 01:53:49 PM
Help me, please

Need "install_guestbook.zip"
Title: Re: [MOD] guestbook
Post by: jrey on April 04, 2007, 01:07:23 PM
I need it too...
Title: Re: [MOD] guestbook
Post by: son_gokou on April 16, 2007, 03:11:28 AM
I need too
Title: Re: [MOD] guestbook
Post by: Alessio on April 25, 2007, 03:50:42 PM
Instead of using install_guestbook.php try to run this code in your phpmyadmin, but please make a backup before because I'm not sure it's correct!


Code: [Select]
INSERT INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('guestbook_view', '1');
INSERT INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('user_delete_guestbook', '0');
INSERT INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('guestbook_post', '1');
INSERT INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('user_edit_guestbook', '0');
CREATE TABLE `4images_guestbook` (
`comment_id` mediumint(8) NOT NULL auto_increment,
`user_name` varchar(100) NOT NULL default '',
`comment_site` varchar(255) NOT NULL default '',
`comment_date` int(10) unsigned NOT NULL default '0',
`comment_text` text NOT NULL,
`comment_ip` varchar(20) NOT NULL default '',
PRIMARY KEY (`comment_id`),
KEY `comment_date` (`comment_date`)
) TYPE=MyISAM;
Title: install_guestbook.zip
Post by: cuba on April 26, 2007, 02:11:19 PM
I must found this file!

Please help me end people from forum.

My email: j_a_k_u_b@tlen.pl
Title: Re: [MOD] guestbook
Post by: lowwriter on May 10, 2007, 08:02:46 PM
Instead of using install_guestbook.php try to run this code in your phpmyadmin, but please make a backup before because I'm not sure it's correct!


Code: [Select]
INSERT INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('guestbook_view', '1');
INSERT INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('user_delete_guestbook', '0');
INSERT INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('guestbook_post', '1');
INSERT INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('user_edit_guestbook', '0');
CREATE TABLE `4images_guestbook` (
`comment_id` mediumint(8) NOT NULL auto_increment,
`user_name` varchar(100) NOT NULL default '',
`comment_site` varchar(255) NOT NULL default '',
`comment_date` int(10) unsigned NOT NULL default '0',
`comment_text` text NOT NULL,
`comment_ip` varchar(20) NOT NULL default '',
PRIMARY KEY (`comment_id`),
KEY `comment_date` (`comment_date`)
) TYPE=MyISAM;

It works perfectly :D
Thanks!
Title: Re: [MOD] guestbook
Post by: son_gokou on May 14, 2007, 05:05:33 PM
This MID  isn´t working for me. I use version 1.7.2
Title: Re: [MOD] guestbook
Post by: Alessio on June 05, 2007, 08:23:55 PM
I have a problem, this mod doesn't work if the text of the comment contains accentuated character, why?!

http://www.webax.it/guestbook.php (http://www.webax.it/guestbook.php)
Title: Re: [MOD] guestbook
Post by: ALev on June 27, 2007, 07:45:06 PM
Dear friends!

Badly in need of the file install_guestbook.zip.

Would You zip on the mail rusinter@gmail.com, please.
Title: Re: [MOD] guestbook
Post by: Po4emu4Man on June 29, 2007, 02:14:33 AM
Please, share it with me too!!! (install_guestbook.zip)

mcmoll@breezein.net

This code don't work for me :(
Code: [Select]
INSERT INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('guestbook_view', '1');
INSERT INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('user_delete_guestbook', '0');
INSERT INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('guestbook_post', '1');
INSERT INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('user_edit_guestbook', '0');
CREATE TABLE `4images_guestbook` (
`comment_id` mediumint(8) NOT NULL auto_increment,
`user_name` varchar(100) NOT NULL default '',
`comment_site` varchar(255) NOT NULL default '',
`comment_date` int(10) unsigned NOT NULL default '0',
`comment_text` text NOT NULL,
`comment_ip` varchar(20) NOT NULL default '',
PRIMARY KEY (`comment_id`),
KEY `comment_date` (`comment_date`)
) TYPE=MyISAM;
Title: Re: [MOD] guestbook
Post by: mawenzi on June 29, 2007, 09:54:30 AM
@Po4emu4Man

... you must run this code in your PhpMyAdmin -> Edit ... !
Title: Re: [MOD] guestbook
Post by: Po4emu4Man on June 29, 2007, 10:12:42 AM
Mawenzi, I know.
I was generating PHP file in SQL Generator. I make my own file with this code, but there was a problem.
Before this installation no problems was detected with that way.

Maybe there was another problems. Thanx for help, but I don't want Guestbook anymore. I'll install the board better.
Title: Re: [MOD] guestbook
Post by: Alessio on August 27, 2007, 10:23:30 AM
I have a problem, this mod doesn't work if the text of the comment contains accentuated character, why?!

http://www.webax.it/guestbook.php (http://www.webax.it/guestbook.php)

help me, please!
Title: Re: [MOD] guestbook
Post by: orb4 on September 07, 2007, 09:31:49 AM
Hi,
I got this after installing when I try to access "guestbook.php". Any idea?

Fatal error: Call to undefined function: get_smiles_text() in /x/x/x/x/x/x/guestbook.php on line 362


and this is the code near line 362:  "smiles_text" => get_smiles_text(),

Code: [Select]
  //-----------------------------------------------------
  //--- BBCode & Form -----------------------------------
  //-----------------------------------------------------
  $bbcode = "";
  if ($config['bb_comments'] == 1) {
    $site_template->register_vars(array(
      "lang_bbcode" => $lang['bbcode'],
      "smiles_text" => get_smiles_text(),
      "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");
  }
Title: Re: [MOD] guestbook
Post by: thunderstrike on September 07, 2007, 10:10:26 PM
get_smilies_text from Smilies MOD. Install smilies so guestbook work.

This might help too:

http://www.4homepages.de/forum/index.php?topic=10168.0
Title: Re: [MOD] guestbook
Post by: orb4 on September 07, 2007, 11:05:19 PM
Thunderstrike, first i've deleted the "smilies" partline in the php file and guestbook works great.  Later I 'll try to install smilies mod when I'll find 5 minutes. Thank for your help .
Title: Re: [MOD] guestbook
Post by: Alessio on October 20, 2007, 11:53:33 AM
I have a problem, this mod doesn't work if the text of the comment contains accentuated character, why?!

http://www.webax.it/guestbook.php (http://www.webax.it/guestbook.php)

I'm still waiting for your help  :(
Title: Re: [MOD] guestbook
Post by: thunderstrike on October 20, 2007, 11:55:29 AM
@Alessio:

Ok - here - use this fix:

http://www.4homepages.de/forum/index.php?topic=18256.0
Title: Re: [MOD] guestbook
Post by: Alessio on October 20, 2007, 12:33:56 PM
@Alessio:

Ok - here - use this fix:

http://www.4homepages.de/forum/index.php?topic=18256.0

Thank you veeeeeery much!!!! Now my guestbook works fine!
Title: Re: [MOD] guestbook
Post by: derrick on October 21, 2007, 11:25:17 PM
Dear friends!

Badly in need of the file install_guestbook.zip.

Would You zip on the mail rusinter@gmail.com, please.


Hi,

I also need install file because this link is not working
"now download this file http://140.112.132.43/install_guestbook.zip"
Could you please post in this forum any live link to install file or could you pls send it to me on bakchus@gmail.com?
Thanks!

duso
Title: Re: [MOD] guestbook
Post by: Alessio on October 21, 2007, 11:37:12 PM
Dear friends!

Badly in need of the file install_guestbook.zip.

Would You zip on the mail rusinter@gmail.com, please.


Hi,

I also need install file because this link is not working
"now download this file http://140.112.132.43/install_guestbook.zip"
Could you please post in this forum any live link to install file or could you pls send it to me on bakchus@gmail.com?
Thanks!

duso

Did you read my message?
http://www.4homepages.de/forum/index.php?topic=7409.msg92357#msg92357 (http://www.4homepages.de/forum/index.php?topic=7409.msg92357#msg92357)
Title: Re: [MOD] guestbook
Post by: glitzer on October 28, 2007, 08:47:59 PM

hello people

i don´t know if this is the right file, but this is my guestbook zip what i ´ve found.

bye
glitzer
Title: Re: [MOD] guestbook
Post by: orb4 on November 25, 2007, 08:17:34 PM
Hello,

Im really disappointed because I try to run this mod on 4images 1.7.4
 
and when i go to "guestbook.php" page there is just the form with no guestbook posts shown (whereas I can see them in the database phpmyadmin).
And if i fill and send the FORM, the next page will show now the guestbook posts.
And if I want to delete or edit a post, the next page will ask me to delete/edit  or not and next page WONT show posted messages again.

Does anybody could post here "guestbook.php" please?
Title: Re: [MOD] guestbook
Post by: orb4 on November 27, 2007, 09:01:43 AM
up
Title: Re: [MOD] guestbook
Post by: CanonInk on November 29, 2007, 10:35:53 AM
Hello,

Im really disappointed because I try to run this mod on 4images 1.7.4
 
and when i go to "guestbook.php" page there is just the form with no guestbook posts shown (whereas I can see them in the database phpmyadmin).
And if i fill and send the FORM, the next page will show now the guestbook posts.
And if I want to delete or edit a post, the next page will ask me to delete/edit  or not and next page WONT show posted messages again.

Does anybody could post here "guestbook.php" please?


Create a new guestbook.html in your /4images/template/{your_template}/ by using error.html

Find:
Code: [Select]
td width="450" valign="top"><br />
                  <b class="title">{lang_error}</b>

Replace:
Code: [Select]
<b class="title">{lang_error}</b>
                  <hr size="1" />
                  <p>{error_msg}</p>

with:
Code: [Select]
{if msg}<br /><b>{msg}</b>{endif msg}
{guestbook_comments}
<br />
{contents}
<br />

Now your guestbook will show the stored guestbooks posts in db and a blank form for a new post.
Title: Re: [MOD] guestbook
Post by: CanonInk on November 29, 2007, 11:04:43 AM
Using CAPTCHA and not Flood Check by checking ip

Currently SPAM-boots can post comment in your guestbook (when installed). With this changes every comment poster have to enter a CAPTCHA-Print.

Open 4images-root: guestbook.php

Find:
Code: [Select]
if ($action == "postcomment" && $config['guestbook_post'] == 1) {
    $comment_user_name = un_htmlspecialchars(trim($HTTP_POST_VARS['comment_user_name']));
    $comment_text = un_htmlspecialchars(trim($HTTP_POST_VARS['comment_text']));
    $comment_site = un_htmlspecialchars(trim($HTTP_POST_VARS['comment_site']));

Add after:
Code: [Select]
$captcha = (isset($HTTP_POST_VARS['captcha'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['captcha'])) : "";

Uncomment Flood Check part with "//" like this:
Code: [Select]
// Flood Check
//   $sql = "SELECT comment_ip, comment_date
//              FROM ".GUESTBOOK_TABLE."
//         WHERE comment_ip = '".$session_info['session_ip']."' 
//         ORDER BY comment_date DESC
//         LIMIT 1";
//   $spam_row = $site_db->query_firstrow($sql);
//   $spamtime = $spam_row['comment_date'] + 360;

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

Find:
Code: [Select]
if (!$error)  {
      if ($comment_site =="http://") {
         $comment_site = "";
      }

Add after:
Code: [Select]
if (!captcha_validate($captcha)) {
      $msg .= (($msg != "") ? "<br />" : "").$lang['captcha_required'];
      $error = 1;
    }

Open /4images/template/{your_template}/guestbook_form.html

Find:
Code: [Select]
<tr>
  <td width="90" valign="top">&nbsp;</td>
  <td>{bbcode}</td>
</tr>

Add after:
Code: [Select]
<tr>
  <td valign="top"><b>{lang_captcha}</b></td>
    <td>
      <a href="javascript:new_captcha_image();"><img src="{url_captcha_image}" border="0" id="captcha_image" /></a> <br />
      <input type="text" name="captcha" size="30" value="" class="commentinput" id="captcha_input" />
      <br />
      {lang_captcha_desc}
  </td>
</tr>

It's tested with 4Images 1.7.4 where CAPTCHA is enable in config.php.

Enjoy...
Title: Re: [MOD] guestbook
Post by: orb4 on November 30, 2007, 10:03:52 PM
Thank you CanonInk  but I think I've found what's wrong with me:
I've installed[MOD] Multi-Language support for any text it's been a long time.
It works like this: You put [french] or [english] before the text you want to appear depending on what have choosen your visitor's website when cliking on the gif english or french. Ok.
And there was a [french]bla bla and an [english]talk talk in my first post in the guestbook.
If i supress them, so all the posts are shown!  :D  how strange it is?
Title: Re: [MOD] guestbook
Post by: mawenzi on January 26, 2008, 11:21:41 AM
@Alessio
... mmm ...
... try this : http://www.4homepages.de/forum/index.php?topic=18256.msg97256#msg97256 ...
Title: Re: [MOD] guestbook
Post by: nobby on February 04, 2008, 09:18:45 PM
Hallo,

wie sieht es Eigentlich aus, ist das Gästebuch auch

schon unter 4images 1.7.5 lauffähig  :?:

nobby

edit

oder unter 1.7.6

edit ende

Title: Re: [MOD] guestbook
Post by: satine88 on May 03, 2008, 02:58:43 PM
Help me, please

Need "install_guestbook.zip"

Me too :(
Title: Re: [MOD] guestbook
Post by: axlrose on September 04, 2008, 07:34:44 AM
Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Hmmm... 120 days haven't posted a new..
anyway, trying find download here.

The first page are not working anymore?
can anyone give me a link?
Title: Re: [MOD] guestbook
Post by: axlrose on September 08, 2008, 12:10:42 PM
Bump for my question above...
download Link...
Title: Re: [MOD] guestbook
Post by: Nicky on September 08, 2008, 12:50:54 PM
axlrose:

try this: http://www.4homepages.de/forum/index.php?topic=7409.msg92357#msg92357
Title: Re: [MOD] guestbook
Post by: axlrose on September 08, 2008, 06:27:21 PM
axlrose:

try this: http://www.4homepages.de/forum/index.php?topic=7409.msg92357#msg92357

Thanks NICKY!
Title: Re: [MOD] guestbook
Post by: olrac on October 06, 2008, 07:52:17 PM
where to find and download the guestbook mod script *.zip   :|
Title: Re: [MOD] guestbook
Post by: Jan-Lukas on October 06, 2008, 08:47:17 PM
Ist doch gut, wenn man nicht alles löscht ;)
Ist ein Download von 10.02.2007
Title: Re: [MOD] guestbook
Post by: olrac on October 06, 2008, 10:47:09 PM
thanks man! :lol: even though I don't understand what your saying :(
I really appreciate it 8)
Title: Re: [MOD] guestbook
Post by: olrac on October 06, 2008, 10:51:59 PM
thanks man! :lol: even though I don't understand what your saying :(
I really appreciate it 8)

wait wheres the rest of the file? Is this all of it? just installed ? where's the {guestbook_user} something like thatcodes?
Title: Re: [MOD] guestbook
Post by: Jan-Lukas on October 06, 2008, 11:38:49 PM
das ist nur die Installation (Datenbank) der Rest ist hier ;)
http://www.4homepages.de/forum/index.php?topic=7409.0
Title: Re: [MOD] guestbook
Post by: Ironcurtain on October 16, 2008, 06:37:06 PM
Moin Jungs ich bin absoluter Neuling auf diesem Gebiet und bin strikt nach der Anleitung auf der 1 Seite gegangen soweit funktioniert das Gästebuch auch und es ist oben im header eingetragen wenn ich drauf klicke sehe ich allerdings nur das Gästebuch kann man das irgendwie somachen das es sich wie die anderen Links auch im mittleren Frame öffnet sodass man immernoch auf die anderen Links klicken kann und nicht erst zurückgehen muss. Das wäre echt Klasse
Ich hoffe ihr könnt mir weiterhelfen.

Mfg Ironcurtain
Title: Re: [MOD] guestbook
Post by: mawenzi on October 16, 2008, 06:51:40 PM
Hallo Ironcurtain und willkommen im 4images Forum,

... man sollte hier das "OR" ausführen ...
Quote
Or just copy the member.html and change the tag {content} to {contents}.
... und diese Kopie benennst du dann einfach guestbook.html ...
... damit ist das Layout deines Templates gewahrt ...
Title: Re: [MOD] guestbook
Post by: Ironcurtain on October 16, 2008, 07:07:25 PM
WoW alles klar vielen dank nun läufts hehe
Title: Re: [MOD] guestbook
Post by: Rembrandt on October 27, 2008, 07:56:15 PM
Hi!

*hmpf*  :evil: was ich gesucht habe %$?@&($*' : evil:

könnte vielleicht ein mod von euch den ersten post editieren?

bei erstellen der "templates/your_template/guestbook.html "
gehört "{guestbook_comments}" hinnein.
Quote
header}
{if msg}<br /><b>{msg}</b>{endif msg}

<br />
{contents}
{guestbook_comments}
<br />

{footer}

mfg Andi

edit: so nach dem ich eine rauchen war:

es ist halt ganz einfach verwirrend, ich habs wie 15 andere vor mir auch übersehen.
 im mod post wurde zwar der link für die guestbook.html  gepostet aber für die
"guestbook_showcomments.html nicht" und das scheinen etliche user so wie auch ich übersehen haben.
 
Title: Re: [MOD] guestbook
Post by: Alessio on November 17, 2008, 05:47:58 PM
I would like to add a field for the mail address. (the guest mail address must be visible only to administrator)
Can you help me?
Title: Re: [MOD] guestbook
Post by: AntiNSA2 on March 06, 2009, 01:39:43 PM
Is there a newer better alternatve to this? does this work with 1.7.6?
Title: Re: [MOD] guestbook
Post by: AntiNSA2 on March 06, 2009, 01:57:03 PM
This is not compatible with 1.7.6

In the mod isntallation instructions it says to find


show_form_footer($lang['save_changes'], "", 2);

in settings php...

But the settings.php dies not contain this code.


WOuld be nice to have  if anyone can make a guestbook for 1.7.6....

Thanks!


Title: Re: [MOD] guestbook
Post by: Rembrandt on March 06, 2009, 05:36:48 PM
This is not compatible with 1.7.6
But the settings.php dies not contain this code.
sure, there is the last entry.

..and you can your post edit.  :evil:

Andi

Title: Re: [MOD] guestbook
Post by: AntiNSA2 on March 06, 2009, 06:57:42 PM
hmmm... I could not find it earlier. I will check in the next 18 hours and repost findings.
Title: Re: [MOD] guestbook
Post by: Rembrandt on March 06, 2009, 08:06:42 PM
hmmm... I could not find it earlier. I will check in the next 18 hours and repost findings.

please make your signature lesser..*hmpf*
Title: Re: [MOD] guestbook
Post by: AntiNSA2 on March 06, 2009, 08:22:20 PM
does that make it easier for you? Im sorry it is so big....  :P
Title: Re: [MOD] guestbook
Post by: Rembrandt on March 06, 2009, 09:19:48 PM
... Im sorry it is so big....  :P
ok.. <?php {ignore} ?>

cu..
Title: Re: [MOD] guestbook
Post by: AntiNSA2 on March 08, 2009, 06:14:23 PM
{guestbook_comments} shows nothing in 1.7.6.........


I cant get it to show comments.. anyone else get it to work?
Title: Re: [MOD] guestbook
Post by: om6acw on March 09, 2009, 06:21:44 PM
{guestbook_comments} shows nothing in 1.7.6.........


I cant get it to show comments.. anyone else get it to work?

uninstall this mod and do it again, this mod is working with 1.76 for 100% I installed it couple times with out any problems.
Title: Re: [MOD] guestbook
Post by: AntiNSA2 on March 10, 2009, 06:07:49 AM
Yes, I was wrong. I had an error in my template.

THank your for motivating me to try it again.

Now,

I have read all pages, and must ask how to show the guestbook entries/comments on the home.html, and details/category pages? I used to know how to do that but forgot....


Thanks!
Title: Re: [MOD] guestbook
Post by: AntiNSA2 on March 11, 2009, 03:23:05 PM
It would be so weet to get these comments on home.html... if anyone found outhow please share the info!
Title: Re: [MOD] guestbook
Post by: Sunny C. on June 19, 2009, 07:56:29 PM
Where is the Attachment Download?
Please reup!!!
Title: Re: [MOD] guestbook
Post by: Rembrandt on June 19, 2009, 09:25:38 PM
Hi!
Where is the Attachment Download?
Please reup!!!
ich hoffe ich habe damit meine posting quote erfüllt.

mfg Andi
Title: Re: [MOD] guestbook
Post by: Sunny C. on June 19, 2009, 10:23:12 PM
Genialo! Besser gehts nicht :D
Title: Re: [MOD] guestbook
Post by: mawenzi on June 22, 2009, 07:45:03 PM
@Rembrandt

... danke Andi für die install_guestbook.zip ...
... habe sie dem 1.Post angehangen ...
Title: Re: [MOD] guestbook
Post by: nameless on July 09, 2009, 01:12:16 PM
hi nice MOD

i'd love to know if i want to add some field to it
like Tel. No.

and if i want to make the user upload image like this
http://proxy2.de/demo/guestbook/index.php (http://proxy2.de/demo/guestbook/index.php)

thanks
waiting for ur replay
Title: Re: [MOD] guestbook
Post by: hotvins on September 06, 2009, 03:24:58 PM
WOW thats awesome one dude

whole morning work for noobs like me   :oops:  :oops:  :oops:
Title: Re: [MOD] guestbook
Post by: chief vs boss on September 21, 2009, 11:56:17 AM
Frage, habe das Guestbook installiert und nach ein paar kleinen Schwierigkeiten funktioniert es fast ganz richtig. . . .

Mein Problem, jeder Name im Guestbook kann nur einmal verwendet werden, ist das überall so oder habe ich nur einen Fehler gemacht?
(wäre ja ein blödsinn, wenn man jedes mal den Namen ändern muss. . . . )

Hoffe den Fehler kennt jemand?! ^^

Seite: "xxx: serv4u. bplaced. net/guestbook. php"
Title: Re: [MOD] guestbook
Post by: rinaldos on September 23, 2009, 05:39:30 PM
Mein Problem, jeder Name im Guestbook kann nur einmal verwendet werden, ist das überall so oder habe ich nur einen Fehler gemacht?
(wäre ja ein blödsinn, wenn man jedes mal den Namen ändern muss. . . . )

Funktioniert der STEP aus dem ersten POST nicht?

Quote
"User name already exists."
when i try to post an entry.... seems only one nick can post.. how to disable?
It is set to restrict one nick can post once each day. If you want to disable it. Find two times in guestbook.php

Dies sollte eigentlich bewerkstelligen das ein Benutzername wieder genommen werden darf, solange der Benutzername keinem registriertem Benutzer gehört....

LG
Title: Re: [MOD] guestbook
Post by: chief vs boss on September 23, 2009, 09:06:33 PM
THX!

Hatte ich überlesen!  :roll:  :mrgreen:  :oops:
Title: Re: [MOD] guestbook
Post by: nameless on December 31, 2009, 02:54:31 AM
hi nice MOD

i'd love to know if i want to add some field to it
like Tel. No.

and if we can make field to let users upload image in the guestbook


thanks
waiting for ur replay
Title: Re: [MOD] guestbook
Post by: joachimarp on June 30, 2010, 10:21:23 AM
Bevor ich mich nun daran mache, das Ganze für meine Seite http://airday.arpcom.de umzusetzen habe ich eine Frage

Funktioniert der Mod auch mit der Version 1.7.7  :?:

Will mir da nun nicht den Stress machen, das alles einzubinden um dann festzustellen, das der Mod mit der Version nicht geht.
Title: Re: [MOD] guestbook
Post by: joachimarp on July 01, 2010, 11:16:38 AM
Hab mir die Frage nun selber beantwortet  :mrgreen:

Habe das Ganze nach Anleitung zusammen gebastelt, die Fehler beseitigt und freu mich nun über mein Gästebuch.

Für diejenigen unter euch, die sich das auf ihrer Site auch einbauen möchten stelle ich meine Dateien gerne zur Verfügung. Beachtet aber bitte, das die Verwendung auf eigene Gefahr geschieht.

Wer sich das Ganze anschauen möchte der http://airday.arpcom.de (http://airday.arpcom.de)
Title: Re: [MOD] guestbook
Post by: nameless on July 06, 2011, 06:33:13 PM
hi nice MOD

i'd love to know if i want to add some field to it
like Tel. No.




thanks
waiting for ur replay
Title: Re: [MOD] guestbook
Post by: marcinos on August 06, 2011, 08:14:48 PM
Hi i have problem

on click EDIT in guestbook

Fatal error: Call to undefined function: get_smiles_text() in /home/marcinz/public_html/guestbook.php on line 181

Title: Re: [MOD] guestbook
Post by: Rembrandt on August 06, 2011, 08:23:08 PM
Welcome to the Forum!
^...Fatal error: Call to undefined function: get_smiles_text() in /home/marcinz/public_html/guestbook.php on line 181

Remove this line in guestbook.php
Code:
Code: [Select]
"smiles_text" => get_smiles_text(),
 

mfg Andi
Title: Re: [MOD] guestbook
Post by: marcinos on August 13, 2011, 09:54:39 AM
Thanks you.

How do security in the form of acceptance of entries in the guestbook administrator?
Title: Re: [MOD] guestbook
Post by: joachimarp on November 13, 2011, 12:53:09 PM
Mein Gästebuch funktioniert nicht mehr, nach Serverumzug und Update auf die aktuelle Version 4images 1.7.10.

Nach dem Serverumzug war alles okay, nachdem Versionsupdate von 4images erhalte ich beim Aufruf des Gästebuches folgende Fehlermeldunge:

DB Error: Bad SQL Query: SELECT COUNT(user_name) AS comments FROM GUESTBOOK_TABLE
Table 'DB982744.GUESTBOOK_TABLE' doesn't exist

DB Error: Bad SQL Query: SELECT comment_id, user_name AS comment_user_name, comment_site, comment_text, comment_ip, comment_date FROM GUESTBOOK_TABLE ORDER BY comment_date DESC LIMIT 0, 8
Table 'DB982744.GUESTBOOK_TABLE' doesn't exist

Die Datenbank habe ich vom alten auf den neuen Server übertragen, alles andere funktioniert ohne Probleme.
Title: Re: [MOD] guestbook
Post by: Rembrandt on November 13, 2011, 01:03:06 PM
Hi!

hast du schon mal in den DB nachgesehn ob die GUESTBOOK Tabelle noch existiert?
mfg Andi
Title: Re: [MOD] guestbook
Post by: joachimarp on November 13, 2011, 03:10:15 PM
Ja, habe ich gemacht. Hab sie sogar nochmal aus der alten Datenbank exportiert und in die neue übertragen. Ich bin auch der Meinung, das das GB noch funktioniert hat, bevor ich das Update von 4images auf Version 1.7.10 gemacht habe
Title: Re: [MOD] guestbook
Post by: Rembrandt on November 13, 2011, 03:21:32 PM
naja kann ja nicht viel sein, kontrollier halt mal den mod einbau nochmal nach, so würde ich es machen.
ich denke mal das du dir mit den update einen teil des Mods überschrieben hast.

mfg Andi
Title: Re: [MOD] guestbook
Post by: joachimarp on December 27, 2012, 10:55:45 PM
Gästebuch funktioniert seit einiger Zeit wieder. Habe aber jetzt ein anderes Problem.

Seit einigen Wochen wird mein GB regelmässig mit Spam überflutet und ich muss immer alle Einträge mühseelig löschen. Ich würde das gerne verhindern in dem ich ein Captcha Funktion einbaue. Das ist mir allerdings nicht wirklich gelungen bisher.

Ich arbeite derzeit mit der Version 1.7.11 und habe bisher keine Info finden können, ob es für diese Version einen funktionierenden Spam - Schutz gibt. Ich hoffe mir kann jemand helfen und mir erklären wo ich was einfügen muss, damit ich einen einigermassen funktionierenden Spamschutz einbauen kann.

Gästebuch ist zu finden auf http://www.breguetatlantic.de/