Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /home/abledesi/domains/abledesign.com/public_html/navfiles/log.php on line 126

AbleDesign - Support Forum

AbleDesign Forum Index AbleDesign

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
AbleDesign Forum Index
MyCalendar Discussion
Categories-Can they be displayed with diff backgnd color
Post new topic   Reply to topic

Post new topic   Reply to topic    AbleDesign Forum Index -> MyCalendar Discussion
View previous topic :: View next topic  
Author Message
virgilio
Lurker
Lurker


Joined: 25 Oct 2002
Posts: 4
Location: Toronto

PostPosted: Thu Nov 07, 2002 6:53 am    Post subject: Categories-Can they be displayed with diff backgnd color Reply with quote

Has anyone tried to create a "background color" for each category?

Would it be difficult to implement? I would like to create a calendar that quickly displayed events within a DAY cell in different colors when the ALL CATEGORIES was used.

In summary...I would like a way to have a different colored background for each event based on CATEGORY.

Any help would be greatly appreciated.

Thanks -->
Back to top
View user's profile Send private message Send e-mail
Dan
Admin / Developer
Admin / Developer


Joined: 19 Feb 2001
Posts: 2057

PostPosted: Thu Nov 07, 2002 10:37 am    Post subject: Reply with quote

I hadn't thought to try that, but I imagine it could be done pretty easily. You would need to build a conditional section wherever you want background colors controlled, i.e. index.php (<body>) or day_display() in lib.php.

Code:
switch ($cat) {
   case "1":
      $color = "#0000ff";
      break;
   case "2":
      $color = "#00ff00";
      break;
   case "3":
      $color = "#ffffff";
      break;
   case "4":
      $color = "#ff0000";
      break;
   default:
      $color = "#dedede";
}


Then place $color (or whatever variable you choose to use) into the bgcolor tag for that location.

Cheers,
Dan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AbleDesign Forum Index -> MyCalendar Discussion All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group


Home | Services | Pricing | Portfolio | About Us | Contact
Support | Programs | Purchase | Tutorials | Site Map

© 1999-2025 AbleDesign.com - Web Design that Can!