I'm using 5.1.3 A6 and I still cannot get this to display the profile fields, here is the code I am using in the template conversation_fields
Code:
{vb:data userInfo, user, fetchProfileInfo, {vb:raw conversation.userid}} |
I just put your code into the template on my site and it works just fine.
If you are still getting the This is a Serious Error message on your page, then go into debug mode and see what the real error is. To enable debug mode edit the /config.php file and change: Code:
$config['debug'] = false; Code:
$config['debug'] = true; Code:
// $config['Misc']['debug'] = true; Code:
$config['Misc']['debug'] = true; Code:
if($_SERVER['REMOTE_ADDR'] == "xxx.xxx.xxx.xxx") { |
How would I display a piece of information in the postbit only if the user VIEWING the page is logged in and in the supermoderator or admin user group?
--------------- Added [DATE]1407644438[/DATE] at [TIME]1407644438[/TIME] --------------- Actually, I think I got it... but this could probably be cleaned up... I'm also not 100% sure membergroupids is an array? This is vb5.1.2 <vb:if condition="in_array($bbuserinfo[usergroupid], array(5,6,16))"> <vb:if condition="in_array($userInfo['membergroupids'], array(14,15))"> <span style="color:red;font-weight:bold;">Display Stuff Here</span><br> </vb:if> </vb:if> --------------- Added [DATE]1407645650[/DATE] at [TIME]1407645650[/TIME] --------------- And one more update... userinfo['membergroupids'] shows up as a string when I do a debugvardump. How do I check to see if it contains the group ID? vBulletin doesn't allow you to search in a string according to http://bit.ly/1uBdO1U |
I believe is_member_of is the function your would want to use.
<vb:if condition="is_member_of($bbuserinfo, 5, 6, 16)"> <vb:if condition="is_member_of($userInfo, 14, 15)"> |
1 Attachment(s)
Thanks for the tutorial!
I show my result :) |
hi
I can not find Admincp > Styles & Templates > Style Manager > Add New Template Instead There is : Add New style And there is no place to add code |
Add New Template is a dropdown next to the style. The default dropdown will say Style Variable Editor, so just click on that to see the other options.
|
Quote:
dropdown option :edit setting add child style download delete style I added a child style and did change it and the problem was solved. Thank you. |
Hello--
I am following this tutorial and have created a new category called "Custom" and added a new field called "industry". "Industry" has several check boxes for the user to check. The "Custom" category has ID = 1 and the industry field is field=5. I created and added this code to a template called "conversation_fields": PHP Code:
Thanks. |
That looks like it should work. Can I get a screen shot of your profile field 5?
|
All times are GMT. The time now is 10:08 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 | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|