how to show block to some users According to custom fields

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
User avatar
yasser33311
Registered User
Posts: 241
Joined: Sat Jul 27, 2013 1:27 pm
Location: algeria
Name: yasser ghe
Contact:

how to show block to some users According to custom fields

Post by yasser33311 » Mon Jan 15, 2018 4:27 pm

i have a custom field as list:(-;ma;fe) named "ge"
i want this condition in html:

Code: Select all

<!-- IF (ge of this user)==ma -->
    <div>something</div>
<!-- ELSEIF (ge of this user)==fe -->
    <div>other something</div>
<!-- ELSE -->
    <div>else</div>
<!-- ENDIF -->
PhpBB Services - install, update, upgrade, customize: https://phpbb.services

User avatar
yasser33311
Registered User
Posts: 241
Joined: Sat Jul 27, 2013 1:27 pm
Location: algeria
Name: yasser ghe
Contact:

Re: how to show block to some users According to custom fields

Post by yasser33311 » Wed Jan 17, 2018 8:33 pm

hellooo
PhpBB Services - install, update, upgrade, customize: https://phpbb.services

User avatar
posey
Registered User
Posts: 641
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: how to show block to some users According to custom fields

Post by posey » Wed Jan 17, 2018 8:43 pm

Hello, hi.

It would help if we know how it is assigned to the template, otherwise we don't know for which variable to check..
''I'm pretty sure there's a lot more to life than being really, really, ridiculously good looking. And I plan on finding out what that is.''

User avatar
yasser33311
Registered User
Posts: 241
Joined: Sat Jul 27, 2013 1:27 pm
Location: algeria
Name: yasser ghe
Contact:

Re: how to show block to some users According to custom fields

Post by yasser33311 » Thu Jan 18, 2018 11:30 am

i want use html or javascript
javascript wrote:if (condition) {
block of code to be executed if the condition is true
} else {
block of code to be executed if the condition is false
}
i want condition that will be true only if user choose "ma" in his profile
i will include this file in footer
1.png
2.png
PhpBB Services - install, update, upgrade, customize: https://phpbb.services

User avatar
yasser33311
Registered User
Posts: 241
Joined: Sat Jul 27, 2013 1:27 pm
Location: algeria
Name: yasser ghe
Contact:

Re: how to show block to some users According to custom fields

Post by yasser33311 » Thu Jan 18, 2018 11:53 am

i think that will help:
viewtopic.php?f=71&t=2125632
PhpBB Services - install, update, upgrade, customize: https://phpbb.services

Post Reply

Return to “phpBB Custom Coding”

Who is online

Users browsing this forum: No registered users and 9 guests

cron