Members   Search      Help    Register    Login    Home
Home » Support Forums for PMBT 2.X » General Help for 2.X » Modifying the Editor/Formatter for Private Messages
Modifying the Editor/Formatter for Private Messages [message #4539] Sat, 24 July 2010 23:43 Go to next message
watermolecule is currently offline watermolecule  United States
Messages: 109
Registered: July 2010
Super-Seeder
How can I change the editor/formatter that is found in the private message section? *I have a picture attached so that you can see what I am referring to*

I have seen different versions of this editor on other PMBT powered sites...

Thanks
  • Attachment: editor.rar
    (Size: 18.54KB, Downloaded 41 times)
Re: Modifying the Editor/Formatter for Private Messages [message #4543 is a reply to message #4539] Mon, 26 July 2010 07:00 Go to previous messageGo to next message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
the Older PMBT used FCK editor which had far to many problems.
and even at that the editor has always Been the same editor for all
text's blocks IE (PM's, Torrent details)
How did you want to change it?


http://a.imageshack.us/img831/5562/mybikes.png
Re: Modifying the Editor/Formatter for Private Messages [message #4545 is a reply to message #4543] Mon, 26 July 2010 07:08 Go to previous messageGo to next message
watermolecule is currently offline watermolecule  United States
Messages: 109
Registered: July 2010
Super-Seeder
I really like the editor used on this site:
http://onebigtorrent.org/upload.php?op=link
Re: Modifying the Editor/Formatter for Private Messages [message #4546 is a reply to message #4545] Mon, 26 July 2010 12:38 Go to previous messageGo to next message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
then down grade to 1.0

http://a.imageshack.us/img831/5562/mybikes.png
Re: Modifying the Editor/Formatter for Private Messages [message #4547 is a reply to message #4539] Mon, 26 July 2010 15:53 Go to previous messageGo to next message
watermolecule is currently offline watermolecule  United States
Messages: 109
Registered: July 2010
Super-Seeder
Look, I really appreciate all the help you have given me, but I must say that comment was obviously non-feasible and I can't help but feel that it has a tinge of rudeness to it as well.

I am simply asking where the rich-text editor for pmbt is stored / how one could go about replacing the current rich text editor.

I am sure you are familiar with rich-text editors? I showed you a photo and gave you an example of one that had better functionality. But if that is not enough: http://www.webdesignerdepot.com/2008/12/20-excellent-free-ri ch-text-editors/
Re: Modifying the Editor/Formatter for Private Messages [message #4549 is a reply to message #4547] Mon, 26 July 2010 18:04 Go to previous messageGo to next message
watermolecule is currently offline watermolecule  United States
Messages: 109
Registered: July 2010
Super-Seeder
In torrents.php (within the 'upload' directory) there are two lines of code I think are pertinent, but I don't exactly know what is going on behind the scenes:

a) echo $textarea->quick_bbcode('formdata','descr');
b) echo $textarea->input('descr');

So the code on line a) seems like it may be loading up a rich-text editor and the code on line b) seems like it is taking the input of the text and placing into the torrent's description. Thing is, I don't get what quick_bbcode is or where it is coming from. Anyway, any help would be appreciated. I loaded up the nicEdit rich text formatter on my server and would like to use it.

Thanks again
Re: Modifying the Editor/Formatter for Private Messages [message #4550 is a reply to message #4549] Tue, 27 July 2010 02:57 Go to previous messageGo to next message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
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


http://a.imageshack.us/img831/5562/mybikes.png

[Updated on: Tue, 27 July 2010 02:59]

Report message to a moderator

Re: Modifying the Editor/Formatter for Private Messages [message #4553 is a reply to message #4550] Wed, 28 July 2010 21:32 Go to previous messageGo to next message
watermolecule is currently offline watermolecule  United States
Messages: 109
Registered: July 2010
Super-Seeder
Sorry if I jumped the gun, and thanks again for all that you do: once I get done with the site and everything is up I plan to help you guys out for all your work. Smile

So, I've decided to use the old FCK editor from 1.0 because it looks cleaner than the editor implemented in 2.x and also doesn't load all those popup windows.

I've downloaded 1.0 final and copied the FCKeditor folder onto my server and am in the process of updating my 2.0 files to use the FCK editor. Any help would be appreciated (like telling me which files have editors that need to be replaced - i.e. torrent.php within the 'upload' folder - and explaining what code needs to be replaced with what).

take care
Re: Modifying the Editor/Formatter for Private Messages [message #4554 is a reply to message #4553] Wed, 28 July 2010 22:33 Go to previous messageGo to next message
watermolecule is currently offline watermolecule  United States
Messages: 109
Registered: July 2010
Super-Seeder
So far I think I've figured out that the rich-text editor is used in torrent.php, link.php and pm.php.

In torrent.php I added this to the beginning of the file:
//-----------------------------]
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;
//-----------------------------]

I then did this:

//-----------------------------]
//Text Area starts here
//old editor
//echo $textarea->quick_bbcode('formdata','descr');
//echo $textarea->input('descr');
//echo "</table><br />\n";
//FCKeditor
echo "</p></td><td>";
$oFCKeditor = new FCKeditor('descr') ;
$oFCKeditor->BasePath = 'FCKeditor/';
$oFCKeditor->Value = "";
$oFCKeditor->Height = 350 ;
$oFCKeditor->Create();

//Text Area ends here
//------------------------------]

Unfortunately, I get an error message saying this:
"Fatal error: Class 'FCKeditor' not found in /home/jlar0che/currentperspectives.org/torrents/upload/torre nt.php on line 82"

I guess it doesn't know, but I uploaded the 'FCKeditor' folder to the root of my torrent site (where the other phpMyBitTorrent files are)... The fckeditor.php file that defines the FCKeditor Class is in there...
Re: Modifying the Editor/Formatter for Private Messages [message #4555 is a reply to message #4554] Thu, 29 July 2010 00:03 Go to previous messageGo to next message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
No Message Body

http://a.imageshack.us/img831/5562/mybikes.png
Re: Modifying the Editor/Formatter for Private Messages [message #4585 is a reply to message #4555] Sat, 31 July 2010 17:52 Go to previous messageGo to next message
watermolecule is currently offline watermolecule  United States
Messages: 109
Registered: July 2010
Super-Seeder
Hello?
Re: Modifying the Editor/Formatter for Private Messages [message #4590 is a reply to message #4585] Sun, 01 August 2010 00:42 Go to previous messageGo to next message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
your missing
require_once("FCKeditor/fckeditor.php");


http://a.imageshack.us/img831/5562/mybikes.png
Re: Modifying the Editor/Formatter for Private Messages [message #4593 is a reply to message #4590] Sun, 01 August 2010 00:59 Go to previous messageGo to next message
watermolecule is currently offline watermolecule  United States
Messages: 109
Registered: July 2010
Super-Seeder
Added it and the editor loaded up. I will do some more testing and let you know if it works fully. THANKS!!
Re: Modifying the Editor/Formatter for Private Messages [message #4594 is a reply to message #4593] Sun, 01 August 2010 01:46 Go to previous messageGo to next message
watermolecule is currently offline watermolecule  United States
Messages: 109
Registered: July 2010
Super-Seeder
How do I change the buttons on the editor? I changed the buttons in the fckconfig.js file for the "Default" ToolBarSet, but that didn't do anything. Tried making a new ToolBarSet and that didn't work either. Is this thing picking up the buttons from someplace I am overlooking?

Re: Modifying the Editor/Formatter for Private Messages [message #4595 is a reply to message #4594] Sun, 01 August 2010 02:01 Go to previous messageGo to next message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
I realy could not say how its doing it.
I was to much hasle for me thats Y I created the PMBT editor wich puts every thing in one file for editing.


http://a.imageshack.us/img831/5562/mybikes.png
Re: Modifying the Editor/Formatter for Private Messages [message #4602 is a reply to message #4539] Sun, 01 August 2010 03:22 Go to previous messageGo to next message
watermolecule is currently offline watermolecule  United States
Messages: 109
Registered: July 2010
Super-Seeder
According to this post : http://www.phpmybittorrent.com/forum/index.php/m/723/540/?sr ch=fckeditor#msg_723
I am doing everything right. So I'm thinking the buttons I have set up may not be loading due to some other configuration settings. Since I implemented FCKeditor into 2.0 I may have missed something simple - just like that "require_once("FCKeditor/fckeditor.php");" code. Any ideas?
Re: Modifying the Editor/Formatter for Private Messages [message #4617 is a reply to message #4602] Mon, 02 August 2010 01:59 Go to previous messageGo to next message
watermolecule is currently offline watermolecule  United States
Messages: 109
Registered: July 2010
Super-Seeder
Seems like I just needed to wait a while until the changes propagated - The buttons work now and the submit works perfectly.

I just can't seem to get the image uploading to work. If anyone has experience with the image uploading in the FCKeditor I would like to hear from you!

Thanks in advance!
Re: Modifying the Editor/Formatter for Private Messages [message #4619 is a reply to message #4617] Mon, 02 August 2010 03:30 Go to previous messageGo to next message
watermolecule is currently offline watermolecule  United States
Messages: 109
Registered: July 2010
Super-Seeder
Scratch that - I got it 100% working. If anyone is interested in implementing the FCKeditor in PMBT 2.x please let me know.
Re: Modifying the Editor/Formatter for Private Messages [message #4631 is a reply to message #4539] Tue, 03 August 2010 12:51 Go to previous messageGo to next message
Daffy is currently offline Daffy  United Kingdom
Messages: 359
Registered: October 2009
Location: uk
Releaser

how secure is it, how does it run and can we have a screenshot of it working bud. cheers.

Re: Modifying the Editor/Formatter for Private Messages [message #4669 is a reply to message #4631] Thu, 05 August 2010 18:35 Go to previous messageGo to next message
watermolecule is currently offline watermolecule  United States
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

Re: Modifying the Editor/Formatter for Private Messages [message #4677 is a reply to message #4669] Thu, 05 August 2010 23:50 Go to previous messageGo to next message
Daffy is currently offline Daffy  United Kingdom
Messages: 359
Registered: October 2009
Location: uk
Releaser

thanks for the info.

Quote:

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.


pmbt2.xx already has a bitbucket. once a user uploads a pic to it, they get there own directory for images. good work on porting hack from 1.x to 2.x


Re: Modifying the Editor/Formatter for Private Messages [message #4683 is a reply to message #4677] Fri, 06 August 2010 23:40 Go to previous message
watermolecule is currently offline watermolecule  United States
Messages: 109
Registered: July 2010
Super-Seeder
thanks
Previous Topic:offline users
Next Topic:installation error
Goto Forum:
  


Current Time: Wed Feb 08 21:33:17 GMT 2012

Total time taken to generate the page: 0.00925 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software