How to alter length of titles?

You made an own skin or theme for phpMyFAQ. You can share it here with others!

Moderator: Thorsten

Post Reply
R0CKY
Posts: 40
Joined: Mon May 19, 2008 9:18 pm

How to alter length of titles?

Post by R0CKY » Thu Jul 23, 2009 10:22 pm

In the startpage.tpl the questions for the most recent are referenced as {latestEntriesTitle}

These titles are cut short by phpMyFAQ and the periods added like this ...

My question is, where can I define how long I want the text to be before it is cut short?

Thanks!
Rocky.

Thorsten
Posts: 14752
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: How to alter length of titles?

Post by Thorsten » Thu Jul 30, 2009 7:14 am

Hi,

which version do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

R0CKY
Posts: 40
Joined: Mon May 19, 2008 9:18 pm

Re: How to alter length of titles?

Post by R0CKY » Thu Jul 30, 2009 8:23 am

Sorry, v2.5.0
Rocky.

Thorsten
Posts: 14752
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: How to alter length of titles?

Post by Thorsten » Thu Jul 30, 2009 8:38 am

Hi,

it's defined in inc/Faq.php line 1592:

Code: Select all

$shortTitle = PMF_Utils::makeShorterText($row['thema'], 8);
8 is the number of words. So if you want more words than eight, change the number.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

R0CKY
Posts: 40
Joined: Mon May 19, 2008 9:18 pm

Re: How to alter length of titles?

Post by R0CKY » Thu Jul 30, 2009 12:03 pm

Very clever, thank you.
Rocky.

jdcasas
Posts: 1
Joined: Thu Sep 30, 2010 5:27 pm

Re: How to alter length of titles?

Post by jdcasas » Thu Sep 30, 2010 5:34 pm

Hello,
Where can this be edited in V. 2.6.9

Thorsten
Posts: 14752
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: How to alter length of titles?

Post by Thorsten » Thu Sep 30, 2010 8:33 pm

Hi,

it's line 1624:

Code: Select all

$output['title'][] = PMF_Utils::makeShorterText($row['thema'], 8);
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Post Reply