Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryImage LinkImage Link
Previous
 
Next
New Post
6/27/2008 12:28 AM
 

I would like to know if there is some way of making it so when you click on the image for the file it links to the download.  At the moment it opens a URL on the same page and displays the image for the file.

Thanks

 
New Post
6/30/2008 8:01 AM
 

Try this..

- in the template.html file, change the [THUMBNAIL] token to [IMAGE]

- in the template.xml file, add a DOWNLOAD setting to the [IMAGE] token.

 <Object>
  <Token>[IMAGE]</Token>
  <Settings>
   <Setting>
    <Name>DOWNLOAD</Name>
    <Value>true</Value>
   </Setting>
  </Settings>
 </Object>

That should do it. Keep in mind though, that it will still respect the Download roles, so if a user cannot download an item by clicking on the Download button, they wont be able to download an item by clicking on the image either.

 
New Post
7/1/2008 12:44 AM
 

Sorry to say it did not work, and yes the download is open for all users.

Here is the complate html file:

<TABLE CLASS="normal" WIDTH="100%" CELLSPACING="0" CELLPADDING="2" STYLE="border: 1px solid #CCCCCC";>

 <TR>
  <TD>
  <TABLE CLASS="normal" WIDTH="100%" CELLSPACING="0" CELLPADDING="0">
  <TR BGCOLOR="Gainsboro">
   <TD CLASS="Head" ALIGN="Left" WIDTH="1" VALIGN="Middle">[EDIT]</TD>
   <TD CLASS="normal" ALIGN="Left" WIDTH="16" VALIGN="Middle">[FILEICON]</TD>
   <TD CLASS="Head" ALIGN="Left" VALIGN="Middle" style="padding-left: 3px;">[TITLE]</TD>
  </TR>
  </TABLE>
  </TD>
 </TR>

 <TR bgcolor=white>
  <TD>
  <TABLE CLASS="normal" WIDTH="100%" CELLSPACING="0" CELLPADDING="0">
  <TR>
   <TD WIDTH=100 CLASS="normal" ALIGN="center" VALIGN="top" style="padding-left: 6px; padding-right: 6px;">
    <A HREF="[IMAGE]" TARGET="_blank"><IMG SRC="[IMAGE]" BORDER=0 ALT=""></a>
    <br>
   </TD>
 
   <TD CLASS="normal" ALIGN="left" VALIGN="top">
    [DESCRIPTION]
    <br>
    <hr>
    <table border="0" cellpadding=0 cellspacing=0 width="100%">
    <tr>
     <td align=left valign=top class="SubHead" width=75>[LABEL:FileSize]</td>
     <td align=left valign=top class="normal">[FILESIZE]</td>
    </tr>
    <tr>
     <td align=left valign=top class="SubHead" width=75>[LABEL:Downloads]</td>
     <td align=left valign=top class="normal">[DOWNLOADCOUNT]</td>
    </tr>
    <tr>
     <td align=left valign=top class="SubHead" width=75>[LABEL:Date]</td>
     <td align=left valign=top class="normal">[UPDATEDDATE]</td>
    </tr>
    <tr>
     <td align=left valign=top class="SubHead" width=75>[LABEL:Author]</td>
     <td align=left valign=top class="normal">[AUTHOR]</td>
    </tr>
    <tr>
     <td align=left valign=top class="SubHead" width=75">[LABEL:EMail]</td>
     <td align=left valign=top class="normal">[AUTHOREMAIL]</td>
    </tr>
    </table>
   </TD>
  </TR>
  </TABLE>
  </TD>
 </TR>

 <TR>
  <TD CLASS="SubHead" ALIGN="Right" VALIGN="Middle" COLSPAN="2" BGCOLOR="Gainsboro"
  style="padding-right: 6px;">
   [RATINGS]&nbsp;&nbsp;[COMMENTS]&nbsp;&nbsp;[DOWNLOAD]<br>[RATINGSFORM][COMMENTSFORM]
  </TD>
 </TR>
</TABLE>
<BR>

Here is the complet xml file:

<Objects>
 <Object>
  <Token>[EDIT]</Token>
  <Settings>
   <Setting>
    <Name>ToolTip</Name>
    <Value>Edit this file</Value>
   </Setting>
  </Settings>
 </Object>
 <Object>
  <Token>[TITLE]</Token>
 </Object>
 <Object>
  <Token>[CATEGORY]</Token>
  <Settings>
   <Setting>
    <Name>CssClass</Name>
    <Value>normal</Value>
   </Setting>
  </Settings>
 </Object>
 <Object>
  <Token>[AUTHOR]</Token>
 </Object>
 <Object>
  <Token>[AUTHOREMAIL]</Token>
 </Object>
 <Object>
  <Token>[DOWNLOADCOUNT]</Token>
 </Object>
 <Object>
  <Token>[COMMENTCOUNT]</Token>
 </Object>
 <Object>
  <Token>[DESCRIPTION]</Token>
 </Object>
 <Object>
  <Token>[FILESIZE]</Token>
 </Object>
 <Object>
  <Token>[CREATEDDATE]</Token>
  <Settings>
   <Setting>
    <Name>DateFormat</Name>
    <Value>ddd MM/dd/yyyy @ hh:mm</Value>
   </Setting>
  </Settings>
 </Object>
 <Object>
  <Token>[UPDATEDDATE]</Token>
  <Settings>
   <Setting>
    <Name>DateFormat</Name>
    <Value>ddd MM/dd/yyyy @ hh:mm</Value>
   </Setting>
  </Settings>
 </Object>
 <Object>
  <Token>[IMAGE]</Token>
  <Settings>
   <Setting>
    <Name>Download</Name>
    <Value>True</Value>
   </Setting>
  </Settings>
 </Object>
 <Object>
  <Token>[THUMBNAIL]</Token>
  <Settings>
   <Setting>
    <Name>Width</Name>
    <Value>100</Value>
   </Setting>
  </Settings>
 </Object>
 <Object>
  <Token>[RATINGS]</Token>
 </Object>
 <Object>
  <Token>[COMMENTS]</Token>
 </Object>
 <Object>
  <Token>[DOWNLOAD]</Token>
 </Object>
 <Object>
  <Token>[RATINGSFORM]</Token>
 </Object>
 <Object>
  <Token>[COMMENTSFORM]</Token>
 </Object>
 <Object>
  <Token>[FILEICON]</Token>
  <Settings>
   <Setting>
    <Name>Width</Name>
    <Value>12</Value>
   </Setting>
   <Setting>
    <Name>Height</Name>
    <Value>12</Value>
   </Setting>
  </Settings>
 </Object>
</Objects>

 
New Post
7/1/2008 8:18 AM
 

Change this

<A HREF="[IMAGE]" TARGET="_blank"><IMG SRC="[IMAGE]" BORDER=0 ALT=""></a>

to this

[IMAGE]
 
New Post
7/1/2008 8:59 AM
 

Steve, I know this is off-topic, but how did you make your code snippets so pretty?  :)


Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryImage LinkImage Link


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out