January 5th, 2007 WordPress Attachment Manager Plugin
This WordPress plugin allows you to create a list of attachments on your messages (as seen here). You can choose to show them on all posts, some posts (adds an option to the “Write” page), or not show them at all. Even specify whether you want to show files that are already linked in your post or not.
The icons are also customizable. You can choose whether to show icons with the files (uses “Silk” by famfamfam by default), and can even specify what icons go with which file extensions, as well as add your own icons (and remove the ones that are there).
I welcome any suggestions or bugs, and while you are at it, you can check out my other WordPress plugins
Changes:
01/07/2007: 0.1.2
- Added the option to not show file lists on excerpts
01/07/2007: 0.1.1
- Added the option to not show file lists on category pages
01/05/2007: 0.1
- Original Version
Attached Files:
- WordPress Attachment Manager
WordPress Attachment Manager v0.1.2
Nick Says:
How does one only show the file to be downloaded on the post page, rather then the category page?
Aaron D. Campbell Says:
I’m not sure, I’ll check into it when I get a moment.
Aaron D. Campbell Says:
Nick: There is now a setting to avoid showing the file list on the category pages.
Jonas Says:
Hi!
Have you tried it with WP 2.1? I installed and everything looked ok in the admin interface. Attached a file to a post. But nothing shows. I selected show attachments on all posts no exclusions.
Aaron D. Campbell Says:
No, I haven’t had time to test on 2.1 at all.
Cindy Says:
To work on 2.1, line 90 needed to be changed from WHERE post_status = ‘attachment’ to WHERE post_type = ‘attachment’
Great plugin
Jonas Says:
Hi Cindy!
many thanks. I was browsing the SQL statements quickly to se if i found something but that one I messed. Excelent!
Alex Says:
Hello, i install the plugin in wordpress 2.1 and all things looks ok but i don’t know how used it, how i can upload files and send to the post and show it like your sample? thanks
ddasfd Says:
great work, keep it up!!
Chris Hirt Says:
Aaron,
I stumbled upon your attachment manager plugin and I’m excited about it. One small improvement you could make that shouldn’t be too hard (and I need it to work!) would be to make the attachment manager work in 2.1 with pages as well.
thanks and great work!
Chris
Aaron D. Campbell Says:
Thanks Chris!
Unfortunately, my work load has not allowed me any time to work on any of my WordPress plugins for quite a while. I’d be happy to allow anyone to continue the project that wants to, and even host the files here, etc. However it doesn’t look like I’ll be in a position to work on it for a while.
Yongho Kim Says:
do you know how it would be possible to make the list of attachments to be displayed before the post content, and not after it?
Aaron D. Campbell Says:
Yes, change line 71 from:
$post_content .= wpAttachmentManager::get_attachments();to:
$post_content = wpAttachmentManager::get_attachments().$post_content;samy Says:
Doesn’t Work for me
plz some help i want to this great plugin work in out WP directory but whe in try to do this i get …
Warning: getimagesize(wp-content/plugins/attachment_manager/icons//page_white_compressed.png) [function.getimagesize]: failed to open stream: No such file or directory in E:\EasyPHP\www\wpdb\wp-content\plugins\attachment_manager\wp-attachment-manager.php on line 123
Warning: getimagesize(wp-content/plugins/attachment_manager/icons//page_white_compressed.png) [function.getimagesize]: failed to open stream: No such file or directory in E:\EasyPHP\www\wpdb\wp-content\plugins\attachment_manager\wp-attachment-manager.php on line 123
Warning: getimagesize(wp-content/plugins/attachment_manager/icons//page_white_picture.png) [function.getimagesize]: failed to open stream: No such file or directory in E:\EasyPHP\www\wpdb\wp-content\plugins\attachment_manager\wp-attachment-manager.php on line 123
how it gona work out WP directory …
but in WP dir work fine
Aaron D. Campbell Says:
Try removing the slash from the line that reads:
$image_size = getimagesize("{$icon_dir}/{$img}");samy Says:
thnx, yes i do it but steel give me that
Warning: getimagesize(wp-content/plugins/attachment_manager/icons/page_white_compressed.png) [function.getimagesize]: failed to open stream: No such file or directory in E:\EasyPHP\www\wpdb\wp-content\plugins\attachment_manager\wp-attachment-manager.php on line 123
samy Says:
i delet that code and the problem has gone
if (!empty($img)) {
$icon_dir = wpAttachmentManager::get_icon_dir().’/';
$image_size = getimagesize(”{$icon_dir}{$img}”);
$lp = $image_size[0]+4;
$height = $image_size[1];
$siteurl = get_settings(’siteurl’).’/';
$link .= ‘ class=”wam_icon_link”‘;
$link .= ” style=’padding-left:{$lp}px; line-height:{$height}px; background-image:url(\”{$siteurl}{$icon_dir}{$img}\”);’”;
}
but i don’t tink that is a good adea
Roy Says:
Warning: Invalid argument supplied for foreach() in /mnt/gs01/herd03/34864/domains/chedstone.com/html/wp-content/plugins/attachment_manager/wp-attachment-manager.php on line 228
What’s this about?