Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Attachment Plugin

(Page 1 of 3)
> >
Quote Reply
Attachment Plugin
I am happy to announce that the Attachment plugin has been released. Below is a list of features, which can also be found in a previous thread:
http://gossamer-threads.com/...rum.cgi?post=207048;

Features:

  • User/Administrator can attach files to links. The attachments can be images, but also any other sort of files.

  • Users can easily upload/delete attachments when adding and modifying links.

  • Admin may set filters, to prevent certain files from being uploaded (e.g. *.exe files), or to allow only certain content types (e.g. image/* if you only want to upload images).

  • Admin may put restrictions on who may upload attachments (everyone, registered users, editors, administrators).

  • Admin may validate attachments (same rules as for validating links).

  • Admin can set maximal size per attachment, maximal number of attachments per link, maximal total number of attachments, maximal total size of attachments.

  • Attachments can be stored "privately", and the admin can control access to attachements (everyone, or only registerd users).

  • Attachments can be stored "publicly", to reduce server load (this is useful for public images that are accessed directly, i.e. not through the script).

  • Attachments are only accessible with a special unique key (which is different for every attachment). This prevents malicious users from automated downloading all your attachments.



The plugin is used succesfully on the travel site http://www.exploitz.com/. They use the plugin for displaying travel images. With the help of some javascript, the plugin is used for a nice image gallery, where site users can upload their own images. Sample page:
http://www.exploitz.com/...l?/northafrica/egypt

The plugin is also used at my website, a sample detailed page can be found at
http://www.iyengar-yoga.com/details/608.html

The plugin costs USD 50 and can be downloaded directly from your Links SQL download area.
Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Attachment Plugin In reply to
hi yogi,

where you say you can limit the 'size' of an attachment...

if it's an image, can you limit the pixel size of an image as well as it's file size?

r.
Quote Reply
Re: [ryel01] Attachment Plugin In reply to
No, at the moment there are no image specific limitations, i.e. you can only limit the file size but not the image size (height, width).

I am planning to implement image handling (like putting limits on height/width, automatic generation of thumbnails etc) at a later stage, maybe as part of this plugin, maybe as a plugin to this plugin Cool.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Attachment Plugin In reply to
Hi Yogi,

I installed your attachment plugin, followed the instructions and placed the

<%if link_has_attachments and viewable_attachments%> <%include include_attachment_list.html%> <%endif%>

right after <p><%Description%></p> feild. Can't get it to show up on either the static or dynamic pages in detailed.html, link.html, add_success.html and modify_success.html

Works fine in add.html and modify.html. What am I doing wrong? I did the configure to be public also.

Thanks for your time,


AuctionGuy
If you think Education is expensive, Try ignorance.
Quote Reply
Re: [AuctionGuy] Attachment Plugin In reply to
This may be a stupid question, but have you added any attachments yet to the link in question?

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Attachment Plugin In reply to
Smile Yes. I was able to login, clicked add link, attachment field was there. Uploaded a pic, no problem. Now, when I was directed to Modify Success there was no mention of the attached pic. When I did a build there was no Attached link under the description on either the link.html, detailed pages, static or dynamic.
AuctionGuy
If you think Education is expensive, Try ignorance.
Quote Reply
Re: [AuctionGuy] Attachment Plugin In reply to
Can you have a look at the link in question ( in Database, Links) and see what the value is for "link_has_attachments"), it should be set to one. If it is set to zero, can you try setting it to one?

Also can you try to upload an image for a new link, and see if the same thing happens?

If it still doesn't work, can you PM or email me your login information so that I can have a look myself what is going wrong.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [AuctionGuy] Attachment Plugin In reply to
I have uploaded a new version (1.0.2) of the Attachment plugin. The new version fixes a bug with the validation of attachments when a user modifies their listing.

And just as a note: the other problem (when adding a link with attachment) on AuctionGuy's site was caused by somebody else's plugin that was not behaving properly....

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [ryel01] Attachment Plugin In reply to
I have just uploaded yet another new version (1.1.0), which adds the ability to restrict image size (width and height) for image attachments. Images sizes are also stored in the database, so you can use them when displaying the attached images on a detailed page for example.

Licensed users can download the plugin directly from their Links SQL administration area.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Attachment Plugin In reply to
Two question about this plugin:

1 - I allow the user to add CATEGORIES and LINKS, can this plugin be used to allow the user to add and show an image infront of the added CATEGORY name?

2 - When uploading an image, is there a box that appears to allow the USER to browse his/her local harddrive to select the image from? or does the user have to type the image name manually?

Thank you for your help
Mark
Quote Reply
Re: [Mark2] Attachment Plugin In reply to
Hi

1. Not at the moment. It could be done, but would require some custom modifications.

2. Yes, there is a "Browse" button, and the users can select the image from their harddrive.

I hope this helps.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Attachment Plugin In reply to
I have just uploaded a new version of the Attachment plugin (version 1.1.1).

The plugin now allows you to add custom fields to the Attachment tables, e.g. a more detailed description or whatever your heart desires.

When you add a field, you have to add the field to two tables, namely to TempAttachment and to LinkAttachment. You have to obey the following naming conventions: call the field in the TempAttachment table 'tempatt_xxxxx', where 'xxxxx' is your choice. Then, in the LinkAttachment table, you have to call the field 'linkatt_xxxxx', with 'xxxxx' the same as in the TempAttachment table.

You can then add a new input field in the "include_attachment_form.html" template. The name of the input field should be 'xxxxx', i.e. as above.

Note: the custum fields will not show up in the admin area yet. I have to rewrite some of the admin code for more flexibility (too many things are hardcoded at the moment). I'll keep you informed.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Attachment Plugin In reply to
Hello Mr. Yogi -

On the details page for the link, can the upload picture actually be displayed or is there just a link to the picture?

Also, as I haven't played around with Link sql built-in upload feature yet, how is your system different than the built-in system?

Thank you.

--------------------------------
Privacy Software
Quote Reply
Re: [BLOOD] Attachment Plugin In reply to
Hello Mr. BLOOD,

1. yes, you the uploaded pictures can be displayed on the detailed page.

2. the main differences are the following: you can upload any number of images to any link (admin can set a limit though) with the plugin, with Links SQL you need to define a new field in the Links table for every image you want to allow. It also allows you to set up permissions on who can upload/view the attachments (anyone/registered users/admin).

Apart from that, the plugin is just very easy to use, is highly configurable.

I hope that answers your questions.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Attachment Plugin In reply to
Hi There!

This sounds like something we can use. I do have a question....

I'm not sure how this is set up, please bear with me. If the linkowner wants to upload a PDF file as an attachment can they include a title that can be included in a search?

Example: upload a PDF file about house painting tips. Can they title the link "Get tips on home improvement house painting tips" and if a user searches for 'house painting', that listing will appear along with the category results and link results. You could then name those results Related Articles or something like that...

What do you think?



And even then, the user can search the site like: Search Articles with those returns only or first?

Last edited by:

SSmeredith: Jan 25, 2003, 10:28 AM
Quote Reply
Re: [SSmeredith] Attachment Plugin In reply to
Hi,

Yes, when a link owner adds an attachment, they can specify a description.

The search function, however, does not search through the attachment names. But I think this is a good idea, and I might add it in a next release.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Attachment Plugin In reply to
Yogi,

Please keep me posted, I would like to buy now but can wait for the updated version if you are going to do it in the near future.

Thanks much
Quote Reply
Re: [AuctionGuy] Attachment Plugin In reply to
In Reply To:
Smile Yes. I was able to login, clicked add link, attachment field was there. Uploaded a pic, no problem. Now, when I was directed to Modify Success there was no mention of the attached pic. When I did a build there was no Attached link under the description on either the link.html, detailed pages, static or dynamic.


Hi Ivan;

Same here: No display on the modify.

Have tried upgrade - same. Tried unintstall / re-install - same. Did not apply New attachment

Results of html output in modify.html

<!-- \\ ATTACHMENTS MODIFY NewsItem 1 // -->
<tr><td colspan=2> <tr><td colspan="2">&nbsp;</td></tr> <tr>
<td align="right" valign="top">
New Attachment:</td>
<td> <input type="hidden" name="temp_id" value="00a8a993f981d515c2458b98829726bf"> </td></tr>
<tr> <td align="right" valign="top">File:</td>
<td> <input type="file" name="link_attachment" size="50"> </td></tr>
<tr> <td align="right" valign="top">Description:</td>
<td> <input name="attachment_description" value="" size="50"> </td></tr>
<tr> <td align="right" valign="top">&nbsp;</td> <td> <input type="submit" name="att_do=upload;ID=1583" value="Upload Attachment"> </td> </tr> <tr><td colspan="2">&nbsp;</td></tr> </td></tr>
<!-- // ATTACHMENTS NewsItem 1 \\ -->

The TempAttachment column does record the attachment.

I set linkattachment default to "1"

I did comment out <input type=hidden name=modify value=1> - but note than when set this back to default, I could see the attchment info - but the upload failed.
Quote Reply
Re: [gatman] Attachment Plugin In reply to
I just withdrew my comment because I may have found the problem. I'll repost if the possible solution does not fix.

Last edited by:

estjohn: Jan 31, 2003, 8:51 PM
Quote Reply
Re: [estjohn] Attachment Plugin In reply to
Yogi, I'm having modify page problems also, similar to gatman. I'm not sure wehen this started but it was working at some point and then I upgraded and hadn't checked it since then unitl I noticed weird stuff happening recently. The uploaded files do not show up on the server or in the attachment list. However, they are listed in the temp_att table. I reviewed the plugin configuration instructions and I'm following those as far as I can tell.

Yogi, any ideas on solving or troubleshooting this?

Chris
Quote Reply
Re: [gatman] Attachment Plugin In reply to
Hi

I have traced this bug, and fixed it. You can download the latest version (1.1.4) from the plugin server.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Attachment Plugin In reply to
Maybe it's me??

Just upgraded and restored to default attachment templates. I am getting everything correctly, except the the output page for public use (detailed type) is apparently not meeting the statement %if link_has_attachments and viewable_attachments%

Nothing is displayed. (Ivan I am using your Page Builder and per earlier, have turned off build detailed and building to Type=Link page)

I did a variable dump and saw that this detailed page does state link_has attachments=1, but nothing else. the variable dump on modify_success states: link_has_attachments = 1, attachment_description = [blank], link_attachment = [blank], link_attachments =

$VAR = [
{
'att_id' => '1',
'description' => 'Screen Shot',
'filename' => 'ss1.gif',
'image' => 'image.gif',
'image_height' => '509',
'image_width' => '550',
'link_id_fk' => '1583',
'linkatt_content' => 'image/gif',
'linkatt_delete_requested' => '0',
'linkatt_description' => 'Screen Shot',
'linkatt_extension' => '.gif',
'linkatt_filename' => 'ss1.gif',
'linkatt_id' => '1',
'linkatt_image_height' => '509',
'linkatt_image_width' => '550',
'linkatt_is_validated' => '1',
'linkatt_size' => '44593',
'linkatt_time' => '1044278200',
'linkatt_type' => 'normal',
'linkatt_unique_id' => '693a7ba10476baf9955aa3bd8ca48f2a',
'size' => '43.5 KB',
'type' => 'normal',
'unique' => '693a7ba10476baf9955aa3bd8ca48f2a'
}
];


Thanks as always - John
Quote Reply
Re: [gatman] Attachment Plugin In reply to
I'll try to have a look later today. It seems that there is still somthing wrong, but I think I know what the problem could be.

It might help if you could give me access to your Links SQL admin panel.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Attachment Plugin In reply to
Yogi,

I am just beginning to use your plugin. It's really nice. I am trying to allow both kinds of uploads, public and private.

In the template include_attachment_form.html there is a tag:
<%if user_may_select_attachment_type%>
blah blah...

But no matter how I have thinsg set in the plugin configuration, I don't see the option in the add/modify page to choose what kind of attachment it will be.

In the configuration I have set:
default_attachment_type: Public
allow_other: Yes

Then under
attachment_upload_permission: Registered Users

But when I go in and try to upload an attachment, I am not presented with an option for what type of attachment it is.

Ideas?
Quote Reply
Re: [Evoir] Attachment Plugin In reply to
I'll have to look at this.

Does it work if you if you set attachment_upload_permission to 'Anyone'?

Ivan
-----
Iyengar Yoga Resources / GT Plugins
> >