Author Topic: Toolbar with flyover menu (DHTML)  (Read 2983 times)

sidki3003

  • Sr. Member
  • ****
  • Posts: 476
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • http://
    • Email
Toolbar with flyover menu (DHTML)
« on: June 14, 2002, 08:25:29 PM »
Hi all

There was a discussion at Yahoo! Groups about using prox filters with DHTML menues.
We finally got a nicely working version. It's here:
http://www.flaaten.dk/forum/attachments/dhtml-menu.zip
This is the filter to inject it:

Name = "<start> Inject: DHTML Menu Script"
Active = TRUE
Limit = 1
Match = "<start>"
Replace = "<script type="text/javascript" src="http://local.ptron/menu.js"></script>
"

I included two functions.
The first, AddToolbar(name,url) is for this filter:

Name = "<end> Add: Flyover Toolbar"
Active = TRUE
URL = "$TYPE(htm)(^$LST(Bypass_Start-End))"
Limit = 1
Match = "<end>"
Replace = "</pre><a name="xdown"></a>
"
          "<center>
"
          "<a class="proxobar" onmouseover="linkset[1]
"
          "=AddToolbar('bypass','xbypass..hp')
"
          " + AddToolbar('bweb','xbweb..hp')
"
          " + AddToolbar('bout','xbout..hp')
"
          " + AddToolbar('bin','xbin..hp')
"
          " + AddToolbar('src bypass','xsrc..bypass..hp')
"
          " + AddToolbar('src','xsrc..hp')
"
          " + AddToolbar('dbug','xdbug..hp');
"
          " showmenu(event,linkset[1])" onMouseout="delayhidemenu()">&nbsp;prox&nbsp;</a>
"
          "<a class="proxobar" onmouseover="linkset[1]
"
          "=AddToolbar('netcraft','uptime.netcraft.com/up/graph/?host=h')
"
          " + AddToolbar('samspade','www.samspade.org/t/lookat?a=h')
"
          " + AddToolbar('ss-blackhole','www.samspade.org/t/rbl?a=h')
"
          " + AddToolbar('robots?','h/robots.txt');
"
          " showmenu(event,linkset[1])" onMouseout="delayhidemenu()">&nbsp;site&nbsp;</a>
"
          "</center>
"

Toolbar notes:
The first replacement line of the filter closes any open preformat tag and inserts an anchor,
so that you can call a page by somepage.html#xdown to go straight to the end.
It's not necessary for the toolbar, you can safely delete it.

Here are my styles for the toolbar, append them to your css file if you like:

.proxobar
{
  display:inline;
  font-size: x-small;
  font-weight: bold;
  font-style: normal;
  font-family: "Times New Roman" serif;
  color: #d7d7ff;
  background-color: #606060;
";
}


The second function, AddMenuItem(name,url,target) is called by this filter:

Name = "Open in new window (Flyover)"
Active = TRUE
URL = "$TYPE(htm)"
Bounds = "<as*>"
Limit = 768
Match = "(*href=)1$AV(2) 3"
Replace = "1"2""
          " onmouseover="linkset[0]=AddMenuItem('New Window','2','_blank');"
          " showmenu(event,linkset[0])""
          " onMouseout="delayhidemenu()"3"

It's a replacement for the Super Opener (new window) filter.
I don't think i like it very much, so it's just a demo how to use the script for other filters.

Script notes:
I tested this script with IE6 only, but heard it works with Mozilla.
It does not work with Opera (modifying document structure not possible).

The style for the menu is part of the script and is overridden on some sites (any ideas?).

The onmouseover and onmouseout delays can be adjusted via variables at the top of the script.
Same goes for the menu offset. Set offsetX and offsetY to 0 if you want normal flyover behavior.

regards, sidki


Edited by - sidki3003 on 15 Jun 2002  01:00:56
 

Arne

  • Administrator
  • Hero Member
  • *****
  • Posts: 778
    • ICQ Messenger - 1448105
    • AOL Instant Messenger - aflaaten
    • Yahoo Instant Messenger - arneflaa
    • View Profile
    • http://
    • Email
Toolbar with flyover menu (DHTML)
« Reply #1 on: June 14, 2002, 08:40:20 PM »
Thanks for posting this filter. Now I finally have a chance to study it more closely. There were just too many mails on the prox-list for me to follow the discussion over there , and therefore I was kind of lost. It will be cool to try this out and see how it works

Best wishes
Arne
Imici username= Arne
Best wishes
Arne
Imici username= Arne

sidki3003

  • Sr. Member
  • ****
  • Posts: 476
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • http://
    • Email
Toolbar with flyover menu (DHTML)
« Reply #2 on: June 14, 2002, 10:13:59 PM »
One more thing. I wanted to make the delay and offset variables dependent on the function.
Say offsets != 0 and short delays for the toolbar, and offsets = 0 and long delays for the new window filter.
But i didn't get that managed. Any (t)eggheads around?