09 Theme System Mod

Started by Mindless, July 21, 2012, 10:46:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Morpheus

Quote from: tedx on March 14, 2016, 07:55:29 PM
Quote from: DaRKLoRD on March 12, 2016, 09:33:27 PM

Quote from: tedx on March 12, 2016, 03:05:22 PM
Ok done test and no its not a working mod at all just test it for a mate and its not working its not hard to add this code but its fucked up big time (no good for 09 at all)

NOT to pis on your shoes m8... This mod is and through out the whole V1 to V4 setup.... Please go back over what you have done and look for errors. You can not sort them out post them here !! ! !

You do know that a 09 as no error log working with as it not print it lol to get this to work you have to add a few likes to bittorrant for it to show any errors you may have .... also chap i know how to code a site up been at it over 15 years now mate so please do not tell me what i need to do and where if i need help ill ask for it... and this themes  System not working at all .. till you add the lines that are not there  like ive done for this to work

and off to a roaring good start, lol. Darklord try to help out and you throw eggs... maybe he missed your introduction post saying how long you have been coding, then he could have thought that you were just pointing something out, but wait a minute you never made such a post.

The guy that posted the mod can code too, and he's known, but unless you have used a different name in the past, your not!
"Simplicity is the ultimate sophistication." ~ Leonardo da Vinci

DragonCoder

#11
Quote from: Daniel on July 21, 2012, 04:34:02 PM
The code it self works fine  but staff panel ?.

unless im very blind but in U-232 source code there is that Tool under staffpanel but in this one i can't seem to find out how to add it unless im just blind on how to add the code to staff panel in order to add templates

i managed to get it working  ,  but require some code on that theme i chosed as i dont have login on return thingy

finally got it working but now its closed for public browsing dont know how to fix that  :-o)


<?php

/*
**Template Mod By AronTh for TBDEV.NET source code 2009, theme made by AronTh
**Special Thanks to CoLdFuSiOn for providing the source code and KiD for the motivation to me(AronTh) to make themes for TbDev.net
*/

