Gossamer Forum
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
Quote Reply
Re: [yogi] Attachment Plugin In reply to
nope. Then I took out: <%if user_may_select_attachment_type%> from the template, and the option shows. Even when it was set to allow Everyone to upload.

Maybe I'll email you my login info... will that help?
Quote Reply
Re: [Evoir] Attachment Plugin In reply to
I'll first try it out on my local copy. If I can't reproduce the error, I'd need your login info.

This will not be today, though, hopefully sometime during the weekend.

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

What does taking out:
<input type="hidden" name="modify" value="1">
do? Why do we take it out? Will taking it out effect any other kinds of uploads or changes to the link?

We are having some trouble with links that now have attachments via your plugin, that the other changes that I make to a link, particularly in the Details field, does not get saved. This has only happened since we started using your plugin. The changes were made in the same instance of modifying a link.

Can you help me out? Client is not able to edit their site.
Quote Reply
Re: [yogi] Attachment Plugin In reply to
ahh. I think I see what is happening. When my client goes into the Link and edits, they edit all the fields, then go to upload an image at the end. But when they upload the image, the page refreshes and wipes out any changes they made on the page.

I will go and instruct my client to do it as seperate transactions or upload an image first, them make changes.

Is there a way to not have this happen?
Quote Reply
Re: [yogi] Attachment Plugin In reply to
Also, still interested to know:

What does taking out
<input type="hidden" name="modify" value="1">
do? Why do we take it out? Will taking it out effect any other kinds of uploads or changes to the link?
Quote Reply
Re: [yogi] Attachment Plugin In reply to
Yogi,

I started using the plugin and uploaded files in private mode, and now client is unhappy that folks have to rename the files when they download them. I think this means I have to swicth them over to public mode in order to have the filename available (and not download it as jump.cgi) Am I correct? Is there any way to change upload types midstream? If so, can you explain? Or do I have to re-upload everything?

Thanks!
Evoir
Quote Reply
Re: [Evoir] Attachment Plugin In reply to
How do the users download the files?

Usually, an attachment is displayed in the browser if it can be displayed (mostly images and text files), or a 'Save as...' dialog box opens if it cannot be displayed. In the 'Save As...' dialog box, the original filename of the attachment is proposed as the save filename, and not jump.cgi.

If you want to force the download (i.e. not display even if possible) add

download=1

to the url of the attachment.

Does that help?

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Attachment Plugin In reply to
Currently, they are uploaded in private mode, and thus when accessed, they are accessed through jump.cgi

Example;
http://www.harveymilk.org/Details/537.shtml

At the bottom of the page there are attachments. Way down at the bottom. When you right click it, or click and hold for a macintosh, the image is named jump.cgi.

Must I switch it from private to public in order for it to automatically stay named what the image IS named? If so, do I have to re-upload them as public images?

Thanks, will try the url to download=1
Quote Reply
Re: [Evoir] Attachment Plugin In reply to
> Must I switch it from private to public in order for it to automatically stay named what the
> image IS named? If so, do I have to re-upload them as public images?

No, you don't need to switch, just add the 'download=1' bit.

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

I changed the link to include download=1 and indeed, it does intitialize an immediate download, as expected. But the name it provides automatically for that download is jump.cgi

I'd like it to offer the name of the current file. As I understood, the files that are uploaded through the PRIVATE mode, will always be shown through jump.cgi and I *think* that means that the file will automatically be named "jump.cgi" when they click to download it.

p.s. the file is named correctly in the html, just not when they click on it and you download it to disk.

Can you confirm this one more time?
Quote Reply
Re: [yogi] Attachment Plugin In reply to
Ivan,

I'm getting the following error when I try to upload an attachment. Any thoughts what's causing this?

Code:
A system error occured while attempting to
save your attachment: 'Error reading from input: '.

Safe swoops
Sangiro
Quote Reply
Re: [sangiro] Attachment Plugin In reply to
When exatly does this happen?

Are you able to reproduce this?

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

