View Single Post
  #1357  
Old 02-10-2007, 01:13 AM
gizmo01 gizmo01 is offline
 
Join Date: Mar 2006
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It would be really handy if the main vbookie display showed times as well as dates under the Added, Open Until and Payouts After.

Actually, even better, if it's today's date, it should only show the time, otherwise it should show the date.

Anybody know which template I'd need to play with to get this done? I'd be willing to give it a try myself and post my findings here.


UPDATE: Ok, I'm 99% sure I'd need to edit the vbookie.php file to accomplish this and this is where I believe it needs to be done:

Code:
$item['created'] = vbdate($vbulletin->options['dateformat'],$item['item_created']);
$item['openuntil'] = vbdate($vbulletin->options['dateformat'],$item['item_open_until']);
$item['payafter'] = vbdate($vbulletin->options['dateformat'],$item['item_pay_after']);
eval('$betitembits .= "' . fetch_template('vbookie_main_items_bit') . '";');
That starts at line 355 in the file. I think that my next step would be an IF statement to evalutate $today and compare it to $item['openuntil'], etc...

Any help here?


2ND Update: Ok, I was on a mission. This is what I came up with. I really was only interested in showing the Open Until time on open items.

It may not be elegant, but I replaced line 356 which was this:

Code:
$item['openuntil'] = vbdate($vbulletin->options['dateformat'],$item['item_open_until']);
with this:

Code:
		if ($item['item_open_until'] < TIMENOW)
		{
			$item['openuntil'] = vbdate($vbulletin->options['dateformat'],$item['item_open_until']);
		}
		else
		{
			$item['openuntil'] = vbdate($vbulletin->options['dateformat'],$item['item_open_until']) . " @ " . vbdate($vbulletin->options['timeformat'],$item['item_open_until']);
		}

Well, it does the job that I wanted, but it kinda messes up the spacing a bit, which I can live with. Also, it doesn't bother to show the time unless the item is still open.

I hope someone else can find this to be a useful modification. Any and all suggestions are more than welcome.

giz
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01165 seconds
  • Memory Usage 1,768KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete