Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Tynimce Editor


Recommended Posts

Good morning everyone!

 

It is quite a while that I worked with oscommerce and so much has changed that could need some help :)

 

I like to install a html editor to edit my Article description and the language docs like conditiones, shipping etc....

 

well the install.txt for tynimce sounds really easy but I have problems to follow it. It says:

------------------------------------------------------------

on catalog/admin/categories.php

 

find </head>

Add before That:

 

<script language="javascript" type="text/javascript" src="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN; ?>tinymce/jscripts/tiny_mce/tiny_mce.js"></script>

<script type="text/javascript" src="includes/tiny.js"></script>

 

-------------------------------------------------------------------------------

 

NEXT... upload the files

 

That's it.

 

---------------------------------------------------

 

BUT I SIMPLY HAVE NO </head> IN MY FILE :'(

I have oscommerce 2.3.1 installed

 

I do hope you can save me from going crazy :)

Thank you all for helping!

Link to comment
Share on other sites

Great so its not only me :'(

 

I have been fighting with this for a couple of days -

 

Hopefully an answer will be forthcoming.

 

my code:

-------------------------------------------------------------------------------

<script language="javascript" type="text/javascript" src="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN; ?>tinymce/jscripts/tiny_mce/tiny_mce.js"></script>

<script language="javascript" type="text/javascript">

tinyMCE.init({

mode : "textareas",

theme : "advanced",

plugins : "table,save,autosave,autosave,cleanup,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu,directionality,inlinepopups,media,nonbreaking,visualchars,devkit,paste,noneditable,layer,fullpage,fullscreen,",

theme_advanced_buttons1_add_before : "save,separator,",

theme_advanced_buttons1_add : "fontselect,fontsizeselect",

theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",

theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator",

theme_advanced_buttons3_add_before : "tablecontrols,separator",

theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print,ltr,rtl",

theme_advanced_buttons4_add_before : "visualchars,nonbreaking,devkit,separator,layer,fullpage,fullscreen",

table_styles : "Header 1=header1;Header 2=header2;Header 3=header3",

table_cell_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Cell=tableCel1",

table_row_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1",

table_cell_limit : 100,

table_row_limit : 5,

table_col_limit : 5,

theme_advanced_toolbar_location : "top",

theme_advanced_toolbar_align : "left",

theme_advanced_path_location : "bottom",

plugin_insertdate_dateFormat : "%Y-%m-%d",

plugin_insertdate_timeFormat : "%H:%M:%S",

extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",

external_link_list_url : "example_data/example_link_list.js",

external_image_list_url : "example_data/example_image_list.js",

flash_external_list_url : "example_data/example_flash_list.js"

});

</script>

Edited by Weberati
Link to comment
Share on other sites

  • 2 weeks later...

Well, I was so happy to see the tiny buttos of the Editor that I did not test it - now that I try to add a content I figured out that I must have done anything wrong:

When I go to tools and select Define languages and then for example the conditons.php:

 

There is a sample test coming from the german-language-package I have "installed" When I click on Conditons in the frontend - it works fine, I see the sample text but If I change it to my own text - it shows the text right above my header in the left corner of my screen.

At the place where it should be - the contentpart of the shop - i see just:

HEADING_TITLE

TEXT_INFORMATION

 

If I click at the editor on html I see

<!--?php 
/*
 $Id: conditions.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

define('NAVBAR_TITLE', 'Conditiones');
define('HEADING_TITLE', 'Conditiones');

define('TEXT_INFORMATION', '<b-->
<p>my text</p>
<p>Impressum<br /> Christian Vater<br /> Straße<br /> Ort '); ?></p>

 

Also when I open my conditon.php with the ftp program I cant see the text I added - and it I add a text with the edtior of the ftp program and save it - I does not appear in the editor of the shop.

 

I hope you can help me again :'(

Link to comment
Share on other sites

I do not use the stock define language to setup my conditions, shipping, ect....

 

Open your admin/includes/template_top.php

 

Where you added:

 if ((TINYMCE_USE == 'true') && (!strstr($PHP_SELF,FILENAME_REVIEWS))) {

 

change to:

 if ((TINYMCE_USE == 'true') && (!strstr($PHP_SELF,FILENAME_REVIEWS))&& (!strstr($PHP_SELF,FILENAME_DEFINE_LANGUAGE))) {

 

This will make it so the editor is not used in the define language file. Thats the easiest solution anyways...

 

It's a possibility, that instead of doing what I just said, that you can make your changes with the editor, and then click the 'view source' button (i think thats what it says, I dont have the editor up in front of me), and make the changes you need to manually to make it work.

Link to comment
Share on other sites

Hello! Thank you for trying to help me!

 

If I changed the line in template_top.php I got only a wight page when I try to login to admin.

 

And If I try to edit it manualy with the view source ... it does not change anything.... I still get the text in my left corner outside the content area...........

 

I try to edit Products with it - and that works fine - no problems there........

Link to comment
Share on other sites

If I add the text with the editor of my ftp progamm - then the text is on the content positon but if I try to edit it then over the admin - in define languages - the text is not there - in the text field - only when I click on view source.....

Link to comment
Share on other sites

Hello! Thank you for trying to help me!

 

If I changed the line in template_top.php I got only a wight page when I try to login to admin.

 

Then you didn't edit the file correctly.....

 

And If I try to edit it manualy with the view source ... it does not change anything.... I still get the text in my left corner outside the content area...........

 

I try to edit Products with it - and that works fine - no problems there........

 

As near as I can tell, you won't be able to use the editor with the define_languages.php thing. You need to turn it off with the directions I gave you. I personally use a mod called Informations Pages Unlimited, that way I can use a wysiwyg. Short of that, I would use a html editor, and then paste what I created into the conditions.php file. For instance...

 

<?php
/*
 $Id$

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

define('NAVBAR_TITLE', 'Conditions of Use');
define('HEADING_TITLE', 'Conditions of Use');
define('STORE_LOCATION', 'Louisiana');

define('TEXT_INFORMATION', '
<p><font face="Arial, Helvetica, sans-serif" size="2"> Welcome to our online store! 
' . STORE_NAME . ' and its associates provide their services to you subject to the following 
conditions. If you visit or shop within this website, you accept these conditions. 
Please read them carefully.</font></p> ...
');
?>

 

Paste what you need in between the define('TEXT_INFORMATION', ' and the '); Keeping in mind any apostrophes used need to be changed to \', i.e. don't becomes don\'t.

Link to comment
Share on other sites

If I add the text with the editor of my ftp progamm - then the text is on the content positon but if I try to edit it then over the admin - in define languages - the text is not there - in the text field - only when I click on view source.....

 

yup, I tried on my 2.3.1 site, and it is that same way.... You won't be able to use a wysiwyg with the define_languages.php thingy.

Link to comment
Share on other sites

Sorry for my lack of english but do I get you right that I have two possible ways:

 

1. Install the Information Pages Unlimited v1.0 so that I can use the TinyMCE and edit my files via Admin - Tools - Define Languages

 

or

 

2. Edit my text in a html editor and copy it into my file

 

I thing I do like the first way better,.... I'll try that - well I hope I can do that but I'll give it a try :)

Link to comment
Share on other sites

:wub: Wonderful!

I tried to make all changes but in the first step I have some troubles:

 

I do not have this line in my admin/includes/database_tables.php

define('IMAGE_NEW_NEWSLETTER', 'New Newsletter');

 

so I add the

 

// BOF: Information Pages Unlimited

define('IMAGE_NEW_PAGE', 'New Page');

// EOF: Information Pages Unlimited

 

just before the

// BOF: Information Pages Unlimited

define('TABLE_INFORMATION', 'information');

define('TABLE_INFORMATION_GROUP', 'information_group');

// EOF: Information Pages Unlimited

 

I had no other problems to find the code and add or replace as you describe.

 

In the administration tool I see the information tool and if I click on Information pages I can create a new site and edit but if I do so my Frontend is only a white site again - Also I can not edit exiting pages? Hm, I will backup and try again this evening maybe I overlooked something.

 

And I'am not quite sure what this means: If a Parent page is required you will need to add one after creating this entry

 

:sweating:

I did not think that it is so complicated to get an editor working :)

Link to comment
Share on other sites

:wub: Wonderful!

I tried to make all changes but in the first step I have some troubles:

 

I do not have this line in my admin/includes/database_tables.php

define('IMAGE_NEW_NEWSLETTER', 'New Newsletter');

 

so I add the

 

// BOF: Information Pages Unlimited

define('IMAGE_NEW_PAGE', 'New Page');

// EOF: Information Pages Unlimited

 

just before the

// BOF: Information Pages Unlimited

define('TABLE_INFORMATION', 'information');

define('TABLE_INFORMATION_GROUP', 'information_group');

// EOF: Information Pages Unlimited

 

I will have to modify the instruction, I put that code in the incorrect place. :blush:

 

You need to do the following in admin/includes/languages/your-language.php

Find:

define('IMAGE_NEW_NEWSLETTER', 'New Newsletter');

 

AFTER add:

 

// BOF: Information Pages Unlimited

define('IMAGE_NEW_PAGE', 'New Page');

// EOF: Information Pages Unlimited

 

So remove that code from admin/includes/database.php and add it in your language file..

 

I had no other problems to find the code and add or replace as you describe.

 

In the administration tool I see the information tool and if I click on Information pages I can create a new site and edit but if I do so my Frontend is only a white site again - Also I can not edit exiting pages? Hm, I will backup and try again this evening maybe I overlooked something.

 

And I'am not quite sure what this means: If a Parent page is required you will need to add one after creating this entry

 

:sweating:

I did not think that it is so complicated to get an editor working :)

 

Did it happen when you created a new page in Information Manager /Information Manager, or when you edited something in Information Manager / Welcome message section?

 

Are you using english or a different language?

Edited by SLiCK_303
Link to comment
Share on other sites

Ok, I made a backup and install it again by following your instruction and the changes with the database.php.

 

The frontend is still working after that except that no sites are shown in the information box.

Now, in the admin I see the info manager with two options (Information Pages and Welcome message)

If I click on Information pages I can create a new page - but there are no existing pages.... think that should be that way....

If I click on Welcome message the button for "new page" is not there - only a cancel button . . . so I can not add a text

 

When I click on new page in information pages I can Enter a title and a description - if I do so and klick on save I get a whit pages - no errors. The path is catalog/admin/information_manager.php?information_action=AddSure

When I now go to catalog/admin again and then to the infoManager/information pages - I can see the new site there!

Also can edit the text now and it shows the text correct at the front end (maybe I overlooked something - when I installed it first)

 

So the only problems left is that I can not create a welcome text and that I allways end up with a withe page and need to go back to catalog/admin......(well I could live with the withe page but maybe it is just a small mistake I made?)

 

I use German as language.

 

Thank you for your patient :)

Link to comment
Share on other sites

Ok, I made a backup and install it again by following your instruction and the changes with the database.php.

 

The frontend is still working after that except that no sites are shown in the information box.

 

When you first install the mod, the only thing you will see in the info box on the frontend is a contact us link. If you don't see that something is wrong right off the bat. After you goto the info manager, and add a new page, the title of that should show before the contact us link.

 

Now, in the admin I see the info manager with two options (Information Pages and Welcome message)

If I click on Information pages I can create a new page - but there are no existing pages.... think that should be that way....

If I click on Welcome message the button for "new page" is not there - only a cancel button . . . so I can not add a text

 

Yes, all is well, in the Welcome message area, you can click on the edit link on the side of each of the options to edit them.

 

When I click on new page in information pages I can Enter a title and a description - if I do so and klick on save I get a whit pages - no errors. The path is catalog/admin/information_manager.php?information_action=AddSure

 

You get a white page on the admin side, or the frontend?

 

When I now go to catalog/admin again and then to the infoManager/information pages - I can see the new site there!

Also can edit the text now and it shows the text correct at the front end (maybe I overlooked something - when I installed it first)

 

So the only problems left is that I can not create a welcome text and that I allways end up with a withe page and need to go back to catalog/admin......(well I could live with the withe page but maybe it is just a small mistake I made?)

 

I use German as language.

 

Thank you for your patient :)

 

It's possible that I screwed up the languages part. Copy admin/includes/languages/english/information.php, into admin/includes/languages/german/information.php

overwriting the existing file. Also copy catalog/includes/languages/english/information.php, into catalog/includes/languages/german/information.php

overwriting the existing file.

Link to comment
Share on other sites

Ok, there must have been any mistake in the german files - by copy the english files into the german folder it workes fine now - no withe pages any more :)

 

Also found the Contact Site (Just Replaced one line to much)

 

Yes, all is well, in the Welcome message area, you can click on the edit link on the side of each of the options to edit them.

 

The only thing I do not get to work is to edit the welcome text because I do not have a edit button there!

I only see a cancel button.

Link to comment
Share on other sites

Ok, there must have been any mistake in the german files - by copy the english files into the german folder it workes fine now - no withe pages any more :)

 

I uploaded a new version of IPU, with fixed instructions, and language files. I recommend you d/l it, and just replace your language files.

 

Also found the Contact Site (Just Replaced one line to much)

 

Yeah, you gotta pay attention when you're editing files.... ;)

 

The only thing I do not get to work is to edit the welcome text because I do not have a edit button there!

I only see a cancel button.

 

Speaking of paying attention.... Look to the far right, under action, there is a little icon that looks like a pencil/paper, click on that and you can edit each item.

Link to comment
Share on other sites

Speaking of paying attention.... Look to the far right, under action, there is a little icon that looks like a pencil/paper, click on that and you can edit each item.

 

Yes, I really should change my hours spending for the shop from night to daytime to be more effective :rolleyes: but I'am afraid the kids won't be happy with that.

 

But I'm sorry I still do not find that icon - I made a screen shot .... can't see anything under Action in Welcome message - I just see them in Information pages :'( screen.jpg

Edited by felis8681
Link to comment
Share on other sites

If your information pages is still working, and not with that same message, then you need to import the sql/information_additional.sql file, if you are getting the same message on both screens, you need to import both .sql files again...

Link to comment
Share on other sites

But I did import both :'(

 

Form your first version I imported both sql - I got the edit icons for the infopages but not for welcome text.

I delete both to import the sqls from the new version - then I get no icons - not for the infopages and not for the welcome text.

Edited by felis8681
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...