Jump to content



Latest News: (loading..)

- - - - -

Trying to load WYSIWYG


  • Please log in to reply
30 replies to this topic

#21   arka

arka
  • Members
  • 36 posts
  • Real Name:andrea

Posted 06 May 2011 - 08:40 AM

Never mind, I am just a big dope:)

Everything is just fine :-" :-"

Edited by arka, 06 May 2011 - 08:53 AM.


#22   cranks

cranks
  • Members
  • 6 posts
  • Real Name:Craig

Posted 28 August 2011 - 05:12 AM

Hi there,

I completed all steps provided by SLICK_303 but I don't have a WYSIWYG editor when adding or amending products.

The only difference I had to the instruction is that I didn't have a template_top.php in my admin/includes/ folder.

I created a new template_top.php using gedit (linux text editor) inserted details, saved it and uploaded to admin/includes/ using ftp.

What have I done wrong??  :'(

#23   SLiCK_303

SLiCK_303
  • Members
  • 76 posts
  • Real Name:Mark
  • Gender:Male
  • Location:Monroe, LA. USA

Posted 28 August 2011 - 01:11 PM

If you dont have template_top.php in the admin/includes, that means you are not using 2.3.1.  Find a contrib for 2.2

#24   cranks

cranks
  • Members
  • 6 posts
  • Real Name:Craig

Posted 28 August 2011 - 10:57 PM

Thanks....I'll search for contrib!

#25   rayandlola1

rayandlola1
  • Members
  • 3 posts
  • Real Name:Raymond Walker

Posted 19 September 2011 - 03:21 PM

View PostSLiCK_303, on 05 May 2011 - 12:42 PM, said:

go into phpMyAdmin, click on your database in the upper left, after it comes up in the frame on the right, click on SQL on the top of the right panel then paste the sql statement i gave you in the box, and hit go.  If you have a prefix on your tables, you will need to add that to the `configuration' part.  IE if you have a osc_ prefix, you need to make it `osc_configuration`.

You still have left over configuration crap from previous attempts to get an editor working..  You need to go back, and look at the install instructions of the previous contributions, maybe they had a seperate .sql file you imported...  Then browse your configuration table, and try and find those, and remove them.  Before you attempt this backup your database first!!

View PostSLiCK_303, on 04 May 2011 - 11:53 PM, said:

You have tried getting different editors working with no success, so you have complicated the issue.  The very first thing you need to do is go back, and remove ALL modifications to files in regards to getting an editor working.  I have seen contributions telling you to edit admin/categories.php, and others you want the editor working in.  Ive seen them have you edit admin/includes/functions/general.php and/or html_output.php. So I'll repeat myself you need to remove ALL modifications to files in regards to getting an editor working.

Ok, now that we're back to square-one, let's try this...

Goto TinyMCE site and get the latest version (3.4.2), save it to your harddrive, and then extract it to a temp folder on your harddrive.  If you open that folder you just unzipped you will see a jscripts folder, and inside that a tiny_mce folder, take the tiny_mce folder, in it's entirety, and ftp it into your admin/includes/javascript folder, so you now have a admin/includes/javascript/tiny_mce folder, and inside it, just to make sure, you see the file tiny_mce.js, amongst others.  Ok while you are in ftp, go ahead and delete the admin/includes/jscripts folder, from your old install.  Now...do the following...

STEP 1:
EDIT: admin/includes/template_top.php
  (if you changed the name of your admin folder, like you should have, change as necessary)
FIND: </head>
BEFORE ADD:
<?php
  if ((TINYMCE_USE == 'true') && (!strstr($PHP_SELF,FILENAME_REVIEWS))) {
?>
<!-- TinyMCE -->
<script type="text/javascript" src="includes/javascript/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
	tinyMCE.init({
		// General options
		mode : "textareas",
		theme : "advanced",
		plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
 
		// Theme options
		theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
		theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
		theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
		theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,
 
		// Example content CSS (should be your site CSS)
//		content_css : "css/content.css",
 
		// Drop lists for link/image/media/template dialogs
//		template_external_list_url : "lists/template_list.js",
//		external_link_list_url : "lists/link_list.js",
//		external_image_list_url : "lists/image_list.js",
//		media_external_list_url : "lists/media_list.js",
 
		// Style formats
		style_formats : [
			{title : 'Bold text', inline : 'b'},
			{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
			{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
			{title : 'Example 1', inline : 'span', classes : 'example1'},
			{title : 'Example 2', inline : 'span', classes : 'example2'},
			{title : 'Table styles'},
			{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
		],
 
		// Replace values for the template plugin
//		template_replace_values : {
//			username : "Some User",
//			staffid : "991234"
//		}
	});
</script>
<!-- /TinyMCE -->
<?php
  }
?>

STEP 2:
Using phpmyadmin, or whatever mysql tool you use, import the following:
INSERT INTO `configuration` VALUES(NULL, 'Use TinyMCE', 'TINYMCE_USE', 'true', 'Select if you want to use TinyMCE or not', 1, 22, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''), ');

You're done, go use your editor.....


I have a quick question.  I was using your above information to add TinyMCE to my oscommerce site and everythign was going well until I added the above part to MYSQL.  It immediately gave me an error.
SQL query:[img]https://p3nlmysqladm001.secureserver.net/nl50/777/themes/original/img/b_help.png[/img]
VALUES (
NULL ,'Use TinyMCE','TINYMCE_USE','true','Select if you want to use TinyMCE or not', 1, 22, now() , now() ,NULL ,'tep_cfg_select_option(array(''true'', ''false''), '
)

MySQL said: [img]https://p3nlmysqladm001.secureserver.net/nl50/777/themes/original/img/b_help.png[/img]
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VALUES(NULL, 'Use TinyMCE', 'TINYMCE_USE', 'true', 'Select if you want to use Ti' at line 1
I checked the configuration and I have 2  (1) configuration and (2) configuration_group.  I was attempting to add it to the former.

Do you have an ideas as to why the error message,.  I havent tried to add anything to the original installation apart from products to my site and I was hoping to use this TinyMCE to help re-organize my display.  Any help would be appreciated

#26   SLiCK_303

SLiCK_303
  • Members
  • 76 posts
  • Real Name:Mark
  • Gender:Male
  • Location:Monroe, LA. USA

Posted 19 September 2011 - 07:58 PM

Copy and past the line using the sql tab, as opposed to importing the file

#27   rayandlola1

rayandlola1
  • Members
  • 3 posts
  • Real Name:Raymond Walker

Posted 19 September 2011 - 11:04 PM

No luck.  Same error message whether I Import or copy & paste into MYSQL tab

#28   SLiCK_303

SLiCK_303
  • Members
  • 76 posts
  • Real Name:Mark
  • Gender:Male
  • Location:Monroe, LA. USA

Posted 20 September 2011 - 01:30 AM

Works fine for me, I dont know what you are doing wrong.

Go to your database in phpmyadmin, click on the sql tab on the top right, copy and paste the statement, click go.

If that doesn't work, add it manually.....

Edited by SLiCK_303, 20 September 2011 - 01:35 AM.


#29   DmitryZkrz

DmitryZkrz
  • Members
  • 2 posts

Posted 20 September 2011 - 10:37 AM

Dear SLiCK_303 thank you for explanation, I have installed TinyMCE and everything works well. But I have two questions about php code. First - Example content CSS (should be your site CSS), what does it mean, which file should it points to ? You wrote - content_css : "css/content.css" but I can't see content.css in my os commerce folder. And "Replace values for the template plugin" what is this ? What values I should write to username and staffid ? Thank you in advance, I just new to os commerce.

#30   SLiCK_303

SLiCK_303
  • Members
  • 76 posts
  • Real Name:Mark
  • Gender:Male
  • Location:Monroe, LA. USA

Posted 22 September 2011 - 04:07 AM

All of that is commented out, hence the // in the beginning of the line, I left it in just incase someone had a use for it.  If you need more info on those features, or any others, goto the tinymce website.

#31   offie

offie
  • Members
  • 204 posts
  • Real Name:Michael
  • Gender:Male
  • Location:Lancashire, England

Posted 04 January 2012 - 11:15 PM

Quote

You have tried getting different editors working with no success, so you have complicated the issue. The very first thing you need to do is go back, and remove ALL modifications to files in regards to getting an editor working. I have seen contributions telling you to edit admin/categories.php, and others you want the editor working in. Ive seen them have you edit admin/includes/functions/general.php and/or html_output.php. So I'll repeat myself you need to remove ALL modifications to files in regards to getting an editor working.

Ok, now that we're back to square-one, let's try this...


Thank you, this saved me a lot of time searching on the internet for the answer you have laid out here and which was so easy to follow.

Edited by offie, 04 January 2012 - 11:16 PM.