Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 09-13-2005, 07:42 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What date is $last['lastpost'] ?

(This is the code from the plugin)

Code:
$last['lastpost'] = vbdate($vboptions['dateformat'], $last['lastpost'], true);
Reply With Quote
  #12  
Old 09-13-2005, 07:45 AM
theArchitect's Avatar
theArchitect theArchitect is offline
 
Join Date: Sep 2004
Location: Sydney
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
What date is $last['lastpost'] ?

(This is the code from the plugin)

Code:
$last['lastpost'] = vbdate($vboptions['dateformat'], $last['lastpost'], true);
I am not sure. It was the template info that I was told to use along with the plug-in.
Reply With Quote
  #13  
Old 09-13-2005, 07:47 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, let me rephrase - have you tried using $last[lastpost] as it would seem to suggest it is what you want.
Reply With Quote
  #14  
Old 09-13-2005, 07:52 AM
theArchitect's Avatar
theArchitect theArchitect is offline
 
Join Date: Sep 2004
Location: Sydney
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
Okay, let me rephrase - have you tried using $last[lastpost] as it would seem to suggest it is what you want.
Sorry, my mis-understanding.

If you check the template code I quoted above I am currently using this, but nothing is displaying.

Code:
<div><phrase 1="member.php?find=lastposter&amp;t=$last[threadid]" 2="$last[lastposter]">$vbphrase[by_x]</phrase></div> $last[lastpost]&nbsp<a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$last[threadid]" title="<phrase 1="$last[title]">$vbphrase[go_first_unread_in_thread_x]</phrase>"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="<phrase  1="$last[title]">$vbphrase[go_first_unread_in_thread_x]</phrase>" border="0" /></a>
This code should display who posted, the date/time and the Go To Last Unread post button. It does everything except the date and time.
Reply With Quote
  #15  
Old 09-13-2005, 08:02 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In the plug-in, try changing this line:

PHP Code:
 $last['lastpost'] = vbdate($vboptions['dateformat'], $last['lastpost'], true); 
to this:

PHP Code:
 $last['lastpost'] = vbdate($vbulletin->options['dateformat'], $last['lastpost'], true); 
and see if that helps at all.
Reply With Quote
  #16  
Old 09-13-2005, 08:09 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

good eye booboo, I didn't even notice that... I guess 3.0 is still stuck in my physie
Reply With Quote
  #17  
Old 09-13-2005, 08:12 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lucky guess is all, as with most of my coding.
Reply With Quote
  #18  
Old 09-13-2005, 08:27 AM
theArchitect's Avatar
theArchitect theArchitect is offline
 
Join Date: Sep 2004
Location: Sydney
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Many thanks kind Sir. That has got the date displaying.

However, the time is not next to the date, as in the forum view. Any chance of stretching a favour and asking how I correct this?

You will see from the screen shots what I mean. The first is the view in the Top 10 list, but the second is taken from the forum view and is how I would like it to look.
Attached Images
File Type: gif top_10.gif (4.0 KB, 0 views)
File Type: gif forum_view.gif (5.6 KB, 0 views)
Reply With Quote
  #19  
Old 09-13-2005, 08:29 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by theArchitect
Many thanks kind Sir. That has got the date displaying.

However, the time is not next to the date, as in the forum view. Any chance of stretching a favour and asking how I correct this?

You will see from the screen shots what I mean. The first is the view in the Top 10 list, but the second is taken from the forum view and is how I would like it to look.
Just do a nowrap in the template for that line.
Reply With Quote
  #20  
Old 09-13-2005, 08:34 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Change that new code BooBoo gave you which was:

PHP Code:
$last['lastpost'] = vbdate($vbulletin->options['dateformat'], $last['lastpost'], true); 
To this:
PHP Code:
$last['lastpost_date'] = vbdate($vbulletin->options['dateformat'], $last['lastpost'], true);  
$last['lastpost_time'] = vbdate($vbulletin->options['timeformat'], $last['lastpost'], true); 
Then you can use $last[lastpost_date] for the date, and $last[lastpost_time] for the time in your template...
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:51 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.04201 seconds
  • Memory Usage 2,282KB
  • Queries Executed 12 (?)
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
  • (3)bbcode_code
  • (4)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete