Fork me on GitHub

Center block  Bottom

  • Hi !!

    I've a postnuke sito with phpbb2 theme but is impossible to see the center block for example the admin message...

    Can you help me ? I think there isn't the bookmark for the center block...

    Here is the code:

    Code

    <?php

    /************************************************************/
    /* THEME NAME: phpBB2                                       */
    /* THEME DEVELOPER: ThaiNuke (http://www.thainuke.net)      */
    /* THEME Logos and Icons from http://www.phpbb.com/         */
    /* IDEA from http://ffx69.de/                               */
    /************************************************************/

    /*****************************************************************/
    /* Modificated and optimized for PostNuke                        */
    /* by Denis Tuzov http://denis.tuzov.ru                          */
    /* Other themes you may download at http://themes.crossworlds.ru */
    /*****************************************************************/

    /************************************************************/
    /*                                                          */
    /* Theme Colors Definition                                  */
    /*                                                          */
    /* Control the header for your site. You need to define the */
    /* BODY tag and in some part of the code call the blocks    */
    /* function for left side with: blocks(left);               */
    /************************************************************/

    $thename = "phpBB2";
    $bgcolor1 = "#EFEFEF";
    $bgcolor2 = "#EFEFEF";
    $bgcolor3 = "#EFEFEF";
    $bgcolor4 = "#EFEFEF";
    $textcolor1 = "#006699";
    $textcolor2 = "#006699";
    $postnuke_theme = true;
    themes_get_language();

    function OpenTable() {
        global $bgcolor1, $bgcolor2;
        echo "<table class=\"bodyline\" width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor2\"><tr><td>\n";
        echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"$bgcolor1\"><tr><td>\n";
    }

    function CloseTable() {
        echo "</td></tr></table></td></tr></table>\n";
    }

    function OpenTable2() {
        global $bgcolor1, $bgcolor2;
        echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor2\" align=\"center\"><tr><td>\n";
        echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"$bgcolor1\"><tr><td>\n";
    }

    function CloseTable2() {
        echo "</td></tr></table></td></tr></table>\n";
    }

    /************************************************************/
    /* Function themeheader()                                   */
    /*                                                          */
    /* Control the header for your site. You need to define the */
    /* BODY tag and in some part of the code call the blocks    */
    /* function for left side with: blocks(left);               */
    /************************************************************/

    function themeheader() {
        global $user, $banners, $sitename, $slogan, $cookie, $prefix;
        cookiedecode($user);
        $username = $cookie[1];
        if ($username == "") {
            $username = "Anonymous";
        }
        echo "<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\">\n"
       ."<table cellpadding=\"0\" cellspacing=\"0\" width=\"98%\" border=\"0\" align=\"center\" bgcolor=\"#EFEFEF\">\n"
       ."<tr>\n"
       ."<td background=\"themes/phpBB2/images/bg_top.gif\" width=\"200\" align=\"left\" valign=\"middle\">\n"
       ."<a href=\"index.php\"><img src=\"themes/phpBB2/images/prova.jpg\" usemap=\"#Map\" align=\"center\" alt=\""._WELCOMETO." $sitename\" border=\"0\"></a></td>\n"
       ."<map name=\"Map\"><area shape=\"rect\" coords=\"0,82,54,100\" href=\"index.php\"><area shape=\"rect\" coords=\"53,82,106,100\" href=\"http://www.ferrovie.info/modules.php?op=modload&name=FAQ&file=index\"><area shape=\"rect\" coords=\"105,82,196,100\" href=\"http://www.ferrovie.info/modules.php?op=modload&name=Downloads&file=index\"><area shape=\"rect\" coords=\"195,82,257,100\" href=\"http://www.ferrovie.info/modules.php?op=modload&name=Web_Links&file=index\"><area shape=\"rect\" coords=\"256,82,324,100\" href=\"http://www.ferrovie.info/modules.php?op=modload&name=Search&file=index\"><area shape=\"rect\" coords=\"323,82,413,100\" href=\"http://www.ferrovie.info/modules.php?op=modload&name=Recommend_Us&file=index\"><area shape=\"rect\" coords=\"412,82,500,100\" href=\"http://www.ferrovie.info/index.php?module=MDcontact\"><area shape=\"rect\" coords=\"499,82,576,100\" href=\"javascript:window.external.AddFavorite('http://www.ferrovie.info', 'Ferrovie.Info')\"></map>\n"
       ."<td bgcolor=\"#EFEFEF\" align=\"right\">\n"
       ."\n"
       ."\n"
       ."<td background=\"themes/phpBB2/images/bg_top.gif\"><A href=\"index.php\"><img src=\"themes/phpBB2/images/1x1t.gif\" border=0 ALT=\""._HOME."\"> </a>&nbsp;&nbsp \n"
            ." <A href=\"modules.php?name=Downloads\"><img src=\"themes/phpBB2/images/1x1t.gif\" border=0 ALT=\""._UDOWNLOADS."\"></a>&nbsp;&nbsp \n"
            ." <A href=\"modules.php?name=Your_Account\"><img src=\"themes/phpBB2/images/1x1t.gif\" border=0 ALT=\""._LOGIN."\"></a>&nbsp;&nbsp \n"
            ." <A href=\"modules.php?name=Submit_News\"><img src=\"themes/phpBB2/images/1x1t.gif\" border=0 ALT=\""._SUBMISSIONS."\"></a>&nbsp;&nbsp \n"
            ." <A href=\"modules.php?name=Top\"><img src=\"themes/phpBB2/images/1x1t.gif\" border=0 ALT=\"Top 10\"></a>&nbsp;&nbsp \n"
            ." <A href=\"modules.php?name=Topics\"><img src=\"themes/phpBB2/images/1x1t.gif\" border=0 ALT=\""._TOPIC."\"></a>&nbsp;&nbsp \n"
            ." <A href=\"modules.php?name=Forums\"><img src=\"themes/phpBB2/images/1x1t.gif\" border=0 ALT=\""._BBFORUMS."\" ></a>&nbsp;&nbsp \n"
            ." <A href=\"modules.php?name=FAQ\"><img src=\"themes/phpBB2/images/1x1t.gif\" border=0 ALT=\"FAQ\"></a>\n"
            ."\n"
            ."\n";
            if ($banners) {
       include("banners.php");
        }
        echo "<td background=\"themes/phpBB2/images/bg_top.gif\" align=\"center\">\n"
            ."\n"
       ."<form action=\"modules.php?name=Search\" method=\"post\"><font class=\"orange\"><b>"
       .""
       .""
       ."</font></form>\n"
       ."<bgcolor=\"#EFEFEF\" align=\"left\">\n"
            ."</select></font></form></td></tr></table></td>\n"
       ."<td bgcolor=\"#EFEFEF\" valign=\"top\">&nbsp;</td>\n"
       ."</tr></table>\n"

       ."<table width=\"99%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\"><tr valign=\"top\">\n"
       ."<td><img src=\"themes/phpBB/images/pixel.gif\" width=\"5\" height=\"3\" border=\"0\" alt=\"\"></td></tr></table>\n"
       ."<table width=\"99%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\"><tr valign=\"top\">\n"
       ."<td><img src=\"themes/phpBB/images/pixel.gif\" width=\"10\" height=\"1\" border=\"0\" alt=\"\"></td>\n"
       ."<td width=\"155\" valign=\"top\">\n";
        blocks(left);
        echo "</td><td><img src=\"themes/phpBB/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td><td width=\"100%\">\n";
       
    }

    /************************************************************/
    /* Function themefooter()                                   */
    /*                                                          */
    /* Control the footer for your site. You don't need to      */
    /* close BODY and HTML tags at the end. In some part call   */
    /* the function for right blocks with: blocks(right);       */
    /* Also, $index variable need to be global and is used to   */
    /* determine if the page your're viewing is the Homepage or */
    /* and internal one.                                        */
    /************************************************************/

    function themefooter() {
        global $index;
        if ($index == 1) {
       echo "</td><td><img src=\"themes/phpBB2/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td><td valign=\"top\" width=\"155\">\n";
       blocks(right);
        }
        echo "</td><td><img src=\"themes/phpBB2/images/pixel.gif\" width=10 height=1 border=0 alt=\"\">\n"
       ."</td></tr></table>\n"
            ."<table width=\"99%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\"><tr valign=\"top\">\n"
            ."<td height=\"17\">&nbsp;</td>\n"
            ."</tr></table>\n"
            ."<br>"
            ."<table width=\"98%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\"><tr valign=\"top\">\n"
            ."</tr><tr align=\"center\">\n"
            ."<td class=\"cat\" background=\"themes/phpBB2/images/bg_top.gif\" width=\"100%\" colspan=\"3\">\n";
        footmsg();
        echo "</td>\n"
            ."</tr>\n"
            ."</table>\n";
    }

    /************************************************************/
    /* Function themeindex()                                   */
    /*                                                          */
    /* Control the header for your site. You need to define the */
    /* BODY tag and in some part of the code call the blocks    */
    /* function for left side with: blocks(left);               */
    /************************************************************/

    function themeindex ($_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $info, $links, $preformat) {
        global $thename, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4,  $sepcolor;
        $anonymous = pnConfigGetVar('anonymous');
        $tipath = pnConfigGetVar('tipath');
        echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#EFEFEF\" width=\"100%\"><tr><td>\n"
       ."<table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" bgcolor=\"#98AAB1\" width=\"100%\"><tr><td>\n"
       ."<table background=\"themes/phpBB2/images/bg_top.gif\" border=\"0\" cellpadding=\"3\" cellspacing=\"2\" bgcolor=\"#EEEEEE\" width=\"100%\"><tr><td align=\"left\">\n"
       ."<font class=\"option\" color=\"#363636\"><b>&nbsp;&nbsp;".$preformat[catandtitle]."</b></font>\n"
       ."</td></tr></table></td></tr></table>\n";
       echo "$preformat[searchtopic]\n";  
        echo "$info[hometext] \n $preformat[notes] \n</td></tr></table>\n"
       ."<table background=\"themes/phpBB2/images/bg_top.gif\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\" width=\"100%\"><tr><td>\n"
       ."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\"><tr><td align=\"center\">\n"
       ."<font color=\"#000000\" size=\"1\">"._POSTEDBY."  ";
        echo " "._ON."  "._READS."</font>\n"
       ."<font class=\"content\">$preformat[more]</font>\n"
       ."</td></tr></table></td></tr></table>\n"
       ."<br>\n\n\n";
    }

    /************************************************************/
    /* Function themearticle()                            */
    /*                                                          */
    /* Control the header for your site. You need to define the */
    /* BODY tag and in some part of the code call the blocks    */
    /* function for left side with: blocks(left);               */
    /************************************************************/

    function themearticle ($_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $info, $links, $preformat) {
        global $admin, $sid, $tipath;
        echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#EFEFEF\" width=\"100%\"><tr><td>\n"
            ."<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" bgcolor=\"#EFEFEF\" width=\"100%\"><tr><td>\n"
            ."<table background=\"themes/phpBB2/images/cellpic3.gif\" border=\"0\" cellpadding=\"3\" cellspacing=\"2\" bgcolor=\"#EFEFEF\" width=\"100%\"><tr><td align=\"left\">\n"
            ."<font class=\"option\" size=\"1\"><b>&nbsp;&nbsp;$preformat[catandtitle]</b></font><br>\n"
            ."</td></tr></table>\n"  
            ."<font size=\"1\">"._POSTEDBY.""._ON."";
             if (pnSecAuthAction(0, 'Stories::Story', "$info[aid]:$info[cattitle]:$info[sid]", ACCESS_EDIT)) {
                 ?>[ <A HREF="admin.php?module=NS-AddStory&amp;op=EditStory&amp;sid=<?=$info[sid];?>"><?=_EDIT;?></A> ]<?
                if (pnSecAuthAction(0, 'Stories::Story', "$info[aid]:$info[cattitle]:$info[sid]", ACCESS_DELETE))             {
                ?>[ <A HREF="admin.php?module=NS-AddStory&amp;op=RemoveStory&amp;sid=<?=$info[sid];?>"><?=_DELETE;?></A> ]<?
                }
               ?><BR><BR><?
                }
        echo "</td></tr></table><br>";
        echo "$preformat[searchtopic]\n";
        echo "$preformat[fulltext]</td></tr></table><br>\n\n\n";
    }

    /************************************************************/
    /* Function themesidebox()                                   */
    /*                                                          */
    /* Control the header for your site. You need to define the */
    /* BODY tag and in some part of the code call the blocks    */
    /* function for left side with: blocks(left);               */
    /************************************************************/

    function themesidebox($block) {
        echo "<table class=\"bodyline\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" width=\"165\"><tr><td>\n"
            ."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"165\">\n"
          ."</table>\n"
           ."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#EFEFEF\" width=\"100%\">\n"
       ."<tr><td class=\"cat\" background=\"themes/phpBB2/images/cellpic2.gif\" align=\"center\">\n"
       ."<font class=\"title\" size=\"1\"><b>$block[title]</b></font>\n"
       ."</td></tr>\n"
       ."<tr>\n"
       ."<td bgcolor=\"#EFEFEF\"><font size=\"1\">$block[content]</td>\n"
       ."</tr>\n"
       ."</table></td></tr></table>\n"
       ."<br>\n\n\n";
    }

    ?>


    Many thanks
  • Thats an "old" style theme and you would be better off converting it to either AutoTheme or Xanthia to make your life and upgrading easier.

    I'll give it a go however. First off you need to change the funtion right a the bottom to something like:

    Code

    function themesidebox($block)
    {  // Begin Center Block
        if ($block['position'] == 'c')
        {
        echo "$block[content]<br>";
        // end Center Block
        } else {
        echo "<table class=\"bodyline\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" width=\"165\"><tr><td>\n"
            ."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"165\">\n"
          ."</table>\n"
           ."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#EFEFEF\" width=\"100%\">\n"
       ."<tr><td class=\"cat\" background=\"themes/phpBB2/images/cellpic2.gif\" align=\"center\">\n"
       ."<font class=\"title\" size=\"1\"><b>$block[title]</b></font>\n"
       ."</td></tr>\n"
       ."<tr>\n"
       ."<td bgcolor=\"#EFEFEF\"><font size=\"1\">$block[content]</td>\n"
       ."</tr>\n"
       ."</table></td></tr></table>\n"
       ."<br>\n\n\n";
        }
    }


    Notice how I put the if statement in that defines the centerblock if it's to be displayed. you will have to change the coding in that echo bit to suit your needs.

    Next you need to put this:

    Code

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

    Just after:

    Code

    blocks(left);
        echo "</td><td><img src=\"themes/phpBB/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td><td width=\"100%\">\n";


    Make sure it is above that curly bracket that comes just after those lines, not after it.

    It's a long time since I did much with those old themes some you might have to play around with it a bit.
  • I think there might be a free AutoTheme version of the phpbb2 theme for postnuke on my site.

    http://www.autothemes.com

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