vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Yesterday/Today Datestamp Hack (https://vborg.vbsupport.ru/showthread.php?t=34527)

bigmattyh 04-20-2002 05:59 PM

Quote:

it doesnt work.. i did everything correct twice and nothing shows up. ????
Well, keep in mind that as a couple of new versions of vB have come out, the line references are slightly off. For example, in functions.php, the replacement code for vbdate() is a few dozen lines further down.

I don't know if that's the problem you're encountering, but if you do the replacements correctly, the hack should be working correctly.

Chris M 04-20-2002 06:10 PM

Das hack war sehr gut...

It works on 2.2.5...

I am living proof of that:D

*Holy Cr*p - Heart Attack :confused:*:):D

Satan

UGate 04-28-2002 11:05 PM

Wie kann ich Today in einer Farbe machen z.b.rot

Today in red ?

Hubsi 04-28-2002 11:17 PM

wie w?rs mit z.b.

PHP Code:

$date="<font color=red>Heute</font>"

;)

HyperS 04-29-2002 01:35 PM

Great Hack man! Superb work.

KeithMcL 05-01-2002 07:36 AM

Strange - I installed this hack yesterday (2002-04-30) and had a look at my memberlist to see if it worked, but I couldn't see any one who had joined for "Today" or "Yesterday".

I then had a look at it again this morning (2002-05-01) and those that registered yesterday i'm seeing them as being registered "Today" and not seeing anyone as being registered "Yesterday" even though some people have.

My forums can be found at www.webdevforums.com

Any help Big Matt would be appreciated.

bigmattyh 05-01-2002 10:13 AM

Hi Keith,

I took a look at your members list, and like you, I found that vB was reporting that two people registered Today. But then the next most recent registration is on 26-04-02 (4-5 days ago).

I need some more info to see if there's a problem. Could you post the datestamps from when Lisle and chachet joined, and could you also let me know the timezone of your server?

Thanks,
Matt

http://www.webdevforums.com/memberli...hat=datejoined

Aaow AnD wHiTe 05-01-2002 02:06 PM

Thanx for this great hack, Matt. Is really useful!! Would it be possible to make the word "Today" template-based? Cause we have a Spanish and an English template, and our english users keep seeing "Hoy" (spanish word for "Today") and it's a little confusing :(

Thanx in advance for your help!! ^__^

bigmattyh 05-01-2002 05:05 PM

Aaow and White (and anyone else who is interested in a template-based version of this hack):

Here is how to convert this hack so that it uses templates.

First, find this block of code:
PHP Code:

    if ($date==$todaydate) {
      
$date="Today";
    }
    if (
$date==$yestdate) {
      
$date="Yesterday";
    } 

... and replace it with this:
PHP Code:

    if ($date==$todaydate) {
      eval(
"\$date= \" ".gettemplate('today')."\";");
    }
    if (
$date==$yestdate) {
      eval(
"\$date= \" ".gettemplate('yesterday')."\";");
    } 

Then create 2 custom templates, called "today" and "yesterday". Within these templates, just type the word you want to appear for today and yesterday. You can do this for as many template sets as you want -- vB will pick the right one from the current style setting.

Hope this helps,
Matt

inetd 05-03-2002 01:17 PM

[high]* inetd click install button :)[/high]


All times are GMT. The time now is 06:35 AM.

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.01284 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete