vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   adding date at top with global_start (https://vborg.vbsupport.ru/showthread.php?t=97189)

Slapyo 09-30-2005 12:42 AM

adding date at top with global_start
 
PHP Code:

$topdate date("F j, Y"); 

i put that in a plugin hooked to global_start. then i just call $topdate in my header template. it doesn't work. :/

i used to have that code in the phpinclude_start template, but since that is gone i moved it. can't get it to work.

Kirk Y 09-30-2005 01:06 AM

It worked for me. I'm using 3.5.0 Gold. Did you activate it? I know sometimes I'm in a hurry and forget to...

Slapyo 09-30-2005 01:11 AM

Ya I did activate it. Here is what I have.

HEADER TEMPLATE:
PHP Code:

<td height="30" align="right" bgcolor="#2d356e" class="white">$topdate</td

PLUGIN:
PHP Code:

ProductvBulletin
Hook Location
global_start
Title
Header date
Plugin PHP Code
$topdate date("F j, Y");
Plugin is activeYES 

I've tried calling the variable in the template with $GLOBAL[topdate] and $GLOBALS[topdate] as well but neither of those work. I am aware of $datenow but it is not in the format that I want.

Kirk Y 09-30-2005 01:55 AM

I've got the same on my board, everything shows up fine. That's strange... you're running 3.5.0 Gold?

Slapyo 09-30-2005 02:38 AM

Yup, I just downloaded it and upgraded my boards.

OK, nevermind ... complete moron. I didn't know you had to turn the plugin system on until just now. :/ Works perfect.


All times are GMT. The time now is 01:01 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.02960 seconds
  • Memory Usage 1,719KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete