Bravo List
Register
Go Back   > Bravo List > Torrents Trackers > phpMyBitTorrent (BT.Manager)
Reply
  #1  
Old 28-01-10, 10:49
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 1,989
Default Tutorial On creating a theme For phpMyBitTorrent
First and foremost you well need a good working nolige of PHP!

The theme for PMBT is the complete layout of your site so you well want to
Be very careful when doing it.
The far easiest way is to take copy the content of a theme that is laid out the way you already want yours but you want deffrent Images and colors.

phpMyBitTorrent theme's are laid out fairly easy you have 19 separate function

OpenTable()
CloseTable()
OpenTable2()
CloseTable2()
OpenNewsTable()
CloseNewsTable()
OpenMessTable()
CloseMessTable()
OpenSuccTable()
CloseSuccTable()
OpenErrTable()
CloseErrTable()
newuserpage()
themeheader()
themefooter()
overlib_init()
help()


Optional are

themechange()
languagechange()


We well take Vista theme as our example theme

The two Most changed are themeheader and themefooter these to are seen on ever page

Click image for larger version

Name:	themeheader.png
Views:	132
Size:	115.0 KB
ID:	2059

themeheader is the top of your web site down the left side and you left collom if you want one.

Click image for larger version

Name:	themefooter.png
Views:	40
Size:	61.0 KB
ID:	2060

themefooter is the bottom of your web site the right side and your right colom if you want one

Your second most changes is OpenTable and CloseTable these 2 are seen on every page

OpenTable is the top and left side of your blocks

Name:  OpenTable.png
Views: 604
Size:  2.8 KB

CloseTable are the bottom and right side of your blocks

Name:  CloseTable.png
Views: 606
Size:  1.6 KB

then you have your special tables

OpenTable2 CloseTable2

Click image for larger version

Name:	table2.png
Views:	26
Size:	4.6 KB
ID:	2066

OpenSuccTable CloseSuccTable

Click image for larger version

Name:	successtable.png
Views:	20
Size:	4.2 KB
ID:	2065

OpenMessTable CloseMessTable

Click image for larger version

Name:	messagetable.png
Views:	16
Size:	4.7 KB
ID:	2064

OpenErrTable CloseErrTable

Click image for larger version

Name:	errortable.png
Views:	13
Size:	6.0 KB
ID:	2063

overlib_init is your java scripts
Help is your popup bubble(help tips)
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Managerô forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
The Following 3 Users Say Thank You to joeroberts For This Useful Post:
DAKz (30-09-11), Phogo (28-01-10), pwnage (03-02-10)
  #2  
Old 28-01-10, 13:37
underx's Avatar
underx underx is offline
Senior Member
 
Join Date: Sep 2008
Posts: 84
Default
thank you very much for those instructions !
Reply With Quote
  #3  
Old 28-01-10, 19:07
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 1,989
Default
Creating function themeheader()

This is the first peace that you your browser the world see's

This is a Function so You well want to make sure you retrieve all global variables
PHP Code:
global $db$db_prefix$theme$siteurl$user$upload_level$sitename$gfx_check$donations$INVITEONLY,$onlysearch$shout_config$pivate_mode$forumshare$PHP_SELF
the most IMPORTANT are
$db
$db_prefix
$user

Those are Your data base connection Class and Data Base Prefix.
You well not need to make any further data base connection so If you can't figure out $db class But you know simple mysql you can still do this
I wont get in to $db class at this time or mysql .

Now your going to want to set users online this is Not all that Hard
PHP Code:
if ($user->user) {
        
//Update online user list
        
$pagename substr($_SERVER["PHP_SELF"],strrpos($_SERVER["PHP_SELF"],"/")+1);
        
$sqlupdate "UPDATE ".$db_prefix."_online_users SET page = '".addslashes($pagename)."', last_action = NOW() WHERE id = ".$user->id.";";
        
$sqlinsert "INSERT INTO ".$db_prefix."_online_users VALUES ('".$user->id."','".addslashes($pagename)."', NOW(), NOW())";
        
$res $db->sql_query($sqlupdate);
        if (!
$db->sql_affectedrows($res)) $db->sql_query($sqlinsert);

If you use a hard language and need to set Charset I would say set a header
header("Content-Type: text/html; charset=UTF-8");

after this you can start you html coding
first you well want to set your webcoding
HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
This tells Most browser what type of information to expect and is the first line it reads
Now you want to set your
HTML Code:
<html>
followed by
HTML Code:
<head></head>
this is where you set your
style sheets
java scripts
meta tag
if You want a favacon (this is the little image beside your address bar in your browser)
this is also where it is set
here is an example
PHP Code:
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
echo "<html>\n";
echo "<head>\n";
echo "<meta name='keywords' content='Jungle-Pieates, http://www.jungle-pirates.com/, joeroberts' >\n
<meta name=\"MSSmartTagsPreventParsing\" content=\"TRUE\" >\n
<meta http-equiv=\"Content-Language\" content=\"en-us\" >\n
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\" >\n";
echo "<meta name=\"generator\" content=\"PMBT 2.0.2\" >\n";
echo "<meta http-equiv=\"Pragma\" content=\"no-cache\" >\n";
echo "<meta http-equiv=\"Expires\" content=\"-1\" >\n";
echo "<meta http-equiv=\"Cache-Control\" content=\"no-cache\" >\n";
echo "<script defer type=\"text/javascript\" src=\"".$siteurl."pngfix.js\"></script>";
echo "<title>".$sitename."</title>\n";
if (is_readable("themes/$theme/favicon.ico")) {
        echo "<link REL=\"shortcut icon\" HREF=\"themes/".$theme."/favicon.ico\" TYPE=\"image/x-icon\">\n";
}

?>
<script type="text/javascript">
pmbtsite_url = "<?php echo $siteurl?>";
tag_prompt = "<?php echo _bb_tag_prompt?>";
img_prompt = "<?php echo _bb_img_prompt?>";
font_formatter_prompt = "<?php echo _bb_font_formatter_prompt?>";
link_text_prompt = "<?php echo _bb_link_text_prompt?>";
link_url_prompt = "<?php echo _bb_link_url_prompt?>";
link_email_prompt = "<?php echo _bb_link_email_prompt?>";
list_type_prompt = "<?php echo _bb_list_type_prompt?>";
list_item_prompt = "<?php echo _bb_list_item_prompt?>";
_btshoutnowprivate = "<?php echo _btshoutnowprivate?>";
shoutrefresht = "<?php echo $shout_config['refresh_time']; ?>";
shoutidle = "<?php echo $shout_config['idle_time']; ?>";
</script>
<?php
if (!$onlysearch) {
        echo 
"<link rel=\"alternate\" type=\"application/rss+xml\" title=\"Last Torrents\" href=\"backend.php?op=last\">\n";
        echo 
"<link rel=\"alternate\" type=\"application/rss+xml\" title=\"Best Torrents\" href=\"backend.php?op=best\">\n";
}


if (
is_readable("themes/$theme/style.css")) {
        echo 
"<link rel=\"StyleSheet\" href=\"$siteurl/themes/$theme/style.css\" type=\"text/css\">\n<script type=\"text/javascript\" src=\"$siteurl/global.js\"></script>\n";
}
overlib_init();

echo 
"</head>\n\n";
remember this
PHP Code:
?>
<script type="text/javascript">
pmbtsite_url = "<?php echo $siteurl?>";
tag_prompt = "<?php echo _bb_tag_prompt?>";
img_prompt = "<?php echo _bb_img_prompt?>";
font_formatter_prompt = "<?php echo _bb_font_formatter_prompt?>";
link_text_prompt = "<?php echo _bb_link_text_prompt?>";
link_url_prompt = "<?php echo _bb_link_url_prompt?>";
link_email_prompt = "<?php echo _bb_link_email_prompt?>";
list_type_prompt = "<?php echo _bb_list_type_prompt?>";
list_item_prompt = "<?php echo _bb_list_item_prompt?>";
_btshoutnowprivate = "<?php echo _btshoutnowprivate?>";
shoutrefresht = "<?php echo $shout_config['refresh_time']; ?>";
shoutidle = "<?php echo $shout_config['idle_time']; ?>";
</script>
<?php
Is your java info for shoutbox text editor and auto matic PM checker POPUP
Now We can start the
HTML Code:
<body>
this is the layout of your site
It can be as semple as a <table>/<div>
this is a little tricky because this is where you figure out if you want
1 main layout
a left collom and a Main collom
a left collom center and right collom
you well also set your header here and tab bar if wanted
simple way is a plain table system
for your header and menu do
HTML Code:
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr><td><img src="imagelink.png"></td></tr>
<tr><td>your nav bar code</td></tr>
</table>

Now do you want 3 rows?
sample for left collom at 25% of the page
HTML Code:
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr><td {{you might want to set width here}}width="25%"> 
your coding for your left collom</td>
sample of Center at 50% of the page
HTML Code:
<td width="50%"> 
this is where you page is added (index.php torrents.php pm.php) you can put codes here witch show above theses pages such as a add link or what not
do Not close this <td> as it well be closed in the themefooter that I well cover later on.

to sum up we just created a semple page layout with a header nav bar your left collom and center page
Attachment 2059
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Managerô forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #4  
Old 06-02-10, 18:17
underx's Avatar
underx underx is offline
Senior Member
 
Join Date: Sep 2008
Posts: 84
Default
hey joe :)
have some quesions:

1/ I try to change the nav container a little bit but I don't find where !!
I want to remove that gray color and edit text color too

Click the image to open in full size.

2/ also I want to move menu and the categories bloacks from the right to the top (just after the nav container) ! In one word I want to make those 2 bloks horizontally at the top !

hope u understand me :)
thks
Reply With Quote
  #5  
Old 06-02-10, 18:32
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 1,989
Default
in default PMBT theme this is the nav bar
PHP Code:
        echo "<div id=\"navcontainer\" align=\"center\">
                <ul id=\"navlist\">\n"
