Display conditional profile infos

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

Display conditional profile infos

Post by Tim60 »

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: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Display conditional profile infos

Post by Lumpy Burgertushie »

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
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Tim60
Registered User
Posts: 2
Joined: Sun Nov 29, 2015 9:29 pm

Re: Display conditional profile infos

Post by Tim60 »

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: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Display conditional profile infos

Post by Lumpy Burgertushie »

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
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Locked

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