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 

calendar in an iframe hack

 
Post new topic   Reply to topic    boardom Forum Index -> Hacks
View previous topic :: View next topic  
Author Message
basstech



Joined: 14 Sep 2003
Posts: 17

PostPosted: Sun Sep 14, 2003 5:52 am    Post subject: calendar in an iframe hack Reply with quote

I hacked Alex King's calendar plus hack so it could run in an iframe.

This hack allows you to have the calendar on your sidebar or anywhere else on your page and when someone click the next and previous month buttons it doesn't take them to a different page. It makes having the next and previous buttons much more usefull, and it also conserves a bit of bandwidth too.

There are two files in the zip file: http://ravemedia.org/b2/iframe_calendar.zip

Place both of them in your b2 directory.

You will also need to place the following html in your page where you want the calendar to appear.

Code:
<iframe src="calendar.php?m=<?php echo $m; ?>" name="calendar" width="140" marginwidth="0" height="130" marginheight="0" align="middle" scrolling="no" frameborder="0"></iframe>


You will probably need to modify the width and height of the iframe to meet the size of your calendar. You can also change the table properties in the b2calendar_hack.php file.

You may also want to change the css link as I have mine pointing to a seperate css file.

If you have any questions about the hack please let me know.

You can also view it in action on my here: http://ravemedia.org/b2 Please note I just converted the site from Nucleus to b2 last night, and it's not quite finished yet.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Viper007Bond



Joined: 15 Aug 2003
Posts: 266
Location: Portland, Oregon, USA

PostPosted: Sun Sep 14, 2003 6:02 am    Post subject: Reply with quote

I was actually just about to install a calender...
_________________
http://www.viper007bond.com

If you haven't already installed b2, I advise you look into WordPress or b2evo instead as b2 is dead.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
basstech



Joined: 14 Sep 2003
Posts: 17

PostPosted: Sun Sep 14, 2003 6:40 am    Post subject: Reply with quote

Alex's calendar hack is great. I just thought it would work a little better in an iframe. Very Happy
Back to top
View user's profile Send private message Visit poster's website AIM Address
Viper007Bond



Joined: 15 Aug 2003
Posts: 266
Location: Portland, Oregon, USA

PostPosted: Sun Sep 14, 2003 6:50 am    Post subject: Reply with quote

Yeah, I was just about to install his, but I think i'll install this modified version so my users can scroll through the months without having to load each month's posts. Very Happy

You should include a copy of this post though in the ZIP.
_________________
http://www.viper007bond.com

If you haven't already installed b2, I advise you look into WordPress or b2evo instead as b2 is dead.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
alex_t_king



Joined: 09 Oct 2002
Posts: 194

PostPosted: Wed Sep 24, 2003 5:54 am    Post subject: Reply with quote

frames = evil
_________________
Yahoo! Messenger ID: alex_t_king
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Viper007Bond



Joined: 15 Aug 2003
Posts: 266
Location: Portland, Oregon, USA

PostPosted: Wed Sep 24, 2003 8:06 am    Post subject: Reply with quote

Yeah, I decided to stick with your calender Alex. Smile
_________________
http://www.viper007bond.com

If you haven't already installed b2, I advise you look into WordPress or b2evo instead as b2 is dead.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
basstech



Joined: 14 Sep 2003
Posts: 17

PostPosted: Wed Sep 24, 2003 2:27 pm    Post subject: Reply with quote

alex_t_king wrote:
frames = evil


Normally I have the same view on it. I don't like frames based pages....

But I frames come in handy for some things. Take for instance when you reply on this forum. The topic review is in an iframe. iframes are the only type of frames I will use and always use specific target params in all my anchor tags.
Back to top
View user's profile Send private message Visit poster's website AIM Address
alex_t_king



Joined: 09 Oct 2002
Posts: 194

PostPosted: Wed Sep 24, 2003 4:48 pm    Post subject: Reply with quote

You can use a div for the same purspose, just set the overflow property.
_________________
Yahoo! Messenger ID: alex_t_king
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
basstech



Joined: 14 Sep 2003
Posts: 17

PostPosted: Mon Sep 29, 2003 3:06 am    Post subject: Reply with quote

I'll have to look in to that. My php skills are better then my HTML skills. Maybe you could incorparate that as an option to your hack.
Back to top
View user's profile Send private message Visit poster's website AIM Address
alex_t_king



Joined: 09 Oct 2002
Posts: 194

PostPosted: Mon Sep 29, 2003 3:57 am    Post subject: Reply with quote

I'm working on WordPress now, so I'm probably not going to do any more work on the b2 hacks.
_________________
Yahoo! Messenger ID: alex_t_king
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
basstech



Joined: 14 Sep 2003
Posts: 17

PostPosted: Mon Sep 29, 2003 2:51 pm    Post subject: Reply with quote

Is wordpress that much better then b2?
Back to top
View user's profile Send private message Visit poster's website AIM Address
alex_t_king



Joined: 09 Oct 2002
Posts: 194

PostPosted: Mon Sep 29, 2003 4:21 pm    Post subject: Reply with quote

WordPress is the official fork of b2. It is based on the b2 code, but much of it has been rewritten at this point. There is some additional functionality as well and it is under active development. However, I'd say there are currently a few more loose ends in WordPress than there are in b2 (settings that aren't used anymore but haven't been removed, things like that).

This is getting pretty far off topic. Smile
_________________
Yahoo! Messenger ID: alex_t_king
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
basstech



Joined: 14 Sep 2003
Posts: 17

PostPosted: Mon Sep 29, 2003 5:37 pm    Post subject: Reply with quote

Sounds kewl, might look at switching soon. I've made alot of custimizations to my copy of b2, that I'd have to redo in wordpress though.

Does it work well with nice url's?
Back to top
View user's profile Send private message Visit poster's website AIM Address
karidee



Joined: 09 Jul 2003
Posts: 15

PostPosted: Thu Jul 01, 2004 7:17 pm    Post subject: Reply with quote

Can I get this calendar to show posts with future dates? It goes to past months but not future ones.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Hacks All times are GMT + 1 Hour
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 2 © 2001, 2002 phpBB Group