Gossamer Forum
Home : Products : Gossamer Links : Discussions :

[EXAMPLE] Image upload help.. using FILE types

(Page 1 of 2)
> >
Quote Reply
[EXAMPLE] Image upload help.. using FILE types
Hi,

I thought I'd post this as a bit of help, for those who are struggling with file uploads :) (this example is for images, gif/jpg/png);

Quote:
Column Name: Image1
Column Type: CHAR
Column Size: 255
Not Null: No

Form Information

Form Display: Image 1
Form Type: FILE
File Save Location: /full/path/to/where/images/should/be/saved
File Save URL: http://www.domain.com/full/location/where/images/should/be/saved/
File Save Method: HASHED
File Maximum Size: 250000
Form Regex : ^([%\w-]+\.(?:jpe?g|JPE?G|gif|GIF|png|PNG)|)$


You also need to add something like this in include_form.html;


<div class="row clear">
<label for="Image1" class="name">Image:</label>
<div class="value">
<input type="file" name="Image1" class="text">
</div>
</div>

Hope that helps anyone whos looking at adding image uploads in GLinks 3.0.x Smile

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!

Last edited by:

Andy: Nov 1, 2008, 3:16 AM
Quote Reply
Re: [Andy] [EXAMPLE] Image upload help.. using FILE types In reply to
Hi ANdy,

Thanks for posting this, it has helped me out alot.

I have added the code above. I don't get any errors however when I log in as a user (include-form) and upload an image, when the admin goes and validates the link, the images that the user posted is not showing up. Do you have any idea why? Also is thier way for the user to be able to (download and view) the images, like it is in the admin panel?
Quote Reply
Re: [netnow21] [EXAMPLE] Image upload help.. using FILE types In reply to
It won't actually show up. You need to click the "view" or "display" link next to the image field. It's not an inline display, unfortunately. But, it allows for non-image file types.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Post deleted by theguy In reply to
Quote Reply
Re: [pugdog] [EXAMPLE] Image upload help.. using FILE types In reply to
do we need to add something to link.html?

because the uploaded file is not there in the directory
it's only found in the admin area
Quote Reply
Re: [theguy] [EXAMPLE] Image upload help.. using FILE types In reply to
Depends if you have the enctype="multipart/form-data" part in your <form ...> part =)

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] [EXAMPLE] Image upload help.. using FILE types In reply to
this is what i got

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

do i need to change it to make it work as i want it?
Quote Reply
Re: [theguy] [EXAMPLE] Image upload help.. using FILE types In reply to
could someone please help me.
how to make this thing work properly
Quote Reply
Re: [theguy] [EXAMPLE] Image upload help.. using FILE types In reply to
Hi,

I think you still need to use a global to display the image. Here is a very old thread that I think is still valid:
http://www.gossamer-threads.com/...i?post=184526#184526
Quote Reply
Re: [afinlr] [EXAMPLE] Image upload help.. using FILE types In reply to
i don't need to add an image, i want to add a pdf file which the admin can see but not everyone's else. i want the link to the pdf to be shown next to the link
Quote Reply
Re: [Andy] [EXAMPLE] Image upload help.. using FILE types In reply to
did i explain myself clearly or do i need to explain it better?

just like there is a link to review it and rate in the directory i want a link to the PDF which is found in admin area but not in the directory
Quote Reply
Re: [theguy] [EXAMPLE] Image upload help.. using FILE types In reply to
the maker of the software used to be alot more helpfull 5 years ago.
did Alex sell the company
Quote Reply
Re: [theguy] [EXAMPLE] Image upload help.. using FILE types In reply to
yea you can still get alot of help here but it takes alot longer than it used too. Not sure why, maybe not as many people use this product as much as they used too.
Quote Reply
Re: [theguy] [EXAMPLE] Image upload help.. using FILE types In reply to
In Reply To:
i don't need to add an image, i want to add a pdf file which the admin can see but not everyone's else. i want the link to the pdf to be shown next to the link

<%config.db_cgi_url%>/jump.cgi?ID=<%ID%>;view=FIELD_NAME

i.e;

<%config.db_cgi_url%>/jump.cgi?ID=<%ID%>;view=PDF_File

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] [EXAMPLE] Image upload help.. using FILE types In reply to
when someone modify a link or submit a review then i have to validate it before it appears, how can i make it show up without validation
Quote Reply
Re: [theguy] [EXAMPLE] Image upload help.. using FILE types In reply to
Hi,

You can't :( The problem is a very old one. Basically, when you have "Validate Changes" set to "yes", it saves the changes to lsql_Links_Changes. The image is updated in real time (i.e after they submit the changes). This is something I battled with a lot in Thumb_Images (exactly the same problem).

Maybe GT have a solution now that I'm not aware of? Angelic

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] [EXAMPLE] Image upload help.. using FILE types In reply to
how about when you submit a review?

i want it to be shown whithout validation? is this possible?
Quote Reply
Re: [theguy] [EXAMPLE] Image upload help.. using FILE types In reply to
You have to turn off admin validation :(

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] [EXAMPLE] Image upload help.. using FILE types In reply to
i did turn off administration validation when someone submit a link but where do i turn it off for review
Quote Reply
Re: [theguy] [EXAMPLE] Image upload help.. using FILE types In reply to
Setup => Review Options => review_auto_validate

Adrian
Quote Reply
Re: [brewt] [EXAMPLE] Image upload help.. using FILE types In reply to
i'm using links sql 2.1.1

this option is not available
Quote Reply
Re: [theguy] [EXAMPLE] Image upload help.. using FILE types In reply to
Sorry, that option was added in GLinks 3.0.1.

Adrian
Quote Reply
Re: [brewt] [EXAMPLE] Image upload help.. using FILE types In reply to
is there anyway to do it in links sql 2.1.1
Quote Reply
Re: [theguy] [EXAMPLE] Image upload help.. using FILE types In reply to
there should be a way to do it.
please someone help me
Quote Reply
Re: [theguy] [EXAMPLE] Image upload help.. using FILE types In reply to
Your options are to either upgrade to 3.x (which is a free upgrade), or pay someone to add the functionality into your copy.

Adrian
> >