drakeonfire
Posts: 70
08:22 PM 27/06/2009 |
Hello,
I just built my own forums (Its a working progress) but I was wandering if theres a place you guys learn off? Because i was searching for like 30minutes trying to find out how to do reply boxes / post boxes with BB code and stuff (above the box bit like u hav.. ) but i couldnt find any...
So i thought i'd ask how you do it / if theres a place u can send me to learn bout it :P ?
Thank you, Sorry to bother you with this as i know your busy with the Obs Mod :)
DUde.
|
Snakelet
(xfire: snakelet)
OBS Dev
Posts: 1330
01:36 AM 28/06/2009 |
Search for TinyMCE. That's what this reply box is. Good luck
|
drakeonfire
Posts: 70
10:18 AM 28/06/2009 |
Thanks :)
|
drakeonfire
Posts: 70
10:55 AM 28/06/2009 |
okay I get like 6 buttons available...
this is the script i have at the top of the page...
<script type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce_gzip.js"></script> <script type="text/javascript"> tinyMCE_GZ.init({ plugins : 'style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,'+ 'searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras', themes : 'simple,advanced', languages : 'en', disk_cache : true, debug : false }); </script> <!-- Needs to be seperate script tags! --> <script type="text/javascript"> tinyMCE.init({ mode : "textareas" }); </script>
any ideas : (?
u can see what i mean at
http://www.forums.madproductions.org.uk/index.php?act=topic&id=3
the layout isnt amazin but its a workin progress :P
|
cometfish
Forum Admin
Posts: 6
06:20 AM 29/06/2009 |
themes : 'simple,advanced',
should be:
theme : 'advanced',
AFAIK you can only have one theme, but you can have multiple plugins. You need the advanced theme for the extra buttons.
Right click and View Source (on the Reply page) to see the code that is being used on this forum.
|
drakeonfire
Posts: 70
09:28 AM 29/06/2009 |
okay atm i just copied and pasted ur tiny_mce bit and its working ~ will change later .. but I am having another problem.. stuff like emoticons.. well even more basic stuff like when you press ENTER to start a new line it comes up with... rnrn
and these are all characters from a keyboard and what they appear as... testing characters a b c d e f g h i j k l m n o p q r s t u v w x y z 1 2 3 4 5 6 7 8 9 0 - = [ ] ; \' # , . / \\ | < > ? : @ ~ { } + _ ) ( * & ^ % $ £ \" ! ` ¬ ENTERrnrnENTERrnrn
as u can see theres some wierd stuffin there like < which is < i think and gt which is > ..
is it coz im ..
function protect($string){ //Escape dangerous strings $string = mysql_real_escape_string($string); $string = strip_tags($string); $string = addslashes($string);
on the $msg = protect($_POST['reply']);
is that why they wont work coz its strippin the stuff :( ?
|
cometfish
Forum Admin
Posts: 6
12:43 PM 29/06/2009 |
Yes, you are stripping everything out, so no formatting appears. At the very least, you will need remove "strip_tags" because that takes away all the formatting that the special edit box added.
|
drakeonfire
Posts: 70
01:46 PM 29/06/2009 |
to be fair though, that opens up the forums to html attacks from nasty people >:( .. so is it worth the risk ^^?
|
cometfish
Forum Admin
Posts: 6
07:58 AM 30/06/2009 |
Try something like htmlpurifier.org.
|