Log in

View Full Version : Can I create a page without headers for use in an Iframe?


hilaryl
02-27-2006, 04:16 AM
I want to produce a page that just shows the collapsed event calendar at the bottom of the home page - no headers or footers on the page.

I then wanted to use this page in an iframe so that I can show the collapsed event calendar section on an html page.

Is this possible and how do I go about doing this. I've identified the code that displays the collapsed event calendar but don't know what to do from here. (I do have ftp access)

Thanks

Reeve of shinra
02-27-2006, 04:56 AM
You need to remove the $header and $footer variables from the main calendar template.

For your purposes, create a child forum of you current style, go into that template and then delete those variables.

In your IFRAME - call it like calendar.php&styleid=21 (where 21 is the # of the new style you created)

hilaryl
02-28-2006, 03:57 AM
It's easy when you know how - thank you!

Reeve of shinra
02-28-2006, 04:43 AM
np :)

hilaryl
03-13-2006, 04:20 AM
Still having some problems with this. I got everything to work just as I wanted it to, but, when I refresh the page, the style that shows up in the iFrame reverts to my default style id (ie id=1) rather than remaining on my new style id.

My coding in the iFrame is as suggested with calendar.php?styleid=2

Confused?
Can anybody help me out - or just let me know that what I'm trying to do is impossible so that I don't waste anymore time!

Thanks

merk
03-13-2006, 07:26 AM
Using that styleid solution wont work as expected.

You could add a plugin to an appropriate hook before the styleid code and if THIS_SCRIPT == 'calendar' change the styleid by defining STYLEID to be what id you want it to be.

hilaryl
03-13-2006, 11:29 PM
That sounds ok, but you've gone a bit over my head in terms of coding. Is there somewhere that I can go to get a bit more info about plugins, etc, or get some more detailed assistance on your advice there.

merk
03-14-2006, 12:23 AM
Try linking to calendar.php in the iframe as "calendar.php?insideframe=1"

And a plugin in style_fetch

if(THIS_SCRIPT == 'calendar' AND $_REQUEST['insideframe'] == 1)
{
$styleid = ID;
}


Note: this will only work properly if the new style for the calendar is user selectable.

hilaryl
03-15-2006, 11:56 PM
Thank you! That worked a treat. I doesn't carry the styleid on when you click on the event - it displays the event details back in styleid=1, rather than the new styleid. But I can live with that!

Thanks for your help - much appreciated

merk
03-16-2006, 12:18 AM
Do you use the calendar normally as well or purely in this frame?

hilaryl
03-16-2006, 12:36 AM
I do use it normally as well. You can see what it does here: http://www.bubhub.com.au/shopsdirectory.shtml (scroll to the bottom of the page) It opens up the event info in styleid=1, and you can't login in the iframe either.

They are not major problems, I've just put a note for viewers to let them know that they need to go to the main forums home page to actually login