exclude member from Participating in a particular

View previous topic View next topic Go down

exclude member from Participating in a particular Empty exclude member from Participating in a particular

Post by _Twisted_Mods_ 1/24/2015, 7:24 pm

_Twisted_Mods_
_Twisted_Mods_
Founder
Founder

Posts : 101
Reputation : 3
Birthday : 1986-08-05
Join date : 2014-10-03
Age : 37
Location : USA

[script=Your choice=in topics]
Code:
$(function(){
var notallow = ['1','97664']; // list of user id's
var nopassurl = "member-from-contributing"; // url to block
var redirurl = "/"; // redirect url
var redorremv = "remove"; // remove or redirect
var alrmsg = "You Can Not View This";  // alert message on redirect
var gusrid = _userdata.user_id;
var cururl = location.href;
for(var i = 0; i< notallow.length; i++){
if (redorremv == "redirect"){   
if    (cururl.match(nopassurl)){}else{return;};
   if (gusrid == notallow[i]){
      alert(alrmsg);
      location.href = redirurl;   
   }}
   if (redorremv == "remove"){   
      if    (cururl.match(nopassurl)){}else{return;};
   if (gusrid == notallow[i]){
            $('a[href*="&mode=reply"]').attr('style','display:none');
            $('#quick_reply').attr('style','display:none');
   }}}
});



notallow = ['1','97664']; << list of user id's you want to prevent
var nopassurl = "member-from-contributing"; << url you want to to block
var redirurl = "/"; << url you want to redirect the prevented member to
var redorremv = "remove"; << two choices remove and redirect .. remove removes the reply & quick reply options and redirect takes them to another page
var alrmsg = "You Can Not View This"; << message that will be displayed on page redirect

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum