Author |
Message |
07/03/2003 19:20:09
|
kareem
Newbie
Joined: 07/03/2003 19:18:40
Messages: 3
Offline
|
Hi!
In the advanced guestbook page, there is a drop down menu that only includes "Guestbook". I prefer to add more links to it, please tell me how to add a link, for example to the homepage.
Thanks
|
|
11/03/2003 00:13:07
|
Anonymous
|
The dropdown menu is being is created is the script gb.class.php
function generate_JumpMenu() {
/* add your entry here -->
$menu_array[] = "<select name=\"entry\" class=\"select\">";
*/
$menu_array[] = "<select name=\"entry\" class=\"select\">";
$menu_array[] = "<option value=\"0\" selected>".$this->db->LANG["FormSelect"]."</option>";
.
.
.
|
|
11/03/2003 00:34:13
|
kareem
Newbie
Joined: 07/03/2003 19:18:40
Messages: 3
Offline
|
Thanks! Would you please give me an example of url and where to put it.
assume that I need a link ot my homepage www.hompage.com and a title "Homepage" .. how do i do it?
Thanks
|
|
11/03/2003 01:00:33
|
Anonymous
|
Hi karrem,
Here is what you have to do:
1.)
Replace http://www.mydomain.com/ with your homepage URL
2.) Now add a javascript function to the guestbook header
Search for the file header.php and add this
....
<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>
</head>
<body bgcolor="$VARS[pbgcolor]" link="$VARS[link_color]" vlink="$VARS[link_color]">
|
|
11/03/2003 01:10:58
|
kareem
Newbie
Joined: 07/03/2003 19:18:40
Messages: 3
Offline
|
Thanks! I will try it soon and let you know the results. Right now I am stuck with school things ...
|
|
11/03/2003 01:12:01
|
Anonymous
|
good luck
|
|
21/03/2003 01:33:40
|
Anonymous
|
Thanks, exactly what I needed as well. This worked perfectly!
Josh
|
|
15/04/2004 00:24:54
|
Anonymous
|
I have been working all day looking at all te code to try and find where I needed to make the changes, without any luck. Guess I should have come here to the Forum first! Your code change suggested above, if entered exactly as you list, does in fact place a drop down that will allow users to go back to home page. Thank You
|
|
15/05/2004 06:58:40
|
Anonymous
|
I have tried this, but i get an error:
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /home/sortemas/public_html/guestbook/lib/gb.class.php on line 75
Fatal error: Cannot instantiate non-existent class: guestbook in /home/sortemas/public_html/guestbook/index.php on line 9
can anyone help me???
|
|
15/05/2004 07:41:17
|
Anonymous
|
guest wrote:I have tried this, but i get an error:
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /home/sortemas/public_html/guestbook/lib/gb.class.php on line 75
Fatal error: Cannot instantiate non-existent class: guestbook in /home/sortemas/public_html/guestbook/index.php on line 9
can anyone help me???
sorry! I was just doing it wrong!
|
|
19/05/2004 21:58:27
|
Anonymous
|
Thank for the help its work like a magic.
|
|
13/06/2004 01:17:50
|
Anonymous
|
I was wondering if there was a way to get rid of the go button next to the drop-down menu or allow it to be used with the new home addition.
Thanks,
Millie
|
|
21/06/2004 09:14:41
|
Anonymous
|
I use 2.2 and have been wondering the same, I have gone into the admin templates but the one said her doesn't show there so how can I go about adding menu's to the Jump Menu?
|
|
12/01/2007 17:03:28
|
SnowDemonKennel
Newbie
Joined: 11/01/2007 18:47:24
Messages: 2
Offline
|
I followed the directions above, finding the sections of code and adding the above mentioned sections and I thought it worked but I got an error when I clicked "go" to return to the home page. The error is as follows:
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://www.xtremedetails.com/snowdemonkennel, 20' at line 1
Date : Fri, January 12, 2007 15:52:21
Any suggestions?
A little unrelated:
I was told yesterday on another issue that I should update but I seem to not be able to. My version has no misc folder and no update file of any kind. I tried to do it manually with no success so I just took the ability to sign from the "guestbook" page as well as the admin login. I can give the customer the link to php form for them to fill out and can get to my admin login myself so I guess I can make due with it all. I created the website with Yahoo Business and they only offer the 2.3.1 and I have found no way to update it successfully. It appears that they only offer limited SQL functionality so I will just have to make the best of it. Thanks for all your help, btw.
EDIT:
I just decided to add a link myself at the top of the page to go back to home and completely removed the drop down and it is all working fine now, thanks anyways.
|
|
|