Holidays on custom php page

Started by MarkoKg, April 24, 2017, 08:21:10 PM

Previous topic - Next topic

MarkoKg

Hey there,

I'm trying to add todays holidays on custom php page. I have included ssi.php file, and I'm using ssi_todaysHolidays; to display it, and it works fine, however, I'd like to have something like:

If not empty ssi_todaysHolidays; {
// Something here
}
else {
echo'theres no holiday registered today!';
}

However I have no idea how to format this, anyone can help please? :)

MarkoKg


lisa7878

if (!empty($ssi_todaysHolidays)) {

// here what you want to show

} else {

echo'theres no holiday registered today!';

}

Arantor


lisa7878

Can you explain.. Why that wont work?

Shambles

Well, for a start, $ssi_todaysHolidays would return a string function error.

Then, the default parameter ('output_method') value for the actual function ssi_todaysHolidays() is set to 'echo', so that would require changing to allow the function to return required values.


http://support.simplemachines.org/function_db/index.php?action=view_function;id=532

MarkoKg

Thanks for your answers.
So, there's no easy way to check if there is holidays today using SSI?

Advertisement: