themilkman Posted August 15, 2008 Share Posted August 15, 2008 Hi Spooks just have a conflict now with another module seo header tags 3.0.4 1 2. I have installed fckedotor and the following code needs to be replace with the SEO header code, how can I work around this? Around line 519, find this section of code in admin/categories.php NOTE: There can be several instances of the code: for ($i=0, $n=sizeof($languages); $i<$n; $i++) so you need to be sure you have the correct one. The best way is to do a search for TEXT_PRODUCTS_DESCRIPTION, which is part of the code to be replaced. <?php for ($i=0, $n=sizeof($languages); $i<$n; $i++) { ?> <tr> <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td> <td><table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td> <td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td> </tr> </table></td> </tr> <?php } ?> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> Replace with the following <Replacement code> But the code I have at this point is: <?php for ($i=0, $n=sizeof($languages); $i<$n; $i++) { ?> <tr> <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td> <td><table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td> <!-- Following old code replaced for FCK editor Bal 12/08/08 --> <!--<td class="main"></*?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']))); ?*/></td> --> <!-- New code: --> <td class="main"><?php echo tep_draw_fckeditor('products_description[' . $languages[$i]['id'] . ']','600','300',(isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td> </tr> So if I replace the code then I will be removing the FCK editor functionality. Please advise on the issue. Just like to say many thanks for your time. Thank TMM Hi SPooks I have integrated successfully with FCKeditor - just had a look this morning when I woke and being fresh I saw that it was just a simple integration. All is good now. Thanks for the plugin. Quote Whats the point of a signature? Link to comment Share on other sites More sharing options...
spooks Posted August 15, 2008 Author Share Posted August 15, 2008 Thats not that straitforward I'll do an update for the contrib when I get time. Quote 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. Link to comment Share on other sites More sharing options...
zaini Posted August 16, 2008 Share Posted August 16, 2008 Hello Spooks, Hello every body, Please, I have an error which prevent me from continuing my work... I have installed more6pics : Ok no problem I have installed Easy Populat : Ok no problem I have installed FCK Editor : Big problem... Look : My added code on categories.php : <!-- ########## [Delaballe] ADD FCKeditor ########## //--> <!-- Le chiffre 700 (=width) et 150 (=height) permet de pouvoir choisir la taille de la fenêtre (voir la fonction dans admin/includes/funtions/html_output.php) //--> <td class="main" valign="top"><?php echo TEXT_PRODUCTS_IMAGE; ?></td> <td class="main"><table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main" valign="top"><?php echo tep_draw_separator('pixel_trans.gif', '1', '1'); ?></td> <td class="main"><?php echo tep_image(DIR_WS_ADMIN . DIR_WS_ICONS . 'warning.gif') . ' <font color="#FF0000">' . ALERTE_NOTICE_IMAGE . '</font><br>' . tep_image(DIR_WS_ADMIN . DIR_WS_ICONS . 'success.gif') . ' ' . NOTICE_IMAGE . '</font><br>'; ?></td> </tr> <tr> <td class="main" valign="top"><?php echo tep_image(DIR_WS_ADMIN . DIR_WS_IMAGES . 'scanner.gif'); ?> </td> <td class="main"><?php echo tep_draw_file_field_image_fckeditor('products_image', '500', '150', $pInfo->products_image); ?></td> </tr> <tr> <td class="main" valign="top"><?php echo tep_draw_separator('pixel_trans.gif', '1', '1'); ?></td> <td class="main" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . TEXT_DELETE_IMAGE . tep_draw_checkbox_field('delete_image', 'yes', false); ?></td> </tr> </table></td> <!-- ########## [Delaballe] END - ADD FCKeditor ########## //--> On html_output.php // Output a form file field w/ fckeditor function tep_draw_file_field_image_fckeditor($name, $width, $height, $text='') { $oFCKeditor = new FCKeditor($name); $oFCKeditor->Config['CustomConfigurationsPath'] = HTTP_SERVER . DIR_WS_ADMIN . 'FCKeditor/fckconfigimages.js'; $oFCKeditor->BasePath = HTTP_SERVER . DIR_WS_ADMIN . 'FCKeditor/'; $oFCKeditor->ToolbarSet = 'Image'; $oFCKeditor->Width = $width; $oFCKeditor->Height = $height; if ($text != '') { $oFCKeditor->Value = '<img src="' . DIR_WS_CATALOG . DIR_WS_IMAGES . $text . '" alt="" />'; } $field = $oFCKeditor->CreateHtml($name); return $field; } // ########## [Delaballe] END - ADD FCKeditor ########## // FIN FCK EDITOR Where is the probleme please? Quote Link to comment Share on other sites More sharing options...
spooks Posted August 16, 2008 Author Share Posted August 16, 2008 Salut, Le programme d'installation que vous avez fait est de la version de cette osC.fr est tout à fait différente de la version Anglais dont vous avez besoin de demander à ce forum. Quote 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. Link to comment Share on other sites More sharing options...
zaini Posted August 16, 2008 Share Posted August 16, 2008 Mince, Que dois-je faire? What shoud I do please? Quote Link to comment Share on other sites More sharing options...
spooks Posted August 16, 2008 Author Share Posted August 16, 2008 Peut-être utiliser l'installation détaillée ici: FCKeditor for Product Descriptions etc http://addons.oscommerce.com/info/2900 Au lieu de celui que vous avez utiliser. ;) Quote 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. Link to comment Share on other sites More sharing options...
zaini Posted August 16, 2008 Share Posted August 16, 2008 Ok thanks, J'ai pourtant pris celui là. J'ai pris : FCKeditor 2.5Beta for OSC2.2rc1 asatsuru 3 Nov 2007 FCKeditor v2.5 Beta [http://www.fckeditor.net/] adapted to Online Merchant 2.2rc1. New install instructions included. Can be used to replace any textarea. Full Package + Modifications : Corrected Install spooks 28 Mar 2008 Version 2.5b has errors with current browsers. This update makes some corrections & gives instruction for latest version (2.6b) For osCommerce Online Merchant [2.2rc1] Image upload now works!! Download the latest version from http://www.fckeditor.net/ Follow attached instructions INSTALLATION - new version to avoid having to make changes to your images folder. Plus correction to my error!. Package ok? Quote Link to comment Share on other sites More sharing options...
spooks Posted August 16, 2008 Author Share Posted August 16, 2008 Il serait préférable d'utiliser la version 2.7 (27 Jun 2008) il a des corrections pour une utilisation avec la osC rc2a, et travaille avec toutes les versions de l'osC Quote 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. Link to comment Share on other sites More sharing options...
zaini Posted August 16, 2008 Share Posted August 16, 2008 (edited) Cette version 2.7 permet de gérer les images également? Plus le bug pour le renommage de images en image? Compatible avec More 6 pics? Edited August 16, 2008 by zaini Quote Link to comment Share on other sites More sharing options...
spooks Posted August 16, 2008 Author Share Posted August 16, 2008 Pas encore, je vais avoir une mise à jour pour que bientôt, quand j'ai le temps Quote 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. Link to comment Share on other sites More sharing options...
zaini Posted August 16, 2008 Share Posted August 16, 2008 Ok no problem my friend. I have desinstalled this version for the moment, cause of instability. Nice contrib anyway ! Thanks a lot. In waiting the compatibility with MORE 6 PICS. Quote Link to comment Share on other sites More sharing options...
inveritas Posted August 18, 2008 Share Posted August 18, 2008 Are you sure you followed it all? The install adds a new function to html_output.php called tep_draw_fckeditor then where ever you want to use the editor, you call that function, the install gives examples for categories.php and mail.php but the rule is simply where you have the call tep_draw_textarea_field you replace with tep_draw_fckeditor remebering to change the parameters sent to suit those are tep_draw_fckeditor ( forms_referance_id, width_of_window, height_of_window, existing_file_for_edit ) Hope that makes things clearer. B) I feel like an idiot. I downloaded the latest version from fckeditor.net but i see no install of any kind. _samples/default.html works just fine. Am i missing some installer for osC? Quote Link to comment Share on other sites More sharing options...
inveritas Posted August 18, 2008 Share Posted August 18, 2008 Ugh, nevermind. Quote Link to comment Share on other sites More sharing options...
inveritas Posted August 18, 2008 Share Posted August 18, 2008 Weird stuff, I consider myself advanced level, yet cannot get this simpleton to work .... Followed the install file, added this in categories.php: <!--START EDITED FOR FCKEDIT <td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td> --> <td class="main"><?php echo tep_draw_fckeditor('products_description[' . $languages[$i]['id'] . ']','600','300',(isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td> <!--END EDITED FOR FCKEDIT --> In html_output On top: require("fckeditor/fckeditor.php"); Added later in the file: // Output a form textarea field w/ fckeditor function tep_draw_fckeditor($name, $width, $height, $text='') { $oFCKeditor = new FCKeditor($name); $oFCKeditor -> Width = $width; $oFCKeditor -> Height = $height; $oFCKeditor -> BasePath = 'fckeditor/'; $oFCKeditor -> Value = $text; $field = $oFCKeditor->Create($name); return $field; } Also changed some code in the configure.php inside the fck dirs. Nothing big, just what is being recommended. Weird stuff, any tips left? I already tried that other bit of code you gave the guy on page 2 (?). Quote Link to comment Share on other sites More sharing options...
spooks Posted August 18, 2008 Author Share Posted August 18, 2008 What's the error? I guess from your comments no display? Have you tried with different browsers? Does firefox report any script errors? Quote 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. Link to comment Share on other sites More sharing options...
inveritas Posted August 18, 2008 Share Posted August 18, 2008 (edited) What's the error? I guess from your comments no display? Have you tried with different browsers? Does firefox report any script errors? It looks just like nothing happens but the old editor. I tried adding some echo's in the script to make sure we're editing the right files, that worked. Let me go try FF ..... Nope, nothing either. I must be doing something silly. I added the wysiwyg contribution the other day but that screwed up all contents by making entire html pages in the description that we could not edit back ;) However, that did appear immediately, so js isn't the issue here. Ok, hold on ... ;) I tried looking for the amount of tep_draw_textarea_field instances in categories. Seems like we have more than one (due to other contribs). Let's go chnge th eothers too and i will report back. Edited August 18, 2008 by inveritas Quote Link to comment Share on other sites More sharing options...
spooks Posted August 18, 2008 Author Share Posted August 18, 2008 Which version of FCK have you downloaded, there was a bug in one version that gave this, if you use the latest version it should be fine. Quote 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. Link to comment Share on other sites More sharing options...
inveritas Posted August 18, 2008 Share Posted August 18, 2008 Yup, that was it ;) Sorry for the time i took from your life, you'll never get it back ;) Quote Link to comment Share on other sites More sharing options...
inveritas Posted August 18, 2008 Share Posted August 18, 2008 If only we could see the actual images we uploaded in the descriptions, that'd be golden ;) Not sure this is possible though, as all images are in root/images The description will say images/bla.gif But to show in admin it should (and ONLY there) change it for the time being to ../images/bla.gif Quote Link to comment Share on other sites More sharing options...
spooks Posted August 18, 2008 Author Share Posted August 18, 2008 FCK will show any images that are part of the description, if your talking about the seperate product image you can see that too. this is the code I added to categories ages ago: <tr> <td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td> <td class="main" colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_info_image($pInfo->products_image, $pInfo->products_name, '150', '') . '<br />'; echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . $pInfo->products_image . '<br />'; echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_file_field('products_image'); $text = 'Select large image for zoom function if required. Image Normally Displayed at: ' . SMALL_IMAGE_WIDTH . 'px wide'; if (tep_not_null(SMALL_IMAGE_HEIGHT)) {$text .= ', ' . SMALL_IMAGE_HEIGHT . ' high.';} echo tep_display_block ($text); echo '<br />' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_hidden_field('products_previous_image', $pInfo->products_image); ?></td> </tr> I will be adding the option to select that image with FCK as well in time. ;) Quote 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. Link to comment Share on other sites More sharing options...
inveritas Posted August 18, 2008 Share Posted August 18, 2008 FCK will show any images that are part of the description, if your talking about the seperate product image you can see that too. this is the code I added to categories ages ago: <tr> <td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td> <td class="main" colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_info_image($pInfo->products_image, $pInfo->products_name, '150', '') . '<br />'; echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . $pInfo->products_image . '<br />'; echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_file_field('products_image'); $text = 'Select large image for zoom function if required. Image Normally Displayed at: ' . SMALL_IMAGE_WIDTH . 'px wide'; if (tep_not_null(SMALL_IMAGE_HEIGHT)) {$text .= ', ' . SMALL_IMAGE_HEIGHT . ' high.';} echo tep_display_block ($text); echo '<br />' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_hidden_field('products_previous_image', $pInfo->products_image); ?></td> </tr> I will be adding the option to select that image with FCK as well in time. ;) Hmm, we're not talking about the same pics I guess. When i click on a picture inside the description, broken image, link to image = images/dt2.jpg In theory, this will show up in our store (which it does) just well, as it would be www.url.com/images/dt2.jpg However, from the admin, this is now: www.url.com/admin/images/dt2.jpg Which will obviously not show any items. Am I correct, or should i add a new item to see how that plays out? Right now I only looked at existing items. Quote Link to comment Share on other sites More sharing options...
spooks Posted August 18, 2008 Author Share Posted August 18, 2008 (edited) Removed, did'nt see ealier post Assuming you did lateset install (2.7) did you do all of these change? In catalog/admin/fckeditor/editor/filemanager/connectors/php/config.php In Line 30 change: $Config['Enabled'] = false ; To $Config['Enabled'] = true ; In Line 34 change: $Config['UserFilesPath'] = '/userfiles/' ; To: $Config['UserFilesPath'] = '/catalog/userfiles/' ; NOTE: if your catalog directory has another name, replace catalog with your one. if you have a 'root' site (ie product_info.php is in the public_html directory leave as $Config['UserFilesPath'] = '/userfiles/' ; In Line 40 change $Config['UserFilesAbsolutePath'] = '' ; To $Config['UserFilesAbsolutePath'] = '/home/mysite/public_html/catalog/userfiles/' ; The same rule as above for 'catalog' In Line 127 Replace: $Config['QuickUploadPath']['File'] = $Config['UserFilesPath'] ; $Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ; With $Config['QuickUploadPath']['File'] = $Config['FileTypesPath']['File'] ; $Config['QuickUploadAbsolutePath']['File']= $Config['FileTypesAbsolutePath']['File'] ; In line 132 Change $Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . 'image/' ; $Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/' ; to $Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . '../images/' ; $Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'../images/' ; In line 134/5 Find: $Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ; $Config['QuickUploadAbsolutePath']['Image'] = $Config['UserFilesAbsolutePath'] ; To: $Config['QuickUploadPath']['Image'] = $Config['FileTypesPath']['Image'] ; $Config['QuickUploadAbsolutePath']['Image'] = $Config['FileTypesAbsolutePath']['Image'] ; In line 141/2 Replace $Config['QuickUploadPath']['Flash'] = $Config['UserFilesPath'] ; $Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath'] ; With: $Config['QuickUploadPath']['Flash'] = $Config['FileTypesPath']['Flash'] ; $Config['QuickUploadAbsolutePath']['Flash']= $Config['FileTypesAbsolutePath']['Flash'] ; In line 148/9 Replace $Config['QuickUploadPath']['Media'] = $Config['UserFilesPath'] ; $Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'] ; With: $Config['QuickUploadPath']['Media'] = $Config['FileTypesPath']['Media'] ; $Config['QuickUploadAbsolutePath']['Media']= $Config['FileTypesAbsolutePath']['Media'] ; ******************** Edited August 18, 2008 by spooks Quote 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. Link to comment Share on other sites More sharing options...
inveritas Posted August 18, 2008 Share Posted August 18, 2008 (edited) Yes I did. I understand this should take care of it: $Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . '../images/' ; $Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'../images/' ; Edited August 18, 2008 by inveritas Quote Link to comment Share on other sites More sharing options...
spooks Posted August 18, 2008 Author Share Posted August 18, 2008 Yes I did. I understand this should take care of it: $Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . '../images/' ; $Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'../images/' ; Yes, FCK places all media files in catalog root/userfiles then appropriate sub-directory, to correct this so osC images folder is used the above selects the parent images folder Quote 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. Link to comment Share on other sites More sharing options...
inveritas Posted August 18, 2008 Share Posted August 18, 2008 (edited) Just to make sure, /userfiles/ is a fictional name right? Or do we have to create a directory called just that? Secondly, if FCK 'places' media files somewhere when adding content, this would obviously explain why we're not seeing anything either as these are existing items. TY. Edited August 18, 2008 by inveritas Quote 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.