Customizing SMF > SMF Coding Discussion

custom bbc mod tag

(1/1)

Bjarnootjuh:
Hello,

I want to add this:


--- Code: --- array(
'tag' => 'mod',
'before' => '<div style="width:600px; text-align:center; margin-left:auto; margin-right:auto; padding:8px; border:1px solid #9c0006; background:#ffc7ce; color:#9c0006;"><strong>Belangrijk</strong> <br /><br />',
'after' => '</div>',
),
--- End code ---

Where must I put this in subs.php?

I want that moderators and higher can do this: [mod]message[/mod] and then there would be displayed a div with this style.

Doctor Deejay:
Hello, welcome to SMF! :) If you can attach Subs.php for us, I'll make the edit for you and tell what I've done. :)

Bjarnootjuh:
Here it is. I am Dutch, so my English is not so good.

I HAVENT add the code in subs.php because I got a php error on my site, so I ve restored it.

Doctor Deejay:
Don't worry about your English, it's fine. :) I'm Dutch too btw ;D

Find:

--- Code: --- array(
'tag' => 'me',
'type' => 'unparsed_equals',
'before' => '<div class="meaction">* $1 ',
'after' => '</div>',
'quoted' => 'optional',
'block_level' => true,
'disabled_before' => '/me ',
'disabled_after' => '<br />',
),
--- End code ---
And add after:

--- Code: --- array(
'tag' => 'mod',
'before' => '<div style="width:600px; text-align:center; margin-left:auto; margin-right:auto; padding:8px; border:1px solid #9c0006; background:#ffc7ce; color:#9c0006;"><strong>Belangrijk</strong> <br /><br />',
'after' => '</div>',
),
--- End code ---

I have attached your Subs.php, in which I have already made the edit. :) Don't forget to backup, though. :P

Bjarnootjuh:
Thx! It works, how can I set permissions on it? I work with 2.0.2

Navigation

[0] Message Index

Go to full version