This version 1.2 mainly adds two new features: first we have now the ability to automatically display lists of attachments, without adding shortcode in posts or pages, and an option allows to force the browser behavior, in order to display “Save As” dialog box rather than display attachment itself.
New options
Auto Shortcode
In previous versions, we have two ways to add lists of attachments:
- add the shortcode to posts or pages,
- modify templates files.
The option Auto Shortcode allows to add lists of attachments in posts or pages, without adding any shortcode, or without modifying templates. Once the options is activated, lists of attachments are automaticaly added at the end of posts or pages (of course if attachments exist)
Force “Save as” mode
Request from Andrew.
With HTML, links to documents can generate several browser behaviors. If the type of the document is known, the browser displays it directly. If the type is unknown, browser displays a dialog box, to allow users to choose between “Run” and “Save as”.
The option “Force Save as” allows to display the dialog box in all cases.
This option can be set through the administration interface. At this level, this is the default behavior of the shortcode in all posts and pages. But this setting is also available as shortcode option. In this cas, the setting is only for the current shortcode. With these two levels, you can set a default behavior, and then set specific behavior in some posts or pages.
Other option
Request from Ross, the shortcode allows now to select the first or the last attachment of the list. The syntax is simple: [ attachments docid=<first or last>] will display only the first or the last attachment. Be careful, first or last can change according the sort option !
Administration interface
All of these new options are available in the WordPress administration interface, in the Settings / EG-Attachments menu.
You can download the plugin in the WordPress Repository.
The documentation is available HERE.
Comments & trackbacks
Comments
15 responses
Trackback / Pingback
No trackback/pingback yet.

Français
Mr Xhark
14:20
Je dirais plutôt “forcer le téléchargement” que “forcer la sauvegarder”
Emmanuel
18:18
Oui effectivement.
J’avoue avoir un peu de mal à tout faire en même temps, et je laisse passer trop d’erreurs en ce moment.
Moises
00:01
The Auto Shortcode is a great idea.
I would only add an option to ignore images when using it since most people do use images to style their posts.
Emmanuel
06:32
I can add an option to the shortcode and “auto-shortcode”.
Trish
18:43
I am having a problem with the EG-Attachment shortcode showing up in some of my posts. The auto shortcode isn’t being applied in all of the posts with attachments. I tried attaching the shortcode with the add shortcode button in the editor; however, it isn’t recognizing the documents attached to the post in the “Document List:” box. Would you please advise where I can go to trouble shoot this further?
By the way, my block is on an appliance and not hosted on WordPress, I have the latest version of EG-Attachments and am on version 2.7.1 of WP.
Thanks,
Trish
Alex
18:17
Hi,
great plugin. I guess however there is a bug I hope you can fix quickly. I’m using WP 2.8 and EG Attachment 1.2.9b.
The bug: the EG-icon in the tinymce doesn’t show unless you are logged in as admin or editor. An author for example doesn’t get the icon; nor the attachments are shown in the post, even if the option “automaticaly add the list of attachments in your blog” is set, when you are logged only as author.
Since I’m setting up a intranet-blog where also unexperienced people will post, I really do not want to grant them more rights than strictly necessary. And editor rights are already too much.
Thanks in advance for checking this issue and thanks anyway for your work up to now.
PS: if you don’t have enough time for a fix, a workaround would be fine for the moment, since I have to get this stuff done till end of next week. Thanks once more and bye.
Emmanuel
21:05
The version 1.3.0 will be published soon. This version allows editor and author to see the button.
Alex
21:31
thanks for your prompt reply and well… let’s wait and see.
Alex
22:15
well… thanks so much. I couldn’t imagine than “the version 1.3.0 will be published soon” would mean within 10 minutes!!!
Problem solved: now the icon appears also when I’m logged in as author. Thanks.
—
New wish!!! (but I guess it could be more difficult, or maybe I make some mistake).
Your plugin work like a charm when I insert files into the post from the PC. It doesn’t list any attachment however -neither in the “form” when editing, nor at the end of the post even if the option is set – when the attachments are inserted into the post from the library (because already uploaded).
It’s a minor issue… and I could help myself. I’m only scared of my users…
If you have time, if you think it’s worth checking…
thanks once more and bye.
Emmanuel
01:15
@Alex:
Unfortunately, I think that it’s not possible.
When an attachment is added through an URL or through the media manager (not from a PC), this attachment doesn’t appear in the WordPress database.
From a WordPress point of view, these attachments are not “linked” to the post. So we can’t get it with a SQL query or a wordpress function.
Sorry.
Alex
10:24
OK. Thanks for your reply. As I told you, I can help myself and do think it’s only a minor issue.
May I suggest you to take a look to this plugin? http://ruslany.net/wp-media-player/
It’s a silverlight based mediaplayer for .wmv movies. I installed it for a couple of reasons (despite silverlight!): one of the reasons is that it allows to add movies to a post in a very easy way from a user perspective. And it allows to add movies in the same way, even if they are already in the media library. Try it please and if you check its code, maybe you can find inspiration.
Please don’t understand me wrong: only if you think it’s worth your time [but it is! as far as I could check, your plugin is already the best for managing attachments. I just whish it could be 100% "end user proof".]
Thanks once more and bye.
Philippe
14:54
Re bonjour,
J’ai trouvé la solution à ma difficulté concernant le code pour tri descendant sur l’ID du titre.
Au besoin pour d’autres, voici le bon code :
[ attachments orderby="ID DSC" size=small label=doctitle docid=660,648,647,639,183,182,181]
Je n’avais pas essayé de mettre les “” de php !
Merci
Emmanuel
17:22
Bonjour,
Effectivement, chaque clé de tri peut etre suivi de ASC pour un tri ascendant, et DESC pour un tri descendant.
La ligne est donc:
[ attachments orderby="ID DESC" size=small label=doctitle docid=660,648,647,639,183,182,181]
Philipppe
09:50
Bonjour,
Merci de votre réactivité, et de la qualité de votre extension.
Emmanuel
11:31
Merci pour votre soutien.