Fork me on GitHub

Help with theme.php...  Bottom

  • Howdy...I am trying to add centre block capability to my theme and I've run into some problems...

    I've followed previous threads and added:


    if ($GLOBALS['index'] == 1) {
    blocks('centre');
    }


    to my "themeheader" section.

    I also added:

    //Begin Center Block
    if ($block['position'] == 'c') {
    echo $block['content']."
    ";
    }


    to my "themesidebox" section.

    The problem I am having is that my center block is out putting my admin message twice. Once as a side block, and the other as a proper center block... I attempted to implement a suggested fix by adding the "else" statement to my "themesidebox" function, but I received nothing but PHP errors on my page...

    My "themesidebox" is as follows:
    Quote:
    function themesidebox($block) {
    echo "
    \n"
    ."\n"
    ."
    \n"
    ."\n"
    ."\n"
    ."\n"
    ."\n"
    ."\n"
    ."\n"
    ."
    \n"
    ."<font class="\"option\"" color="\"#FFFFCC\"">  $block[title]
    \n"
    ."
    \n\n"
    ."\n"
    ."\n"
    ."\n"
    ."\n"

    ."\n"
    ."\n"
    ."
    \n"
    ."\n"
    ."\n"
    ."\n"
    ."\n"
    ."
    \n"
    ."$block[content]\n"
    ."
    \n"
    ."
    \n"

    ."\n"
    ."\n"
    ."\n"
    ."\n"
    ."
    \n"
    ."\n"
    ."
    \n\n\n";
    //Begin Center Block
    if ($block['position'] == 'c') {
    echo $block['content']."
    ";
    }
    }


    Thanx for any help you can offer :)

    Cheers
  • Got her fixed... I actually found an example on a German website...lol... Did a little translation and implemented the code. I'll post the fix in another forum. Sabbat-xp is a very popular theme so I'm sure most folks who use it would appreciate the addition of centre block support... 8)

    Cheers

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