[pmwiki-users] image name without having to type it on

April Barrett abarrett at eecs.berkeley.edu
Fri Dec 1 16:41:04 CST 2006


Hello:

I have successfully created a way to have a table added underneath 
another table to make it appear as rows using
http://www.pmwiki.org/wiki/Cookbook/AddDeleteLine2.

The first column of the row contains and image and some text.  Is there 
a way to have the image name automatically uploaded instead of having 
the user type in the name?  That way the image would appear using 
"Attach:Image-example.jpg" automatically using the name of whatever file 
was uploaded.

The code:
*************************
!!!
'''Enter a New Company:'''
(:linebreaks:)
(:input form method=post enctype=multipart/form-data :)
(:input hidden name=n value={$FullName}:)
(:input hidden name=action value=postupload:)
File to upload:   (:input file name='uploadfile':)
Name of upload: (:input text name='upname':) (IMPORTANT: if the file 
name is intel-logo.jpg, you must type in intel-logo.jpg in this field or 
the image will not show)
(:adl form entry:)

(:table:)
(:cellnr:)Company Profile:
(:cell:)(:input textarea profile rows=10 cols=34:)
(:cellnr:)Company URL:
(:cell:)(:input text curl size=45:)
(:cellnr:)Faculty Affiliation:
(:cell:)(:input text faculty size=45:)
(:cellnr:)Faculty Title:
(:cell:)(:input text ftitle size=45:)
(:cellnr:)Faculty URL:
(:cell:)(:input text furl size=45:)
(:cellnr:)Outcome:
(:cell:)(:input text outcome size=45:)
(:cellnr:)(:input submit ok Enter:)
(:adl templatepage [[MultiLineTemplate]]:)
(:adl end:)
*************************

Using the template:
*************************
!!!
(:table border=0 cellspacing=0 cellpadding=15:)
(:cellnr width=33% align=left:)
[[{curl} | (Attach:){uploadfile}]]

{profile}

[[{curl} | {curl}]]

(:cell width=33% align=left:)
[[{furl} | {faculty}]], {ftitle}

(:cell width=33% align=left:)
{outcome}
(:tableend:)
----
*************************

thanks.








More information about the pmwiki-users mailing list