View Full Version : (request) today's events
indie
11-09-2004, 04:57 PM
I want to do "today's events" in a module, just like it does on the bottom of the forum page.
I want to add this as a table row to my statics, so I need to know what code to add to the template, and what code to add to the php file to get this to work.
There is code there already for birthdays only, I want the code for today's calendar events.
If you can help, thanks!!!!
theMusicMan
11-10-2004, 09:27 AM
Can you not extract the relevant bits of code from the forum home template, also ensuring that all variables required are set in the portal page as well. You may have to look at the php_include_start template for some of those.
Once you have the code used to set what you see in forumhome, simply create a new module and use it in there...maybe with some re-formatting for layout etc...
indie
11-10-2004, 10:11 AM
I'm not familiar with php, but I see where the code is in the index php file. So what exactly would i do? Copy that code from the php file, and put in a php file as a module. Then, copy the code from the template forumhome file and put it in a module template? I tried that and it doesnt work. If someone had the time to do a step by step I'd appreciate it :) Thanks
indie
11-11-2004, 10:49 AM
anyone :( ?
thanks
indie
11-12-2004, 04:26 PM
do you think i'd have better luck asking this on vbulletin.org?
theMusicMan
11-12-2004, 07:17 PM
Sorry indie - I don't subscribe to threads via email notification and hence sometimes miss some of them...
What you could try is to copy the relevant html code out of forumhome and create a new vBa template such as adv_portal_todaysevents and add this as a new module.
This file isn't PHP, it is simply html...:)
You can then play around with the formating until you get it to look as you want it to, and I am sure you'll have to mess around with some variables etc to ensure they get allocated when reading from vBa's index.php as well as vB303's index.php files. What I mean by this is that each index.php file reads it's own set of variables and allocates values to them.
So... as forumhome is usually called from vB's index.php file - the variables you are after that are displayed in forumhome are actually populated, but if you put that code into a template called by vBa's index.php file, they may not get allocated and initialised and therefore wouldn't display any values.
Hope this helps... and sorry for not replying sooner.
indie
11-13-2004, 04:00 PM
ok thanks, I'll try!! (what variable would i be looking for in php start, an events one?)
:)
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.