Fork me on GitHub

Need Help Editing some code  Bottom

  • I have PostnukeBlue2 and I've customized it a bit. Its on www.futuresox.com but I want to make the story area where the title and posted by comes up in white and the background black. I know where to change the background to be black, but I don't know what to insert in this code to make the font black. I thought it would be in the CSS, but it wasn't so I'm guessing somewhere in this coding I would have to enter in to make that color black. The only thing is I have no idea where to cause I don't know how to read the PHP.

    Anyway here is the coding, I just want white font for the title and posted by, everything else is fine by me :)

    Code

    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td bgcolor="#CCCCCC" colspan="5"><img src="themes/PostNukeBlue2/images/spacer.gif" width="1" height="1"></td>
      </tr>
      <tr>
        <td valign="top" width="1" rowspan="2" bgcolor="#CCCCCC"><img src="themes/PostNukeBlue2/images/spacer.gif" width="1" height="1"></td>
        <td width="6" valign="top" bgcolor="#D4E2ED">&nbsp;</td>
        <td valign="top" width="100%" bgcolor="#D4E2ED"><span color="#000000">
    <?php
            echo "<span class=\"option\"><b>$preformat[catandtitle]</b></span>\n"
            ."<br />\n"
            ."<span class=\"content\">"._POSTEDBY.": $info[informant] "._ON." $info[longdatetime]<br />";
            if (authorised(0, 'Stories::', "$info[aid]:$info[cattitle]:$info[sid]", ACCESS_EDIT)) {
                echo "<span class=\"pn-sub\"> [ <a href=\"admin.php?module=NS-AddStory&amp;op=EditStory&amp;sid=$info[sid]\">"._EDIT."</a>";
                if (authorised(0, 'Stories::', "$info[aid]:$info[cattitle]:$info[sid]", ACCESS_DELETE)) {
                    echo "| <a href=\"admin.php?module=NS-AddStory&amp;op=RemoveStory&amp;sid=$info[sid]\">"._DELETE."</a> ]</span>";
                }
                echo "<br />\n";
            }
     ?>
          </span></td>
        <td width="6" valign="top" bgcolor="#D4E2ED">&nbsp;</td>
        <td width="1" rowspan="2" valign="top" bgcolor="#CCCCCC"><img src="themes/PostNukeBlue2/images/spacer.gif" width="1" height="1"></td>
      </tr>
      <tr>
        <td valign="top">&nbsp;</td>
        <td valign="top">
    <?php
            echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n"
            ."<tr>\n"
            ."<td>\n";
        echo "$preformat[searchtopic]\n";
        echo "$preformat[fulltext]\n";
        echo "</td>\n"
            ."</tr>\n"
            ."</table>\n\n\n"

            ."<br />\n\n\n";
    ?>
        </td>
        <td valign="top">&nbsp;</td>
      </tr>
      <tr>
        <td bgcolor="#CCCCCC" colspan="5"><img src="themes/PostNukeBlue2/images/spacer.gif" width="1" height="1"></td>
      </tr>
      <tr>
        <td><img height="1" width="1" src="themes/PostNukeBlue2/images/spacer.gif"></td>
        <td><img height="1" width="6" src="themes/PostNukeBlue2/images/spacer.gif"></td>
        <td></td>
        <td><img height="1" width="6" src="themes/PostNukeBlue2/images/spacer.gif"></td>
        <td><img height="1" width="1" src="themes/PostNukeBlue2/images/spacer.gif"></td>
      </tr>
    </table>


    Thanks so much :)[/code]
  • Yes that's in CSS, the "class" in the SPAN tags dictates which font style is used from the CSS - "option" and "content" i nthis case. You can either alter the font specs in the style sheet for the classes specified or create entirely new classes to suit your needs and then change the class in the code...

    P.S. In the future please post more specific topic subjects for your posts.

    --
    Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods

    Cape Cod Travel Info...
  • Will do in the future (Better Topic Titles).

    For the CSS, is there a way for me to add the coding, cause for whatever reason when I type edit the content and option area, it doesn't do anything so I think there is a bug in the theme I was using.

    And out of curiosity, what does the CSSNN do? I tried changing stuff in there, but it didn't change anything. Since when I changed the CSS it didn't work, I figured I'd be best just editing the specific code.

    Is their a template somewhere on the site or one that you know of that would explain classes adn all that stuff. I'm pretty much a fool, I just went through every line of code and edited the colors to see what changed and then I'd make the color the way I wanted it.

    Thanks :)
  • In the style.css, you should be editing the entry that looks like:

    Code

    .option {...}

    and

    Code

    .content {...}

    If they are not there, add them in with the font specs desired, for example:

    Code

    .option {font: white 16px bold;}

    The styleNN is a style sheet used for Netscape type browsers, so any mods you make to one, you should make to the other. Check out the ExtraLite theme for a simple example style sheet. Much of the content PN generates has hard-coded styles in the presentation, such as PN-normal for body text, links and PN-title. You can look at the source code of a generated page, for instances of "class" to see where is is being applied.

    A tutorial to style sheets can be found here: Guide to Cascading Style Sheets

    --
    Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods

    Cape Cod Travel Info...
  • Thanks so much :)

    I tried doing all that and I think I know the problem, the thing is I'm not good enough of a programmer to solve the problem. I think the coding isn't done properly in the storybox.html so it isn't pulling the span from the CSS which is why when I change the .css it doesn't change anything in the articlebox.html or storybox.html file.

    Here is the storybox.html file. Can you see where the flaw is or am I completely mistaken on my whole assumption?

    Code

    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td bgcolor="#CCCCCC" colspan="5"><img src="themes/PostNukeBlue2/images/spacer.gif" width="1" height="1"></td>
      </tr>
      <tr>
        <td valign="top" width="1" rowspan="2" bgcolor="#CCCCCC"><img src="themes/PostNukeBlue2/images/spacer.gif" width="1" height="1"></td>
        <td width="6" valign="top" bgcolor="#006600">&nbsp;</td>
        <td valign="top" width="100%" bgcolor="#006600"><span color="#000000">
    <?php
            echo "<span class=\"option\"><b>$preformat[catandtitle]</b></span>\n"
            ."<br />\n"
            ."<span class=\"content\">"._POSTEDBY.": $info[informant] "._ON." $info[longdatetime]<br />";
            if (authorised(0, 'Stories::', "$info[aid]:$info[cattitle]:$info[sid]", ACCESS_EDIT)) {
                echo "<span class=\"pn-sub\"> [ <a href=\"admin.php?module=NS-AddStory&amp;op=EditStory&amp;sid=$info[sid]\">"._EDIT."</a>";
                if (authorised(0, 'Stories::', "$info[aid]:$info[cattitle]:$info[sid]", ACCESS_DELETE)) {
                    echo "| <a href=\"admin.php?module=NS-AddStory&amp;op=RemoveStory&amp;sid=$info[sid]\">"._DELETE."</a> ]</span>";
                }
                echo "<br />\n";
            }
     ?>
          </span></td>
        <td width="6" valign="top" bgcolor="#006600">&nbsp;</td>
        <td width="1" rowspan="2" valign="top" bgcolor="#CCCCCC"><img src="themes/PostNukeBlue2/images/spacer.gif" width="1" height="1"></td>
      </tr>
      <tr>
        <td valign="top">&nbsp;</td>
        <td valign="top">
    <?php
            echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n"
            ."<tr>\n"
            ."<td>\n";
        echo "$preformat[searchtopic]\n";
        echo "$preformat[fulltext]\n";
        echo "</td>\n"
            ."</tr>\n"
            ."</table>\n\n\n"

            ."<br />\n\n\n";
    ?>
        </td>
        <td valign="top">&nbsp;</td>
      </tr>
      <tr>
        <td bgcolor="#CCCCCC" colspan="5"><img src="themes/PostNukeBlue2/images/spacer.gif" width="1" height="1"></td>
      </tr>
      <tr>
        <td><img height="1" width="1" src="themes/PostNukeBlue2/images/spacer.gif"></td>
        <td><img height="1" width="6" src="themes/PostNukeBlue2/images/spacer.gif"></td>
        <td></td>
        <td><img height="1" width="6" src="themes/PostNukeBlue2/images/spacer.gif"></td>
        <td><img height="1" width="1" src="themes/PostNukeBlue2/images/spacer.gif"></td>
      </tr>
    </table>
  • Span's are fine, maybe you need to clear your cache or refresh for you to see them. Provided the classes exist in the CSS's you should see the changes. I would nuke the "span color" tag at the beginning and make sure your other span are properly closed off.

    But the idea is that anything surrounded by <tag class="CLASSNAME"> will inherit the attributes defined in the CSS's...

    --
    Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods

    Cape Cod Travel Info...</tag>

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