![]() |
How to get Todays Birthdays and Todays Events on another page
Trying to display both the Todays birthdays and todays events on another page, used this code... is there some javascript line Im missing to get it to display (like I was missing for the edit icon)
Code:
<if condition="$show['birthdays']"> |
You need to define the variables:
$birthdays and $upcomingevents If you're calling this from a .php page, then that's a good place to do it. Otherwise, you'll have to use a plugin. |
Heres the php page... Ive tried placing those 2 conditionals on different parts of the page and it prevents the page from loading...
Code:
<?php |
You have a few things missing, I haven't really read over the rest of the script but try adding the code in red to see what happens (the $today variable is very important):
Code:
<?php EDIT: Looks like you defined the $specialtemplates variable twice. That's not good for business ;) |
Looks like you defined the $specialtemplates variable twice. That's not good for business
cant find where its down twice... Also, got birthdays to show... but in the template, I had to remove all the EVENT stuff or the page wouldnt load... what is the correct code for the template to show events? --------------- Added [DATE]1238029556[/DATE] at [TIME]1238029556[/TIME] --------------- also you've been a great help to me these last 2 days... pm me your email so I can send you some paypal thanks... |
Quote:
Code:
<?php I'll investigate the rest of the code in a little bit. |
must be blind... saw that... removed the 2nd one... thanks!
|
I heard that vBulletin's iif function is depricated. This could easily be the cause of the issue, since it may not be defined properly for the use of outside code. However, since it's still being used in forumhome - I don't think this is really the case.
iif is a ternary operator. Code:
variable = iff(boolean, true, false); Code:
if(boolean) Next, there's a hook being called. I don't know if you have any calendar affecting plugins, but it might be causing your script to break. You might want to remove the hook. Areas of code I mentioned are highlighted: Code:
<?php |
ok removed the red parts, re-added the entire EVENTS part to the php file... now the page wont load again. (nothing changed on template, works without this whole EVENTS section of the php file)
so it must be something within this code that wont let the page load. Code:
// ### TODAY'S EVENTS ################################################# Heres the template part that calls the EVENT info to display... Code:
<if condition="$show['upcomingevents']"> |
Dang, dude. That is some serious bad mojo. At this point, I think it'd just be easier to write your own code instead of copying what forumhome has.
When you say nothing displays, is the page white? Or what? |
completely white... wont load... I remove the php part with the EVENT stuff... loads up. Going through that part of the code right now to see if its callin something that would prevent the page from loading... Do I need all that stuff in the php part for the EVENTS?
--------------- Added [DATE]1238034852[/DATE] at [TIME]1238034852[/TIME] --------------- I just want to show TODAYS EVENTS. No multiple days or anything else that code is asking for. I also dont care for it to check who has access to see events based on permissions. Just show all TODAYS EVENTS from all the calendars. (If that matters) lol --------------- Added [DATE]1238035345[/DATE] at [TIME]1238035345[/TIME] --------------- OK UPDATE. been trying to track down whats preventing the page to load... narrowed it down to the first couple of lines... Code:
// ### TODAY'S EVENTS ################################################# |
Well, 86400 = 24 hours, so that's setting it to 2 days in the future at least.
Change the snippet to Code:
// ### TODAY'S EVENTS ################################################# EDIT: On second thought, add this right below the global.php include: Code:
require_once(DIR . '/includes/functions_bigthree.php'); |
damn, did all that and the page is white again...
|
Do the scripts conflict with each other? If you delete the birthday stuff, does it still display a blank page? Or does it display the events?
|
Let me try that... I'll try to remove the birthday template stuff, then the birthday php stuff...
--------------- Added [DATE]1238079024[/DATE] at [TIME]1238079024[/TIME] --------------- Put the event stuff on the php, page is white. Removed it, works again (like before) Now put the event stuff again, but this time removed the birthday stuff, still white page. For some reason, its something in here that is keeping the page from loading. I think Id rather scrap this code I got from the FORUMHOME. What php should I use in its place?? Heres the current event php im using Code:
// ### TODAY'S EVENTS ################################################# |
SOLVED
Got it to work with this php code Code:
// ### TODAY'S EVENTS ################################################# Code:
<if condition="$show['upcomingevents']"> |
Quote:
Quote:
|
All times are GMT. The time now is 03:20 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:
|