I am completely new to CKEditor and I run a site where each user has a directory in /Users/<ID>/ with a file body.htm. Ex C:\inetpub\wwwroot\users\1\body.htm. How would I open that file in the editor in an edit page with the id set as $id. Please help I read the documentation and I don't know how to do anything like this.
Sat, 06/15/2013 - 05:14
#1
You should name the htm file
You should name the htm file id.htm instead of body.htm
So for the user with id=1, the htm file should be 1.htm
Thats not what I meant, I'm
Thats not what I meant, I'm sorry I did not go into further detail. The editor is kept in /edit/ckeditor/ and the user page called body.htm is kept in /users/<ID>/. In the PHP script that calls the editor the user id is set as $id and is kept in /edit/. I have no idea how to open a file in CKEditor using PHP and no idea how to go back to root and go forward two directories and open a file called body.htm.
There are some pictures of my folder structure attached. Notice that the top window is a subfolder of root ex. /Users/
users.jpg is the users directory and editorpic.jpg is the editor directory.
Attachments:
I'm not sure I understand all
I'm not sure I understand all you want to do, but wouldn't it be better to store the information for each user and the attached contents in a database table like MySQL?
Then after logging in via your mainpage.php he/she would be taken to a page e.g.
mainpage.php?userid=1
Use inline editing in that page and save changes automatically to the database.
Simpler Form
The function of this website is to be a social network and I don't know if this will suit my needs. In simpler form my question is how to open a htm file in the editor in a different directory.
CKEditor doesn't "open files"
CKEditor doesn't "open files". It's a replacement for a textarea, a client side widget.
It's your job to create the server scripts that take care of feeding the editor with its initial contents as well as taking care of saving back them afterwards.