Jump to content
Sign in to follow this  
rigadin2

[Contribution] TinyMCE Anywhere

Recommended Posts

Am using the article manzger http://forums.oscommerce.com/index.php?act...f=7&t=68866 am trying to figure out how to install the fck editor to use on my articles...the instriuctions say the fllowing below :

 

3.6 TinyMCE in other places

If you have installed article manager, define mainpage, extra pages or whatever where tinyMCE is useful, you can do so:

- place in $mce_str the list of textareas where tinyMCE is to be used.

- between <head> and </head>, place this code:

 

$mce_str = YOURCODEHERE // Comma separated list of textarea names

// You can add more textareas to convert in the $mce_str, be careful that they are all separated by a comma.

echo '<script language="javascript" type="text/javascript" src="includes/javascript/tiny_mce/tiny_mce.js"></script>';

include "includes/javascript/tiny_mce/general.php";

 

 

 

Am a newbie and i would like to know how and what and where i need to place the code.....

 

Thanks

Share this post


Link to post
Share on other sites
My thanks go out first to Chris and everyone who has helped make this a great contrib for osCommerece. I've installed this and all is well with one small exception and I most likely missed something. I have gone over the install process twice now from start to finish.

 

The site I'm working with has ACA installed and like I said all is fine and TinyMCE not really the issue it's iBrowser. On the products add/edit function in the admin area when using ibrowser to upload or edit an image to the product image are it will not allow us to do anything with the properties. When you finally switch to the properties section everything is grayed out.

 

I would appreciate any input I've gone through most of the things I could think of, but this one still is a mystery and the site owner is looking to edit the alt tags of the product images.

Thanks,

Steve - Techtroll

 

In the case of the product image, we use iBrowser only to retrieve the path of the image, because only this path is saved in the database. Alt tag and other formatting parameters have nothing to do here, so they are grayed. These tags are created in the catalog side, on the pages where the product image is displayed, for example by placing the product name in the alt tag.

 

- Chris


STS v4.5 SP5 is out, and check the STS Power Pack contribution too!

New thumbnailer using phpThumb: oscThumb. Works great.

Share this post


Link to post
Share on other sites

Can anyone help, please:

 

I installed TinyMCE Anywhere today (I use ACA 2.6 also). TinyMCE is working nicely, but I'm having problems with the iBrowser. I have given writing rights to all folders that instructions tells to, but when I click "browse"-icon above the product image, all I got is this: "You don't have permission to access /catalog/admin/includes/javascript/tiny_mce/plugins/ibrowser2/ibrowser.php on this server." I have no idea what to try next. Have I missed something?

 

If I can't get iBrowser working, can I get rid of it (but continue to use TinyMCE) and use something else to upload images?

 

Thank you in advance!

 

Sorry that my English is so bad...

 

Jenna

Share this post


Link to post
Share on other sites

I downloade dthe new 3.0 version of Tinymce and I've got it installed and it works perfectly with the exception of one minor issue:

 

I can't use the right click to cut, copy, or paste in Firefox. I can use ctrl+c, ctrl+x and ctrl+v but I need to be able to use the right-click.

 

I've also seen other sites (not oscommerce) using TinymceEditor and I can use my right click on those sites for cutting or pasting, so I know it's possible.

 

Anyone?

Edited by vyoufinder

"Your focus is your reality"

Share this post


Link to post
Share on other sites

the editor installed perfectly but when i go to the products page all the formatting is the same like in the css i have.

for ex. if i write with black text it gives me the blue i have in css, if i make a link it makes it orange...

any ideas how to fix it?

Share this post


Link to post
Share on other sites

Solution for those adding modifying categories.php directly and seem to have followed all the directions but the new product image does not display in the preview.

 

As the author stated he uses the MCA plugin and tried to put items together to add manually the best he could. I spent two days trying to get this dang thing to work right and then discovered that instructions for manual install is incomplete.

 

Once all the instructions and updates have been supplied there is still another change you have to make in the categories.php around line 348.

 

case 'new_product_preview':

 

The original functionality for changing images had to upload an image everytime for preview, and if the upload was not successful then it would show the image that was stored prior to that, hence why when using ibrowser product image additions there was nothing to upload so it was defaulting to the previous image that was stored and displaying that.

 

I am finishing working on cleaning up the code and will try to get together an updated download package with thorough and accurate instructions for manually adding this functionality in.

 

as a hint, I took the function that removes the image stuff and put it in this section. To work smoothly, the step that says that you need to change the product image box to a textfield requires some additional paramaters to do so without error. A part of that is what the default content to display is and I load whatever image is stored into that so no matter when I submit for preview there is always a variable passed for product_image.

 

This is what i have for the code where the input field needs to be changed to a textfield around line 640.

<td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td>
           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_textarea_field('products_image','soft','25','15',$pInfo->products_image) . '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_hidden_field('products_previous_image', $pInfo->products_image); ?></td>

 

Back to the item that allows for the preview to be updated with the image looks like this, around line 348.

case 'new_product_preview':
  //TINYMCE ANYWHERE
 function _filter_save_image ($products_delete_image) {
 	$products_delete_image = htmlspecialchars(stripslashes($products_delete_image));
$products_delete_image = ereg_replace('<img ', '', $products_delete_image); // Remove: <img
$products_delete_image = ereg_replace('src=', '', $products_delete_image); // Remove: src=
$products_delete_image = ereg_replace('"', '', $products_delete_image); // Remove: "
$products_delete_image = ereg_replace('/>', '', $products_delete_image); // Remove: />
$products_delete_image = ereg_replace(HTTP_SERVER.DIR_WS_CATALOG_IMAGES, '', $products_delete_image); // Remove: absolute path

	return $products_delete_image;

}
// copy image only if modified
	if(isset($HTTP_POST_VARS['products_image'])){
         $products_image_name = _filter_save_image($HTTP_POST_VARS['products_image']);
       }
       break;

 

Again this is not final code I would put together in an updated release as it assumes that you are using the included functionality for all image uploads including the images for categories and products etc. which can cause errors if only using for the product images.

Share this post


Link to post
Share on other sites
Can anyone help, please:

 

I installed TinyMCE Anywhere today (I use ACA 2.6 also). TinyMCE is working nicely, but I'm having problems with the iBrowser. I have given writing rights to all folders that instructions tells to, but when I click "browse"-icon above the product image, all I got is this: "You don't have permission to access /catalog/admin/includes/javascript/tiny_mce/plugins/ibrowser2/ibrowser.php on this server." I have no idea what to try next. Have I missed something?

 

If I can't get iBrowser working, can I get rid of it (but continue to use TinyMCE) and use something else to upload images?

 

Thank you in advance!

 

Sorry that my English is so bad...

 

Jenna

 

You have an .htaccess doc probably in the includes folder that denies permission to all .php files. I ran into this same problem.

 

Solution:

create an .htaccess file to allow ibrowser.php and place one in ibrowser and ibrowser2. such as "allow ibrowser.php"

 

for info on .htaccess files and setting permissions just google it if needed.

Edited by mindwire

Share this post


Link to post
Share on other sites
the editor installed perfectly but when i go to the products page all the formatting is the same like in the css i have.

for ex. if i write with black text it gives me the blue i have in css, if i make a link it makes it orange...

any ideas how to fix it?

 

Technically that is the way you should keep it so that you have continuity throughout your site. It does not sound like you are selecting text and changing the color with the text color icon because I believe that would insert a span with a style="color:#XXXXX" which would get stored in the database and supercede any global css.

 

If it is not doing that then perhaps there is a setting that can be found on tinymce site where it will add the span and style tags to the html source with the attributes you applied.

Share this post


Link to post
Share on other sites

great contrib...thanks alot every body...i'll try to take the tiny MCE to article_review_write...and product review write...it's work in text area...but when I preview..there's only source code of tiny MCE...like...

 

"_img width="100" height="80" border="0" alt="beloved" title="beloved" src="http://localhost/goocek/catalog/images/beloved.gif-

" /__font color="#0099ff"_,lcxm,v.mcxv bfdjkgl;dsfk gldsfklgklfds gdkfsl;gk;ldfsk gldkflgk dfslgkld;sfkg;lkdsf ldflgkds flgkdsflgk dskfgl sdlkgldskf glkdflsgk   kdfslgk;ldsfk'glsadkl;g fkdlsfk gdlksfl gl;k_/font__br /_

 

any body showing me where's my mistake....

Share this post


Link to post
Share on other sites

Hi Guys, I've installed OSCommerce 2.2 M2 and this contribution TinyMCE.

All work fine but for one problem. In the description of a product, or newsletter (or etc...) when I insert a link, it is saved like:

http://www.mydomain.com/www.anotherdomain.com

I suppose it has to do with the configuration files of TinyMCE but I still haven't figure out what's goin' on...

I've already placed correctly the conf file: configuration.php inside the right TinyMCE folder.

 

Any ideas..?

Share this post


Link to post
Share on other sites
Hi Guys, I've installed OSCommerce 2.2 M2 and this contribution TinyMCE.

All work fine but for one problem. In the description of a product, or newsletter (or etc...) when I insert a link, it is saved like:

http://www.mydomain.com/www.anotherdomain.com

I suppose it has to do with the configuration files of TinyMCE but I still haven't figure out what's goin' on...

I've already placed correctly the conf file: configuration.php inside the right TinyMCE folder.

 

Any ideas..?

 

 

If you tried adding www.anotherdomain.com then try adding http://www.anotherdomain.com.

 

I believe I had this problem on another project. TinyMce is taking the www.blah as a relative link.

 

Cheers,

 

Paul

Share this post


Link to post
Share on other sites

Hi, I have managed to install tinyMCe and get it working on various pages but I can't see an ibrowser button in any of the instances or in the image browser dialogue even though it is in the MCE config.

 

Anybody suggest where I might have gone wrong?

 

I'm stumped and feeling a bit in the dark here.

 

Cheers,

 

Paul

Share this post


Link to post
Share on other sites

I have TinyMCE installed and seems to be working fine for products. Can someone confirm that this editor is not to be used in other text areas such as "about us", "privacy", etc. If it can be used there, then something is broken and I'll keep looking.

 

Mark

Share this post


Link to post
Share on other sites
the editor installed perfectly but when i go to the products page all the formatting is the same like in the css i have.

for ex. if i write with black text it gives me the blue i have in css, if i make a link it makes it orange...

any ideas how to fix it?

 

Did you end up finding a solution to this?

 

I found it was adding

<p style="margin-top: 0pt; margin-bottom: 0pt;">

after the td class and before the text and this is whats overriding the CSS but i cant figure out where its defined?

Share this post


Link to post
Share on other sites

I have a bit of a problem and I think it is the TinyMCE/iBrower that is causing it.

After uploading some date (with a csv-file) I added some more info to some of my products online. These "online changed" products all showed the original image size in the preview or new items pages instead of the (autoresized) "thumbnail". The new products that were not changed all appear normal.

You must know that I have set only a width value in my settings and that I calculate the height. When I set both a (forced) width and height the problem does not occur, but some images or disformed of course and I don't want that.

 

The reason this resizing does not work as it should is a space character that has been added to the product_image value in the products table after I open and close a product in my catalog admin. When I use mysql to manually remove this extra space from the image (url) location, the product appears again normal with a resized image for a thumbnail.

 

Can anyone help me how to solve this in the code so I don't have to do the manual changes.

 

(I use the excell file to add a large amount of products at once)

 

Thanks in advance!

Share this post


Link to post
Share on other sites

I Don't know tinymce, but I do have FCK which I`ve had no real problems with, plus its an easy install, find it at:

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

 

If you do try it, I have a dead simple mod to increase fonts + font sizes.

 

Cheers :)


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites
2 questions

 

1 - When I use this add-on, the backgroudn of the editor (Products Description) is the backgroudn of my shop, is there a way to prevent that ?

 

any ideas ?

 

 

I am facing similar problem with my site background being the background in editor. Since it's black, i am having black text over black background. a suggestions?

Share this post


Link to post
Share on other sites
I am facing similar problem with my site background being the background in editor. Since it's black, i am having black text over black background. a suggestions?
Try this. In the tiny_mce/general.php file, find this line
  content_css : "<?php echo HTTP_SERVER.DIR_WS_CATALOG ?>stylesheet.css",

and change it to

  content_css : "<?php echo HTTP_SERVER.DIR_WS_CATALOG ?>admin/includes/stylesheet.css",

 

Jack

Share this post


Link to post
Share on other sites
Try this. In the tiny_mce/general.php file, find this line
  content_css : "<?php echo HTTP_SERVER.DIR_WS_CATALOG ?>stylesheet.css",

and change it to

  content_css : "<?php echo HTTP_SERVER.DIR_WS_CATALOG ?>admin/includes/stylesheet.css",

 

Jack

 

 

That worked perfectly fine. Thanks a ton.

Share this post


Link to post
Share on other sites

Hi All

 

I am having a problem that i don't think anyone else has mentioned. I have installed TinyMCE using ACA and have got ibrowser workign find in the main test area for adding new products or editing existing products. I am however struggling to get this to work for the product image upload. Were before there was a 'browse' button to look up an image file there is now just a text box which doesn't allow me to do anything other than type in it. I'm guessing there should be an ibrowser type interface here.

 

What i get at the moment can be seen here: http://cid-de321b4addc3297c.skydrive.live....lic/Capture.JPG

 

 

Please help.

 

Matt

Edited by mdscarrott

Share this post


Link to post
Share on other sites

hi,

 

i try to add this for product image and catogory image field i'm facing a trouble with your instruction. plz advice me how to add those two fields correctly and how to use those functions to make this success.

 

thanks in advance


DJS

Share this post


Link to post
Share on other sites

your store must be in a state, you've added this and html area!!

 

There is a solution with fck, but its bugged, so best not bother for now.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

I don't know what you mean by "safe" but it is widely used so it works fine, if that is what you mean.

 

Jack

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  

×