vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   vBulletin 4 Request - [Solved] Ban specific users from specific scripts (https://vborg.vbsupport.ru/showthread.php?t=322014)

Stratis 03-04-2016 07:58 PM

vBulletin 4 Request - [Solved] Ban specific users from specific scripts
 
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

Quote:

Originally Posted by Stratis (Post 2566543)
*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

1 Attachment(s)
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

1 Attachment(s)
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/attachmen...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 [DATE]1459283838[/DATE] at [TIME]1459283838[/TIME] ---------------

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

Quote:

Originally Posted by Stratis (Post 2568196)
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 [DATE]1459283838[/DATE] at [TIME]1459283838[/TIME] ---------------

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

Quote:

Originally Posted by Stratis (Post 2568230)
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

Quote:

Originally Posted by Stratis (Post 2568238)
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

1 Attachment(s)
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

Quote:

Originally Posted by Stratis (Post 2568274)
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

Quote:

Originally Posted by Stratis (Post 2568289)
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

Quote:

Originally Posted by Stratis (Post 2568291)
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

1 Attachment(s)
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

Quote:

Originally Posted by Stratis (Post 2568347)
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

Quote:

Originally Posted by MarkFL (Post 2568348)
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

Quote:

Originally Posted by Stratis (Post 2568365)
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. :)


All times are GMT. The time now is 01:36 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01988 seconds
  • Memory Usage 1,815KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (35)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete