Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-21-2006, 08:58 PM
Narcootic Narcootic is offline
 
Join Date: Jun 2006
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Displaying Thread Age

Hey Guys,

Could anyone please help me on how to display age of a thread using $thread[dateline] in a format like this: 12 hours Ago or 12 Days Ago depending on how long it has been. I would really appreciate it, I been trying to do this for some time but with no luck.

Thank you.
Reply With Quote
  #2  
Old 11-22-2006, 07:06 PM
Iain M's Avatar
Iain M Iain M is offline
 
Join Date: Jul 2005
Location: Glasgow, Scotland
Posts: 256
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Admin CP -> vBulletin Options -> Date and Time Options -> Datestamp Display Option -> Select 'Detailed' and save
Reply With Quote
  #3  
Old 11-23-2006, 05:51 PM
Narcootic Narcootic is offline
 
Join Date: Jun 2006
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow thats great, never realised it. Just one more thing. I want to display that information on the forumdisplay where the threads are listed but only for the Thread start and not include the replies in the "Last Post" column. Any ideas?

Thank you for your previous reply!
Reply With Quote
  #4  
Old 11-25-2006, 03:03 PM
Iain M's Avatar
Iain M Iain M is offline
 
Join Date: Jul 2005
Location: Glasgow, Scotland
Posts: 256
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, I don't really have time to play around with templates atm to see how to do the second part. I guess you could try
Styles & Templates > Style Manager > Edit Templates > Threadbit Templates > threadbit

FIND:
Code:
$thread[threadtitle]</a>
AFTER ADD:
Code:
 - $thread[lastpostdate]
that wouldn't remove it from the Last Post column tho...

while in that template you could remove $thread[lastpostdate] and that should remove it from the last post column... this is untested, make sure you save a copy of your threadbit template incase it doesn't work out


Iain
Reply With Quote
  #5  
Old 11-25-2006, 03:42 PM
Narcootic Narcootic is offline
 
Join Date: Jun 2006
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Iain,

What you suggested didn't work originally, just didn't show so I placed it in a different location right after the thread starters name. The thing is, its still showing up the date of the last reply which I didn't want originally. I wanted it to only show the days ago of the original thread start date rather than it updating to the date of each reply in that particular thread.

Is there one something like : $thread[startdate] ?

Many thanks.
Reply With Quote
  #6  
Old 11-25-2006, 09:02 PM
Iain M's Avatar
Iain M Iain M is offline
 
Join Date: Jul 2005
Location: Glasgow, Scotland
Posts: 256
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oops I missread your request ,

I don't there is anything like $thread[startdate] unfortunately,


Iain
Reply With Quote
  #7  
Old 11-25-2006, 09:22 PM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Narcootic View Post
Wow thats great, never realised it. Just one more thing. I want to display that information on the forumdisplay where the threads are listed but only for the Thread start and not include the replies in the "Last Post" column. Any ideas?

Thank you for your previous reply!
Here ya go, works fine w/ 3.6.4

https://vborg.vbsupport.ru/showthread.php?t=103430

You can see it in action on my site, link is in signature.
Reply With Quote
  #8  
Old 11-26-2006, 07:22 PM
Narcootic Narcootic is offline
 
Join Date: Jun 2006
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Iain: Not to worry, I constructed my request a bit awkwardly I noticed. Appreciate your interest to help me.

Smoothie: THank you very much for that, its exactly what I wanted. Thank you for the redirect.
Reply With Quote
  #9  
Old 11-26-2006, 09:39 PM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Narcootic View Post
Iain: Not to worry, I constructed my request a bit awkwardly I noticed. Appreciate your interest to help me.

Smoothie: THank you very much for that, its exactly what I wanted. Thank you for the redirect.
I added it as a plugin instead of editing functions_forumdisplay.php
Reply With Quote
  #10  
Old 11-26-2006, 10:33 PM
Narcootic Narcootic is offline
 
Join Date: Jun 2006
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I didn't realise until I done it manually. It worked out just fine in the end. Thank you.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:43 PM.


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.07116 seconds
  • Memory Usage 2,248KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete