Jump to content

Recommended Posts

Posted

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?

  • Like 1
  • Moderators
Posted

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. ;)

  • Moderators
Posted

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. ;)

Posted

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.

Posted

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>

  • Moderators
Posted

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 ;?>">

  • Like 1
Posted

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?

Posted

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
}
?>

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...