|
|
|
|
|
|
| Re: Modifying the Editor/Formatter for Private Messages [message #4550 is a reply to message #4549] |
Tue, 27 July 2010 02:57   |
|
Was not ment to be rude so if it came off that way Im sorry.
I answered you on the flie as I was headed out the door.
You asked how to add something that was in 1.0 and not in 2.0
1.0 used a add on editor FCK editor which has More problems then
It was worth
#1 load time for any page that used it was to long
#2 added a bunch of un wanted carictors to each descriptions.
#3 allow users to add Java and flash to descriptions.
#4 bloated the files needed to add it to the system.
PMBT uses a internal editor wich in order to edit it you only have to edit one file
textarea.php
In order to add FCK editor back in you would have to get fck editor from 1.0 and add it to 2.0 files Then you would have to edit all
the files that have the editor in it
[Updated on: Tue, 27 July 2010 02:59] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: Modifying the Editor/Formatter for Private Messages [message #4669 is a reply to message #4631] |
Thu, 05 August 2010 18:35   |
watermolecule  Messages: 109 Registered: July 2010 |
Super-Seeder |
|
|
It seems secure enough. Basically all I did was take the FCKeditor folder from PMBT 1.0 and copy it into my PMBT 2.0 root. I then opened up the appropriate php files (like /upload/torrent.php and /ipload/link.php) and added the following code:
//added the require code to load up the FCK functions
require_once("FCKeditor/fckeditor.php");
//Added this. Is it the Javascript for FCKeditor ??
echo <<<EOF
<script type="text/javascript" language="JavaScript">
function expand() {
var i=1;
var obj;
var check = document.getElementById("adv_check");
while (obj = document.getElementById("advanced_options_"+i)) {
if (check.checked == false) {
obj.className = 'hide';
} else {
obj.className = 'show';
}
i++;
}
}
</script>
EOF;
//Commented out the editor from 2.0
//echo $textarea->quick_bbcode('formdata','descr');
//echo $textarea->input('descr');
//echo "</table><br />\n";
//Added the FCKeditor
$oFCKeditor = new FCKeditor('descr') ;
$oFCKeditor->BasePath = 'FCKeditor/';
$oFCKeditor->Value = "";
$oFCKeditor->Height = 350 ;
$oFCKeditor->Create();
I also did this: http://www.phpmybittorrent.com/forum/index.php/m/723/540/?sr ch=fckeditor+upload#msg_723
so people can upload photos and they go to a folder I designated for photo uploads on my server.
[Updated on: Thu, 05 August 2010 23:47] by Moderator Report message to a moderator
|
|
|
|
|