vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Forum Display Enhancements - Insert Thread Date into threadbit - for knowing when thread was originally posted (https://vborg.vbsupport.ru/showthread.php?t=136551)

Eric 04-03-2007 11:03 PM

Display how many days old the thread is:

Edit the "fix thread dates" plugin in "threadbit_process", replace everything with:

PHP Code:

$startparts explode('/'vbdate('m/d/Y'$thread['dateline'], true));
$endparts   explode('/'vbdate('m/d/Y'TIMENOWtrue));
$startdate  gregoriantojd($startparts[0], $startparts[1], $startparts[2]);
$enddate    gregoriantojd($endparts[0], $endparts[1], $endparts[2]);
$days       = ($enddate $startdate == 0) ? '< 1' $enddate $startdate;

if (
$thread['dateline'])
{
    
$thread['threaddate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline'], 1);
    
$thread['threaddate'] = $thread['threaddate'] . $days day(s) old";



NFLfbJunkie 08-03-2007 03:13 AM

Is there a way to make the date a tad bit smaller font?

SuperTaz 08-03-2007 03:19 AM

Installed. Good work

hugh_ 08-15-2007 10:03 AM

Is possible to do any of the following with this hack?

1. Show the thread age next to the thread title not the name of the person who started it.
2. Remove the brackets
3. Add it to the output of forumdisplay as well as the result of a search

Thanks...

Dave Hybrid 10-24-2007 09:06 PM

Quote:

Originally Posted by SecondV (Post 1219339)
Display how many days old the thread is:

Edit the "fix thread dates" plugin in "threadbit_process", replace everything with:

PHP Code:

$startparts explode('/'vbdate('m/d/Y'$thread['dateline'], true));
$endparts   explode('/'vbdate('m/d/Y'TIMENOWtrue));
$startdate  gregoriantojd($startparts[0], $startparts[1], $startparts[2]);
$enddate    gregoriantojd($endparts[0], $endparts[1], $endparts[2]);
$days       = ($enddate $startdate == 0) ? '< 1' $enddate $startdate;

if (
$thread['dateline'])
{
    
$thread['threaddate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline'], 1);
    
$thread['threaddate'] = $thread['threaddate'] . $days day(s) old";



Could you explain how to do this better please.

I cannot find anywhere to edit this code, thread_bit process doesn't exist.

Thank you.

momo2 10-31-2007 12:04 PM

Installed, this is very useful thanks...

KURTZ 12-25-2007 07:55 PM

runs on 3.7.0B3 :D

realsumon 01-07-2008 07:32 AM

is it possible like this

Code:

http://forums.digitalpoint.com/forumdisplay.php?f=5
Only Shows Thread age. Looks Nice. also it's shows after Thread. not after user name.

senaia 01-07-2008 05:47 PM

Quote:

Originally Posted by SecondV (Post 1219339)
Display how many days old the thread is:

Edit the "fix thread dates" plugin in "threadbit_process", replace everything with:

PHP Code:

$startparts explode('/'vbdate('m/d/Y'$thread['dateline'], true));
$endparts   explode('/'vbdate('m/d/Y'TIMENOWtrue));
$startdate  gregoriantojd($startparts[0], $startparts[1], $startparts[2]);
$enddate    gregoriantojd($endparts[0], $endparts[1], $endparts[2]);
$days       = ($enddate $startdate == 0) ? '< 1' $enddate $startdate;

if (
$thread['dateline'])
{
    
$thread['threaddate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline'], 1);
    
$thread['threaddate'] = $thread['threaddate'] . $days day(s) old";



Working perfect but how to make it show "Today" instead of "< 1 days old" ?
Also "Yesterday" instead of "2 days old".

OR

Not to show anything if the thread was created today or yesterday.

realsumon 01-08-2008 05:14 AM

Hi I'm afraid that's not a function. This would require custom code. For help with that, please search or ask on www.vbulletin.org. Best Regards, vBulletin Support Team

now who will help. i came vb.org..here nobody reply.. please refer me another website.


anybody here wanna help me i will pay.

i need same

Code:

http://forums.digitalpoint.com/forumdisplay.php?f=5


All times are GMT. The time now is 07:46 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.01231 seconds
  • Memory Usage 1,769KB
  • 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
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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