Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jan 2004
Posts: 193
S
sb
Offline
member
member
S Offline
Joined: Jan 2004
Posts: 193
We are converting to Drupal and would like to know what code we need so we can insert the calendar there.

Joined: Jan 2005
Posts: 186
member
member
Joined: Jan 2005
Posts: 186
Go to Portal Layout in the Control Panel and click on "External Use" to the right of Public Calendar. Public Calendar is the last entry that isn't a link. It has the code that you'll need to insert the calendar into Drupal.

Joined: Jan 2004
Posts: 193
S
sb
Offline
member
member
S Offline
Joined: Jan 2004
Posts: 193
Is there a way to customize the colors of this calendar that we have now put in the side bar of Drupal? Unfortunately, it has a back background and dark blue numbers and is next to impossible to read.

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
yes, if you look @ the code generated, you will see id="island_calendar", so you can just override the CSS with more specifics in your drupal css smile

Joined: Jan 2004
Posts: 193
S
sb
Offline
member
member
S Offline
Joined: Jan 2004
Posts: 193
Some feedback...

The <div id="island_calendar"> is immediately closed. The calendar table is not inside that div tag.

So I am off adding an id to the table tag itself. #island_calendar_table I named it.

The bazaar colors are actually coming from our Drupal theme. The days of the week cells have class="tdheader" upon them, and the number days of the month have class="alt-1" upon them... and both of those classes come from our Drupal theme. Why would UBB code know class names within our Drupal theme and go sprinkling those on ever cell of the table it creates?!?! I am confused...

Last edited by sb; 10/13/2010 11:12 AM.
Joined: Jan 2005
Posts: 186
member
member
Joined: Jan 2005
Posts: 186
Those are how UBB defines it also. It is a common naming convention. It is ultimately just a coincidence.

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
i can't see your drupal portal, but i know in the sidebar for a calendar island on my threads installs, that div encloses all the content for that island.

and as for combined classes, just use more selective css rules and you can cascade a different effect, regardless of overlap.

Joined: Jan 2004
Posts: 193
S
sb
Offline
member
member
S Offline
Joined: Jan 2004
Posts: 193
Originally Posted by Chosen
Those are how UBB defines it also. It is a common naming convention. It is ultimately just a coincidence.
That is unfortunate as UBB's CSS can not be incorporated since we are talking a block within the Drupal page layout. So Drupal's CSS wins without contest.

Originally Posted by Sirdude
and as for combined classes, just use more selective css rules and you can cascade a different effect, regardless of overlap.
The PHP code to get the calendar within a Drupal block is assigning CSS to each cell of the calendar table. Since the naming collision exists, "my hands are tied". Me defining CSS at the <div id="island_calendar"> will be overruled by the CSS of the cell, which is what we see happening.

Are there additional switches to the PHP code to adjust the class names in the HTML it is generating for the calendar?

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
do you have a link to your drupal install + island for me to see ?

much easier that way

with firefox / firebug, it is real easy to tweak things without changing code, then i can give you specifics.

your hands aren't as tied as you might thing.. 2c

Joined: Jan 2004
Posts: 193
S
sb
Offline
member
member
S Offline
Joined: Jan 2004
Posts: 193
Originally Posted by Sirdude
do you have a link to your drupal install + island for me to see ?
Thank you for your offer of assistance.

http://christians-in-recovery.org/homepage

Originally Posted by Sirdude
with firefox / firebug, it is real easy to tweak things without changing code, then i can give you specifics
That is what I am using to on-the-fly edit CSS / see what CSS is active at a specific place in the HTML / etc...

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
ok, good

Code
#island_calendar_table .tdheader {
  background-color:#2153AA;
}

will change only the tdheader class inside the island_calendar_table (id) for example

you'd need to make sure that css is included after the original definitions. (my guess is style.css gets loaded last, so put that in the bottom of that file)

then the cascading part of Css take effect smile

to go further, say we wanted to restyle the link (A tag) for "october"

Code
#island_calendar_table .tdheader a:link {
  color:#FFFFFF;
}

would make it White.. and so on..

the selectors themselves cascade wink

finally, make the alt-1 class inside the div have a lighter background

Code
#island_calendar_table .alt-1 {
background-color:#F3F7FB;
}

end result is: [Linked Image from sirdude.com]

and it doesn't overwrite any of the existing .tdheader, .alt-1 rules, since i make these ONLY apply INSIDE of that div

ps, i also recommend a Firefox plugin (Stylish) that gives you even more control over the Site CSS (for testing)..

Colorzilla is a must too..

Matter of fact, i use stylish for THIS site, to restyle certain things from the supplied ubbcentral default style.

2c

Joined: Jan 2004
Posts: 193
S
sb
Offline
member
member
S Offline
Joined: Jan 2004
Posts: 193
Learn something new every day! Today, combining ID's / Classes, then I also combined an ID / tag. Neat trick, this:

#island_calendar_table .alt-1

"Multiple values in the WHERE clause".

Have a look-see at the results. I am content with the results at the moment. Thanks very much for the mini CSS education!

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
that's what the C in CSS is all about wink


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
1 members (ahmed047), 272 guests, and 132 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)