$ThemeSel = get_theme(); - Defining It For Block Titles

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   $ThemeSel = get_theme(); - Defining It For Block Titles
Pheonix
CZ Newbie
Pheonix has been a member for over 20 year's 20 Year Member
Gender: Male
Status: Offline
Joined: Apr 13, 2004
0.00 posts per day
Posts: 24
Points: 1,643
   
Hey,

Im having problems defining: $ThemeSel = get_theme(); as i do not know where to put it. I have done it for other image ThemeSel roots BUT i want to know where to add it so that if in a custom block name i make it:

<img src="themes/$ThemeSel/modules/Menu.jpg"> it will show the image from the current theme's folder in my block title slot. If i do it without the $ThemeSel it works just fine however since i have multiple themes i want it to change with each specific theme icon_smile.gif just point me to the right file to add: $ThemeSel = get_theme(); (Note: this is not for specific block files but the actual titles for each block via the nuke blockadmin panel)

Also i want to do the same thing but for the main message on the front page of my site, but i dont know where to define: $ThemeSel = get_theme();

go to [ Register or login to view links on this board. ] and where it says Welcome To LotM is where i want it to be theme specific. (this is the same message section as when it asks you to create a superuser on fresh install) any help would be appreciated as once again i dont know the file to edit icon_smile.gif

Thx in advance!



Back to top Reply with quote
#2   re: $ThemeSel = get_theme(); - Defining It For Block Titles
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
function message_box() in the mainfile.php for the main message block.

Not sure where your trying to use the themesel but if your using it for the themes then you need to make the themes/YOUR_THEME/blocks.html into a php file. THen use the the themesel.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: $ThemeSel = get_theme(); - Defining It For Block Titles
Pheonix
CZ Newbie
Pheonix has been a member for over 20 year's 20 Year Member
Gender: Male
Status: Offline
Joined: Apr 13, 2004
0.00 posts per day
Posts: 24
Points: 1,643
   
ok heres my block.html file:


<table width=160 border=0 cellspacing=0 cellpadding=0>
  <tr>
    <td><table width=160 border=0 cellspacing=0 cellpadding=0>
  <tr>
    <td><table width=100% border=0 cellspacing=0 cellpadding=0>
        <tr>
          <td bgcolor=><table width=100% border=0 cellspacing=0 cellpadding=0>
              <tr>
                      <TD height=35>
<table width=100% border=0 cellspacing=0 cellpadding=0>
                    <tr>
                            <td height=35 valign=middle>
                              <center>
                                <font color=#CCCCCC><b>$title</b></font>
</center></td>
                    </tr>
                  </table></td>
              </tr>
              <tr>
                <td><table width=100% border=0 cellspacing=6 cellpadding=0>
                    <tr>
                      <td><font class=content>$content</font></td>

                    </tr>
                  </table></td>

              </tr>
              <tr>
                <td height=16> ;;</td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
</td>
  </tr>
</table>


and this is my code in my theme.php file that relates to the block.html


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


im thinking i want to get rid of the strip slashes and stuff but dunno for sure. so how do i make the block.html a php file (other than adding:
<?php

?>
and rename it to .php)

and where can i define now the ThemeSel statement?

or can i skip past all this? cause really the thing im editing is $title and cant see where it is defined anywhere in my theme so i dunno where to add the ThemeSel line


Back to top Reply with quote
#4   re: $ThemeSel = get_theme(); - Defining It For Block Titles
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   

<table width=160 border=0 cellspacing=0 cellpadding=0>
  <tr>
    <td><table width=160 border=0 cellspacing=0 cellpadding=0>
  <tr>
    <td><table width=100% border=0 cellspacing=0 cellpadding=0>
        <tr>
          <td bgcolor=><table width=100% border=0 cellspacing=0 cellpadding=0>
              <tr>
                      <TD height=35>
<table width=100% border=0 cellspacing=0 cellpadding=0>
                    <tr>
                            <td height=35 valign=middle>
