Custom profile field on memberlist

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
robato
Registered User
Posts: 6
Joined: Thu Apr 28, 2016 7:57 pm

Custom profile field on memberlist

Post by robato »

I've added a custom profile fild where the user enter their full name and I would like this to appear in the memberlist. I followed this thread (viewtopic.php?f=71&t=655245) but it's for an older version and I couldn't get it to work. Is there another/easier way to do this?
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Custom profile field on memberlist

Post by david63 »

Edit - Wrong info
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53412
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Custom profile field on memberlist

Post by Brf »

I am not sure what you mean by "older version". That topic should work fine for any 3.0.x board.
robato
Registered User
Posts: 6
Joined: Thu Apr 28, 2016 7:57 pm

Re: Custom profile field on memberlist

Post by robato »

Thanks for your reply! I have another go, must have done something wrong
robato
Registered User
Posts: 6
Joined: Thu Apr 28, 2016 7:57 pm

Re: Custom profile field on memberlist

Post by robato »

Hi again,
I think that I entered the wrong value in

Code: Select all

<td><!-- IF memberrow.PROFILE_FULL_NAME_VALUE -->{memberrow.PROFILE_FULL_NAME_VALUE} <!-- ELSE -->&nbsp;<!-- ENDIF --></td>
Where can I find "PROFILE_FULL_NAME_VALUE" for my custom profile field?
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53412
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Custom profile field on memberlist

Post by Brf »

You would use the field identification you used when you setup the profile field:
PROFILE_FIELDIDENTIFICATION_VALUE
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Custom profile field on memberlist

Post by david63 »

If you were to update to phpBB 3.1 you can show a CPF on the memberlist with one click in the ACP
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53412
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Custom profile field on memberlist

Post by Brf »

david63 wrote:If you were to update to phpBB 3.1 you can show a CPF on the memberlist with one click in the ACP
Sort of... It mashes all the profile fields together into one column.
robato
Registered User
Posts: 6
Joined: Thu Apr 28, 2016 7:57 pm

Re: Custom profile field on memberlist

Post by robato »

Hi,
I used this value, is that the correct one?
Profile field.png
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53412
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Custom profile field on memberlist

Post by Brf »

Yes.
The description for that field, in English, says:
The field identification is a name to identify the profile field within the database and the templates.
robato
Registered User
Posts: 6
Joined: Thu Apr 28, 2016 7:57 pm

Re: Custom profile field on memberlist

Post by robato »

Thanks again, appreciate your help! I paste the code I edited in memberlist_body.html, have I done something wrong?

Code: Select all

<table class="phpbb_table1" cellspacing="1" id="memberlist">
		<thead>
		<tr>
			<th class="phpbb_name"><span class="phpbb_rank-img"><a href="{U_SORT_RANK}">{L_RANK}</a></span><a href="{U_SORT_USERNAME}"><!-- IF S_SHOW_GROUP and .memberrow -->{L_GROUP_LEADER}<!-- ELSE -->{L_USERNAME}<!-- ENDIF --></a></th>
			<th class="phpbb_posts"><a href="{U_SORT_POSTS}#memberlist">{L_POSTS}</a></th>
                        <th class="phpbb_namn"><a href="{U_SORT_NAMN}#memberlist">{L_NAMN}</a></th>
			<th class="phpbb_namn"><a href="{U_SORT_NAMN}#memberlist">{L_NAMN}</a>{L_COMMA_SEPARATOR}<a href="{U_SORT_LOCATION}">{L_LOCATION}</a></th>
			<!--<th class="phpbb_joined"><a href="{U_SORT_JOINED}#memberlist">{L_JOINED}</a></th>-->
			<!-- IF U_SORT_ACTIVE --><th class="phpbb_active"><a href="{U_SORT_ACTIVE}#memberlist">{L_LAST_ACTIVE}</a></th><!-- ENDIF -->
		</tr>
		</thead>
		<tbody>
	<!-- ENDIF -->
		<!-- BEGIN memberrow -->
			<!-- IF S_SHOW_GROUP -->
				<!-- IF not memberrow.S_GROUP_LEADER and not $S_MEMBER_HEADER -->
				<!-- IF S_LEADERS_SET and memberrow.S_FIRST_ROW -->
				<tr class="phpbb_bg1">
					<td colspan="<!-- IF U_SORT_ACTIVE -->5<!-- ELSE -->4<!-- ENDIF -->">&nbsp;</td>
				</tr>
				<!-- ENDIF -->
<!-- IF S_LEADERS_SET -->
		</tbody>
		</table>

	<span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->
<div class="forumbg forumbg-table">
	<div class="phpbb_inner"><span class="corners-top"><span></span></span>

	<table class="phpbb_table1" cellspacing="1">
	<thead>
	<tr>
	<!-- IF not S_LEADERS_SET -->
		<th class="phpbb_name"><span class="phpbb_rank-img"><a href="{U_SORT_RANK}">{L_RANK}</a></span><a href="{U_SORT_USERNAME}"><!-- IF S_SHOW_GROUP -->{L_GROUP_MEMBERS}<!-- ELSE -->{L_USERNAME}<!-- ENDIF --></a></th>
		<th class="phpbb_posts"><a href="{U_SORT_POSTS}#memberlist">{L_POSTS}</a></th>
                <th class="phpbb_namn"><a href="{U_SORT_NAMN}#memberlist">{L_NAMN}</a></th>
		<th class="phpbb_namn"><a href="{U_SORT_NAMN}#memberlist">{L_NAMN}</a>{L_COMMA_SEPARATOR}<a href="{U_SORT_LOCATION}">{L_LOCATION}</a></th>
		<th class="phpbb_namn"><a href="{U_SORT_NAMN}#memberlist">{L_NAMN}</a></th>-->
		<!-- IF U_SORT_ACTIVE --><th class="phpbb_active"><a href="{U_SORT_ACTIVE}#memberlist">{L_LAST_ACTIVE}</a></th><!-- ENDIF -->
	<!-- ELSEIF S_SHOW_GROUP -->
		<th class="phpbb_name">{L_GROUP_MEMBERS}</th>
		<th class="phpbb_namn">&nbsp;</th>
                <th class="phpbb_posts">&nbsp;</th>
		<th class="phpbb_namn">&nbsp;</th>
		<th class="phpbb_namn">&nbsp;</th>-->
		<!-- IF U_SORT_ACTIVE --><th class="phpbb_active">&nbsp;</th><!-- ENDIF -->
	<!-- ENDIF -->
	</tr>
	</thead>
	<tbody>
					<!-- DEFINE $S_MEMBER_HEADER = 1 -->
				<!-- ENDIF -->
			<!-- ENDIF -->

	<tr class="phpbb_<!-- IF memberrow.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
		<td><!-- IF memberrow.RANK_IMG --><span class="phpbb_rank-img">{memberrow.RANK_IMG}</span><!-- ELSE --><span class="phpbb_rank-img">{memberrow.RANK_TITLE}</span><!-- ENDIF --><!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><input type="checkbox" name="user" value="{memberrow.USERNAME}" /> <!-- ENDIF -->{memberrow.USERNAME_FULL}<!-- IF S_SELECT_SINGLE --><br />[&nbsp;<a href="#" onclick="insert_single('{memberrow.A_USERNAME}'); return false;">{L_SELECT}</a>&nbsp;]<!-- ENDIF --></td>
		<td class="phpp_namn"><!-- IF memberrow.namn --> {memberrow.namn} <!-- ELSE -->&nbsp;<!-- ENDIF --></td>
                <td class="phpbb_posts"><!-- IF memberrow.POSTS and S_DISPLAY_SEARCH --><a href="{memberrow.U_SEARCH_USER}" title="{L_SEARCH_USER_POSTS}">{memberrow.POSTS}</a><!-- ELSE -->{memberrow.POSTS}<!-- ENDIF --></td>
                <td class="phpbb_namn"><!-- IF memberrow.U_WWW or memberrow.NAMN --><!-- IF memberrow.U_WWW --><div><a href="{memberrow.U_WWW}" title="{L_VISIT_WEBSITE}: {memberrow.U_WWW}">{memberrow.U_SHORT_WWW}</a></div><!-- ENDIF --><!-- IF memberrow.LOCATION --><div>{memberrow.LOCATION}</div><!-- ENDIF --><!-- ELSE -->&nbsp;<!-- ENDIF --></td>
		<td>{memberrow.NAMN}</td>--!
		<!-- IF S_VIEWONLINE --><td>{memberrow.VISITED}&nbsp;</td><!-- ENDIF -->
	</tr>
		<!-- BEGINELSE -->
	<tr class="phpbb_bg1">
		<td colspan="<!-- IF S_VIEWONLINE -->5<!-- ELSE -->4<!-- ENDIF -->">{L_NO_MEMBERS}</td>
	</tr>
		<!-- END memberrow -->
	</tbody>
	</table>
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53412
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Custom profile field on memberlist

Post by Brf »

Where did you get that code from?
You should simply have taken the code you mentioned before
robato wrote:

Code: Select all

<td><!-- IF memberrow.PROFILE_FULL_NAME_VALUE -->{memberrow.PROFILE_FULL_NAME_VALUE} <!-- ELSE --> <!-- ENDIF --></td>
and replaced "FULL_NAME" with "NAMN".

Don't use that sort code either, unless you plan on modding memberlist.php to sort by that column. The code you should be referring to is in the second post of that topic.
robato
Registered User
Posts: 6
Joined: Thu Apr 28, 2016 7:57 pm

Re: Custom profile field on memberlist

Post by robato »

This is driving me crazy, I doing something terribly wrong. It's the file in /phpbb3/styles/jprosilver/template/ I should edit. I deleted the file and it had no effect on the website.
Locked

Return to “[3.0.x] Support Forum”