djrino Posted March 10, 2007 Share Posted March 10, 2007 Hi i have viewed the problem here mi store is into a folder loja when i use the ibrowser i get the image from the images folder into my loja/images..now i pick up the image i see the image but when i clik on preview the image is not visualized... i have see thet the image on previes page go to my admin... exampler before the preview she is on http://mysiteneme.com/loja/images with the ibrowser i pick up from this folder when i click on preview the image is not visualized before she cal from http://mysiteneme.com/loja/admin/images and if i put the same image on the http://mysiteneme.com/loja/admin/images..the image work plaease any help to fix this many tnx Quote Link to comment Share on other sites More sharing options...
Scheme138 Posted March 14, 2007 Share Posted March 14, 2007 so i am using this for the product description field......everything seems to work fine (ie bold, italic, insert date, etc.) but ANYTHING that opens a popup window does not. For example, inserting an image. The insert image window pops up, but its totally blank. same with inserting a hyperlink or viewing the html..... tinymce is located in my httpdocs but the categories.php is in https.....so my path to tiny_mce.js is an absolute path (http://www.domain.com/tiny_mcy.....) Quote Link to comment Share on other sites More sharing options...
lateralus Posted March 24, 2007 Share Posted March 24, 2007 (edited) I'm sorry but I don't understand anything to this step! 3.5 Product image 1) First of all, the product image file field (tep_draw_file_field) must be changed to a textarea (tep_draw_textarea). >>>> I must replace 3 times this "field tep_draw_file_field" by this one "tep_draw_textarea"??????? 2) In categories.php, where you have already include the file general.php, add this after: $mce_str = 'products_image'; include "includes/javascript/tiny_mce/product_image.php"; Now you should be able to use tinyMCE/iBrowser to choose your product image. >>>> in between <head></head>??????? <head> <?php // START tinyMCE Anywhere if ($action == 'new_product') { // No need to put JS on all pages. $languages = tep_get_languages(); // Get all languages // Build list of textareas to convert for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { $str.="products_description[".$languages[$i]['id']."],"; } //end for each language $mce_str = rtrim ($str,","); // Removed the last comma from the string. // You can add more textareas to convert in the $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"; $mce_str = 'products_image'; include "includes/javascript/tiny_mce/product_image.php"; } // END tinyMCE Anywhere ?> </head> 3) Before displaying the preview, the value of product_image post var must be filtered, so only the filename stays (tinyMCE returns the whole img tag). This function can do the trick: >>>>where to put this??????? function _filter_save_image ($products_image) { $products_image = htmlspecialchars(stripslashes($products_image)); $products_image = ereg_replace('<img ', '', $products_image); // Remove: <img $products_image = ereg_replace('src=', '', $products_image); // Remove: src= $products_image = ereg_replace('"', '', $products_image); // Remove: " $products_image = ereg_replace('/>', '', $products_image); // Remove: /> $products_image = ereg_replace(DIR_WS_CATALOG . DIR_WS_IMAGES, '', $products_image); // Remove: absolute path return $products_image; } 4) When loading the image name from the DB or from the HTTP_POST_VARS (when back from preview to editor), the img tag must be added again, something like that: >>>>where to put this??????? $products_image = '<img src="'.$products_image.'" />'; Thank you ;) Edited March 24, 2007 by lateralus Quote sub-total (tax free), Bookmark, Browse by Categories 2.5, Category box enhancement, Contact us choice 1.0.1, Featured products 1.5.5.1, MultiGeoZone MultiTable Shipping 1.101, Os Active Desktop 2.3, Paymenttypes 1.2, Phpmyvisites 2.1, Session counter, Skype Contact 1.0, Stats products per month 1, Store Pick Up Version 1.4, Updated spiders.txt, Who's Online Enhancement 2.00, BackButtons, Google Analytics, stats_sales_csv_1.2, google_position_1.3, Customers List Improved 1.4, boxe defilante Link to comment Share on other sites More sharing options...
Guest Posted March 26, 2007 Share Posted March 26, 2007 Hii have viewed the problem here mi store is into a folder loja when i use the ibrowser i get the image from the images folder into my loja/images..now i pick up the image i see the image but when i clik on preview the image is not visualized... i have see thet the image on previes page go to my admin... exampler before the preview she is on http://mysiteneme.com/loja/images with the ibrowser i pick up from this folder when i click on preview the image is not visualized before she cal from http://mysiteneme.com/loja/admin/images and if i put the same image on the http://mysiteneme.com/loja/admin/images..the image work plaease any help to fix this many tnx All pages in osCommerce admin have their base URL defined as /admin (look in the header of your page), so all relative links on the page will be relative to the admin section. However, when you save your description and view on the catalog side, images and links will appear correctly. - Rigadin2 Quote Link to comment Share on other sites More sharing options...
Patty Posted March 28, 2007 Share Posted March 28, 2007 All pages in osCommerce admin have their base URL defined as /admin (look in the header of your page), so all relative links on the page will be relative to the admin section. However, when you save your description and view on the catalog side, images and links will appear correctly. - Rigadin2 I'm having the same problem: images show on the admin side but they're broken on the catalog side. I tried setting relative_urls to false as suggested here: First, when previewing new products, or previewing existing products, the images were broken [x]. When looking at the path, the images were using relative url's so the images were trying to be found in admin/images tinyMCE has "relative_urls" set to true by default. Changing to false solved the problem and the images are now all called by /images/ I changed mine in the main tiny_mce.js which sets it globally. The script uses compression so when viewing it all runs together. Do a search/find on "relative_urls". You will see it set to true. Change that to false. Re-upload the script (in ASCII mode). This file: /admin/includes/javascript/tiny_mce/tiny_mce.js Before: "relative_urls",true After: "relative_urls",false This is also a switch that you can set on the fly but you will need to read the documentation for tinyMCE to understand how to use it (configuration section of docs). My advice? If this fixes your problem it will most likely work for all instances where you need tinyMCE so it should be okay to set it globally; you can always use the "switch" to set a particular call to tinyMCE to not use relative URL's (would only apply if you wanted to use tinyMCE in an application other than OSC on the same site). but that didn't work. The thing is, my image on the admin side is showing like this on the code: <img width="100" height="100" border="0" alt="msn" title="msn" src="../images/msn.jpg" /> but on the catalog side it would be like this: http://www.domain.com/images/msn.jpg when it should be http://www.domain.com/CATALOG/images/msn.jpg If I change that manually on the admin side, taking the ../ off the image, then it shows fine in the catalog side but then it's broken on the admin side. I think this has something to do with the way categories are set up in ibrowser, but I can't find the right place and the right configuration. Can someone help here? :blink: Quote Patty Link to comment Share on other sites More sharing options...
Patty Posted March 29, 2007 Share Posted March 29, 2007 Here's the solution for the image problem: http://www.oscommerce.com/forums/index.php?s=&...t&p=1051475 Quote Patty Link to comment Share on other sites More sharing options...
MnM Posted March 31, 2007 Share Posted March 31, 2007 Ok, I know I'm betting on two horses (topics) with same problem, so sue me ;) I recently installed the ACA + modules to get TinyMCE working. At first sight everything works fine, and with the iBrowser it actually is the best contrib I ever found for OSC! But ... I can't add new products to my catalog. I can edit existing ones perfectly or create a new product easy but when I click the preview button, I should get a preview with beneath it three buttons: back, insert and cancel. The only thing I get is the preview so I can't "save" or insert my added/modified product. I installed on a minty fresh OSC, followed the steps as directed (ACE/modules/TinyMCE), tried installing it all over again but I can not define where it went wrong. When I disable the TinyMCE module, the preview works as it should and I can insert/save my products. I'm in the dark here, I will reward with eternal fame and glory if you can help me :-" Quote Link to comment Share on other sites More sharing options...
MnM Posted March 31, 2007 Share Posted March 31, 2007 (edited) Forgot to mention. I could get you the url to see for yourself but then I first have to remove the password protection so let me know! Edited March 31, 2007 by MnM Quote Link to comment Share on other sites More sharing options...
djrino Posted April 2, 2007 Share Posted April 2, 2007 Hi Patty many tnx for the tip with the "relative_urls",false all wok..but i still have a problem the problem is on the product image all work, i clik on the image browser i pik up the image but when i clin on osc preview i always see the original image and no file are uploaded.. i have this code function _filter_save_image ($products_image) {return $products_image; } Please any help to make this working.. and for the creator of this Many tnx but if you can explain all on very simple mode and make this works all apreciate Tnx Quote Link to comment Share on other sites More sharing options...
Patty Posted April 6, 2007 Share Posted April 6, 2007 Almost there, it appears to finally be working with the exception of the images. As per directions:OK so I can now use the tinyMCE and the image is showing up [kind of except until I click preview where it is a broken link]. How do I run this function or a better question is where do I run this function? I'm stuck at the same point. Everything seems to be working fine, except that the product image is not being saved, so when I get to the preview page, it shows only the red X. Has anyone got this working the all the way?? Quote Patty Link to comment Share on other sites More sharing options...
Guest Posted April 9, 2007 Share Posted April 9, 2007 I try to send newsletters in HTML, but the only thing I get is text with HTML in it. For instance: When I send a mail with: test This is what I get in my mail: <strong>test</strong> Does anyone know the answer to this? Roald Quote Link to comment Share on other sites More sharing options...
NewToon Posted April 13, 2007 Share Posted April 13, 2007 Does anybody have the solution for the ibrowser integration without using the ACA contribution? I understand what to do with part 1. and 2. of the manual. But what about the part 3. and 4. ? any hint is welcome! THANKS ! Here ar the points 3 and 4 from the manual: 3) Before displaying the preview, the value of product_image post var must be filtered, so only the filename stays (tinyMCE returns the whole img tag). This function can do the trick: function _filter_save_image ($products_image) { $products_image = htmlspecialchars(stripslashes($products_image)); $products_image = ereg_replace('<img ', '', $products_image); // Remove: <img $products_image = ereg_replace('src=', '', $products_image); // Remove: src= $products_image = ereg_replace('"', '', $products_image); // Remove: " $products_image = ereg_replace('/>', '', $products_image); // Remove: /> $products_image = ereg_replace(DIR_WS_CATALOG . DIR_WS_IMAGES, '', $products_image); // Remove: absolute path return $products_image; } 4) When loading the image name from the DB or from the HTTP_POST_VARS (when back from preview to editor), the img tag must be added again, something like that: $products_image = '<img src="'.$products_image.'" />'; Quote Link to comment Share on other sites More sharing options...
MnM Posted April 14, 2007 Share Posted April 14, 2007 It took me a couple of days but I found what was causing this problem: Ok, I know I'm betting on two horses (topics) with same problem, so sue me ;) I recently installed the ACA + modules to get TinyMCE working. At first sight everything works fine, and with the iBrowser it actually is the best contrib I ever found for OSC! But ... I can't add new products to my catalog. I can edit existing ones perfectly or create a new product easy but when I click the preview button, I should get a preview with beneath it three buttons: back, insert and cancel. The only thing I get is the preview so I can't "save" or insert my added/modified product. I installed on a minty fresh OSC, followed the steps as directed (ACE/modules/TinyMCE), tried installing it all over again but I can not define where it went wrong. When I disable the TinyMCE module, the preview works as it should and I can insert/save my products. I'm in the dark here, I will reward with eternal fame and glory if you can help me :-" In my local test site, this contrib was working just fine, on my online version I had this problem. The only difference between the two was the PHP. Local site: PHP4, Online site PHP5. Changing the PHP version to PHP4 solved the problem. Maybe someone should check into this (not my cup of tea) Quote Link to comment Share on other sites More sharing options...
Guest Posted April 16, 2007 Share Posted April 16, 2007 You are right, there is a problem with the ACA module for tinyMCE Anywhere when used with PHP5. I'll have a look at it and post the solution on the ACA forum when I found it (the solution). - Rigadin2 Quote Link to comment Share on other sites More sharing options...
Gotorx7 Posted April 17, 2007 Share Posted April 17, 2007 Ok i manages to get the newsletter to send as html! in admin/includes/modules/newsletters/newsletter.php i changed $mimemessage->add_text($this->content); to: $mimemessage->add_html($this->content); Thanks Becki!! Quote Link to comment Share on other sites More sharing options...
Guest Posted April 17, 2007 Share Posted April 17, 2007 I posted a full package some time ago but it has been stopped by size limit. I re-posted only the modified files. Now the email page will not display tinyMCE if html emails are not enabled, and newsletter will be sent in html when enabled so. - Chris "Rigadin2" Quote Link to comment Share on other sites More sharing options...
xciso Posted April 22, 2007 Share Posted April 22, 2007 Hi. I haved install this contb, everything works find, but when I shell insert a image to my product it just dissapeard. I can select image with ibrowser and i press insert and I can see the image, but when I push "preview" the image is gone and a red feild commig up. No file uploaded. Who shell I do to get this work. My store will never sell if I cant show my customers images ;) Quote Link to comment Share on other sites More sharing options...
Guest Posted April 23, 2007 Share Posted April 23, 2007 If you are not using ACA modules, you have to modify admin/categories.php to manage the product image so it can work with preview button, back button, update and everything. I have not done these modifications myself because I'm using ACA. If somebody has successfuly installed tinyMCE Anywhere without ACA, it would be nice to post the solution. ACA is contribution 2611: modifications that usually take place in categories.php are placed in modules that can be installed/removed from the admin, like payment modules. With TinyMCE for example, just copy 2 files + tinyMCE folder, enable the module and it works. - Chris Quote Link to comment Share on other sites More sharing options...
lateralus Posted April 24, 2007 Share Posted April 24, 2007 If you update the contribution with the 17 Apr 2007 files, don't forget to apply also the same modifications to product_notification.php (admin/includes/modules/newsletters/product_notification.php line 203) $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer')); // START TinyMCE Anywhere if (EMAIL_USE_HTML == 'true') { $mimemessage->add_html($this->content); } else { $mimemessage->add_text(html_entity_decode(strip_tags($this->content), ENT_NOQUOTES)); } // END TinyMCEAnywhere $mimemessage->build_message(); I still don't understand how to install the image section (3.5 Product image - steps 3.5.3 & 3.5.4) Can anyone just tell me which file has to be modified???3.5.3) Before displaying the preview, the value of product_image post var must be filtered, so only the filename stays (tinyMCE returns the whole img tag). This function can do the trick: function _filter_save_image ($products_image) { $products_image = htmlspecialchars(stripslashes($products_image)); $products_image = ereg_replace('<img ', '', $products_image); // Remove: <img $products_image = ereg_replace('src=', '', $products_image); // Remove: src= $products_image = ereg_replace('"', '', $products_image); // Remove: " $products_image = ereg_replace('/>', '', $products_image); // Remove: /> $products_image = ereg_replace(DIR_WS_CATALOG . DIR_WS_IMAGES, '', $products_image); // Remove: absolute path return $products_image; } 3.5.4) When loading the image name from the DB or from the HTTP_POST_VARS (when back from preview to editor), the img tag must be added again, something like that: $products_image = '<img src="'.$products_image.'" />'; I'd like to enable TinyMCE for reviews. (3.6 TinyMCE in other places) I've done the modifications in catalog/product_reviews_write.php but I've got an error message : Parse error: syntax error, unexpected T_ECHO in /mnt/105/sdb/3/c/ludovic.berton/duret/product_reviews_write.php on line 78 <head> ..... <?php $mce_str = 'product_reviews_write' // 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"; ?> .... </head> Quote sub-total (tax free), Bookmark, Browse by Categories 2.5, Category box enhancement, Contact us choice 1.0.1, Featured products 1.5.5.1, MultiGeoZone MultiTable Shipping 1.101, Os Active Desktop 2.3, Paymenttypes 1.2, Phpmyvisites 2.1, Session counter, Skype Contact 1.0, Stats products per month 1, Store Pick Up Version 1.4, Updated spiders.txt, Who's Online Enhancement 2.00, BackButtons, Google Analytics, stats_sales_csv_1.2, google_position_1.3, Customers List Improved 1.4, boxe defilante Link to comment Share on other sites More sharing options...
Guest Posted April 24, 2007 Share Posted April 24, 2007 For product image, you have to make modifications in admin/categories.php. For your product review page, you have a semicolon missing on line 76. You also have to copy tinymce to your catalog side and modify tinymce/general.php to not include all editing options to your customers (like writing php code, uploading images on your server, ...) - Chris Quote Link to comment Share on other sites More sharing options...
lateralus Posted April 26, 2007 Share Posted April 26, 2007 Thanks for your answer Rigadin2 ;) For product image, you have to make modifications in admin/categories.php. Sorry I'm not a programmer, I've tried different places but I didn't manage to find where to put these pieces of code!!! My error message always appears on this function : <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_textarea('products_image') . ' ' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . $pInfo->products_image . tep_draw_hidden_field('products_previous_image', $pInfo->products_image); ?></td> For your product review page, you have a semicolon missing on line 76.Thank you ;) The right code is : <?php $mce_str = 'product_reviews_write'; I now don't have any error message any more ;) but I still can't see tinyMCE!!!??? You also have to copy tinymce to your catalog side and modify tinymce/general.php to not include all editing options to your customers (like writing php code, uploading images on your server, ...) I copied the tiny_mce folder to my root folder (catalog) /includes/javascript/tiny_mce Then hopefully, I will be able to configure some settings in (catalog) /includes/javascript/tiny_mce/general.php ;) Quote sub-total (tax free), Bookmark, Browse by Categories 2.5, Category box enhancement, Contact us choice 1.0.1, Featured products 1.5.5.1, MultiGeoZone MultiTable Shipping 1.101, Os Active Desktop 2.3, Paymenttypes 1.2, Phpmyvisites 2.1, Session counter, Skype Contact 1.0, Stats products per month 1, Store Pick Up Version 1.4, Updated spiders.txt, Who's Online Enhancement 2.00, BackButtons, Google Analytics, stats_sales_csv_1.2, google_position_1.3, Customers List Improved 1.4, boxe defilante Link to comment Share on other sites More sharing options...
Guest Posted April 27, 2007 Share Posted April 27, 2007 For the integration in categories, can't help, never done it. For the integration in catalog side, you can first look at the source code of the generated page, it should have several lines of initialization for tinyMCE, like you have in defined in general.php. Check also that the name of the textarea you want to replace is same as what you put in the $mce_str variable. - Chris Quote Link to comment Share on other sites More sharing options...
lateralus Posted April 27, 2007 Share Posted April 27, 2007 Please, can anybody send or post his admin/categories.php file to configure the image part of the contrib??? That would be very nice cz I'm not the only one not to understand this stuff ;) I had a look at the CRELOADED, but TinyMCE seems not to be integrated the same way :blink: Quote sub-total (tax free), Bookmark, Browse by Categories 2.5, Category box enhancement, Contact us choice 1.0.1, Featured products 1.5.5.1, MultiGeoZone MultiTable Shipping 1.101, Os Active Desktop 2.3, Paymenttypes 1.2, Phpmyvisites 2.1, Session counter, Skype Contact 1.0, Stats products per month 1, Store Pick Up Version 1.4, Updated spiders.txt, Who's Online Enhancement 2.00, BackButtons, Google Analytics, stats_sales_csv_1.2, google_position_1.3, Customers List Improved 1.4, boxe defilante Link to comment Share on other sites More sharing options...
lateralus Posted April 27, 2007 Share Posted April 27, 2007 Please, can anybody send or post his admin/categories.php file to configure the image part of the contrib??? That would be very nice cz I'm not the only one not to understand this stuff ;) I had a look at the CRELOADED, but TinyMCE seems not to be integrated the same way :blink: Quote sub-total (tax free), Bookmark, Browse by Categories 2.5, Category box enhancement, Contact us choice 1.0.1, Featured products 1.5.5.1, MultiGeoZone MultiTable Shipping 1.101, Os Active Desktop 2.3, Paymenttypes 1.2, Phpmyvisites 2.1, Session counter, Skype Contact 1.0, Stats products per month 1, Store Pick Up Version 1.4, Updated spiders.txt, Who's Online Enhancement 2.00, BackButtons, Google Analytics, stats_sales_csv_1.2, google_position_1.3, Customers List Improved 1.4, boxe defilante Link to comment Share on other sites More sharing options...
lateralus Posted April 27, 2007 Share Posted April 27, 2007 Please, can anybody send or post his admin/categories.php file to configure the image part of the contrib??? That would be very nice cz I'm not the only one not to understand this stuff ;) I had a look at the CRELOADED, but TinyMCE seems not to be integrated the same way :blink: Quote sub-total (tax free), Bookmark, Browse by Categories 2.5, Category box enhancement, Contact us choice 1.0.1, Featured products 1.5.5.1, MultiGeoZone MultiTable Shipping 1.101, Os Active Desktop 2.3, Paymenttypes 1.2, Phpmyvisites 2.1, Session counter, Skype Contact 1.0, Stats products per month 1, Store Pick Up Version 1.4, Updated spiders.txt, Who's Online Enhancement 2.00, BackButtons, Google Analytics, stats_sales_csv_1.2, google_position_1.3, Customers List Improved 1.4, boxe defilante Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.