Posted on: 06/14/04 06:05pm
By: Superchicken
Hi, I don't know why but the forum plug-in has a weird "feature" of putting the topic's most recent replying author under the author heading. Any idea how I would change this to the topic starter?
making the topic starter's name stay under author
Posted on: 06/14/04 07:17pm
By: JohnnyWormtown
as I said over on the portalparts.com forum, it's not really the code that's wrong, it's the table label... it should read "Last Poster" and not "Author".
Look for the variable $lastreplyby and $by (which is eventually passed to the template) in index.php of you forum directory to see what I mean.
I wanted to add the author's name as well, so I threw the last poster's name in the table cell with the last post time and made a column for Author over on the other side of Views and Replies (a la phpB

.
all I really had to do in the index.php was add a line that said
$author = '<A HREF="' .$_CONF['site_url']. '/users.php?mode=profile&uid=' .$forumdisplay['uid']. '">' .$forumdisplay['name']. '</a>';
near the $lastreplyby stuff (I added it right after it), and then pass that variable to the template as well... then edit my templates to display them both.
Results are at
The Wormtown.org Board[*1]
making the topic starter's name stay under author
Posted on: 06/21/04 12:43pm
By: Blaine
This is actually being caused by the SQL statement that I am using.
Have a look at forum/index.php - around line 712 for this line
$lastreply = DB_query("SELECT * FROM {$_TABLES['gf_topic']} WHERE id={$forumdisplay['id']} OR pid={$forumdisplay['id']} ORDER BY 'id' ASC LIMIT 1");
The line above has been corrected. The change begin to use ASC instead of DESC so I get the parent record (smallest record id number) instead of the last ID
making the topic starter's name stay under author
Posted on: 08/23/04 10:14am
By: Anonymous (xie)
JohnnyWormtown or Blaine (anyone), could you explain the steps to do this as I've been looking for a feature (hack) like this.