Jump to content

Picture in download section


Recommended Posts

Guest Henrikkir
Posted

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

}

?>

Guest Henrikkir
Posted

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.

  • 2 weeks later...

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