|
Cookbook /
AttachLinksSummary: Get
Attach: links to display by default without the "Attach:" prefixVersion: n/a
Prerequisites:
Status:
Maintainer:
Discussion: AttachLinks-Talk
Categories: Uploads
Questions answered by this recipeHow can I get DescriptionAdd the following lines to your config.php or local customization file:
Markup('Attach', '>img',
"/\\bAttach:([^\\s$UrlExcludeChars]*[^\\s.,?!$UrlExcludeChars])/e",
"Keep(MakeLink(\$pagename,'$0','$1'),'L')");
This will cause To have the "Attach:" to still appear when creating a new attachment (but not for an existing attachment), also add $LinkUploadCreateFmt = "<a class='createlinktext' href='\$LinkUpload'>Attach:\$LinkText</a><a class='createlink' href='\$LinkUpload'> Δ</a>"; After this modification, authors can still create links with the "Attach:" displayed by using the double-bracket form of link (i.e., NotesThis modification has been applied to the Cookbook group on pmwiki.org. One may also use [[Attach:somepage.txt | sometext]]
or [[(Attach:)somefile.txt]]
to get the attachment link shown with another text. Contributors
CommentsSee discussion at AttachLinks-Talk User notes +1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |