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
  #132  
Old 05-30-2002, 05:22 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I guess I didn't get my message typed as fast as you, bigmattyh. You beat me to the draw.
Reply With Quote
  #133  
Old 05-30-2002, 05:23 PM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Boofo
I guess I didn't get my message typed as fast as you, bigmattyh. You beat me to the draw.
They call me quickfingers.
Reply With Quote
  #134  
Old 05-30-2002, 05:27 PM
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 bigmattyh

They call me quickfingers.
That's alot better than what they call me.
Reply With Quote
  #135  
Old 06-01-2002, 03:27 AM
lordofgun lordofgun is offline
 
Join Date: Jan 2002
Posts: 285
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

GREAT JOB! INSTALLED!
Reply With Quote
  #136  
Old 06-02-2002, 02:57 AM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!
Reply With Quote
  #137  
Old 06-09-2002, 04:06 PM
Illuvatar's Avatar
Illuvatar Illuvatar is offline
 
Join Date: Apr 2002
Location: So. Cal
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I wanted to put the welcome/last visit/new posts into a sensible paragraph, the way it is here, so that it looks like this:
Mae Govannen!, Illuvatar
The time now is 02:59 PM.
You last visited: 06-08-2002 02:53 PM.
There have been 1 new posts and 1 updated threads since then.
View New Posts

In order to do this I modified my welcometext template to include the time is and last visited stuff lines that are normally in the forumhome template.

My welcometext now looks like this:
PHP Code:
<smallfont>Mae Govannen!, <b>$username</b><br></smallfont>
    
The time now is $timenow.<br>
    
You last visited$bbuserinfo[lastvisitdate].
<
br>There have been <b>$getnewpost[posts]</b> new posts and <b>$getnewthread[threads]</bupdated threads since 
then

and the call in forum home looks like this:
PHP Code:
    <td align="right"><smallfont>$welcometext<br><b>$newposts</b></smallfont></td>
</
tr
My index.php file still has the code to change the $welcometext to read" Today, at blah blah", but it's not working anymore.

I hope I included enough information..hehehe...can someone help me with this?

I've been very pleased with this hack, and know it's probably something simple, but these old eyes just aren't seeing it!

Thanks,
Illu
Reply With Quote
  #138  
Old 06-10-2002, 06:01 AM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the kind words about the hack!

Did you try doing this? https://vborg.vbsupport.ru/showthrea...456#post247456

That post explains how to get the "You last visited" date to follow the Today/Yesterday format.
Reply With Quote
  #139  
Old 06-10-2002, 06:48 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could that be the problem? I moved mine out of forumhome to the other template too. Wouldn't that cause it to stop working right? I akready did everything in the link you posted. It has to do with the welcome panel final hack, I think.


Quote:
Originally posted by bigmattyh
Thanks for the kind words about the hack!

Did you try doing this? https://vborg.vbsupport.ru/showthrea...456#post247456

That post explains how to get the "You last visited" date to follow the Today/Yesterday format.
Reply With Quote
  #140  
Old 06-10-2002, 03:16 PM
Illuvatar's Avatar
Illuvatar Illuvatar is offline
 
Join Date: Apr 2002
Location: So. Cal
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

but that IS the puzzler now isn't it Boofo? :bunny:

Just like you all I did was template changes, to make the today thing work in the welcome piece only requires a change to the index.php file, and I didn't mess with that.

In fact here is what that piece of the index.php looks like:
PHP Code:
$getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'");
if (
$bbuserinfo['userid']!=0) {
  
$username=$bbuserinfo['username'];
  eval(
"\$welcometext = \"".gettemplate('forumhome_welcometext')."\";");
  eval(
"\$logincode = \"".gettemplate('forumhome_logoutcode')."\";");
  eval(
"\$newposts = \"".gettemplate('forumhome_newposts')."\";");

} else {
  
$welcometext "";
  eval(
"\$newposts = \"".gettemplate('forumhome_todayposts')."\";");
  eval(
"\$logincode = \"".gettemplate('forumhome_logincode')."\";");
}
  eval(
"\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
  
" , at ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";"); 
I'm thinking that maybe it has to do with the fact that I am now "calling" $welcometext from my forumhome template, but I'm not sure as to why that would affect it. :ermm:
Reply With Quote
  #141  
Old 06-10-2002, 03:45 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Like yours, mine worked before I added the welcome panel final box to the top of my home page. After I moved the code in there, it stopped working in that spot. Everywhere else it seems to be working fine though. I have seen alot of times calling code meant for one place to another place does not always work. I guess that's why you have to edit more than one file most of the time to get some things to work in different places. Hopefully, someone will be able to come up with a fix for this somehow.

By the way: My code looks exactly like yours here, so that should tell us something, huh?

Quote:
Originally posted by Illuvatar
but that IS the puzzler now isn't it Boofo? :bunny:

Just like you all I did was template changes, to make the today thing work in the welcome piece only requires a change to the index.php file, and I didn't mess with that.

In fact here is what that piece of the index.php looks like:
PHP Code:
$getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'");
if (
$bbuserinfo['userid']!=0) {
  
$username=$bbuserinfo['username'];
  eval(
"\$welcometext = \"".gettemplate('forumhome_welcometext')."\";");
  eval(
"\$logincode = \"".gettemplate('forumhome_logoutcode')."\";");
  eval(
"\$newposts = \"".gettemplate('forumhome_newposts')."\";");

} else {
  
$welcometext "";
  eval(
"\$newposts = \"".gettemplate('forumhome_todayposts')."\";");
  eval(
"\$logincode = \"".gettemplate('forumhome_logincode')."\";");
}
  eval(
"\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
  
" , at ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";"); 
I'm thinking that maybe it has to do with the fact that I am now "calling" $welcometext from my forumhome template, but I'm not sure as to why that would affect it. :ermm:
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:45 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.06256 seconds
  • Memory Usage 2,353KB
  • 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
  • (4)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
  • (2)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