vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   This variable name? (https://vborg.vbsupport.ru/showthread.php?t=319150)

Duckface 06-19-2015 02:38 PM

This variable name?
 
Hi I'm looking for the variable name for the forum section id.

So example for the section: http://spawnscape614.co.uk/forums/fo...3-Request-Rank

Because I'm trying to make a condition based on which forum section it is?

MarkFL 06-19-2015 02:47 PM

Try using:

PHP Code:

if (in_array($fidexplode(','$forum['parentlist'])))
{
    
//code to be executed here.


where $fid is the forumid of the section you want.

Duckface 06-19-2015 02:56 PM

PHP Code:

if (in_array($fidexplode('IDHERE?'$forum['parentlist'])))
{
    
//code to be executed here.


So in here?

Or

PHP Code:

if (in_array($IDHEREexplode(','$forum['parentlist'])))
{
    
//code to be executed here.



MarkFL 06-19-2015 03:00 PM

No, you want to put it where $fid is...

Duckface 06-19-2015 03:49 PM

Quote:

Originally Posted by MarkFL (Post 2548224)
No, you want to put it where $fid is...

Sorry if asking for help then. The ellipsis says all.

--------------- Added [DATE]1434736323[/DATE] at [TIME]1434736323[/TIME] ---------------

Thanks.

SPEEDKILLZ 06-19-2015 04:11 PM

MarkFL knows his stuff.

MarkFL 06-19-2015 04:56 PM

Quote:

Originally Posted by Duckface (Post 2548226)
Sorry if asking for help then. The ellipsis says all.

I honestly meant nothing negative by the ellipsis...I use them all the time...perhaps too much...:D I also did not realize you had edited your second post.

You see, if I was going to check for a forumid of 6, I would use:

PHP Code:

$fid '6';

if (
in_array($fidexplode(','$forum['parentlist'])))
{
    
//code to be executed here.




All times are GMT. The time now is 03:48 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.01105 seconds
  • Memory Usage 1,729KB
  • 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
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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