vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Thread Start date/time (https://vborg.vbsupport.ru/showthread.php?t=18219)

hacker 10-04-2001 05:00 AM

THANK YOU THANK YOU THANK YOU! It worked and now the site is mroe consistent looking!

YourHostSucks 10-04-2001 05:05 AM

No Problem,, I am sure it is not the correct "vBulletin" way to do it.. (someone will prob fix my mistake)

But it works.. I modified it so all of mine are like that....

julius 10-19-2001 04:51 PM

Thanks, very usefull hack!
Is it possible to use it in "View New Posts" and in "Search - Show results as threads" ?

2 X Viverridae 08-14-2002 12:59 PM

I have installed this hack - but am still wondering...

Quote:

Originally posted by julius
Thanks, very usefull hack!
Is it possible to use it in "View New Posts" and in "Search - Show results as threads" ?


Mr. X 08-20-2002 05:51 AM

Does this hack work at all for 2.2.6? I got the username showing up but no date at all on top, just a blank. The code I edit in the php file is around 597-598, and I stick the:

Code:

$thread[firstpostdate]=vbdate($dateformat,$thread[dateline]);
$thread[firstposttime]=vbdate($timeformat,$thread[dateline]);

On top of those 2 lines, in the middle, or under it? I've tried all 3 and no date is showing up.

Mr. X 08-20-2002 11:44 PM

bump

2 X Viverridae 08-21-2002 07:49 PM

@ Mr. X

I have JJR512's version working on 2.2.6 with no problems whatsoever. According to his instructions, 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 add this after the second instance...
PHP Code:

$thread[firstpostdate]=vbdate($dateformat,$thread[dateline]);
$thread[firstposttime]=vbdate($timeformat,$thread[dateline]); 

Hope this helped.

EDIT: I think you have the first instance of the code, not the second - my first instance of the code to find is around line 575, and the second around 655 - while our files are obviously different, your location of around 597 or so seems likely that you've inserted the code in the wrong spot. :D

Mr. X 08-22-2002 07:34 AM

Still not working. The first instance of the code shows up at line 524 and 525 respectively. The 2nd instance shows up at 598 and 599 respectively. I posted the hack right after line 599, but it still doesnt show up. I've also reverted the forumdisplaybit back to the original and put in the code but it also doesnt show up (no date).

2 X Viverridae 08-22-2002 05:08 PM

It's always the 'simple' ones that end up being a pain, eh.

It's a little hard to tell exactly what you are seeing when you say 'no date' shows up - do you mean that it displays just like it did before?

It should show...
DD-DD-DD TT:TT AM/PM
by Thread-Starter

Now - does it show the word 'by' prior to thread starter? Or, does it just show the name? Knowing this will tell us if there is an error in the forumdisplaybit template, or if the problem is somewhere else.

The relvant portion of my forumdisplay.php looks like this...
PHP Code:

      if ($wordwrap!=0) {
        
$thread[title]=dowordwrap($thread[title]);
      }

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

      
$thread[gotonew]=''

If you reverted your forumdisplay bit template, then changed...
PHP Code:

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

to this...
PHP Code:

<td bgcolor="{ secondaltcolor}" width="30%" align="right" nowrap><smallfont>$thread[firstpostdate] <font color="{ timecolor}">$thread[firstposttime]</font><br>by <b>$thread[postedby]</b></smallfont></td

That should be all there is to it.

(Removing the space after the {'s in { secondaltcolor} and { timecolor} of course)

If you are still having problems, maybe a small screen shot?

Mr. X 08-22-2002 06:23 PM

Ok. I've attached a preview of how it looks. Just the date is missing.

Here is what that code looks like in my forumdisplay.php (without hack applied). These are from lines 595 to 604:

PHP Code:

if ($wordwrap!=0) {
        
$thread[title]=dowordwrap($thread[title]);
      }

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

      
$thread[gotonew]=''

I've pasted the 2 lines of code right after the 2nd instance, on line 601-602 respectively.

Here is what my forumdisplaybit template looks like:

Code:

<tr align="center">
        <td bgcolor="#F1F1F1"><img src="https://vborg.vbsupport.ru/greentek/$thread[newoldhot].gif" border="0" alt=""></td>
        <td bgcolor="#DFDFDF">$thread[icon]</td>
        <td bgcolor="#F1F1F1" align="left" width="70%" onMouseOver="this.style.backgroundColor='#EBECEA'; this.style.cursor='hand';" onMouseOut="this.style.backgroundColor='#F1F1F1';" onClick="window.location.href='showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]'"><normalfont>$thread[gotonew] $paperclip$thread[movedprefix]$thread[typeprefix]<a href="showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]">$thread[title]</a></normalfont> <smallfont>$thread[pagenav]</smallfont></td>
        <td bgcolor="#DFDFDF" width="30%" valign="middle" align="right" nowrap><smallfont>$thread[postdate] $thread[posttime]<br>by <b>$thread[postedby]</b></smallfont></td>
        <td bgcolor="#F1F1F1"><normalfont><a href="javascript:who($thread[threadid])">$thread[replycount]</a></normalfont></td>
        <td bgcolor="#DFDFDF"><normalfont>$thread[views]</normalfont></td>
        $threadrating
        <td bgcolor="$backcolor">
                <table cellpadding="0" cellspacing="0" border="0" width="100%" id="ltlink"><tr align="right">
                        <td nowrap><smallfont>$thread[lastreplydate] <font color="#006000">$thread[lastreplytime]</font><br>
                        by <a href="member.php?action=getinfo&find=lastposter&threadid=$thread[threadid]"><b>$thread[lastposter]</b></a></smallfont></td>
                        <td nowrap>&nbsp;<a href="showthread.php?s=$session[sessionhash]&goto=lastpost&threadid=$thread[threadid]"><img src="https://vborg.vbsupport.ru/greentek/lastpost.gif" border="0" alt="Go to last post"></a></td>
                </tr></table>
        </td>
</tr>



All times are GMT. The time now is 01:42 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01048 seconds
  • Memory Usage 1,773KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (6)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete