frame/iframe Friendly Gargoyle

Discuss the technical details of Gargoyle and ongoing development

Moderator: Moderators

Post Reply
vask
Posts: 45
Joined: Tue Jul 21, 2009 4:33 pm

frame/iframe Friendly Gargoyle

Post by vask »

This request is intended so that people can use html frames or iframes to more easily conglomerate a few gargoyle pages together into one.

ie) The following url...

Code: Select all

http://192.168.1.1/hosts.sh?minimal_display=true
Could hide the logo and sidebar in the CURRENT 1.15 implementation using the following CSS:

Code: Select all

#outer_container {
	margin-left: -230px;
	margin-top: -30px
}
#outer_logo,
#outer_footer{
        display: none;
}
Then frames could just be added as follows:

Code: Select all

<frameset cols="25%,*,25%">
  <frame src="http://192.168.1.1/bandwidth.sh" />
  <frame src="http://192.168.1.1/hosts.sh" />
</frameset>
The ultimate goal here is to be able to design a single page where I can administer the entire network.
See Also:
http://www.gargoyle-router.com/phpbb/vi ... ?f=7&t=217

vask
Posts: 45
Joined: Tue Jul 21, 2009 4:33 pm

Re: frame/iframe Friendly Gargoyle

Post by vask »

I have started designing a custom page in gargoyle. See:
Image

As it seems iframes and frames with gargoyle may be a bad idea... fames and iframes aren't that flexible.

As an alternative solution to creating a single bandwidth control page with frames I am now leaning toward:
- modular igoogle like functionality. ( http://www.gargoyle-router.com/phpbb/vi ... ?f=7&t=474 )
- or just custom designed pages.

vask
Posts: 45
Joined: Tue Jul 21, 2009 4:33 pm

Re: frame/iframe Friendly Gargoyle

Post by vask »

This is what I did today:
Image

It is pretty easy to implement this because it just adds a frame to the side of the existing router interface... I would now just like the show and hide frame functionality for the frame...

Of course I would still ideally like a dashboard like igoogle where I could just pick and choose parts to have shown on a special page like:
http://igoogle.com

vask
Posts: 45
Joined: Tue Jul 21, 2009 4:33 pm

Re: frame/iframe Friendly Gargoyle

Post by vask »

Ok the dash frame integration is pretty much complete. I just have to figure out how to compile [gargoyle_header_footer.c] with:

Code: Select all

printf("\t\t\t<div id=\"garg_dash\">\n");
printf("\t\t\t\t<dl>\n");
printf("\t\t\t\t\t<dt>Dash:</dt>\n");
printf("\t\t\t\t\t<dd>- <a onclick=\"window.open('/dash.sh?l='+escape(location.pathname), '_top');\" href=\"#\">Show</a></dd>\n");
printf("\t\t\t\t\t<dd>- <a onclick=\"window.open(location.pathname, '_top');\" href=\"#\">Hide</a></dd>\n");
printf("\t\t\t\t</dl>\n");
printf("\t\t\t</div>\n");
Also, to save space I changed this line:

Code: Select all

printf("\t\t\t<div id=\"garg_host\">Device Name: %s</div>\n", hostname);
To:

Code: Select all

printf("\t\t\t<div id=\"garg_host\">%s</div>\n", hostname);
I tried to make this integration as seamless as possible.

Even in the event that you get logged out the frame automatically is removed and you are directed to the login page. (Thanks to JavaScript).

Frame is totally optional.

Recommended resolution with the frame is anything above:
1140 pixels wide
640 pixels high

For the almost complete version see:
Image
Last edited by vask on Sat Jan 16, 2010 6:27 pm, edited 1 time in total.

vask
Posts: 45
Joined: Tue Jul 21, 2009 4:33 pm

Re: frame/iframe Friendly Gargoyle

Post by vask »

Also I figured out that gargoyle is more frame/iframe friendly if you just change the header option of:

gargoyle_header_footer -h
to
gargoyle_header_footer -m

This removes the background and sidebar.

Post Reply