Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: karlbenson on October 07, 2007, 02:48:40 PM

Title: Justify BBCode
Post by: karlbenson on October 07, 2007, 02:48:40 PM


JUSTIFY BBCODE v1.0
By Karl Benson


Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=970) | Comment On This Mod (http://www.simplemachines.org/community/index.php?topic=199203.0)

Introduction
A very simple modification for the use of
bbcode to justify text.

Features
o BBCode Button to Insert
bbcode.

Installation
Simply install the package to install this modification on the Default theme.

This mod will work for both SMF 1.1.x versions
and SMF 2.0.x versions (the beta of which is currently available to Charter Members).

Manual Edit
A Manual edit will be required for non-default themes to add the BBCode button to the Post.template.php (IF the theme has a custom Post.template.php)
FIND
'left' => array('code' => 'left',
ADD BEFORE
'justify' => array('code' => 'justify', 'before' => '[justify]', 'after' => '[/justify]', 'description' => $txt['justify']),

You will also need to place a copy of the justify.gif in each of your themes bbc image folders (eg Themes/{themename}/images/bbc)

If your using a language different than the ones supported this mod (listed below), then you will need to add the following to the Modifications.{language}.php for each theme (The language folder can be found eg Themes/{themename}/languages/)
If you are using utf8, you will also need to add it to Modifications.{language}-utf8.php

FIND
?>
ADD BEFORE (and translate as necessary the language strings)
$txt['justify'] = 'Justify';

Languages
o Supports
- English/English-utf8
- English_British/English_British-utf8
I welcome translations for any languages which SMF Supports.
Please translate the following and post it in the support topic for the mod. Thank You
$txt['justify'] = 'Justify';

Support
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)

Changelog
1.0 - 3rd October 2007
o Initial Release per request
Title: Re: Justify BBCode
Post by: haiwasnm on October 08, 2007, 01:03:34 AM
Good stuff !than Supports firefox?
Title: Re: Justify BBCode
Post by: karlbenson on October 08, 2007, 09:10:43 AM
it does.

I tested in IE7/FF/Opera
Title: Re: Justify BBCode
Post by: gemigene on December 23, 2007, 10:34:55 PM
French translation:

$txt['justify'] = 'Justifi&eacute';

Cheers,
Gene
Title: Re: Justify BBCode
Post by: karlbenson on January 18, 2008, 11:53:01 PM
I have reuploaded this mod and screenshots for it.

I am in the process of doing it for ALL my other mods aswell.  Please bear with me.