Bug 4553 - Different link color for active discussion pages in wiki.maemo.org
: Different link color for active discussion pages in wiki.maemo.org
Product: maemo.org Website
: unspecified
: All All
: Low normal with 2 votes (vote)
: ---
Assigned To: Dave Neary
: midgard@maemo.org
  Show dependency tree
Reported: 2009-05-15 10:17 UTC by Uwe Kaminski
Modified: 2010-12-16 12:36 UTC (History)
3 users (show)

See Also:



You need to log in before you can comment on or make changes to this bug.

Description Uwe Kaminski (reporter) 2009-05-15 10:17:51 UTC
Normally wiki links to pages that don't exist are red (and not blue like links
to pages containing text). Every wiki page also has a discussion page which
could be used for several topics. If there is an active (non empty deicussion
page) discussion it's easy to see for visitors.

Problem: In the well integrated wiki of maemo.org the discussion pages are
always looking the same way if there is an active discussion or not.

Solution: Either remove the discussion sections from the wiki or make non-empty
discussion pages visible.
Comment 1 Dave Neary maemo.org 2009-09-30 15:02:11 UTC
Discussion sections are very useful, and we need them. The solution for me
seems like it should be to have empty page links be a different colour.

Comment 2 Uwe Kaminski (reporter) 2009-11-18 18:10:01 UTC
It sounds like an easy modification of the css file for the wiki. Is there any
chance to do this soon?

Thanks, Uwe
Comment 3 Dave Neary maemo.org 2009-11-18 18:48:40 UTC
It sounds like it, but looking at the source of the pages, it doesn't look like
it. The discussion link HTML is: 

 <li><a href="/index.php?title=Talk:Mer/Build&amp;action=edit"
title="Discussion about the content page [t]" accesskey="t">Discussion</a></li>

Nothing to suggest that it's a new or empty page.

Perhaps you can suggest a change to the CSS that we can use?
Comment 4 Dave Neary maemo.org 2009-11-18 18:56:12 UTC
On closer inspection, with other themes (monobook, for example, the Discussion
link is indeed enclosed in 'class="new"' in the HTML source.

It appears that there is a custom CSS for Maemo's custom mediawiki, and I am
afraid I don't know where it's stored, or how it gets deployed.
Comment 5 Uwe Kaminski (reporter) 2009-11-18 19:50:20 UTC
Using: https://addons.mozilla.org/en-US/firefox/addon/60

I can see that the .cc file is stored there:


All menu items in the block where Discussion is located get the same style

#container #content #sidebar #nav-sub li a (linie 737)
background-color: transparent;
background-image: url(../img/nav-divider.gif);
background-repeat: no-repeat;
background-attachment: scroll;
background-position: left bottom;
color: #4f5050;
font-size: 1.4em;
font-weight: normal;
display: block;
padding-top: 8px;
padding-right: 0pt;
padding-bottom: 8px;
padding-left: 30px;

There should be an extra definition for the <li> element "Discussion".

The mediawiki Mono book theme uses:
color: #ba0000;
for a new link (something like red).

Do you think you can make something out of this information? I am not very
familiar with these html/css stuff and would have to look how to redefine the
Comment 6 Dave Neary maemo.org 2009-11-18 20:30:26 UTC

Like I said, there is no class="new" in the sidebar with the Maemo 2009 theme.

What we would need to do is hack the mediawiki install to add it. The code, I
believe, is here:  https://garage.maemo.org/svn/maemo2midgard/mediawiki/2009/

And I think that we need to modify MonoBookMaemo2009.php around the section
starting with the "<!-- sidebar -->" comment: it's probably as simple as adding
something like what's there for the active link for new links:
                    if ( $val['new'] ) { ?> class="new" <?php }


But since I don't know the MediaWiki data structures very well, don't happen to
have a mediawiki instance here, and don't know how changes get deployed from
maemo2midgard, I'm afraid it's not that straightforward.
Comment 7 Dave Neary maemo.org 2009-11-18 20:43:11 UTC
Manual for Mediawiki sidebar:

For reference.
Comment 8 Ferenc Szekely maemo.org 2010-06-30 21:58:58 UTC
Dave, would you mind taking care of this? You have been hacking on the wiki
code lately.
Comment 9 Dave Neary maemo.org 2010-07-01 17:35:12 UTC
It's a slightly different problem to the other ones I fixed recently, but I'll
give it a go.

Comment 10 Dave Neary maemo.org 2010-07-01 19:55:10 UTC
This is *mostly* fixed.

I say mostly, because it isn't fixed :)

Here's the skinny:
* I added a div around Views (to be conformant with other skins) with a class
* In skins/monobookmaemo2009/main.css, I added a rule for #p-cactions .new a{
color: #CC2200;} to set the colour for new links.
* I modified the main template (as you can see from the sources) to ensite that
we were adding class names & other attributes (incl. id="new") to elements of

So all *should* be rosy, except that
http://static.maemo.org/style_maemo2009/css/master.css is getting included
*after* this file, and contains a rule setting link colour to #4f5050 for
elements matching "#container #content #sidebar #nav-sub li a" - which includes
our link.

And I don't think we should be changing that CSS file to have around mediawiki
stuff. I don't know enough about how CSS rule precedence is done to say more on
the subject, but it seems clear that I'm stuck :)

Comment 11 Tim Samoff maemo.org 2010-07-01 20:16:59 UTC

Try changing the selector in the new CSS to:

#sidebar #nav-sub #p-cactions ul li#ca-talk.new a { color: #whatever; }

(Personally, I would have added a "new" class to the a href, which could have
then been singled-out fairly easily, but that should work as well.)
Comment 12 Dave Neary maemo.org 2010-12-16 12:36:26 UTC
Finally got around to this. Sorry for the delay, Tim!

In the end, I had to add 4 extra class identifiers to get the sidebar link to
redden. This is fixed in maemo2midgard revision 1699:

Index: main.css
--- main.css    (revision 1698)
+++ main.css    (revision 1699)
@@ -371,7 +371,8 @@
 img.thumbborder {
     border: 1px solid #dddddd;
-#p-cactions .new a {
+#container #content #sidebar #nav-sub #p-cactions #ca-talk.new a, 
+#p-cactions .new a  {
         color: #cc2200;

Based on CSS priority rules, as explained in this article:

It seems like adding !important would have been sufficient, but I wasn't sure.