View Single Post
  #1  
Old 14th December 2009, 04:29
benjaminbih benjaminbih is offline
Senior Member
 
Join Date: Jul 2008
Bosnia-Herzegovina
Posts: 70
Smile [FTS 1.1] Add Left, Center, Right to WYSIWYG Editor with buttons
Thru this modification you are able about adding 3 additional buttons the WYSIWYG editor. They enable to align the text to left, right side and center

open /include/globalfunctions.php
and find:
PHP Code:
    $s preg_replace"/\[marquee\]((\s|.)+?)\[\/marquee\]/""<marquee>\\1</marquee>",
        
$s ) ; 
and add under it
PHP Code:
    $s preg_replace"/\[left\]((\s|.)+?)\[\/left\]/""<div style='text-align: left;'>\\1</div>",
        
$s ) ;

    
$s preg_replace"/\[center\]((\s|.)+?)\[\/center\]/""<div style='text-align: center;'>\\1</div>",
        
$s ) ;

    
$s preg_replace"/\[right\]((\s|.)+?)\[\/right\]/""<div style='text-align: right;'>\\1</div>",
        
$s ) ; 
open /fts_contents/wsiwyg/sets/default/style.css
and find:
PHP Code:
.markItUp .quotes a    {
    
background-image:url(images/quotes.png);

above it add:
PHP Code:
.markItUp .left a    {
    
background-image:url(images/left.png);
}

.
markItUp .center a    {
    
background-image:url(images/center.png);
}

.
markItUp .right a    {
    
background-image:url(images/right.png);

open /fts_contents/wsiwyg/sets/default/set.js
and find:
PHP Code:
        {separator:'---------------' },
        {
name:'Quotes'openWith:'<<<@!1!@>>>'className:'quotes'},
        {
name:'Code'openWith:'[code]'closeWith:'[/code]'className:'code'}, 
Above add:
PHP Code:
        {separator:'---------------' },
        {
name:'Left'openWith:'[left]'closeWith:'[/left]'className:'Left'},
        {
name:'Center'openWith:'[center]'closeWith:'[/center]'className:'center'},
        {
name:'Right'openWith:'[right]'closeWith:'[/right]'className:'Right'}, 
open /include/libs/format/format-functions.php
and searhc for:
PHP Code:
<script language=javascript>
var 
b_open 0;
var 
i_open 0;
var 
u_open 0;
var 
color_open 0;
var 
list_open 0;
var 
quote_open 0;
var 
html_open 0
add to this list:
PHP Code:
var left_open 0;
var 
center_open 0;
var 
right_open 0
Upload the attached 3 pics to:
PHP Code:
./fts-contents/wysiwyg/sets/default/images 
Attached Files
File Type: rar pics.rar (379 Bytes, 37 views)

Last edited by benjaminbih; 16th December 2009 at 23:24.
Reply With Quote
The Following 2 Users Say Thank You to benjaminbih For This Useful Post:
Fynnon (14th December 2009), Phogo (11th January 2010)