Thread: vBindex
View Single Post
  #356  
Old 06-16-2002, 07:20 PM
NTLDR's Avatar
NTLDR NTLDR is offline
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As requested by -=dm=- is the addon for my multi-paged vBindex addon. It allows you to have a location for different pages within vBindex based on the url.

Install Instructions:
------------------------
------------------------

Open online.php

Find:

PHP Code:
    case 'online':
      
$userinfo[where] = "Viewing <a href='online.php?s=$session[sessionhash]'>Who's Online</a>";
      break; 
And add after it:

PHP Code:
// Add Location Descriptions For vBindex
    
case 'home':
          
$userinfo[where] = "Viewing <a href='home.php?s=$session[sessionhash]'>Home Page</a>";
      break;
    case 
'vbindex_PLACE1':
          
$userinfo[where] = "Viewing <a href='home.php?s=$session[sessionhash]&page=PLACE1'>Description 1</a>";
      break;
    case 
'vbindex_PLACE2':
          
$userinfo[where] = "Viewing <a href='home.php?s=$session[sessionhash]&page=PLACE2'>Description 2</a>";
      break;
//end Location Descriptions For vbIndex 
You need to change the following in the above PHP code:

PLACE1 and PLACE2 with the name of the template for the page that is shown in the url:

[code]http://forums.site.com/vbindex.php?s=&page=PLACE1[code]

Description 1 And 2: Replace with the description of the page.

Next still in online.php

Find:

[php] case 'online.php':
$userinfo[activity] = 'online';
break;[/php

And Add After It:

PHP Code:
//And Location Descriptions For vbIndex
  
case 'home.php':
        if (
$token1 == '') {
          
$userinfo[activity] = 'home';
        } else if (
$token1 == 'PLACE1') {
          
$userinfo[activity] = 'vbindex_PLACE1';
        } else if (
$token1 == 'PLACE2') {
          
$userinfo[activity] = 'vbindex_PLACE2';
        }
    break;
//end Location Descriptions For vbIndex 
Again, place PLACE1 and PLACE2 with exactly the same values as above.

Thats all that is all that is required to add the locations, the following is extra info on adding more than two extra vBindex pages to Who's Online.

Adding extra places:

in order to add more places in Who's Online you need to add a few extra lines to the above blocks of code:

In the first block you need to add:

PHP Code:
    case 'vbindex_PLACE3':
          
$userinfo[where] = "Viewing <a href='home.php?s=$session[sessionhash]&page=PLACE3'>Description 3</a>";
      break; 
Right Before:

PHP Code:
//end Location Descriptions For vbIndex 
Changing PLACE3 and Description 3 as you did above.

In the second block you need to remove the last { (the one directly before break; and add the code:

PHP Code:
        } else if ($token1 == 'PLACE3') {
          
$userinfo[activity] = 'vbindex_PLACE3';
        } 
And change PLACE3 as you did above.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03228 seconds
  • Memory Usage 1,796KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete