MyBB Community Forums

Full Version: disallow links in signatures and home page per user group
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
can someone build a plugin that'll extend the group permissions?

I'm trying to disallow groups from posting links in their signatures as well as their homepage.
Will users be able to use images or you want to disallow all links upon editing the signature (I.e. users woundn't be able update it if links are present).
(2014-02-27, 02:53 AM)Omar G. Wrote: [ -> ]Will users be able to use images or you want to disallow all links upon editing the signature (I.e. users woundn't be able update it if links are present).

hmn, I hadn't thought about that.

can there be an exception added into the code to bypass the restriction if such & such sites are listed in the plugin? ex: imgur.com, photobucket.com, etc.

will it be too heavy on the site?
I don't think so, as long as the plugin runs upon trying to edit the signature at UCP.
I do it some like this, but finally all users make some tricks, xD.

Put spaces or something like urls on images, so i have to say it's more like maybe hide this entire contents if exist for some groups or bassed on postcount maybe.

There are a few ways to do this, but finally some users do it something to pass by this restrictions.
For the website field you can use something like Homepage Control or Auto website link removal and set the minimum post count to an exaggerate amount so users wouldn't be able to use the field ever. Then remove any reference to the field from the templates.

As for the second one (dis/allowed) links in signatures, I'm thinking about adding such feature to my OUGC Signature Control plugin if you are interested on using it.
yes, the other admin on the site is OK with not allowing users to post photos in their signatures.

can the homepage control plugin be modified to use groups rather than post count?
any ideas, Omar?
Open websitecontrol.php, find:
if (in_array($p['usergroup'],$groups) == true) {

Replace with:
if (!array_intersect(array_filter(array_map('intval', array(1, 2, 3))), array_map('intval', (array)explode(',', $p['usergroup'].','.$p['additionalgroups']))))

Find:
 if ($memprofile['postnum'] >= $mybb->settings['websitecontrol_postcount'])

Replace with:
if (!array_intersect(array_filter(array_map('intval', array(1, 2, 3))), array_map('intval', (array)explode(',', $memprofile['usergroup'].','.$memprofile['additionalgroups']))))

Where 1, 2, and 3 are the usergroup you want to restrict the website from.

About my plugin, give me some time. I'm having issues with my PC :|
how do I add more than 1 user group?

is it simply a comma?

example: 1,2,3

if so, when I upload the file and go to activate it in plugins in the admin cp, it doesn't list any actual plugins until I delete the file and refresh the page.
Pages: 1 2