Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Image in detailed page

Quote Reply
Image in detailed page
Hi again all

Just wondering if someone can help,

i am giving companies an option to upload there company logo when submitting there link, but the problem is on the detailed page i have got the logo of each company to show up but if a company does not supply a company logo i would like a default image of mine show up saying "image not available" i am not sure how to accomplish this.

Any help would be appricated.

Thanks before hand

Kirk


--------------------------------------------------

Life isn't like a box of chocolates ... it's more like a jar of jalapenos. What you do today might burn your ass tomorrow.
Quote Reply
Re: [mekro] Image in detailed page In reply to
Use something like;

<%ifnot GraphicField%>
<img src="http://www.yoursite.com/not_available.gif">
<%endifnot%>

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: [AndyNewby] Image in detailed page In reply to
Hi Andy

I have tried what you wrote but i am not sure how to incorprate it into what i have which is:

<%if Logo_add%><img src="<%db_cgi_url%>/jump.cgi?ID=<%ID%>&view=Logo_add"><%endif%>

I have tried it many ways with your code but it either shows both images on each page or shows the right one on one page and does not show the other on a different page, i stoped at this code

<%if Logo_add%><img src="<%db_cgi_url%>/jump.cgi?ID=<%ID%>&view=Logo_add"><%ifnot Logo_add%><img src="http://www.mekro.com/images/dir/logo_na.jpg">
<%endifnot%><%endif%>

That one shows the company logo on the detail pages that have a company logo but it does not show the image not available on pages that don't have a company logo.

Any ideas.

Kirk


--------------------------------------------------

Life isn't like a box of chocolates ... it's more like a jar of jalapenos. What you do today might burn your ass tomorrow.
Quote Reply
Re: [AndyNewby] Image in detailed page In reply to
Hi Andy

Thanks again for the code but i got it sorted using the following:

<%if Logo_add%><img src="<%db_cgi_url%>/jump.cgi?ID=<%ID%>&view=Logo_add"><%else%>
<img src="http://www.mekro.com/images/dir/logo_na.jpg">
<%endif%>

And it works perfectly.

Thanks again.

Kirk


--------------------------------------------------

Life isn't like a box of chocolates ... it's more like a jar of jalapenos. What you do today might burn your ass tomorrow.
Quote Reply
Re: [mekro] Image in detailed page In reply to
Hi. I don't understand why you go through jump.cgi for the image (<%db_cgi_url%>/jump.cgi?ID=<%ID%>&view=Logo_add>), why not use;


<%if Logo_add%><img src="<%Logo_add%>"><%endif%><%ifnot Logo_add%><img src="http://www.mekro.com/images/dir/logo_na.jpg"><%endifnot%><%endif%>

BTW, the reason your other code was not working was because you were missing a closing <%endif%> after the first 'if' tag Wink

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: [AndyNewby] Image in detailed page In reply to
Hi Andy

Tried the code you gave me but sorry to sayAngelic its pulling up some nasty end if and if not errors and its just calling up one certain image logo.gif and nothing elseBlush.

The reason i am using the jump.cgi way is i found a disscusion about this in the forum somewhere so i had to edit the code to fit to my site.

Not a probablem though at least i got it to workLaugh

Kirk


--------------------------------------------------

Life isn't like a box of chocolates ... it's more like a jar of jalapenos. What you do today might burn your ass tomorrow.
Quote Reply
Re: [mekro] Image in detailed page In reply to
OOps, i had 1 too many <%endif%> tags in there. This would work;

<%if Logo_add%><img src="<%Logo_add%>"><%endif%><%ifnot Logo_add%><img src="http://www.mekro.com/images/dir/logo_na.jpg"><%endifnot%>

Blush

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: [AndyNewby] Image in detailed page In reply to
That can be written better as:

Code:
<%if Logo_add%>
<img src="<%Logo_add%>">
<%else%>
<img src="http://www.mekro.com/images/dir/logo_na.jpg">
<%endif%>


Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Image in detailed page In reply to
Hi alex

I was hoping you could help me with this problem and that is i used the code you wrote as it was cleaner than the one i was using, but the problem is <img src="<%Logo_add%>"> is trying to pull the images from www.mekro.com/Detailed/(imagename.gif)

I have set the location of uploaded images in the database to save in /home/mekro/www/images/companylogos and in hashed mode

So i don't understand why it is not pulling the images up, it is however pulling up a image not available image but how can i get it to show the companies logo.

Any help would be appreciated.

Kirk


--------------------------------------------------

Life isn't like a box of chocolates ... it's more like a jar of jalapenos. What you do today might burn your ass tomorrow.
Quote Reply
Re: [mekro] Image in detailed page In reply to
Hi Kirk,

