vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Variables for conditionals (https://vborg.vbsupport.ru/showthread.php?t=64118)

JohnK 04-19-2004 10:38 PM

Variables for conditionals
 
I am just starting to look at using conditionals, and they look like a simple but powerful tool. However you need to know what variables are available and what they do.

Is this documented anywhere? I've looked through the manual and searched on vbulletin.com and here but can't find anything -- have I missed it?

Thanks
John

assassingod 04-19-2004 10:43 PM

It really depeds on what you want to do. There isn't a list of what variable you can use because you can use anything.

SVTBlackLight01 04-19-2004 11:24 PM

As far as I know (which isn't much :D ), there isn't a list of the variables anywhere. Although a single searchable location of all the variables and what they do would be great.

filburt1 04-19-2004 11:42 PM

Quote:

Originally Posted by JohnK
I am just starting to look at using conditionals, and they look like a simple but powerful tool. However you need to know what variables are available and what they do.

Is this documented anywhere? I've looked through the manual and searched on vbulletin.com and here but can't find anything -- have I missed it?

Thanks
John

I very strongly agree with you that there needs to be a great deal of documentation available on what variables can be used (for example; what keys are in the $post array for postbits, $bbuserinfo everywhere, etc.).

JohnK 04-20-2004 12:13 AM

OK, how about something really basic

The variables appear to be in two parts eg $bbuserinfo['userid'] there are also $show $post etc

Can anyone start by explaining how this works?

Thanks
John

zetetic 06-18-2004 03:28 PM

Quote:

Originally Posted by JohnK
OK, how about something really basic

The variables appear to be in two parts eg $bbuserinfo['userid'] there are also $show $post etc

Can anyone start by explaining how this works?

I assume you've figured this out by now, but in case anyone else stumbles on this thread and is wondering the same thing...

$bbuserinfo is a variable array: A variable that can hold multiple values, as opposed to a standard variable that holds only one value.

'userid' is one value in the $bbuserinfo array that is only set if the user is a registered member.

So basically "if $bbuserinfo['userid']" is equivelant to saying, "Is the 'userid' value in the $bbuserinfo array set? If yes, then the user is registered".

To the best of my knowledge there is no one location where all the standard conditionals are documented here. One developer said it's because there are dozens of variable arrays with hundreds of values each, and as such making a list is just too time consuming for anyone to get to it right now.

Or something. :)

Zachery 06-18-2004 03:38 PM

Quote:

Originally Posted by tmhall
I assume you've figured this out by now, but in case anyone else stumbles on this thread and is wondering the same thing...

$bbuserinfo is a variable array: A variable that can hold multiple values, as opposed to a standard variable that holds only one value.

'userid' is one value in the $bbuserinfo array that is only set if the user is a registered member.

So basically "if $bbuserinfo['userid']" is equivelant to saying, "Is the 'userid' value in the $bbuserinfo array set? If yes, then the user is registered".

To the best of my knowledge there is no one location where all the standard conditionals are documented here. One developer said it's because there are dozens of variable arrays with hundreds of values each, and as such making a list is just too time consuming for anyone to get to it right now.

Or something. :)

there are only a speciric ammount of $show varibles and for the most part they are not global

$bbuserinfo
$vboptions
$stylevar
Are the 3 globals that i am aware about besides $GLOBAL

$bbuserinfo can show anything that is stored in the usertable field for the specific person who is online: IE $bbuserinfo[posts] will show the amount of posts, $bbuserinfo[username] will show a users, username.

$vboptions are all the options that are stored in the settings table like to show DHTML or the name of your board or even your bulletin boards url
$vboptions[bburl] $vboptions[homeurl]

$stylevar holds all the non css style settings, like the image directorys.

The problem with the documentation is there are so many vairbles that are possible for all thoughs said templates its hard to just document them.

vbmechanic 06-18-2004 03:40 PM

A comprehensive list of $vboptions and $stylevar would be dandy.

Zachery 06-18-2004 03:42 PM

Quote:

Originally Posted by vbmechanic
A comprehensive list of $vboptions and $stylevar would be dandy.

Ill see about getting a list out for thoughs two later today, :)

