Guestbook3
#21
Posted 17 September 2005 - 05:36 PM
#22
Posted 17 September 2005 - 05:39 PM
ColdFire, on Sep 17 2005, 06:36 PM, said:
#23
Posted 17 September 2005 - 07:44 PM
This feature could well be a great boon.My friend recently had similar trouble on guestbook he was using and he had no option but to block all dialup users from a certain region and he wasn't happy about it,so I thought may be we can request this feature here for our protection.
If not at present,can this please be considered for future releases?
thanks,
niskumar
Edited by niskumar, 17 September 2005 - 07:45 PM.
#24
Posted 14 October 2005 - 08:24 AM
#25
Posted 24 January 2006 - 12:36 PM
www.mein-mittelalter.de
As I said, great work
Leo
BTW: Is it possible to adress two gbadmins (people to receive the messages in the manager that is) when a new entry is made in the gb?
Edited by Leo316, 24 January 2006 - 12:37 PM.
#26
Posted 19 February 2006 - 08:29 AM
Edited by jploeg, 23 February 2006 - 12:17 PM.
#27
Posted 15 June 2006 - 07:11 PM
EDIT:
Nevermind, the CSS edit just kicked in. Question however: any spam problems so far?
Edited by DeniseDD, 15 June 2006 - 07:12 PM.
#28
Posted 15 June 2006 - 07:27 PM
How can I get rid of those 2 empty lines between the button "Bekijk volgende pagina" and the message list?
http://guider.buildtolearn.net/rolstoelten...index.php?id=67
#29
Posted 15 June 2006 - 07:58 PM
#30
Posted 17 September 2006 - 06:29 PM
i used GuestBook 3 as our site guestbook, and there is only one(1) thing i do not like i.e. smilies on the guestbook or messages have a square box on each of the message posted. can anyone help me on how to disable the square smilies.
I have already check the *.gif images, and non of the images have a square box within it. So, i would be very thankful if someone could help me with this.
Thanks and regards.
#31
Posted 03 January 2007 - 11:21 PM
DeniseDD, on Jun 15 2006, 09:58 PM, said:
This site must have shut down in the mean time. I am looking for that function exactly - to get an email when new posts are been made to the guestbook. Is it possible to set the manager section up to send an email to admin (in this case me!) when a new message arrives in the manager inbox? Or is there another way?
Pls help!
/Pegro
#32
Posted 31 March 2007 - 12:45 PM
I've used this guestbook on several sites and cannot figure out how to make the input fields dissapear and just make a link appear.
I would like visitors to have the guestbook straight away, and then when they click the link "Write a new message" or "Schrijf een nieuw bericht" the come to the page where they can leave a new message.
Thx for the help.
Duivelken
http://www.djkina.be
http://www.scoutskluisbergen.be
http://www.charlies-gent.be/nieuw
http://www.galerierooyart.nl
Edit: Solved it by messing around in the code a bit, my apologies.
Edited by Duivelken, 31 March 2007 - 04:29 PM.
#33
Posted 31 March 2007 - 04:32 PM
<a href="[~56~]">Write a new message.</a>
This should then link to this page:
http://www.charlies-gent.be/nieuw/index.php?id=56
Karen
Duivelken, on Mar 31 2007, 08:45 AM, said:
I've used this guestbook on several sites and cannot figure out how to make the input fields dissapear and just make a link appear.
I would like visitors to have the guestbook straight away, and then when they click the link "Write a new message" or "Schrijf een nieuw bericht" the come to the page where they can leave a new message.
Thx for the help.
Duivelken
http://www.djkina.be
http://www.scoutskluisbergen.be
http://www.charlies-gent.be/nieuw
http://www.galerierooyart.nl
Edit: Solved it by messing around in the code a bit, my apologies.
#34
Posted 02 April 2007 - 01:02 AM
thx for the reply but the problem was already solved by changing the code.
Many thx.
Duivelken
#35
Posted 27 October 2007 - 08:33 AM
I installed guestbook, it looks nice. How can I manage this guestbook messages (other then going into the etomite database and edit the specific table)?
#36
Posted 17 September 2008 - 11:47 AM
Using guestbook3 but getting loads of spam is there any way of adding a spam protection to this guestbook.
Thanks
Roger
#37
Posted 27 November 2009 - 05:52 AM
Edited by MoZz, 30 November 2009 - 05:53 PM.
#38
Posted 30 November 2009 - 05:52 PM
dodgeuk, on 17 September 2008 - 11:47 AM, said:
Using guestbook3 but getting loads of spam is there any way of adding a spam protection to this guestbook.
Thanks
Roger
Yeaaah!!!
It's work!
There is a working code of GuestBook3 with captcha!!!
Some words in russian - translate it yourself!!!
Snippet without any smiles and forms for it.
Quote
Snippet: GuestBook3 (based on GuestBook2) - Etomite v0.6.3 - Modified 2005-09-05
Created By: Ralph A. Dahlgren - rad14701@yahoo.com
Modified By: Mikko K. Lammi - lammikko@gmail.com - www.parea.fi
Modified By: Rain R. Visser
Modified By: MoZz (based on original scripts GuestBook(with Captcha)&GuestBook3)
Usage: Create an Etomite user or admin as GuestBook owner in Etomite Manager
Change $defaultadmin variable to match GuestBook owner
OR
Messages will be deposited into that mailbox, but only GuestBook
messages will be displayed within the GuestBook listing.
Place the .gifs in assets\images
Place the .JS in assets\site
Variables: $gbtype - Referenced in GuestBook admin User Messages Subject
$gbadmin - Etomite User/Admin who will receive this message
Examples: Use the [!SnippetName!] syntax instead of regular [[SnippetName]]:
[!GuestBook!] - Will use snippet defaults for $gbtype and $gbadmin
[!GuestBook?gbtype=GuestBook&gbadmin=guestbook!] - Self Explanatory
[!GuestBook?gbadmin=someuser!] - Uses $etomite->documentObject['pagetitle'] for $gbtype
[!GuestBook?bgtype=SomeTopic!] - Uses $defaultadmin for $gbadmin
Note: $etomite->documentObject['createdby'] was not used for $gbadmin intentionally
To implement this capability would entail and additonal DB Query before Inserts
*/
// BEGIN SETTINGS -------------------------------------------------------------
// Variables you may want to change
$defaultadmin = "GuestBook"; // Default GuestBook admin to use if $gbadmin not passed
$gap = " :: "; // Separator between $type and $subject in User Messages Subject field
$messages = 10; // Number of messages on one page
$header_style = "style='font-size: medium;'"; // Css style for header
$message_box_style = "style='border: 1px solid #000000; padding: 5px; background-color: #DDDDDD;'"; // Css style for message box
$dateformat = "%d.%m.%Y om %H:%M:%S"; // Preferred Date & Time display format, European dateformat is "%d.%m.%Y %H:%M:%S"
$order = "DESC"; // Order of messages by postdate: DESC = descending, ASC = ascending
$server_offset_time = 21600; // number of seconds for timezone difference
// Russian language for guestbook (optimized 4 Opera AC)
$_lang_guestbook["write_new_message"] = "Написать новое сообщение ";
$_lang_guestbook["messages"] = "Сообщения ";
$_lang_guestbook["name_or_alias"] = "Введите имя или E-mail адрес ";
$_lang_guestbook["send"] = "Отправить ";
$_lang_guestbook["reset"] = "Очистить ";
$_lang_guestbook["next_page"] = "Следущая страница ";
$_lang_guestbook["previous_page"] = "Предыдущая страница ";
$_lang_guestbook["message"] = "Сообщение: ";
$_lang_guestbook["date_and_time"] = "Дата и время ";
$_lang_guestbook["sender"] = "Отправитель ";
$_lang_guestbook["cancel"] = "Отменить ";
$_lang_guestbook["error"] = "GuestBook User/Manager not found... Check your settings...";
// END SETTINGS ---------------------------------------------------------------
// Variables you should not need to change
$type = isset($gbtype) ? $gbtype : $etomite->documentObject['pagetitle']; // Set $type field for new entry
$trimtype=substr($type,0,15); // Truncate $type to 15 character limit for field
$guestbookadmin = isset($gbadmin) ? $gbadmin : $defaultadmin; // Set GuestBook admin
$pageid=$etomite->documentIdentifier; // ID of the calling document
$pageurl=$etomite->makeURL($pageid); // URL if you don't have friendly uri
$tbl = $etomite->dbConfig['dbase'].".".$etomite->dbConfig['table_prefix'];
$msgdb = $tbl."user_messages"; // DB.Prefix_user_messages variable
// Function to make hyperlinks
function hyperlink($text) {
$search = array ("/([\w\.\/\&\=\?\-]+)@([\w\.\/\&\=\?\-]+)/","/((ftp(7?):\/\/)|(ftp\.))([\w\.\/\&\=\?\-]+)/","/((http(s?):\/\/)|(www\.))([\w\.\/\&\=\?\-]+)/");
$replace = array ("<a href='mailto:$1@$2'>$1@$2</a>","<a href='ftp$3://$4$5' target='_blank'>$4$5</a>","<a href='http$3://$4$5' target='_blank'>$4$5</a>");
return preg_replace ($search, $replace, $text);
}
// Don't allow unwanted re-posts of messages
if($_POST['submitted'] == "TRUE") header( "Location: index.php?id=$etomite->documentIdentifier" );
// Query for the user ID (id) for the GuestBook owner
$sql = "SELECT id FROM ".$tbl."manager_users WHERE ".$tbl."manager_users.username='$guestbookadmin';"; $rs = $etomite->dbQuery($sql); $limit = $etomite->recordCount($rs); // Check to make sure $guestbookadmin has been created and assigned if($limit == 1) { $userrec = $etomite->fetchRow($rs); $userid = $userrec['id'];
// Check to see if a valid message has been submitted
if(isset($_POST['submit']) && ($_POST['subject'] > "") && ($_POST['message'] > "") && ($etomite->validCaptchaCode($_POST['captcha']))){
$postdate = time();
$recipient = $userid;
$subject = $type . $gap . strip_tags($_POST['subject']);
$message = strip_tags($_POST['message']);
// Query to INSERT a new GuestBook message into user_messages
$sql = "INSERT INTO $msgdb ( id , type , subject , message , sender , recipient , private , postdate , messageread ) VALUES ( '', '$type', '$subject', '$message', '0', '$recipient', '0', '$postdate', '0' );";
$rs = $etomite->dbQuery($sql); // Execute the Query
$submitted="TRUE";
}
else $submitted = "TRUE";
// Display write new message form
if ($_GET['new_message'] == "TRUE") {
// Display a Form for submitting a new message
$output .= "<table width='100%'><tr><td align=center>";
$output .= "<h2 $header_style>".$_lang_guestbook["write_new_message"]."</h2>";
$output .= "<form name=\"form\" method='post' action='index.php'>";
$output .= "<input type='hidden' name='id' value='$pageid' />"; $output .= "<input type='hidden' name='submitted' value='$submitted' />"; $output .= $_lang_guestbook["name_or_alias&']."<br /><input name='subject' size='40' />"; $output .= "<br /><br />".$_lang_guestbook["message&']."<br /><text"."area rows='8' cols='50' name='message'></"."text"."area>"; $output .= "<div>Enter SecCode:</div><div><input name='captcha' size='40' /></div><br />"; $output .= "<div>".$etomite->getCaptchaCode()."</div><br />";$output .= "<input type='submit' name='submit' value='".$_lang_guestbook["send&']."' />";
$output .= " <input type='reset' name='reset' value='".$_lang_guestbook["reset&']."' />";
$output .= " <input type='button' value='".$_lang_guestbook["cancel"]."' onClick=\"window.location.href='$pageurl&new_message=FALSE'\">";
$output .= "</form>";
$output .= "</td></tr></table>";
}
// Display write new message link
else {
$output .= "<h2 $header_style>".$_lang_guestbook["write_new_message"]."</h2>";
$output .= " <form><input type='button' value='".$_lang_guestbook["write_new_message"]."' onClick=\"window.location.href='$pageurl&new_message=TRUE'\"></form>";
}
$output .= "<h2 $header_style>".$_lang_guestbook["messages"]."</h2>";
// Query to COUNT existing messages
$sql = "SELECT * FROM ".$tbl."user_messages
WHERE ".$tbl."user_messages.recipient=$userid
AND ".$tbl."user_messages.type='".$trimtype."'
ORDER BY ".$tbl."user_messages.postdate $order;";
$rs = $etomite->dbQuery($sql); // Execute the Query
$total = $etomite->recordCount($rs); // Number of messages found
// Message page number from GET
if (isset($_GET["page"])) { $page = $_GET["page"]; }
else { $page = 1; }
// Index where to start in result set
$from = 0 + ($page-1)*$messages;
// Query to SELECT existing messages
$sql = "SELECT * FROM ".$tbl."user_messages
WHERE ".$tbl."user_messages.recipient=$userid
AND ".$tbl."user_messages.type='".$trimtype."'
ORDER BY ".$tbl."user_messages.postdate $order LIMIT $from, $messages;";
$rs = $etomite->dbQuery($sql); // Execute the Query
$limit = $etomite->recordCount($rs); // Number of messages found
// Number of pages
$pages = ceil($total/$messages);
// Previous page link
$previouspage = $page-1;
$previouspage_text .= " <form><input type='button' value='? ".$_lang_guestbook["previous_page"]." [$previouspage/$pages]' onClick=\"window.location.href='$pageurl&page=$previouspage'\"></form>";
// $previouspage_text = "<a href='?page=$previouspage'>? ".$_lang_guestbook["previous_page"]." [$previouspage/$pages]</a> ";
// Next page link
$nextpage = $page+1;
$nextpage_text = " <form><input type='button' value='".$_lang_guestbook["next_page"]." [$nextpage/$pages] ?' onClick=\"window.location.href='$pageurl&page=$nextpage'\"></form>";
// $nextpage_text = "<a href='?page=$nextpage'>".$_lang_guestbook["next_page"]." [$nextpage/$pages] ?</a>";
// Previous and next page links at top of the page
if ($previouspage > 0) { $output .= $previouspage_text; }
if ($nextpage <= $pages) { $output .= $nextpage_text; }
// Empty lines
if ($total > $messages) {
$output .= "<br /><br />";
}
// Loop through each of the messages and format for display
for ($y = 0; $y < $limit; $y++) {
if ($order == "DESC") { $number = $total - $from - $y; }
if ($order == "ASC") { $number = $from + $y + 1; }
$guestbookrec = $etomite->fetchRow($rs);
$poster = str_replace($type.$gap,"",$guestbookrec['subject']);
$message = nl2br($guestbookrec['message']);
$postdate = strftime($dateformat, $guestbookrec['postdate']+$server_offset_time);
$output .= "<table $message_box_style width='700'>";
$output .= "<tr bgcolor=#CCCCCC><td nowrap width='80%'>$poster</td>";
$output .= "<td nowrap width='20%' align=right>$postdate</td>";
$output .= "<tr><td colspan=\"2\"> </td>";
$output .= "<tr><td colspan=\"2\">$message</td>";
$output .= "<tr><td width='80%'> </td>";
$output .= "<td width='20%' nowrap align=right>".$_lang_guestbook["message"].": $number/$total</td>";
$output .= "</table><br />";
}
// Previous and next page links at bottom of the page
if ($previouspage > 0) { $output .= $previouspage_text; }
if ($nextpage <= $pages) { $output .= $nextpage_text; }
}
// If no valid GuestBook owner is found display error message...
else $output = $_lang_guestbook["error"];
// Output
return $output;
#39
Posted 02 December 2009 - 01:19 PM
But, I get this:
Quote
#40
Posted 02 December 2009 - 01:53 PM
// If no valid GuestBook owner is found display error message... else $output = $_lang_guestbook["error"];
This means that the default GuesBook admin doesn't exist... You can assign the proper admin in the snippet call as described in the self contained snippet documentation...
Or modify:
$defaultadmin = "GuestBook"; // Default GuestBook admin to use if $gbadmin not passed
Or create the manager user "GuestBook" and give them permission to access messages...
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











