Jump to content
Sign in to follow this  
Sputnik77

[Contribution] *TinyMCE WYSIWYG HTML EDITOR

Recommended Posts

Is it not possible to use TinyMCE for the other text files that needs editing, other thatn categories, products and mail? Or is it possible to implement it in any way so all the text documents like index, privacy and conditions will be edible with the editor?

 

This contribution does exactly that: http://www.oscommerce.com/community/contributions,4852

That's the one I'm actually using. Just make sure you use the instructions above to fix an eventual image problem.


Patty

Share this post


Link to post
Share on other sites
This contribution does exactly that: http://www.oscommerce.com/community/contributions,4852

That's the one I'm actually using. Just make sure you use the instructions above to fix an eventual image problem.

 

 

Thanks, I will look into it.

Edited by Eszaraxe

osCommerce 2.3.1 - QTPro 4.6.1 - Ultimate SEO URL's 5 Pro r205 - Discount Code 3.1 - Column listing with smart columns - Products Sort and some more

Share this post


Link to post
Share on other sites
Eszaraxe, I think you misunderstand what is the function of that contrib...

It's to edit your texts (for your prodcuts descriptions or newsletters, for example), you wont be able to edit the php code of your OSC files.

 

 

I'm not interested in editing the php-files, I'm interested in editing the text areas of these files with the WYSIWYG-editor. The text area on the index-page, the text area of the privacy-page for example. The text the customer reads when using your shop.


osCommerce 2.3.1 - QTPro 4.6.1 - Ultimate SEO URL's 5 Pro r205 - Discount Code 3.1 - Column listing with smart columns - Products Sort and some more

Share this post


Link to post
Share on other sites

Hello All,

 

I use TinyMce for month and it is a great contribution. I put in the product description the code provided by youtube to show my products in flight.

 

the problem I have, is when I modify the product description, the Youtube code is always removed. And it is really embarrassing to go back to the database to add it again. I haven't read a solution for that.

 

Any idea ?

 

The youtube code is something like :

 

<object width="425" height="350"><param name="movie" value="

name="wmode" value="transparent"></param><embed src="
type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>

 

thank you in advance for your support,

 

Best regards.

Share this post


Link to post
Share on other sites

Hello,

 

great contri the Tinymce.

i had the go to a new provider with php5 and now i have normal pages and no tinymce available.

i can't find it, anyone an idea?

 

regards,

Jan


Dreams can come true, if you help them a littlebit

Share this post


Link to post
Share on other sites

Hey all.

How about implementing an internal linking thingie to the tinyMCE editor. So U could link to for instance products directly.

 

Problem is I have no idea how to browse the database and retrieve a link from it.

 

Any ideas?

Share this post


Link to post
Share on other sites

Hello

Anywho knows how may change Font family (now arial but need vernada) and default size 2?

Edited by SAA

Share this post


Link to post
Share on other sites

Now that tinyMCE is installed, I see many possibilities. Unfortunately, they're all in mini widescreen.

I wanted to use this contrib. to jazz up my product description box.

When adding /editing products, does anyone know how to increase the visible size of the input product description box so i get more WYSIWYG on my monitor ?

Many Thanks,

Paul

Edited by bertie

Share this post


Link to post
Share on other sites

Hello ... I m still looking for how the hell can someone sends e-mail from admin/mail.php in HTML format. I ve tried all "helps" but nothing. $mimemessage->add_html($message); checked but nothing

 

Help!!!!

Share this post


Link to post
Share on other sites
Hello ... I m still looking for how the hell can someone sends e-mail from admin/mail.php in HTML format. I ve tried all "helps" but nothing. $mimemessage->add_html($message); checked but nothing

 

Help!!!!

 

ok it works ... I confused because when you press the Preview button ... it appears all the html code the OSC, but if you send it then goes in html normaly. Is there any way to see the preview in normal view?

Share this post


Link to post
Share on other sites

i believe i've been following instructions correctly...

 

how come i can't seem to load my tinymce? there would always be this javascript error "tinymce undefined'. this is the block of code i added:

<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,iespel

l,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu,directionalit

y,inlinepopups,media,nonbreaking,visualchars,devkit,paste,noneditable,layer,fullp

age,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|v

space|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>

 

