Attachment Names Not Displayed

kinderlehrer
Joined: 20 Jun 2008

Attachment Names Not Displayed

Posted:18 Mar 2009 (03:43 UTC)
I uploaded a pdf to Treasury. Used it in a wiki page but it did not show the title in the page - just the default icon.

Previously it has.

Can you tell me where I need to check that this is enabled please?

Admin > Treasury > Item listing and Item viewing are both checked for filename, so I figure this is not the place.

I can't see anything in Wiki or Liberty.

Also would still like to know if it is possible to use the code

<?php
{attachment id= }
?>
and have the associated file download automatically from where it has been inserted into a wiki page, instead of only going to the individual file listing (ie view_file.php).

Thanks
kinderlehrer
Joined: 20 Jun 2008

Re: Attachment Names Not Displayed

Posted:18 Mar 2009 (04:09 UTC)
Hmm...ok, I have gone 1/2 way to answering my own question.

<?php
{attachment id = }
?>
is not titled, but using the same id # and substituting with

<?php
{file id =}
?>
does give it a name.

BUT it still only goes to view_file.php and not download_file.php

AND if I migrate Treasury to Fisheye then what happens?

If I use

<?php
{attachment id= }
?>
then is there no title again?
Lester Caine
Joined: 24 Apr 2004

Re: Attachment Names Not Displayed

Posted:24 Mar 2009 (09:03 UTC)
Check out the help notes for

<?php
{attachment id= }
?>

I'm fairly certain there is a flag for adding title and changing to a link but I am going to have a play with

<?php
{image id= }
?>

and bring it in line with attachment for options so I can then simply replace my image links with attachment ones.
kinderlehrer
Joined: 20 Jun 2008

Re: Attachment Names Not Displayed

Posted:24 Mar 2009 (10:35 UTC)
Thanks for the heads up on that - I actually never thought you could do anything else with

<?php
{attachment id = }
?>
than stick it as-is in a wiki!

Perhaps

<?php
 link
="url"
?>
will be the answer in this case; and also

<?php
description
='Text, the link will be wrapped around' output=desc
?>
will keep it as text without an image (until there is a less resource intensive thumbnailer for pdfs).

That's if I have understood both correctly from the help files.(:wink:)
  Page 1 of 1  1