Page 1 of 2
FEU properties and file uploads
Posted: Thu Dec 03, 2009 11:08 pm
by lollol
I tryed searching the site but no luck...
I need my users to upload a CV upon registration, what are my options?
Thanks!
Re: FEU properties and file uploads
Posted: Fri Dec 04, 2009 2:27 am
by jmcgin51
You want them to be required to upload a CV when they register, or you want them to have the option?
Re: FEU properties and file uploads
Posted: Fri Dec 04, 2009 5:48 pm
by lollol
It should be optional... you are getting my hopes up

Re: FEU properties and file uploads
Posted: Fri Dec 04, 2009 7:40 pm
by jmcgin51
This thread links to an explanation of how to create a simple document management system, which is essentially what I think you are trying to do. It is not done directly as part of the registration process, but it could easily be tied in so that it is relatively seamless.
http://forum.cmsmadesimple.org/index.ph ... 160.0.html
Re: FEU properties and file uploads
Posted: Sun Dec 06, 2009 6:44 pm
by lollol
Thanks a bunch man... going to try it tomorrow

Re: FEU properties and file uploads
Posted: Tue Dec 08, 2009 5:07 pm
by lollol
I folowed those instructions and I can upload files... but I can't seem to view them on the front side...
I can see the list of uploaded files in the admin area and that's it...
Any idea what the problem might be?

Re: FEU properties and file uploads
Posted: Tue Dec 08, 2009 5:52 pm
by jmcgin51
how are you calling Uploads on the front end?
Re: FEU properties and file uploads
Posted: Tue Dec 08, 2009 6:46 pm
by lollol
Yeah
Here is for the filelist:
Code: Select all
{assign var=email value=$ccuser->username()}
{cms_module module="Uploads" category="User Uploads" mode="summary" key="$email"}
Here is for the upload:
Code: Select all
{assign var=email value=$ccuser->username()}
{cms_module module="Uploads" category="User Uploads" mode="upload" noauthor="1" key="$email"}
And yes the category "User Uploads" is checked yes for "Files in this directory can be listed"...
Here is the summary template as well:
Code: Select all
<!-- Start Upload Summary Template -->
{if isset($input_filter) }
{$startform}
{$prompt_filter}{$input_filter}{$hidden_params}{$input_submit}
{$endform}
<br/>
{if isset($matches)}
{$matches} {$matchestext}
{/if}
{/if}
<div>
{if isset($prevpage_url)}
<a href="{$firstpage_url}" title="{$firstpage}">{$firstpage_arrow}</a>
<a href="{$prevpage_url}" title="{$prevpage}">{$prevpage_arrow}</a>
{/if}
{if $numpages > 1}
{$pagetext} {$pagenum} {$oftext} {$numpages}
{/if}
{if isset($nextpage_url)}
<a href="{$nextpage_url}" title="{$nextpage}">{$nextpage_arrow}</a>
<a href="{$lastpage_url}" title="{$lastpage}">{$lastpage_arrow}</a>
{/if}
</div>
{foreach from=$items item='entry' name='uploads'}
{if ($smarty.foreach.uploads.index == 0) or ($smarty.foreach.uploads.index % 3 == 0)}
<div class="row" style="width: 100%; padding-bottom: 10px;">
{/if}
<div class="upload" style="float: left; width: 33%;">
<a href="{$entry->detailurl}">{$entry->upload_name}</a> ({$entry->size})<br/>
<a href="{$entry->download_url}" title="{$entry->upload_name}">
{if isset($entry->thumbnail_url)}
<img src="{$entry->thumbnail_url}" alt="">
{else}
<img src="{$entry->iconurl}" alt="">
{/if}
</a>
<br/>
<a href="{$entry->sendfile_url}" title="">Send this file</a><br/>
{$author}: {$entry->author}<br/>
{$date}: {$entry->date}<br/>
{$entry->summary}
</div>
{if ($smarty.foreach.uploads.index == 0) or ($smarty.foreach.uploads.index % 3 == 0)}
</div>
{/if}
{foreach name=fields from=$entry->fields key='fldname' item='field'}
{$field.name}: {$field.value}<br/>
{/foreach}
{/foreach}
<!-- End Upload Summary Template -->
I can't find any errors...
I suspect that it my issue has something to do with the key="$email" param...
Re: FEU properties and file uploads
Posted: Wed Dec 09, 2009 2:27 am
by jmcgin51
do you have a link to the site? (with test FEU credentials so we can have a look?)
Re: FEU properties and file uploads
Posted: Wed Dec 09, 2009 8:16 am
by lollol
Test account in the PM

Let me know if you need anything else...
Thanks...
Re: FEU properties and file uploads
Posted: Sun Dec 13, 2009 6:49 pm
by lollol
Well this issue is still unresolved.
I have been bustin my brains for couple of days now and can't make it to work. If there is someone that can help me... please
Thanks again...
Re: FEU properties and file uploads
Posted: Sun Dec 13, 2009 9:40 pm
by timmahoney
Hi lollol
Try removing the quotes around the email
{assign var=email value=$ccuser->username()}
{cms_module module="Uploads" category="User Uploads" mode="summary" key=$email}
and in the other tag as well
{assign var=email value=$ccuser->username()}
{cms_module module="Uploads" category="User Uploads" mode="upload" noauthor="1" key=$email}
Re: FEU properties and file uploads
Posted: Sun Dec 13, 2009 10:55 pm
by lollol
Hi there...
I did that and did not help. However It got me thinking and I checked the database rows in cms_module_uploads table... and the field upload_key is NULL for all of the uploads.
This should mean that the upload form is not pasing the key="$email" value to the database...
Could it be the upload form? hmmm
Re: FEU properties and file uploads
Posted: Sun Dec 13, 2009 11:04 pm
by lollol
Code: Select all
{if isset($fields)}
fields is set
{foreach from=$fields item='one' key='name'}
{strip}<p>{$one.name}:
{if isset($one.input)}
{$one.input}
{elseif $one.type == 'textinput'}
<input type="text" name="{$actionid}field_{$one.id}" value="{$one.value}" size="{$one.attrib.length}" maxlength="{$one.attrib.maxlength}"/>
{elseif $one.type == 'checkbox'}
<input type="checkbox" name="{$actionid}field_{$one.id}" value="1"{if $one.value == 1} checked="checked"{/if}/>
{elseif $one.type == 'dropdown'}
<select name="{$actionid}field_{$one.id}">
{html_options options=$one.attrib.options}
</select>
{elseif $one.type == 'multiselect'}
<select multiple="multiple" size="4" name="{$actionid}field_{$one.id}[]">
{html_options options=$one.attrib.options}
</select>
{/if}{/strip}
{/foreach}
{else}
fields is NOT set
{/if}
This code is showing "fields is NOT set" even though I have the upload snippet set to:
Code: Select all
<p>{assign var=email value=$ccuser->username()}
{cms_module module="Uploads" category="User_Uploads" mode="upload" noauthor="1" key="$email"}</p>
Hell I even tryed
Code: Select all
<p>{assign var=email value=$ccuser->username()}
{cms_module module="Uploads" category="User_Uploads" mode="upload" noauthor="1" key="weee"}</p>
Just to see if it had something to do with the mail address...
So Any ideas now?
Thanks
Re: FEU properties and file uploads
Posted: Mon Dec 14, 2009 3:49 pm
by timmahoney
Did you try uploading a new file to the site after removing the quotes around "$email"