Gossamer Forum
Quote Reply
Setup - Thumb Images GD
Hi Andy,
I'm using your plugin thumb images gd quite a long time.
In the past I used it for thumbnails (150x150) in link.html. The original images are from the field "Picture"

Now I need a second bigger thumbnail (450px width) from the same image, to show it on detailed pages...
Can you tell me if this is possible?

Thanks

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] Setup - Thumb Images GD In reply to
Hi,

What version of the plugin are you using? This is possible in the latest version :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Setup - Thumb Images GD In reply to
I installed the GD version 1.2 yesterday, but I don't know how to get the bigger thumbnail.
Where do I put the info for the bigger thumbnail 450x450 ?

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] Setup - Thumb Images GD In reply to
Hi,

Check out the "Settings" part of the plugin. There should be a new option there. You can then access the tag via a new paramater.

Let me know if you still cant get it working (I know for sure this exists in Thumb_Images, but am only 95% sure its in Thumb_Images_GD - without looking :))

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Setup - Thumb Images GD In reply to


Hi Andy,
do you mean this part?
Code:

If you want to call an image, other than small-* , you can do it with:


<img src="<%Plugins::Thumb_Images_GD::ThumbURL($ID,'Photo','Links','type')%>" border="0">
So, if you have a "medium" image, you can call it with:
<img src="<%Plugins::Thumb_Images_GD::ThumbURL($ID,'Photo','Links','medium')%>" border="0">
This would get the medium-*. image, instead of small-*

How do I define the dimensions of the medium image in the setup?
At the moment I have the field Smaller set to 150x150

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] Setup - Thumb Images GD In reply to
MMm weird - there should be a field in the settings for that - the code is there:

Code:
if ($PCFG->{LinkImageSizes}) {
my @split = split /\n/, $PCFG->{LinkImageSizes};
foreach (@split) {
my ($field,$type,$size) = split /\:/, $_;
$other_sizes->{'Links'}->{$field}->{$type} = $size;
}
}

Lemme have a look and see what I can come up with.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Setup - Thumb Images GD In reply to
When you have a look at the plugin, anyway. I must report another issue with the plugin.

When I validate and upload an image. The thumbnail is not there.
I always have to modify the link and upload the image again, and after this the thumbnail is there...

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] Setup - Thumb Images GD In reply to
Hi,

Ok, so when you validate a link (with a new image you uploaded), the image doesn't get shrunk? Is it ok when the user uploads the image, and you don't edit it?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Setup - Thumb Images GD In reply to
I have to try this, cause I always edit the images. Wait a minute ;-)

Matthias
gpaed.de
Quote Reply
Re: [Andy] Setup - Thumb Images GD In reply to
Andy wrote:
Is it ok when the user uploads the image, and you don't edit it?

Yes, this way is working fine...


Andy wrote:
Hi,

Ok, so when you validate a link (with a new image you uploaded), the image doesn't get shrunk?
Cheers

Yes, that's the problem

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] Setup - Thumb Images GD In reply to
Hi,

I've just uploaded a fixed version - can you have a go?

Just gonna have a look at that other bug you mentiuned.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Setup - Thumb Images GD In reply to
O.K. now I have a lot more settings ;-)
Just to get it right.
Can I change the size of the large image to 450x450 or do I have to use 500x500 ?

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] Setup - Thumb Images GD In reply to
Hi,

What you would do, is something like:

Image:medium:450x450

(then run "Cleanup" to re-generate these images)

Regarding the other bug - it looks like the problem is that we dont have a validate_link hook. I'm just trying to set it up now (the problem seems to be that we cant do a POST hook on it - which is a bit word). Just having a look deeper now.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Matthias70] Setup - Thumb Images GD In reply to
Mmm ok - doesn't look like its possible :(

I've got it working on the PRE hook, but we don't have a way to pass in the fiel name - example of the data we get from $args:

Code:
$VAR1 = {
'isPopular' => 'No',
'Status' => '0',
'ExpiryDate' => '2147483646',
'Contact_Email' => 'andy.newby@gmail.com',
'ExpiryNotify' => '0',
'Mod_Date' => '2010-05-13',
'Votes' => '10',
'GooglePRLastChecked' => '20100102',
'Has_Priority' => '0',
'isChanged' => 'No',
'_mode' => 'validate',
'Date_Checked' => '2009-02-17 01:28:26',
'Build_Detailed_Page' => '0',
'LinkExpired' => '',
'URL' => 'http://www.test.com',
'ExpiryCounted' => '0',
'pe_radio' => 'on',
'isValidated' => 'No',
'Address1' => '',
'Contact_Name' => 'Admin',
'ID' => '4',
'pe_date' => '',
'City' => '',
'State' => '',
'Title' => 'test',
'Add_Date' => '2010-05-13',
'Recip_Emails_Sent' => '1',
'UseGuestbook' => '1',
'MapMarkerImage' => '',
'Hits' => '40',
'Timestmp' => '2010-05-13 01:48:50',
'CatLinks.CategoryID' => '2',
'Rating' => '8.20',
'Image' => 'merrychristmas2.gif',
'isNew' => 'Yes',
'LinkOwner' => 'admin',
'Country' => '',
'Has_Rating' => '',
'ZIP' => '',
'Recommend_Count' => '18',
'GooglePR' => '6',
'Description' => 'ojwdfpja'
};

