Removal of <t> from rendering in this truncate string

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
dansmith018f
Registered User
Posts: 12
Joined: Mon Mar 12, 2018 4:40 pm

Removal of <t> from rendering in this truncate string

Post by dansmith018f »

Hi all,

I am looking for a very helpful coder to help me out with something.

3DI got together some code for me to limit the description length of my category pages on the forum index, the following works when I replace the right line in the /includes/functions_display.php/ file.

'FORUM_DESC' => generate_text_for_display(truncate_string($row['forum_desc'], 50, 255, false, '...')), $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']),

It works, however, at the start of the forum description it has <t>.

Does anyone know how to fix this? All help would be greatly appreciated!
User avatar
GanstaZ
Registered User
Posts: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: Removal of <t> from rendering in this truncate string

Post by GanstaZ »

Have you tried to change function order?

Code: Select all

'FORUM_DESC' => truncate_string(generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']), 50, 255, false, '...'),
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
dansmith018f
Registered User
Posts: 12
Joined: Mon Mar 12, 2018 4:40 pm

Re: Removal of <t> from rendering in this truncate string

Post by dansmith018f »

Brilliant! That works perfectly, thank you so much. :D
User avatar
GanstaZ
Registered User
Posts: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: Removal of <t> from rendering in this truncate string

Post by GanstaZ »

No problems.. You are welcome!)
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
Post Reply

Return to “phpBB Custom Coding”