It happens when I click the Upload button. Yes, I can repreduce it. I PMed you some more info on where to take a look.

Safe swoops
Sangiro
Quote Reply
Re: [yogi] Attachment Plugin In reply to
Hi Yogi!

Just installing your plugin - i have a quick question for you - does the plugin only work in static pages mode because whenever I try and view attachments for a link from a page served in dynamic mode it gives me the following error:

Oops, we had the following problem:
We don't seem to have a category by the name 'attachments/1/0be6fc647bdba706aadc7be6f05ff046.doc'.

With this particular attachment it is a word document. It displays fine if accessed via a static links page.

Hope you can help

Hannah
Quote Reply
Re: [yogi] Attachment Plugin In reply to
Yogi, can you confirm that the name of the file cannot be sent through jump.cgi? ie: when using prviate mode, and download=1, the image becomes jump.cgi

I wish it to retain the name it was given when I uploaded it. Is this possible?
Quote Reply
Re: [yogi] Attachment Plugin In reply to
yogi?
Quote Reply
Re: [yogi] Attachment Plugin In reply to
Yogi:

I am trying to work out how to actually 'display' an image attachment (as distinct from showing a 'list' of attachments).

How can I actually achieve this?

Also, is there a way where for example an image could be displayed, and the list of other attachments (if any would appear as a list - excluding the image being displayed).

What I am getting at is abc.gif is shown on the detailed page as an image. There are a number of attachments also associated with the link such as:-

Other Attachments:
otherinfo.pdf
manual.doc
..... etc ...

I imagine if would require a %if attachment_type eq type tag?

Regards,

Clint.
--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [sangiro] Attachment Plugin In reply to
Hi Sangiro:

Are you still getting this error? I am as well! Has any solution been found?

Regards,



Clint
--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [Clint] Attachment Plugin In reply to
I'm thinking about purchasing this plug-in as we have users who would like to post both photos and photos/thumbnails. Plus pdf's too.

I'm using LSQL v 2.1.2 is this the version that is giving the trouble?
Quote Reply
Re: [SSmeredith] Attachment Plugin In reply to
Yes it is. v2.1.2.

Am still awaiting a reply on what is causing the problem. I am not the only one with this issue.

Regards,



Clint.
--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [yogi] Attachment Plugin In reply to
Hi Yogi,

May I know if your plugin is now updated without the bugs (previous ones).

Thank you.

François
Quote Reply
Re: [Franco] Attachment Plugin In reply to
An update on the bugs that were reported above.

The problem that some people were experiencing with the plugin was caused by an incorrect html tag. Namely, to enable uploads of files, you'll have to change both 'add.html' and 'modify.html' as follows (add the string in red):
Code:
<form action="add.cgi/modify.cgi" method="post" enctype="multipart/form-data">

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Attachment Plugin In reply to
hmm, i have some bug with it.

i have about 10 attachments to link.

but i need to include only 1.

i use

<%loop link_attachments%>
<img src="<%att_url%>">
<%endloop%>

and it show me all attacments.

please help.
Quote Reply
Re: [romanslon] Attachment Plugin In reply to
Does this plug-in work or not? I can not tell by what is written here!


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Attachment Plugin In reply to
Does anyone know how long it takes to get the plugin after its paid for?


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Attachment Plugin In reply to
Yogi's last visit was July 17th, it seems. It might be he's on vacation. Or something came up. Give him a chance. Everyone needs a vacation (whatever they are.... I don't remember any more.....)

I had an older version of his plugin installed on a site, and it does work. I never stress tested it, and never saw any more recent versions or fixes, but it used a hook into the admin interface.

It's "cool" in that respect, but I don't like that sort of management, it's more confusing, and you can't edit multiple links at the same time. I think we have a program either released, or in the works, that will allow the attachments to be modified from a list of links that apply to some sort of search -- either a user, unvalidated, etc.

The delay in releasing it, was I was trying to see if I could hook it into the admin area, to allow validating the attachments and the link at the same time. As it is now, the system works for links that get new/changed attachments, but it's a bit cumbersome for a new link. You have to validate the link, then go back and check it's attachments. I think I have a way around that, --- allowing an option to see unvalidated links, with attachments, and validate the attachments FIRST, then validate the link. My system allows separate validation and approval or expiration of attachments (graphics, files, etc) separate from the main link itself using an is_validated and is_viewable set of tags.

Anyway, give people some breathing room this time of year. It's vacation time, and many people *really* *really* need it.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [yogi] Attachment Plugin In reply to
Hello,

I seek a solution.

I would like to give an error message if the downloaded file is lower than 1 KB (size).

Currently, it is possible to give a value for the maximun.

It is possible to add a field for Minimun?

Such as for example: Minimum size for attachments...

You can help me?

Mick
Quote Reply
Re: [mick31] Attachment Plugin In reply to
Hello Yogi,

I have tried to contact you about upgrading, but have received no reply.

---------------------------------------------------------------
Previous emails:
Hi Sandra

Thanks for the information.

> Sandra@XXXX.com
I am afraid, but this email address doesn't seem to work at Gossamer
Threads. Could it be that you are registered with a different address?


Regards,

Ivan Herger
Iyengar Yoga Resources
---------------------------------------------------------------
The plugin system at Gossamer Threads allows you to download the plugin
directly to your Links SQL administration area. I can activate this plugin
download area for you, if I have the address with which you are registered
at Gossamer Threads. That is the email address you used when you bought
Links SQL, it has got nothing to do with your Forum profile or with any
email game.

I am sending you the plugin as an attachment.

I'll be away for two days.

Ivan


Next:

I would like to link to the attachments (images only)

Scenario
using Link.html I want to create a thumbnail of the image attachment. Is this a possibility?


SandraR


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Attachment Plugin In reply to
Hello Yogi,

I am still waiting on the upgrade for the attachment program. Any luck getting it? It’s been almost a year I would love to receive it. Thank you,

SandraR


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Attachment Plugin In reply to
If you are just trying to attach an image and have it thumbnailed, we have plugins that can do that. They can also handle multiple images per link, or multiple sizes of images too.

I'm working on the routines for this, to manage a gallery site, and right now the software will take an uploaded image, resize it into 3 sizes, and allow you access to each of those. I'm working on details for upgrading how this is all stored, and packaging it into an installable plugin, but depending on what you need, it can be partially automatically and partially manually installed now.

I've got it making a 120x200 thumbnail for the links pages, a 200x300 thumbnail for the gallery page, a 600x600 format image for the detail page, and then the "full image" limited to 800x1200.

I'm hammering out these lower level routines and the templates before I start adding in the "features" which is really just a lot of template work, and forms work, which is painfully "grunt" work. Almost all the scripting/coding has been done. It's just prettifying it all, and packaging it up.

Andy also has a slideshow script that allows someone to run through the images in a category, and it creates a display that would be great for products, showing a variety of an item (colors, for example) or just show off a gallery of photos.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Attachment Plugin In reply to
Hello Pugdog,

I would be interested.

But, I have three questions.

1/ 1/ It works with GD::Image ?

2/ It is possible to manage it since the sector of administration ?
It is the weak point with the script of Yogi.

3/ But, the plugin of Yogi has a great characteristic.
If the link is removed, the file is also removed.

Your script will also do this work ?

Thank you for your answer.

Mick

Last edited by:

mick31: Feb 17, 2006, 2:47 AM
Quote Reply
Re: [pugdog] Attachment Plugin In reply to
Thank you for the reply PUGDOG,
What I need is to give the visitor the opportunity to upload an image's and or company logo next to there link. I have been using the attachment program for that as not everyone has a server which to host their images on. Do you have anything that will accomplish that task? I would like them to have the ability to load as many images as 12 images if possible.

SandraR


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Attachment Plugin In reply to
We actually have several scripts.

The simplest one will allow you to upload and use a thumbnail/logo on a link and category.

Opening up other features, will allow you to attach images to your link, and it can be accessed via simple template tags.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Attachment Plugin In reply to
Wonderful Pupdog,

Where do I go to look and buy?


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Attachment Plugin In reply to
I want to confirm that this plugin DOES work in version 3x Gossamer Links. I was able to get the attachment to display on a static page using the following on Detailed.html template:
Code:
<%if link_has_attachments and viewable_attachments%> <%loop link_attachments%>
<img src="<%att_url%>">
<%endloop%><br><%endif%>
And it displays a public image.

Last edited by:

Evoir: Jul 6, 2006, 5:24 PM
Quote Reply
Re: [Evoir] Attachment Plugin In reply to
I went with a different method instead of a plugin and it works much better for me..


Template Global called: imageurl


Code:
sub {
my $field = shift;
my $tags = GT::Template->tags;
my $id = $tags->{ID};
if ($tags->{$field})
{

my $links_db = $DB->table('Links');
my $fh = $links_db->file_info( "$field", $id );
return "" unless($fh);

my $location = $fh->File_RelativePath;
my $logow = 75;
my $extra_atts="oriw=$tags->{LogoWidth}";
if($field eq "Logo" && $tags->{LogoWidth} ne "$logow"){
eval{
use Image::Magick;
};
$@ and return $@;

my $i= new Image::Magick();
my $if = $CFG->{build_root_path} . "/upload$location";

my $error = $i->Read($if);
return "Could not read $if file. Reason:" . $error if $error;

my $w = $i->Get('width');
$extra_atts .= ";width =$w";
if($w ne "$logow"){
my $h = $i->Get('height');

my $logoh = int($h*($logow/$w));
$error = $i->Resize(geometry => "${logow}x$logoh", width => $logow, height => $logoh);
return "Could not read $if file. Reason:" . $error if $error;
$extra_atts .= ";height=$h";
my $rs = $i->Write($if);

}

$links_db->update({LogoWidth => $logow},{ID => $id}) if($tags->{LogoWidth} ne "$logow");

}


return qq~$CFG->{build_root_url}/upload_images$location~;
}
else
{
return "";
}
}


Links Table Editor added:
Column Name: Upload_Image
Column Size: 255
Form Type: File
Form Size: 20
File Save Location: /home/httdocs/upload_images
File Save URL: http://yourdomain.com/upload_images
File Save Method: Simple
Form Regex: ^|.*\.(?i:gif|jpg|png)$


=======================================
I made one for the image and one for the thumbnail. simplified my life when on the road.
============================
It does require you have Image Magick on your server. If you’re not sure if you have it call you’re hosting provider and ask. If they don’t have it on there it takes seconds to add it.


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Attachment Plugin In reply to
Sandra,

That's great. Turns out I can't get the attachment plugin to work on MODIFY. That sucks.

I'll try your global. But, hey, how do you call it from a static page? Can you post the html you use?
Quote Reply
Re: [Evoir] Attachment Plugin In reply to
I will PM you so I do not spam this with my URL's. It was the ability to NOT modify the attachment plugin that had me look to alternative solutions.


For those interested
====================================================
include_form.html
Code:
<input class="text" type="file" id="Upload_Image" name="Upload_Image" value="" size="30">
<%if Upload_Image%> <img src="<%imageurl('Upload_Image')%>" border=0><%endif%>


link.html template I use:

Code:
<%if Upload_Image%><a href="<%db_cgi_url%>/jump.cgi?Detailed=<%ID%>"><img src="<%imageurl('Upload_Image')%>" border=0>


Sandra Roussel
Chonsa Group Design - Fresh Start Housing

Last edited by:

SandraR: Jul 6, 2006, 8:42 PM
Quote Reply
Re: [SandraR] Attachment Plugin In reply to
remember to create the : upload_images

FOLDER so your images have a place to go.



Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [yogi] Attachment Plugin In reply to
Hi Ivan,

I inform you that your Plugin Attachment is not compatible any more with version 3.

It would be correct to indicate it on your page of sale (...)

Oyo