Jump to content

Need help on blocks


coldversion

Recommended Posts

Hi

 

I new to PHP coding but can get my site to show the right hand blocks to show up on one site .. even when i change themes to one form another site im using which does show them ..

 

what am i doing wrong am i missing somethink in the sql or php codes?

 

www.the--wall.com/pathfinders

 

is the site i am working with

Please help

 

 

 

Link to comment
Share on other sites

the coding in righth_center.html is

 

</td><td ><img src="themes/Hitech/images/pixel.gif" width="15" height="1" border="0" alt=""></td><td valign="top" width="150">

 

the coding in my Theme.php is as follows

<?php

 

/************************************************************/

/* THEME NAME: Clan                                      */

/* THEME DEVELOPER:      */

/************************************************************/

 

$bgcolor1 = "#000000";

$bgcolor2 = "#000000";

$bgcolor3 = "#000000";

$bgcolor4 = "#000000";

$textcolor1 = "#000000";

$textcolor2 = "#000000";

 

include("themes/Clan/tables.php");

 

/************************************************************/

/* 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, $dbi;

    cookiedecode($user);

    $username = $cookie[1];

    if ($username == "") {

        $username = "Anonymous";

    }

    echo "<body bgcolor=000000 leftmargin=\"40\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\">";

    if ($banners == 1) {

        include("banners.php");

    }

    $topics_list = "<select name=\"new_topic\" onChange='submit()'>\n";

    $topics_list .= "<option value=\"\">All Topics</option>\n";

    $toplist = sql_query("select topicid, topictext from ".$prefix."_topics order by topictext", $dbi);

    while(list($topicid, $topics) = sql_fetch_row($toplist, $dbi)) {

    if ($topicid==$topic) { $sel = "selected "; }

        $topics_list .= "<option $sel value=\"$topicid\">$topics</option>\n";

        $sel = "";

    }

    if ($username == "Anonymous") {

        $theuser = "  <a href=\"modules.php?name=Your_Account&op=new_user\">Create an account";

    } else {

        $theuser = "  Welcome $username!";

    }

    $tmpl_file = "themes/Clan/header.html";

    $thefile = implode("", file($tmpl_file));

    $thefile = addslashes($thefile);

    $thefile = "\$r_file=\"".$thefile."\";";

    eval($thefile);

    print $r_file;

    blocks(left);

    $tmpl_file = "themes/Clan/left_center.html";

    $thefile = implode("", file($tmpl_file));

    $thefile = addslashes($thefile);

    $thefile = "\$r_file=\"".$thefile."\";";

    eval($thefile);

    print $r_file;

}

 

/************************************************************/

/* 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, $foot1, $foot2, $foot3, $foot4;

    if ($index == 1) {

        $tmpl_file = "themes/Clan/center_right.html";

        $thefile = implode("", file($tmpl_file));

        $thefile = addslashes($thefile);

        $thefile = "\$r_file=\"".$thefile."\";";

        eval($thefile);

        print $r_file;

        blocks(right);

    }

    $footer_message = "$foot1<br>$foot2<br>$foot3<br>$foot4";

    $tmpl_file = "themes/Clan/footer.html";

    $thefile = implode("", file($tmpl_file));

    $thefile = addslashes($thefile);

    $thefile = "\$r_file=\"".$thefile."\";";

    eval($thefile);

    print $r_file;

}

 

/************************************************************/

/* Function themeindex()                                    */

/*                                                          */

/* This function format the stories on the Homepage        */

/************************************************************/

 

function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {

    global $anonymous, $tipath;

    if ($notes != "") {

        $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";

    } else {

        $notes = "";

    }

    if ("$aid" == "$informant") {

        $content = "$thetext$notes\n";

    } else {

        if($informant != "") {

            $content = "<a href=\"modules.php?name=Your_Account&op=userinfo&uname=$informant\">$informant</a> ";

        } else {

            $content = "$anonymous ";

        }

        $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";

    }

    $posted = ""._POSTEDBY." ";

    $posted .= get_author($aid);

    $posted .= " "._ON." $time $timezone ($counter "._READS.")";

    $tmpl_file = "themes/Clan/story_home.html";

    $thefile = implode("", file($tmpl_file));

    $thefile = addslashes($thefile);

    $thefile = "\$r_file=\"".$thefile."\";";

    eval($thefile);

    print $r_file;

}

 

/************************************************************/

/* Function themearticle()                                  */

/*                                                          */

/* This function format the stories on the story page, when */

/* you click on that "Read More..." link in the home        */

/************************************************************/

 

function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {

    global $admin, $sid, $tipath;

    $posted = ""._POSTEDON." $datetime "._BY." ";

    $posted .= get_author($aid);

    if ($notes != "") {

        $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";

    } else {

        $notes = "";

    }

    if ("$aid" == "$informant") {

        $content = "$thetext$notes\n";

    } else {

        if($informant != "") {

            $content = "<a href=\"modules.php?name=Your_Account&op=userinfo&uname=$informant\">$informant</a> ";

        } else {

            $content = "$anonymous ";

        }

        $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";

    }

    $tmpl_file = "themes/Clan/story_page.html";

    $thefile = implode("", file($tmpl_file));

    $thefile = addslashes($thefile);

    $thefile = "\$r_file=\"".$thefile."\";";

    eval($thefile);

    print $r_file;

}

 

/************************************************************/

/* Function themesidebox()                                  */

/*                                                          */

/* Control look of your blocks. Just simple.                */

/************************************************************/

 

function themesidebox($title, $content) {

    $tmpl_file = "themes/Clan/blocks.html";

    $thefile = implode("", file($tmpl_file));

    $thefile = addslashes($thefile);

    $thefile = "\$r_file=\"".$thefile."\";";

    eval($thefile);

    print $r_file;

}

 

?>

if there are any other code im not sure which do what yet as im use to html code not php yet :-(

Link to comment
Share on other sites

okay.. please use the code tags for code in your posts!

I'm not sure what you're trying to do if righth_center.html only contains xhtml and not php.

all you're outputting is:

</td><td ><img src="themes/Hitech/images/pixel.gif" width="15" height="1" border="0" alt=""></td><td valign="top" width="150">

you don't actually seem to be outputting any php on the page.

Link to comment
Share on other sites

like i said im new to PHP .. the only files in my Theme folder are as follows.

blocks.html

<table cellspacing=0 cellpadding=0 width=180 border=0" background="themes/Clan/images/block_bg.jpg">
<TBODY>
              <TR> 
                <TD height="28">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%" >
                    <tr>
                      <td height="35" background="themes/Clan/images/block_top.gif" colspan="3">
                      <div align="center"><font size=10 color="#FFFFFF"><br><b>.:: $title ::.</b></font></div></td>
                    </tr>
                    <tr>
                      <td height="10" background="themes/Clan/images/block_left.jpg"><img border="0" src="themes/Clan/images/pixel.gif" width="6" height="1"></td>
                      <td width="172"><table cellpadding=5 width=100%><tr><td>
                      <font class="content" color="#FFFFFF">$content</font></td></tr></table></td>
                      <td height="10" background="themes/Clan/images/block_right.jpg"><img border="0" src="themes/Clan/images/pixel.gif" width="7" height="1"></td>
                    </tr></table>
                </TD>
              </TR>
  <tr> 
    <td>
    <img border="0" src="themes/Clan/images/block_bottom.gif" width="190" height="35"></td>
  </tr>
  </tbody>
</table>
<br>

 

center_right.html

</td><td ><img src="themes/Hitech/images/pixel.gif" width="15" height="1" border="0" alt=""></td><td valign="top" width="150">

footer.html

</td><td width="5" ><img src="themes/Clan/images/pixel.gif" width=5 height=1 border=0 alt="">
</td></tr></table>
<br>
<div align="center">
  <center>
<table width="890" height="40" background="themes/Clan/images/footer.jpg" cellpadding="0" cellspacing="0" border="0" ><tr valign="top">
<td width="5"></td>
<td width="858" ></td>
<td width="5"></td>
</tr><tr align="center">
<td width="2" >
</td>
<td width="890">
A <a href="http://www.cold-version.com">www.cold-version.com</a> Website</td>
<td width="5">
</td>
</tr></table></center>
</div>

 

tables.php

<?php

/************************************************************/
/* 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\"><tr><td class=\"content\" bgcolor=\"000000\">\n";
    echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"8\" ><tr><td bgcolor=\"111111\">\n";
}

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

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

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

?>

header.html

<table border="0" align="center" cellpadding="0" width=900 cellspacing="0" >
  <tr>
    <td>
    <table width=900 border="0" background="themes/Clan/images/header_bg.jpg" cellpadding="0"cellspacing="0" height="0" >
  <tr>
    <td width=331><img src="themes/Clan/images/logo.jpg" width="331" height="100" align=left alt="Welcome to $sitename" border="0"></td>
    <td width=500 valign="bottom"><table border="0" cellpadding="0"cellspacing="0" width="550" >
  <tr>
    <td align="left" valign=bottom width="250">
    <form action="modules.php?name=News&new_topic" method="post"><font color="#FFFF00"><b>Topics </b>$topics_list</select></font>
</form></td>
    <td align="left" valign=bottom width="250">
    <form action="modules.php?name=Search" method="post"><font color="#FFFF00"><b>Search: 
<input type="text" name="query" size="12" ></font>
</b></form>
</td>
<td align="right" valign="top" width="350">
<table cellspacing="0" border="0"><tr><td> </td></tr><tr><td height="1"></td></tr></table></td>
  </tr>
</table>
</td>
  </tr>
</table>
</td> </tr>
  <tr>
    <td width="100%" height="40" align="center"><br>
    <table width=892 background="themes/Clan/images/footer.jpg" height="40" border=0><tr><td>
<font class="content" color="#363636"><b>   $theuser</b></font></td>
    <td width="600" height="20" align="center"><a href="modules.php?name=Your_Account"><img src="themes/Clan/images/join.jpg" width="97" height="14" border="0"></a><a href="modules.php?name=Submit_News"><img src="themes/Clan/images/submit.jpg" width="97" height="14" border="0"></a><a href="modules.php?name=Top"><img src="themes/Clan/images/top.jpg" width="97" height="14" border="0"></a><a href="modules.php?name=Forums"><img src="themes/Clan/images/forum.jpg" width="97" height="14" border="0"></a><a href="modules.php?name=Downloads"><img src="themes/Clan/images/download.jpg" width="97" height="14" border="0"></a></td>
    <td><font class="content"><b><script type="text/javascript">
<!--   // Array ofmonth Names
var monthNames = new Array( "January","February","March","April","May","June","July","August","September","October","November","December");
var now = new Date();
thisYear = now.getYear();
if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem
document.write(monthNames[now.getMonth()] + " " + now.getDate() + ", " + thisYear);
// --></script></b></font>
</td></tr></table>
</td>
  </tr>
</table>
<br>
<!-- FIN DEL TITULO -->
<table width="900" cellpadding="0" bgcolor="000000" cellspacing="0" border="0" align="center"><tr valign="top">
<td width="5"><img src="themes/Clan/images/pixel.gif" width="5" height="1" border="0" alt=""></td>
<td width="150" valign="top">

 

left_center.html

</td><td>
<img src="themes/Hitech/images/pixel.gif" width="15" height="1" border="0" alt="">
</td><td valign="top" width="100%">

 

theme.php

<?php

/************************************************************/
/* THEME NAME: Clan                                      */
/* THEME DEVELOPER: */
/************************************************************/

$bgcolor1 = "#000000";
$bgcolor2 = "#000000";
$bgcolor3 = "#000000";
$bgcolor4 = "#000000";
$textcolor1 = "#000000";
$textcolor2 = "#000000";

include("themes/Clan/tables.php");

/************************************************************/
/* 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, $dbi;
    cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    echo "<body bgcolor=000000 leftmargin=\"40\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\">";
    if ($banners == 1) {
        include("banners.php");
    }
    $topics_list = "<select name=\"new_topic\" onChange='submit()'>\n";
    $topics_list .= "<option value=\"\">All Topics</option>\n";
    $toplist = sql_query("select topicid, topictext from ".$prefix."_topics order by topictext", $dbi);
    while(list($topicid, $topics) = sql_fetch_row($toplist, $dbi)) {
    if ($topicid==$topic) { $sel = "selected "; }
        $topics_list .= "<option $sel value=\"$topicid\">$topics</option>\n";
        $sel = "";
    }
    if ($username == "Anonymous") {
        $theuser = "  <a href=\"modules.php?name=Your_Account&op=new_user\">Create an account";
    } else {
        $theuser = "  Welcome $username!";
    }
    $tmpl_file = "themes/Clan/header.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
    blocks(left);
    $tmpl_file = "themes/Clan/left_center.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

/************************************************************/
/* 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, $foot1, $foot2, $foot3, $foot4;
    if ($index == 1) {
        $tmpl_file = "themes/Clan/center_right.html";
        $thefile = implode("", file($tmpl_file));
        $thefile = addslashes($thefile);
        $thefile = "\$r_file=\"".$thefile."\";";
        eval($thefile);
        print $r_file;
        blocks(right);
    }
    $footer_message = "$foot1<br>$foot2<br>$foot3<br>$foot4";
    $tmpl_file = "themes/Clan/footer.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

/************************************************************/
/* Function themeindex()                                    */
/*                                                          */
/* This function format the stories on the Homepage         */
/************************************************************/

function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
    global $anonymous, $tipath;
    if ($notes != "") {
        $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
    } else {
        $notes = "";
    }
    if ("$aid" == "$informant") {
        $content = "$thetext$notes\n";
    } else {
        if($informant != "") {
            $content = "<a href=\"modules.php?name=Your_Account&op=userinfo&uname=$informant\">$informant</a> ";
        } else {
            $content = "$anonymous ";
        }
        $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
    }
    $posted = ""._POSTEDBY." ";
    $posted .= get_author($aid);
    $posted .= " "._ON." $time $timezone ($counter "._READS.")";
    $tmpl_file = "themes/Clan/story_home.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

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

function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
    global $admin, $sid, $tipath;
    $posted = ""._POSTEDON." $datetime "._BY." ";
    $posted .= get_author($aid);
    if ($notes != "") {
        $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
    } else {
        $notes = "";
    }
    if ("$aid" == "$informant") {
        $content = "$thetext$notes\n";
    } else {
        if($informant != "") {
            $content = "<a href=\"modules.php?name=Your_Account&op=userinfo&uname=$informant\">$informant</a> ";
        } else {
            $content = "$anonymous ";
        }
        $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
    }
    $tmpl_file = "themes/Clan/story_page.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

/************************************************************/
/* Function themesidebox()                                  */
/*                                                          */
/* Control look of your blocks. Just simple.                */
/************************************************************/

function themesidebox($title, $content) {
    $tmpl_file = "themes/Clan/blocks.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

?>

 

I have a feeling it somethink wrong in theme.php file im missing somthink in the following codes

function themeheader() {
    global $user, $banners, $sitename, $slogan, $cookie, $prefix, $dbi;
    cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    echo "<body bgcolor=000000 leftmargin=\"40\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\">";
    if ($banners == 1) {
        include("banners.php");
    }
    $topics_list = "<select name=\"new_topic\" onChange='submit()'>\n";
    $topics_list .= "<option value=\"\">All Topics</option>\n";
    $toplist = sql_query("select topicid, topictext from ".$prefix."_topics order by topictext", $dbi);
    while(list($topicid, $topics) = sql_fetch_row($toplist, $dbi)) {
    if ($topicid==$topic) { $sel = "selected "; }
        $topics_list .= "<option $sel value=\"$topicid\">$topics</option>\n";
        $sel = "";
    }
    if ($username == "Anonymous") {
        $theuser = "  <a href=\"modules.php?name=Your_Account&op=new_user\">Create an account";
    } else {
        $theuser = "  Welcome $username!";
    }
    $tmpl_file = "themes/Clan/header.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
    blocks(left);
    $tmpl_file = "themes/Clan/left_center.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

but as i said im new to php if it was a cell on html no problem

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.