Faced with the problem of adding an image items in Magento 1.4.0.1 and finally found a solution to this problem.
To address this problem, the trick for the moment is in the file wysiwyg at the core.
in app/code/core/Mage/Cms/Helper/Wysiwyg/Images.php
Replace the line 136 around getImageHtmlDeclaration function with the following:
public function getImageHtmlDeclaration($filename, $asIs = false) { $fileurl = $this->getCurrentUrl() . $filename; $mediaPath = str_replace(Mage::getBaseUrl('media'), '', $fileurl); $directive = sprintf('{{media url="%s"}}', $mediaPath); $directive = $fileurl; if ($asIs) { $html = sprintf('<img src="%s" alt="" />', $directive) } else { $html = $directive; // $directive = Mage::helper('core')->urlEncode($directive); // $html = Mage::helper('adminhtml')->getUrl('*/cms_wysiwyg/directive', array('___directive' => $directive)) } return $html }
And that’s it, although it may be problematic to directly modify a file in the core.
Tags: problem of adding an image items in Magento
This entry was posted on Saturday, July 3rd, 2010 at 4:40 am and is filed under Magento Templates, magento 1.4.0.1.. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.














July 21st, 2010 at 3:00 pm
Buy:Viagra.Viagra Super Force.Cialis.Cialis Soft Tabs.Viagra Professional.VPXL.Viagra Soft Tabs.Soma.Cialis Super Active+.Super Active ED Pack.Tramadol.Zithromax.Cialis Professional.Levitra.Viagra Super Active+.Propecia.Maxaman….