...but the $args->{Image} field is just a basic text field (and not a "file" object, which means we can't porocess it)

Bit of a bugger really

GT, if you read this - in the next version, could you either:

1) Pass the ID number in for that record ... i.e fields get prefixed with 1-Image, 2-Image, etc (the number, *not* the ID number)
2) Have a way that we can access the file object when processing it :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Matthias70] Setup - Thumb Images GD In reply to
I've emailed GT about it in case there is something I'm missing (but I don't think there is). Hopefully they will add it in for the next versions :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Setup - Thumb Images GD In reply to
Andy wrote:
I've emailed GT about it in case there is something I'm missing (but I don't think there is). Hopefully they will add it in for the next versions :)

Cheers

Hi Andy,
you are very optimistic, when you think about an next version ;-)
I wrote an comment on the actual blog post of GT 6 days ago and it's is still awaiting moderation Whistle
http://www.gossamer-threads.com/blog/custom-video-sharing-gossamer-links-venetubo/
and
the footer of the GT page still shows © 1995-2009 Gossamer Threads Inc. Whistle

I think we have to wait still a long time for any (GT forum 2.0, GT Community luna, GT links 3.4) updates Frown

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] Setup - Thumb Images GD In reply to
Hi,

heheh - they may release a "fix" though (not a new version, but a fix to the files that allow this change I need :))

I know for a fact GForum is very very near completition - so hopefully now much longer now Whistle

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Setup - Thumb Images GD In reply to
I believe the reason why it's not working is that the validate forms don't have the enctype attribute set for file uploads (don't know why nobody hasn't run into this previously). This patch to the admin templates should fix it:

Code:
Index: tools_validate.html
===================================================================
RCS file: glinks/cgi/admin/templates/admin/tools_validate.html,v
retrieving revision 1.9
diff -u -r1.9 tools_validate.html
--- tools_validate.html 15 Apr 2005 22:10:11 -0000 1.9
+++ tools_validate.html 13 May 2010 19:33:03 -0000
@@ -90,7 +90,7 @@
<input type="hidden" name="page" value="tools_validate.html">
<input type="hidden" name="mh" value="<%if mh%><%mh%><%else%>5<%endif%>" id="mh">
</form>
-<form action="admin.cgi" method="post" name="valform">
+<form action="admin.cgi" method="post" name="valform" enctype="multipart/form-data">
<input type="hidden" name="do" value="page">
<input type="hidden" name="page" value="tools_validate.html">

Index: tools_validate_changes.html
===================================================================
RCS file: glinks/cgi/admin/templates/admin/tools_validate_changes.html,v
retrieving revision 1.8
diff -u -r1.8 tools_validate_changes.html
--- tools_validate_changes.html 31 May 2006 03:25:12 -0000 1.8
+++ tools_validate_changes.html 13 May 2010 19:33:03 -0000
@@ -93,7 +93,7 @@
<input type="hidden" name="page" value="tools_validate_changes.html">
<input type="hidden" name="mh" value="<%if mh%><%mh%><%else%>5<%endif%>" id="mh">
</form>
-<form action="admin.cgi" method="post" name="valform">
+<form action="admin.cgi" method="post" name="valform" enctype="multipart/form-data">
<input type="hidden" name="do" value="page">
<input type="hidden" name="page" value="tools_validate_changes.html">

Index: tools_validate_reviews.html
===================================================================
RCS file: /cvs/gossamer/glinks/cgi/admin/templates/admin/tools_validate_reviews.html,v
retrieving revision 1.5
diff -u -r1.5 tools_validate_reviews.html
--- tools_validate_reviews.html 15 Apr 2005 22:10:11 -0000 1.5
+++ tools_validate_reviews.html 13 May 2010 19:38:47 -0000
@@ -90,7 +90,7 @@
<input type="hidden" name="page" value="tools_validate_reviews.html">
<input type="hidden" name="mh" value="<%if mh%><%mh%><%else%>5<%endif%>" id="mh">
</form>
-<form action="admin.cgi" method="post" name="valform">
+<form action="admin.cgi" method="post" name="valform" enctype="multipart/form-data">
<input type="hidden" name="do" value="page">
<input type="hidden" name="page" value="tools_validate_reviews.html">

Adrian

Last edited by:

brewt: May 13, 2010, 12:39 PM
Quote Reply
Re: [brewt] Setup - Thumb Images GD In reply to
Ah ok thanks - will give that a go tomorrow :) (hopefully its that simple <G>)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [brewt] Setup - Thumb Images GD In reply to
Hi,

Perfect, that seems to have done the trick :)

Just having a look now at editing the code so it works properly.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [brewt] Setup - Thumb Images GD In reply to
Hi,

Ok, still seems to be an issue :(

[
'validate_link',
'PRE',
'Plugins::Thumb_Images_GD::Admin_DoValidate',
'1'
],

This is calling it fine, but it still accesses the OLD image for that record (not the new one uploaded)

I tried doing a POST hook, but that gives this when run:

Quote:
FOO:

$VAR1 = {};

Fields: $VAR1 = 'Image';
Validate Records

Validate Records

This allows you to validate links that users have suggested.

HASH(0x14c5f80)

Any ideas?

BTw, $VAR1 = {}; should actually hold all the links details.

TIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!