Avoid to getting black “skin image” in WYSIWYG on magento 1.4.0.1.

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')-&gt;urlEncode($directive);
// $html = Mage::helper('adminhtml')-&gt;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.

  • Share/Bookmark

Tags:

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.

One Response to “Avoid to getting black “skin image” in WYSIWYG on magento 1.4.0.1.”

  1. KEITH Says:


    MedicamentSpot.com. Canadian Health&Care.Best quality drugs.Special Internet Prices.No prescription online pharmacy. Low price pills. Buy drugs online

    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….

Leave a Reply

« Back to text comment