function stdhead$title ""$js=''$css='' ) {
    global 
$CURUSER$TBDEV$lang$msgalert;

    if (!
$TBDEV['site_online'])
      die(
"Site is down for maintenance, please check back again later... thanks<br />");

    
//header("Content-Type: text/html; charset=iso-8859-1");
    //header("Pragma: No-cache");
    
if ($title == "")
        
$title $TBDEV['site_name'] .(isset($_GET['tbv'])?" (".TBVERSION.")":'');
    else
    
//    $title = $TBDEV['site_name'].(isset($_GET['tbv'])?" (".TBVERSION.")":''). " :: " . htmlsafechars($title);

  /* Deprecate this.
    if ($TBDEV['msg_alert'] && $msgalert && $CURUSER)
    {
      $res = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " && unread='yes'") or sqlerr(__FILE__,__LINE__);
      $arr = mysql_fetch_row($res);
      $unread = $arr[0];
    }
  */


 
    
if ($CURUSER)
    {
      
$res1 = @mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" $CURUSER["id"] . " AND unread='yes'") or sqlerr(__LINE__,__FILE__);
      
$arr1 mysql_fetch_row($res1);

      
$unread = ($arr1[0] > "<span class='msgalert'><small>{$arr1[0]}</small></span>" $arr1[0]);
      
$msgalert $arr1[0];
      
$inbox = ($unread == "$unread"$unread");
    }
else
    {
     
    }

   
$FILE = isset($CURUSER) ? $CURUSER['stylesheet'] : $TBDEV['stylesheet'] ;



   
   
   

   
   
$htmlout "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">

<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
          
<meta name='generator' content='TBDev.net' />
<meta http-equiv='Content-Language' content='en-us' />
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />



          <title>
{$title}</title>
          <link rel='stylesheet' type='text/css' href='
{$TBDEV['baseurl']}/templates/$FILE/{$FILE}.css' />
  <link rel='stylesheet' type='text/css' href='poll.core.css' />
          
{$js}\n
      <script type='text/javascript' src='js/ajax.class.js'></script> <script type='text/javascript' src='js/ajax.objects.js'></script> <script type='text/javascript' src='js/ajax.pushes.js'></script> <script type='text/javascript' src='js/ajax.returns.js'></script>

  
  
  </head>


    <body>
    
    
 <div class='statusbar'><div class='statusbar2'>
 <div class='logo_maz'>

 </div>
 
 
 "
;
 
 

global 
$CURUSER$TBDEV$lang$msgalert;

if (!$CURUSER)
return "





<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">

<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
          
<meta name='generator' content='TBDev.net' />
<meta http-equiv='Content-Language' content='en-us' />
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />



          <title>
{$title}</title>
          <link rel='stylesheet' type='text/css' href='
{$TBDEV['baseurl']}/templates/$FILE/{$FILE}.css' />
  <link rel='stylesheet' type='text/css' href='poll.core.css' />
          
{$js}\n
      <script type='text/javascript' src='js/ajax.class.js'></script> <script type='text/javascript' src='js/ajax.objects.js'></script> <script type='text/javascript' src='js/ajax.pushes.js'></script> <script type='text/javascript' src='js/ajax.returns.js'></script>

  <script type='text/javascript' src='js/bg.js'></script>
  
  </head>


    <body>



 <div class='statusbar'><div class='statusbar2'>
 <div class='logo_maz'>
 
 </div>


<div class='nort'>
 
 </div>
 
 <div class='b2'>
             <div class='rlink'>
                           
                            </div></div></div></div>
                  <div class='pframe'> 
                  
                  
 
              
                   <div class='profile'>
                        <div class='sign_in'>
                            <div style='padding:8px 0 0 5px;'>
                            <img src='
{$TBDEV['baseurl']}/templates/1/images/key.png' alt='{$lang['gl_login']}' />&nbsp;<a style='color:#fff;' href='login.php'>Sign In »</a>
                            </div>
                        </div>
                   <ul>
                          <li>New user?&nbsp;</li>
                          <li><a class='bold' href='signup.php'>Register Now!</a></li>   
                          
                       </ul>
                    </div>
            </div>
            
                </div> </div>
             <div class='logo'></div>
             <img src='
{$TBDEV['pic_base_url']}logo.jpg' alt='' />

<!-- Begin Wrapper -->
    <div id='wrapper'>

        <!-- Begin Header -->
        <div id='header'>
            
            
 <!-- Begin Navigation -->
                <div id='navigation'>
                    <div id='nav'>
                        <ul>  <li><a href='login.php'><span>
{$lang['gl_login']}</span></a></li>
                           <li><a href='signup.php'><span>
{$lang['gl_signup']}</span></a></li>
                           <li><a href='recover.php'><span>
{$lang['gl_recover']}</span></a></li> 
   
                        </ul>
                    </div>
                </div>
                <!-- End Navigation -->
            
            
            
            
            </div>
        <!-- End Header -->

        <div class='clear'></div>

        <!-- Start Container -->
        <div id='container'>

            <!-- Start Maincolumn -->
            <div id='maincolumn'>



"
;


$upped mksize($CURUSER['uploaded']);

$downed mksize($CURUSER['downloaded']);

$ratio $CURUSER['downloaded'] > $CURUSER['uploaded']/$CURUSER['downloaded'] : 0;

$ratio number_format($ratio2);

$IsDonor '';
if ($CURUSER['donor'] == "yes")

$IsDonor "<img src='pic/star.gif' alt='donor' title='donor' />";


$warn '';
if ($CURUSER['warned'] == "yes")

$warn "<img src='pic/warned.gif' alt='warned' title='warned' />";

$res2 = @mysql_query("SELECT seeder, COUNT(*) AS pCount FROM peers WHERE userid=".$CURUSER['id']." GROUP BY seeder") or sqlerr(__LINE__,__FILE__);

$seedleech = array('yes' => '0''no' => '0');

while( $row mysql_fetch_assoc($res2) ) {
if($row['seeder'] == 'yes')
$seedleech['yes'] = $row['pCount'];
else
$seedleech['no'] = $row['pCount'];

}

/////////////// REP SYSTEM /////////////
//$CURUSER['reputation'] = 49;

$member_reputation get_reputation($CURUSER1);
////////////// REP SYSTEM END //////////

$member_reputation get_reputation($CURUSER1);

   
 
 
 
  
$htmlout .= "
 
 
 
 <div class='nort'>
 &nbsp;<img   src='templates/1/images/mail.png' />&nbsp;<a href='messages.php'>
$inbox</a> &nbsp;
 
 <img alt='
{$lang['gl_seed_torrents']}' title='{$lang['gl_seed_torrents']}' src='templates/1/images/up.png' />&nbsp;{$seedleech['yes']}
                &nbsp;&nbsp;<img alt='
{$lang['gl_leech_torrents']}' title='{$lang['gl_leech_torrents']}' src='templates/1/images/down.png' />&nbsp;{$seedleech['no']}
 </div>
 
 <div class='b2'>"
;
    
$htmlout .= StatusBar();
    
$htmlout .= "
            
            <div class='sbox'>

    <form action='#' id='sbox'>

 
        <input type='text' id='search' name='search' placeholder='Search for Torrents '   size='40' />
        <button type='submit' class='search_btn'>&nbsp;&nbsp;&nbsp;Go&nbsp;&nbsp;&nbsp;</button>

 
</form>
            
                  </div>
  
  
  
  
  
  
  
  
  
      
            <div class='rlink'>
            
        

                            
                                <a  href='my.php'>
{$lang['gl_profile']}</a>&nbsp;&nbsp;&nbsp;
                                <a  href='rules.php'>
{$lang['gl_rules']}</a> &nbsp;&nbsp;&nbsp;
                                <a  href='logout.php'>
{$lang['gl_logout']}</a>
                            </div></div></div></div>"
;
            
       

       
       
       
       
       if (
$CURUSER)
    {
      
$htmlout .= "
                  <div class='pframe'> 
                  
                  
                  
                
                  
                  
                  
                  
                  <div class='profile'>
                        <div class='status_avatar'>"
;

    if (!empty(
$CURUSER['avatar']))
    {
      
$avatar "<a href='userdetails.php?id={$CURUSER['id']}'><img src='{$CURUSER['avatar']}' width='50' height='50' alt='' /></a><div class='username'>
                                <p><a href='userdetails.php?id=
{$CURUSER['id']}'>{$CURUSER['username']}</a></p> 
                            </div>"
;
    }
    else
    {
      
$avatar "<a href='userdetails.php?id={$CURUSER['id']}'><img src='{$TBDEV['baseurl']}/templates/1/images/default_thumb.png' alt='' /></a><div class='username'>
                                <p><a href='userdetails.php?id=
{$CURUSER['id']}'>{$CURUSER['username']}</a></p> 
                            </div>"
;
    }

    
$htmlout .= $avatar;

    
$htmlout .= "
                        </div>
                           
                           
                        
                        
                        
                  
                        
                              <div class='nik'>
                
$IsDonor$warn&nbsp;
                
$member_reputation
                
                <br>
                 
{$lang['gl_ratio']}:&nbsp;$ratio 
                
                 <br>
                    
                
{$lang['gl_uploaded']}:&nbsp;$upped
       
                 
                 <br>
                    
             
{$lang['gl_downloaded']}:&nbsp;$downed
                </div>  
                    
                        
                        
                        
                        
                        
                           
                    </div>
                    
                    
                    
                    
                    
                    
                          
              
                    
                    
                    
                    
                    
                    "
;
    }
    else
    {
      
$htmlout .= "
                   <div class='profile'>
                        <div class='sign_in'>
                            <div style='padding:8px 0 0 5px;'>
                            <img src='
{$TBDEV['baseurl']}/templates/1/images/key.png' alt='{$lang['gl_login']}' />&nbsp;<a style='color:#fff;' href='login.php'>Sign In »</a>
                            </div>
                        </div>
                   <ul>
                          <li>New user?&nbsp;</li>
                          <li><a class='bold' href='signup.php'>Register Now!</a></li>
                       </ul>
                    </div>"
;
    }   
            
              
$htmlout .= "
            </div>
             <div class='logo'></div>
            
            
    <!-- Begin Wrapper -->
    <div id='wrapper'>

        <!-- Begin Header -->
        <div id='header'> 
           
         
               "
;

    

    
$htmlout .= "
                
                <!-- Begin Navigation -->
                <div id='navigation'>
                    <div id='nav'>
                        <ul>"
;

    if (
$CURUSER)
    {
      
$htmlout .= "
                           <li><a href='index.php'><span>
{$lang['gl_home']}</span></a></li>
                           <li><a href='browse.php'><span>
{$lang['gl_browse']}</span></a></li>
                           <li><a href='upload.php'><span>
{$lang['gl_upload']}</span></a></li>
                           <li><a href='chat.php'><span>
{$lang['gl_chat']}</span></a></li>
                           <li><a href='forums.php'><span>
{$lang['gl_forums']}</span></a></li>
                           <li><a href='topten.php'><span>
{$lang['gl_top_10']}</span></a></li>
                           <li><a href='links.php'><span>
{$lang['gl_links']}</span></a></li>
                           <li><a href='faq.php'><span>
{$lang['gl_faq']}</span></a></li>
                           <li><a href='staff.php'><span>
{$lang['gl_staff']}</span></a></li>";

      if( 
$CURUSER['class'] >= UC_MODERATOR )
      {
        
$htmlout .= "
                           <li><a href='admin.php'><span>
{$lang['gl_admin']}</span></a></li>";
      }

    }
    else
    {
      
$htmlout .= "
                           <li><a href='login.php'><span>
{$lang['gl_login']}</span></a></li>
                           <li><a href='signup.php'><span>
{$lang['gl_signup']}</span></a></li>
                           <li><a href='recover.php'><span>
{$lang['gl_recover']}</span></a></li>";
    }

    
$htmlout .= "
                       
                       
                       
                       
                       
                       
                       </ul>
                       
                       
                       
                       
                       
  
                    </div>
                </div>
                <!-- End Navigation -->
            
        </div>
        <!-- End Header -->

        <div class='clear'></div>

        <!-- Start Container -->
        <div id='container'>

            <!-- Start Maincolumn -->
            <div id='maincolumn'>"
;

            if ( 
$TBDEV['msg_alert'] && $msgalert )
            {
             
$htmlout .= "
                <div class='alert'>
                    <a href='messages.php'><span>"
.sprintf($lang['gl_msg_alert'], $msgalert) ."&nbsp;". ($msgalert $lang['gl_msg_plural'] : $lang['gl_msg_singular']) . "!</span></a>
                </div>\n"
;
}


    return 
$htmlout;

// stdhead

function stdfoot() {
  global 
$TBDEV;

    
$htmlout '';
    
$htmlout .= "
            </div>
            <!-- End Maincolumn -->
   <div id='fot'><a href='http://www.tbdev.net'><img src='
{$TBDEV['pic_base_url']}tbdev_btn_red.png' align='center' border='0' alt='Powered By TBDev &copy;2010' title='Powered By TBDev &copy;2010' /></a>
</div>

            <div class='clear'></div>
        </div>
        <!-- End Container -->


     

    </div>
    <!-- End Wrapper -->
<br><br>
</body>
</html>"
;

    return 
$htmlout;
}

function 
stdmsg($heading$text)
{
    
$htmlout "<table class='main' width='750' border='0' cellpadding='0' cellspacing='0'>
    <tr><td class='embedded'>\n"
;
    
    if (
$heading)
      
$htmlout .= "<h2>$heading</h2>\n";

    
$htmlout .= "<table width='100%' border='1' cellspacing='0' cellpadding='10'><tr><td class='text'>\n";
    
$htmlout .= "{$text}</td></tr></table></td></tr></table>\n";

    return 
$htmlout;
}

function 
StatusBar() {
global 
$CURUSER$TBDEV$lang$msgalert;
if (!$CURUSER)
return "&nbsp;";

$StatusBar '';

$StatusBar .= "
            
                "
;

return $StatusBar;

}

?>


thats my template.php i have loggedinonreturn removed on index browse search in order to work as public

if you add this to bittorrrant @ the top

error_reporting(E_ALL);

define('SQL_DEBUG', 2);
if (version_compare(PHP_VERSION, "5.1.0RC1", ">="))
date_default_timezone_set('Europe/London');
define('TIME_NOW', time());

if ( strtoupper( substr(PHP_OS, 0, 3) ) == 'WIN' ){
    $file_path = str_replace( "\\", "/", dirname(__FILE__) );
    $file_path = str_replace( "/include", "", $file_path );
    }else{
    $file_path = dirname(__FILE__);
    $file_path = str_replace( "/include", "", $file_path );
  }

define('ROOT_PATH', $file_path);
require_once(ROOT_PATH."/include/config.php");

if (ini_get('default_charset') != $TBDEV['char_set']){
  ini_set('default_charset',$TBDEV['char_set']);
}

define ('UC_USER', 0);
define ('UC_POWER_USER', 1);
define ('UC_VIP', 2);
define ('UC_UPLOADER', 3);
define ('UC_MODERATOR', 4);
define ('UC_ADMINISTRATOR', 5);
define ('UC_SYSOP', 6);
define ('TBVERSION', $TBDEV['version']);


Above

function validip($ip)

And at clean up this

require_once(ROOT_PATH."/cleanup.php");
    docleanup();
}


you will find out it works but i made a install for 09

DragonCoder

#10
Quote from: DaRKLoRD on March 12, 2016, 09:33:27 PM
Quote from: tedx on March 12, 2016, 03:05:22 PM
As any got this to work with looks of it its not lol ok illdo test on it will post back

Ok done test and no its not a working mod at all just test it for a mate and its not working its not hard to add this code but its fucked up big time (no good for 09 at all)

NOT to pis on your shoes m8... This mod is and through out the whole V1 to V4 setup.... Please go back over what you have done and look for errors. You can not sort them out post them here !! ! !

You do know that a 09 as no error log working with as it not print it lol to get this to work you have to add a few likes to bittorrant for it to show any errors you may have .... also chap i know how to code a site up been at it over 15 years now mate so please do not tell me what i need to do and where if i need help ill ask for it... and this themes  System not working at all .. till you add the lines that are not there  like ive done for this to work

DaRKLoRD

Quote from: tedx on March 12, 2016, 03:05:22 PM
As any got this to work with looks of it its not lol ok illdo test on it will post back

Ok done test and no its not a working mod at all just test it for a mate and its not working its not hard to add this code but its fucked up big time (no good for 09 at all)

NOT to pis on your shoes m8... This mod is and through out the whole V1 to V4 setup.... Please go back over what you have done and look for errors. You can not sort them out post them here !! ! !
DaRK SiDER DESiGN TEAM

DragonCoder

#8
As any got this to work with looks of it its not lol ok illdo test on it will post back

Ok done test and no its not a working mod at all just test it for a mate and its not working its not hard to add this code but its fucked up big time (no good for 09 at all)

MelvinMeow

Post the top 10 - 15 lines of your login.php code. I am guessing that the page that includes that function is not being loaded perhaps?

codreanuionut

when i access the site i get:
Fatal error: Call to undefined function stdhead() in C:\xampp\htdocs\tbdev\login.php on line 89

And if i remove the function call from index.php i get a blank page..


i use TBDev.2009(Final).rev.295

Mindless

#5
That's because resetpw.php is a mod posted here, dbconn is essential, dbconn = db connection. You need to have a good understanding of Tbdev code to even think about using mods. I know every mod and what's required for any of them to work seeing i was behind the majority of updated mods for 09 on TBdev. The instruction clearly states recover.php/resetpw.php, so should be clear its either script.

ZajferX

#4
the last part of the instructions to add stuff under dbconn is outdated in the 2009 source .. example : my login.php does not have that string at all .. and i guess if i look into the rest of the requested files the result will be the same .. but i do have session start .. which i guess is the replacement of dbconn .. correct ?

sorry correction .. my login.php does not have the dbconn string in it .. is it vitale ? so i should add it or should i simply add the required code under session-start ?

i am asked to edit resetpw.php but there is no such file in the 2009 zip :0 ...

Mindless

#3
Read the instruction - do as it says exactly; Have no idea what your talking about with code missing ?? See if theres a problem, simply post that error from the apache log that has line number, error, referrer, and I'll deal with that, thats all i need to know and see. And edit your post with that no make another one lol  :P

Daniel

#2
The code it self works fine  but staff panel ?.

unless im very blind but in U-232 source code there is that Tool under staffpanel but in this one i can't seem to find out how to add it unless im just blind on how to add the code to staff panel in order to add templates

i managed to get it working  ,  but require some code on that theme i chosed as i dont have login on return thingy

finally got it working but now its closed for public browsing dont know how to fix that  :-o)


