------------------------------
Align bbcode for JohnCMS
By zmasz - wapsite : 2cung.tk
------------------------------
1: Open your bbcode.php file. (location: /incfiles/classes/bbcode.php)
2: Find 
'[small]' => '',
'[/small]' => '',

Add this code at the top of that
			'[left]' => '',
			'[/left]' => '',
			'[center]' => '',
			'[/center]' => '',			
			'[right]' => '',
			'[/right]' => '',			
			'[justify]' => '',			
			'[/justify]' => '',

3: Find '#\[b](.+?)\[/b]#is',

Add this code at the top of that
			'#\[left](.+?)\[/left]#is', // trái			
			'#\[center](.+?)\[/center]#is', // giữa			
			'#\[right](.+?)\[/right]#is', // phải			
			'#\[justify](.+?)\[/justify]#is', // đều

4: Find '<span style="font-weight: bold">$1</span>', // Жирный

Add this code at the top of that
			'<div align="left">$1</div>', // left
			'<div align="center">$1</div>',	// center	
			'<div align="right">$1</div>', // right
			'<div align="justify">$1</div>', // justify

5: Find <a href="javascript:tag(\'[s]\', \'[/s]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/strike.gif" alt="s" title="' . self::$lng['tag_strike'] . '" border="0"/></a>

Add this code at the bottom of that
			<a href="javascript:tag(\'[left]\', \'[/left]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/left.png" alt="l" title="Căn trái" border="0"/></a>
			<a href="javascript:tag(\'[center]\', \'[/center]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/center.png" alt="c" title="Căn giữa" border="0"/></a>
			<a href="javascript:tag(\'[right]\', \'[/right]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/right.png" alt="r" title="Căn phải" border="0"/></a>
			<a href="javascript:tag(\'[justify]\', \'[/justify]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/justify.png" alt="j" title="Căn đều" border="0"/></a>

6: Save and replace your bbcode.php file
7: Test. Thanks for read.