If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Modify the dropdown menu...  XML
Forum Index » Support Forum
Author Message
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
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>";

.
.
.
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
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]">
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 ...
Anonymous



good luck
Anonymous



Thanks, exactly what I needed as well. This worked perfectly!

Josh
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
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???
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!
Anonymous



Thank for the help its work like a magic.


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
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?
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.
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum