PDA

View Full Version : vBulletin 4 Request - [Solved] Ban specific users from specific scripts


Stratis
03-04-2016, 07:58 PM
Hi!
Lets say that we want to BAN a specific user from specific scripts.
As we most know:
*we always see users that they have bad manners in sites.
*users that they bother others with no particular reason with personal messages.
*they change there avatar with restricted images.
*they make posts or threads without substance.(some forums may have hidden files, and to display must have a number of specific posts.

...and many other occasions.

if Mod has 1st option:
Stratis|newreply,private
Userx|newthread,search

Stratis, cannot make replies and private messages.
Userx, cannot make new threads and search.

if Mod has 2st option:
A field that we can write some info in html that user will see that he is bla, bla, bla.

-------------------------------------------
And a bit more if it can be combined :D as an 3d option.

Ban specific users from specific forums:
Stratis|345,243 (forum ids)

:) Thanks :)

HM666
03-08-2016, 06:25 AM
*we always see users that they have bad manners in sites.
*users that they bother others with no particular reason with personal messages.
*they change there avatar with restricted images.
*they make posts or threads without substance.(some forums may have hidden files, and to display must have a number of specific posts.

If these things are outlined in your rules on your site why are you wanting to ban them from specific areas? They obviously cannot follow direction or the rules, why not ban them from the site if they break too many rules? Or use the built in infraction system to give infractions and then eventually ban them if they have too many.

Stratis
03-08-2016, 06:30 AM
Thanks for your opinion.
Actually BAN is not a good solution for me. They find ways and register again, you know that
is very easy for them to do. I prefer to restrict them from some things in forum rather BAN them.

HM666
03-08-2016, 06:48 AM
EDIT: Nevermind, I'm need a nap too tired. LOL

SaN-DeeP
03-09-2016, 09:09 AM
I assume, they will register again with new account, once they come to know about these restrictions on them ?

Check vb.com tricks for vb3 and vb4, there were some tips which showed how to restrict scripts.
You might have to search a bit. very old thread

Stratis
03-09-2016, 09:18 AM
I did that before making thread. searched many cases, i found some but they only restrict only one specific script, so they can not be used if there is not a way to import what you want to restrict.

Thanks for the answer

MarkFL
03-29-2016, 01:10 PM
Hello Stratis,

I have attached a product for your testing. :)

Stratis
03-29-2016, 02:15 PM
Mark thank you very much for not forgetting :)

Works in me test forum.
1) Problem with case sensitive user names (Stratis, stratis)
2) and basic, the error user will see is the common

You do not have permission to access this page. This could be due to one of several reasons: bla, bla, bla...

I don't know if it can have a field that we can write our message.
even in two occasions:
* Users|Restricted Scripts
* Users|Restricted Forums

separated field to input error message user will see.

If its to much, as it is will do :D

MarkFL
03-29-2016, 02:53 PM
Okay...good! :D

I have fixed the case sensitivity of usernames, and added two phrases that you can use to give a custom message to the user:

https://vborg.vbsupport.ru/attachment.php?attachmentid=154600&stc=1&d=1459270345

Stratis
03-29-2016, 04:47 PM
Yes. that's it, :)

the only issue is that when restrict from new reply.
It says first:

"Are you sure you want to leave this page?
This site says...
Changes made in the editor will be lost."

and than the message comes up.

In all browsers, except Firefox :(

When ever you want and have time, I have more ideas for this modification.

:up: Thank you so much for making this live.

--------------- Added 1459283838 at 1459283838 ---------------

Some thing else Mark, when i add phrase in my language it does not take effect
if I don't change it in the English field to.

MarkFL
03-29-2016, 06:42 PM
Yes. that's it, :)

the only issue is that when restrict from new reply.
It says first:

"Are you sure you want to leave this page?
This site says...
Changes made in the editor will be lost."

and than the message comes up.

In all browsers, except Firefox :(

When ever you want and have time, I have more ideas for this modification.

:up: Thank you so much for making this live.

--------------- Added 1459283838 at 1459283838 ---------------

Some thing else Mark, when i add phrase in my language it does not take effect
if I don't change it in the English field to.

If I restrict the "newreply" script from myself, and then click "Go Advanced" in the "Quick Reply" box, I simply get the error message, in both FireFox and Chrome (I'm not going to bother with IE). It also prevents me from posting a Quick Reply, and it simply shows me the error message above the reply element.

I can't help with the translation...I have never needed to do any translations. :)

Stratis
03-29-2016, 06:52 PM
I have quick reply open, member don't need to press to show. sorry if I don't understand. Ok, it is not a big deal. For translate no problem there to. I don't have English language any way for user to select.

Fine, thanks a lot. tomorrow I will put it in my live forum. :D

MarkFL
03-29-2016, 07:01 PM
Yes, on my local dev site, I have quick reply open as well (the box is present on the "showthread" page), and I don't have any issues with FireFox or Chrome when restricting the "newreply" script. :)

Stratis
03-30-2016, 03:32 PM
Just tested in live forum. Very nice.

Thank you Mark :)

---------------------------------------------------------------

Feature
For some other time, if this can be added?

Users|Restricted Scripts
Now = Username|script1, script2, ...
Feature = Username|posts?|script1, script2, ...


Users|Restricted Forums
Now = Username|forumid1, forumid2, ...
Feature = Username|posts?|forumid1, forumid2, ...

Feature message includes: {1} how many posts user must have.


:D

MarkFL
03-30-2016, 04:08 PM
Just tested in live forum. Very nice.

Thank you Mark :)

---------------------------------------------------------------

Feature
For some other time, if this can be added?

Users|Restricted Scripts
Now = Username|script1, script2, ...
Feature = Username|posts?|script1, script2, ...


Users|Restricted Forums
Now = Username|forumid1, forumid2, ...
Feature = Username|posts?|forumid1, forumid2, ...

Feature message includes: {1} how many posts user must have.


:D

That sounds doable, my friend. Would you like the option to also ban entire usergroups, also with a post count they must have before they are not banned from the script llist?

Stratis
03-30-2016, 04:30 PM
Yes, that's good. Thank you.

MarkFL
03-30-2016, 04:33 PM
Yes, that's good. Thank you.

Well, alrighty then! I will see about cranking that out tonight my time. :)

