|
Cookbook /
UpdateAttachmentsSummary: Add "update Attachment" link to Attach: links
Version:
Prerequisites:
Status:
Maintainer:
Categories: Uploads
Questions answered by this recipeIs there a way to get Attach: links to provide an "update attachment" link? AnswerThe formatting of Attach: links is controlled by For example, the Cookbook uses the following to automatically provide a quick link for updating its attachments:
$IMapLinkFmt['Attach:'] =
"<a class='urllink' href='\$LinkUrl'>\$LinkText</a><a
class='createlink' href='\$LinkUpload'>Δ</a>";
This causes attachments to be displayed as the attachment's text followed by a Greek "delta" (Δ) that links to the upload page for that attachment, as in mimetex.phpΔ. One can even cause the appearance of these links to be optional. For example, the code below would cause attachments to have an update link added only if
if (@$_REQUEST['update']=='y') {
$IMapLinkFmt['Attach:'] =
"<a class='urllink' href='\$LinkUrl'>\$LinkText</a>
<small><a target='_blank' href='\$LinkUpload'>(update)</a></small>";
}
Furthermore, the See Also
Contributors
|