BBCode question

This forum is now closed as part of retiring phpBB2.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
tschmaling2
Registered User
Posts: 40
Joined: Tue Apr 19, 2005 4:26 am

BBCode question

Post by tschmaling2 »

Hey guys. I'm trying to figure out how I modify the code so that all IMG tags change to straight URL tags (therefore not allowing images to post, only their clickable link).

I'm assuming I can do that right in the bbcode.php file, and I'd assume in this line:

Code: Select all

// [img]image_url_here[/img] code..
// This one gets first-passed..
$patterns[] = "#\[img:$uid\]([^?].*?)\[/img:$uid\]#i";
$replacements[] = $bbcode_tpl['img'];
The question is, how exactly would I alter that (or any other code) to accomplish this?


Thanks in advance,
Tony, still kinda green with PHP
Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati »

OPEN templates/subSilver/bbcode.tpl

FIND

Code: Select all

<!-- BEGIN img --><img src="{URL}" border="0" /><!-- END img -->
REPLACE WITH

Code: Select all

<!-- BEGIN img --><a href="{URL}">{URL}</a><!-- END img -->
Image
tschmaling2
Registered User
Posts: 40
Joined: Tue Apr 19, 2005 4:26 am

Post by tschmaling2 »

Wow, that's fantastic. Ever think something is far more difficult than it actually ends up being?

Anyway, thanks for the quick reply!
Tony
drib
Registered User
Posts: 11
Joined: Fri May 12, 2006 6:44 am

swf files

Post by drib »

I've been told my question involves a change in BBCode so here goes. I have the Attachment Mod installed on my site and I want the poster to have the option of posting swf files from their own server. I've seen this done on another site but I'm having a heck of a time finding out how to do it. I just want to avoid having a ton of flash files on my server as a standard file attachment. Thanks in advance for any help you can give me.
Post Reply

Return to “[2.0.x] MOD Writers Discussion”