Announcement

Collapse
No announcement yet.

How to: Re color pagenav links

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to: Re color pagenav links

    The new page nav. links are miscolored on my site: you can see an example here: http://corvetteactioncenter.com/foru...&threadid=1713

    PHP Code:
            <td width="100%"><font face="verdana,arial,helvetica" size="1"  color="#FFFFFF" class="thtcolor"><b>Topic &nbsp;&nbspPages (2): <b>[     &nbsp;   <a href="showthread.php?s=&threadid=1713&perpage=25&pagenumber=2">2</a> &nbsp;     <a href="showthread.php?s=&threadid=1713&perpage=25&pagenumber=2">&gt;</a>   ]</b></b></font></td
    My guess is that a class is not specified within the link tag?
    Rob

  • #2
    Yes, there is no class defined by default for those links... I figured that seeing as people would invariably want to re-style the templates, I would leave CSS definitions up to the administrators' discretion.

    Comment


    • #3
      I'll explain...

      I assume that you want to have the pagelinks sitting in the bar at the top and the bottom of the showthread page, so the colours they are currently using don't look right...?

      You can solve it like this:

      First, edit your headinclude template, and find the stuff that looks like #all A:link .... #all A:active (etc). For all of these, simply delete the #all text. This will leave you with something like this:
      Code:
      A:link, A:visited, A:active {
      	COLOR: {linkcolor};
      }
      A:hover {
      	COLOR: {hovercolor};
      }
      Next, open up the showthread template, then find the two instances of $pagenav. In each instance, replace $pagenav with
      Code:
      <span class="theadpnav">$pagenav</span>
      Now, go up to the <head> section of the showthread template, and add this:
      Code:
      <style type="text/css">
      .theadpnav A:link, .theadpnav A:visited, .theadpnav A:active, .theadpnav A:hover {
          color: {tableheadtextcolor};
      }
      </style>
      This will define a special nested class, which will colour your links correctly



      The above image shows the same pagenav template being used, the one on the white background is simply $pagenav, while the one in the table header is <span class="theadpnav">$pagenav</span>.
      Last edited by Kier; Mon 30 Jul '01, 6:06pm.

      Comment


      • #4
        Kier,

        That worked. Thanks!

        -Rob
        Rob

        Comment


        • #5
          Here's another example...This is an idea I got from a request in the hacks forum. I hacked it into 2.0.1 but now with 2.0.2 it's all done in the templates. The current number is highlighted, as seen in the first pic, and others change color on mouseover, as seen in the second. All done with CSS/A:hover.

          Comment


          • #6
            Nice!
            Rob

            Comment


            • #7
              better yet move the pagenav variable out of the cell table and just above the start of the showthread main table
              :: Always Back Up Forum Database + Attachments BEFORE upgrading !
              :: Nginx SPDY SSL - World Flags Demo [video results]
              :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

              Comment


              • #8
                <whisper> Look at tubedoggs pagelinks in Netscape </whisper>

                Comment


                • #9




                  Yeah I kind of figured. I hate Netscape so very, very much. At least I got the board semi-usable in it...for me that's an accomplishment.

                  Comment


                  • #10
                    Not that I use netscape but I wouldn't call it useable considering you can not change the page.

                    Comment


                    • #11
                      Yeah, now it's not. I meant before I did that. Other than that I think it works ok...

                      Comment


                      • #12
                        Post a little note saying If you use nutscrape and wish to turn the page, append &pagenumber=2 to your url.

                        Comment


                        • #13
                          Somehow, if they're still using Netscape, I'm not sure they'd be able to figure that one out.

                          Before I get flamed, I'm JOKING! I would use Netscape except for the crappy CSS and table support...

                          Comment


                          • #14
                            ewww netscape. nothing looks nice in that.

                            Solution.... DONT USE IT BAN IT FROM THE FACE OF THE EARTH!

                            www.xixora.com
                            Goldrush : A Soldier of Fortune Modification going for the GOLD!

                            Comment


                            • #15
                              Invaluable code snippet for any PHP script:
                              PHP Code:
                              if (stristr($HTTP_USER_AGENT,"gecko") {
                                  echo 
                              "Sorry, your browser is a turd";
                                  exit;

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X