vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   function Forumlist If Guest (https://vborg.vbsupport.ru/showthread.php?t=300465)

RyanFabbro 07-26-2013 10:11 AM

function Forumlist If Guest
 
ok so i have the column mod installed tweak so users can enable or disable it, but for guests its automatically disabled, i want it to be enabled for guests by default.

Code:

if ($vbulletin->userinfo['field5'] == 'yes' OR GUEST AND THIS_SCRIPT == 'index' AND $forum['subforumcolumns'] != 1 AND ($subsonly OR $depth < MAXFORUMDEPTH))
the red part is where im thinking this should go i have tried a couple codes exactally where the red code is including:

$show['guestuser']
$userinfo['guestuserid']
$vbulletin->$userinfo['guestuserid']

and a few other ways like adding == 1

i cant seem to get it right though any help would be greatly appreciated

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

UPDATE*
i seem to got it working by using
Code:

if ($vbulletin->userinfo['field5'] == 'yes' OR is_member_of($vbulletin->userinfo, 1) AND THIS_SCRIPT == 'index' AND $forum['subforumcolumns'] != 1 AND ($subsonly OR $depth < MAXFORUMDEPTH))
but even though its working like that, i have this feeling that isn't the correct way to go about it, could some one please confirm =)

exel 07-26-2013 04:54 PM

That looks fine, bud.


All times are GMT. The time now is 06: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.00891 seconds
  • Memory Usage 1,709KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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