vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Easy Forum Jump hack (https://vborg.vbsupport.ru/showthread.php?t=42570)

NexDog 08-21-2002 06:38 AM

Easy Forum Jump hack
 
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:
PHP Code:

// 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:
Code:

// 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:)


All times are GMT. The time now is 03:51 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01046 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (15)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete