Fork me on GitHub

Theme Question 760 - Admin_Messages  Bottom

  • I have made a coulpe themes & the Admin_Messages is not showing up in them.

    What is the tag that I should have in the theme.php for them to show up?

    I am using the classic engine, not Xanthia.
  • Here is the code in my theme.php

    Code

    <?php

    /************************************************************/
    /* Theme Colors Definition                                  */
    /************************************************************/
    $thename = "Red";
    $bgcolor1 = "#000000";
    $bgcolor2 = "#484848";
    $bgcolor3 = "#333333";
    $bgcolor4 = "#706868";
    $textcolor1 = "#FF5050";
    $textcolor2 = "#FF5050";
    $postnuke_theme = true;
    themes_get_language();
    /************************************************************/
    /* OpenTable Functions                                      */
    /*                                                          */
    /* Define the tables look&feel for you whole site. For this */
    /* we have two options: OpenTable and OpenTable2 functions. */
    /* Then we have CloseTable and CloseTable2 function to      */
    /* properly close our tables. The difference is that        */
    /* OpenTable has a 100% width and OpenTable2 has a width    */
    /* according with the table content                         */
    /************************************************************/

    function OpenTable() {
        global $bgcolor1, $bgcolor2;
        echo "<table 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";
    }


    /************************************************************/
    /* FormatStory                                              */
    /************************************************************/

    function FormatStory($thetext, $notes, $aid, $informant) {
        global $anonymous;
        if ($notes != "") {
            $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
        } else {
            $notes = "";
        }
        if ("$aid" == "$informant") {
            echo "<font class=\"content\" color=\"#505050\">$thetext$notes</font>\n";
        } else {
            if($informant != "") {
                $boxstuff = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;uname=$informant\">$informant</a> ";
            } else {
                $boxstuff = "$anonymous ";
            }
            $boxstuff .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
            echo "<font class=\"content\" color=\"#505050\">$boxstuff</font>\n";
        }
    }

    /************************************************************/
    /* Function themeheader()                                   */
    /************************************************************/
        function themeheader() {
            $slogan = pnConfigGetVar('slogan');
            $sitename = pnConfigGetVar('sitename');
            $banners = pnConfigGetVar('banners');
            $type = pnVarCleanFromInput('type');


            echo "</head>\n";

        echo "<body bgcolor=\"#000000\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\">\n"
            ."<br>\n";
        // Banner Display
        //  echo "<p align=\"center\">\n";
        //  pnBannerDisplay(1);
        // Uncomment above two lines of code if require banner at bottom of page.
        //Begin Header
                include("themes/$GLOBALS[thename]/header.html");

            echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n"
                ."<tr valign=\"top\">\n"
            //choose image for left hand block - comment out next line for plain colour
            //    ."<td background=\"themes/$GLOBALS[thename]/images/BlockRContent.gif\" width=\"150\" valign=\"top\">\n";
              //choose image for left hand block - comment in next line for colour
              ."<td bgcolor=\"#000000\">\n";
            blocks('left');
            echo "</td>\n"
                ."<td bgcolor=\"#000000\"><img src=\"themes/$GLOBALS[thename]/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td>\n"
                ."<td width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"#000000\">\n";
                   // Displays Center Admin message
                            if ($GLOBALS['index'] == 1) {
                               echo "<span class=\"message-centre\">\n";
                                   blocks('centre');
                               echo "</span>\n";
                               echo"<BR>";
                               echo"<BR>";
                               }
    }
    /************************************************************/
    /* 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 $thename, $index, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $banners, $sepcolor;
        if ($index == 1) {
        echo "</td><td><img src=\"themes/$GLOBALS[thename]/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td><td valign=\"top\" width=\"150\" bgcolor=\"#000000\">\n";
        blocks('right');
        }
        echo "</td>\n"
        ."</tr></table>\n"
            ."<table bgcolor=\"#000000\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">\n"
            ."<tr>\n"
            ."<td width=\"100%\" height=\"5\"><img src=\"themes/$GLOBALS[thename]/images/bottombar.gif\" width=\"100%\" height=\"5\" border=\"0\" alt=\"\"></td>\n"
            ."</tr>\n"
            ."<tr>\n"
            ."<td width=\"100%\"><img src=\"themes/$GLOBALS[thename]/images/pixel.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\"></td>\n"
            ."</tr>\n"
            ."</table>\n"
            ."<br>\n"
            ."<br>\n"
            ."<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">\n"
            ."<tr align=\"center\">\n"
            ."<td width=\"100%\" colspan=\"3\">\n";

             footmsg();
             echo "</td>\n"
             ."</tr>\n"
             ."</table>\n"
             //Leave the copyright intact!!
             ."</tr></table>

            <tr>
             <td height=\"70\">"
    ;

             // Banner Display - from last tr - uncomment if require banner at top of page
            //echo "<p align=\"center\">\n";
            //pnBannerDisplay('1');

            echo "
            </td>\n"
    ;
    }
    /************************************************************/
    /* Function themeindex()                                    */
    /*                                                          */
    /* This function format the stories on the Homepage         */
    /************************************************************/

    function themeindex ($_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $info, $links, $preformat) {
        global $thename;

    $anonymous = pnConfigGetVar('anonymous');
    $tipath = pnConfigGetVar('tipath');


        echo \"<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">\n"
            .\"<tbody>\n"
            .\"<tr>\n"
            .\"<td><img src=\"themes/$GLOBALS[thename]/images/m2-1.gif\" alt width=\"22\" height=\"42\"></td>\n"
            .\"<td width=\"100%\" background=\"themes/$GLOBALS[thename]/images/m2-2a.gif\" height=\"42\" colspan=\"2\">\n"
            .\"<font class=small><b>$info[topicname]&nbsp;:&nbsp;$preformat[catandtitle]</b><br>"._POSTEDBY.\": $info[informant] "._ON.\" $info[longdatetime] $timezone</font></td>\n"
            .\"<td><img src=\"themes/$GLOBALS[thename]/images/m2-3.gif\" alt width=\"22\" height=\"42\"></td>\n"
            .\"</tr>\n"
            .\"<tr>\n"
            .\"<td background=\"themes/$GLOBALS[thename]/images/m2-4.gif\"><img height=\"8\" width=\"8\" src=\"themes/$GLOBALS[thename]/images/pix.gif\" alt></td>\n"
            .\"<td width=\"100\" align=\"center\">$preformat[searchtopic]</td><td width=\"100%\">$preformat[notes] $info[hometext]</td>\n"
            .\"<td background=\"themes/$GLOBALS[thename]/images/m2-5.gif\"><img height=\"8\" width=\"8\" src=\"themes/$GLOBALS[thename]/images/pix.gif\" alt></td>\n"
            .\"</tr>\n"
            .\"<tr>\n"
            .\"<td><img src=\"themes/$GLOBALS[thename]/images/m2-6.gif\" alt width=\"22\" height=\"22\"></td>\n"
            .\"<td width=\"100%\" background=\"themes/$GLOBALS[thename]/images/m2-7.gif\" colspan=\"2\"><img height=\"8\" width=\"8\" src=\"themes/$GLOBALS[thename]/images/pix.gif\" alt></td>\n"
            .\"<td><img src=\"themes/$GLOBALS[thename]/images/m2-8.gif\" alt width=\"22\" height=\"22\"></td>\n"
            .\"</tr>\n"
            .\"</tbody>\n"
            .\"</table>\n"
        .\"<br>\n\n\n";



    }

    /************************************************************/
    /* Function themeindex()                                    */
    /*                                                          */
    /* This function format the stories on the story page, when */
    /* you click on that "Read More..." link in the home        */
    /************************************************************/

    function themearticle ($_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $info, $links, $preformat) {
       global $thename, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $sepcolor;
        echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#808080\" width=\"100%\"><tr><td>\n"
            ."<table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" bgcolor=\"#000000\" width=\"100%\"><tr><td>\n"
            ."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" bgcolor=\"#484848\" width=\"100%\"><tr><td align=\"left\">\n"
            ."<font class=\"option\" color=\"#363636\"><b>$preformat[catandtitle]</b></font><br>\n"
            ."<font class=\"content\">".ON." $info[briefdatetime] "._BY." ";
        echo "$info[informant]";
        if (pnSecAuthAction(0, 'Stories::', "$info[aid]:$info[cattitle]:$info[sid]", ACCESS_DELETE)) {
        echo "<br>[
          <a href=%22admin.php?module=NS-AddStory&op=EditStory&sid=$info[sid]/&quot;>"
    ._EDIT."</a> |
          <a href=%22admin.php?module=NS-AddStory&op=RemoveStory&sid=$info[sid]/&quot;>"
    ._DELETE."</a> ]\n";
        }
        echo "</td></tr></table></td></tr></table><br>";
        echo "<a href=\"links[searchtopic]\"><img src=\"images/topics/$info[topicimage]\" border=\"0\" Alt=\"$info[topictext]\" align=\"right\" hspace=\"10\" vspace=\"10\"></a>\n";
        echo "$preformat[fulltext]\n";
        echo "</td></tr></table><br>\n\n\n";
    }
    /************************************************************/
    /* Function themesidebox()                                  */
    /*                                                          */
    /* Control look of your blocks. Just simple.                */
    /************************************************************/

    function themesidebox($block) {
        global $thename;
    if (empty($block['position'])) {

    $block['position'] = "a"; }

    //Begin Left Block
        if ($block['position'] == 'l') {
            include("themes/$thename/leftblock.php");
    }

    //Begin Right Block
        if ($block['position'] == 'r') {
            include("themes/$thename/rightblock.php");
    }

    //Begin Center Block
    if($block['position'] == 'c') {
        echo "<table cellspacing=\"0\" cellpadding=\"0\" width=\"215\" border=\"0\">\n"
        .\"<tbody>\n"
        .\"<tr>\n"
        .\"<td>
          <img src=%22themes/$GLOBALS[thename]/images/m2-1.gif/%22 alt width=\"22\" height=\"32\"></td>\n"

        .\"<td width=\"100%\" background=%22themes/$GLOBALS[thename]/images/m2-2.gif/%22 align=\"center\"><font class=small><b>$block[title]</b></font></td>\n"
        .\"<td>
          <img src=%22themes/$GLOBALS[thename]/images/m2-3.gif/%22 alt width=\"22\" height=\"32\"></td>\n"

        .\"</tr>\n"
        .\"<tr>\n"
        .\"<td background=%22themes/$GLOBALS[thename]/images/m2-4.gif/%22>
          <img height=\"8\" width=\"8\" src=%22themes/$GLOBALS[thename]/images/pix.gif/%22 alt></td>\n"

        .\"<td width=\"100%\">$block[content]</td>\n"
        .\"<td background=%22themes/$GLOBALS[thename]/images/m2-5.gif/%22>
          <img height=\"8\" width=\"8\" src=%22themes/$GLOBALS[thename]/images/pix.gif/%22 alt></td>\n"

        .\"</tr>\n"
        .\"<tr>\n"
        .\"<td>
          <img src=%22themes/$GLOBALS[thename]/images/m2-6.gif/%22 alt width=\"22\" height=\"22\"></td>\n"

        .\"<td width=\"100%\" background=%22themes/$GLOBALS[thename]/images/m2-7.gif/%22>
          <img height=\"8\" width=\"8\" src=%22themes/$GLOBALS[thename]/images/pix.gif/%22 alt></td>\n"

        .\"<td>
          <img src=%22themes/$GLOBALS[thename]/images/m2-8.gif/%22 alt width=\"22\" height=\"22\"></td>\n"

        .\"</tr>\n"
        .\"</tbody>\n"
        .\"</table>\n";
        }

    }

    ?>
  • I haven't tried a legacy theme on 760 yet but that looks like it should work if other things are working correctly.

    What you could do to make life easier for yourself is convert that theme to either Auotheme or xanthia. I actually use both at times and if you get AutoTheme there is also a conversion module on the same site to help you vanvert your theme. There is also a conversion module on Mark West's site if you want to go to Xanthia.
  • Thanks for the info, been thinking about converting them over to X for a coulpe of weeks now. Guess I will try the converter on my test server & see what happens.

    Thanks again.

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