MarkFL
03-31-2016, 02:36 AM
Hello, Stratis!

I have attached the updated version...give it a whirl and let me know what you think. ;)

Stratis
03-31-2016, 02:23 PM
Yes Mark that's ok. More useful than before :D


:up: Thank you.

MarkFL
03-31-2016, 02:26 PM
Yes Mark that's ok. More useful than before :D


:up: Thank you.

You are very welcome! Please let me know if you discover any issues, or would like any improvements or added features. :)

Stratis
03-31-2016, 03:09 PM
The only problem, if we can say it problem! is the message with browsers.
I know, I know :D we talk about this in post #11. but why all other mods of you that have a message works fine, and this not?

Maybe because it uses a bit of Vbulletin error script? Can be done like...
"MarkFL - Restrict Posting By Forum"
"MarkFL - Force Avatar"
"MarkFL - Cannot PM Self"

They work in all browsers, I don't know maybe its not a good idea :) or its different coding.

.................................................. ............................
I thing if this modification had an option:
Usergroups|Postcount|Restricted Threads

It would involve all situations. :p

MarkFL
03-31-2016, 03:22 PM
Try changing the "Hook Location" of the plugin titled "Prevent Restricted Users From Viewing Scripts" to "global_bootstrap_complete" and see if the message issue is still present. :)

edit: Once we get this message issue ironed out, I will add 2 settings for threads, one for users and one for usergroups.

Stratis
03-31-2016, 04:07 PM
I made the change, same results :)

MarkFL
03-31-2016, 04:16 PM
Okay, try the hook location "global_start"...all of these hook locations work with no issue for me...

Stratis
03-31-2016, 04:33 PM
No, same.

MarkFL
03-31-2016, 04:36 PM
No, same.

Okay...I will have to think of another strategy. Thank you for your patience and effort! :)

edit: I just installed this on another site, and had no issue with the message in Firefox and Chrome...

Stratis
03-31-2016, 04:43 PM
My patience and effort? These are my words to you, not from you to me.

Thanks a lot.

MarkFL
03-31-2016, 04:48 PM
My patience and effort? These are my words to you, not from you to me.

Thanks a lot.

Well, it takes time and effort to try different hook locations, and then to report the behavior resulting from the changes. This is a team effort here. :)

MarkFL
04-01-2016, 01:10 AM
I have attached version 1.2! :D

I have added the settings for threads, and grouped the settings by scripts, forums and threads for easier navigation.

Until I can figure out how to duplicate the issue you have reported with the message, I can't think of how to address that. :(

Stratis
04-01-2016, 05:19 PM
You are a Master Piece :D

Tested in live forum, works fine. This modification is the best solution for quietly BAN users. As we know banning users with the traditional way is not a solution for many purposes.

Than you :)

MarkFL
04-01-2016, 05:45 PM
You are a Master Piece :D

Tested in live forum, works fine. This modification is the best solution for quietly BAN users. As we know banning users with the traditional way is not a solution for many purposes.

Than you :)

Good to hear!

You know, instead of or in addition to the postcount, how would you feel about giving a date for the restriction to be lifted?

Stratis
04-02-2016, 03:53 AM
Good to hear!

You know, instead of or in addition to the postcount, how would you feel about giving a date for the restriction to be lifted?

Actually I don't include in the message the post count with code {1}
because I don't want them to know why they are restricted. In all messages I begin with the phrase "Temporarily you are..." I think this way user don't think to make another registration. So same thought is informing user that in 3 months restrict will end. :D

MarkFL
04-02-2016, 04:12 AM
Actually I don't include in the message the post count with code {1}
because I don't want them to know why they are restricted. In all messages I begin with the phrase "Temporarily you are..." I think this way user don't think to make another registration. So same thought is informing user that in 3 months restrict will end. :D

Yes, you could choose not to display the date, just as you've chosen not to display the post count they need to get the restriction lifted. It would just give you another option. I was just thinking, I would rather ban a user from a thread for say 7 days rather than until they reach a certain post count. :)

Stratis
04-02-2016, 03:33 PM
Yes that's a good idea, to ban for 7 or more less. situations for members are different for each of them, must focus what is the problem that each one makes to forum and ban individual. So as many option we have that's the best. :)

MarkFL
04-02-2016, 04:08 PM
Okay, I will add that option, and I also think we should give the option for a daily cron job to be run that will remove items from the restrictions lists where the restrictions have been lifted. :)