:: Forums :: Discussions :: EasyShop - ideas
 
<< Previous thread | Next thread >>
datasheet mods
Moderators: nlstart
Author Post
bryanr1973
Registered Member #3996
Joined:
Posts: 6
I would like to suggest a way to change the way the datasheet download displays.
Currently you have to go to easyshop shortcodes to make the following edit
// ------------------------------------------------
//add after $img_display = e_IMAGE."filemanager/pdf.png
//if(!stristr($in, '.pdf'))
//        {
//            $img_display = e_PLUGIN."easyshop/images/arrowup_16.gif";
//        }
//add just before after </a> Â <a href='".e_SELF."?datasheet.".$in."' alt=''>".EASYSHOP_SHOP_98."</a>


SC_BEGIN EASYSHOP_DOWNLOAD_DATASHEET_LINK
    $in = getcachedvars('easyshop_download_datasheet_filename');
    if(isset($in) && $in > 0)
    {
        $img_display = e_IMAGE."filemanager/pdf.png";
        $img_display = THEME."images/specs.png";
        
        $item = "<a href='".e_SELF."?datasheet.".$in."' alt='' target='_blank'><img style='border:0' src='".$img_display."' alt='Datasheet' /></a>";
        return $item;
    }
SC_END


If there was a way to select the image and text (even if it was just in the theme/easyshop_template.php)
The removal of the if statement was because it wasn't properly recognizing pdf extensions. Since my datasheets are all pdfs, I just removed the variable. Then I added to 2nd $img_display tag to overwrite the stock image (just to make it easier to modify later).
Back to top
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System