Attachment List WordPress Plugin
Inspired by, and based on, Harvey Ramer’s Autolink Attachment Plugin, this plugin lists attachments to a WordPress 2.x post in a list following the text. Only attachments that are not already linked to or displayed in the post text will be shown (this is mainly to prevent inline images from being listed).
Attachments are shown with an icon mapped to their file extension from Mark James’ excellent Silk icon set. The attachment’s title will be used for the link name and, if the attachment has a description, it will be shown below.
Update Feb 7, 2007: I’ve put together a new version that fixes the CSS typo (oops!), the post id issue Pete mentioned, and is now compatible with WP 2.1. There’s also a version available that just fixes bugs for WP 2.0 users.
Great plugin, been looking for something like this for a long time!
I’ve found a small bug though - CSS path in the php file is set to /wp-content/plugins/show_attachments/attachment.css, while the default folder name for the plugin is attachment_list. Might be a bit confusing for WP newbies
Another thing - is it possible to add attachments from the Browse All window ? So far the user has to upload files to get them attached. Maybe an “Attach file” button to the context menu ?
Comment by Red — November 25, 2006 @ 3:23 pm
$content ?
rb_get_attachments($content=???);
Comment by Jean — December 6, 2006 @ 2:57 pm
Hi Reid, you could add something like this to the beginning of rb_get_attachments (I’m not a coder so modify as you see fit)
if (!isset($post->ID)) return “”; // jump off when creating a post and ID not set.
Otherwise the plugin may bug when publishing directly without saving first, when ID is not yet set.
Comment by Pete — December 7, 2006 @ 7:12 am
sorry ->
if (!isset($post->ID)) return $content;
Comment by Pete — December 7, 2006 @ 7:54 am
Service Temporarily Unavailable..
Silk icon set
Cant see the example
Comment by http://www.freeinfoz.com — December 19, 2006 @ 7:56 am
Icons is not published. I’m using Silver Lexus theme and i see the classic unordered list after Attachment List plugin installation.
Tnx in advance.
Comment by jason3 — December 21, 2006 @ 8:17 am
Hai Pete, its a good plugin, thank you
Comment by marlin — December 25, 2006 @ 7:27 pm
Hi!
First of all, congratulations, this is an excellent plugin. I’m kind of new to Wordpress and I am trying to achieve something with your plugin. Basically, I don’t want the attached files to show up on my main page since only extracts of articles are shown (using the comment–more– html tag), but I want the attachments to be shown when the whole article is shown. Do you know how I could implement that?
Thanks!
Comment by Carl — January 10, 2007 @ 5:54 pm
I also encountered Red’s CSS problem. To correct it, change line 33 of attachment.php to
print "";Comment by emre — January 21, 2007 @ 3:35 pm
The code should have read:
Comment by emre — January 21, 2007 @ 3:36 pm
Last try:
print “”;
Comment by emre — January 21, 2007 @ 3:36 pm
Your blog does not like code
Comment by emre — January 21, 2007 @ 3:37 pm
Does anyone use this plug-in with WP 2.1.1 already? I had it working with 2.0.7 but it doesn’t seem to work with 2.1.1.
Comment by Harald Walker — February 21, 2007 @ 2:49 pm
It is working again. In 2.1.1 some database column names (or their meaning) have changed (did any one see this documented?). Replace post_status by post_type in attachment.php and then it should be working again.
Comment by Harald Walker — February 21, 2007 @ 3:10 pm
[...] Attachment List lists attachments to a WordPress 2.x post in a list following the text with an icon based on their extension. [...]
Pingback by Weblog Tools Collection » Blog Archive » WordPress Plugin Releases for 2/22 — February 22, 2007 @ 2:50 am
[...] Attachment List listet alle Anlagen zu einem Beitrag nach selbigem auf, zusammen mit einem Icon basierend auf der Dateiendung. [...]
Pingback by WeblogToolsCollection DE » Blog Archive » WordPress Plugin Veröffentlichungen am 22.2. — February 22, 2007 @ 3:24 am
Ok, color me clueless here, but how exactly does one attach a file? There’s no readme file to explain how this thing works, and your explanation above doesn’t exactly make sense.
Comment by Jim — February 22, 2007 @ 7:10 am
You attach a file using the upload form on the post page. It’s already a part of WordPress, most commonly used for photo uploading, but it will work with any file you want. Whenever you upload something while editing a post, it’s attached to that post in the database.
Comment by Reid Beels — February 22, 2007 @ 7:43 am
[...] Attachment List lista los anexos de un post en Wodpress 2.0 en una lista a continuacion del texto y con un icono que se basa en su extension. [...]
Pingback by WeblogToolsCollection Español » Blog Archive » Wordpress Plugins Publicados 2/22 — February 22, 2007 @ 11:08 am
[...] grade dabei Reid Beels Attachement List Plugin zu testen - mal schauen ob es funktioniert [...]
Pingback by Attachement List Plugin | bastelblog — February 23, 2007 @ 3:37 am
[...] Attachment List WordPress Plugin ← Posts ← Reid Beels (tags: wordpress plugin attachment plugins) [...]
Pingback by Drugi dom » links for 2007-02-23 — February 23, 2007 @ 8:20 am
[...] Attachment List WordPress Plugin ← Posts ← Reid Beels Plugin de Wordpress para adjuntar documentos a los artículos. (tags: wordpress plugin plugins attachment) [...]
Pingback by links for 2007-02-23 en newdisco — February 24, 2007 @ 7:51 pm
[...] Attachment List lista los anexos de una entrada en Wodpress 2.0 en una lista a continuación del texto y con un icono que se basa en su extensión. [...]
Pingback by Módulos para Wordpress para el 26 de febrero - Carrero Bitácora de los Hermanos Carrero, David Carrero Fernández-Baillo y Jaime Carrero Fernández-Baillo. Todo sobre Internet, Tecnología, Tendendias, Dominios, Bitácoras, Diseño y Programación, … — February 26, 2007 @ 12:17 am
This is a great plugin!
I’ve been looking for a plugin like this for whole day, and final i choose to use this one. It’s easy to install and work nicely with my wordpress.
Thanks.
Comment by HaanChiang — March 1, 2007 @ 12:52 am
Can I have the attachment hide in the frontpage?
Is there anyway to implement it?
Thanks for your help
Comment by HaanChiang — March 1, 2007 @ 12:55 am
hi,
i have problem with this plugin, when it’s activated, TinyMCE don’t work, when it’s deactivated, everything it’s ok…
wp version 2.1.1
plugin version 1.1
any suggestions?
thx
Comment by Jarda — March 1, 2007 @ 5:01 am
[...] Attachment List lists attachments to a WordPress 2.x post in a list following the text with an icon based on their extension. [...]
Pingback by ThemePress » Weblog Tools Collection: WordPress Plugin Releases for 2/22 — March 3, 2007 @ 11:47 pm
Hi, any way to make the attachments not appear on a secure page until the password is entered? Right now it appears below the password field even before it has been entered…
Many thanks!
Comment by laurent — March 9, 2007 @ 10:11 am
[...] Visit [...]
Pingback by WP Plugins DB » Blog Archive » Attachment List — May 20, 2007 @ 12:56 am
[...] Attachment List Attachment List Version: 1.1License: GPLDescription: This plugin lists attachments to a WordPress 2.x post in a list following the text with an icon based on their extension. Only attachments that are not already linked to or displayed in the post text will be shown (this is mainly to prevent inline images from being listed).Author: Reid BeelsPlugin Page [...]
Pingback by Attachment List - DevelopeNet.com — June 5, 2007 @ 2:54 pm
The path to this plugin’s CSS file does not work for blogs that are not installed in the root. This can be fixed like this. After:
function rb_attachment_css() {
… add this line: …
$siteurl = get_bloginfo(’url’);
Otherwise $siteurl is empty and the CSS path is root relative, not site relative. This method makes the CSS path absolute so it works.
Comment by Scot Hacker — July 27, 2007 @ 1:15 pm
Odd: Your description says “Only attachments that are not already linked to or displayed in the post text will be shown.” That’s actually the opposite of the behavior I’m looking for (I want to show icons if a post includes an image, audio, or video; and I wouldn’t want an icon for a file that’s merely attached but not included in the post body), so I was going to mod the plugin to reverse the behavior. But then I discovered that icons are displayed regardless whether media is embedded in the post or merely attached to it (i.e they’re displayed in all cases). So it seems that your description might be off on that point?
Comment by Scot Hacker — July 27, 2007 @ 1:34 pm
Hi, this plug in is exactly what im after..however can i limit it to only effect PDF and WORD docs so for example i can still put jpegs into the text etc.
Comment by Brad — May 10, 2008 @ 12:21 am