View previous topic :: View next topic |
Author |
Message |
basstech
Joined: 14 Sep 2003 Posts: 17
|
Posted: Sun Sep 14, 2003 5:52 am Post subject: calendar in an iframe hack |
|
|
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 |
|
 |
Viper007Bond
Joined: 15 Aug 2003 Posts: 266 Location: Portland, Oregon, USA
|
Posted: Sun Sep 14, 2003 6:02 am Post subject: |
|
|
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 |
|
 |
basstech
Joined: 14 Sep 2003 Posts: 17
|
Posted: Sun Sep 14, 2003 6:40 am Post subject: |
|
|
Alex's calendar hack is great. I just thought it would work a little better in an iframe.  |
|
Back to top |
|
 |
Viper007Bond
Joined: 15 Aug 2003 Posts: 266 Location: Portland, Oregon, USA
|
Posted: Sun Sep 14, 2003 6:50 am Post subject: |
|
|
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.
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 |
|
 |
alex_t_king
Joined: 09 Oct 2002 Posts: 194
|
Posted: Wed Sep 24, 2003 5:54 am Post subject: |
|
|
frames = evil _________________ Yahoo! Messenger ID: alex_t_king |
|
Back to top |
|
 |
Viper007Bond
Joined: 15 Aug 2003 Posts: 266 Location: Portland, Oregon, USA
|
Posted: Wed Sep 24, 2003 8:06 am Post subject: |
|
|
Yeah, I decided to stick with your calender Alex.  _________________ 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 |
|
 |
basstech
Joined: 14 Sep 2003 Posts: 17
|
Posted: Wed Sep 24, 2003 2:27 pm Post subject: |
|
|
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 |
|
 |
alex_t_king
Joined: 09 Oct 2002 Posts: 194
|
Posted: Wed Sep 24, 2003 4:48 pm Post subject: |
|
|
You can use a div for the same purspose, just set the overflow property. _________________ Yahoo! Messenger ID: alex_t_king |
|
Back to top |
|
 |
basstech
Joined: 14 Sep 2003 Posts: 17
|
Posted: Mon Sep 29, 2003 3:06 am Post subject: |
|
|
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 |
|
 |
alex_t_king
Joined: 09 Oct 2002 Posts: 194
|
Posted: Mon Sep 29, 2003 3:57 am Post subject: |
|
|
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 |
|
 |
basstech
Joined: 14 Sep 2003 Posts: 17
|
Posted: Mon Sep 29, 2003 2:51 pm Post subject: |
|
|
Is wordpress that much better then b2? |
|
Back to top |
|
 |
alex_t_king
Joined: 09 Oct 2002 Posts: 194
|
Posted: Mon Sep 29, 2003 4:21 pm Post subject: |
|
|
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.  _________________ Yahoo! Messenger ID: alex_t_king |
|
Back to top |
|
 |
basstech
Joined: 14 Sep 2003 Posts: 17
|
Posted: Mon Sep 29, 2003 5:37 pm Post subject: |
|
|
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 |
|
 |
karidee
Joined: 09 Jul 2003 Posts: 15
|
Posted: Thu Jul 01, 2004 7:17 pm Post subject: |
|
|
Can I get this calendar to show posts with future dates? It goes to past months but not future ones. |
|
Back to top |
|
 |
|