Welcome to Geeklog, Anonymous Friday, November 01 2024 @ 01:27 pm EDT
Geeklog Forums
making the topic starter's name stay under author
Status: offline
Superchicken
Forum User
Junior
Registered: 05/29/04
Posts: 21
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?
8
12
Quote
Status: offline
JohnnyWormtown
Forum User
Junior
Registered: 05/30/04
Posts: 23
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
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
Text Formatted Code
$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
11
10
Quote
Status: offline
Blaine
Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
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
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
Geeklog components by PortalParts -- www.portalparts.com
Have a look at forum/index.php - around line 712 for this line
Text Formatted Code
$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
Geeklog components by PortalParts -- www.portalparts.com
6
9
Quote
xie
Anonymous
JohnnyWormtown or Blaine (anyone), could you explain the steps to do this as I've been looking for a feature (hack) like this.
9
10
Quote
All times are EDT. The time is now 01:27 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content