<?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&comment_id=".
$comment_row[$i]['comment_id']).
"\" target=\"admin_edit\">".$lang['edit']."</a> ";
$admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."guestbook.php?action=removecomment&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&comment_id=".$comment_row[$i]['comment_id'])."\" target=\"admin_edit\">".$lang['edit']."</a> ";
$admin_links .= ($config['user_delete_guestbook'] != 1) ? "" :
"<a href=\"".$site_sess->url(ROOT_PATH."guestbook.php?action=removecomment&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'],
"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');
?>
$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:";
/*-- 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";
show_form_footer($lang['save_changes'], "", 2);
Add these before it 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");
// URL Parameters
define('GUESTBOOK_TABLE', $table_prefix.'guestbook');
"url_categories" => $site_sess->url(ROOT_PATH."categories.php"),
"url_guestbook" => (!empty($url_guestbook)) ? $site_sess->url($url_guestbook) : $site_sess->url(ROOT_PATH."guestbook.php"),
{header}
{if msg}<br /><b>{msg}</b>{endif msg}
<br />
{contents}
<br />
{footer}
<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"> </td>
<td>{bbcode}</td>
</tr>
<tr>
<td width="90" valign="top"> </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>
<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"> </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>
<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>
<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>
<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} </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} </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)"comment_user_name" => $comment_user_name,
"comment_user_name" => format_text($comment_user_name, $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
------------------------------------------------------------ :wink:------------------------------------------------------------<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>
<a href="{url_new_images}"><b>{lang_new_images}</b></a>
<a href="{url_new_images}"><b>{lang_new_images}</b></a>
Thanks for any lhelp "url_categories" => $site_sess->url(ROOT_PATH."categories.php"),
"lang_guestbook" => $lang['guestbook'],
<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>
<a href="{url_new_images}"><b>{lang_new_images}</b></a>
<a href="{url_new_images}"><b>{lang_new_images}</b></a>
------------------------------------------------------ :wink:-----------------------------------------------------------------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 if ($comment_user_name == "") {
$msg .= (($msg != "") ? "<br />" : "").$lang['name_required'];
$error = 1;
}
--------------------------------------------------------------- :wink:----------------------------------------------$sql = "UPDATE ".GUESTBOOK_TABLE."
//-----------------------------------------------------
// 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 $sql = "INSERT INTO ".GUESTBOOK_TABLE."
//-----------------------------------------------------
// 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 $setting['user_edit_guestbook'] = "Allow edit post in GuestBook";
Add after $setting['guestbook_manager'] = "Email for monitoring GuestBook";
show_setting_row("user_delete_guestbook", "radio");
show_setting_row("guestbook_manager");
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}
INSERT INTO `4images_settings` ( `setting_name` , `setting_value` )
VALUES (
'guestbook_manager', 'your_email_account@your_emailserver'
)
"smiles_text" => get_smiles_text(),
Any sugestions?yes, I have one:
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
<td class="navbar" align="right">
<a href="{url_top_images}"><b>{lang_top_images}</b></a> |
<a href="{url_new_images}"><b>{lang_new_images}</b></a>
</td>
<td class="navbar" align="right">
<a href="LINK ZU GB"><b>TEXT FÜR GB-LINK</b></a> |
<a href="{url_top_images}"><b>{lang_top_images}</b></a> |
<a href="{url_new_images}"><b>{lang_new_images}</b></a>
</td>
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
"smiles_text" => get_smiles_text(),
Sorry Embarassed
Guestbook posts everything to db, but I can`t see anything (posts in guestbook).
And is it safe to delete the installer of a particular MOD from my root directory after the MOD has been installed?
QuoteAnd 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:
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
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
<span class="title">{lang_guestbook}</span>[/color]
<hr size="1" />
{if msg}<b>{msg}</b><br /><br />{endif msg}<br>
{comments}<br>{contents}
<p> </p>
</td>
<a href="javascript:smilies(':)')"><img border="0" src="{template_url}/smiles/smiley.gif" width="15" height="15"></a>
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.
<span class="title">{lang_guestbook}</span>
<hr size="1" />
{if msg}<b>{msg}</b><br /><br />{endif msg}<br>
{guestbook_comments}<br>{contents}
<p> </p>
</td>
ok...everythings works so far...Check first page, there is a way to disable that, i did it :)
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
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
what did that means?that means "dont worry, the database was previously updated"
"dont worry, the database was previously updated"
"dont worry, the database was previously updated"
Anmerkung: Es geht nur mit VErsion 1.7.0.
i really dont know what to do!? please help me :cry:Nothing shows... only 500 error :?:
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 :?:
Question : the "allow edit post" and "allow delete post" items in the control panel.there was no help for him :( perhaps somebody give me an advice :?
If you put the options to "yes", who can edit and delete the messages ?
only adinistrators ?
the one who posted it ?
$setting['user_delete_guestbook'] = "...text...";
$setting['user_edit_guestbook'] = "...text...";
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/
now download this file http://140.112.132.43/install_guestbook.zip
Every Day at the same time i become a Spam Entry in my Guestbook.
Stran ne obstaja!
www.slo-foto.net
Stran ne obstaja!
www.slo-foto.net
QuoteEvery 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 ... :|
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.
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();
}
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 .....
Fatal error: Call to undefined function: get_smiles_text()
"smiles_text" => get_smiles_text(),
where can I place a link, that means i want the guestbook link on the leftside
<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>
<a href="{url_new_images}"><b>{lang_new_images}</b></a>
<a href="{url_new_images}"><b>{lang_new_images}</b></a>
Thanks for any lhelp "url_categories" => $site_sess->url(ROOT_PATH."categories.php"),
"lang_guestbook" => $lang['guestbook'],
<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>
<a href="{url_new_images}"><b>{lang_new_images}</b></a>
<a href="{url_new_images}"><b>{lang_new_images}</b></a>
define('GUESTBOOK_TABLE', $table_prefix.'guestbook');
now download this file http://140.112.132.43/install_guestbook.zipdiese datei kann ich nicht downloaden da der server nicht gefunden wird
"url_guestbook" => (!empty($url_guestbook)) ? $site_sess->url($url_guestbook) : $site_sess->url(ROOT_PATH."guestbook.php"),
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 thingQuote"url_guestbook" => (!empty($url_guestbook)) ? $site_sess->url($url_guestbook) : $site_sess->url(ROOT_PATH."guestbook.php"),
Please let me know..
Thx
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
if ($user_info['user_level'] != ADMIN) {
show_error_page($lang['no_permission']);
} ###### End of if statement.
:wink:
define('GUESTBOOK_TABLE', $table_prefix.'1guestbook');
define('GUESTBOOK_TABLE', $table_prefix.'guestbook');
Fatal error: Call to undefined function: get_smiles_text() in /home/sites/site6/web/foto/guestbook.php on line 363
hello^
im new in this things :roll: what is the latest code
my sql is mysql 3
Also a big thank you from me
Can anybody tell me, how can i only allow registered user to write into the book`?
include(ROOT_PATH.'includes/page_header.php');
if ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER_AWAITING) {
show_error_page($lang['no_permission']);
exit;
}
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-
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
Why i m getting this error ??
'mysite_wallpaper.GUESTBOOK_TABLE' doesn't exist
define('GUESTBOOK_TABLE', $table_prefix.'guestbook');
if (isset($session_info['commentperpage'])) {
$commentperpage = $session_info['commentperpage'];
} else {
$commentperpage = 8;
}
ändern in:$commentperpage = xx;
$site_template->register_vars(array(
"comment_id" => $comment_row[$i]['comment_id'],
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,
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!
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.
http://his.web.my-ct.de/pics/guestbook.phpI've the same problem!!!!
any sugestions?
strange that there are no comments shown but pages oO
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> </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.
When I want to edit a guestbook comment, it says: username still exists
Thats right but...
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.phpCode: [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 toCode: [Select]if ($comment_user_name == "") {
$msg .= (($msg != "") ? "<br />" : "").$lang['name_required'];
$error = 1;
}
if ($action == "removecomment") {
if (!$comment_id || ($config['user_delete_guestbook'] != 1 && $user_info['user_level'] != ADMIN)) {
header("Location: ".$site_sess->url($url, "&"));
exit;
}
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:
Es existiert bereits ein User mit diesem Usernamen.
Name: testHallo 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
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;
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;
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;
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)
//-----------------------------------------------------
//--- 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");
}
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)
@Alessio:
Ok - here - use this fix:
http://www.4homepages.de/forum/index.php?topic=18256.0
Dear friends!
Badly in need of the file install_guestbook.zip.
Would You zip on the mail rusinter@gmail.com, please.
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
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?
td width="450" valign="top"><br />
<b class="title">{lang_error}</b>
<b class="title">{lang_error}</b>
<hr size="1" />
<p>{error_msg}</p>
{if msg}<br /><b>{msg}</b>{endif msg}
{guestbook_comments}
<br />
{contents}
<br />
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']));
$captcha = (isset($HTTP_POST_VARS['captcha'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['captcha'])) : "";
// 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 (!$error) {
if ($comment_site =="http://") {
$comment_site = "";
}
if (!captcha_validate($captcha)) {
$msg .= (($msg != "") ? "<br />" : "").$lang['captcha_required'];
$error = 1;
}
<tr>
<td width="90" valign="top"> </td>
<td>{bbcode}</td>
</tr>
<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>
Help me, please
Need "install_guestbook.zip"
axlrose:
try this: http://www.4homepages.de/forum/index.php?topic=7409.msg92357#msg92357
thanks man! :lol: even though I don't understand what your saying :(
I really appreciate it 8)
Or just copy the member.html and change the tag {content} to {contents}.... und diese Kopie benennst du dann einfach guestbook.html ...
header}
{if msg}<br /><b>{msg}</b>{endif msg}
<br />
{contents}
{guestbook_comments}
<br />
{footer}
This is not compatible with 1.7.6sure, there is the last entry.
But the settings.php dies not contain this code.
hmmm... I could not find it earlier. I will check in the next 18 hours and repost findings.
... Im sorry it is so big.... :Pok.. <?php {ignore} ?>
{guestbook_comments} shows nothing in 1.7.6.........
I cant get it to show comments.. anyone else get it to work?
Where is the Attachment Download?ich hoffe ich habe damit meine posting quote erfüllt.
Please reup!!!
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. . . . )
"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
^...Fatal error: Call to undefined function: get_smiles_text() in /home/marcinz/public_html/guestbook.php on line 181
"smiles_text" => get_smiles_text(),