Permissions questions for img bbcode

Started by azasmith, December 31, 2013, 07:14:29 AM

Previous topic - Next topic

azasmith

Afternoon all.

What would be the best way of removing the use of img tags for anyone with less than 5 posts? I don't wish to remove all bbcode access, as this would make quoting impossible etc, but I have a few people from another forum whom enjoy searching for and then posting phalluses every now and then to give my moderators something to do.

Adding words to the filter wouldn't work, as they are mostly reuploaded to services like imgur to get around this.

Kindred

there is a mod for 1.1.x, but it looks like it was never updated to 2.0.x

there is no way to do that with the core product
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

azasmith

Quote from: Kindred on December 31, 2013, 07:50:38 AM
there is a mod for 1.1.x, but it looks like it was never updated to 2.0.x

there is no way to do that with the core product

Wounded. Although the person in this thread seemed to get it working by changing a few pieces of code?

http://www.simplemachines.org/community/index.php?topic=418955.0

This was done in RC4 however, am unsure how far my mileage would go using the same changes. Is there anything else that can be done that would offer a similar functionality? Thanks. 


Kays

Here is something fairly simple which might suite your needs. This will replace the image with the url for it. Unlinked.

In Subs.php look for:


if ($smileys === 'print')


And add before it:


if ($user_info['posts'] <= 5)
$disabled['img'] = true;


If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Arantor

I do not think that will work as expected.

That will mean if the current user viewing the page has less than 5 posts, disable the img tag when showed to them. Not the same as blocking users with less than 5 posts from using them.

Perhaps a variation on the Anti Spam Links mod is needed.

Kays

Duhh, silly me. ::)

At the most it'll make the spammer think that his images aren't being being shown. But it'll still frustrate the mods.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Chalky

I'm most puzzled because I have a mod installed on ChalkCat compatible with the 2.0 line, called "BBC Permission Mod" (note Permission not Permissions), version 1.2, yet for the life of me I can't find it  :-\

Chalky


azasmith

Works brilliantly. Thanks. Now to specify a minimum post length for that membergroup. I'm sure it's in a menu somewhere. haha.

Kindred

nope... minimum post length is not a standard restriction in SMF.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Chalky

It's pointless anyway to set a minimum post length because you'll just get members making posts like this:

QuoteOK ...... ........ ...... .....

azasmith

Quote from: Kindred on December 31, 2013, 10:52:50 PM
nope... minimum post length is not a standard restriction in SMF.

Ah right. Nevermind then.

Quote from: ChalkCat @Christmas on January 01, 2014, 04:09:27 AM
It's pointless anyway to set a minimum post length because you'll just get members making posts like this:

QuoteOK ...... ........ ...... .....

Very good point. I'll leave it for now and see how it goes with just the tags not parsing. Thanks again guys.

Advertisement: