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
  #192  
Old 08-26-2002, 10:51 PM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by ExAvIoUr
the closest thing i have to that is this

PHP Code:
$bbuserinfo['lastvisitdate'] = vbdate($dateformat$bbuserinfo['lastvisit']);
$bbuserinfo['lastvisitdate'] = " at " vbdate($timeformat$bbuserinfo['lastvisit']); 
is that it. and where do i put that.
I don't know what you're trying to do. What's the problem?
Reply With Quote
  #193  
Old 08-26-2002, 11:02 PM
ExAvIoUr ExAvIoUr is offline
 
Join Date: Jan 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i am trying to get the word at in there. so it couls say yesterday "AT" blah blah. in the forumhome.

i am trying to find this code:

PHP Code:
eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
" , at ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";"); 
the closest that i have is this:
PHP Code:
$bbuserinfo['lastvisitdate'] = vbdate($dateformat$bbuserinfo['lastvisit']);
$bbuserinfo['lastvisitdate'] = " at " vbdate($timeformat$bbuserinfo['lastvisit']); 
do u get it
Reply With Quote
  #194  
Old 08-26-2002, 11:11 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Change this:

Quote:
$bbuserinfo['lastvisitdate'] = vbdate($dateformat, $bbuserinfo['lastvisit']);
$bbuserinfo['lastvisitdate'] = " at " . vbdate($timeformat, $bbuserinfo['lastvisit']);
to this:

Quote:
eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
" at ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";");
Reply With Quote
  #195  
Old 08-26-2002, 11:18 PM
ExAvIoUr ExAvIoUr is offline
 
Join Date: Jan 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i changed it and its the same. no change to it.

i will check it over to make sure i have done it right.
Reply With Quote
  #196  
Old 08-26-2002, 11:19 PM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay.

You aren't supposed to be looking for
PHP Code:
eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
", at ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";"); 
You're supposed to be replacing the existing $bbuserinfo[lastvisitdate] lines with that line.

Replace your lines that you have with the above line.


And finally, if you're trying to insert ", at" into every instance where the date is called, this isn't the way to do it. The way to do it is through templates... But you probably know that since you've at least scanned through this thread to find an answer to your question.
Reply With Quote
  #197  
Old 08-26-2002, 11:20 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Make sure you have it right below this:

Quote:
// if user is know, then welcome
Reply With Quote
  #198  
Old 08-26-2002, 11:24 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That doesn't quite work with ALL of the dates, although most of them can be changed through the templates. The editpost.php is one place for example that you have to change the date and time hardcode to be able to use "at" with it.

Quote:
Originally posted by bigmattyh
And finally, if you're trying to insert ", at" into every instance where the date is called, this isn't the way to do it. The way to do it is through templates... But you probably know that since you've at least scanned through this thread to find an answer to your question.
Reply With Quote
  #199  
Old 08-26-2002, 11:36 PM
ExAvIoUr ExAvIoUr is offline
 
Join Date: Jan 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bigmattyh, u lost me with ur post. what exactly am i suppose to do?
Reply With Quote
  #200  
Old 08-26-2002, 11:51 PM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We'll do this like a choose-your-own-adventure.

#1: What are you trying to accomplish?
If you want to insert ", at" into the "You last visited" line on your index home page, go to #2!
If you want to insert ", at" into other dates -- not just the "You last visited" line, go to #3!


#2: You want to insert ", at" into the "You last visited" line on your index home page. Simple. Just do this. If that fails, re-read the instructions on how to do this. There's a link in the first post of this thread.

#3: You want to insert ", at" into other dates -- not just the "You last visited" line. Then you'll have to learn more. Start by reading through the posts to this thread. For some date conversions, yes, it's necessary to hack the code, but for many of them, you'll have to change your templates, which is very easy to do.

In any case, you need to read through the posts of this thread, because your issue has been brought up about half a dozen times before, and answered. I have faith that you'll be able to figure out not only how this hack works but how to fix it, too. If you still need help after you've read all the posts and you've looked at the code and tried to figure it out, I will be happy to help you further.
Reply With Quote
  #201  
Old 08-27-2002, 12:00 AM
ExAvIoUr ExAvIoUr is offline
 
Join Date: Jan 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

in post 86 that the one that i want to do.

how do i do it?
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 04:58 PM.


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.06853 seconds
  • Memory Usage 2,327KB
  • Queries Executed 27 (?)
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_postinfo_query
  • fetch_postinfo
  • 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