zetetic 06-18-2004 03:47 PM

There's a post here that suggests one way of finding out what is stored in a particular array. As mentioned in that thread, though, you'll only see the output relevant to the current user.

zetetic 06-18-2004 04:27 PM

Okay, here are the values of my $bbuserinfo array on index.php (I've deleted the actual values for security purposes, and I apologize in advance if posting this code somehow violates any rules here):

Code:

Array
(
    [userid] =>
    [temp] =>
    [field1] =>
    [field2] =>
    [field3] =>
    [field4] =>
    [subfolders] =>
    [pmfolders] =>
    [buddylist] =>
    [ignorelist] =>
    [signature] =>
    [searchprefs] =>
    [usergroupid] =>
    [membergroupids] =>
    [displaygroupid] =>
    [username] =>
    [password] =>
    [passworddate] =>
    [email] =>
    [styleid] =>
    [parentemail] =>
    [homepage] =>
    [icq] =>
    [aim] =>
    [yahoo] =>
    [showvbcode] =>
    [usertitle] =>
    [customtitle] =>
    [joindate] =>
    [daysprune] =>
    [lastvisit] =>
    [lastactivity] =>
    [lastpost] =>
    [posts] =>
    [reputation] =>
    [reputationlevelid] =>
    [timezoneoffset] =>
    [pmpopup] =>
    [avatarid] =>
    [avatarrevision] =>
    [options] =>
    [birthday] =>
    [birthday_search] =>
    [maxposts] =>
    [startofweek] =>
    [ipaddress] =>
    [referrerid] =>
    [languageid] =>
    [msn] =>
    [emailstamp] =>
    [threadedmode] =>
    [autosubscribe] =>
    [pmtotal] =>
    [pmunread] =>
    [salt] =>
    [arcadesettings] =>
    [lang_options] =>
    [lang_code] =>
    [lang_charset] =>
    [lang_locale] =>
    [lang_imagesoverride] =>
    [lang_dateoverride] =>
    [lang_timeoverride] =>
    [lang_registereddateoverride] =>
    [lang_calformat1override] =>
    [lang_calformat2override] =>
    [lang_logdateoverride] =>
    [lang_decimalsep] =>
    [lang_thousandsep] =>
    [showsignatures] =>
    [showavatars] =>
    [showimages] =>
    [coppauser] =>
    [adminemail] =>
    [showvcard] =>
    [dstauto] =>
    [dstonoff] =>
    [showemail] =>
    [invisible] =>
    [showreputation] =>
    [receivepm] =>
    [emailonpm] =>
    [hasaccessmask] =>
    [postorder] =>
    [urlusername] =>
    [musername] =>
    [displaygrouptitle] =>
    [displayusertitle] =>
    [realstyleid] =>
    [tzoffset] =>
    [lastvisitdate] =>
    [permissions] => Array
        (
            [usergroupid] =>
            [title] =>
            [description] =>
            [usertitle] =>
            [passwordexpires] =>
            [passwordhistory] =>
            [pmquota] =>
            [pmsendmax] =>
            [pmforwardmax] =>
            [opentag] =>
            [closetag] =>
            [canoverride] =>
            [ispublicgroup] =>
            [forumpermissions] =>
            [pmpermissions] =>
            [calendarpermissions] =>
            [wolpermissions] =>
            [adminpermissions] =>
            [genericpermissions] =>
            [genericoptions] =>
            [pmpermissions_bak] =>
            [attachlimit] =>
            [avatarmaxwidth] =>
            [avatarmaxheight] =>
            [avatarmaxsize] =>
            [profilepicmaxwidth] =>
            [profilepicmaxheight] =>
            [profilepicmaxsize] =>
            [arcadepermissions] =>
        )

    [forumpermissions] => Array
        (
            [1] =>
            [2] =>
        )

    [calendarpermissions] => Array
        (
            [1] =>
        )

    [joingroupid] =>


Zachery 06-18-2004 04:32 PM

Quote:

Originally Posted by tmhall
Okay, here are the values of my $bbuserinfo array on index.php (I've deleted the actual values for security purposes, and I apologize in advance if posting this code somehow violates any rules here):

Code:

Array
(
    [userid] =>
    [temp] =>
    [field1] =>
    [field2] =>
    [field3] =>
    [field4] =>
    [subfolders] =>
    [pmfolders] =>
    [buddylist] =>
    [ignorelist] =>
    [signature] =>
    [searchprefs] =>
    [usergroupid] =>
    [membergroupids] =>
    [displaygroupid] =>
    [username] =>
    [password] =>
    [passworddate] =>
    [email] =>
    [styleid] =>
    [parentemail] =>
    [homepage] =>
    [icq] =>
    [aim] =>
    [yahoo] =>
    [showvbcode] =>
    [usertitle] =>
    [customtitle] =>
    [joindate] =>
    [daysprune] =>
    [lastvisit] =>
    [lastactivity] =>
    [lastpost] =>
    [posts] =>
    [reputation] =>
    [reputationlevelid] =>
    [timezoneoffset] =>
    [pmpopup] =>
    [avatarid] =>
    [avatarrevision] =>
    [options] =>
    [birthday] =>
    [birthday_search] =>
    [maxposts] =>
    [startofweek] =>
    [ipaddress] =>
    [referrerid] =>
    [languageid] =>
    [msn] =>
    [emailstamp] =>
    [threadedmode] =>
    [autosubscribe] =>
    [pmtotal] =>
    [pmunread] =>
    [salt] =>
    [arcadesettings] =>
    [lang_options] =>
    [lang_code] =>
    [lang_charset] =>
    [lang_locale] =>
    [lang_imagesoverride] =>
    [lang_dateoverride] =>
    [lang_timeoverride] =>
    [lang_registereddateoverride] =>
    [lang_calformat1override] =>
    [lang_calformat2override] =>
    [lang_logdateoverride] =>
    [lang_decimalsep] =>
    [lang_thousandsep] =>
    [showsignatures] =>
    [showavatars] =>
    [showimages] =>
    [coppauser] =>
    [adminemail] =>
    [showvcard] =>
    [dstauto] =>
    [dstonoff] =>
    [showemail] =>
    [invisible] =>
    [showreputation] =>
    [receivepm] =>
    [emailonpm] =>
    [hasaccessmask] =>
    [postorder] =>
    [urlusername] =>
    [musername] =>
    [displaygrouptitle] =>
    [displayusertitle] =>
    [realstyleid] =>
    [tzoffset] =>
    [lastvisitdate] =>
    [permissions] => Array
        (
            [usergroupid] =>
            [title] =>
            [description] =>
            [usertitle] =>
            [passwordexpires] =>
            [passwordhistory] =>
            [pmquota] =>
            [pmsendmax] =>
            [pmforwardmax] =>
            [opentag] =>
            [closetag] =>
            [canoverride] =>
            [ispublicgroup] =>
            [forumpermissions] =>
            [pmpermissions] =>
            [calendarpermissions] =>
            [wolpermissions] =>
            [adminpermissions] =>
            [genericpermissions] =>
            [genericoptions] =>
            [pmpermissions_bak] =>
            [attachlimit] =>
            [avatarmaxwidth] =>
            [avatarmaxheight] =>
            [avatarmaxsize] =>
            [profilepicmaxwidth] =>
            [profilepicmaxheight] =>
            [profilepicmaxsize] =>
            [arcadepermissions] =>
        )

    [forumpermissions] => Array
        (
            [1] =>
            [2] =>
        )

    [calendarpermissions] => Array
        (
            [1] =>
        )

    [joingroupid] =>


Anything in the user table, and all userprofile feilds are avable thogh $bbuserinfo

zetetic 06-18-2004 04:42 PM

Here's the $vboptions array (keeping in mind my board is hacked, so I may have options here that others don't):

Code:

Array
(
    [templateversion] =>
    [attachfile] =>
    [attachpath] =>
    [usefileavatar] =>
    [avatarpath] =>
    [avatarurl] =>
    [divnotpara] =>
    [usebbcodeparserecurse] =>
    [bbactive] =>
    [bbclosedreason] =>
    [bbtitle] =>
    [bburl] =>
    [hometitle] =>
    [homeurl] =>
    [contactuslink] =>
    [contactusoptions] =>
    [webmasteremail] =>
    [privacyurl] =>
    [copyrighttext] =>
    [companyname] =>
    [faxnumber] =>
    [address] =>
    [keywords] =>
    [description] =>
    [useforumjump] =>
    [pagenavpages] =>
    [enableaccess] =>
    [showimicons] =>
    [addtemplatename] =>
    [usestrikesystem] =>
    [yestoday] =>
    [timeoffset] =>
    [dstonoff] =>
    [dateformat] =>
    [timeformat] =>
    [registereddateformat] =>
    [calformat1] =>
    [calformat2] =>
    [logdateformat] =>
    [cookietimeout] =>
    [cookiepath] =>
    [cookiedomain] =>
    [gzipoutput] =>
    [gziplevel] =>
    [addheaders] =>
    [nocacheheaders] =>
    [useheaderredirect] =>
    [allowphpinfo] =>
    [cachemaxage] =>
    [threadviewslive] =>
    [attachmentviewslive] =>
    [emailsendnum] =>
    [sessionlimit] =>
    [loadlimit] =>
    [allowimgsizefailure] =>
    [gdversion] =>
    [safeupload] =>
    [tmppath] =>
    [usemailqueue] =>
    [needfromemail] =>
    [copypostindex] =>
    [languageid] =>
    [styleid] =>
    [allowchangestyles] =>
    [cleargifurl] =>
    [storecssasfile] =>
    [usepopups] =>
    [legacypostbit] =>
    [enablecensor] =>
    [censorchar] =>
    [censorwords] =>
    [blankasciistrip] =>
    [enableemail] =>
    [displayemails] =>
    [secureemail] =>
    [emailfloodtime] =>
    [allowregistration] =>
    [usecoppa] =>
    [moderatenewmembers] =>
    [regimagecheck] =>
    [welcomemail] =>
    [newuseremail] =>
    [allowmultiregs] =>
    [verifyemail] =>
    [requireuniqueemail] =>
    [minuserlength] =>
    [maxuserlength] =>
    [illegalusernames] =>
    [usereferrer] =>
    [defaultregoptions] =>
    [ctMaxChars] =>
    [ctCensorWords] =>
    [ctCensorMod] =>
    [allowsignatures] =>
    [sigmax] =>
    [allowbbcode] =>
    [allowsmilies] =>
    [allowbbimagecode]
    [allowhtml] =>
    [ignoremods] =>
    [avatarenabled] =>
    [numavatarswide] =>
    [numavatarsperpage] =>
    [profilepicenabled] =>
    [reputationenable] =>
    [reputationhide] =>
    [reputationdefault] =>
    [reputationundefined] =>
    [showuserrates] =>
    [adminpower] =>
    [rdpower] =>
    [pcpower] =>
    [kppower] =>
    [minreputationpost] =>
    [minreputationcount] =>
    [maxreputationperday] =>
    [reputationrepeat] =>
    [unallowvbcode] =>
    [unallowsmilies] =>
    [unallowimg] =>
    [unallowhtml] =>
    [enablememberlist] =>
    [memberlistposts] =>
    [memberlistfields] =>
    [memberlistperpage] =>
    [usememberlistadvsearch] =>
    [profilelastpost] =>
    [enablebanning] =>
    [banip] =>
    [banemail] =>
    [allowkeepbannedemail] =>
    [globalignore] =>
    [allowedbbcodes] =>
    [codemaxlines] =>
    [quickreply] =>
    [quickreplyclick] =>
    [postminchars] =>
    [ignorequotechars] =>
    [quotetitle] =>
    [postmaxchars] =>
    [maximages] =>
    [stopshouting] =>
    [allowdynimg] =>
    [floodchecktime] =>
    [editthreadtitlelimit] =>
    [addpolltimeout] =>
    [edittimelimit] =>
    [noeditedbytime] =>
    [logip] =>
    [allowvbcodebuttons] =>
    [wysiwyg_show_smiliebox] =>
    [smtotal] =>
    [smcolumns] =>
    [wysiwyg_smtotal] =>
    [syscolorpicker] =>
    [attachtotalspace] =>
    [attachlimit] =>
    [attachboxcount] =>
    [allowattachdel] =>
    [allowclosedattachdel] =>
    [allowduplicates] =>
    [viewattachedimages] =>
    [attachthumbs] =>
    [attachthumbssize] =>
    [attachrow] =>
    [thumbpng] =>
    [maxpolloptions] =>
    [updatelastpost] =>
    [showvotes] =>
    [votechange] =>
    [enablesearches] =>
    [searchfloodtime] =>
    [minsearchlength] =>
    [maxsearchlength] =>
    [goodwords] =>
    [searchperpage] =>
    [maxresults] =>
    [allowwildcards] =>
    [similarthreadsearch] =>
    [similarthreadthreshold] =>
    [multimatchscore] =>
    [datescore] =>
    [threadtitlescore] =>
    [posttitlescore] =>
    [replyscore] =>
    [replyfunc] =>
    [viewscore] =>
    [viewfunc] =>
    [ratescore] =>
    [ratefunc] =>
    [forumhome] =>
    [displayloggedin] =>
    [showbirthdays] =>
    [birthdaydatecut] =>
    [showevents] =>
    [showholidays] =>
    [showeventtype] =>
    [forumhomedepth] =>
    [forumdisplaydepth] =>
    [subforumdepth] =>
    [showforumdescription] =>
    [hideprivateforums] =>
    [showlocks] =>
    [lastthreadchars] =>
    [showmoderatorcolumn] =>
    [showforumusers] =>
    [maxthreads] =>
    [showstickies] =>
    [showdots] =>
    [usehotthreads] =>
    [hotnumberviews] =>
    [hotnumberposts] =>
    [linktopages] =>
    [maxmultipage] =>
    [threadpreview] =>
    [oneannounce] =>
    [showthreadusers] =>
    [maxposts] =>
    [usermaxposts] =>
    [showdeficon] =>
    [enableage] =>
    [wordwrap] =>
    [threadvoted] =>
    [threadsubscribed] =>
    [showsimilarthreads] =>
    [allowthreadedmode] =>
    [threadedmode] =>
    [threaded_listdepth] =>
    [threaded_maxcache] =>
    [enablepms] =>
    [checknewpm] =>
    [pmmaxchars] =>
    [pmfloodtime] =>
    [pmperpage] =>
    [pmmaxperpage] =>
    [privallowicons] =>
    [privallowbbcode] =>
    [privallowsmilies] =>
    [privallowbbimagecode] =>
    [privallowhtml] =>
    [WOLenable] =>
    [WOLrefresh] =>
    [WOLguests] =>
    [WOLresolve] =>
    [enablespiders] =>
    [spiderstrings] =>
    [spiderdesc] =>
    [archiveenabled] =>
    [archive_threadsperpage] =>
    [archive_postsperpage] =>
    [cpstylefolder] =>
    [timeoutcontrolpanel] =>
    [adminquickstats] =>
    [cp_collapse_forums] =>
    [cp_usereditcolumns] =>
    [externaljs] =>
    [externalrss] =>
    [externalxml] =>
    [errorlogdatabase] =>
    [errorlogsecurity] =>
    [errorlogmaxsize] =>
    [disableerroremail] =>
    [subscriptionmethods] =>
    [ppemail] =>
    [ncxemail] =>
    [worldpay_instid] =>
    [authorize_loginid] =>
    [abspath] =>
    [hourdiff] =>
)


zetetic 06-18-2004 04:46 PM

And $stylevar:

Code:

Array
(
    [cellpadding] =>
    [cellspacing] =>
    [closedthreadimage] =>
    [codeblockwidth] =>
    [contenttype] =>
    [formspacer] =>
    [formwidth] =>
    [formwidth_usercp] =>
    [htmldoctype] =>
    [htmlextrasfolder] =>
    [imagesfolder] =>
    [imgdir_attach] =>
    [imgdir_button] =>
    [imgdir_editor] =>
    [imgdir_misc] =>
    [imgdir_poll] =>
    [imgdir_rating] =>
    [imgdir_reputation] =>
    [imgdir_statusicon] =>
    [messagewidth] =>
    [messagewidth_usercp] =>
    [newreplyimage] =>
    [newthreadimage] =>
    [outerborderwidth] =>
    [outertablewidth] =>
    [spacersize] =>
    [tablewidth] =>
    [textareacols_ie4] =>
    [textareacols_ns4] =>
    [textareacols_ns6] =>
    [titleimage] =>
    [textdirection] =>
    [left] =>
    [right] =>
    [languagecode] =>
    [charset] =>
    [body_bgcolor] =>
    [body_fgcolor] =>
    [page_bgcolor] =>
    [page_fgcolor] =>
    [tborder_bgcolor] =>
    [tborder_fgcolor] =>
    [tcat_bgcolor] =>
    [tcat_fgcolor] =>
    [thead_bgcolor] =>
    [thead_fgcolor] =>
    [tfoot_bgcolor] =>
    [tfoot_fgcolor] =>
    [alt1_bgcolor] =>
    [alt1_fgcolor] =>
    [alt2_bgcolor] =>
    [alt2_fgcolor] =>
    [alt3_bgcolor] =>
    [alt3_fgcolor] =>
    [wysiwyg_bgcolor] =>
    [wysiwyg_fgcolor] =>
    [time_fgcolor] =>
    [highlight_fgcolor] =>
    [fjsel_bgcolor] =>
    [fjsel_fgcolor] =>
    [fjdpth0_bgcolor] =>
    [fjdpth0_fgcolor] =>
    [panel_bgcolor] =>
    [panel_fgcolor] =>
    [panelsurround_bgcolor] =>
    [panelsurround_fgcolor] =>
    [legend_fgcolor] =>
    [vbmenu_control_bgcolor] =>
    [vbmenu_control_fgcolor] =>
    [vbmenu_popup_bgcolor] =>
    [vbmenu_popup_fgcolor] =>
    [vbmenu_option_bgcolor] =>
    [vbmenu_option_fgcolor] =>
    [vbmenu_hilite_bgcolor] =>
    [vbmenu_hilite_fgcolor] =>
    [imgdir_arcade] =>
    [outerdivwidth] =>
    [divwidth] =>
)


RapCheck 07-28-2004 05:50 PM

good thread, it just helped me

gotta love the search

Brad 07-29-2004 04:29 AM

functions that can be used with conditionals:

PHP Code:

// php functions
in_array();
is_array();
is_numeric();
isset();
empty();
defined();
array();

// vBulletin functions
can_moderate(); 
can_moderate_calendar();
exec_switch_bg();
is_browser();
is_member_of(); 


feldon23 08-14-2004 04:32 PM

Not sure how posting a list of variables without example values is helpful...

When hacking vB3, I usually
PHP Code:

echo "<pre>";
print_r($array);
echo 
"</pre>"

so I can see what a variable is for.

T3MEDIA 02-11-2005 11:25 PM

User id is say 150
how do I write this in code to find his field20 lets say in his profile.
If I use $bbuserinfo it pulls back my (the loged in users) info.
I want to pull any users info...

this isnt proper code but I want something like this.

$onlineuser[userid](field20)
just assume $onlineuser acutally pulls the user id of 150
field20 lets say is "Huston"

at the end of the day on the HTML page you see HUSTON
and it would change for each user.
this is for WOL BTW

neocorteqz 02-24-2005 10:30 AM

Quote:

Originally Posted by T3MEDIA
User id is say 150
how do I write this in code to find his field20 lets say in his profile.
If I use $bbuserinfo it pulls back my (the loged in users) info.
I want to pull any users info...

this isnt proper code but I want something like this.

$onlineuser[userid](field20)
just assume $onlineuser acutally pulls the user id of 150
field20 lets say is "Huston"

at the end of the day on the HTML page you see HUSTON
and it would change for each user.
this is for WOL BTW


$bbuserinfo[field20]

Guest190829 02-24-2005 01:47 PM

This is very useful, keep up the good work!

AshAbed 02-24-2005 03:33 PM

How about this...
I have a profile field with a dropdown list where a member chooses the state they live in. I want a conditional that says 'if user selected choice #__ in profile field #__.'

Thanks.

kall 02-24-2005 03:37 PM

Quote:

Originally Posted by AshAbed
How about this...
I have a profile field with a dropdown list where a member chooses the state they live in. I want a conditional that says 'if user selected choice #__ in profile field #__.'

Thanks.

Code:

<if condition="$var[fieldX]">do stuff</if>
I think.

$var would be $post or $bbuserinfo or whatever.

neocorteqz 02-24-2005 10:35 PM

Quote:

Originally Posted by kall
Code:

<if condition="$var[fieldX]">do stuff</if>
I think.

$var would be $post or $bbuserinfo or whatever.

For fields in profile it's $bbuserinfo.

and yes that is the conditional

HTML Code:

<if condition="$bbuserinfo[fieldX]">Some code here </if>
If the user didn't selct a certain choice you don't want displayed, I'mnot exactly sure what you do. I know you can exlude code by != But I'mnot exactly sure how one would excluse a profile field that is notstatic.

AshAbed 02-24-2005 11:36 PM

I made it so the users must select a choice upon registration. Lets say they chose '7' and the field's ID is '15'... what would be the code to display something for a user with that selected?

T3MEDIA 02-25-2005 03:06 AM

Quote:

Originally Posted by neocorteqz
$bbuserinfo[field20]

This only works on areas where the logged in user is. I want a varable. say userid 2555 field 20 this is what I mean. How can you do that?

DavidatMPA 04-18-2005 01:20 AM

Yep, gotta love the search, GREAT thread!

dutchbb 09-23-2005 12:38 PM

Sorry to bump this but:

I want to show code in a certain thread. So I use the threadID

How do I define the conditional for a threadid?

T3MEDIA 10-06-2005 11:38 AM

Quote:

Originally Posted by T3MEDIA
This only works on areas where the logged in user is. I want a varable. say userid 2555 field 20 this is what I mean. How can you do that?

light bump to refresh my first question.

SO if say YOU are looking at my page you can see visually my field 20.
So I am asking how to pull up.... say... my userid... not yours... (as in bbuser) and find field 20

Yorixz 10-23-2005 01:13 PM

Might be a little late for a reaction but still; I'm wondering if there's also a $post variable available that contains the name of the usergroup as person is in. In fact it would be similar to the "Group:" you got with IPB, I just don't feel like putting up 10 conditionals for every usergroup I've got...
I want to be able to let people edit their usertitle without having trouble with users acting like they're a staffmember.

perju 04-07-2007 11:17 PM

This thread is great. Can somone provide a list for the $post array?

Zachery 04-08-2007 12:28 PM

Same as $bbuserinfo, but just for the person who made the [post.

perju 04-10-2007 12:59 AM

How would I display a user's profile picture inside of a post? I'm having lots of trouble with this.

Zachery 04-10-2007 04:36 AM

ATM theres no easy way, as in theres no varible. Try making a request.

perju 04-10-2007 02:49 PM

Do I request it here? :)

perju 04-25-2007 06:16 PM

If I were to create the variable, what file / template would I look into?

dartho 09-11-2007 03:15 AM

Thanks for all the info!

dartho 11-09-2007 05:07 AM

Are there any variables which can tell you where you are on the site?

If a user is viewing one of a number of pages, I want to add additional links to the navbar.

After checking the whosonlinebit template I see there is $userinfo[location], but this doesn;t seem to be set in other templates. Any ideas?

Thanks

Opserty 11-09-2007 12:30 PM

THIS_SCRIPT is defined on all vBulletin pages (that use templates) I think they are just the name of the file without the .php extension. Therefore your conditional with look like:

Code:

<if condition="THIS_SCRIPT == 'showthread'">
    You are viewing a thread!
</if>


dartho 11-09-2007 08:43 PM

thanks, did the trick!

alaa2142 11-10-2007 03:46 PM

good thread, it just helped me

gotta love the search


All times are GMT. The time now is 02:49 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.01475 seconds
  • Memory Usage 1,918KB
  • 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
  • (7)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete