Why So Scared

A blog about; Programming, Music and Random Stuff

Archive for the 'SMF' Category

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.

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

SMF gets an Auto Link Checker

Yesterday, an SMF modification by, “M-DVD” was accepted by the simplemachines moderators. It currently works with; rapidshare.com, megaupload, megarotic, megaporn, sexuploader and filefactory.

With this modification installed links in messages will be checked automatically at a admin set interval and users can see if links are valid at a glance with some handy CMS colors, Green = all good || Red = error.

Features

  • If a member opens a topic, the modification will search all filehost links in the messages page’s.
  • Links founds are checked and recorded in a log in the SMF database to expedite revisions in the future (eg, the next time a member returns to this topic).
  • You can set the time for expired this log, according to the last check links to the message. eg, each 2 days.
  • Messages without links fileshost’s, will be marked and will not be rechecked again.
  • If links dead are found, the modification will be send a PM to post author (and the Moderator Local).
  • Compatible with Anonymize Links and with links masked (eg: hp://, h p://, hxxp://, h..p://, h__p://, h??p://, h**p://, h++p://, h–p://)
  • Compatible with QuickModify

Screenshot

Link Checker With Default SMF Theme

Link Checker With Default SMF Theme

It’s the first modification of its kind for SMF and works extremely well, we’re using it on Warez-DnB.

You can download here.

Tags: ,
posted by Juo in SMF, Web News and have Comments (3)