Why do we use js-hover-effects in User Control Panel Navigat

All style (template, theme and imageset) related questions for the new release; advice, feedback here please.
annafell89
Registered User
Posts: 2
Joined: Sun Aug 21, 2005 8:37 pm

Why do we use js-hover-effects in User Control Panel Navigat

Post by annafell89 »

Hey guys,
although we all know, that RC1 (or at least phpBB 3 final) will come up with a new theme.
The current one is also okay, but there is a issue about the User Control Panel I don't understand:

Image
Why don't you simply use html-links for the panel menu? There are hover-effects done via javascript, but what about people, who do not use it (because of whatever)? The hover-effects could easily be done via css-formatted links in an real html-menu (use of <menu> or <ul>)

Here the example code:

Code: Select all

<tr>
  <td class="row2" nowrap="nowrap" onmouseover="this.className='row1'" onmouseout="this.className='row2'" onclick="location.href='./ucp.php?i=164'">
    <a class="nav" href="./ucp.php?i=164">Profile</a>
  </td>
</tr>
It's not al real bug, but I do not think we have to use js-hover-effects, if we can use css ;)
Dunno, if you did not take care about that, because the new theme makes use of other templates, so feel free to tell me.

User avatar
Highway of Life
Registered User
Posts: 1399
Joined: Tue Feb 08, 2005 10:18 pm
Location: I'd love to change the World, but they won't give me the Source Code
Contact:

Re: Why do we use js-hover-effects in User Control Panel Navigat

Post by Highway of Life »

It doesn't really bother me... the link will still show a rollover with JS disabled, and over 98% of browsers have JS active and running.

And...
I can just create my own if I want to use a CSS version, which is preferred. :D
Image

APTX
Registered User
Posts: 680
Joined: Thu Apr 24, 2003 12:07 pm

Re: Why do we use js-hover-effects in User Control Panel Navigat

Post by APTX »

Isn't it there because some browsers don't recognise :hover?
It doesn't work when I disable JS. I guess some browsers are less serious about disabling JS than Opera.
Don't give me my freedom out of pity!

Yawnster
Registered User
Posts: 342
Joined: Sat Jan 29, 2005 9:18 pm
Location: London, UK
Contact:

Re: Why do we use js-hover-effects in User Control Panel Navigat

Post by Yawnster »

APTX wrote: Isn't it there because some browsers don't recognise :hover?
It doesn't work when I disable JS. I guess some browsers are less serious about disabling JS than Opera.


Yes, IE6 doesn't have support for :hover attributes, (Or any :... attribute actually), I believe that IE7 does either..

This is why JS is used..

Alex.

annafell89
Registered User
Posts: 2
Joined: Sun Aug 21, 2005 8:37 pm

Re: Why do we use js-hover-effects in User Control Panel Navigat

Post by annafell89 »

Yes, IE6 doesn't have support for :hover attributes, (Or any :... attribute actually)

That's not quite correct, because IE6 supports :hover attributes on html-anchors (which are used for navigation-links in the user control panel). So you could create a css-class for these links, sth. like this

Code: Select all

a.navlinks {display:block; width:200px; padding:any px}
a.navlinks:hover {background:#thebluecolor}
and you can reach clickable hoverlinks via css (so, the same effect), without any use of javascript. Another benefit is that the small links are easier to use, because you do not have to click the small text, you can click the "block"-link area...

User avatar
Highway of Life
Registered User
Posts: 1399
Joined: Tue Feb 08, 2005 10:18 pm
Location: I'd love to change the World, but they won't give me the Source Code
Contact:

Re: Why do we use js-hover-effects in User Control Panel Navigat

Post by Highway of Life »

There is actually a hack to enable IE to do :hover rollovers on non a tags... but it requires JS. ;) :P
Image

User avatar
DoubleJ
Registered User
Posts: 105
Joined: Thu Jan 13, 2005 4:19 pm
Location: The Netherlands
Contact:

Re: Why do we use js-hover-effects in User Control Panel Navigat

Post by DoubleJ »

annafell89 wrote:
Yes, IE6 doesn't have support for :hover attributes, (Or any :... attribute actually)

That's not quite correct, because IE6 supports :hover attributes on html-anchors (which are used for navigation-links in the user control panel). So you could create a css-class for these links, sth. like this

Code: Select all

a.navlinks {display:block; width:200px; padding:any px}
a.navlinks:hover {background:#thebluecolor}
and you can reach clickable hoverlinks via css (so, the same effect), without any use of javascript. Another benefit is that the small links are easier to use, because you do not have to click the small text, you can click the "block"-link area...

if you use display: block; then IE shows the strangest things as I think it does not know what to do
Just to explain what I am saying:
I had a layout with tabs. If you hovered the tab, it changed color, no matter where you positioned your mouse on the tab.
on exactly the same page, I have a list of links which are displayed as blocks. like here on the UCP lefthand side menu.
Now the funny thing with these is, that the rollover effect only occurs when the actual text is hovered.

So to come to my conclusion:
You have like, no clue on how IE6 will behave, will it show the effect on text hover on or hover of the entire set element.
Therefor the javascript solution is much 'saver' because you then know it will work, also for IE.

If you do not have javascript enabled, then of course you don't see this. But if you disable javascript the bbcode buttons, smilley add links and all other javascript related links will not work either, which means that you then drop functionality, by disabling the javascript. But this is a choise you make yourself.

(Note that these are MY opinions, if there were opinions).
DoubleJ - Blah

Ectoman
Registered User
Posts: 192
Joined: Sat Dec 15, 2001 3:53 pm
Location: Denver CO
Contact:

Re: Why do we use js-hover-effects in User Control Panel Navigat

Post by Ectoman »

Do we even need that flashy glitz on something as simple as the ACP?

I know I don't spend hours in the ACP rolling over things and making them change colors. I go in there to change settings and update my board.

User avatar
Prince of area51
Registered User
Posts: 133
Joined: Mon Jun 27, 2005 8:46 pm
Location: Manchester, UK
Contact:

Re: Why do we use js-hover-effects in User Control Panel Navigat

Post by Prince of area51 »

hmm I'm basically a coder but my recent job brought me in contact with Styling and then CSS. I found it really hard to understand that IE (the most used browser) has many 'bugs' one of which Double J explained. Most people either use IE or FF, both have javascript enabled (by default) and I think considering the fact its in ACP, I dont really see any problem with it :) Last thing I'll expect is a Dev trying to hack into my PC with a javascript embedded in the ACP of phpBB 3 :mrgreen:

User avatar
DoubleJ
Registered User
Posts: 105
Joined: Thu Jan 13, 2005 4:19 pm
Location: The Netherlands
Contact:

Re: Why do we use js-hover-effects in User Control Panel Navigat

Post by DoubleJ »

Ectoman wrote: Do we even need that flashy glitz on something as simple as the ACP?

I know I don't spend hours in the ACP rolling over things and making them change colors. I go in there to change settings and update my board.

We were discussing the UCP here.
As for my opinion regarding this:
The ACP and MCP don't need to be flashy at all. It is nice if they are but they should be as easy to access as possible so you do not have to spend to much time there.
As for the UCP.
All users of your board will see and use the UCP. They spent quite a lot of time in there so it is nice if it looks good, and flashy rollovers are always nice in there, for the eye candy. I'm not to keen on the javascript rollovers either, but if you want multibrowser compatibility, you sometimes just have to, to achieve the effect you want to create.
DoubleJ - Blah

Post Reply