;
                    echo(
preg_match("/index.php/",$_SERVER["PHP_SELF"])) ? "<li id=\"active\"><a id=\"current\" >Home</a>":"<li><a href=\"index.php\">Home</a></li>";
                    echo(
preg_match("/torrents.php/",$_SERVER["PHP_SELF"])) ? "<li id=\"active\"><a id=\"current\" >Torrents</a>":"<li><a href=\"torrents.php\">Torrents</a></li>";
                    if(
$forumshare)echo(preg_match("/phpBB.php/",$_SERVER["PHP_SELF"])) ? "<li id=\"active\"><a id=\"current\">Forums</a></li>":"<li><a href=\"phpBB.php\">Forums</a></li>";
                    echo(
preg_match("/chat.php/",$_SERVER["PHP_SELF"])) ? "<li id=\"active\"><a id=\"current\" >Chat</a></li>":"<li><a href=\"chat.php\">Chat</a></li>";
                    if(
$user->user)echo(preg_match("/user.php/",$_SERVER["PHP_SELF"])) ? "<li id=\"active\"><a id=\"current\" href=\"user.php?op=profile&id=" $user->id ."\">My Profile</a></li>":"<li><a href=\"user.php?op=profile&id=" $user->id ."\">My Profile</a></li>";
                    echo(
preg_match("/donate.php/",$_SERVER["PHP_SELF"])) ? "<li id=\"active\"><a id=\"current\"  onClick=\"javascript:urchinTracker ('/donate/navbar');\">Donate<span style='margin-left: 4px; vertical-align: super; color:#AA0000; font-family:sans-serif; font-weight: bolder; font-size: 6pt;'>NOW</span></a></li>":"<li><a href=\"donate.php\" onClick=\"javascript:urchinTracker ('/donate/navbar');\">Donate<span style='margin-left: 4px; vertical-align: super; color:#AA0000; font-family:sans-serif; font-weight: bolder; font-size: 6pt;'>NOW</span></a></li>";
                    if((
$user->user OR $upload_level == "all"))echo(preg_match("/upload.php/",$_SERVER["PHP_SELF"])) ? "<li id=\"active\"><a id=\"current\" href=\"upload.php\">Upload</a></li>":"<li><a href=\"upload.php\">Upload</a></li>";
                    if(
$user->user)echo(preg_match("/memberslist.php/",$_SERVER["PHP_SELF"])) ? "<li id=\"active\"><a id=\"current\" >Members</a></li>":"<li><a href=\"memberslist.php\">Members</a></li><br />";
                    if(
$user->user)echo(preg_match("/helpdesk.php/",$_SERVER["PHP_SELF"])) ? "<li id=\"active\"><a id=\"current\" >Help Desk</a></li>":"<li><a href=\"helpdesk.php\">Help Desk</a></li>";

                echo 
"</ul> 
to change the BG color of the tabs you need to edit css
this
Code:
#navlist li a {
padding : 3px 0.5em;
margin-left : 3px;
border : 1px solid #778;
border-bottom : none;
background : #d2d2d2;
text-decoration : none;
}
is the tabs
and
Code:
background : #d2d2d2;
sets the color
as for the others I well work on it as you well need to rewrite the 2 blocks.
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Managerô forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #6  
Old 08-02-10, 01:33
pwnage's Avatar
pwnage pwnage is offline
Senior Member
 
Join Date: Jan 2010
P2P
Posts: 45
Default
I seen in your forums page on ur site u got 1px line for ur tables how do u do that i tryd doin the table border=1 and all that help pleaaase
Reply With Quote
  #7  
Old 08-02-10, 01:36
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 1,989
Default
on what tables?
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Managerô forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #8  
Old 08-02-10, 01:37
pwnage's Avatar
pwnage pwnage is offline
Senior Member
 
Join Date: Jan 2010
P2P
Posts: 45
Default
Quote:
Originally Posted by joeroberts View Post
on what tables?
i want it for all tables that lists stuff like...
Browse, the search, recent 10 uploaded
Attached Thumbnails
c.png  
Reply With Quote
  #9  
Old 13-06-11, 06:04
DAKz's Avatar
DAKz DAKz is offline
Black Cobra Hosting
 
Join Date: Jul 2009
P2P
Posts: 380
Thumbs up Very good stuff!!
I follow this guys postings here and at the phpMyBit Torrent forum site, and find that he is accurate, understanding and very good. Thanks for the effort you put in and all the knowledge you share with all of us!!
Reply With Quote
Reply

Tags
creating , phpmybittorrent , theme , tutorial

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help Creating! jontebb Community Cafe 1 10-06-10 15:10
creating theme underx phpMyBitTorrent (BT.Manager) 1 28-01-10 01:56
PHP Tutorial with XAMPP for Windows Phogo Tutorials 0 26-01-10 13:19
Tutorial franky2008 Gazelle 3 26-08-09 17:33
Tutorial Please :( franky2008 phpMyBitTorrent (BT.Manager) 1 29-11-08 16:23



All times are GMT +2. The time now is 15:08. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2017, vBulletin Solutions Inc.