Fork me on GitHub

The Look of the Center Block...  Bottom

  • I'm currently using the Rhuk2 theme from rhuk.net (their current default theme) on my site, and for the Administration Message as well as the Center Blocks (not the news), there is no center block title for the block or any graphical enhancements for this center block like there is for the news blocks or the side blocks. I'm trying to get the center block to look like the side blocks as far as the graphics are concerned, but I cannot find anywhere in the theme files from rhuk where the center block is coded.

    When I asked Rhuk about it, he stated that the center block cannot be graphically coded like the side blocks can. I don't feel this is an accurate answer, why? because if I look at a few of the core themes from postnuke, they do show up like the side blocks, graphically and with center block title.

    Anyone know where in the theme I should be looking to correct this problem? Thanks!

    Anvil
  • celest

    I'm currently using the Rhuk2 theme from rhuk.net (their current default theme) on my site, and for the Administration Message as well as the Center Blocks (not the news), there is no center block title for the block or any graphical enhancements for this center block like there is for the news blocks or the side blocks. I'm trying to get the center block to look like the side blocks as far as the graphics are concerned, but I cannot find anywhere in the theme files from rhuk where the center block is coded.

    When I asked Rhuk about it, he stated that the center block cannot be graphically coded like the side blocks can. I don't feel this is an accurate answer, why? because if I look at a few of the core themes from postnuke, they do show up like the side blocks, graphically and with center block title.

    Anyone know where in the theme I should be looking to correct this problem? Thanks!

    Anvil


    Anvil,

    I've just downloaded and taken a look at this theme. To modify the look of the blocks you can alter the themesidebox function. This begins at line 240 of theme.php and looks as follows :-

    Code

    /************************************************************/
    /* Function themesidebox()                                  */
    /************************************************************/

    function themesidebox($block) {
        global $block_side, $thename;
       
        if (empty($block['position'])) {
            $block['position'] = "a";
        }
        if ($block['position'] == 'l' || $block['position'] == 'r') {
            echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"150\" style=\"border: 1px solid " . getColor("border") . ";\">\n"
            ."<tr><td bgcolor=\"" . getColor("hilitehead") . "\" style=\"border-bottom: 1px solid " . getColor("border") . ";\"><img src=\"themes/Rhuknet2/images/dots.gif\" height=\"5\" width=\"13\"></td></tr>\n"
            ."<tr><td bgcolor=\"" . getColor("sectionhead") . "\" align=\"center\" height=\"20\" style=\"font : bold 13px;
            color : "
    . getColor("font") . ";\">\n"
            ."<b>$block[title]</b>\n"
            ."</td></tr>\n"
            ."<tr><td bgcolor=\"" . getColor("border") . "\"><img src=\"themes/Rhuknet2/images/pixel.gif\" width=\"100%\" height=\"1\"></td></tr>\n"
            ."<tr>\n"
            ."<td bgcolor=\"" . getColor("sectionbody") . "\" style=\"padding:4px\">$block[content]</td>\n"
            ."</tr>\n"
            ."</table>\n"
            ."<br>\n\n\n";
        }
        if ($block['position'] == 'c') {
            echo "<font>$block[content]</font>";
        }
    }


    The key section for the centre block is

    Code

    if ($block['position'] == 'c') {
            echo "<font>$block[content]</font>";
        }


    You alter the HTML layout of the centre block here. Look at how the left and right sideboxes are done for an example.

    -Mark
  • Worked out nicely! Thank you so much!

    Anvil
  • celest

    Worked out nicely! Thank you so much!

    Anvil


    No problem, glad to be able to help.

    -Mark
  • Thanks for the info. I'll add it to the theme in the next couple of days.

    rhuk
    rhuk@rhuk.net
    http://www.rhuk.net

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