Announcement

Collapse
No announcement yet.

[RELEASE] Thread Start date/time

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [RELEASE] Thread Start date/time

    Inspired in wluke's hack:

    open forumdisplay.php

    find code:

    $threads=$DB_site->query("
    SELECT $dotuserid $votequery ".iif($foruminfo[allowicons],'icon.title as icontitle,icon.iconpath,','')."
    thread.threadid,thread.title,lastpost, forumid,pollid,open,replycount,postusername,postuserid,
    lastposter,thread.dateline,

    replace it with:

    $threads=$DB_site->query("
    SELECT $dotuserid $votequery ".iif($foruminfo[allowicons],'icon.title as icontitle,icon.iconpath,','')."
    thread.threadid,thread.title,lastpost, forumid,pollid,open,replycount,postusername,postuserid,
    lastposter,thread.dateline AS threadstart,

    find code:(2x)

    $thread[lastreplydate]=vbdate($dateformat,$thread[lastpost]);
    $thread[lastreplytime]=vbdate($timeformat,$thread[lastpost]);

    insert after it:

    $thread[threadstartdate]=vbdate($dateformat,$thread[threadstart]);
    $thread[threadstarttime]=vbdate($timeformat,$thread[threadstart]);

    save and close forumdisplay.php

    edit forumdisplaybit template

    find:

    <td bgcolor="{secondaltcolor}" width="30%" nowrap><normalfont>$thread[postedby]

    replace it with:

    <td bgcolor="{secondaltcolor}" width="30%" nowrap><smallfont>$thread[threadstartdate] <font color="{timecolor}">$thread[threadstarttime]</font><br> by $thread[postedby]</smallfont></td>

    save it

    done
    You're my Prince of Peace
    And I will live my life for You

  • #2
    What does this hack do and where can we see an example of it?
    Rob

    Comment


    • #3
      It displays you when the thread was started.

      For example:
      thread starter
      nuno
      on 05-26-2001 05:28 PM

      Comment


      • #4
        Last edited by nuno; Sat 26 May '01, 9:05am.
        You're my Prince of Peace
        And I will live my life for You

        Comment


        • #5
          Nice hack man !!! its working great ! easy to install, i had it working in 3 minutes. nice !!!

          My members are very happy now, tnx again.

          RoseValleY

          Comment


          • #6
            Great hack , install it with ease!

            Comment


            • #7
              Odd. I've been doing the same thing all along, only my version is much simpler.

              Here are my instructions for the same thing:

              Find this code in forumdisplay.php: (NOTE: it appears TWICE. You are looking ONLY for the SECOND instance of this code!)
              PHP Code:
              $thread[lastreplydate]=vbdate($dateformat,$thread[lastpost]); 
              $thread[lastreplytime]=vbdate($timeformat,$thread[lastpost]); 
              ...and after the SECOND instance of the above code, add:
              PHP Code:
              $thread[firstpostdate]=vbdate($dateformat,$thread[dateline]);
              $thread[firstposttime]=vbdate($timeformat,$thread[dateline]); 
              Save and upload the file.

              Next, edit the forumdisplaybit template. Look for:
              PHP Code:
              <normalfont>$thread[postedby]</normalfont
              ...and replace it with this:
              PHP Code:
              <smallfont>$thread[firstpostdate$thread[firstposttime]<br>by <b>$thread[postedby]</b></smallfont
              ALSO, in the opening <td> tag that this bit is in, you should add this:
              Code:
              align="right"
              This alignment, along with the formatting in the replacement code, will give the thread start time and started by username the same appearance as in the column for the last reply time and last reply user. But you can feel free, of course, to give it your own desired style.

              ***
              So you can see the differences between my version and nuno's version is that I get the thread start time and date from the dateline directly: "$timeformat,$thread[dateline]", whereas in nuno's version you have to edit a select query earlier in the code, and get the start time and date from the query results. It's just simpler this way, although obviously either way works.

              Example: http://www.jjr512.com/forums/forumdi...p?s=&forumid=1
              -Justin "JJR512" Rebbert
              JJR512.com: Chat about anything!

              Comment


              • #8
                I'd also like to add that in the forumdisplay_threadslist template, I changed Thread Starter to Thread Started, because with the new information in that column, the word "started" is more accurate. It follows more naturally: "Thread Started date by username", rather than "Thread Starter date by username".
                -Justin "JJR512" Rebbert
                JJR512.com: Chat about anything!

                Comment


                • #9
                  Thanks For the hack, worked great!



                  Joey
                  Real Web Host

                  Comment


                  • #10
                    One issue that I can't figure out is why the username link is underlined in the "Thread Started" column, but not in the Last Post column. I followed the instructions to the letter!

                    Ethan

                    Comment


                    • #11
                      ethank, that's not the case with my board. Which version of the hack did you use, mine or nuno's?
                      -Justin "JJR512" Rebbert
                      JJR512.com: Chat about anything!

                      Comment


                      • #12
                        ethank, the thread starter was already "underlined" without this hack and the last post members name wasnt.

                        It has nothing to do with the hack m8, Although i cant see where the underline is comming from

                        Comment


                        • #13
                          THX

                          thanks a lot /\/uno !!!

                          it was very simple and it works great and now my members

                          are very pleased...

                          Comment


                          • #14
                            Originally posted by Zarkov
                            ethank, the thread starter was already "underlined" without this hack and the last post members name wasnt.

                            It has nothing to do with the hack m8, Although i cant see where the underline is comming from
                            I applied the hack, but the color of the time is not the same as in Last Post.

                            Comment


                            • #15
                              just my opinion but wouldnt it look better if it had the posters name then the date and time? maybe it is easy to do i havent even tried to install it maybe ill do this and have the name appeare above time thanx for hack
                              http://www.danasoft.com/vipersig.jpg

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X