<?php
//Begin title switch by Telli
        if (!empty($title)) {


                        $img_name=explode(" ",$title);
                        $img_namecz=$img_name[0];
                        if(file_exists("themes/Blue/images/modules/$img_namecz.gif")) {
                                echo "<center><IMG SRC=\"themes/Blue/images/modules/$img_namecz.gif\"></center>";
                        } else {
                                echo "<center><font color=\"#CCCCCC\"><b>$title</b></font></center>";
                        }
        }
?>
</td>
                    </tr>
                  </table></td>
              </tr>
              <tr>
                <td><table width=100% border=0 cellspacing=6 cellpadding=0>
                    <tr>
                      <td><font class=content>
<?php
echo "$content\n"
?></font></td>

                    </tr>
                  </table></td>

              </tr>
              <tr>
                <td height=16> </td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
</td>
  </tr>
</table>


Name it blocks.php put it in your theme folder. Change your function themessidebox to this:

function themesidebox($title, $content) {
//Begin title switch by Telli
        include("themes/Blue/blocks.php");
}


When you make the images name them the same thing as the block title and they will appear instead of the text.



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   re: $ThemeSel = get_theme(); - Defining It For Block Titles
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
For the message box you will need to change in a few spots in the function messagebox() find all the place where it says

echo "<center><font class=\"option\"><b>$title</b></font></center><br><br>";


And replace it with this:

$ThemeSel = get_theme();
    if (file_exists("themes/$ThemeSel/images/modules/blah.gif")) {
   echo "<center><img src=\"themes/$ThemeSel/images/modules/blah.gif\" border=\"0\" alt=\"\"><br><br>";
    } else {
      echo "<center><font class=\"option\"><b>$title</b></font></center><br><br>";
    }


Of course replacing the blah.gif with the name of your image.

If you using it for more then one message box you might want to use the technique above also. You can also add these changes for the center blocks thats defined in the mainfile.php the function themecenterbox



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#6   re: $ThemeSel = get_theme(); - Defining It For Block Titles
Pheonix
CZ Newbie
Pheonix has been a member for over 20 year's 20 Year Member
Gender: Male
Status: Offline
Joined: Apr 13, 2004
0.00 posts per day
Posts: 24
Points: 1,643
   
[ Register or login to view links on this board. ] you know this cant be good icon_smile.gif hehe whats rong man? it seems the blocks.php file doesnt load properly



Back to top Reply with quote
#7   re: $ThemeSel = get_theme(); - Defining It For Block Titles
Pheonix
CZ Newbie
Pheonix has been a member for over 20 year's 20 Year Member
Gender: Male
Status: Offline
Joined: Apr 13, 2004
0.00 posts per day
Posts: 24
Points: 1,643
   
maybe we missed something heres the entire theme.php:


<?php

/************************************************************************/
/* PHP-NUKE: Blue theme for nuke 6.5 & up                            */
/* ============================================                         */
/* Copyright (c) 2003 by Mtechnik                                       */
/* http://mtechnik.net                                                  */
/* Made for PHP-NUKE 6.5: Advanced Content Management System            */
/* ============================================                         */
/* Copyright (c) 2003 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/************************************************************************/
// Blue Public Release theme
// Original Author of file: Mtechnik - http://mtechnik.net
// Purpose of file: Public Release phpnuke 6.5 Theme
// Developed at the1theme.com
// Copyright © 2003 by Mtechnik All Rights Reserved
// ----------------------------------------------------------------------
// THEME MODIFICATION
// Users may alter or modify this theme at their own risk,
// but only for their own use. They may also hire Mtechnik to modify their own copy of the theme.
// Although users may modify the code for their use,
// modified code may not be resold or distributed,
// without express written permission from Mtechnik.
//
// DISPLAY OF COPYRIGHT NOTICES REQUIRED
// All copyright notices used within the scripts that the scripts generate,
// MUST remain intact. Furthermore, these notices must remain visible.
//
// SUPPORT
// Mtechnik provide free support, BUT not mod on the theme,
// (includes consulting, troubleshooting and fixing problems).
//
// Mtechnik is not liable for any products or services offered by means of the theme.
// The user must assume the entire risk of using the program.
//
// Mtechnik
// For commercial themes, exclusive themes, visit my theme shop [ Register or login to view links on this board. ]
// For more free themes, visit my community at mtechnik.net
// [ Register or login to view links on this board. ]
// [ Register or login to view links on this board. ]
// ----------------------------------------------------------------------

