Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: 1.00, by bigmattyh bigmattyh is offline
Developer Last Online: Mar 2014 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-26-2002 Last Update: Never Installs: 326
 
No support by the author.

YESTERDAY/TODAY DATESTAMP HACK - Updated 5/25/02
Tested and working on vB 2.2.1 -> 2.2.6

Description: This hack replaces the standard "05-25-02, 02:45 PM" date with "Today" or "Yesterday" anywhere you have a date posted, if the date matches today's or yesterday's date.

Demo: Installed on vBulletin.org.

The following are add-ons that may be helpful depending on your specific needs.

Extra features: Helpful template hacks: Due to the way the standard vB template set handles date columns in forumhome.php and forumdisplay.php, some template changes may be of use:Comments and criticism are always welcome.
Please click the install button to show your support.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 02-26-2002, 02:44 PM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Lucky
Any chance of getting this hack to work for all instances, such as You last visited: 02-26-2002 12:43 AM.
Lucky:

This instance requires on additional hack. Here it is:

In index.php, around line 250, find this block of code:
PHP Code:
if (isset($bbforumview[$forum['forumid']]) and $bbforumview[$forum['forumid']]>$bbuserinfo['lastvisit']) {
    
$userlastvisit=$bbforumview[$forum['forumid']];
} else {
    
$userlastvisit=$bbuserinfo['lastvisit'];

After this block, just insert the following line:
PHP Code:
$bbuserinfo['lastvisitdate'] = vbdate($dateformat$bbuserinfo['lastvisit']); 
This should fix this particular instance. Thanks for the tip!

Slowly but surely, the exceptions to this hack are finding there way out of the woodwork. There shouldn't be more than one or two more after this one -- if any.
Reply With Quote
  #43  
Old 03-07-2002, 08:21 AM
r.cakir r.cakir is offline
 
Join Date: Nov 2001
Location: Switzerland
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello bigmattyh
Maybe you can help me with this odd problem: I can't use the attached zip-file in your first post. After it's downloaded, decompressed and opened in a Editor (BBEdit) I see only unusable code. I use Mac OS X 10.1.3 and I don't have problems with all other downloads on this Board, except for this one.

It's possible for you to send me the file with Email ?

Thanks!
Reply With Quote
  #44  
Old 03-08-2002, 10:03 AM
Kohhal's Avatar
Kohhal Kohhal is offline
 
Join Date: Feb 2002
Location: Dublin, Ireland
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Lucky
Any chance of getting this hack to work for all instances, such as You last visited: 02-26-2002 12:43 AM.
I want to get this working too but instead of it showing "You last visited: Today."(which the additional hack you supplied does) I want it to show the time too ie. "You last visited Today 12:43 AM."
Is this possible? How do I do it?

Cheers,

G

Ps. Great hack :up:
Reply With Quote
  #45  
Old 03-08-2002, 05:43 PM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the thumbs up!

Here's how you do what you're looking to do. By the way, this isn't directly related to my hack, but it does get the job done.

In index.php, around line 260, you'll see this line:
PHP Code:
$bbuserinfo['lastvisitdate'] = vbdate($dateformat$bbuserinfo['lastvisit']); 
Immediately after it, insert this line:
PHP Code:
$bbuserinfo['lastvisitdate'] .= " at " vbdate($timeformat$bbuserinfo['lastvisit']); 
And you're set. I think you can probably figure out how to customize this. For example, if you want it to say, "You last visited Today, at 8:33 PM", you'd just insert a comma before the " at " in the above line.

That's it.
Reply With Quote
  #46  
Old 03-08-2002, 09:15 PM
Okiewan's Avatar
Okiewan Okiewan is offline
 
Join Date: Dec 2001
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice.. thank you!
Reply With Quote
  #47  
Old 03-10-2002, 02:29 PM
sTive sTive is offline
 
Join Date: Feb 2002
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there anybody who tried to use it under vb2.2.3b ?
Reply With Quote
  #48  
Old 03-10-2002, 06:51 PM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I haven't installed vB 2.2.3 -- mostly because I don't want to upgrade now and then have to upgrade again when vB 3 comes out (hopefully next month).

Are you having problems with the hack under 2.2.3? If so, I can try to look into it for you.
Reply With Quote
  #49  
Old 03-10-2002, 10:49 PM
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Location: Ontario, CA
Posts: 821
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by bigmattyh
Are you having problems with the hack under 2.2.3? If so, I can try to look into it for you.
I upgraded from 2.2.2 to 2.2.4 this morning and this hack is working fine.
Reply With Quote
  #50  
Old 03-11-2002, 02:12 AM
Recon_Boy Recon_Boy is offline
 
Join Date: Nov 2001
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by FWC
I upgraded from 2.2.2 to 2.2.4 this morning and this hack is working fine.
Same here.
Reply With Quote
  #51  
Old 03-11-2002, 08:49 AM
Kohhal's Avatar
Kohhal Kohhal is offline
 
Join Date: Feb 2002
Location: Dublin, Ireland
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by bigmattyh
...Here's how you do what you're looking to do...
Perfect, thanks a lot. Installed perfectly
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 02:41 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07237 seconds
  • Memory Usage 2,321KB
  • Queries Executed 25 (?)
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
  • (4)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete