News:

Wondering if this will always be free?  See why free is better.

Main Menu

"Last Post" Column

Started by Mat @ SWS, October 10, 2007, 12:18:09 PM

Previous topic - Next topic

Mat @ SWS

I want to change it from displaying

QuoteLast post by Mat @ SWS
in Apple Takes Over IBM
on October 08, 2007, 11:13:04 PM

to display it like this:
QuoteLast post in Apple Takes Over IBM
by Mat @ SWS

on October 08, 2007, 11:13:04 PM

what file do I need to change so it swaps it round?

or even edit it further - maybe get it like

QuoteMat @ SWS replied
in Apple Takes Over IBM
Today

or forget about time in fact

I just want to change the way it shows "Last Post"

cheers,

Mat

www.spirewebsolutions.co.uk/forum
Spire Web Solutions
SWS | Forum | Blog

dakotaroar

This is changed in BoardIndex.template.php in your themes folder (of the theme you want to change).

For the default, you would edit the section that looks like this:

/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<b>', $txt[22], '</b>  ', $txt[525], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['smf88'], ' ', $board['last_post']['link'], '<br />
', $txt[30], ' ', $board['last_post']['time'];


Rearrange that code as you see fit.

$board['last_post']['member']['link'] = a link to the member who last posted in this board.
$board['last_post']['link'] = a link to the board that was last posted in (this board or child boards).
$board['last_post']['time'] = the time of the last post in this board.

If I remember correctly, the text variables mean the following:

$txt[22] = "Last post"
$text[525] = "by]
$txt['smf88'] = "in"
$txt[30] = "at"

You don't have to use these variables (you can put words directly into BoardIndex if you like), but if you do you can change languages appropriately and not have random english words on the screen.
The only forum for students in North and South Dakota!  Campus Dakota.

Mat @ SWS

Spire Web Solutions
SWS | Forum | Blog

Advertisement: