Guest Henrikkir Posted December 28, 2010 Report Posted December 28, 2010 I do not know if this script have been here before, but i have having some problems with my download pages. When I in my adminpanel making af new download, there is a line "Link to Image" it's dossent seems to work. No pictures showing on download pages. Here is the script and guides: 1. Open "downloads_list.tpl" in folder "core/templates". 2. Line 33 insert: <a href="<?php echo url('/downloads/dl/'.$download->id);?>"> <img src="<?php echo $download->image?>"></a><br /> Save and upload to site. You can now se pictures, and you can also clik at the picture for downloading files. Look here for an example. http://danishvikings.dk/index.php/downloads Happy new year ______________________________________________________________________________________________________________________ The script for the page: <h1>Downloads</h1> <?php if(!$allcategories) { echo 'Der er ingen downloads!'; return; } foreach($allcategories as $category) { ?> <p><h2><strong><?php echo $category->name?></strong></h2></p> <ul> <?php # This loops through every download available in the category $alldownloads = DownloadData::GetDownloads($category->id); if(!$alldownloads) { echo 'Der er ingen downloads'; $alldownloads = array(); } foreach($alldownloads as $download) { ?> <li> <a href="<?php echo url('/downloads/dl/'.$download->id);?>"> <?php echo $download->name?></a><br /> <?php echo $download->description?><br /> <a href="<?php echo url('/downloads/dl/'.$download->id);?>"> <img src="<?php echo $download->image?>"></a><br /> <em>Downloaded <?php echo $download->hits?> times</em></li> <br/> <?php } ?><br /> </ul> <?php } ?> Quote
flyalaska Posted December 30, 2010 Report Posted December 30, 2010 It works, not from the edit fleet page, but there is a download section in admin. Quote
Guest Henrikkir Posted December 30, 2010 Report Posted December 30, 2010 It works, not from the edit fleet page, but there is a download section in admin. Thats true, it only works at the downloads page. Quote
Txmmy83 Posted January 13, 2011 Report Posted January 13, 2011 nice code thank you very much for sharing Best Regards Thomas Quote
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.