/************************************************************/
/* Theme Colors Definition                                  */
/************************************************************/

$bgcolor1 = "#242424";
$bgcolor2 = "#242424";
$bgcolor3 = "#292929";
$bgcolor4 = "#242424";
$textcolor1 = "#CCCCCC";
$textcolor2 = "#CCCCCC";

/************************************************************/
/* OpenTable Functions                                      */
/************************************************************/

function OpenTable() {
    global $tableStatus;
if ($tableStatus != "open"){
    echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">
                        <tr>
                                <td width=\"9\"><img src=\"themes/Blue/images/tabletl.gif\" width=\"9\" height=\"29\" border=\"0\"></td>
                                <td width=\"100%\">
                                        <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">
                                                <tr>
                                                        <td width=\"6\"><img src=\"themes/Blue/images/tab2.gif\" width=\"100\" height=\"29\" border=\"0\"></td>
                                                        <td background=\"themes/Blue/images/tabletopbg.gif\"><img src=\"themes/Blue/images/tab1.gif\" width=\"100\" height=\"29\" border=\"0\"></td>
                                                        <td width=\"9\"><img src=\"themes/Blue/images/tabletr2.gif\" width=\"100\" height=\"29\" border=\"0\"></td>
                                                </tr>
                                        </table>
                                </td>
                                <td width=\"9\"><img src=\"themes/Blue/images/tabletr.gif\" width=\"9\" height=\"29\" border=\"0\"></td>
                        </tr>
                        <tr>
                                <td colspan=\"3\">
                                        <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">
                                                <tr>
                                                        <td background=\"themes/Blue/images/leftside.gif\" width=\"15\"><img src=\"themes/Blue/images/leftside.gif\" width=\"15\" height=\"4\" border=\"0\"></td>
                                                        <td bgcolor=\"#242424\" width=\"100%\">\n";
$tableStatus = "open";
}
else {}
}

function OpenTable2() {
    global $tableStatus;
    echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">
                        <tr>
                                <td width=\"9\"><img src=\"themes/Blue/images/tabletl.gif\" width=\"9\" height=\"29\" border=\"0\"></td>
                                <td width=\"100%\">
                                        <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">
                                                <tr>
                                                        <td width=\"6\"><img src=\"themes/Blue/images/tab2.gif\" width=\"100\" height=\"29\" border=\"0\"></td>
                                                        <td background=\"themes/Blue/images/tabletopbg.gif\"><img src=\"themes/Blue/images/tab1.gif\" width=\"100\" height=\"29\" border=\"0\"></td>
                                                        <td width=\"9\"><img src=\"themes/Blue/images/tabletr2.gif\" width=\"100\" height=\"29\" border=\"0\"></td>
                                                </tr>
                                        </table>
                                </td>
                                <td width=\"9\"><img src=\"themes/Blue/images/tabletr.gif\" width=\"9\" height=\"29\" border=\"0\"></td>
                        </tr>
                        <tr>
                                <td colspan=\"3\">
                                        <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">
                                                <tr>
                                                        <td background=\"themes/Blue/images/leftside.gif\" width=\"15\"><img src=\"themes/Blue/images/leftside.gif\" width=\"15\" height=\"4\" border=\"0\"></td>
                                                        <td bgcolor=\"#242424\" width=\"100%\">\n";
}

function CloseTable() {
    global $tableStatus;
if ($tableStatus == "open"){
    echo "</td>
                                                        <td width=\"15\" background=\"themes/Blue/images/rightside.gif\"><img src=\"themes/Blue/images/rightside.gif\" width=\"15\" height=\"4\" border=\"0\"></td>
                                                </tr>
                                        </table>
                                </td>
<!--                                <td width=\"15\" background=\"themes/Blue/images/rightside.gif\"><img src=\"themes/Blue/images/rightside.gif\" width=\"15\" height=\"4\" border=\"0\"></td>
-->                        </tr>
                        <tr height=\"45\">
                                <td width=\"9\" height=\"27\"><img src=\"themes/Blue/images/tablebotl.gif\" width=\"9\" height=\"27\" border=\"0\"></td>
                                <td width=\"100%\" height=\"27\">
                                        <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">
                                                <tr>
                                                        <td width=\"9\"><img src=\"themes/Blue/images/tablebotl2.gif\" width=\"9\" height=\"27\" border=\"0\"></td>
                                                        <td background=\"themes/Blue/images/tablebotbg.gif\" width=\"100%\"></td>
                                                        <td width=\"9\"><img src=\"themes/Blue/images/tablebotr2.gif\" width=\"9\" height=\"27\" border=\"0\"></td>
                                                </tr>
                                        </table>
                                </td>
                                <td width=\"9\" height=\"27\"><img src=\"themes/Blue/images/tablebotr.gif\" width=\"9\" height=\"27\" border=\"0\"></td>
                        </tr>
                </table>\n";
$tableStatus = "closed";
}
else {}
}

function CloseTable2() {
    echo "</td>
                                                        <td width=\"15\" background=\"themes/Blue/images/rightside.gif\"><img src=\"themes/Blue/images/rightside.gif\" width=\"15\" height=\"4\" border=\"0\"></td>
                                                </tr>
                                        </table>
                                </td>
<!--                                <td width=\"15\" background=\"themes/Blue/images/rightside.gif\"><img src=\"themes/Blue/images/rightside.gif\" width=\"15\" height=\"4\" border=\"0\"></td>
-->                        </tr>
                        <tr height=\"45\">
                                <td width=\"9\" height=\"27\"><img src=\"themes/Blue/images/tablebotl.gif\" width=\"9\" height=\"27\" border=\"0\"></td>
                                <td width=\"100%\" height=\"27\">
                                        <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">
                                                <tr>
                                                        <td width=\"9\"><img src=\"themes/Blue/images/tablebotl2.gif\" width=\"9\" height=\"27\" border=\"0\"></td>
                                                        <td background=\"themes/Blue/images/tablebotbg.gif\" width=\"100%\"></td>
                                                        <td width=\"9\"><img src=\"themes/Blue/images/tablebotr2.gif\" width=\"9\" height=\"27\" border=\"0\"></td>
                                                </tr>
                                        </table>
                                </td>
                                <td width=\"9\" height=\"27\"><img src=\"themes/Blue/images/tablebotr.gif\" width=\"9\" height=\"27\" border=\"0\"></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;username=$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() {
    global $user, $sitename, $cookie, $prefix, $sitekey, $dbi;
    mt_srand ((double)microtime()*1000000);
    $maxran = 1000000;
    $random_num = mt_rand(0, $maxran);
    $datekey = date("F j");
    $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
    $code = substr($rcode, 2, 6);
   
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    $public_msg = public_message();
    echo "$public_msg";
   
    if ($username == "Anonymous") {
        $theuser = "<form action=\"modules.php?name=Your_Account\" method=\"post\"><input type=\"text\" name=\"username\" value style=\"width:100;height:19;FONT-SIZE: 10px;\"><font size=\"1\" face=\"arial\">&nbsp;<b>User</b>&nbsp;<input type=\"password\" name=\"user_password\" value style=\"width:100;height:19;FONT-SIZE: 10px;\">&nbsp;<b>Pass</b></TD><TD COLSPAN=2 align=left background=\"themes/Blue/images/header/theme-hd_u2.gif\" WIDTH=92 HEIGHT=32><input type=\"hidden\" name=\"random_num\" value=\"$random_num\"><input type=\"hidden\" name=\"gfx_check\" value=\"$code\"><input type=\"hidden\" name=\"op\" value=\"login\"><input type=\"image\" value=\"login\" src=\"themes/Blue/images/header/go.gif\" border=\"0\"></TD></form></font>\n";
       
   
    } else {
        $theuser = "&nbsp;</TD><TD COLSPAN=2 align=left background=\"themes/Blue/images/header/theme-hd_u2.gif\" WIDTH=92 HEIGHT=32>&nbsp;</TD>\n";
    }
    if ($username == "Anonymous") {
        $User1 = "&nbsp;Guest&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"modules.php?name=Your_Account&op=new_user\">Register</a>\n";
   
    } else {
        $User1 = "&nbsp;$username&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"modules.php?name=Your_Account&op=logout\">Logout</a>\n";
    }
   echo "<body topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">";
    include("themes/Blue/header.php");
   

//LEFT SIDE BACKGROUND
    echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">\n"
      ."<tr valign=\"top\">\n"
        ."<td width=\"25\" valign=\"top\" background=\"themes/Blue/images/lt.gif\"><img src=\"themes/Blue/images/lt.gif\" width=\"25\" height=\"1\" border=\"0\"></td>\n"
      ."<td width=\"160\" background=\"themes/Blue/images/ltbg.gif\" valign=\"top\">\n";
    blocks(left);
    echo "</td>\n"
       ."<td><img src=\"themes/Blue/images/pixel.gif\" width=\"0\" height=\"1\" border=\"0\" alt=\"\"></td>\n"
       ."<td width=\"100%\">\n";
}


/************************************************************/
/* Function themefooter()                                   */
/************************************************************/

function themefooter() {
    global $index, $user, $banners, $cookie, $prefix, $dbi, $db, $foot1, $foot2, $foot3, $foot4, $admin,  $adminmail, $nukeurl, $total_time, $start_time;
$mtime = microtime();
    $mtime = explode(" ",$mtime);
    $mtime = $mtime[1] + $mtime[0];
    $end_time = $mtime;
    $total_time = ($end_time - $start_time);
    $total_time = "".substr($total_time,0,5)." "._SECONDS."";
    if ($banners == 1) {
    $numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner WHERE type='0' AND active='1'"));
   /* Get a random banner if exist any. */
   /* More efficient random stuff, thanks to Cristian Arroyo from http://www.planetalinux.com.ar */

    if ($numrows>1) {
   $numrows = $numrows-1;
   mt_srand((double)microtime()*1000000);
   $bannum = mt_rand(0, $numrows);
    } else {
   $bannum = 0;
    }
    $sql = "SELECT bid, imageurl, clickurl, alttext FROM ".$prefix."_banner WHERE type='0' AND active='1' LIMIT $bannum,1";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $bid = $row[bid];
    $imageurl = $row[imageurl];
    $clickurl = $row[clickurl];
    $alttext = $row[alttext];
   
    if (!is_admin($admin)) {
       $db->sql_query("UPDATE ".$prefix."_banner SET impmade=impmade+1 WHERE bid='$bid'");
    }
    if($numrows>0) {
   $sql2 = "SELECT cid, imptotal, impmade, clicks, date FROM ".$prefix."_banner WHERE bid='$bid'";
   $result2 = $db->sql_query($sql2);
   $row2 = $db->sql_fetchrow($result2);
   $cid = $row2[cid];
   $imptotal = $row2[imptotal];
   $impmade = $row2[impmade];
   $clicks = $row2[clicks];
   $date = $row2[date];

/* Check if this impression is the last one and print the banner */

   if (($imptotal <= $impmade) AND ($imptotal != 0)) {
       $db->sql_query("UPDATE ".$prefix."_banner SET active='0' WHERE bid='$bid'");
       $sql3 = "SELECT name, contact, email FROM ".$prefix."_bannerclient WHERE cid='$cid'";
       $result3 = $db->sql_query($sql3);
       $row3 = $db->sql_fetchrow($result3);
       $c_name = $row3[name];
       $c_contact = $row3[contact];
       $c_email = $row3[email];
       if ($c_email != "") {
      $from = "$sitename <$adminmail>";
      $to = "$c_contact <$c_email>";
      $message = ""._HELLO." $c_contact:\n\n";
      $message .= ""._THISISAUTOMATED."\n\n";
      $message .= ""._THERESULTS."\n\n";
      $message .= ""._TOTALIMPRESSIONS." $imptotal\n";
      $message .= ""._CLICKSRECEIVED." $clicks\n";
      $message .= ""._IMAGEURL." $imageurl\n";
      $message .= ""._CLICKURL." $clickurl\n";
      $message .= ""._ALTERNATETEXT." $alttext\n\n";
      $message .= ""._HOPEYOULIKED."\n\n";
      $message .= ""._THANKSUPPORT."\n\n";
      $message .= "- $sitename "._TEAM."\n";
      $message .= "$nukeurl";
      $subject = "$sitename: "._BANNERSFINNISHED."";
      mail($to, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());
       }
   }
    $showbanners = "<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" alt='$alttext' title='$alttext'></a>";
    }
}
    $footer_message = "$foot1<br>$foot2<br>$foot3<br>$foot4";
   
if ($index == 1) {
   echo "</td>\n"
       ."<td><img src=\"themes/Blue/images/pixel.gif\" width=\"0\" height=\"0\" border=\"0\" alt=\"\"></td>\n"
       ."<td valign=\"top\" background=\"themes/Blue/images/rtbg.gif\" width=\"160\">\n";
   blocks(right);
    }
    echo "</td>\n"
        ."<td width=\"25\" valign=\"top\" background=\"themes/Blue/images/rt.gif\"><img src=\"themes/Blue/images/rt.gif\" width=\"25\" height=\"0\" border=\"0\"></td>\n"
       ."</tr>\n"
       ."</table>\n\n\n";
   
   
    include("themes/Blue/footer.php");
   
}

