boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CSS samples

 
Post new topic   Reply to topic    boardom Forum Index -> (X)HTML / CSS help
View previous topic :: View next topic  
Author Message
scrazynet11



Joined: 18 Nov 2002
Posts: 41
Location: Rio de Janeiro, Brazil

PostPosted: Sun Dec 08, 2002 10:31 pm    Post subject: CSS samples Reply with quote

is there any css samples to download, if not let me know, I think some web designers would like to make some cool CSS files availabel for b2 users, specially for those using calendar, which is kinds of hard for newbies to manage it.
_________________
- Scrazynet
"To be or not to be, that´s the mothephuc**ing Question "
http://www.loukelicioso.net
Back to top
View user's profile Send private message Visit poster's website AIM Address
qi3ber



Joined: 14 Jan 2003
Posts: 1
Location: Traverse City, MI

PostPosted: Tue Jan 14, 2003 5:42 pm    Post subject: Yes, here's a somewhat simple one... Reply with quote

I just brought my b2 up about a week ago, but I've tweaked the calendar a bit. My css can be found here. It should give you a basic idea of how to stylize your calendar. All told it's a pretty basic style sheet. I just gave the caption at the top a little style to match the rest of my site, and greyed out the empty cells, just like on a real calendar.

If you look at my site, you'll see that I have also added some highlights to the cells of days with posts, as well as the current date. In order to pull that off I made some minor adjustments to b2calendar.php. If you want to do the same, I'll tell you how:

First add these three lines:
Code:

$calendarcellisposttodaystart = '<td class="b2calendarcellispost" id="b2calendarcelltoday">';
$calendarcellispoststart = '<td class="b2calendarcellispost">';
$calendarcelltodaystart = '<td class="b2calendarcell" id="b2calendarcelltoday">';

somewhere around line 20 where it says:
Code:

$calendarcellstart = '<td class="b2calendarcell">';
$calendarcellend = '</td>';

Then, we just need to alter the code that prints out the cell starts. Look for this text around line 171:
Code:

echo $calendarcellstart;

and take it out. Then three lines below, directly after:
Code:

$calendarblah = '-'.date('j',$i).'-';
$calendarthereisapost = ereg($calendarblah, $daysinmonthwithposts);
$calendartoday = (date('Ymd',$i) == date('Ymd', (time() + ($time_difference * 3600))));

Add this text:
Code:

if ($calendartoday) {
        echo $calendarthereisapost ? $calendarcellisposttodaystart : $calendarcelltodaystart;
} else {
        echo $calendarthereisapost ? $calendarcellispoststart : $calendarcellstart;
}

Then save your file and upload it. Now, table cells with posts are highlighted, and the cell for today is lit up in a different color. Lemme know if you have any problems, or if this doesn't work for you. Hopefully I have pointed you in the correct direction to at least get started.
_________________
--
Who?! Me!? I was dead at the time!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> (X)HTML / CSS help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can 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 2 © 2001, 2002 phpBB Group