PDA

View Full Version : Editing IMG BBCode?


pedrossi
08-18-2010, 04:31 AM
Does anyone know how I can edit the IMG BBCode? Basically, I want to make it so that when I use the [ IMG] code on an article, the image will automatically be resized.

I'm looking at class_bbcode.php, but not sure which of those functions I need to modify...

Thanks!

mmfgamer5
08-18-2010, 07:56 AM
You may want to think about adding a custom IMG code, that resizes the image to X dimensions. This is the html code to resize an image:
<img src="http://www.cjmmedia.com/images/styles/freeminium/banner.png" width="1022" height="200">
You could make that into BBCode.

Or you could enable attachment thumnails, then let your users upload images to your server.

To enable attachments, go to the AdminCP > Settings > Options > Message Attachment Options > View Attached Images Inline > Yes, display thumnails > Sort out various sizing options > Save.

pedrossi
08-18-2010, 04:41 PM
I think I need to edit the actual IMG BBCode, because I need the CMS to recognize the img and make it into a thumbnail... it does that with [ IMG] but not with any custom BBCodes I've created.