aarbee Posted December 20, 2012 Report Share Posted December 20, 2012 I have upload a zipfile for a plane in this folder \root\downloads I have create links and images on the plane page. Yet when I go here; index.php/downloads it says there are no downloads. Do I need to put the download file somewhere else? 1 Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted December 20, 2012 Moderators Report Share Posted December 20, 2012 Okay! You'll have to go to admin center, click on the News $ Contents/Downloads then create a group and add a download to the group where you'll have to provide the info as well as the download link. Then the download page will show your download. Quote Link to comment Share on other sites More sharing options...
aarbee Posted December 20, 2012 Author Report Share Posted December 20, 2012 Thank you. That works. It is a bit weird that you need to add it twice. On the otherhand, it does not show the image. Do I need to code something for that? Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted December 20, 2012 Moderators Report Share Posted December 20, 2012 Well! Uploading your file into your download folder is not enough as the system needs to add the download link into your DB first before it can show the downloads. Most probably it is the image link, so make sure of that. Quote Link to comment Share on other sites More sharing options...
aarbee Posted December 20, 2012 Author Report Share Posted December 20, 2012 I cannot see anything wrong with it. www.citylink-va.com/download/PC12-afg.jpg It works. And that is the the exact code as I placed it in the download page. I mean the link itself works. I still cannot see the image at download. Quote Link to comment Share on other sites More sharing options...
aarbee Posted December 20, 2012 Author Report Share Posted December 20, 2012 Just checked the source of the website, and I do not see any <img src= in it. Only this: <h1>Downloads</h1> <p><h2><strong>Planes</strong></h2></p> <ul> <li> <a href="http://www.citylink-va.com/index.php/downloads/link"> Pilatus PC12</a><br /> Text.<br /> <em>Downloaded 1 times</em></li> <br /> </ul> Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted December 20, 2012 Moderators Report Share Posted December 20, 2012 Go to the following location: core/templates Look for downloads_list.tpl open it with an editor and find the following: 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 /> <em>Downloaded <?php echo $download->hits?> times</em></li> <?php } now add the following to it before "</li>" <img src="<?php echo $download->image ;?>"> 1 Quote Link to comment Share on other sites More sharing options...
aarbee Posted December 20, 2012 Author Report Share Posted December 20, 2012 Will do, when I get home. But I do not understand, why I have to add the link on the news and content part, but also in the aircraftpage itself. Or do they serve different items? Quote Link to comment Share on other sites More sharing options...
aarbee Posted December 20, 2012 Author Report Share Posted December 20, 2012 Parkho, thanks. it worked great. I made a small adition, that I would like to return to the community. This creates a small table instead of the LI. It shows a thumnail of the item, and if you click on that a bigger picture opens in another tab of your browser <h1>Downloads</h1> <table> <tr> <?php if(!$allcategories) { echo 'There are no downloads available!'; return; } foreach($allcategories as $category) { ?> <p><h2><strong><?php echo $category->name?></strong></h2></p> <?php # This loops through every download available in the category $alldownloads = DownloadData::GetDownloads($category->id); if(!$alldownloads) { echo 'There are no downloads under this category'; $alldownloads = array(); } foreach($alldownloads as $download) { ?> <td STYLE="vertical-align: top;"><a href="<?php echo $download->image ;?>"" target="_blank"><img width="275px" src="<?php echo $download->image ;?>"></a></TD> <td> <td> </TD> <td STYLE="vertical-align: top;"> <a href="<?php echo url('/downloads/dl/'.$download->id);?>"> <?php echo $download->name?></a><br /> <?php echo $download->description?><br /> <hr width="20px"> <em>Downloaded <?php echo $download->hits?> times</em></TD> <?php } ?> </tr> </table> <?php } ?> 1 Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted December 21, 2012 Moderators Report Share Posted December 21, 2012 Nice. 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.