• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: FEU - modifying the Change Settings template
PostPosted: Thu Aug 06, 2009 8:48 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Tue Nov 06, 2007 9:04 am
Posts: 239
Location: Brighton, UK
Morning... I really hope someone can help me on this, it's a little out of my comfort zone.

I'm trying to modify the smarty template for Change Settings in FrontEndUsers. All I want to do is have the fields on this form dumped out in a more usable and logical order.

At the moment, I am using the default template which loops through all the fields with the following foreach:

Quote:
{foreach from=$controls item=control}
  {$control->hidden}{$control->prompt}{$control->marker}
 

  {if isset($control->image)}{$control->image}
{/if}
  {$control->control}{$control->addtext}
 

  {if $control->required != true}
  {if isset($control->control2)}{$control->prompt2} {$control->control2}
{/if}
  {/if}


{/foreach}


The easiest method, I think, would be if I could rename my database fields prefixing them with 1_, 2_, 3_, etc,  and put an "order by" filter on the above. Is this possible?

The second choice would be to manually print out all of my fields, but I cannot figure out the syntax for doing this. I've tried dumping out the array with {$controls|@print_r}, but despite my attempts at using this information I cannot seem to get a field to be printed. Here's an example of the array:

Quote:
Array
(
    [username] => stdClass Object
        (
            [name] => username
            [type] => 0
            [color] => blue
            [marker] => *
            [required] => 1
            [prompt] => Username
            [control] => .... it prints the form input here...
        )
)


How could I get display the "prompt" and "control" for the username?

I'm using CMSMS 1.6.3 and FEU 1.6.9.

Thanks for any help!

_________________
Ocean Theme exclusively for CMS Made Simple - jQuery, cufón, 3x page templates, and more!

View the demo site | Download the Ocean Theme

Latest site: Sentori email marketing


Top
 Profile  
 
 Post subject: Re: FEU - modifying the Change Settings template
PostPosted: Thu Sep 24, 2009 9:47 am 
Offline
Forum Members
Forum Members

Joined: Wed Aug 06, 2008 10:48 pm
Posts: 66
Hi,

I have a very limited knowledge for coding.  I was trying to modify the summary template for the Company Directory to show one of the custom fields and found this thread which was useful to me.

In case it can be of any help for you check this out: http://forum.cmsmadesimple.org/index.ph ... ic=19339.0

A.


Top
 Profile  
 
 Post subject: Re: FEU - modifying the Change Settings template
PostPosted: Thu Sep 24, 2009 9:44 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Tue Mar 31, 2009 8:45 pm
Posts: 377
Location: Delft, Netherlands
If you go for the second option, you can use this syntax to display single items:

Code:
{$control.item.item}
//example:
{$control.username.color} //should output "blue".


Top
 Profile  
 
 Post subject: Re: FEU - modifying the Change Settings template
PostPosted: Sat May 12, 2012 3:18 pm 
Offline
Power Poster
Power Poster

Joined: Wed Jan 25, 2006 11:53 am
Posts: 270
Location: Netherlands
I'm also trying to modify the 'change settings template' but cannot figure out how to call the fields.

I know {$control->prompt} is the label and {$control->control} the input but I only what a few value's that can be changed.

Ex. I want the user to be possible to change his address.

I tryed :

Code:
{$address->control}
{$control.address.control}


But this is not working. >:(

Please help

Musicscore


Top
 Profile  
 
 Post subject: Re: FEU - modifying the Change Settings template
PostPosted: Sat May 12, 2012 3:25 pm 
Online
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 11820
Location: Arizona
{$control->address}?...

Try putting {$control|@print_r} at the bottom of the template...

_________________
Extensions » Modules/Tags click the name of the module/tag or Help to the right to get its parameters.
Right click and view source is a great way to see what you have to work with.
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/
Image


Top
 Profile  
 
 Post subject: Re: FEU - modifying the Change Settings template
PostPosted: Sat May 12, 2012 5:43 pm 
Offline
Power Poster
Power Poster

Joined: Wed Jan 25, 2006 11:53 am
Posts: 270
Location: Netherlands
Thanks Dr.CSS for your answer.
{$control->adres} isn't working.

This is what I see :

Code:
stdClass Object ( [name] => username [type] => 0 [color] => blue [marker] => * [required] => 1 [prompt] => Username [control] =>  ) 1 stdClass Object ( [name] => password [type] => 0 [color] => blue [marker] => * [required] => 1 [prompt] => Password [control] =>  [addtext] => Enter a new password here to change your password ) 1 stdClass Object ( [name] => repeat_password [type] => 0 [color] => blue [marker] => * [required] => 1 [prompt] => Again [control] =>  [addtext] => Enter a new password here to change your password ) 1 stdClass Object ( [name] => input_bestand [id] => mdeda4input_bestand [required] => [status] => 1 [type] => 6 [color] => [marker] => [classname] => bestand [image] =>  [prompt2] => Clear [control2] =>  [control] =>  [labelfor] => mdeda4bestand [length] => 80 [maxlength] => 255 [prompt] => Bestand ) 1 stdClass Object ( [name] => input_adres [id] => mdeda4input_adres [required] => [status] => 1 [type] => 0 [color] => [marker] => [classname] => adres [control] =>  [labelfor] => mdeda4adres [length] => 80 [maxlength] => 255 [prompt] => Adres ) 1


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting