Site maintenance: Sun 15 Nov, from 20:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Text Editor Plugin

Started by cygnusx on 26 Feb 2013, 6:03 PM · Views: 1,599

Results 1 to 19 of 19
26 Feb 2013, 6:03 PM
#1
cygnusx avatar

cygnusx

New Zenner

Join Date:
Dec 2012
Posts:
10
Plugin Contributions:
0

Text Editor Plugin

Hi there,

quite new here and not that skilled at installing things on a PC, and I'm stuck with this one:

I have downloaded Zen Cart v1.5.0 and started working on my future website, but Zen Cart only came with 'Plain Text' as text editor package, which is not really letting me do much. I need something TinyMCE.

A bit of searching on the Internet informed me that I'd better integrate CKEditor to Zen Cart. Downloading CKEditor onto my PC was easy, but what to do next with this .Zip file???

Does it need to be decompressed and 'garaged' into my FTP ? If so where in FTP? How is the integration done?

Hope someone here can help. Thanks!

26 Feb 2013, 6:12 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Text Editor Plugin

Un-zip it locally and read the readme.html file

Zen-Venom Get Bitten

27 Feb 2013, 10:09 AM
#3
cygnusx avatar

cygnusx

New Zenner

Join Date:
Dec 2012
Posts:
10
Plugin Contributions:
0

Re: Text Editor Plugin

Kobra,

Many thanks for your answer. I've followed the steps given in the read-me file, but it still does not give me access to anything else that Plain Text... I must say I'm a bit confused by the upload onto your computer part, which is probably where my problem is. I've opened up the zip file, used FTP to upload the various php files and folders. However within my FTP, both folders public_html and zenadmin (a sub-folder of public_html) have 'includes' subfolders, 'init_includes' sub-sub folders and 'overrides' sub-sub-sub folders. Both also have 'Languages' sub-folders, 'English' sub-sub folders and 'extra-definitions' sub-sub-sub folders. But there's only one 'Editors' sub-folder located within public_html. So I guess the main bulk of the software, the ckeditor folder must go in public_html/editors. I've tried installing the three php files in both public_html and zenadmin and then in both at the same time, and nothing seems to make a change as far as Text Editor is concerned on my website... Any idea what I am doing wrong?

27 Feb 2013, 4:39 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Text Editor Plugin

Any idea what I am doing wrong?
Not a clue...
There are only two folders in this plugin "editors" and "admin"
both folders public_html and zenadmin (a sub-folder of public_html) have 'includes' subfolders
Copied from the instructions
/admin/includes/ckeditor.php goes to your website into your existing /renamed-admin/includes/ folder.
/admin/includes/languages/english/extra_definitions/editors_list.php replaces your existing /renamed-admin/includes/languages/english/extra_definitions/editors_list.php file.
/admin/includes/languages/english/extra_definitions/ckeditor.php is added to your /renamed-admin/includes/languages/english/extra_definitions/ folder
/editors/ckeditor/ (the entire folder) gets copied to your /editors/ folder
Note that all reference your Re-named admin folder

Zen-Venom Get Bitten

27 Feb 2013, 5:39 PM
#5
cygnusx avatar

cygnusx

New Zenner

Join Date:
Dec 2012
Posts:
10
Plugin Contributions:
0

Re: Text Editor Plugin

yes, I had seen that 'Re-named admin folder', Kobra... But where is it?

27 Feb 2013, 5:40 PM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Text Editor Plugin

But where is it?
It is whatever you have renamed it

Zen-Venom Get Bitten

27 Feb 2013, 5:50 PM
#7
cygnusx avatar

cygnusx

New Zenner

Join Date:
Dec 2012
Posts:
10
Plugin Contributions:
0

Re: Text Editor Plugin

I can not see any such 'renamed admin' folder anywhere on FTP... Am I trying to upload this plugin onto the wrong place? I mean, is it not meant to go into the FTP?

27 Feb 2013, 5:51 PM
#8
cygnusx avatar

cygnusx

New Zenner

Join Date:
Dec 2012
Posts:
10
Plugin Contributions:
0

Re: Text Editor Plugin

I must be really dumb... What should I have renamed?

27 Feb 2013, 5:52 PM
#9
cygnusx avatar

cygnusx

New Zenner

Join Date:
Dec 2012
Posts:
10
Plugin Contributions:
0

Re: Text Editor Plugin

First time ever I'm doing this, you see..

27 Feb 2013, 6:13 PM
#10
cygnusx avatar

cygnusx

New Zenner

Join Date:
Dec 2012
Posts:
10
Plugin Contributions:
0

Re: Text Editor Plugin

Ok, so I found this, which is I suppose the step I missed along the way while setting up my website so far:

*While access to your admin area is protected by the requirement of your admin password, it is recommended for additional security that you rename your admin directory after installation. This way, it will be significantly harder for hackers to find your admin area or attempt any attack on breaking into it.

(Before making the following changes, make sure to have a current backup of your files and your database.)

You're going to do three steps: A) edit the configure.php settings and upload them, B) rename the admin folder, C) test login to the new folder.
Details are below:
Zen Cart v1.5.x:
A - configure.php - If you are using v1.5, go to step B. If you are using v1.3.x, see the next section below which explains how to edit this file properly.

There is no need to alter the admin configure.php in v1.5.x when renaming your admin folder. Simply proceed to step B.
B - Rename the Admin folder

Using your FTP software or your webhost's File Manager, find your Zen Cart /admin/ directory. Rename the directory to match the settings you just made in step A.

NOTE: DO NOT advertise this new foldername, else you defeat the entire purpose of renaming it. And DO NOT EVER put it in your robots.txt file!
C - Login to your admin using the new URL

To login to your admin system you will now have to visit a new URL that matches the new name used in steps A and B above.

For example instead of visiting https://www.example.com/admin/ visit https://www.example.com/NeW-NamE4u/*

That is still confusing to me. Other than the fact I do not know where my sdmin folder is, this set of instructions tells me that with V1.5.x (I'm using 1.5.0) I can skip step A, and go directly to step B. But, in step B, then, what does this mean: "Rename the directory to match the settings you just made in step A." ??? I thought I had to skip step A?? I just do not get it, Kobra..

28 Feb 2013, 9:42 PM
#11
cygnusx avatar

cygnusx

New Zenner

Join Date:
Dec 2012
Posts:
10
Plugin Contributions:
0

Re: Text Editor Plugin

Not sure if this is the best place in the forum to place this call for help, but is is relevant to my initial problem, that of adding a ckeditor plugin to have text editor options into my zencarted website...

Let me make this plain, this is my very first website build and I'm confused at best. The ckeditor files need uploading onto two distinct folders: renamed-admin/ and editors/ as seen in the ckeditor instructions:

/admin/includes/ckeditor.php goes to your website into your existing /renamed-admin/includes/ folder.
/admin/includes/languages/english/extra_definitions/editors_list.php replaces your existing /renamed-admin/includes/languages/english/extra_definitions/editors_list.php file.
/admin/includes/languages/english/extra_definitions/ckeditor.php is added to your /renamed-admin/includes/languages/english/extra_definitions/ folder
/editors/ckeditor/ (the entire folder) gets copied to your /editors/ folder

I've now learned that a folder called admin/ should (must??) be renamed in order to decrease chances of hacking, as explained here:

While access to your admin area is protected by the requirement of your admin password, it is recommended for additional security that you rename your admin directory after installation. This way, it will be significantly harder for hackers to find your admin area or attempt any attack on breaking into it.

Now, what admin folder are we talking about here? Where is it? Is it in my webhosting cPanel? In Zencart, and if so where within? or else? Then is the editors/ folder mentionned in the ckeditor instructions to be found nearby the admin/ or renamed-admin/ folder?

The instructions I found to change, or rename this admin/ folder are nevertheless quite confusing to me:

*(Before making the following changes, make sure to have a current backup of your files and your database.)

You're going to do three steps: A) edit the configure.php settings and upload them, B) rename the admin folder, C) test login to the new folder.
Details are below:
Zen Cart v1.5.x:
A - configure.php - If you are using v1.5, go to step B. If you are using v1.3.x, see the next section below which explains how to edit this file properly.

There is no need to alter the admin configure.php in v1.5.x when renaming your admin folder. Simply proceed to step B.
B - Rename the Admin folder

Using your FTP software or your webhost's File Manager, find your Zen Cart /admin/ directory. Rename the directory to match the settings you just made in step A.

NOTE: DO NOT advertise this new foldername, else you defeat the entire purpose of renaming it. And DO NOT EVER put it in your robots.txt file!
C - Login to your admin using the new URL

To login to your admin system you will now have to visit a new URL that matches the new name used in steps A and B above.

For example instead of visiting https://www.example.com/admin/ visit https://www.example.com/NeW-NamE4u/ *

As I'm using ZenCart v1.5.0, I can pass step A, but step B says 'rename the directory to match the settings you just made in stap A'..! I don't get it. Can someone tell me if, 1. re-naming the elusive admin/ folder is really necessary, 2. how do you go about renaming said folder following the instructions as above, which seem contradictory...

Thanks!

28 Feb 2013, 10:09 PM
#12
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Text Editor Plugin

As I'm using ZenCart v1.5.0

There is no need to alter the admin configure.php in v1.5.x when renaming your admin folder. Simply proceed to step B.
B - Rename the Admin folder

You should not have had to do step "A"

Zen-Venom Get Bitten

28 Feb 2013, 10:55 PM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Text Editor Plugin

CygnusX:

yes, I had seen that 'Re-named admin folder', Kobra... But where is it?
You already have the answer to your question:

CygnusX:

but Zen Cart only came with 'Plain Text' as text editor package,
If you've logged into your admin and found the "Plain Text" option, then obviously you already know what folder your admin files are located in ... because that's the folder in the URL/address bar of your browser. Yes, the URL you used in order to login to your admin.

Obviously you're confused about the "renaming" part, because you have no idea why the "rename" was ever necessary, because you've apparently used a "one-click install" to blast Zen Cart onto your site. If you had done a manual installation by obtaining original Zen Cart files by downloading the installation zip, uploading the files to your server and running the installation process, then you would know exactly what the "renamed-admin" part is all about. The original distribution zip contains a folder named "admin". And, since ANYONE can find out that information, it also means a hacker could INSTANTLY know what your admin URL is, and therefore could try to brute-force access to your admin password, etc. But, by renaming it to something YOU choose, it adds a layer of obscurity which will usually send the casual hacker away to find something simpler to crack rather than having to work hard to guess what you renamed it to.

So, since you've been insulated from all that, it's really simple: the URL you use to login to your Admin area contains the "renamed-admin" folder into which you must upload the corresponding files.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Mar 2013, 10:09 PM
#14
cygnusx avatar

cygnusx

New Zenner

Join Date:
Dec 2012
Posts:
10
Plugin Contributions:
0

Re: Text Editor Plugin

Kobra and DrByte,

many thanks for your help. I have uploaded the ckeditor files onto my admin folder as directed by the readme file included within the ckeditor zip package. When I log into ZenCart, though, I still only have Plain Text as sole option in my Text Editor drop-down box (for instance in my define_main_page.php)...

So obviously something is still wrong. As mentionned, I used the instructions given within the ckeditor zip file, but I noticed that Kobra gave me a set of instructions that is slightly different, with one file (editors_list.php) that did not come with my ckeditor zip file. Instead, my instructions refer to a file called init_html_editors.php, which was duly included in the ckeditor zip file...

Kobra's instructions also say that editor_list.php should REPLACE a similarly-named file in my admin folder (as opposed to all other actions, COPIED, GOES TO and ADDED TO). I can see in the FTP 'windows' that I now have both a pre-existing editor_list.php file and a just uploaded ckeditor.php (the smaller of two similarly-named file I found in the ckeditor zip file) inside the admin/includes/languages/english/extra_definitions folder. Should I delete the pre-existing editor_list.php file??

For reference, my instructions say that the extra file I have (to be used only for v.1.5.0), init_html_editors.php (that does not appear in the instructions given by Kobra) GOES INTO an admin/includes/init_includes/overrides folder.

Any further help would be greatly appreciated!

7 Mar 2013, 2:19 PM
#15
cygnusx avatar

cygnusx

New Zenner

Join Date:
Dec 2012
Posts:
10
Plugin Contributions:
0

Re: Text Editor Plugin

As I am stuck doing any work on my website because of the above problem, can anyone tell me whether or not I will lose any text added with using 'Plain Text' once I do manage to get ckeditor to work? If not, I could already add things to my website!

Thanks.

7 Mar 2013, 7:32 PM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Text Editor Plugin

CygnusX:

can anyone tell me whether or not I will lose any text added with using 'Plain Text' once I do manage to get ckeditor to work? If not, I could already add things to my website!

"Plain Text" mode simply uses no special editor. It lets you enter raw HTML exactly as you want it to be on the page.
Using any other editor simply adds enhanced features to aid you in adding markup such as bold or line breaks etc, so will simply augment the process. It's just another way of looking at and updating the same data.

So, generally speaking, there should be no "loss" in what you describe.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Mar 2013, 10:26 PM
#17
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Text Editor Plugin

Look at:

ADMIN CONSOLE >>> CONFIGURATION >>> MY STORE >>> HTML Editor (Second from the bottom of the list).

Make your choice...

20 years a Zencart User

7 Mar 2013, 10:31 PM
#18
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Text Editor Plugin

Installing Ck Editor takes literally 45 seconds...

You UNZIP the module on your hard drive.

Once unzipped, you see:

ADMIN
EDITORS
readme.html

Simply RENAME the admin folder to whatever your admin folder is called:

YOUR_ADMIN
EDITORS

And then just port BOTH FOLDERS via FTP.

No need to open them up...

When prompted to OVERWRITE existing files, choose YES...

FTP will begin and depending on your bandwidth should take a minute or two.

Then, do as I say in my post above.

20 years a Zencart User

7 Mar 2013, 10:42 PM
#19
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Text Editor Plugin

Take a look at my FTP system...

Attachment 12097

Bear in mind the NAME of your ADMIN folder will not be "Admin"...

20 years a Zencart User