Author |
Message |
24/02/2004 02:18:43
|
Anonymous
|
Is the away to add links to other pages of my site from guestbook? Like home, contact us, games, etc.
|
|
24/02/2004 02:36:56
|
Anonymous
|
iam having the same problem is there anyone out there who can help? i have people complaining that there is no link on my guestbook back to the homepage. im also havin the same problem with my bulletin board.
|
|
24/02/2004 03:01:35
|
Confused
Newbie
Joined: 24/02/2004 02:15:59
Messages: 3
Offline
|
delboy;
I know you can use target="_blank" and have it open in a new window if you want to but myself i would rather have links to different pages.
|
|
24/02/2004 04:46:59
|
Anonymous
|
Folks,
This info was posted a few times, back awhile. I used it to link to my homepage using the drop down menu. Not being an expert, I assume if you know what to do you can add other links also. Anyway here's the info..hope it helps..
1). open gb.class.php and edit around line 73
Code:
function generate_JumpMenu() {
$menu_array[] = "<select name=\"entry\" onChange=\"urlJump('self',this)\" class=\"select\">";
$menu_array[] = "<option value=\"http://www.mydomain.com/\" class=\"select\">Back To Home</option>";
$menu_array[] = "<option value=\"0\" selected>".$this->db->LANG["FormSelect"]."</option>";
if ($this->db->VARS["entries_per_page"] < $this->total) {
$remain = $this->total % $this->db->VARS["entries_per_page"];
$i = $this->total-$remain;
while ($i > 0) {
$num_max = $i;
$num_min = $num_max-$this->db->VARS["entries_per_page"];
$num_min++;
$menu_array[] = "<option value=\"$remain\">$num_min-$num_max</option>";
$i = $num_min-1;
$remain += $this->db->VARS["entries_per_page"];
}
}
$menu_array[] = "</select>";
$menu_array[] = "<input type=\"submit\" value=\"".$this->db->LANG["FormButton"]."\" class=\"input\">";
return $menu_array;
}
Replace [/b]http://www.mydomain.com/ [/b]with your homepage URL
2.) Now add a javascript function to the guestbook header
Search for the file header.php and add this
Code:
<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]">
|
|
25/02/2004 04:08:10
|
Anonymous
|
thanks or the help, but there is still one problem, i do not have gb.class.php in the guestbook but ill check my bulletin board to see i it has it, i probably do have it in the guestbook somewhere but i just cant see it. could someone please point me in the right direction.
|
|
25/02/2004 04:26:12
|
Anonymous
|
Delboy,
I access through cpanel, not sure where your files are. Anyway, open your guestbook file, then look for "lib" file, open it and you will find the gb.class.php file. Open it to edit and scroll down to around line 73 and match the code, then follow instuctions for editing.
HTH,
YT
|
|
|