Display conditional profile infos

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.
Get Involved
Locked
Tim60
Registered User
Posts: 2
Joined: Sun Nov 29, 2015 9:29 pm

Display conditional profile infos

Post by Tim60 » Sun Nov 29, 2015 9:36 pm

Hello,

I want hide some informations of the administrator profile to the basic users. I thought of making a test of the function S_USER_TYPE in memberlist_view.html but it does't work.

Exemple :

Code: Select all

<tr>
<td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_VISITED}: </td>
<td width="100%"><!-- IF S_USER_TYPE=0 --><b class="gen">{VISITED}</b><!-- ENDIF --></td>
</tr>
I'm a newbee in phpBB coding, and resources in french are missed, can you help me ?

User avatar
Lumpy Burgertushie
Registered User
Posts: 66477
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Display conditional profile infos

Post by Lumpy Burgertushie » Mon Nov 30, 2015 12:32 am

try this instead:

<!-- IF S_USER_TYPE neq 0 -->

that means that only users with the type of 0 will be able to see the last visited data.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

Tim60
Registered User
Posts: 2
Joined: Sun Nov 29, 2015 9:29 pm

Re: Display conditional profile infos

Post by Tim60 » Mon Nov 30, 2015 6:12 pm

Hi,

Sorry, may be I wrote a mistake. My English is not very good :oops:

I want that the normal users do not see an information of the admin.

Someone tell me I can test the username of the admin whit the function USERNAME. Like this :

Code: Select all

<!-- IF USERNAME neq 'username of the admin' --><b class="gen">{VISITED}</b><!-- ENDIF -->
It works partially : For some users the information dispayed is "-" :shock: Is there a function like USERNAME but for the number of the user ?

User avatar
Lumpy Burgertushie
Registered User
Posts: 66477
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Display conditional profile infos

Post by Lumpy Burgertushie » Mon Nov 30, 2015 8:23 pm

what I posted above does exactly what you asked for.

if the person viewing the page is not an admin they will not see what is inside the IF/ENDIF brackets.

if they are an admin, they will see it.

you can surround whatever you want with those conditionals and it will keep non admins from seeing it.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

Locked

Return to “[3.0.x] Styles Support & Discussion”