Gossamer Forum
Quote Reply
Thumb_Images
Hello,
Thumb_Images is a very useful tool and it was very easy to install and configure.

But i have a little Problem with modify_cgi.

If a user want to modify a link, there is an error if you dont choose the same number of images you choosed the first time when you created the link.
(using Tumb_Images to create the link.)
The error is:
Imagexxxx can not contain the value ''

This is in the include_form:
<div class="row clear">
<label for="Image1" class="name">Image1:</label>
<div class="value">
<input type="file" id="Image1" name="Image1" value="<%if Image1%><%escape_html Image1%><%endif%>" class="text" />
</div>
</div>

Thanks and regards
manne


http://www.edelsteine.de
Quote Reply
Re: [manne] Thumb_Images In reply to
Smile, OK, it seems, there is no simple solution...

And its no problem if i can use the add.cgi template from the category.

But this is an other question:

If i let build a category different to the default template,
the add or the include_form template will be used from the default template (build_default_tpl) ?

Why??
It seems, that all templates in the category that are used are the correct templates of the category.
Only the add.cgi will be build from the default template.

Is there a solution for ? Angelic

best regards from the world cup city Leipzig,
where is a state of emergency at the moment...Smile


http://www.edelsteine.de

Last edited by:

manne: Jun 15, 2006, 9:14 AM
Quote Reply
Re: [manne] Thumb_Images In reply to
Oh it seems its easier like i thought before.

To get a add.html template different to the default template, you have only

put

<li><a href="<%config.db_cgi_url%>/add.cgi?t=template_name_you_want_to_use">Add</a></li>

into the include_header.html template.

maybe it helps other beginners, if they use the search here in the forum.

cheers

manne


http://www.edelsteine.de
Quote Reply
Re: [manne] Thumb_Images In reply to
Hi,

I've got new versions of the various image utils in the works, just have had a rough couple of months do a lot of stuff going on. Haven't been on-line much.

There are some ways to include templates into other templates, and have then abort, or load other templates based on some parameters.

If you look at the top of the category.html you will see how links decides to load the custom category template over the default template. The <%endparse%> tag stops further processing of that particular template, so if it's used BEFORE any <html> tags and such are sent, the new template effectively replaces the one that loaded it.

As for the images issue with thumb-images, I sort of got lost, but that's probably me, as I had a migraine earlier that put me out for the count.

I'm still trying to get all this packaged up, but if there are specific things you need let me know.

Right now I have the various profile and image modules oddly integrated, just to get them working, and I've been working backwards putting them in their own modules for release.


PUGDOG� Enterprises, Inc.

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

i am still wondering that the error message ask for the image-field,
although in the database the image-field not null is set to NO.
This in modify.cgi.

best regards to all.....

Wink england was winning 2:0 yesterday against Trinidad. ...Wink

where is Trinidad ??Cool


http://www.edelsteine.de
Quote Reply
Re: [manne] Thumb_Images In reply to
Hi,

Mmm.. do you have a regex setup for your image field? If so, that may be why its still asking for a value :)

Quote:
Wink england was winning 2:0 yesterday against Trinidad. ...Wink

where is Trinidad ??Cool

Yeah, we only just made it though :/ Lot of people over here are very dissapointed with how that game went :/

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] Thumb_Images In reply to
Quote:
...Mmm.. do you have a regex setup for your image field? If so, that may be why its still asking for a value....

....yes , ... i have a regex, ... for more security... cause i don t want that someone load up his old shoes on my server...Smile ...i think i understan you. You mean a used regex is mor dominated like the "not null" field... Or is it possible to complete a regex with the possibility of NULL...?? I will check using google also... thanks and the best ... manne


http://www.edelsteine.de
Quote Reply
Re: [manne] Thumb_Images In reply to
Hi,

The error is coming *from* the regex. When GLinks pre-processes the input data, it sees that what was put in that field was *not* a valid data item for that field (file name, probably).

I *really* do have new routines on the way, that do internal checking, and which you can set to accept only the formats of the image files you want to accept.

It's not really ready for general consumption, as a plugin, but if you have a specific need/location you want the thumbnails, or more robust image formatting to work, I can install it manually, and make it work for your location (It's plug-in compatible so it will survive Links upgrades, and the future plugins will just install over it). It depends on only two hooks, I think. I simplified it from what Andy had, and it seems to be working on the beta site. I've just split up my beta site, and will be writing a really simple clone of the most basic of the modeling/photographer sites using the existing code (why? The program I *thought* was simple, is just expanding too much). This program will let you attach images to a link, including a "logo". The logo can have a formatting different from the rest of the images. The Link can then be used for a product, a model, whatever. The linked images can be displayed by template (you can allow a person to select a template from a list to show off) on the "detail" page below the other information from the link. There will be extra features and such, such as image comments, and ability to sort the images for display (so they are not randomly or time/alpha displayed only).

It might be overkill for what you need, but if you have a specific site/example need you want fixed up give me the URL and I can see if one of the existing routines will do it. I'm hoping to have a beta of this mini-site up for demo in a few days, depends on how much time I have. All the parts for it are ready, just have to put them in a logical format. When you add on community, and link in GForum, you now have a site with personal galleries, forums, discussions, private mail, and more. *AND* it's stable, time-tested, and pretty damn secure.

I also have a load of display options for the images, that are callable from within the template, and as such don't use any hooks, just the data you pass in.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [manne] Thumb_Images In reply to
Hi,

Can you post the regex you currently use?

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] Thumb_Images In reply to
Hello,
thats the working regex.

^[\w-]+\.(?:jpe?g|JPE?G|gif|png|GIF)$

I am on the road, thats why i need so long to answer.

@pudog
The site is not "in production" until now.
I am trying out what s possible and what way it will go.
I was trying out let registered customers upload products with images.
The thumb_images plug_in makes it easy to resize one ore more pictures and put them in a detailed page or whatever.
Only if one or more of the image-input fields in the add- or modify-form are emty, the regex problem come.

best regards from the football crazy germany.

manne


http://www.edelsteine.de

Last edited by:

manne: Jun 20, 2006, 3:34 AM
Quote Reply
Re: [pugdog] Thumb_Images In reply to
Hi, do you have any plug-ins for putting a thumb or small image beside each category name. It would be nice if this also worked for sub cats. Thanks, Shell
Quote Reply
Re: [shell] Thumb_Images In reply to
The current release version of thumb_images allows for images by both links and categories.

The modifications I've made allow for more flexibility in how to upload images, and where to put them.

One version allows more flexible image attachment to a link (eg: The link *is* the image) as in the postcards site. The other version allows a link to contain or "group" a large number of images.

My modified version has probably left the category image code intact, but may have removed it in favor of a newer system that would mesh more properly with the logic of the new/updated image code.

But, you can attach an image to the categories, and it's been done on many sites, and it's not a problem. Especially if you don't need the images to change -- sort of like using an airplane or company logo by the category for that product.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.