I need to include a javascript ad tag at the beginning of each page (right after the body element begins) but only for certain usergroups, how can I accomplish this?
include ad tag right after body begins for only certain usergroups?
Collapse
X
-
You could try creating an "id" with css that would only apply to certain tags. Then use the id when you implement the javascript."Do not go where the path may lead, instead go where there is no path and leave a trail." - Ralph Waldo Emerson -
Many people use an "id" to implement their javascript and many times it comes in handy with aiming specifics. As far as usergroups are concerned. The ad tag can be applied to follow certain usergroups with this method if used properly I believe.
If your looking for a quicker option, then I would not be sure. Hope I helped at all."Do not go where the path may lead, instead go where there is no path and leave a trail." - Ralph Waldo EmersonComment
-
You'll need to edit all the PAGE templates. Their names appear in UPPERCASE. Add your code and surround it with an IF conditional like:
Code:<vb:if condition="is_member_of($bbuserid,X,Y,Z)">Ad Code Here</vb:if>
Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 APIComment
-
i have this codeCode:<vb:if condition="is_member_of($bbuserid,1,2,3)"> <script type="text/javascript"> Caspion = { 'cfg': { 'id': 'ffshrineorg' } };</script> <script type="text/javascript" src="//gae.caspion.com/cas.js"></script> </vb:if>
Comment
-
Wayne got the var wrong, it should be $bbuserinfo['userid'] instead of $bbuseridComment
Related Topics
Collapse
-
by Macro ManIs there any way to restrict the use of some tags to certain usergroups?
I'm actually after a way of changing the "status" of a post, but only admins or moderators should be allowed...-
Channel: vB Cloud Support & Troubleshooting.
-
Comment