am i missing something? i've installed option type feature contrib and it doesn't work either. the only contrib that is workign is sts. :(

Share this post


Link to post
Share on other sites

i have this error :

 

categories.php

categs.jpg

 

preview

 

 

preview.jpg

 

 

 

 

user :

 

<font face="tahoma,arial,helvetica,sans-serif" size="5"><font size="7"><font size="2">jh</font><font color="#ffff00">fdg</font>d<font size="4">s</font><font color="#99cc00">gfs</font><font size="4">d</font> </font><br /></font>

 

 

how can I resolve?

Edited by theprincy

Share this post


Link to post
Share on other sites

Princy,

 

Sometime back on this thread I believe your issue was addressed. I *think* it was a server issue.

 

====

 

How does one add

class="mceEditor"

 

to this?

 

<?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? $products_description[$languages[$i]['id']] : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?>

 

 

I must not be inserting it correctly. I keep coming up with errors.

Share this post


Link to post
Share on other sites

Veronica, it appears the code was NOT loaded correctly.

 

Mine works. Notice how my code differs from yours. Notice also how my code also calls a script that is located the includes/javascript folder.

 

<script language="javascript" type="text/javascript" src="includes/javascript/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
 mode : "textareas",
 editor_selector : "mceEditor",
 theme : "advanced",
 theme_advanced_buttons1 : "bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,just
ifyright, justifyfull,bullist,numlist,undo,redo,link,unlink",
 theme_advanced_buttons2 : "",
 theme_advanced_buttons3 : "",
 theme_advanced_toolbar_location : "top",
 theme_advanced_toolbar_align : "left",
 theme_advanced_path_location : "bottom",
 extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|on
mouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]"
});
</script>

 

Try getting this contribution, "TinyMCE in Products desc".

 

http://addons.oscommerce.com/info/3768

Share this post


Link to post
Share on other sites

Ok, I've discovered that the function tep_draw_textarea_field is in the includes/functions/html_output.php

 

.

.

.

 

Don'tcha just hate it when someone never answers the exact same question you have?

(How to make the TinyMCE only display on the product description textarea, and no others unless you specify it - use with Header Tags contribution.)

 

Well, here's the answer:

http://addons.oscommerce.com/info/3768

Share this post


Link to post
Share on other sites

This cont looks perfect for what I am wanting, just curious though... I am new to all of this.... when I click on the link in the first post of this thread... the one taking you to download the cont. There is a list of all different possible downloads, how do I know which one to download?

 

Sorry but prob seems like a really stupid question, but I am a newbie and don't want to download the wrong thing.

 

Thanks in advance!

Share this post


Link to post
Share on other sites

Take my advice - buy the Innova Studio WYSIWYG Editor. We tried Tiny MCE and FCK Text Editors and they're just not up to the job. The Innova Studio Editor is cheap, and it's a much better product. And "No", I'm not on commission from Innova Studio.

 

Vger

Share this post


Link to post
Share on other sites

Okay guys, I feel extremely dumb right now. This looks like exactly what I want. Now, how do i get to it to use it? Obviously I am a newbie and I'm not a phper, so code is not my specialty. I have it all installed and can't figure out how to use it for anything. So far, everything I have clicked on looks the same and I can't find anything in my admin files either.

 

What I ultimately want is to use this in a text area that a customer will type in. Am I in the right direction, or is this something else? Here is kind of what I am looking for.

 

http://www.trailsofthenorth.com/posts.aspx

 

if you click the write a comment, the box there uses tinymce.

 

Hope this makes sense. Thanks guys for any help for someone that obviously is in over my head.

Share this post


Link to post
Share on other sites

Hi guys i think this what i'm looking for. I saw oscmax and it had HTML editor for products description and for all the pages like Shipping & Returns, Privacy Notice, Conditions of Use, Contact Us.

 

Is this what i'm looking for?

 

also which file do i download to install, there are loads and some dont have all files needed for install.

 

Many Thanks as always.

 

I'm IE user mainly

Edited by none_uk

Share this post


Link to post
Share on other sites
*mumble*

 

I can confirm this myself. Off course it will send non-formated code if you use the WYSIWYG part.

If you would like to edit the html code or paste html code, simply click the "html" button in the editor part.

 

:rolleyes

 

 

My editor has no html button nor does it have an option to change the font style or size. I'm pretty new to all of this so if someone could help me out I'd sure appreciate it. Thats all I need to do is see the code and change the font at will. Any suggestions?

 

Thanks so much in advance!!

