exclude member from Participating in a particular
Liquid Code :: Coding Factory :: Scripting :: Finished scripts :: Other
Page 1 of 1 • Share
exclude member from Participating in a particular
_Twisted_Mods_- Posts : 101
Reputation : 3
Birthday : 1986-08-05
Join date : 2014-10-03
Age : 37
Location : USA
[script=Your choice=in topics]
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
- 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
Liquid Code :: Coding Factory :: Scripting :: Finished scripts :: Other
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|