The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
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! |
|
#2
|
||||
|
||||
|
IIRC, that data is stored in the datastore, under "eventcache" (or similar).
|
|
#3
|
|||
|
|||
|
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 |
|
#4
|
||||
|
||||
|
You need to fetch it from the datastore - inject it into $datastore_fetch[] (if it doesn't already exist in $specialtemplates).
|
|
#5
|
|||
|
|||
|
Hi Dismounted,
care to elaborate please? Many thanks |
|
#6
|
||||
|
||||
|
Look in global.php - find $datastore_fetch. Look at what it does.
|
|
#7
|
|||
|
|||
|
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("
SELECT eventid, event.event, userid, event.title, recurring, recuroption, dateline_from, dateline_to, event.calendarid, IF (dateline_to = 0, 1, 0) AS singleday, customfields,
dateline_from AS dateline_from_user, dateline_to AS dateline_to_user, utc, dst
FROM " . TABLE_PREFIX . "event AS event
INNER JOIN " . TABLE_PREFIX . "calendar AS calendar USING (calendarid)
WHERE ((dateline_to >= $beginday AND dateline_from < $endday) OR (dateline_to = 0 AND dateline_from >= $beginday AND dateline_from <= $endday ))
AND visible = 1
AND calendar.options & " . intval($_CALENDAROPTIONS['showupcoming']) . "
ORDER BY dateline_from
");
while ($event = $vbulletin->db->fetch_array($events))
{
$event['title'] = htmlspecialchars_uni($event['title']);
$event['event'] = htmlspecialchars_uni($event['event']);
}
But the event column doesn't reflect in eventcache. What have I missed out or I'm heading in the wrong directions? Thanks |
|
#8
|
|||
|
|||
|
anyone?
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|