Gossamer Forum
Home : Products : Links 2.0 : Customization :

Searching for Upload MOD

Quote Reply
Searching for Upload MOD
Hi,

Does anybody know where can I find the Upload MOD...



thanks

Ahmad
Quote Reply
Re: [flashlancer] Searching for Upload MOD In reply to
I did some digging and found part of the mod Phoenix did and the one cjhveill put together latter on...

I have gotten this mod to work as is, but probably wont be able to provide you with much support...

the add.cgi and the 3 add.html files are attached...


hope this helps!
chuck

====================================
Here is the much anticipated Upload Mod previously posted by Phoenix.
I have gathered the info from a number of sources including several
posts and help from YellowKard from www.fullwormage.com.

I have it running on Unix but have had little luck with Win so far.

The current mod will allow users to upload a file or specify a URL
but not both.

1. Replace the add.cgi file. With the new one. Located at www.journeyit.com/download/add.cgi
You will want to modify the automated email sent to the administrator.
2. Then edit links.def file and make sure the URL field is set to be not mandatory with a 0
for the 5th attribute.

ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 75, 1, '', ''],
URL => [2, 'alpha', 40, 75, 0, 'http://', '^http|news|mailto|ftp'],
Date => [3, 'date', 15, 15, 1, \&get_date, ''],
Category => [4, 'alpha', 0, 150, 1, '', ''],
Description => [5, 'alpha', '40x3', 500, 0, '', ''],
'Contact Name' => [6, 'alpha', 40, 75, 1, '', ''],
'Contact Email' => [7, 'alpha', 40, 75, 1, '', '.+@.+\..+'],
Hits => [8, 'numer', 10, 10, 1, '0', '\d+'],
isNew => [9, 'alpha', 0, 5, 0, 'No', ''],
isPopular => [10, 'alpha', 0, 5, 0, 'No', ''],
Rating => [11, 'numer', 10, 10, 1, 0, '^[\d\.]+$'],
Votes => [12, 'numer', 10, 10, 1, 0, '^\d+$'],
ReceiveMail => [13, 'alpha', 10, 10, 1, 'Yes', 'No|Yes']

3. Then in links.cfg add:

Under Path setup add (Make sure you create the Dir /Attach or it will not work):
# PATH and URL of Attach Folder
$build_attach_path = "$build_root_path/Attach";
$build_attach_url = "$build_root_url/Attach";

Between database options and email options add:
# Uploaded File Settings
# --------------------------------------------------------

# Name of the field in your links.db where the URL of the uploaded
# file will be stored
$attach_file_field = "URL";

# Do you want this to be a required field? 1=Yes 0=No
$attach_field_required = 0;

# Maximum size for file attachments (in KB)
$attach_file_size = "2000";

# List of allowable file extensions. If the file does not have one of the extensions
# listed, it will not be saved to the server. The format for the setting is
# \.extension$
# If you want to allow more than one extension, separate the options by
# a | character. On a UNIX server, these are case sensitive.
$attach_ext = '\.*$';

4. In the add.html file:
Change the form action to the following:
<form action="<%db_cgi_url%>/add.cgi" enctype='multipart/form-data' method="POST">

Add a field where you want the entry for upload:
<input type="file" name="attach">

Should work with those modifications.

Christian

=====================================
Crazy

Last edited by:

Dingle_B: Mar 28, 2003, 4:38 PM
Quote Reply
Re: [Dingle_B] Searching for Upload MOD In reply to
thank you very much, I will download it & test it



thanks....

Ahmad
Quote Reply
Re: [flashlancer] Searching for Upload MOD In reply to
your welcome!Cool







chuck
Crazy
Quote Reply
Re: [Dingle_B] Searching for Upload MOD In reply to
cool mod, but when im upload image, it creat a XX-image.gif file with only text from my add.cgi page "Add a listing"

where XX -nomber of link i add.



please help how to solve this problem?
Quote Reply
Re: [roman ch.] Searching for Upload MOD In reply to
Did you call it with an <img src= > tag?


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Searching for Upload MOD In reply to
sorry but you not understand.

i need to upload it.



itr upload, but file contains(when it uploaded) text from my <title></title> of add.cgi "Add listing"

BUT NO IMAGE THAT I UPLOAD.



its so strage, please help.
Quote Reply
Re: [Dingle_B] Searching for Upload MOD In reply to
www.journeyit.com/download/add.cgi doesn't work do you could you give a different link

Thank you