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 08-26-2002 10:51 PM

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?

ExAvIoUr 08-26-2002 11:02 PM

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

Boofo 08-26-2002 11:11 PM

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])."\";");

ExAvIoUr 08-26-2002 11:18 PM

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

i will check it over to make sure i have done it right.

bigmattyh 08-26-2002 11:19 PM

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.

Boofo 08-26-2002 11:20 PM

Make sure you have it right below this:

Quote:

// if user is know, then welcome

Boofo 08-26-2002 11:24 PM

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.

ExAvIoUr 08-26-2002 11:36 PM

bigmattyh, u lost me with ur post. what exactly am i suppose to do?

bigmattyh 08-26-2002 11:51 PM

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. ;)

ExAvIoUr 08-27-2002 12:00 AM

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

how do i do it?


All times are GMT. The time now is 11:24 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.01249 seconds
  • Memory Usage 1,754KB
  • 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
  • (4)bbcode_php_printable
  • (5)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