The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Widget Visible for Logged Out Only
I'm having a hard time trying to get ad widgets to display in my CMS for logged out users only. What's the catch to it? My code to display to logged only doesn't seem to work in the cms widgets. anyone? Thanks
--------------- Added [DATE]1348121191[/DATE] at [TIME]1348121191[/TIME] --------------- I figured out the code but it doesn't hide the widget header when I'm logged in just the internal code.....anyone? Code:
if (vB::$vbulletin->userinfo['userid'] == 0) $output = "This is some html for guests<br />\n"; |
#2
|
|||
|
|||
What you can do is this: when you configure your widget, near the bottom is a field for Template Name. It should say "vbcms_widget_execphp_page". Change that to something like "vbcms_widget_execphp_guests_only".
Then go to the Style Manager and (probably in your default style) edit the vbcms_widget_execphp_page template and copy the code. Then create a new template called vbcms_widget_execphp_guests_only and paste in the code, and add 'if' tags around it, like: Code:
<vb:if condition="$bbuserinfo[userid] == 0"> // existing code here </vb:if> |
Благодарность от: | ||
goxy63 |
#3
|
|||
|
|||
Perfect thank you. that worked flawlessly!
|
#4
|
|||
|
|||
I cant make it work, that is it is showing only for not logged in users but nothing within widget tho, widget is collapsed, empty
Did same as mentioned above, only I am trying to place advertise there in a widget visible only for guests My widget type: Static HTML My widget code is: Code:
<center><script type="text/javascript" src="http://www.adcash.com/script/java.php?option=rotateur&rotateur=123456"></script></center> Help pls Thank you --------------- Added [DATE]1360757460[/DATE] at [TIME]1360757460[/TIME] --------------- Ohhh Just edited new template "vbcms_widget_execphp_guests_only" placing there add code, and its working just fine Thank you "kh99" |
#5
|
|||
|
|||
I created a static html widget with the content you posted and just used the existing template, and I get a blank widget, so I think the problem is that the code you posted isn't producing any output.
Also, the template for a static html widget is vbcms_widget_static_page (at least it seems to be for me), but the one you copied might be close enough to work. |
#6
|
|||
|
|||
Thanks "kh99" its working great, I already posted but my last post merged to first one, just forgot/did not know to
edit new template "vbcms_widget_execphp_guests_only" and to place add code there as well Thank you very much, now will play with this as I got me lots of articles Cheers |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|