WordPress Attachment Manager Plugin
This WordPress plugin allows you to create a list of attachments on your messages (as seen in areas of this site). 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
Changelog
- 05/12/2008: 1.0.1
-
- Fixed problem with plugin causing custom excerpts to not be shown
- 01/14/2008: 1.0.0
-
- Added to the wordpress.org repository
- 06/28/2007: 0.1.3
-
- Added support for WP 2.2.x-s
- 01/10/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
Related Posts:
51 Responses to “WordPress Attachment Manager Plugin”
Leave a Reply
Pings/Trackbacks
-
[...] Attachment List – Easily spice up attachment icons without [...]
-
[...] Wordpress Attachment Manager: Interesante plugin que te permite generar listas de elementos adjuntados al post. [...]
-
[...] Attachment List: This plugin let to use FAMFFAMFAM.com set of icons to be used in place of boring attachments appearing with Word Press posts. [...]
-
[...] Attachment List – легкое украшение ссылок для скачивания без кодинга. [...]
-
[...] Wordpress Attachment Manager Plugin Filed under: Uncategorized by Catherine Farman @ 3:36 pm addthis_pub = ‘cginanni’; addthis_options = ‘favorites, email, digg, delicious, myspace, facebook, google, live, more’; [...]
-
[...] Attachment List: semplice plugin che permette di sostituire le vecchie icone che appaiono sugli allegati di un post. È possibile utilizzare questo plugin per sostituire l’icona di default utilizzata da Wordpress con una nuova serie di icone, disponibili gratuitamentesu FAMFAMFAM.com. [...]
-
[...] Attachment List – Easily spice up attachment icons without [...]
-
[...] Attachment List – Easily spice up attachment icons without coding [...]
-
[...] 5. Attachment List – Easily spice up attachment icons without coding [...]
How does one only show the file to be downloaded on the post page, rather then the category page?
I’m not sure, I’ll check into it when I get a moment.
Nick: There is now a setting to avoid showing the file list on the category pages.
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.
No, I haven’t had time to test on 2.1 at all.
To work on 2.1, line 90 needed to be changed from WHERE post_status = ‘attachment’ to WHERE post_type = ‘attachment’
Great plugin
Hi Cindy!
many thanks. I was browsing the SQL statements quickly to se if i found something but that one I messed. Excelent!
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
great work, keep it up!!
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
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.
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?
Yes, change line 71 from:
$post_content .= wpAttachmentManager::get_attachments();to:
$post_content = wpAttachmentManager::get_attachments().$post_content;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
Try removing the slash from the line that reads:
$image_size = getimagesize("{$icon_dir}/{$img}");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
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
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?
Here’s what I see on my AM Options page:
Warning: opendir(/homepages/41/d244192583/htdocs/wordpress/wp-content/plugins/attachment_managerattachment-manager/icons) [function.opendir]: failed to open dir: No such file or directory in /homepages/41/d244192583/htdocs/wordpress/wp-content/plugins/attachment-manager/wp-attachment-manager.php on line 295
Warning: readdir(): supplied argument is not a valid Directory resource in /homepages/41/d244192583/htdocs/wordpress/wp-content/plugins/attachment-manager/wp-attachment-manager.php on line 296
What do these lines look like, and how should I change them? I haven’t had any success in finding them on my own or discerning what the correct code is.
Thanks!
Любопытная статья, да и сам сайт я смотрю очень даже не плох. Попал сюда по поиску из Яндекса, занес в закладки
hi guys, need some help
i have:
- installed on wp 2.6.2, activated the plugin
- set icons folder to 777
i get the message
Warning: opendir(/www/doc/www.privateproperty.cz/www/MarketInformation/wp-content/plugins/attachment_managerattachment-manager/icons): failed to open dir: No such file or directory in /www/doc/www.privateproperty.cz/www/MarketInformation/wp-content/plugins/attachment-manager/wp-attachment-manager.php on line 295
Warning: readdir(): supplied argument is not a valid Directory resource in /www/doc/www.privateproperty.cz/www/MarketInformation/wp-content/plugins/attachment-manager/wp-attachment-manager.php on line 296
any suggestions please!!!
cris
А кому от этого легче станет?
Hi,
I just installed your plugin and it seems to be working, looks nice based on a first successful test post.
But it did not work “out of the box”, as I imagine it could easily do. The default directories in the options pages were not quite a match to the directory structure within the .zip, I can’t remember, but they included something like “attachment_managerattachment-manager” in the path, and I needed to tweak them. So initially I got no icons to configure and hence display.
Cheers
YikYak
Actually, now I read a bit more, I think that matches what the earlier comments are talking about, but I did not see the error messages, I just got a not quite working plugin.
Guys, I hope you got fixed, or are still reading comments, and my observations helps you.
Hi, I just upgraded to version 2.0 of your plugin and get a huge load of error messages. When, after the first shock, I started to search for the source of the error I found out that the input-field on this plugin’s options-page for Allowed File Extensions has a faulty input. Instead of something like: “jpg,jpeg,gif,png” it displays “array”.
So there’s probably something wrong in your PHP code. After suplying the propper file-extensions in the inputfiled all the errors are gone.
Cheers,
Bram.
hi. Thanks for plugin
perfect.
Regards
Thanks!
Тема эта старая конечно , но прочитал с удовольствием
Hi, great plugin! Im using WP 2.7 and I cant seem to find the option for "show attachment on this page" when ive checked "some posts". It says it should be in the "write" section, but I cant find it there. I also cant seem to be able to add for example .docx to the iconlist to show the word-icon if the attachment is a docx-file. Could you help me with this?
Hi again, I found th checkbox to show attachment for certain post, but what I want is a checkbox for ppages aswell! Can this be mplemented easily?
Thanks for this plug in..
Hello webmaster
I would like to share with you a link to your site
write me here preonrelt@mail.ru
Hi, I have the same issue as Ross above. I need to show attachments on certain pages.
I fixed this. It's very simple, just add this 'edit_page_form' line beneath the 'edit_form_advanced' line (near the end):
add_action('edit_form_advanced', array('wpAttachmentManager','post_form'));
add_action('edit_page_form', array('wpAttachmentManager','post_form'));
I had to fix it to play nice with another plugin, User Access Manager.
Line 105, change
$query = "SELECT `guid`, `post_content`, `post_title` FROM {$wpdb->posts} WHERE (post_status = 'attachment' || post_type = 'attachment') AND post_parent = '{$post->ID}'";
to
$query = "SELECT `ID`, `guid`, `post_content`, `post_title` FROM {$wpdb->posts} WHERE (post_status = 'attachment' || post_type = 'attachment') AND post_parent = '{$post->ID}'";
Line 132, change
$link = "<a href='{$attachment->guid}'";
to
$url = wp_get_attachment_url($attachment->ID);
$link = "<a href='{$url}'";
is it possible to exclude jpeg's from showing as attachments in the list? i can't find an attachment manager that will only show docs/pdfs/xls, etc without showing all the jpegs associated with a post as well.
@ross : same here, no option “show attachments” on the write/edir post section
you can add an icon for docx file an assign it, or add a name docx at the word doc icon.
@Ashley : I did your adding line, no luck! is it the solution for ross problem?
@nick : yes I also need that. the image file shown is also image i use for the page. keep shown when i cheked the “Don’t show files that are already linked in the post”
now the attached file I linked to the page is not shown to attachmet manager. i did checked the don’t show option. Just run well now. strange. how come..
but i still need the “some page optin @ write section” any help?
finally work well on my Xampp local server. but when I upload my WP to unix hosting, and the style and icon doenst show. I have to copy the plugin css style to main wordpress theme:(style.css): works, but the icon doesn’t show. any help?
should I copy the icons to somewhere?
I have one category that I password protect all the posts – but the attachments are showing on that category page before a password is entered. I know there is a setting to avoid showing the file list on all the category pages, but I want it show on all the categories except this one. Or to not show with any password protected posts – whichever is easier. Ideas?
Thanks!
I am using Wordpress 2.7. I input the Associated File Types for the icons under options, but they would not save after I click the Update Options button. Thus, the icons would not show on the site according to the associated file types. The icon shows only when I select the default for one of the icons. Please help.
On a page listing tags it shows up but all the html has been stripped. it just lists Attached Files: and then lists the file title but it doesnt actually link and all the formatting is gone. How can i change this? Your help with really be appreciated