Editing Front End User Userlist.tpl

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
blis102

Editing Front End User Userlist.tpl

Post by blis102 »

I am working on editing the user list template so that the list displays more relevent information about the user, rather than the creation and expiration of members. I want it to list name, email, address, phone etc...

I know that editing the template is what i need to do but i cant seem to get the values to list:

Code: Select all

<hr width="50%" align="left"/>
<div class="pageoptions">
 <p>{$numusers} {$usersingroup}</p>
 <p>{$itemcount} {$usersfound}</p>
{if $itemcount > 0}
<table cellspacing="0" class="pagetable">
	<thead>
		<tr>
			<th>{$usernametext}</th>
			<th>{$createdtext}</th>
			<th>{$expirestext}</th>
			
			<th>{$emailtext}</th>
			
			<th class="pageicon"> </th>
			<th class="pageicon"> </th>
		</tr>
	</thead>
	<tbody>
{foreach from=$items item=entry}
		<tr class="{$entry->rowclass}">
			<td>{$entry->username}</td>
			<td>{$entry->created}</td>
			<td>{$entry->expires}</td>
			
			<td>{$entry->email}</td>
			
			<td>{$entry->editlink}</td>
			<td>{$entry->deletelink}</td>
		</tr>	 
{/foreach}
	</tbody>
</table>
{/if}
 <p>{$addlink}</p>
</div>
As you can see i added the email address field in the template. The problem is that the {$emailtext} section works but not the {$entrty->email}. It lists the heading but no content under the heading. Is there a way to get this to work? Where can I find my field variable names? I tried the {get_template_vars} function but with no result...

Thanks in advance for your help.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Editing Front End User Userlist.tpl

Post by calguy1000 »

This is because properties, such as email address, are optional, and dependant upon group membership, so one user may have an email address property, whilst another doesn't depending upon which group they are a member in. 

This is why none of the user properties are displayed in the userlist form as there's no real way to decide which properties to display.  i.e:  do I display the "Full Name" property from group1, or the "First Name" and "Last Name" properties from group2. 

In short, there's no easy way to do that, as I can create a group that doesn't have an email property type associated with it, and frontendusers will work just fine.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
blis102

Re: Editing Front End User Userlist.tpl

Post by blis102 »

Hm. Well I have to have the groups displayed in a table so that we can import it into excell... If I cant do this, then the entire registration part is pretty much useless for my application... I have been working with the templates etc... to find a way around the problem and couldnt get it to work.

Is there a way to post the information in a table outside of cms... say create a php page that posts the information in a table that gets access from the module? Im aware of how to structure that part but how would i query the database so that these variables could be sent over to the script? What would be the syntax for a group variable? What I noticed is that when you go to edit a user, it post the information, is there a way that i could get that information onto a table?

Any help would be awesome, as I really need to find a solutioins to this problem. Thanks for you help!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Editing Front End User Userlist.tpl

Post by calguy1000 »

what information do you need in your table?  something you may want to look at is the php code for exporting users to csv.  It was designed for importing users to an excel spreadsheet.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
blis102

Re: Editing Front End User Userlist.tpl

Post by blis102 »

I need the Users Name, Email, Phone, Address, and all the other table information in rows, just like a database table. It doesnt matter where it is as long as i can export it as a table into excell.

Could you explain the csv exporting more, im not sure what you mean... where can i find that php code?

Thanks alot for your help!
sanjay
Forum Members
Forum Members
Posts: 19
Joined: Fri Oct 15, 2004 7:28 am

Re: Editing Front End User Userlist.tpl

Post by sanjay »

blis102 wrote: I need the Users Name, Email, Phone, Address, and all the other table information in rows, just like a database table. It doesnt matter where it is as long as i can export it as a table into excell.

Could you explain the csv exporting more, im not sure what you mean... where can i find that php code?

Thanks alot for your help!
In the admin section -> users and groups -> front end user management -> admin - click export

This will produce a file that you can open with a spreadsheet (openoffice or another open source one of course  ;) ).

~sanjay
blis102

Re: Editing Front End User Userlist.tpl

Post by blis102 »

THANK YOU! You saved my life! Im sorry im such an idiot... That is exactly what i needed.

One other question tho, i have some fields that are drop downs and the values arent displaying in the spread sheet.
the fields are like this:

Code: Select all

<option value="bride">The Bride</option>
<option value="groom">The Groom</option>
<option value="family">Family of the Bride/Groom</option>
<option value="friend">Friend of the Bride/Groom</option>
<option value="other">Other</option>
Its displaying "<option value=" in the spreadsheet but not the value....

How should i change it so it displays the information in the spreadsheet?
Also what about radio buttons?

Thanks again!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Editing Front End User Userlist.tpl

Post by calguy1000 »

I'll take a look at the csv export wrt dropdowns.  and radio buttons haven't been implemented yet, sorry.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
blis102

Re: Editing Front End User Userlist.tpl

Post by blis102 »

Any luck finding a solution to the dropdown menu being transferred to the CSV file?

Any idea how i could do the same thing with the radio buttons?

I tried using the HTMl way to do it by giving the field a value:
The Bride

maybe making the tag like this:
bride

Or will it just work:
Bride
Groom
Family
Friends
Other


Thanks again for your help!
Locked

Return to “CMSMS Core”