FEU properties and file uploads

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
lollol
Forum Members
Forum Members
Posts: 35
Joined: Wed Oct 15, 2008 11:38 pm

FEU properties and file uploads

Post 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!
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: FEU properties and file uploads

Post by jmcgin51 »

You want them to be required to upload a CV when they register, or you want them to have the option?
lollol
Forum Members
Forum Members
Posts: 35
Joined: Wed Oct 15, 2008 11:38 pm

Re: FEU properties and file uploads

Post by lollol »

It should be optional... you are getting my hopes up :)
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: FEU properties and file uploads

Post 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
lollol
Forum Members
Forum Members
Posts: 35
Joined: Wed Oct 15, 2008 11:38 pm

Re: FEU properties and file uploads

Post by lollol »

Thanks a bunch man... going to try it tomorrow :)
lollol
Forum Members
Forum Members
Posts: 35
Joined: Wed Oct 15, 2008 11:38 pm

Re: FEU properties and file uploads

Post 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? :)
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: FEU properties and file uploads

Post by jmcgin51 »

how are you calling Uploads on the front end?
lollol
Forum Members
Forum Members
Posts: 35
Joined: Wed Oct 15, 2008 11:38 pm

Re: FEU properties and file uploads

Post 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...
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: FEU properties and file uploads

Post by jmcgin51 »

do you have a link to the site? (with test FEU credentials so we can have a look?)
lollol
Forum Members
Forum Members
Posts: 35
Joined: Wed Oct 15, 2008 11:38 pm

Re: FEU properties and file uploads

Post by lollol »

Test account in the PM :)
Let me know if you need anything else...
Thanks...
lollol
Forum Members
Forum Members
Posts: 35
Joined: Wed Oct 15, 2008 11:38 pm

Re: FEU properties and file uploads

Post 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...
timmahoney
New Member
New Member
Posts: 9
Joined: Wed Jul 09, 2008 2:28 pm

Re: FEU properties and file uploads

Post 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}
lollol
Forum Members
Forum Members
Posts: 35
Joined: Wed Oct 15, 2008 11:38 pm

Re: FEU properties and file uploads

Post 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
lollol
Forum Members
Forum Members
Posts: 35
Joined: Wed Oct 15, 2008 11:38 pm

Re: FEU properties and file uploads

Post 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
timmahoney
New Member
New Member
Posts: 9
Joined: Wed Jul 09, 2008 2:28 pm

Re: FEU properties and file uploads

Post by timmahoney »

Did you try uploading a new file to the site after removing the quotes around "$email"
Post Reply

Return to “Modules/Add-Ons”