vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Pulling current forumid from forumdisplay.php? (https://vborg.vbsupport.ru/showthread.php?t=100830)

RetroDreams 11-15-2005 01:01 AM

Pulling current forumid from forumdisplay.php?
 
I'm trying to write a mini-mod for vBAdvanced so I can have a custom column per forum. I was able to successfully do this in vBulletin 3.x but the code no longer works for vBulletin 3.5.

Does anyone have any ideas how I can pull the current forumid from forumdisplay? Below is the code I used in vBulletin 3.0.

PHP Code:

if (isset($f)) 

    
$forumid intval($f); 

switch(
$forumid

    case 
1
        
blah blah;
        break;
    default:
        
blah blah blah;
        break;



cinq 11-15-2005 01:13 AM

Try this?

PHP Code:

$vbulletin->input->clean_array_gpc('r', array('f' => TYPE_INT));
if (!
$vbulletin->GPC['f'])
    eval(
standard_error(fetch_error('requiredfields')));
        
$forumid $vbulletin->GPC['f']; 
switch(
$forumid

    case 
1
        
blah blah;
        break;
    default:
        
blah blah blah;
        break;



RetroDreams 11-15-2005 01:25 AM

No go... I get:

Fatal error: Call to a member function on a non-object

cinq 11-15-2005 01:40 AM

How's the code for the rest of the file?

RetroDreams 11-15-2005 02:05 AM

Quote:

Originally Posted by cinq
How's the code for the rest of the file?

It's just the rest of the forumdisplay.php file. The only thing that differs is that the blah blah contains some vBAdvanced code. However, if I pull it out, I still get the error.


All times are GMT. The time now is 11:19 PM.

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.00964 seconds
  • Memory Usage 1,723KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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