Ah, sorry I didn't realize it was a file upload field. You can do:

<img src="<%db_cgi_url%>/jump.cgi?ID=<%ID%>&view=Logo_add">

where Logo_add is the name of the column with the image.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [mekro] Image in detailed page In reply to
hi,

from my admin, upload and display of pics on the detailed page works quite well.

in my add-a-link and modify-link form (both: form.txt) i put the following



<input type="file" name="Logo_add">

but the selected logo (e.g. C:\logos\companylogo.gif) will not be stored into my database.



What's wrong? Can anybody help?

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] Image in detailed page In reply to
Guten tag Manu

It could be a number of thinks.

1. Is the field you are requesting the right name "Logo_add"
2. Did you set the save loctaion within the field names database, i.e /home/www/username/location

Apart from that i am not sure.

Sorry i couldn't be more help.

Kirk


--------------------------------------------------

Life isn't like a box of chocolates ... it's more like a jar of jalapenos. What you do today might burn your ass tomorrow.
Quote Reply
Re: [mekro] Image in detailed page In reply to
yes the field name is "Logo_add" and the path i've setup is also correct.

uploading images/logos from the admin (Links...Add ; Links...Modify) works perfect!



But it doesn't work from the submit-formular (form.txt)Frown

cheers,

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] Image in detailed page In reply to
If you like could you send over the html form file you are using and i can have a look to see if you have missed anythink within the html.

Send them to ksjames4@aol.com and i will take a look.

Kirk


--------------------------------------------------

Life isn't like a box of chocolates ... it's more like a jar of jalapenos. What you do today might burn your ass tomorrow.
Quote Reply
Re: [mekro] Image in detailed page In reply to
it's still the same form i've used "for years".

the only thing i've added is:



<input type="file" name="Logo_add">





Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] Image in detailed page In reply to
Hi manu

I know it might seem a stupid question but the folder you have specified where to store the uploaded images, does it excits if not just ftp into your site and create the folder to store the logos and maybe that should do it.

Other than that it must be something that is entered wrong within the admin area.

Kirk


--------------------------------------------------

Life isn't like a box of chocolates ... it's more like a jar of jalapenos. What you do today might burn your ass tomorrow.
Quote Reply
Re: [mekro] Image in detailed page In reply to
of course the folder do exist!

else the logo upload wouldn't work from the admin (add link/modify link) and no logo would be displayed afterwards on the detailed page!

cheers,

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] Image in detailed page In reply to
Hi Manu,

A common problem is that you don't have:

ENCTYPE="multipart/form-data"

in your <FORM> tag in the add.html template (and you'll need it in the modify one as well).

Let me know if this helps,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Image in detailed page In reply to
hi alex,

indeed that code was not in every template.

but now i have the following :


<form action="<%db_cgi_url%>/add.cgi" ENCTYPE="multipart/form-data" method="POST">

in
  • add.html
  • add_error.html
  • modify.html
  • modify_error.html
  • modify_select.html




but still it doesn't work.....and i don't know why !

cheers,

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.

Last edited by:

ManuGermany: Mar 14, 2002, 12:17 PM
Quote Reply
Re: [ManuGermany] Image in detailed page In reply to
You want to point to modify.cgi for the modify_* templates ;)

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: [ManuGermany] Image in detailed page In reply to
Hi,

Very strange. Can you send an email to support-lsql@gossamer-threads.com with access to your admin area so we can take a look and see what is going wrong?

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Image in detailed page In reply to
o.k., the logo upload works more or less,

but now i've got another problem. most of my partners are changing there links and are loading up their logos.

when i'm going to validate the changes in the admin, the validations will be made but then i only see a blank page.

for example:

i have 5 changed links to validate.

when i click on the radio-button "modify" and afterwards at the submit button "Validate Selected" to validate 3 of them i should see afterwards a screen with the 2 not validated changed links. but instead of this i just get a blank screen in my admin.

what's wrong?



----------



... now it works but i don't know why. maybe it's because i had to validat more than 30 changes before and now there just 6 changes to validate.. or it's something else

cheers,

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.

Last edited by:

ManuGermany: Mar 15, 2002, 7:56 AM
Quote Reply
Re: [ManuGermany] Image in detailed page In reply to
i found out some strange things..

the "white screen" just appears if there are more than 9 changed links left to validate.



another thing i found out is, that if someone loads up an image, you can view it from the admin (links..validate) via the small link "view" next to the image name.

but this link doesn't work if you are not validating all changed links at once.



example :
  • you have 5 changed links ("view"-link works)
  • you validate 3 of them
  • automatically you see the last 2 unvalidated changed links ("view"-link doesn't work!)


that's very strange .....

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.

Last edited by:

ManuGermany: Mar 16, 2002, 10:41 AM