/************************************************************/
/* 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;

$ThemeSel = get_theme();
    if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
   $t_image = "themes/$ThemeSel/images/topics/$topicimage";
    } else {
   $t_image = "$tipath$topicimage";
}
    if ($notes != "") {
        $notes = "<br><br><b>"._NOTE."</b> $notes\n";
    } else {
        $notes = "";
    }
    if ("$aid" == "$informant") {
        $content = "$thetext$notes\n";
    } else {
        if($informant != "") {
            $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
        } else {
            $content = "$anonymous ";
        }
        $content .= ""._WRITES." \"$thetext\"$notes\n";
    }
    //Code Changed - just show posted by
    $posted = ""._POSTEDBY." ";
    $posted .= get_author($aid);
    $posted .= " "._ON." $time  ";
    //End Code Change
    $datetime = substr($morelink, 0, strpos($morelink, "|") - strlen($morelink));
    $morelink = substr($morelink, strlen($datetime) + 2);
    $tmpl_file = "themes/Blue/story_home.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

/************************************************************/
/* Function themeindex()                                    */
/************************************************************/

function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
    global $admin, $sid, $tipath;
$ThemeSel = get_theme();
    if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
   $t_image = "themes/$ThemeSel/images/topics/$topicimage";
    } else {
   $t_image = "$tipath$topicimage";
}
    $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&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
        } else {
            $content = "$anonymous ";
        }
        $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
    }
    $tmpl_file = "themes/Blue/story_page.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

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

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

?>



Back to top Reply with quote
#8   re: $ThemeSel = get_theme(); - Defining It For Block Titles
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
I edited the original code above retest it now.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#9   re: $ThemeSel = get_theme(); - Defining It For Block Titles
Pheonix
CZ Newbie
Pheonix has been a member for over 20 year's 20 Year Member
Gender: Male
Status: Offline
Joined: Apr 13, 2004
0.00 posts per day
Posts: 24
Points: 1,643
   
not working... looks like by just using it as an include the file and not imploding it that its not taking the html and php out? like i have no <?php or ?> tags at the start end of the document nor echo"'ed anything but should i? if you need anonymous ftp access to my test site im more than willing to give you access. thanks in advance



Back to top Reply with quote
#10   re: $ThemeSel = get_theme(); - Defining It For Block Titles
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Ok it will work now.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum