How To Modify Script For My Purposes???
How To Modify Script For My Purposes???
Script URL:pgh.creativevpcom/gb16/gbook.php
Version of script:1.6
Hosting company:1 and 1.com
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
I know absolutely nothing about PHP, but I am starting to learn it.
In the mean time, I have need for a Feedback type of form to be used for "Reviews" that will post to my website.
I have looked around and it appears that no one has put a form like this together so I found this guestbook script and it pretty much has the output that I am looking for. The problem is that I don't want a guestbook.
Is there anyone here that would be willing to help me modify the script to suit my needs?
All I am looking for is something that asks for Member Name, Date of Review, Restaurant Name and a place for the review. Pretty basic stuff.
With this guestbook script, it works perfectly (pretty much) for what I need. The exception is that I have no idea how to get rid of or around the required email address. I would like to get rid of the email thing and in it's place have the Restaurant name. I have been able to make some minor changes without really changing the script, but I have no clue as to how to get rid of the email and add Restaurant Name.
Anyone have any idea as to how I can do this? If not, anyone know of a feedback type form that might work instead?
Until I get this resolved, my site is sitting in limbo.
My thanks for any help with this . . .
Version of script:1.6
Hosting company:1 and 1.com
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
I know absolutely nothing about PHP, but I am starting to learn it.
In the mean time, I have need for a Feedback type of form to be used for "Reviews" that will post to my website.
I have looked around and it appears that no one has put a form like this together so I found this guestbook script and it pretty much has the output that I am looking for. The problem is that I don't want a guestbook.
Is there anyone here that would be willing to help me modify the script to suit my needs?
All I am looking for is something that asks for Member Name, Date of Review, Restaurant Name and a place for the review. Pretty basic stuff.
With this guestbook script, it works perfectly (pretty much) for what I need. The exception is that I have no idea how to get rid of or around the required email address. I would like to get rid of the email thing and in it's place have the Restaurant name. I have been able to make some minor changes without really changing the script, but I have no clue as to how to get rid of the email and add Restaurant Name.
Anyone have any idea as to how I can do this? If not, anyone know of a feedback type form that might work instead?
Until I get this resolved, my site is sitting in limbo.
My thanks for any help with this . . .
better script recommendation
Perhaps this would serve your needs better
http://www.phpjunkyard.com/php-message-board.php
instead of a guestbook, try the message board script.
http://www.phpjunkyard.com/php-message-board.php
instead of a guestbook, try the message board script.
World's shortest poem: We, see.
I have never actually played with this GB but I think the GB would be better then the MB for what he is trying to do as the way it works and lays out seems to be more of what he's looking for, I wouldn't think that should be a big deal just small mods, maybe I will take a quick peak at the GB later ...
As I have moded many PHPJunkyard scripts in the past for various custom usages.
DC
As I have moded many PHPJunkyard scripts in the past for various custom usages.
DC
To Code Or Not To Code That Is The Question?
Was my post of any help to you? if so please do [url=http://www.clickcraft.net/slice_donations.php][b]Buy Me A Slice[/b][/url] ...
Was my post of any help to you? if so please do [url=http://www.clickcraft.net/slice_donations.php][b]Buy Me A Slice[/b][/url] ...
Hello SkyHawk,
I saw your message at the day you posted it but was too busy at work at that time and forgot it afterwards
But the postings today was the right reminder. So here it goes.
Open language.inc.php and change:toandto
Open settings.php and set:
Open gbook.php and change:
I start with the highest line numbers, so the will stay correct:
Line 982 and line 539 change:to
Lines 715-717 change
to
I hope this is what you wanted. If not, feel free to ask again.
Greetings,
Henrie
I saw your message at the day you posted it but was too busy at work at that time and forgot it afterwards

But the postings today was the right reminder. So here it goes.
Open language.inc.php and change:
Code: Select all
$lang['t20']='E-mail:';
Code: Select all
$lang['t20']='Restaurant:';
Code: Select all
$lang['t52']='<b>Your e-mail:</b>';
Code: Select all
$lang['t52']='Restaurant name:';
Code: Select all
$settings['hide_emails']=0;
I start with the highest line numbers, so the will stay correct:
Line 982 and line 539 change:
Code: Select all
echo $lang['t20'].' <a href="mailto:'.$email.'" class="smaller">'.$email.'</a>';
Code: Select all
echo $lang['t20'].' '.$email.'';
Code: Select all
$v['email']=htmlspecialchars($_POST['email']);
if (strlen($v['email']) > 0 && !(preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/",$v['email']))) {$v['email']='INVALID';}
$v['email']=str_replace($char,$repl,$v['email']);
Code: Select all
$v['email'] = '';
Greetings,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
I've just installed the guestbook script and am delighted with it. The clearly written instructions and this forum have been a great help. My thanks to Klemen, Henrie, and those who have contributed to this forum.
It's not clear if SkyHawk (above) appreciated Henrie's help, but I certainly did.
I've been trying to adapt what Henrie said to change the 'Your web site' field to a 'Subject' field. I've made the changes to language.inc.php and these work fine. But I'm afraid I'm lost when it comes to making changes to guestbook.php. I'd also like to remove the pre-inserted 'http://' from the field.
Any help will be much appreciated (and acknowledged!).
It's not clear if SkyHawk (above) appreciated Henrie's help, but I certainly did.
I've been trying to adapt what Henrie said to change the 'Your web site' field to a 'Subject' field. I've made the changes to language.inc.php and these work fine. But I'm afraid I'm lost when it comes to making changes to guestbook.php. I'd also like to remove the pre-inserted 'http://' from the field.
Any help will be much appreciated (and acknowledged!).
Hi,
Glad you like it.
Try finding and deleting this code from the gbook.php file:
That should do the trick.
Glad you like it.
Try finding and deleting this code from the gbook.php file:
Code: Select all
$url=$url ? $url : 'http://';
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Delete these lines from gbook.php and see if it works:
Code: Select all
if ($url=='INVALID')
{
$error_buffer .= $lang['e05'].'<br class="clear" />';
$url = '';
}
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Hello iarsnoo and Klemen,
I see Klemen already answered the question while I was eating my dinner
I looked at it and following needs to be changed also
Delete lines 723-727
You should also change line 1114
to
And your visitors should also not use spamwords in the 'former url' field as it is also counted for the Junkmark spam filter.
Greetings,
Henrie
I see Klemen already answered the question while I was eating my dinner
I looked at it and following needs to be changed also
Delete lines 723-727
Code: Select all
if ($v['url'] == 'http://' || $v['url'] == 'https://') {$v['url'] = '';}
elseif (strlen($v['url']) > 0 && !(preg_match("/(http(s)?:\/\/+[\w\-]+\.[\w\-]+)/i",$v['url'])))
{
$v['url'] = 'INVALID';
}
Code: Select all
$url = '<a href="'.$url.'" class="gbook_submitted" '.$settings['target'].' rel="nofollow">'.$url.'</a>';
Code: Select all
$url = $url;
Greetings,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.