News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Shorten subject/ topic length

Started by olufemo, December 05, 2007, 09:12:39 AM

Previous topic - Next topic

olufemo

In the forum homepage, the subject/ topic length in the last post coloumn is always shorten.

How can I increase the character length.

Rumbaar

Sources/BoardIndex.php
// Prepare the subject, and make sure it's not too long.
censorText($row_board['subject']);
$row_board['short_subject'] = shorten_subject($row_board['subject'], 24);

The '24' controls the length of the displayed subject title.  Adjust accordingly.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Hoochie Coochie Man

Quote from: Rumbaar on December 05, 2007, 05:03:10 PM
Sources/BoardIndex.php
// Prepare the subject, and make sure it's not too long.
censorText($row_board['subject']);
$row_board['short_subject'] = shorten_subject($row_board['subject'], 24);

The '24' controls the length of the displayed subject title.  Adjust accordingly.


Thank you very much..
İnadına SMF 1.1.X

Rumbaar

You're most welcome.  At least some people say thanks, but I'm sure that's the 'nature of the beast' :)
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

olufemo

Quote from: Rumbaar on December 05, 2007, 05:03:10 PM<br />Sources/BoardIndex.php<br />
// Prepare the subject, and make sure it's not too long.<br />
censorText($row_board['subject']);<br />
$row_board['short_subject'] =shorten_subject($row_board['subject'], 24); <br />

The '24' controls the length of the displayed subject title.  Adjust accordingly.<br />[/size]

I guess test in red is not a standard php function, pls in which of the files is shorten_subject() function is defined.

Rumbaar

I think you'll find it in sources/Subs.php
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Johno69

Can we shorten this on the "Recent Post" section in the Info Center ?

It's pushing the time posted out of view on long subjects.

olufemo

Quote from: Rumbaar on December 05, 2007, 05:03:10 PM
Sources/BoardIndex.php
// Prepare the subject, and make sure it's not too long.
censorText($row_board['subject']);
$row_board['short_subject'] = shorten_subject($row_board['subject'], 24);

The '24' controls the length of the displayed subject title.  Adjust accordingly.


In SMF 2.0, check  Sources/Subs-BoardIndex.php

GreenSage

Is it wrong to say thanks for this...this late? I just used it and it was exactly what I needed.  :laugh:

Advertisement: