i want to said sorry in advance cuz you will see, im a real noob
CKEditor was by default on my website when i instal it, i find it great so i dont want to change it, but i need bbcode in my forum so i take a look in the docs and i find this page
http://docs.cksource.com/CKEditor_3.x/H ... ode_Output
but first i dont know where i need to enable it ( i try to add the code in the header of the config.js)
like so :
/* 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' ] ]; };
but when i post on my website i see [color = #1245]
exemple :
[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]
thx in advance for you help and sorry if i post a stupid question
Re: bbcode plugin
Re: bbcode plugin
You should check out this BBCode samples page to get an idea of how it's done. Don't forget to check out the source code. There's useful hits in front of the // forward slashes.
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
idk if is a good strart but i see in ckeditor.js
this
so i add bbcode in there
but now when i add my bbcode un the textbox i see the color but when i post my message i only see the bbcode :S
and if someone can help me cuz i know you need to call ckeditor.js to make the editor to work and you need to add
some where in the code but i dont know php at all and i use a premade forum called nuked-clan
i think i found the place to change the code but i dont know php and i alway got an php error if i change something
there is the code of the page
USE CTRL+F TO FIND CKEDITOR
Re: bbcode plugin
Re: bbcode plugin
Re: bbcode plugin
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
to
i already try
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>.
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
I haven't used stripslashes() but I've heard about that function. There's more than one way to do it. Try googling!
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
i already goolgle and i see alot of code but i dont know how to make a fonction in php
http://php.net/manual/fr/function.stripslashes.php
i look that and my brain want to suicide xD
i just start learning c++ and fonction are not wrote with the same syntax at all xD<
Edit:
what i realy dont understant if when i put bbcode in source mode
then i clic on source again i see my bbcode work with colors and image but when i send it i only see the raw code
Re: bbcode plugin
Re: bbcode plugin
Re: bbcode plugin
You need turn off smart quotes. Bumping threads won't make that happen; changing hosts will... Or you can ask this question in a php forum. The CKEditor is the least of your problems if you don't fix the quotes. Any text that you will write on your site will add slashes to quotes and apostrophes, whether you use CKEditor or not, so this really isn't a problem we are obliged to fix for you. Why don't you try using this code. I stripped the quotes. Put it right after </textarea> (maybe it will work and you will have a quick fix).
Montre un peu d'initiative. Mois aussi j'avais un problème de smart quotes sur mon site web!
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
cuz all try i make i was getting an error