![]() |
if conditionals php
Hi..
I have a question. When using PHP and global.php, we can use conditionals like: PHP Code:
Is it possible to do this with user fields? E.g. PHP Code:
|
That should work, but you'd want to check $vbulletin->userinfo['field8'] (I don't believe there is a userfield array).
Also, if you have existing users and you add a userfield 8, it will have no value for existing users until they edit their profile (even if you set a default value when you create the field). |
Quote:
And yes, I am aware. I would run a query to set it to 'Yes' for all users and they can go in and set it to No if they'd like to.. Thanks for the help! :) --------------- Added [DATE]1374508593[/DATE] at [TIME]1374508593[/TIME] --------------- Hey kh99, Are you aware of how to get the notification count? Like, if their notifications are >= 1, show "x Notifications Waiting" if it's 0, don't show.. Not sure if this is already a conditional. Thanks |
There are the fields pmunread, vmunreadcount, friendrequestcount, socgroupinvitecount, etc that should be available in the $vbulletin->userinfo array (you can see all these fields in the user table).
|
All times are GMT. The time now is 02:51 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|