http://docs.cksource.com/CKEditor_3.x/H ... ode_Output
/*
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.replace( 'editor1',
{
extraPlugins : 'bbcode'
});
CKEDITOR.editorConfig = function( config )
{
config.font_names =
'Arial/Arial, Helvetica, sans-serif;' +
'Courier New/Courier New, Courier, monospace;' +
'Times New Roman/Times New Roman, Times, serif;';
config.resize_enabled = false;
config.width = '96%';
config.disableNativeSpellChecker = false;
// ADVANCED EDITOR || DESACTIVED : SAVE - FORM,CHECKBOX,RADIO,TEXTFILED,TEXTAREA,SELECT,BUTTON,IMAGEBUTTON,HIDDENFIELD - FLASH - ABOUT
config.toolbar_Full =
[
{ name: 'document', items : [ 'Source','-','NewPage','DocProps','Preview','Print','-','Templates' ] },
{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
'/',
{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
{ name: 'tools', items : [ 'Maximize', 'ShowBlocks' ] },
{ name: 'insert', items : [ 'Video','syntaxhighlight' ] },
'/',
{ name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
{ name: 'colors', items : [ 'TextColor','BGColor' ] },
{ name: 'insert', items : [ 'Image','Table','HorizontalRule','Smiley','SpecialChar','PageBreak' ] },
];
// BASIC EDITOR
config.toolbar_Basic =
[
[ 'Source', '-', 'Bold', 'Italic', 'Underline', '-', 'Image', 'Link', 'Smiley', '-', 'TextColor', 'RemoveFormat', '-', 'Scayt' ]
];
};
[center][url=http://www.gamewinner.fr/outils/ogame/redirect.php][img]http://img301.imageshack.us/img301/7599/bannierego7.png[/img][/url] Les flottes suivantes se sont affrontées le : [b]25.03.2012 20:23:22[/b] [url=http://www.gamewinner.fr/outils/ogame/redirect.php][img]http://img301.imageshack.us/img301/5121/separateurrc5.png[/img][/url] Attaquant [b][size=18][color=#CCFFCC]madcore [/color][/size][/b]([b]3:247:6[/b]) Armes: [b]40[/b]% Bouclier: [b]20[/b]% Coque: [b] 50[/b]% [color=#00ff00]G.transp. 2[/color] [color=#33ff99]Ch.léger 2[/color] [color=#00ffff]Croiseur 14[/color] Défenseur [b][size=18][color=#EEC273]chawbaca [/color][/size][/b]([b]3:246:10[/b]) Armes: [b]0[/b]% Bouclier: [b]0[/b]% Coque: [b] 0[/b]% [color=#eec273]V.colo 1[/color] [color=#a0ff99]Missile 9[/color] [color=#ff99a0]L.léger. 34[/color] [url=http://www.gamewinner.fr/outils/ogame/redirect.php][img]http://img301.imageshack.us/img301/4479/afterbattleun0.png[/img][/url] Attaquant [b][size=18][color=#CCFFCC]madcore [/color][/size][/b] [color=#00ff00]G.transp. 2[/color][color=#00ff00] ( -0 )[/color] [color=#33ff99]Ch.léger 0[/color][color=red] ( -2 )[/color] [color=#00ffff]Croiseur 14[/color][color=#00ffff] ( -0 )[/color] Défenseur [b][size=18][color=#EEC273]chawbaca [/color][/size][/b] [color=#ff0000]Détruit[/color] [url=http://www.gamewinner.fr/outils/ogame/redirect.php][img]http://img301.imageshack.us/img301/5121/separateurrc5.png[/img][/url] [url=http://www.gamewinner.fr/outils/ogame/redirect.php][img]http://img301.imageshack.us/img301/6849/resultatsl5.png[/img][/url] L'attaquant a remporté la bataille ! Il emporte [b][size=12][color=#FF9900]18.955[/color][/size][/b] unités de métal, [b][size=12][color=#FF9900]20.000[/color][/size][/b] unités de cristal et [b][size=12][color=#FF9900]16.611[/color][/size][/b] unités de deutérium L'attaquant a perdu au total [b][size=12][color=#FF9900]8.000[/color][/size][/b] unités. Le défenseur a perdu au total [b][size=12][color=#FF9900]126.000[/color][/size][/b] unités. Un champ de débris contenant [b][size=12][color=#FF9900]4.800[/color][/size][/b] unités de métal et [b][size=12][color=#FF9900]6.600[/color][/size][/b] unités de cristal. Le champ de débris est formé à [b][color=#FF9900]21.05 [/color][/b]% par la flotte de l'attaquant, à [b][color=#FF9900]78.95 [/color][/b]% par la flotte du défenseur [url=http://www.gamewinner.fr/outils/ogame/redirect.php][img]http://img301.imageshack.us/img301/3650/rentaiw0.png[/img][/url] Attaquant avec/sans recyclage: [color=#00ff00]58.966[/color] / [color=#00ff00]47.566[/color] Défenseur avec/sans recyclage: [color=#ff0000]-114.600[/color] / [color=#ff0000]-126.000[/color] [/center] [center] [size=8][color=#FF6666][url=http://www.gamewinner.fr/ogame-convertisseur-rc-rapports-combat.html]Crée par OGame Winner[/url] - [url=http://www.topalli-peintures.fr/]peintre geneve[/url][/color][/size] [size=8][url=http://www.gamewinner.fr/ogame-convertisseur-rc-rapports-combat.html][color=#00ff00]Model : Standard[/color][/url][/size] [url=http://www.gamewinner.fr/ogame-convertisseur-rc-rapports-combat.html][color=#00ff00][size=8]Skin : OGW White (by Gamewinner)[/size][/color][/url][/center]

Re: bbcode plugin
Re: bbcode plugin
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: bbcode plugin
CKEDITOR.replace( 'editor1', { extraPlugins : 'bbcode',USE CTRL+F TO FIND CKEDITOR
<?php // -------------------------------------------------------------------------// // Nuked-KlaN - PHP Portal // // http://www.nuked-klan.org // // -------------------------------------------------------------------------// // This program is free software. you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License. // // -------------------------------------------------------------------------// define('INDEX_CHECK', 1); include_once('Includes/php51compatibility.php'); include('globals.php'); if(file_exists('conf.inc.php')) include('conf.inc.php'); // INCLUDE FATAL ERROR LANG include('Includes/fatal_errors.php'); // POUR LA COMPATIBILITE DES ANCIENS THEMES ET MODULES - FOR COMPATIBITY WITH ALL OLD MODULE AND THEME if (defined('COMPATIBILITY_MODE') && COMPATIBILITY_MODE == TRUE) extract($_REQUEST); # Redirect to INSTALL if (!defined('NK_INSTALLED')){ if (file_exists('INSTALL/index.php')){ header('location: INSTALL/index.php'); exit(); } } if (!defined('NK_OPEN')){ echo WBSITE_CLOSED; exit(); } include('nuked.php'); include_once('Includes/hash.php'); if ($nuked['time_generate'] == 'on'){ $mtime = microtime(); } // GESTION DES ERREURS SQL - SQL ERROR MANAGEMENT if(ini_get('set_error_handler')) set_error_handler('erreursql'); $session = session_check(); $user = ($session == 1) ? secure() : array(); $session_admin = admin_check(); if(isset($_REQUEST['nuked_nude']) && $_REQUEST['nuked_nude'] == 'ajax') { if($nuked['stats_share'] == 1) { $timediff = (time() - $nuked['stats_timestamp'])/60/60/24/60; // 60 Days if($timediff >= 60) { include('Includes/nkStats.php'); $data = getStats($nuked); $string = serialize($data); $opts = array( 'http' => array( 'method' => "POST", 'content' => 'data=' . $string ) ); $context = stream_context_create($opts); $daurl = 'http://stats.nuked-klan.org/'; $retour = file_get_contents($daurl, false, $context); $value_sql = ($retour == 'YES') ? mysql_real_escape_string(time()) : 'value + 86400'; $sql = mysql_query('UPDATE ' . CONFIG_TABLE . ' SET value = ' . mysql_real_escape_string($value_sql) . ' WHERE name = "stats_timestamp"'); } } die(); } if (isset($_REQUEST['nuked_nude']) && !empty($_REQUEST['nuked_nude'])) $_REQUEST['im_file'] = $_REQUEST['nuked_nude']; else if (isset($_REQUEST['page']) && !empty($_REQUEST['page'])) $_REQUEST['im_file'] = $_REQUEST['page']; else $_REQUEST['im_file'] = 'index'; if (preg_match('`\.\.`', $theme) || preg_match('`\.\.`', $language) || preg_match('`\.\.`', $_REQUEST['file']) || preg_match('`\.\.`', $_REQUEST['im_file']) || preg_match('`http\:\/\/`i', $_REQUEST['file']) || preg_match('`http\:\/\/`i', $_REQUEST['im_file']) || is_int(strpos( $_SERVER['QUERY_STRING'], '..' )) || is_int(strpos( $_SERVER['QUERY_STRING'], 'http://' )) || is_int(strpos( $_SERVER['QUERY_STRING'], '%3C%3F' ))){ die(WAYTODO); } $_REQUEST['file'] = basename(trim($_REQUEST['file'])); $_REQUEST['im_file'] = basename(trim($_REQUEST['im_file'])); $_REQUEST['page'] = basename(trim($_REQUEST['im_file'])); $theme = trim($theme); $language = trim($language); // Check Ban $check_ip = banip(); if (!$user){ $visiteur = 0; $_SESSION['admin'] = false; } else $visiteur = $user[1]; include ('themes/' . $theme . '/colors.php'); translate('lang/' . $language . '.lang.php'); if ($nuked['nk_status'] == 'closed' && $user[1] < 9 && $_REQUEST['op'] != 'login_screen' && $_REQUEST['op'] != 'login_message' && $_REQUEST['op'] != 'login'){ echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr"> <head><title>' , $nuked['name'] , ' - ' , $nuked['slogan'] , '</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link title="style" type="text/css" rel="stylesheet" href="themes/' , $theme , '/style.css" /> <body style="background: ' , $bgcolor2 , '"> <div style="width: 600px; padding: 25px; margin: 200px auto; border: 1px solid ' , $bgcolor3 , '; background: ' , $bgcolor1 , '; text-align: center"> <h2 style="margin: 0">' , $nuked['name'] , ' - ' , $nuked['slogan'] , '</h2> ' , _SITECLOSED , '<br/><br /><a href="index.php?file=User&op=login_screen"><b>' . _LOGINUSER . '</b></a></div></body></html>'; } else if (($_REQUEST['file'] == 'Admin' || $_REQUEST['page'] == 'admin' || (isset($_REQUEST['nuked_nude']) && $_REQUEST['nuked_nude'] == 'admin')) && $_SESSION['admin'] == 0){ include('modules/Admin/login.php'); } else if (($_REQUEST['file'] != 'Admin' AND $_REQUEST['page'] != 'admin') || ( nivo_mod($_REQUEST['file']) === false || (nivo_mod($_REQUEST['file']) > -1 && (nivo_mod($_REQUEST['file']) <= $visiteur))) ){ include ('themes/' . $theme . '/theme.php'); if ($nuked['level_analys'] != -1) visits(); if (!isset($_REQUEST['nuked_nude'])){ if (defined('NK_GZIP') && ini_get('zlib_output')){ ob_start('ob_gzhandler'); } if (!($_REQUEST['file'] == 'Admin' || $_REQUEST['page'] == 'admin' || (isset($_REQUEST['nuked_nude']) && $_REQUEST['nuked_nude'] == 'admin')) || $_REQUEST['page'] == 'login') top(); echo '<script type="text/javascript" src="media/js/infobulle.js"></script>',"\n" , '<script type="text/javascript">InitBulle(\'' , $bgcolor2 , '\', \'' , $bgcolor3 , '\', 2);</script>',"\n" , '<script type="text/javascript" src="media/ckeditor/plugins/syntaxhighlight/scripts/shBrush_min.js"></script>',"\n" , '<script type="text/javascript"><!--',"\n" , 'document.write(\'<link type="text/css" rel="stylesheet" href="media/ckeditor/plugins/syntaxhighlight/styles/shCore.css"/>\');',"\n" , '--></script>',"\n" , '<script type="text/javascript">',"\n" , 'SyntaxHighlighter.config.clipboardSwf = \'media/ckeditor/plugins/syntaxhighlight/scripts/clipboard.swf\';',"\n" , 'SyntaxHighlighter.all();',"\n" , '</script>',"\n"; if($user[1] == 9 && $_REQUEST['file'] != 'Admin' && $_REQUEST['page'] != 'admin'){ if ($nuked['nk_status'] == 'closed'){ echo '<div style="border: 1px solid ' , $bgcolor3 , '; background: ' , $bgcolor2 , '; margin: 10px; padding: 10px"><b>' , _YOURSITEISCLOSED , ' :<br /><br/ >' , $nuked['url'] , '/index.php?file=User&op=login_screen</b></div>',"\n"; } if (is_dir('INSTALL/')){ echo '<div style="border: 1px solid ' , $bgcolor3 , '; background: ' , $bgcolor2 , '; margin: 10px; padding: 10px;text-align:center;font-size:18px;"><b>' , REMOVEDIRINST , '</b></div>',"\n"; } if (file_exists('install.php') || file_exists('update.php')){ echo '<div style="border: 1px solid ' , $bgcolor3 , '; background: ' , $bgcolor2 , '; margin: 10px; padding: 10px;text-align:center;font-size:18px;"><b>' , REMOVEINST , '</b></div>',"\n"; } } } else header('Content-Type: text/html;charset=ISO-8859-1'); if (is_file('modules/' . $_REQUEST['file'] . '/' . $_REQUEST['im_file'] . '.php')){ include('modules/' . $_REQUEST['file'] . '/' . $_REQUEST['im_file'] . '.php'); } else include('modules/404/index.php'); if ($_REQUEST['file'] != 'Admin' && $_REQUEST['page'] != 'admin' && defined('EDITOR_CHECK')) { echo '<script type="text/javascript" src="media/ckeditor/ckeditor.js"></script>',"\n" , '<script type="text/javascript">',"\n" , '//<![CDATA[',"\n" , ' if(document.getElementById(\'e_basic\')){',"\n" , 'CKEDITOR.config.scayt_sLang = "' . (($language == 'french') ? 'fr_FR' : 'en_US') . '";',"\n" , (($nuked['scayt_editeur'] == 'on') ? 'CKEDITOR.config.scayt_autoStartup = "true";' : ''),"\n"; echo ConfigSmileyCkeditor().'',"\n"; echo ' CKEDITOR.replace( \'e_basic\',',"\n" , ' {',"\n" , ' toolbar : \'Basic\',',"\n" , ' language : \'' . substr($language, 0,2) . '\',',"\n"; if(!empty($bgcolor4)) echo ' uiColor : \'' . $bgcolor4 . '\'',"\n"; echo ' }); }',"\n" , '//]]>',"\n" , '</script>',"\n" , '<script type="text/javascript">',"\n" , '//<![CDATA[',"\n" , ' if(document.getElementById(\'e_advanced\')){',"\n"; $Video = ($nuked['video_editeur'] == 'on') ? ',Video' : ''; echo 'CKEDITOR.config.extraPlugins = \'syntaxhighlight'.$Video.'\';' , 'CKEDITOR.config.scayt_sLang = "' . (($language == 'french') ? 'fr_FR' : 'en_US') . '";',"\n" , (($nuked['scayt_editeur'] == 'on') ? 'CKEDITOR.config.scayt_autoStartup = "true";' : ''),"\n"; echo ConfigSmileyCkeditor().'',"\n"; echo ' CKEDITOR.replace( \'e_advanced\',',"\n" , ' {',"\n" , ' toolbar : \'Full\',',"\n" , ' language : \'' . substr($language, 0,2) . '\',',"\n"; if(!empty($bgcolor4)) echo ' uiColor : \'' . $bgcolor4 . '\'',"\n"; echo ' }); }',"\n" , '//]]>',"\n" , '</script>',"\n"; } if (!isset($_REQUEST['nuked_nude'])){ if ($user[5] > 0 && !isset($_COOKIE['popup']) && $_REQUEST['file'] != 'User' && $_REQUEST['file'] != 'Userbox'){ echo '<div id="popup_dhtml" style="position:absolute;top:0;left:0;visibility:visible;z-index:10"></div>',"\n" , '<script type="text/javascript" src="media/js/popup.js"></script>',"\n" , '<script type="text/javascript">popup("' , $bgcolor2 , '", "' , $bgcolor3 , '", "' , _NEWMESSAGESTART , ' ' , $user[5] , ' ' , _NEWMESSAGEEND , '", "' , _CLOSEWINDOW , '", "index.php?file=Userbox", 350, 100);</script>',"\n"; } if (!($_REQUEST['file'] == 'Admin' || $_REQUEST['page'] == 'admin') || $_REQUEST['page'] == 'login'){ footer(); } include('Includes/copyleft.php'); if ($nuked['time_generate'] == 'on'){ $mtime = microtime() - $mtime; echo '<p style="color:#555555;text-align:center;width:100%;">Generated in ',${mtime},'s</p>'; } send_stats_nk(); echo '</body></html>'; } } else{ include ('themes/' . $theme . '/colors.php'); include ('themes/' . $theme . '/theme.php'); top(); opentable(); translate('lang/' . $language . '.lang.php'); echo '<br /><br /><div style="text-align: center;">' , _NOENTRANCE , '<br /><br /><a href="javascript:history.back()"><b>' , _BACK , '</b></a></div><br /><br />'; closetable(); footer(); } mysql_close($db); ?>Re: bbcode plugin
Re: bbcode plugin
Re: bbcode plugin
<script type="text/javascript"> CKEDITOR.replace( 'editor1', { extraPlugins : 'bbcode' }); </script>You can tweak it after.Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: bbcode plugin
<script type="text/javascript"> CKEDITOR.replace( 'editor1', { extraPlugins : 'bbcode' }); </script>to
i already try
echo "<textarea id=\"e_advanced\" name=\"texte\" cols=\"70\" rows=\"15\">" . $ftexte . "<p></p></textarea><script type="text/javascript"> CKEDITOR.replace( 'editor1', { extraPlugins : 'bbcode' }); </script>";but the code with the quote cause problem in the php :S
Re: bbcode plugin
As for the code, just put it in its entirety at the end of </textarea> anywhere you have an editor instance. Test it in your computer before messing around with your site's smart quotes. Open your ckeditor/_samples folder then open any file there with notepad, like enterkey.html for instance. Find </textarea> then paste the code below right after </textarea>.
<script type="text/javascript"> CKEDITOR.replace( 'editor1', { extraPlugins : 'bbcode' }); </script>Now just open enterkey.html the normal way. Your bolds and indents should be in brackets []. If you get it working there, you can get it working on your site too if you tweak your server and change 'editor1' to 'e_advanced', or whatever you call your text area.Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: bbcode plugin
im on a creepy free host server xD
and i dont understant how make a tripslashes() function
Re: bbcode plugin
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: bbcode plugin
http://php.net/manual/fr/function.stripslashes.php
Re: bbcode plugin
Re: bbcode plugin
Re: bbcode plugin
<script type=text/javascript> CKEDITOR.replace( editor1, { extraPlugins : bbcode }); </script>Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: bbcode plugin
, '<script type="text/javascript">',"\n" , '//<![CDATA[',"\n" , ' if(document.getElementById(\'e_advanced\')){',"\n"; $Video = ($nuked['video_editeur'] == 'on') ? ',Video' : ''; echo 'CKEDITOR.config.extraPlugins = \'syntaxhighlight'.$Video.'\';' , 'CKEDITOR.config.scayt_sLang = "' . (($language == 'french') ? 'fr_FR' : 'en_US') . '";',"\n" , (($nuked['scayt_editeur'] == 'on') ? 'CKEDITOR.config.scayt_autoStartup = "true";' : ''),"\n"; echo ConfigSmileyCkeditor().'',"\n"; echo ' CKEDITOR.replace( \' editor1,','"\n" , ' {',"\n" , ' extraPlugins : bbcode ',"\n" , ' toolbar : \'Full\',',"\n" , ' language : \'' . substr($language, 0,2) . '\',',"\n"; if(!empty($bgcolor4)) echo ' uiColor : \'' . $bgcolor4 . '\'',"\n"; echo ' }); }',"\n" , '//]]>',"\n" , '</script>',"\n";cuz all try i make i was getting an error