Cheri

Share this post


Link to post
Share on other sites

Instead of WYSIWYG output, I am getting the following output when I create the E-mail, in OS Commerce.

output.jpg

 

<?php
/*
 $Id: mail.php,v 1.31 2003/06/20 00:37:51 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

 if ( ($action == 'send_email_to_user') && isset($HTTP_POST_VARS['customers_email_address']) && !isset($HTTP_POST_VARS['back_x']) ) {
   switch ($HTTP_POST_VARS['customers_email_address']) {
     case '***':
       $mail_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS);
       $mail_sent_to = TEXT_ALL_CUSTOMERS;
       break;
     case '**D':
       $mail_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_newsletter = '1'");
       $mail_sent_to = TEXT_NEWSLETTER_CUSTOMERS;
       break;
     default:
       $customers_email_address = tep_db_prepare_input($HTTP_POST_VARS['customers_email_address']);

       $mail_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($customers_email_address) . "'");
       $mail_sent_to = $HTTP_POST_VARS['customers_email_address'];
       break;
   }

   $from = tep_db_prepare_input($HTTP_POST_VARS['from']);
   $subject = tep_db_prepare_input($HTTP_POST_VARS['subject']);
   $message = tep_db_prepare_input($HTTP_POST_VARS['message']);

   //Let's build a message object using the email class
   $mimemessage = new email(array('X-Mailer: osCommerce'));
   // add the message to the object
   $mimemessage->add_text($message);
   $mimemessage->build_message();
   while ($mail = tep_db_fetch_array($mail_query)) {
     $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', $from, $subject);
   }

   tep_redirect(tep_href_link(FILENAME_MAIL, 'mail_sent_to=' . urlencode($mail_sent_to)));
 }

 if ( ($action == 'preview') && !isset($HTTP_POST_VARS['customers_email_address']) ) {
   $messageStack->add(ERROR_NO_CUSTOMER_SELECTED, 'error');
 }

 if (isset($HTTP_GET_VARS['mail_sent_to'])) {
   $messageStack->add(sprintf(NOTICE_EMAIL_SENT_TO, $HTTP_GET_VARS['mail_sent_to']), 'success');
 }?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<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,iespel
l,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu,directionalit
y,inlinepopups,media,nonbreaking,visualchars,devkit,paste,noneditable,layer,fullp
age,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|v
space|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>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

 

 

Any ideas?

 

Nick in New Jersey

Share this post


Link to post
Share on other sites

Hi great thread, but I did not see the answer to the question about order confirmation emails being cluttered with junk. Will this contribution help solve that problem?

Thanks,

 

Bruce

Share this post


Link to post
Share on other sites

I love this TinyMCE solution! I have installed TinyMCE editor only for my newsletters module in osCommerce (I use osCommerce 2.2 MS2). I'm able to create newsletters and send them in HTML formatted emails. Really cool! Unfortunately, there is a problem when I try to edit an existing newsletter.

 

When I click the 'edit'-button in the newsletter manager, TinyMCE opens with an empty page. The URL looks like: http//my.site.com/admin/newsletters.php?page=1&nID=3&action=new

 

Looking at admin\newsletters.php at codepart:

 

<?php
 if ($action == 'new') {
$form_action = 'insert';

$parameters = array('title' => '',
					'content' => '',
					'module' => '');

$nInfo = new objectInfo($parameters);

if (isset($HTTP_GET_VARS['nID'])) {
  [b]$form_action = 'update';[/b]

  $nID = tep_db_prepare_input($HTTP_GET_VARS['nID']);

  $newsletter_query = tep_db_query("select title, content, module from " . TABLE_NEWSLETTERS . " where newsletters_id = '" . (int)$nID . "'");

 

I thought the parameter in the url should be: '&action=update', but when I enter URL: http//my.site.com/admin/newsletters.php?page=1&nID=3&action=update osCommerce responds with:

 

tinymcenewsletterupdateeq8.png

 

Unfortunately, my php-skills are poor and I cannot find if (or how) I should make a correct update-URL, so the existing newsletter gets opened in the TinyMCE editor.

 

Maybe somebody can help??

Share this post


Link to post
Share on other sites

Got it working now.. Don't know what fixed my setup, but after a couple of changes it was working well. I have now a step-by-step manual to integrate TinyMCE in my osCommerce, so I will be able to implement this in my live webshop now.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×