Author |
Message |
05/03/2004 16:14:59
|
Anonymous
|
Hi-
I installed advanced guestbook 2.2 (it came on my hosting account) and I love it. There are just three things I need to do in order to make it "live" on my site and I can't figure it out:
1)I need to replace logo and put up a banner .jpg on the top
2) I need to be able to link back to my website homepage
3) I would love to be able to get right of the image that says "sign my guestbook" in red script that is on the header
Any help would be much appreciated...just telling me where to find out how I can get to this stuff would be a help!
Stephanie
|
|
06/03/2004 10:17:02
|
Anonymous
|
Hi Stephanie,
Might be able to help you. Just installed Advanced Guestbook and made a few changes myself. Hopefully this will help...
CHANGING DROP DOWN MENU
Instructions below are based on what I found here... http://proxy2.de/forum/viewtopic.php?t=1686&highlight=drop+menu
Open the file called gb.class/php in the lib subdirectory.
Look for where it says...
function generate_JumpMenu() {
$menu_array[] = "<select name=\"entry\" onChange=\"urlJump('self',this)\" class=\"select\">";
$menu_array[] = "<option value=\"0\" selected>".$this->db->LANG["FormSelect"]."</option>";
(With line numbering on it should be lines 58, 59 and 60).
Between lines 59 and 60 insert the menu entries you want - something along these lines (this adds 2 entries, you can add more or less)...
$menu_array[] = "<option value=\"http://domainname.com/home\" class=\"select\">Home Page</option>";
$menu_array[] = "<option value=\"http://domainname.com/sitemap\" class=\"select\">Site Map</option>";
Change domianname.com/home and domainname.com/sitemap to the URLs you want and change Home Page and Site Map to the relevent page descriptions.
Save all that and open the file called header.php in the templates subdirectory. Insert the following right at the top of the page...
<script language="Javascript">
<!--
function urlJump(target,selObj) {
var optionValue = selObj.options[selObj.selectedIndex].value;
var isURL = /http:/;
var regMatch = isURL.test(optionValue);
if(regMatch == true) {
eval(target+".location='"+selObj.options[selObj.selectedIndex].value+"'");
}
}
// -->
</script>
Save that and hopefully now you've got a drop down menu.
REPLACE LOGO, ADD BANNER ETC
Not sure what you mean by the logo - apart from the Sign The Guestbook thing I haven't got one. Anyway, you can get rid of Sign The Guestbook and replace it with your own logo / banner / whatever...
You need to open the file called body.php in the templates dubdirectory and look for...
<td width="44%" align="right" class="font2"><img src="$GB_PG[base_url]/img/signing.gif" width="90" height="30" border="0"> <br></a>
(line 5 with numbering on).
signing.gif is the name of logo - either remove it from the script so as to get shut of it or replace it with your own banner. If you replace it make sure to upload your banner to the img subdirectory and change the align, width, height and border settings to suit.
-----------------------
Hope it makes sense - I'm off to finish setting up my guestbook now, changing the smilies then it goes 'live'. Good luck.
Trevor
|
|
08/03/2004 04:08:18
|
Anonymous
|
Thanks alot Trevor! I think I get it all
Stephanie
|
|
08/03/2004 04:14:11
|
Anonymous
|
I'm far from an expert it's just that the things you wanted to do were the things I'd just struggled with for ages. If you need any more help post a message or mail me at 070304c@kahlil.org. Good luck
|
|
04/04/2004 10:05:18
|
Anonymous
|
This is exactly what I've been looking for! Awesome!
|
|
17/04/2004 14:43:30
|
Anonymous
|
Wow this is so kooooooooooool I just uploaded the guestbook and was wanting to make changes "logos" to my own. Came to this forum and within seconds found my answer. Thank you, you guys are wonderful!!
|
|
26/06/2004 05:02:27
|
JTD
Graduate
Joined: 08/05/2004 21:52:50
Messages: 529
Location: Arkansas
Offline
|
Ok I followed the instructions put the stuff where you said to put it and I get this when I try to go to the links I put in there.
Query Error
--------------------------------------------------------------------------------
MySQL Error : Query Error
Error Number: 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'http://ravenprom.org/gallery/index.php, 10' at line 1
Date : Fri, June 25, 2004 22:00:59
IP deleted
Browser : Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Referer : http://www.ravenprom.org/guestbook/index.php
PHP Version : 4.3.3
OS : Linux
Server : Apache/1.3.29 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.3 FrontPage/5.0.2.2634 mod_ssl/2.8.16 OpenSSL/0.9.6b
Server Name : www.ravenprom.org
|
LINK-> Use Lazarus Guestbook |
|
26/06/2004 06:34:52
|
Trevor
Student
Joined: 17/06/2004 02:53:11
Messages: 67
Location: UK
Offline
|
Hi JTD,
I've had a look at your guestbook and it's version 2.2. The instructions worked in my guestbook but that's version 2.3.1 - it could be that the instructions don't work with 2.2.
You could try checking out the instructions here...
<<<http://proxy2.de/forum/viewtopic.php?t=1686>>>
I've got a feeling they're the same as some instructions that were posted some time back so they may work with your version of the guestbook.
If you can't get it sorted and you're not in too much of a rush you can e-mail me copies of your header.php and gb.class.php files and I'll have a look at them over the weekend. Use this as the e-mail address: guestbook at kahlil dot org.
If that still doesn't work I've got a spare site and can install a new guestbook on there (guestbook comes with the webhosting so it installs automatically). Once I've done that I can make the changes, zip all the files and mail them to you (you'd need to re-enter your existing guestbook entries).
Hope you get it sorted.
Trevor
|
|
26/06/2004 17:01:56
|
JTD
Graduate
Joined: 08/05/2004 21:52:50
Messages: 529
Location: Arkansas
Offline
|
Ok I will be emailing you those files. I also tried that version you linked me to the other day and got the same errors the other person did.
|
LINK-> Use Lazarus Guestbook |
|
26/06/2004 22:40:03
|
Anonymous
|
I also tried the above, and get this error:
Query Error
MySQL Error : Query Error
Error Number: 1064 You have an error in your SQL syntax near 'http://faithtabernacleupc.net, 20' at line 1
Date : Sat, June 26, 2004 20:05:38
IP : xx.xxx.xxx.xxx
Browser : Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2)
Referer : http://www.faithtabernacleupc.net/Guestbook/index.php
PHP Version : 4.3.6
OS : FreeBSD
Server : Apache/1.3.28 (Unix) FrontPage/5.0.2.2510
Server Name : www.faithtabernacleupc.net
SYNTAX in my gb.class.php
function generate_JumpMenu() {
$menu_array[] = "<select name=\"entry\" class=\"select\">";
$menu_array[] = "<option value=\"http://faithtabernacleupc.net/\" class=\"select\">Home Page</option>"; (this is what I added)
$menu_array[] = "<option value=\"0\" selected>".$this->db->LANG["FormSelect"]."</option>";
Was this the correct place to put it?? I am totally new to this (as of this morning ...)
After making the changes, I did notice that in the status bar of IE6, after clicking the "GO" button, it says "Opening page: http://www.faithtabernacleupc.net/Guestbook/index.php" instead of the page I "thought" I requested...
Does this mean anything?
Thanks,
mastersmurfie
|
|
27/06/2004 08:21:35
|
Trevor
Student
Joined: 17/06/2004 02:53:11
Messages: 67
Location: UK
Offline
|
Hi Mastersmurfie,
I had a look at your guestbook.html script and it looks like you've got a bit of script missing.
Try this - open gb.class.php (in the lib sub-directory) and scroll down to where it says...
function generate_JumpMenu() {
My guess is that the next line is either...
$menu_array[] = "<select name=\"entry\" class=\"select\">";
or it's
$menu_array[] = "<option value=\"www.faithtabernacleupc.net" class=\"select\">Home Page</option>";
If that's the case then you need to make a small change. Find this again...
function generate_JumpMenu() {
Make the following changes, the blue is already part of the script and doesn't need changing, it's the bit in red that you need to make sure is included.
function generate_JumpMenu() {
$menu_array[] = "<select name=\"entry\" onChange=\"urlJump('self',this)\" class=\"select\">";
$menu_array[] = "<option value=\"http://www.faithtabernacleupc.net\" class=\"select\">Home Page</option>"; $menu_array[] = "<option value=\"0\" selected>".$this->db->LANG["FormSelect"]."</option>";
This should add a link to your home page. I've tested it on my site and it works fine. (note the backslash at the end of the URL - important).
With this menu you don't need to click the 'go' button, once you click a heading from the drop down list you're taken straight to the page. You may want to get rid of the 'go' button, look for the following line of text and delete it (it's a few lines further down)...
$menu_array[] = "<input type=\"submit\" value=\"".$this->db->LANG["FormButton"]."\" class=\"input\">";
I hope that helps.
Regards,
Trevor
|
|
27/06/2004 11:43:20
|
JTD
Graduate
Joined: 08/05/2004 21:52:50
Messages: 529
Location: Arkansas
Offline
|
Hey Trevor. Thank you very much. My jump menu is now working. Actually it was the part above that helped me. I tried your modified gb_class and header.php files you sent. They didnt work. But redoing my excisting gb_class file like the above post did the trick.
|
LINK-> Use Lazarus Guestbook |
|
27/06/2004 16:32:33
|
mastersmurfie
Beginner
Joined: 26/06/2004 22:22:42
Messages: 14
Offline
|
Trevor,
THANKS!!! Works perfectly! Thank you thank you thank you!!
Now, I'm off to learn more about this PHP thing
mastersmurfie
|
|
28/06/2004 09:14:52
|
Anonymous
|
Trevor,
Since you seem to be the resident expert on this topic.
I have been able to load up my own gfx where the "guesbook" and "sign yada yada" gfx was. The problem that I am having now is that when I go to sign the guestbook, I go to that page, then go BACK to the guestbook, and the images do not load for some reason (but the size of the gfx loads up the right size). I have checked the body.php already and in theory it should work. Does it have something to do with the index.php?
Here is my guestbook that I have just started up:
http://www.mikefilms.com/guestbook/
|
|
28/06/2004 13:29:13
|
Trevor
Student
Joined: 17/06/2004 02:53:11
Messages: 67
Location: UK
Offline
|
Hi Mike,
I'm FAR from an expert, I just bumble around with the script and see what happens - what I've picked up has been more through trial and error than anything, but I'll see if I can help.
OK, it looks like you've got 2 GIF files - camera.gif and guestbook.gif. When I looked at your guestbook neither were displaying on either the view or sign pages (didn't matter if I went forward or backward between the pages). I guess they're still loaded on the server?
Looking at the html everything's OK apart from null strings where IMG SRC should be. I put some test graphics in and everything worked fine.
Problem could be in the script of body.php, it should look something like (it's pretty close to the top)...
<tr><td align="center" class="font2"><a href="http://www.your-domain.com/home"><img src="$GB_PG[base_url]/img/your-logo.gif" width="197" height="40" border="0"></a><br>
The alignment, width, height, URL, name of graphic etc may be different but the general syntax should be the same, you might also have a load of nbsp's in the script (they're irrelevant).
Have a look at your body.php file and see if it's all in order. If you can't get it working I don't mind having a look at the file for you - can you mail me a copy of your body.php file, the guestbook.gif and camera.gif would be useful too. E-mail addy is: guestbook at kahlil dot org.
Regards,
Trevor
|
|
|