Author |
Message |
10/02/2006 19:29:34
|
NewtonLoops
Beginner
Joined: 17/09/2005 17:48:07
Messages: 12
Offline
|
Hi Everybody,
I had the good idea to go in and edit out the "Add Homepage" form field on the AGB signing page to deter spammers. Seems all the really want to do is leave link backs. I did some other minor things and all is workiing except I now have this error code at the top of the AGB index / first page. I found the file and the line but need help with the fix.
Can anybody help?
Thanks
nl
-------------------------------------------------
Here's error and the code. I bolded it for reading.
Warning: fread(): Length parameter must be greater than 0. in /home/MYNAME/public_html/guestbook/lib/template.class.php on line 53
}
function get_template($tpl) {
if (!isset($this->template[$tpl])) {
$filename = "$this->root_dir/templates/$tpl";
if (file_exists("$filename")) {
$fd = fopen ($filename, "r");
$this->template[$tpl] = fread ($fd, filesize ($filename));
fclose ($fd);
$this->template[$tpl] = ereg_replace("\"", "\\\"", $this->template[$tpl]);
}
|
|
10/02/2006 20:23:34
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
it means one of your templates is either missing or blank and the AG template code does not like that. Just put a space in the empty file.
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
11/02/2006 22:00:16
|
NewtonLoops
Beginner
Joined: 17/09/2005 17:48:07
Messages: 12
Offline
|
Carbon,
I don't savvy php so well. Can you tell me where / what to do?
Much appreciated.
NL
|
|
12/02/2006 08:10:02
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
When you were making your changes you must of edited one of the template files and left it blank. I couldn't say which file but possibly url.php or form_url.php in templates folder.
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
12/02/2006 20:39:03
|
NewtonLoops
Beginner
Joined: 17/09/2005 17:48:07
Messages: 12
Offline
|
Yes, that is what I was doing. The idea was to remove the message homepage url link fields so people couldn't post fake messages just so they could leave a link back to their site or some other junk site.
I think it's a good fix to the spam problem. Maybe you can make a patch for anybody wanting to try it that way.
Ok, I'll go back and look for the problem.
Thanks for the info.
NL
|
|
12/02/2006 20:44:50
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
Well I assume you just removed
from form.php
then just remove $URL from entry.php and
$gb_post->url = (isset($_POST["gb_url"])) ? $_POST["gb_url"] : '';
from addentry.php
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
12/02/2006 21:07:50
|
NewtonLoops
Beginner
Joined: 17/09/2005 17:48:07
Messages: 12
Offline
|
Carbon,
I was looking at the guestbook you use and saw you have removed the add homepage field form the sign the guestbook page . This is what I was going for when I deleted the wrong code.
Do you have a howto up anywhere to do it like you did?
Also, curiosity has me wondering why you are not using Lazarius on this site?
NL
|
|
12/02/2006 21:14:39
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
I use Lazarus which is a fork of the Advanced Guestbook where removing the homepage is an option.
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
|