News:

Wondering if this will always be free?  See why free is better.

Main Menu

Disallow image posting

Started by dilaca, August 11, 2004, 12:52:58 AM

Previous topic - Next topic

dilaca

Is there a setting that will stop people being able to post img/pictures in their messages?
Thanks. :)

[Unknown]

Add "img" to the list of disabled BBC tags.

This feature has not had through testing, but that should get you what you're looking for ;).  RC1 only.

-[Unknown]

TXSherry

#2
I'm not sure what 'RC1' stands for.  I'm (obviously) brand new in the forums.

I just DL & installed the scripts and am working on customizing.  Came here looking for help on a couple of issues.  Hopefully someone else has encountered!   Since I have come across this one,
I thought I'd share my experience:

>Forum Configuration
> > Edit Features & Options
Disabled BBC Code (comma seperated): img,move,glow,table,tr,td

And yet, user(s) (only one non-admin, non-guest, test user atm) CAN see the [img] button on their post, and can in fact post an image.    I'll try making it a simple  :  img
in that field, to see if that works, and report back.




Ok, just made the change and it didn't take effect.    Are we supposed to run a script in the forum to somehow 'de cache' prior settings before new ones work?  Just curious!

Off to find out more info.

[Unknown]

 * Due to a typographical error, bbc tags were not being properly disabled all of the time. (Post template)

I did mention it hadn't had enough testing, right?

-[Unknown]

Grudge

OK. I've found the problem and here's a fix for it. Open up Subs.php and find:


// Is this code parsing line meant for that tag?
if (substr($v, 0, strlen($tag) + 4) == '~\[' . $tag . '=' || substr($v, 0, strlen($tag) + 4) == '~\[' . $tag . '\\')


And replace with:

$testString = substr($v, 0, strlen($tag) + 4);
// Is this code parsing line meant for that tag?
if ($testString == '~\[' . $tag . '=' || $testString == '~\[' . $tag . '\\' || $testString == '~\[' . $tag . '(' || $testString == '~\[' . $tag . ' ')


EDIT: I think it may be both mine and Unknowns errors...
I'm only a half geek really...

TXSherry

#5
Yes, yes you did !

I hate to bother you, BUT

1)  I can probably just find the post template and yank them out of there, like I did my very-little-used yabbse forum (user got mad at me for modifying code and wanted an out of the box solution that does exactly you knowwhat? you gotta enough probs on your own! LOL).

2) I'm not sure on the tense you used..
Quotebbc tags were not being properly disabled
does that mean they are now? and that I got the wrong version of the code from the DL page?


/on a continuing search for answers
/off to make more coffee




One more thing, Grunge, is the posted change you made for "smf_1-0-rc1_install.zip " that's currently on the download page? If so I'll run and edit it.   walk I mean.

[Unknown]

No, these are changes that are being made for the next release.  If we were to change the package without changing the version number, it would cause problems and confusion - people wouldn't know if they had the "new" RC1 or the "old" RC1.

-[Unknown]

TXSherry

Quote from: [Unknown] on August 12, 2004, 07:45:22 PM
No, these are changes that are being made for the next release.  If we were to change the package without changing the version number, it would cause problems and confusion - people wouldn't know if they had the "new" RC1 or the "old" RC1.

-[Unknown]

I understand version control, what I didn't understand was if grunge's fixes, posted in this thread, were for the version that I got... the one I DL today.

I finally decided to assume 'yes', but unfortunately, it didn't work.   
* changes messed up the current posts' img attachment (perhaps this is not a bug, not sure if the [img] is stored in the data base as markup or bbc
* and did not work on disabling the bbc, the button's still there.

Unless anyone has encountered this and has a fix I'll fix it later.
Still looking at my  "guest viewing the email" prob.

I'm loving the upgrades :)


 

Grudge

Hi, my fix wasn't to disable the button. It will stop the parsing. However, as img is stored in the database as tags it just doesn't parse them, so existing tags will be shown with their tags, and just not parsed into images I'm afraid.

To remove the images would be a bit of a longer fix. Either wait for *gasp* RC2, or just manually remove them yourself from Post.template.php until the next version.
I'm only a half geek really...

TXSherry

Howdy!  Sorry I messed your name up so often there Grudge  :D

I get it now.  When I made the change I thought it was going to do one thing, and it didn't, and my mind was elsewhere *gasp* so I didn't fiddle with it anymore.

Yeppers, I'll go into the post templates &c and make changes on those in the near future.  I might just disable bbc to start with.

I most CERTAINLY appreciate the help!



Monkey

How can you stop people posting images in their signitures?


Advertisement: