Enable HTML in ranks

For support and discussion related to templates and themes in phpBB 3.3.
TerrorZone
Registered User
Posts: 9
Joined: Sat Sep 21, 2024 4:21 pm

Enable HTML in ranks

Post by TerrorZone »

Hello!
I have forum on 3.3.12 - we recently upgraded from 3.1.5.
However issue is that 3.3.12 do not let anymore to use html in ranks which I need.

I tried to seek answer but answers are outdated. There is reference to mod - but page it sends to do not load anymore and other answers are outdated since they are from 2008. So, anyone - how to enable html in ranks for this version of forum?
[yes I know it can be dangerous, however only trusted ones have access to ACP and I do have backups]
Last edited by thecoalman on Sat Sep 21, 2024 11:23 pm, edited 1 time in total.
Reason: Moved to Styels support & Discussion
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6621
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: Enable HTML in ranks

Post by thecoalman »

With the exception of the pages extension there is no extension on phpbb.com that allows HTML within phpBB that I'm aware of. It can be done by editing the style.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
halil16
Registered User
Posts: 1495
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil

Re: Enable HTML in ranks

Post by halil16 »

Any html can be used for a rank by using PHP for the rank in the template file; It can be done for all ranks.
Introducing Mobile Upgrade! *Make your phpBB board like an app! 📱
Hire me for your phpBB board. 🚩
Buy me a coffee ☕

"The day we'll need ideas more than possessions, we'll find the secret to true wealth." - Peyami Safa /peˈjɑːmi saˈfɑː/
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6621
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: Enable HTML in ranks

Post by thecoalman »

halil16 wrote: Sat Sep 21, 2024 6:08 pm Any html can be used for a rank by using PHP for the rank in the template file; It can be done for all ranks.
You don't need to use PHP for HTML.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
halil16
Registered User
Posts: 1495
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil

Re: Enable HTML in ranks

Post by halil16 »

thecoalman wrote: Sat Sep 21, 2024 6:20 pm You don't need to use PHP for HTML.
As far as I know, PHP templates such as "if rank x" can be used in the template. I've used it many times. They had a name but I couldn't remember it.
Introducing Mobile Upgrade! *Make your phpBB board like an app! 📱
Hire me for your phpBB board. 🚩
Buy me a coffee ☕

"The day we'll need ideas more than possessions, we'll find the secret to true wealth." - Peyami Safa /peˈjɑːmi saˈfɑː/
User avatar
Anișor
Translator
Posts: 394
Joined: Tue Jan 08, 2013 9:36 pm
Location: Angus, Scotland 🏴󠁧󠁢󠁳󠁣󠁴󠁿
Name: Anișor Neculai

Re: Enable HTML in ranks

Post by Anișor »

Template statements. But if they rename the ranks they need to edit the templates again. Not a long term solution.

Edit (NOT RECOMMENDED):
You can force the extension by replacing paybas/rankpoststyling/config/services.yml with:

Code: Select all

services:
    paybas.rankpoststyling.listener:
        class: paybas\rankpoststyling\event\listener
        arguments:
            - '@cache'
            - '@request'
            - '@user'
        tags:
            - { name: event.listener }
Tested & working with 3.3.13.
TerrorZone
Registered User
Posts: 9
Joined: Sat Sep 21, 2024 4:21 pm

Re: Enable HTML in ranks

Post by TerrorZone »

Anișor wrote: Sat Sep 21, 2024 6:27 pm Template statements. But if they rename the ranks they need to edit the templates again. Not a long term solution.

Edit (NOT RECOMMENDED):
You can force the extension by replacing paybas/rankpoststyling/config/services.yml with:

Code: Select all

services:
    paybas.rankpoststyling.listener:
        class: paybas\rankpoststyling\event\listener
        arguments:
            - '@cache'
            - '@request'
            - '@user'
        tags:
            - { name: event.listener }
Tested & working with 3.3.13.
I did tried paybas mod, but with 3.3.12 it didn't work (threw a lot of errors) - so with this change it can work?

As for now I changed directly in the database (: but its a bit pain in the back if I need everytime to log in database and change it and yet I do not have enough knowledge now to find a way how 3.1.5 took and coded data for ranks and how it is don in 3.3.X
User avatar
halil16
Registered User
Posts: 1495
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil

Re: Enable HTML in ranks

Post by halil16 »

Rank is not something that is constantly edited. Specific html codes can be written for certain ranks in the template file. The only problem is maintaining the code across style updates.
Introducing Mobile Upgrade! *Make your phpBB board like an app! 📱
Hire me for your phpBB board. 🚩
Buy me a coffee ☕

"The day we'll need ideas more than possessions, we'll find the secret to true wealth." - Peyami Safa /peˈjɑːmi saˈfɑː/
User avatar
Anișor
Translator
Posts: 394
Joined: Tue Jan 08, 2013 9:36 pm
Location: Angus, Scotland 🏴󠁧󠁢󠁳󠁣󠁴󠁿
Name: Anișor Neculai

Re: Enable HTML in ranks

Post by Anișor »

TerrorZone wrote: Sat Sep 21, 2024 7:30 pm so with this change it can work?
Yes, tested with 3.3.13.
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6621
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: Enable HTML in ranks

Post by thecoalman »

halil16 wrote: Sat Sep 21, 2024 6:26 pm As far as I know, PHP templates such as "if rank x" can be used in the template. I've used it many times. They had a name but I couldn't remember it.
You should be able to do that with the template variable 'RANK_TITLE'.

Untested:

Code: Select all

<!-- IF postrow.RANK_TITLE == 'Something' -->
HTML
<!-- ENDIF -->
There is usually a template variable you can work with and if you need to use php do it in the php files.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
TerrorZone
Registered User
Posts: 9
Joined: Sat Sep 21, 2024 4:21 pm

Re: Enable HTML in ranks

Post by TerrorZone »

Anișor wrote: Sat Sep 21, 2024 8:19 pm
TerrorZone wrote: Sat Sep 21, 2024 7:30 pm so with this change it can work?
Yes, tested with 3.3.13.
in 3.3.12 it didn't work. Extension is enabled but ranks still do not take html code
User avatar
Anișor
Translator
Posts: 394
Joined: Tue Jan 08, 2013 9:36 pm
Location: Angus, Scotland 🏴󠁧󠁢󠁳󠁣󠁴󠁿
Name: Anișor Neculai

Re: Enable HTML in ranks

Post by Anișor »

TerrorZone wrote: Sat Sep 21, 2024 8:49 pm
Anișor wrote: Sat Sep 21, 2024 8:19 pm
Yes, tested with 3.3.13.
in 3.3.12 it didn't work. Extension is enabled but ranks still do not take html code
https://prnt.sc/NCnZO-XNctTy
https://prnt.sc/Z2cr_a2n16wp

Are you sure? Did you clear the cache?
TerrorZone
Registered User
Posts: 9
Joined: Sat Sep 21, 2024 4:21 pm

Re: Enable HTML in ranks

Post by TerrorZone »

Anișor wrote: Sat Sep 21, 2024 8:56 pm
TerrorZone wrote: Sat Sep 21, 2024 8:49 pm

in 3.3.12 it didn't work. Extension is enabled but ranks still do not take html code
https://prnt.sc/NCnZO-XNctTy
https://prnt.sc/Z2cr_a2n16wp

Are you sure? Did you clear the cache?
okay after cleaning cache there is "Rank Style (CSS class)" however I have no idea where to set up styling (maybe I am to stupid to use this ext..) so the forum understands br tag, users need something like

Rank name(br here)
Second part of rank name
image of rank
User avatar
Anișor
Translator
Posts: 394
Joined: Tue Jan 08, 2013 9:36 pm
Location: Angus, Scotland 🏴󠁧󠁢󠁳󠁣󠁴󠁿
Name: Anișor Neculai

Re: Enable HTML in ranks

Post by Anișor »

I've never used this extension, I thought you are familiar with it. Which was your extension for this specific task before you've updated to 3.3?
TerrorZone
Registered User
Posts: 9
Joined: Sat Sep 21, 2024 4:21 pm

Re: Enable HTML in ranks

Post by TerrorZone »

Anișor wrote: Sat Sep 21, 2024 9:53 pm I've never used this extension, I thought you are familiar with it. Which was your extension for this specific task before you've updated to 3.3?
I didn't had any extension. Previously if you were creating ranks you could just use directly br tag when you did create rank from acp

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