Fork me on GitHub

Watch

GitHub Core

Show your support for Zikula! Sign up at Github account and watch the Core project!




GitHub Modules

Forum Activity

Forum feed

» Visit forum | » View latest posts

Style sheet -- where are the top four items...?  Bottom

  • I've spent quite a bit of time trying to modify the correct Style entry for the default "Silver" or Gray style of the four text links that are listed at the top of the core theme PostNukeSilver.

    I've looked in the theme folder under the styles and in various other sitewide files.

    Anyone know exactly which folder and which style to edit to get those four links changed?

    By the way -- the links are unchanged at the bottom as well. I managed to change the styles of some of the links listed in the bottom menu, but not the "core four".

    http://ns25.hostnuke.net/~admin36/

    I've searched on these forums for something and can't seem to find an answer that addresses this.

    Thanks!

    -- M
  • I'm guessing this is a tough one...

    FYI -- I did try global.php, but the Silver links are still there.
  • Greetings :)

    Never used this theme before but just had a look in my PostNuke folder and can tell you that both

    language/eng/global.php

    &

    theme/PostNukeSilver/lang/global.php

    have the language variables for top and bottom links.

    My guess is that the language/eng/global.php overides the theme language file so check that one out.

    Hoped that helped

    Kindest Regards
    Micheal.
  • Thanks, but dice. :?

    That file is where I can change the link names and URLs (and I have done so), but the style is applied from somewhere else.

    I actually thought I found and changed every "Silver" text entry in the style sheets I could find, but it still has not changed on my template (both top and bottom).

    -- M
  • The designer doesn't exactly make it easy, does he?

    You want to change the color, right?

    Short answer: style.css

    Code

    .bar-top-middle a:link, a:visited, a:active
    {
        color: silver;
        font-weight: bold;
        text-decoration: none;
    }

    .bar-top-middle a:hover
    {
        color: white;
        font-weight: bold;
        text-decoration: underline;
    }
    for top links, and for the bottom links, add this to both stylesheets at the bottom:

    Code

    .pn-sub A:link,
    .pn-sub A:visited {
        color: white;
    }
    .pn-sub A:hover,
    .pn-sub A:active {
        color: #666666;
    }
    with whatever color or style you want.

    Long answer for everybody's benefit:

    First of all, the links are found in the files top_links.php and bottom_links.php. As has been mentioned, the actual definition of the links there are done in the language files lang/eng/global.php (or whichever language you use) and language/eng/global.php (the main language file). The latter main file seems to override the themed one, to provide a set of generic links you can't override without altering the system file. You're better off setting some less-generic Constants (the special type of variable set in these files). It is the convention of Postnuke to have constants in upper case and start with an underscore, but as long as it's unique, you can use anything (they're all defined in these two files). You can use _FAQ which is already defined in the main file, but _ADVANCEDSEARCH isn't so you could substitute that in the theme global file, along with the links in top_links.php

    Secondly, the actual stylesheets. All styles are defined by styleNN.css and style.css in the style folder in the theme. There are no other stylesheets.

    An idea in tracking down what stylerule is responsible for styling something is by looking at the browser source (from the View menu), and do a search (Edit menu) for a unique keyword or phrase. Then look at what tags, and what classes are used before it. In this case, as they're links in the theme, you can also look at the theme files if you can understand them.
    The relevant section from the theme is:

    Code

    .'<td class="bar-top-middle" align="right" valign="middle">';
        echo '<table width="100%" border="0" cellspacing="0" cellpadding="0" align="right"><tr>'
            .'<td class="bar-top-text" align="center" valign="middle">';
        // top links
        include('themes/'.$thename.'/top_links.php');

    As it happens, there are no classes around the links in the top_links file, so look here. But this is misleading, as you may think the "bar-top-text" class styles it. But they are links, so any definition of links overrides it. And the stylesheets don't define a .bar-top-text a:link, but in styleNN.css you find:

    Code

    .bar-top-middle a:link
    {
        color: silver;
        font-weight: bold;
        text-decoration: none;
    }

    .bar-top-middle a:visited
    {
        color: silver;
        font-weight: bold;
        text-decoration: none;
    }

    .bar-top-middle a:hover
    {
        color: white;
        font-weight: bold;
        text-decoration: underline;
    }

    .bar-top-middle a:active
    {
        color: silver;
        font-weight: bold;
        text-decoration: none;
    }

    Trouble is, changing the color here doesn't affect them. But the size does. They're being overriden.
    In the system, styleNN.css is called first, then style.css is called in a way that Netscape 4 can't understand, hence rules here are only read by modern browsers. And being called second, overrides the first one. Here, just to further confuse people, you find another set of definitions for the same style:

    Code

    .bar-top-middle a:link, a:visited, a:active
    {
        color: silver;
        font-weight: bold;
        text-decoration: none;
    }

    .bar-top-middle a:hover
    {
        color: white;
        font-weight: bold;
        text-decoration: underline;
    }
    There is no good reason why this should be so, but here is where you can change the top links. You can either delete these and just use the ones in styleNN.css, or use these. If so and you want to have different link, visited, hover, and active effects, separate them the way they are in styleNN.css.

    But that doesn't affect the bottom links! No, in bottom_links.php, we see the class "PN-sub" applied before the links, and it exists in both stylesheets, but no ".pn-sub A" style. There isn't even any definition for the A tag alone. Rather than rack my brain over where it might be defined, you can put this at th bottom of both stylesheets:

    Code

    .pn-sub A:link,
    .pn-sub A:visited {
        color: white;
    }
    .pn-sub A:hover,
    .pn-sub A:active {
        color: #666666;
    }
    with whatever color or style you want. Mind you, PN-sub is a generic PN style, so any links with this style will be changed, if there are any others. Test and see. You can change the class name in bottom_links.php if you like, and the rule accordingly, to make it unique. A more logical method and stylesheet could save people some trouble.
    Good luck.


    Martin :D
  • Msandersen

    Thank you for your detailed explanation. I finnaly figgured out where I can change the link details :) .
  • No problem. Some people do crossword puzzles, others play with themes...


    Martin :D
  • 0 users

This list is based on users active over the last 60 minutes.