Check-up your forums instantly without missing any new posting
using the Forums Checker addon! Click here to read more.
Forums Checker addon for miniBB
miniBB ®
 
miniBB Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
How To miniBB Community Forum / How To /
Short link for this topic:

Disable images

 
Author trintalk
Forums Member
#1 | Posted: 13 Oct 2008 13:50
I've been searching around the web and the forums for a fix to disable images in miniBB. Recently one of my forums has been hit by porn spammers despite having the CAPTCHA plugin installed, so I'd like to disable the option for images completely. Can anyone help?

Thanks,
Mike
Author tom322
Forums Member
#2 | Posted: 13 Oct 2008 21:18 | Edited by: tom322
From bb_codes.php file you could remove the [IMGS] and [IMG] tag codes in both encode and decode functions.
Author Paul
CEO
#3 | Posted: 14 Oct 2008 02:26
Additionally, don't forget to remove the IMG code button from templates/main_post_form.html.
Author Guest
#4 | Posted: 9 Nov 2008 03:33
hi guys this solution make me cannot add a smileys in my post ..
then i enable only [IMG] tags on my bb_codes.php

but a "smart user" still can use bb codes to add images using this code


and i thinking of change the bb code from [img] to another tags such as [abc] or [def]
but i cant edit it its javascript in form.js isn't ?

can anyone give me a clue or solution :)
Author Paul
CEO
#5 | Posted: 10 Nov 2008 04:23
You can edit everything you need with no limitations under GPL license terms, if you mean that.

You can't disable images and use smileys add-on at once, because Smileys add-on uses [img] tags and smileys are actually references to images. For making that happen, it's probably needed to rewrite Smileys script in general, letting is use not [img] code, but straightly converting smileys code to HTML.
Author Paul
CEO
#6 | Posted: 13 Nov 2008 06:17 | Edited by: Paul
Addition: I have had an idea/workaround on it... You can modify [img] or [imgs] codes so they allow only images loaded from your own forums URL. As smileys are placed on your local server, they should work (as well as it would work for any images placed on your own server).

Example (enCodeBB function of bb_codes.php):

/* [IMGS] tag code - with fixed width and ALT */

$pattern[]="#\[imgs\](http://".$GLOBALS['main_url']."/([^<> \n\r\[\]&]+?)\.?(gif|jpg|jpeg|png)?)\[/imgs\]#i";

/* Old [IMG] tag code - without fixed width - this one is used for smilies */

$pattern[]="#\[img\](http://".$GLOBALS['main_url']."([^<> \n\r\[\]&]+?)\.?(gif|jpg|jpeg|png)?)\[/img\]#i";


 
How To miniBB Community Forum / How To / Disable images Top
Your Reply Click this icon to move up to the quoted message

» Username  » Password 
You are welcome to post anonymously by entering a nickname with no password (if that nickname has not been taken by another member) or by leaving both fields empty. If you have a forums membership account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

 
miniBB Community Forum Powered by Free Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts