miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
How To miniBB Support Forums / How To /  
 

Disable images

 
Author trintalk
Partaker
#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
Active Member
#2 | Posted: 13 Oct 2008 21:18 
From bb_codes.php file you could remove the [IMGS] and [IMG] tag codes in both encode and decode functions.

Author Paul
Lead Developer 
#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
Lead Developer 
#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
Lead Developer 
#6 | Posted: 13 Nov 2008 06:17 
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 Support Forums / How To /
 Disable images
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