Chciałbym zmienić panele w skórce Free aby panele były po prawej a newsy rozmieszczone po lewej.
Oraz forum bez bocznych paneli.
Jak to zrobić?
theme.php:
<?php
/*
author: Itanium
Matej Krhin
website: www.phpfusion-si.com
email:
*/
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
define("THEME_BULLET", "<img src='".THEME."images/bullet.gif' alt='' style='border:0' />");
require_once INCLUDES."theme_functions_include.php";
// theme settings
$banner = "0"; // 1 - show site banner 0 - show theme banner
$theme_width = "1000";
$theme_width_l = "175";
$theme_width_r = "175";
$oglasi = ""; //vpisite kodo za prikazovanje oglasov
/** aded nev navigation tools*/
function navigacija() {
$sres = dbquery(
"SELECT link_window, link_visibility, link_url, link_name FROM ".DB_SITE_LINKS."
WHERE ".groupaccess('link_visibility')." AND link_position>='2' AND link_url!='---' ORDER BY link_order ASC"
);
if(dbrows($sres)) {
$i = 0;
$res = "<div id='free_toolbar'><ul>\n";
while ($sdata = dbarray($sres)) {
$link_target = $sdata['link_window'] == "1" ? " target='_blank'" : "";
$icon = "";
//if(strstr($sdata['link_url'],'downloads.php')) $icon = "<img src='".THEME."images/home.png' alt='' />";
if (strstr($sdata['link_url'], "http://") || strstr($sdata['link_url'], "https://")) {
$res .= "<li class='free_toolbar'><a href='".$sdata['link_url']."'$link_target><span>$icon".$sdata['link_name']."</span></a></li>\n";
} else {
$res .= "<li class='free_toolbar'><a href='".BASEDIR.$sdata['link_url']."'$link_target><span>$icon".$sdata['link_name']."</span></a></li>\n";
}
$i++;
}
$res .= "</ul>\n</div>\n";
return $res;
}
}
/** aded nev navigation tools*/
function render_page($license=false) {
global $settings, $main_style, $theme_width, $oglasi, $banner, $theme_width_l, $theme_width_r;
//nalozimo orodja za sidebar
echo "<script type='text/javascript' src='" . THEME . "js/mootools.js'></script>
<script type='text/javascript' src='" . THEME . "js/side-bar.js'></script>";
//ce sem admin nalozim sidebar
if (iADMIN) {
include THEME."menu.php";;
} else {
}
//nalozimo ustrezen prevod
if (file_exists(THEME . "locale/" . $settings['locale'] . ".php")) {
include THEME . "locale/" . $settings['locale'] . ".php";
} else {
include THEME . "locale/Slovenian.php"; //ce nastavljen jezik ne obstaja nalozimo privzetega
}
//ustvarimo glavo portala
echo "<a name='top'>";
echo "<table align='center' width='$theme_width' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td width='15' height='50'><img src='".THEME."images/viena_l_z.png' width='15' height='50'></td>
<td class='viena_zgoraj'>
<table width='100%' border='0' class='viena_zgoraj1' cellspacing='0' cellpadding='0'>
<tr>
<td align='left' width='50%'>Rozmiar czcionki: <a href='".THEME."setfont.php?font=small'><img src='".THEME."images/fonts/small.png' width='6' height='12' alt='small' border='0'></a> | <a href='".THEME."setfont.php?font=medium'><img src='".THEME."images/fonts/medium.png' width='8' height='12' alt='medium' border='0'></a> | <a href='".THEME."setfont.php?font=big'><img src='".THEME."images/fonts/big.png' width='10' height='12' alt='big' border='0'></a></td>
<td align='right' width='50%'>".date("j. n. Y")." | <a href='".BASEDIR."search.php'><img src='".THEME."images/ico/najdi.png' width='12' height='12' alt='najdi' border='0'></a> | <a href='mailto:".str_replace("@","@",$settings['siteemail'])."'><img src='".THEME."images/ico/mail.png' width='13' height='9' alt='najdi' border='0'></a> | <a href='".BASEDIR."index.php'><img src='".THEME."images/ico/domov.png' width='11' height='9' alt='najdi' border='0'></a></td>
</tr>
</table>
</td>
<td width='15' height='50'><img src='".THEME."images/viena_d_z.png' width='15' height='50'></td>
</tr>
<tr>
<td class='viena_levo'></td>
<td class='viena_bg'><table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td width='10' height='10'><img src='".THEME."images/with_l_z.png' width='10' height='10'></td>
<td class='with_zgoraj'></td>
<td width='10' height='10'><img src='".THEME."images/with_d_z.png' width='10' height='10'></td>
</tr>
<tr>
<td class='with_levo'></td>
<td class='white'>";
echo "<table align='center' cellspacing='0' cellpadding='0' width='100%' class='outer-border'>
<tr>
<td>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='full-header'>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='glavca'>
<table width='100%' height='180px' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td rowspan='2' width='50%'>";
if ($banner=="1") {
echo"<a href='".BASEDIR."index.php'><img src='".BASEDIR.$settings['sitebanner']."' alt='".$settings['sitename']."' border='0'></a>";
} else {
echo"<a href='".BASEDIR."index.php'><img src='".THEME."banner.png' alt='".$settings['sitename']."' border='0'></a>";
}
echo "</td>
<td width='50%' align='center'>$oglasi</td>
</tr>
<tr>
<td width='50%' height='35px' align='right' valign='bottom' class='usercell'><a href='/search.php' title='".$locale['U04']."'><img src='".THEME."images/szukaj.png' border='0'></a> | <a href='".BASEDIR."weblinks.php' title='".$locale['U06']."'><img src='".THEME."images/www.png' border='0'></a>";
if (iUSER) {
echo "| <a href='".BASEDIR."setuser.php?logout=yes' title='".$locale['U05']."'><img src='".THEME."images/logout.png' border='0'></a> | <a href='".BASEDIR."messages.php' title='".$locale['U02']."'><img src='".THEME."images/mail.png' border='0'></a> |
<a href='".BASEDIR."edit_profile.php' title='".$locale['U03']."'><img src='".THEME."images/user.png' border='0'></a>";
} else {
echo "";
}
echo "</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n
<tr>
<td class='navi2'>".navigacija()."</td>
</tr>
</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
if (LEFT) { echo "<td class='side-border-left' width='$theme_width_l' valign='top'>".LEFT."</td>"; }
echo "<td class='main-bg' valign='top'>".U_CENTER.CONTENT.L_CENTER."</td>";
if (RIGHT) { echo "<td class='side-border-right' width='$theme_width_r' valign='top'>".RIGHT."</td>"; }
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td width='15px' class='footer'><a href='#top'><img src='".THEME."images/panel_off.gif' alt='' border='0'></a></td>
<td align='center' class='footer'>".$locale['U00']."<br><a href='".BASEDIR."contact.php' alt=''>".$locale['U01']."</a> | Powered by <a href='http://www.php-fusion.co.uk' alt=''>PHP-Fusion</a> | Free Theme by <a href='http://www.phpfusion-si.com' alt=''>Itanium (Modifed by eloaders)</a></td>
<td width='15px' class='footer'><a href='#top'><img src='".THEME."images/panel_off.gif' alt='' border='0'></a></td>
</tr>
</table>
</td>
</tr>
</table>\n";
echo "</td>
<td class='with_desno'></td>
</tr>
<tr>
<td width='10' height='10'><img src='".THEME."images/with_l_s.png' width='10' height='10'></td>
<td class='with_spodaj'></td>
<td width='10' height='10'><img src='".THEME."images/with_d_s.png' width='10' height='10'></td>
</tr>
</table>
</td>
<td class='viena_desno'></td>
</tr>
<tr>
<td width='15' height='30'><img src='".THEME."images/viena_l_s.png' width='15' height='30'></td>
<td class='viena_spodaj' align='right'>".showcounter()."</td>
<td width='15' height='30'><img src='".THEME."images/viena_d_s.png' width='15' height='30'></td>
</tr>
</table>";
}
//ustvarimo ogrodje za novice
function render_news($subject, $news, $info) {
echo "<table cellpadding='0' cellspacing='0' width='100%' class='border'>
<tr>
<td class='capmain'>$subject</td>
</tr>
<tr>
<td class='main-body'>$news</td>
</tr>
<tr>
<td align='center' class='news-footer'>\n";
echo newsposter($info," ·").newsopts($info,"·").itemoptions("N",$info['news_id']);
echo "</td>
</tr>
</table>\n";
}
//ustvarimo ogrodje za clanke
function render_article($subject, $article, $info) {
echo "<table width='100%' cellpadding='0' cellspacing='0' class='border'>
<tr>
<td class='capmain'>$subject</td>
</tr>
<tr>
<td class='main-body'>
".($info['article_breaks'] == "y" ? nl2br($article) : $article)."
</td>
</tr>
<tr>
<td align='center' class='news-footer'>\n";
echo articleposter($info," ·").articleopts($info,"·").itemoptions("A",$info['article_id']);
echo "</td>
</tr>
</table>\n";
}
//ustvarimo center panel
function opentable($title) {
echo "<table cellpadding='0' cellspacing='0' width='100%' class='border'>
<tr>
<td class='capmain'><img src='".THEME."images/title.png' width='4' height='8'><img src='".THEME."images/blank.gif' width='3' height='3'>$title</td>
</tr>
<tr>
<td class='main-body'>\n";
}
//zapremo center panel
function closetable() {
echo "</td>
</tr>
</table>\n<p>";
}
//ustvarimo side panel
function openside($title, $collapse = false, $state = "on") {
global $panel_collapse; $panel_collapse = $collapse;
echo "<table cellpadding='0' cellspacing='0' width='100%' class='border'>
<tr>
<td class='scapmain'><img src='".THEME."images/title.png' width='4' height='8'><img src='".THEME."images/blank.gif' width='3' height='3'>".$title."</td>
<td class='scapmain' align='right'>".($collapse == true ? panelbutton($state,$boxname = str_replace(' ', '', $title)) : "")."</td>
</tr>
<tr>
<td colspan='2' class='side-body'>";
if ($collapse == true) { echo panelstate($state, $boxname); }
}
//zapremo side panel
function closeside($collapse = false) {
global $panel_collapse;
if ($panel_collapse == true) { echo "</div>\n"; }
echo "</td>
</tr>
</table>\n<p>";
}
//to je to
?>
Edytowane przez Pieka dnia 19.09.2009 14:53:17
|