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

Attachment Plugin

(Page 3 of 3)
> >
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
> >