Welcome, Guest. Please Login or Register.
May 14, 2025, 08:32:22 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  post starter date « previous next »
Pages: [1] Reply Ignore Print
Author Topic: post starter date  (Read 1654 times)
acf [delete me]!
YaBB God
*****
Posts: 521


la especialidad de grafic

WWW
post starter date
« on: July 28, 2003, 02:44:03 PM »
Reply with quote

"Last post" has a post date can the topic starter olso have an post date?

example:
Logged

Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:post starter date
« Reply #1 on: July 28, 2003, 03:14:54 PM »
Reply with quote

OK - took me a while to see the doctored screenshot :D

open messageindex.php and find
         SELECT t.ID_LAST_MSG, t.ID_TOPIC, t.numReplies, t.locked, m.posterName, m.ID_MEMBER, IFNULL(mem.realName, m.posterName) AS posterDisplayName, t.numViews, m.posterTime, m.modifiedTime, t.ID_FIRST_MSG, t.isSticky, t.ID_POLL, m2.posterName as mname, m2.ID_MEMBER as mid, IFNULL(mem2.realName, m2.posterName) AS firstPosterDisplayName, m2.subject as msub, m2.icon as micon, IFNULL(lt.logTime, 0) AS isRead, IFNULL(lmr.logTime, 0) AS isMarkedRead
         FROM {$db_prefix}topics as t, {$db_prefix}messages as m, {$db_prefix}messages as m2
            LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER=m.ID_MEMBER)
            LEFT JOIN {$db_prefix}members AS mem2 ON (mem2.ID_MEMBER=m2.ID_MEMBER)
            LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC=t.ID_TOPIC AND lt.ID_MEMBER=$ID_MEMBER)
            LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD=$currentboard AND lmr.ID_MEMBER=$ID_MEMBER)
         WHERE t.ID_TOPIC IN (" . implode(',', $topics) . ")
            AND m.ID_MSG=t.ID_LAST_MSG
            AND m2.ID_MSG=t.ID_FIRST_MSG
         ORDER BY $stickyOrder m.posterTime DESC") or database_error(__FILE__, __LINE__);

and change it to:
         SELECT t.ID_LAST_MSG, t.ID_TOPIC, t.numReplies, t.locked, m.posterName, m.ID_MEMBER, IFNULL(mem.realName, m.posterName) AS posterDisplayName, t.numViews, m.posterTime, m.modifiedTime, t.ID_FIRST_MSG, t.isSticky, t.ID_POLL, m2.posterName as mname, m2.ID_MEMBER as mid, IFNULL(mem2.realName, m2.posterName) AS firstPosterDisplayName, m2.subject as msub, m2.icon as micon, IFNULL(lt.logTime, 0) AS isRead, IFNULL(lmr.logTime, 0) AS isMarkedRead, m2.posterTime AS mtime
         FROM {$db_prefix}topics as t, {$db_prefix}messages as m, {$db_prefix}messages as m2
            LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER=m.ID_MEMBER)
            LEFT JOIN {$db_prefix}members AS mem2 ON (mem2.ID_MEMBER=m2.ID_MEMBER)
            LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC=t.ID_TOPIC AND lt.ID_MEMBER=$ID_MEMBER)
            LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD=$currentboard AND lmr.ID_MEMBER=$ID_MEMBER)
         WHERE t.ID_TOPIC IN (" . implode(',', $topics) . ")
            AND m.ID_MSG=t.ID_LAST_MSG
            AND m2.ID_MSG=t.ID_FIRST_MSG
         ORDER BY $stickyOrder m.posterTime DESC") or database_error(__FILE__, __LINE__);

(the additional is the: "m2.posterTime AS mtime" bit)

Then just down from there in the while loop there is a:

         $name1 = $row['posterDisplayName'];
         $name2 = $row['firstPosterDisplayName'];

bit. just add:

$mtime=$row['mtime'];


Finally find:

         $mydate = timeformat($mdate);

and add:

         $mytime = timeformat($mtime);


Oh - to actually display it, a few lines down find:
                  <font size="2">' . $mname . '</font></td>
               <td class="windowbg" valign="middle" width="4%" align="center" bgcolor="' . $color['windowbg'] . '">

and change it to:
                  <font size="2">' . $mytime . '<br />' . $txt[525] . ' ' . $mname . '</font></td>
               <td class="windowbg" valign="middle" width="4%" align="center" bgcolor="' . $color['windowbg'] . '">


I'm fairly sure that will all work - but backup it up first just in case :D


Logged
acf [delete me]!
YaBB God
*****
Posts: 521


la especialidad de grafic

WWW
Re:post starter date
« Reply #2 on: July 28, 2003, 03:21:01 PM »
Reply with quote

thanx :) ill start modding again :) :D
Logged

acf [delete me]!
YaBB God
*****
Posts: 521


la especialidad de grafic

WWW
Re:post starter date
« Reply #3 on: July 28, 2003, 03:37:55 PM »
Reply with quote

thanx!! it worked perfect!! :) :)
« Last Edit: July 28, 2003, 03:38:19 PM by Acf » Logged

Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:post starter date
« Reply #4 on: July 28, 2003, 03:52:23 PM »
Reply with quote

excellent... the only thing I'd suggest is changing either the text of the "started by" to "started on" or chaning the format of that column from
"date by poster" to "poster on date" as it currently reads:
"Started by june 16th 2003 on Grudge" etc instead of:

"Started by Grudge on june 16th 2003"
OR
"Started on June 16th 2003 by Grudge"

It should make sense as you read down the column what I'm talking about :D
Logged
acf [delete me]!
YaBB God
*****
Posts: 521


la especialidad de grafic

WWW
Re:post starter date
« Reply #5 on: July 28, 2003, 04:17:06 PM »
Reply with quote

Quote from: Grudge on July 28, 2003, 03:52:23 PM
excellent... the only thing I'd suggest is changing either the text of the "started by" to "started on" or chaning the format of that column from
"date by poster" to "poster on date" as it currently reads:
"Started by june 16th 2003 on Grudge" etc instead of:

"Started by Grudge on june 16th 2003"
OR
"Started on June 16th 2003 by Grudge"

It should make sense as you read down the column what I'm talking about :D

Yep :) now it realy works like a dream  ;D ;)
« Last Edit: July 28, 2003, 06:41:38 PM by Acf » Logged

Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:post starter date
« Reply #6 on: July 28, 2003, 06:31:21 PM »
Reply with quote

wow... very useful :D

this should probably be moved to Completed Mods and labelled correctly... I'm sure many will love it ;)
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:post starter date
« Reply #7 on: July 28, 2003, 10:10:26 PM »
Reply with quote

I installed it in my test board and it's working great :)

laakademia.com/forums

I also fixed the TD widths so that Started and Replied are the same
« Last Edit: July 30, 2003, 04:11:35 AM by Anguz » Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  post starter date « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.115 seconds with 21 queries.