![]() |
How to make $upcomingevents as a global variable?
Hi everyone
I noticed that $upcomingevents is only applicable to forumhome template. Is it possible to make this $upcomingevents available across all templates? Thanks --------------- Added [DATE]1244545128[/DATE] at [TIME]1244545128[/TIME] --------------- I have tried to make it global and hooked it at initstart up. Nope. Doesnt seem to be working. Sheesh. $upcomingevents <-- I just want it to be available @ all templates/pages! |
IIRC, that data is stored in the datastore, under "eventcache" (or similar).
|
Hi Dismounted, thanks for the reply.
This is the one: $vbulletin->eventcache Do I have to write a plugin to retrieve the value? I have tried to insert it into the templates but it returned me "Array". Normal php functions can't work in templating. Please advise. Many thanks |
You need to fetch it from the datastore - inject it into $datastore_fetch[] (if it doesn't already exist in $specialtemplates).
|
Hi Dismounted,
care to elaborate please? Many thanks |
Look in global.php - find $datastore_fetch. Look at what it does.
|
Hi guys,
No issues. Managed to retrieve data from eventcache. Thanks! But I wish to have the description of the event too. I have modified "functions_calender.php", function build_events() Modified the sql statement to Code:
$events = $vbulletin->db->query_read_slave(" But the event column doesn't reflect in eventcache. What have I missed out or I'm heading in the wrong directions? Thanks |
anyone? :)
|
All times are GMT. The time now is 08:23 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|