vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Miscellaneous Hacks - JavaScript: Copyright Year Generation (https://vborg.vbsupport.ru/showthread.php?t=203837)

King Kovifor 01-31-2009 10:00 PM

JavaScript: Copyright Year Generation
 
1 Attachment(s)
Just because a bunch of people wanted me to release this. Here's a little JavaScript I wrote that you can place in your copyright statement to keep your year up to date. Just put it where you want the year to display:

HTML Code:

<script type="text/javascript">
d = new Date();
y = d.getFullYear();
document.write(y);
</script>

OR

HTML Code:

<script type="text/javascript">d = new Date();y = d.getFullYear();document.write(y);</script>
They both do the same thing, one's just on a single line. :)

A JS file attached just in case you want to keep it as a back up.

Thanks to Gasper for reminding me to put in the text/javascript tag. :)

Also, this works with any version of vBulletin (or should) and can be seen on vB.org.

UncoderMom 02-01-2009 03:00 PM

*clicks install*

teehee

Lynne 02-01-2009 03:49 PM

Thanks!

digicom 02-01-2009 04:07 PM

Thankyou:up:

Paul M 02-01-2009 04:26 PM

Well, since we are using it here, id better click install. :)

ForumsMods 02-01-2009 04:29 PM

Installed. ;)
Simple hack, but very useful.

Vaupell 02-01-2009 04:47 PM

ahh here it was, ;) installed ofc.

King Kovifor 02-01-2009 04:51 PM

Quote:

Originally Posted by Paul M (Post 1731039)
Well, since we are using it here, id better click install. :)

I was actually quite surprised that you used it. :) I'm sure you could have whipped that up quite faster than me (it sadly took me like 5 minutes as my first code failed (document.write(Date.getFullYear()) ;)).

Magnumutz 02-01-2009 06:34 PM

Thanks dude, installed :D

Ryan Ashbrook 02-01-2009 07:41 PM

Thanks. :D


All times are GMT. The time now is 12:38 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.02620 seconds
  • Memory Usage 1,726KB
  • 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
  • (2)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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