Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 20 May 2012, 23:12
shanef shanef is offline
 
Join Date: Sep 2010
Script checks for user group Adfly

Hello i have been thinking about incorporating Adfly into my forum and i was wondering if there was a way for this small script (pasted below) to check and run for only certain user groups. i have some members that have donated to the forum and i would like for them not to have the hassle of dealing with it. I dont if there is some sort of code that could be added but if anyone has any ideas I would be greatfull


<script type="text/javascript">
onmousemove = function adfly() {
adfly_id = '1409766'; //replace with your ID
for (var i = 0; i < document.links.length; i++) {
var hrefer = document.links[i].href;
if(hrefer.match("adf.ly") || hrefer.match("http://www.mobilephonetalk.com")|| hrefer.match("http://www.symbiantalk.net/")) {
document.links[i].href = document.links[i].href;
}else{document.links[i].href = 'http://adf.ly/' + adfly_id + '/' + document.links[i].href;}
}
}
</script>
Reply With Quote
  #2  
Old 21 May 2012, 13:00
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
If you added that code to a template, then you should be able to surround it with an if, like:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #3  
Old 21 May 2012, 15:29
shanef shanef is offline
 
Join Date: Sep 2010
Thank you works perfect
Reply With Quote
  #4  
Old 17 Sep 2016, 21:34
rubicon rubicon is offline
 
Join Date: Feb 2012
Hello

Where put this script in footer template ?
<vb:if condition="is_member_of($bbuserinfo, X, Y, X)">
// script code
</vb:if>
Thank you
Reply With Quote
  #5  
Old 17 Sep 2016, 21:41
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Originally Posted by rubicon View Post
Hello

Where put this script in footer template ?


Thank you
Adding it to the bottom of the template should be fine.
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Administrative and Maintenance Tools Show/Hide Forum Sidebar On User Group Per User Group Basis borbole vBulletin 4.x Add-ons 16 05 Feb 2020 13:48
Administrative and Maintenance Tools (Extra Spam Protection) Prevent Posting Of Links On User Group Per User Group Basis borbole vBulletin 4.x Add-ons 51 18 Jun 2019 20:39
Mini Mods redirect all external link to adfly earn money rajubd vBulletin 4.x Template Modifications 34 23 Jun 2013 22:18



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 04:16.

Layout Options | Width: Wide Color: