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)
-   -   copyright update automatically. (https://vborg.vbsupport.ru/showthread.php?t=47971)

Davey 01-20-2003 10:00 PM

copyright update automatically.
 
[ Copyright updates automatically (v1.2) ]

Ok guys and girls, this is my first contribution, and php edit.
This works pretty fine for me, and I hope you all enjoy it.
Basically, it updates the copyright year in the footer template and on the admin/index.php page.
(I hope this isn't a breech of copyright Jelsoft/vB, it's just a contribution :paranoid:..)
Follow the guides in the attached TXT file, and this should be installed fine.
If I've missed anything out, or if this doesn't work, please let me know in this thread.
I hope you enjoy this hack!!

Regards; David G.

[Things to do]
2 files to edit (admin/global.php, admin/index.php)
2 templates to edit (footer, phpinclude)
0 new files
0 new templates
0 queries to run

[Bug fixes]
1.1: $thisyear works in the admin index now :).
1.2: none.

[Updates]
1.1: Set the variable $thisyear in the admin global.php file so it works ok in the admin panel.
1.2: Used Boofo's idea on the main page: Used vbdate("Y", $ourtimenow); so that the copyright year follows the user's timezone as opposed to the server's. But NOT in the admin CP, because vbdate(); isn't set in admin/global.php is it? So it wouldn't work, I don't think.

[Instructions]
- Upgrading to 1.1 from 1.0: I'd reinstall the whole hack because I neatened out the instructions.
- Upgrading to 1.2 from 1.0: Reinstall the hack using the new and improved instructions. A few more things added.
- Upgrading from 1.1 to 1.2: Open up the phpinclude template, and replace $thisyear = date("Y"); with $thisyear = vbdate("Y", $ourtimenow);

TECK 01-21-2003 04:17 PM

Congrats on your first hack. Keep them comming. :)

Davey 01-21-2003 04:19 PM

Thank you and I will try =).
I'm currently having a go at php and MySQL so my hacks might get more interesting, hehe.

Dave.

nuno 01-21-2003 05:36 PM

Nice one. :)
Thanks.

NTLDR 01-21-2003 05:39 PM

You need to add this line somehwhere in admin/global.php I suggest otherwise $thisyear won't work:

PHP Code:

$thisyear date("Y"); 


Dean C 01-21-2003 05:45 PM

What a good idea :)!

nuno 01-21-2003 05:45 PM

Quote:

Originally posted by NTLDR
You need to add this line somehwhere in admin/global.php I suggest otherwise $thisyear won't work:

PHP Code:

$thisyear date("Y"); 


Read Step 10 & 11.
It's working fine.

NTLDR 01-21-2003 05:47 PM

Quote:

Originally posted by nuno


Read Step 10 & 11.
It's working fine.

Since when has the phpinclude template been parsed in the ACP?

nuno 01-21-2003 05:53 PM

Quote:

Originally posted by NTLDR


Since when has the phpinclude template been parsed in the ACP?

:confused:
That's why it's there for, parsing php.

NTLDR 01-21-2003 05:55 PM

I'm not talking about templates, for the forums, but admin/index.php if the code is only added to the phpinclude template then it isn't parsed in the ACP hence $thisyear won't show on admin/index.php


All times are GMT. The time now is 10:05 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.01103 seconds
  • Memory Usage 1,737KB
  • 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_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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