View Full Version : Easy Forum Jump hack
NexDog
08-21-2002, 06:38 AM
Is it possible to add the View New Posts link to Forum Posts? Our members are requesting it.........
Xenon
08-21-2002, 03:32 PM
you have to add the option to forumjump template and then edit this part in forumdisplay.php:// jump from forumjump
$goto = '';
switch($HTTP_GET_VARS['forumid']) {
case 'home': $goto = 'index'; break;
case 'search': $goto = 'search'; break;
case 'pm': $goto = 'private'; break;
case 'wol': $goto = 'online'; break;
case 'cp': $goto = 'usercp'; break;
}
if ($goto != '') {
if ($HTTP_GET_VARS['s']) {
$sessionhash = $HTTP_GET_VARS['s'];
} else {
$sessionhash = '';
}
header("Location: $goto.php?s=$sessionhash");
exit;
}
// end forumjump redirects
NexDog
08-23-2002, 11:43 AM
Okay, I added it to the forumjump template with a [gn] variable. What do I pass this on to in the forumdisplay.php?
I tried "getnew" and "newposts", none work:
// jump from forumjump
$goto = '';
switch($HTTP_GET_VARS['forumid']) {
case 'home': $goto = 'index'; break;
case 'search': $goto = 'search'; break;
case 'pm': $goto = 'private'; break;
case 'gn': $goto = 'getnew'; break;
case 'wol': $goto = 'online'; break;
case 'sb' : $goto = 'shoutbox'; break;
case 'cp': $goto = 'usercp'; break;
}
if ($goto != '') {
if ($HTTP_GET_VARS['s']) {
$sessionhash = $HTTP_GET_VARS['s'];
} else {
$sessionhash = '';
}
header("Location: $goto.php?s=$sessionhash");
exit;
}
// end forumjump redirects
Could you point me in the right direction?
Boofo
08-23-2002, 11:55 AM
Ok, here you go.
Change the template 'forumjump':
search for:
<option value="search" $frmjmpsel[search]>Search Forums</option>
and add after:
<option value="getnp" $frmjmpsel[getnp]>Get New Posts</option>
Change the file 'forumdisplay.php':
Search for:
case 'cp': $goto = 'usercp'; break;
and add after:
case 'getnp': $goto = 'search'; $goto2='&action=getnew'; break;
and search for:
header("Location: $goto.php?s=$sessionhash");
and replace with:
header("Location: $goto.php?s=$sessionhash$goto2");
That should do it. You owe me another one. :)
NexDog
08-23-2002, 12:17 PM
You da man...You da man...You da man...You da man...You da man...You da man...You da man...You da man...:D
Boofo
08-23-2002, 12:19 PM
You can do "Get Today's Posts" the same way. I have them both in my forumjump. :)
lordnet
11-23-2002, 06:56 PM
thanks for this action
but i want ask about some thing like this
member.php?s=$session[sessionhash]&action=getinfo&userid=$user[userid]
exactly in $user[userid]
its become as wrong.
no forum specefied!
how can add it to forum jump?
Xenon
11-24-2002, 01:58 PM
instead of $user[userid] user $bbuserinfo[userid]
lordnet
11-25-2002, 01:43 AM
would you mind explaining more.
i want to do step by step.
thank you for help
Xenon
11-25-2002, 02:12 PM
using boofo's explanations ;)
Ok, here you go.
Change the template 'forumjump':
search for:
<option value="search" $frmjmpsel[search]>Search Forums</option>
and add after:
<option value="getinfo" $frmjmpsel[getinfo]>Show your Profile</option>
Change the file 'forumdisplay.php':
Search for:
case 'cp': $goto = 'usercp'; break;
and add after:
case 'getinfo': $goto = 'member'; $goto2='&action=getinfo&userid=$bbuserinfo[userid]'; break;
and search for:
header("Location: $goto.php?s=$sessionhash");
and replace with:
header("Location: $goto.php?s=$sessionhash$goto2");
lordnet
11-25-2002, 06:42 PM
thank you very much :D
its work so fine
Xenon
11-25-2002, 08:06 PM
You're welcome :)
lordnet
11-26-2002, 03:50 PM
:(
its not work !
its become as unknoiwn user and not has profile.
lol:)
Xenon
11-26-2002, 06:22 PM
oh, i see, can'T work, global.php has not been required in forumdisplay.php before this line...
change this:
$goto2='&action=getinfo&userid=$bbuserinfo[userid]'; break;
into this:
$goto2='&action=getinfo&userid=$bbuserid'; break;
and after </select> add <input type=hidden name="bbuserid" value="$bbuserinfo[userid]">
i think then it should work..
lordnet
11-26-2002, 10:13 PM
thank you very much:)
I will try do it & hope works:)
thank you again:)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.