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 » Fri Mar 23, 2018 10:13 pm

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: 390
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

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

Post by GanstaZ » Fri Mar 23, 2018 10:47 pm

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, '...'),
"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 » Sat Mar 24, 2018 2:03 pm

Brilliant! That works perfectly, thank you so much. :D

User avatar
GanstaZ
Registered User
Posts: 390
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

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

Post by GanstaZ » Sat Mar 24, 2018 2:15 pm

No problems.. You are welcome!)
"When answer lies in the question,.. question becomes redundant!"

Post Reply

Return to “phpBB Custom Coding”

Who is online

Users browsing this forum: mdmd09 and 4 guests