<?php

/*
**Template Mod By AronTh for TBDEV.NET source code 2009, theme made by AronTh
**Special Thanks to CoLdFuSiOn for providing the source code and KiD for the motivation to me(AronTh) to make themes for TbDev.net
*/

function stdhead$title ""$js=''$css='' ) {
    global 
$CURUSER$TBDEV$lang$msgalert;

    if (!
$TBDEV['site_online'])
      die(
"Site is down for maintenance, please check back again later... thanks<br />");

    
//header("Content-Type: text/html; charset=iso-8859-1");
    //header("Pragma: No-cache");
    
if ($title == "")
        
$title $TBDEV['site_name'] .(isset($_GET['tbv'])?" (".TBVERSION.")":'');
    else
    
//    $title = $TBDEV['site_name'].(isset($_GET['tbv'])?" (".TBVERSION.")":''). " :: " . htmlsafechars($title);

  /* Deprecate this.
    if ($TBDEV['msg_alert'] && $msgalert && $CURUSER)
    {
      $res = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " && unread='yes'") or sqlerr(__FILE__,__LINE__);
      $arr = mysql_fetch_row($res);
      $unread = $arr[0];
    }
  */


 
    
if ($CURUSER)
    {
      
$res1 = @mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" $CURUSER["id"] . " AND unread='yes'") or sqlerr(__LINE__,__FILE__);
      
$arr1 mysql_fetch_row($res1);

      
$unread = ($arr1[0] > "<span class='msgalert'><small>{$arr1[0]}</small></span>" $arr1[0]);
      
$msgalert $arr1[0];
      
$inbox = ($unread == "$unread"$unread");
    }
else
    {
     
    }

   
$FILE = isset($CURUSER) ? $CURUSER['stylesheet'] : $TBDEV['stylesheet'] ;



   
   
   

   
   
$htmlout "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">

<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
          
<meta name='generator' content='TBDev.net' />
<meta http-equiv='Content-Language' content='en-us' />
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />



          <title>
{$title}</title>
          <link rel='stylesheet' type='text/css' href='
{$TBDEV['baseurl']}/templates/$FILE/{$FILE}.css' />
  <link rel='stylesheet' type='text/css' href='poll.core.css' />
          
{$js}\n
      <script type='text/javascript' src='js/ajax.class.js'></script> <script type='text/javascript' src='js/ajax.objects.js'></script> <script type='text/javascript' src='js/ajax.pushes.js'></script> <script type='text/javascript' src='js/ajax.returns.js'></script>

  
  
  </head>


    <body>
    
    
 <div class='statusbar'><div class='statusbar2'>
 <div class='logo_maz'>

 </div>
 
 
 "
;
 
 

global 
$CURUSER$TBDEV$lang$msgalert;

if (!$CURUSER)
return "





<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">

<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
          
<meta name='generator' content='TBDev.net' />
<meta http-equiv='Content-Language' content='en-us' />
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />



          <title>
{$title}</title>
          <link rel='stylesheet' type='text/css' href='
{$TBDEV['baseurl']}/templates/$FILE/{$FILE}.css' />
  <link rel='stylesheet' type='text/css' href='poll.core.css' />
          
{$js}\n
      <script type='text/javascript' src='js/ajax.class.js'></script> <script type='text/javascript' src='js/ajax.objects.js'></script> <script type='text/javascript' src='js/ajax.pushes.js'></script> <script type='text/javascript' src='js/ajax.returns.js'></script>

  <script type='text/javascript' src='js/bg.js'></script>
  
  </head>


    <body>



 <div class='statusbar'><div class='statusbar2'>
 <div class='logo_maz'>
 
 </div>


<div class='nort'>
 
 </div>
 
 <div class='b2'>
             <div class='rlink'>
                           
                            </div></div></div></div>
                  <div class='pframe'> 
                  
                  
 
              
                   <div class='profile'>
                        <div class='sign_in'>
                            <div style='padding:8px 0 0 5px;'>
                            <img src='
{$TBDEV['baseurl']}/templates/1/images/key.png' alt='{$lang['gl_login']}' />&nbsp;<a style='color:#fff;' href='login.php'>Sign In »</a>
                            </div>
                        </div>
                   <ul>
                          <li>New user?&nbsp;</li>
                          <li><a class='bold' href='signup.php'>Register Now!</a></li>   
                          
                       </ul>
                    </div>
            </div>
            
                </div> </div>
             <div class='logo'></div>
             <img src='
{$TBDEV['pic_base_url']}logo.jpg' alt='' />

<!-- Begin Wrapper -->
    <div id='wrapper'>

        <!-- Begin Header -->
        <div id='header'>
            
            
 <!-- Begin Navigation -->
                <div id='navigation'>
                    <div id='nav'>
                        <ul>  <li><a href='login.php'><span>
{$lang['gl_login']}</span></a></li>
                           <li><a href='signup.php'><span>
{$lang['gl_signup']}</span></a></li>
                           <li><a href='recover.php'><span>
{$lang['gl_recover']}</span></a></li> 
   
                        </ul>
                    </div>
                </div>
                <!-- End Navigation -->
            
            
            
            
            </div>
        <!-- End Header -->

        <div class='clear'></div>

        <!-- Start Container -->
        <div id='container'>

            <!-- Start Maincolumn -->
            <div id='maincolumn'>



"
;


$upped mksize($CURUSER['uploaded']);

$downed mksize($CURUSER['downloaded']);

$ratio $CURUSER['downloaded'] > $CURUSER['uploaded']/$CURUSER['downloaded'] : 0;

$ratio number_format($ratio2);

$IsDonor '';
if ($CURUSER['donor'] == "yes")

$IsDonor "<img src='pic/star.gif' alt='donor' title='donor' />";


$warn '';
if ($CURUSER['warned'] == "yes")

$warn "<img src='pic/warned.gif' alt='warned' title='warned' />";

$res2 = @mysql_query("SELECT seeder, COUNT(*) AS pCount FROM peers WHERE userid=".$CURUSER['id']." GROUP BY seeder") or sqlerr(__LINE__,__FILE__);

$seedleech = array('yes' => '0''no' => '0');

while( $row mysql_fetch_assoc($res2) ) {
if($row['seeder'] == 'yes')
$seedleech['yes'] = $row['pCount'];
else
$seedleech['no'] = $row['pCount'];

}

/////////////// REP SYSTEM /////////////
//$CURUSER['reputation'] = 49;

$member_reputation get_reputation($CURUSER1);
////////////// REP SYSTEM END //////////

$member_reputation get_reputation($CURUSER1);

   
 
 
 
  
$htmlout .= "
 
 
 
 <div class='nort'>
 &nbsp;<img   src='templates/1/images/mail.png' />&nbsp;<a href='messages.php'>
$inbox</a> &nbsp;
 
 <img alt='
{$lang['gl_seed_torrents']}' title='{$lang['gl_seed_torrents']}' src='templates/1/images/up.png' />&nbsp;{$seedleech['yes']}
                &nbsp;&nbsp;<img alt='
{$lang['gl_leech_torrents']}' title='{$lang['gl_leech_torrents']}' src='templates/1/images/down.png' />&nbsp;{$seedleech['no']}
 </div>
 
 <div class='b2'>"
;
    
$htmlout .= StatusBar();
    
$htmlout .= "
            
            <div class='sbox'>

    <form action='#' id='sbox'>

 
        <input type='text' id='search' name='search' placeholder='Search for Torrents '   size='40' />
        <button type='submit' class='search_btn'>&nbsp;&nbsp;&nbsp;Go&nbsp;&nbsp;&nbsp;</button>

 
</form>
            
                  </div>
  
  
  
  
  
  
  
  
  
      
            <div class='rlink'>
            
        

                            
                                <a  href='my.php'>
{$lang['gl_profile']}</a>&nbsp;&nbsp;&nbsp;
                                <a  href='rules.php'>
{$lang['gl_rules']}</a> &nbsp;&nbsp;&nbsp;
                                <a  href='logout.php'>
{$lang['gl_logout']}</a>
                            </div></div></div></div>"
;
            
       

       
       
       
       
       if (
$CURUSER)
    {
      
$htmlout .= "
                  <div class='pframe'> 
                  
                  
                  
                
                  
                  
                  
                  
                  <div class='profile'>
                        <div class='status_avatar'>"
;

    if (!empty(
$CURUSER['avatar']))
    {
      
$avatar "<a href='userdetails.php?id={$CURUSER['id']}'><img src='{$CURUSER['avatar']}' width='50' height='50' alt='' /></a><div class='username'>
                                <p><a href='userdetails.php?id=
{$CURUSER['id']}'>{$CURUSER['username']}</a></p> 
                            </div>"
;
    }
    else
    {
      
$avatar "<a href='userdetails.php?id={$CURUSER['id']}'><img src='{$TBDEV['baseurl']}/templates/1/images/default_thumb.png' alt='' /></a><div class='username'>
                                <p><a href='userdetails.php?id=
{$CURUSER['id']}'>{$CURUSER['username']}</a></p> 
                            </div>"
;
    }

    
$htmlout .= $avatar;

    
$htmlout .= "
                        </div>
                           
                           
                        
                        
                        
                  
                        
                              <div class='nik'>
                
$IsDonor$warn&nbsp;
                
$member_reputation
                
                <br>
                 
{$lang['gl_ratio']}:&nbsp;$ratio 
                
                 <br>
                    
                
{$lang['gl_uploaded']}:&nbsp;$upped
       
                 
                 <br>
                    
             
{$lang['gl_downloaded']}:&nbsp;$downed
                </div>  
                    
                        
                        
                        
                        
                        
                           
                    </div>
                    
                    
                    
                    
                    
                    
                          
              
                    
                    
                    
                    
                    
                    "
;
    }
    else
    {
      
$htmlout .= "
                   <div class='profile'>
                        <div class='sign_in'>
                            <div style='padding:8px 0 0 5px;'>
                            <img src='
{$TBDEV['baseurl']}/templates/1/images/key.png' alt='{$lang['gl_login']}' />&nbsp;<a style='color:#fff;' href='login.php'>Sign In »</a>
                            </div>
                        </div>
                   <ul>
                          <li>New user?&nbsp;</li>
                          <li><a class='bold' href='signup.php'>Register Now!</a></li>
                       </ul>
                    </div>"
;
    }   
            
              
$htmlout .= "
            </div>
             <div class='logo'></div>
            
            
    <!-- Begin Wrapper -->
    <div id='wrapper'>

        <!-- Begin Header -->
        <div id='header'> 
           
         
               "
;

    

    
$htmlout .= "
                
                <!-- Begin Navigation -->
                <div id='navigation'>
                    <div id='nav'>
                        <ul>"
;

    if (
$CURUSER)
    {
      
$htmlout .= "
                           <li><a href='index.php'><span>
{$lang['gl_home']}</span></a></li>
                           <li><a href='browse.php'><span>
{$lang['gl_browse']}</span></a></li>
                           <li><a href='upload.php'><span>
{$lang['gl_upload']}</span></a></li>
                           <li><a href='chat.php'><span>
{$lang['gl_chat']}</span></a></li>
                           <li><a href='forums.php'><span>
{$lang['gl_forums']}</span></a></li>
                           <li><a href='topten.php'><span>
{$lang['gl_top_10']}</span></a></li>
                           <li><a href='links.php'><span>
{$lang['gl_links']}</span></a></li>
                           <li><a href='faq.php'><span>
{$lang['gl_faq']}</span></a></li>
                           <li><a href='staff.php'><span>
{$lang['gl_staff']}</span></a></li>";

      if( 
$CURUSER['class'] >= UC_MODERATOR )
      {
        
$htmlout .= "
                           <li><a href='admin.php'><span>
{$lang['gl_admin']}</span></a></li>";
      }

    }
    else
    {
      
$htmlout .= "
                           <li><a href='login.php'><span>
{$lang['gl_login']}</span></a></li>
                           <li><a href='signup.php'><span>
{$lang['gl_signup']}</span></a></li>
                           <li><a href='recover.php'><span>
{$lang['gl_recover']}</span></a></li>";
    }

    
$htmlout .= "
                       
                       
                       
                       
                       
                       
                       </ul>
                       
                       
                       
                       
                       
  
                    </div>
                </div>
                <!-- End Navigation -->
            
        </div>
        <!-- End Header -->

        <div class='clear'></div>

        <!-- Start Container -->
        <div id='container'>

            <!-- Start Maincolumn -->
            <div id='maincolumn'>"
;

            if ( 
$TBDEV['msg_alert'] && $msgalert )
            {
             
$htmlout .= "
                <div class='alert'>
                    <a href='messages.php'><span>"
.sprintf($lang['gl_msg_alert'], $msgalert) ."&nbsp;". ($msgalert $lang['gl_msg_plural'] : $lang['gl_msg_singular']) . "!</span></a>
                </div>\n"
;
}


    return 
$htmlout;

// stdhead

function stdfoot() {
  global 
$TBDEV;

    
$htmlout '';
    
$htmlout .= "
            </div>
            <!-- End Maincolumn -->
   <div id='fot'><a href='http://www.tbdev.net'><img src='
{$TBDEV['pic_base_url']}tbdev_btn_red.png' align='center' border='0' alt='Powered By TBDev &copy;2010' title='Powered By TBDev &copy;2010' /></a>
</div>

            <div class='clear'></div>
        </div>
        <!-- End Container -->


     

    </div>
    <!-- End Wrapper -->
<br><br>
</body>
</html>"
;

    return 
$htmlout;
}

function 
stdmsg($heading$text)
{
    
$htmlout "<table class='main' width='750' border='0' cellpadding='0' cellspacing='0'>
    <tr><td class='embedded'>\n"
;
    
    if (
$heading)
      
$htmlout .= "<h2>$heading</h2>\n";

    
$htmlout .= "<table width='100%' border='1' cellspacing='0' cellpadding='10'><tr><td class='text'>\n";
    
$htmlout .= "{$text}</td></tr></table></td></tr></table>\n";

    return 
$htmlout;
}

function 
StatusBar() {
global 
$CURUSER$TBDEV$lang$msgalert;
if (!$CURUSER)
return "&nbsp;";

$StatusBar '';

$StatusBar .= "
            
                "
;

return $StatusBar;

}

?>


thats my template.php i have loggedinonreturn removed on index browse search in order to work as public

Mindless

#1
Template system by AronTh/Terranova
delete these functions from bittorrent.php

    * stdhead
    * stdfoot
    * stdmsg
    * StatusBar


Add to bittorrent.php


Code (php) Select
function get_template(){
global $CURUSER, $TBDEV;
if(isset($CURUSER)){
if(file_exists("templates/".$CURUSER['stylesheet']."/template.php")){
require_once("templates/".$CURUSER['stylesheet']."/template.php");
}else{
if(isset($TBDEV)){
if(file_exists("templates/".$TBDEV['stylesheet']."/template.php")){
require_once("templates/".$TBDEV['stylesheet']."/template.php");
}else{
print("Sorry, Templates do not seem to be working properly and missing some code. Please report this to the programmers/owners.");
}
}else{
if(file_exists("templates/1/template.php")){
require_once("templates/1/template.php");
}else{
print("Sorry, Templates do not seem to be working properly and missing some code. Please report this to the programmers/owners.");
}
}
}
}else{
if(file_exists("templates/".$TBDEV['stylesheet']."/template.php")){
require_once("templates/".$TBDEV['stylesheet']."/template.php");
}else{
print("Sorry, Templates do not seem to be working properly and missing some code. Please report this to the programmers/owners.");
}
}
if(!function_exists("stdhead")){
print("stdhead function missing");
function stdhead($title="", $message=true){
return "<html><head><title>$title</title></head><body>";
}
}
if(!function_exists("stdfoot")){
print("stdfoot function missing");
function stdfoot(){
return "</body></html>";
}
}
if(!function_exists("stdmsg")){
print("stdmgs function missing");
function stdmsg($TITLE, $MSG){
return "<b>".$TITLE."</b><br />$MSG";
}
}
if(!function_exists("StatusBar")){
print("StatusBar function missing");
function StatusBar(){
global $CURUSER, $lang;
return "{$lang['gl_msg_welcome']}, $CURUSER[username]";
}
}
}




and in bittorrent.php in function userlogin();

and in the end of it, just one line above the finishing '}'

Code (php) Select
get_template();


now we are done editing bittorrent.php

in config.php
change :
Code (php) Select
$TBDEV['stylesheet'] = "./1.css";
to:
Code (php) Select
$TBDEV['stylesheet'] = "1";

now you open up my.php :)
replace:

   
Code (php) Select
$stylesheets ='';
$ss_r = mysql_query("SELECT * from stylesheets") or die;
$ss_sa = array();
while ($ss_a = mysql_fetch_assoc($ss_r))
{
$ss_id = $ss_a["id"];
ss_name = $ss_a["name"];
$ss_sa[$ss_name] = $ss_id;
}
ksort($ss_sa);
reset($ss_sa);
while (list($ss_name, $ss_id) = each($ss_sa))
{
if ($ss_id == $CURUSER["stylesheet"])
{
$ss = " selected='selected'";
}
else
{
$ss = "";
}
$stylesheets .= "<option value='$ss_id'$ss>$ss_name</option>\n";
}



with:

   
Code (php) Select
$stylesheets ='';
    $TEMPLATES=mysql_query("SELECT * FROM stylesheets");
while($TEMPL=mysql_fetch_array($TEMPLATES)){
if(file_exists("templates/$TEMPL[id]/template.php"))
$stylesheets.="<option value=$TEMPL[id]".($TEMPL['id']==$CURUSER['stylesheet']?" selected='selected'":"").">$TEMPL[name]</option>";
}

Now you need to add this to login.php/takelogin.php - signup.php/takesignup.php - recover.php/resetpw.php - invite_signup.php/takeinvite_signup.php under dbconn();

Code (php) Select
global $CURUSER;
if(!$CURUSER){
get_template();
}


and the contents of the zip file shall go in to the root directory of the server :)

[attachment deleted by admin]