| View previous topic :: View next topic |
| Author |
Message |
copeland
Joined: 05 May 2008 Posts: 20
|
Posted: Mon Jun 30, 2008 12:45 am Post subject: Display what Category is showing |
|
|
I want to get some text saying
"Displaying <--category--> Events" and if none is selected then read, "Displaying All Categories and Events"
What variable can i call to do this?
I also want to call the current date...
Cheers
Mike |
|
| Back to top |
|
 |
copeland
Joined: 05 May 2008 Posts: 20
|
Posted: Mon Jun 30, 2008 1:20 am Post subject: |
|
|
I figured out how to call the selected caletgory...
| Code: |
echo(" Displaying events from: ".$_cur_cal->get_category_name($GLOBALS['cal']->event_types)); |
This works fine for when a category is selected... but when none is (showing all) it display's nothing and i would like it to say "All Categories"
I still haven't figured out how to show the date of what the calendar is on...
-Mike |
|
| Back to top |
|
 |
copeland
Joined: 05 May 2008 Posts: 20
|
Posted: Mon Jun 30, 2008 1:27 am Post subject: |
|
|
haha ok... so i just figured it out... i shouldn't post these questions so quick...well i guess it might help people out who are having similar problems...
| Code: |
if($GLOBALS['cal']->event_types) {
echo("Displaying events from: ".$_cur_cal->get_category_name($GLOBALS['cal']->event_types));
} else {
echo("Displaying events from all categories");
} |
Is this ok to use Ian? Or should i be using another method? |
|
| Back to top |
|
 |
stevebab
Joined: 07 Apr 2008 Posts: 14
|
Posted: Fri Aug 08, 2008 2:39 am Post subject: Great solution! What about adding it to the print.php |
|
|
Hi! Great solution. This works for me. However, I have two small glitches:
1. The same code doesn't work when I embed it in the print.php file.
2. I can't get it to display the proper category if I have my "All Calendars" view selected. It says it is showing all calendars.
Do you have any ideas?
Steve |
|
| Back to top |
|
 |
copeland
Joined: 05 May 2008 Posts: 20
|
Posted: Fri Aug 08, 2008 2:54 am Post subject: |
|
|
Hi stevebab...
Lucky for you i subscribe to topics lol
Here is my site http://www.webchild.com.au navigate to one of the calendars to see what i've done... i'm not sure i understand exactly what you mean with your problem...
Cheers
Mike |
|
| Back to top |
|
 |
stevebab
Joined: 07 Apr 2008 Posts: 14
|
Posted: Fri Aug 08, 2008 3:53 am Post subject: Thanks for the fast reply! |
|
|
We're just about to go to sleep here in San Diego ...
...unless we're web developers, of course.
I see your calendar (btw, I like that template and use it on a couple of my sites!).
Fantastic concept!
However, I think I need something slightly different -- I'm trying to display the category in the printable view and can't seem to find the right variable.
event_types isn't showing anything.
Also, I am running multiple calendars, and my "All Calendars" view doesn't like to give the name of the category either.
Anyway, I'll keep looking!
Thanks again,
Steve |
|
| Back to top |
|
 |
copeland
Joined: 05 May 2008 Posts: 20
|
Posted: Fri Aug 08, 2008 4:58 am Post subject: |
|
|
Ahhh goodluck then mate
 |
|
| Back to top |
|
 |
|