Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Today's Date: Anywhere you want! Details »»
Today's Date: Anywhere you want!
Version: 1.0.0, by King Kovifor King Kovifor is offline
Developer Last Online: Aug 2015 Show Printable Version Email this Page

Version: 3.5.8 Rating:
Released: 01-03-2006 Last Update: Never Installs: 4
 
No support by the author.

Plugin today's date anywhere in the system. Just place the following JAVASCRIPT in the HTML Code.

HTML Code:
<script language="JavaScript">
<!--
function makeArray() {
for (i = 0; i<makeArray.arguments.length; i++)
this[i + 1] = makeArray.arguments[i];
}
function makeArray0() {
for (i = 0; i<makeArray0.arguments.length; i++)
this[i] = makeArray0.arguments[i];
}
function y2k(number) {
return (number < 1000) ? number + 1900 : number;
}
var months = new makeArray('January','February','March','April','May','June','July','August','September','October','November','December');
var days = new makeArray0('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
var today = new Date();
var day   = days[today.getDay()];
var date  = today.getDate();
var month = today.getMonth() + 1;
var year  = y2k(today.getYear());
//-->
</script>
Different Version: https://vborg.vbsupport.ru/showpost....46&postcount=4

Note:

Java taken from freeservers site. I take NO Credit once so ever, it's just instructions.

Show Your Support

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

Comments
  #2  
Old 01-04-2006, 10:33 AM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, works just fine!
Reply With Quote
  #3  
Old 01-04-2006, 10:47 AM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Screen please
Reply With Quote
  #4  
Old 01-04-2006, 10:58 AM
jugo jugo is offline
 
Join Date: Feb 2004
Location: Reading your emails.
Posts: 573
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wouldn't a plugin using php's

Code:
date();
function work just as well....

then set that to a variable and insert it wherever you want.

EDIT: this is for jilly - as requested in PM: (don't mean to be rude and steal your thread, so please let me know if you want me to move this post.)

Install this plugin and insert
Code:
$today
wherever you want to display the date and time.

You can change the display of the date and time by editing the plugin:

Code:
$today = date("F j, Y, g:i a");                // March 10, 2001, 5:16 pm
$today = date("m.d.y");                        // 03.10.01
$today = date("j, n, Y");                      // 10, 3, 2001
$today = date("Ymd");                          // 20010310
$today = date('\i\t \i\s \t\h\e jS \d\a\y.');  // It is the 10th day.
$today = date("D M j G:i:s T Y");              // Sat Mar 10 15:16:08 MST 2001
$today = date("H:i:s");                        // 17:16:17
Reply With Quote
  #5  
Old 01-04-2006, 11:38 AM
Rich's Avatar
Rich Rich is offline
 
Join Date: Mar 2004
Location: U.S.A
Posts: 921
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

Just to make sure no one gets in trouble, did you get this script from Dynamic Drive? If you did, and you removed their copyright, people can get in trouble for using it with the copyright stripped.
Reply With Quote
  #6  
Old 01-08-2006, 09:21 PM
King Kovifor's Avatar
King Kovifor King Kovifor is offline
 
Join Date: Nov 2004
Location: PA
Posts: 3,872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by iguanairs
Hello,

Just to make sure no one gets in trouble, did you get this script from Dynamic Drive? If you did, and you removed their copyright, people can get in trouble for using it with the copyright stripped.
Nope, what's Dynamic Drive?
Reply With Quote
  #7  
Old 01-09-2006, 04:49 AM
ChurchMedia's Avatar
ChurchMedia ChurchMedia is offline
 
Join Date: Dec 2002
Location: Las Cruces, NM
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jugo
Wouldn't a plugin using php's


Code:
date();

function work just as well....

then set that to a variable and insert it wherever you want.
I tried it your way and it just shows up as yyyy-mm-dd (2006-01-08) on the FORUM HOME page. It's fine on other pages...

Ideas?
Reply With Quote
  #8  
Old 01-09-2006, 07:23 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The date and time are already available anywhere in vb as $datenow and $timenow (formatted as per your vb options). The year is also available as $copyrightyear.
Reply With Quote
  #9  
Old 01-10-2006, 06:09 PM
King Kovifor's Avatar
King Kovifor King Kovifor is offline
 
Join Date: Nov 2004
Location: PA
Posts: 3,872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
The date and time are already available anywhere in vb as $datenow and $timenow (formatted as per your vb options). The year is also available as $copyrightyear.
I did not know that. Thanks.
Reply With Quote
  #10  
Old 07-25-2011, 11:03 PM
radiofranky radiofranky is offline
 
Join Date: Jun 2011
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M View Post
The date and time are already available anywhere in vb as $datenow and $timenow (formatted as per your vb options). The year is also available as $copyrightyear.

Hi,
I tried putting {vb:raw datenow} in my vb4.14 template but nothing is showing up.

thanks
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 01:13 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.04432 seconds
  • Memory Usage 2,296KB
  • Queries Executed 23 (?)
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
  • (3)bbcode_code
  • (1)bbcode_html
  • (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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete