Why So Scared

A blog about; Programming, Music and Random Stuff

SMF 2.0 Custom Button in "Start new topic"

With the help of SMF forum member Arantor I was able to add a custom button to my Simple Machines Forum 2.0 (Warez-DnB)

To add a custom button you need to make an edit in the Sources/Subs-Editor.php file.

Locate
// The below array makes it dead easy to add images to this control. Add it to the array and everything else is done for you!
$context['bbc_tags'] = array();
$context['bbc_tags'][] = array(

You can now see how a button is made up within SMF 2.0 for this example we will use the [img] button.

'img' => array('code' => 'img', 'before' => '[img]', 'after' => '[/img]', 'description' => $txt['image']),

You can see how this is made up, to add your own function (in the case of Warez-DnB a button that will atomically copy in the text [img]http://images.my-domain.com/nocd.png[/img]

I added

'noimg' => array('code' => 'noimg', 'before' => '[img]http://images.warez-dnb.com/nocd.png', 'after' => '[/img]', 'description' => $txt['No picture']),

You’ll also want to add the button within your theme’s images/bbc folder that needs to be the same file name as the function, in this case “noimg.gif”

Simple stuff but handy to know.

posted by Juo in SMF, tidbit and have Comments (9)
Tags: ,

9 Responses to “SMF 2.0 Custom Button in "Start new topic"”

  1. Polprav says:

    Hello from Russia!
    Can I quote a post in your blog with the link to you?

  2. BEELAMIVYNAMY says:

    Hello

    Thanks for this site, very interesting info.

  3. BEELAMIVYNAMY says:

    Hi

    Thank’s for this site, very useful info.


    [url=http://firewi-boa-firewi.blogspot.com]firewire board firewire[/url]

  4. BEELAMIVYNAMY says:

    Hello

    Thanks for this page, very interesting informations.


    [url=http://computscannarma.blogspot.com]computer scanner armani[/url]

  5. BEELAMIVYNAMY says:

    Hello

    Thank’s for this site, very useful informations.


    [url=http://ste-sear-l.blogspot.com]steve search lye[/url]

  6. BEELAMIVYNAMY says:

    Hello

    Thank’s for this page, very interesting info.


    [url=http://badispenseveni.blogspot.com]baby dispenser evening[/url]

  7. BEELAMIVYNAMY says:

    Hi

    Thanks for this page, very interesting info.


    [url=http://bitabbo.blogspot.com]bike table boat[/url] , [url=http://digital-minidvs.blogspot.com/2009/10/minidv-digital-camcorder-black.html]minidv digital camcorder black[/url]

  8. hello,

    i subscribed because i do believe this is the right place for me.

    bye :)

    [url=http://competitive-intelligence.lausanne-voyance.ch]competitive intelligence[/url]

  9. Endorma says:

    I have the first generation iphone and I want to sell it. I only have the iphone itself. However there are some small cracks in the screen, but it works PERFECTLY. How much do you think I should sell it for? Someone offered me $50, is that too low?

    ________________
    [url=http://catalinux4xt.evonet.ro/forum/viewtopic.php?p=74143#74143]unlock iphone 3g[/url]

Place your comment

Please fill your data and comment below.
Name
Email
Website
Your comment