Niekaip neiseina padaryt slankiojanciu paneliu, tiesiog nezinau kaip teisingai ir kur iterpt koda.
theme.php originalus kodas:
<?php
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";
//Theme Settings
define("THEME_BULLET", "<strong>·</strong>");
function render_page($license=false) {
global $settings;
echo '<div id="wrapper">
<div id="top_section">
<div class="topmenu">'.showsublinks("","").'</div>
<div id="headersection">'.stripslashes($settings['siteintro']).'</div>
</div>';
//Content
if (LEFT) { echo "<div id='side-border-left'>".LEFT."</div>\n"; }
//if (RIGHT) { echo "<div id='side-border-right'>".RIGHT."</div>\n"; }
echo "<div id='main-bg' class='clearfix'>".U_CENTER.CONTENT.L_CENTER."</div>\n";
//Footer
echo '<div id="footersection"><noindex>'.stripslashes($settings['footer']).'<br />'.showcopyright().'</noindex></div>
</div>';
}
function render_news($subject, $news, $info) {
echo '<h1>'.$subject.'</h1>';
echo '<p style="text-align:justify;">'.$news.'</p>
<p style="margin-bottom: 10px;"><span class="small">'.newsposter($info,"·").newsopts($info,"·").itemoptions("N",$info['news_id']).'</span></p>';
}
function render_article($subject, $article, $info) {
echo '<h1>'.$subject.'</h1>
<p style="text-align:justify;">'.($info['article_breaks'] == "y" ? nl2br($article) : $article).'</p>
<p style="margin-bottom: 10px;"><span class="small">'.articleposter($info,"·").articleopts($info,"·").itemoptions("A",$info['article_id']).'</span></p>';
}
function opentable($title) {
echo '<h1>'.$title.'</h1>';
}
function closetable() {
echo '<br />';
}
function openside($title) {
echo '<div id="boxside"><h2>'.$title.'</h2>';
}
function closeside($collapse = false) {
echo '</div>';
}
?>
O cia mano kito dizaino theme.php kodas:
<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }
define("THEME_BULLET", "<img class='bullet' src='".THEME."images/bullet.gif' alt='->' />");
require_once INCLUDES."theme_functions_include.php";
function render_page($license=false) {
global $locale, $main_style, $settings, $userdata;
echo "<script type='text/javascript' src='".THEME."easing.js'></script><script type='text/javascript' src='".THEME."lavalamp.js'></script>
<script type='text/javascript'>
$(function() {
$('#nav').lavaLamp({
fx: 'backout',
speed: 700,
click: function(event, menuItem) {
return true;
}
});
});
$(document).ready(function(){
$('#nav > li > ul').fadeOut('slow');
$('#nav li').hover(
function(){ $(this).find('ul:first').fadeIn('slow'); },
function(){ $(this).find('ul:first').fadeOut('slow'); }
);
if (document.all) {
$('#nav li').hoverClass ('sfHover');
}
});
$.fn.hoverClass = function(c) {
return this.each(function(){
$(this).hover(
function() { $(this).addClass(c); },
function() { $(this).removeClass(c); }
);
});
};
</script>
<div id='fpage'><div id='vbkg'><div id='pbhbkg'><div id='tbkg'><div id='pbkg'>
<div id='catnav'><ul id='nav' class='lavaLamp'>
<li><a href='../../news.php'>Pagrindinis</a></li>
<li><a href='#'>Pagalba</a>
".showsublinks(" ")."
</li>
<li><a href='#'>Tinklapiu kurimas</a>
<ul class='children'>
<li><a href='../../articles.php?article_id=1'>PHP-fusion</a></li>
<li><a href='../../articles.php?article_id=3'>WordPress</a></li>
<li><a href='../../articles.php?article_id=2'>Joomla</a></li>
<li><a href='../../articles.php?article_id=4'>D.L.E</a></li>
<li><a href='../../articles.php?article_id=5'>HTML</a></li>
</ul>
</li>\n
<li><a href='#'>Windows</a>
<ul class='children'>
<li><a href='../../articles.php?article_id=6'>Windows XP</a></li>
<li><a href='../../articles.php?article_id=7'>Windows Vista</a></li>
<li><a href='../../articles.php?article_id=8'>Windows 7</a></li>
</ul>
</li>\n
<li><a href='#'>Kainos</a>
<ul class='children'>
<li><a href='../../articles.php?article_id=9'>Svetainiu kurimas</a></li>
<li><a href='../../articles.php?article_id=10'>Kitos kainos</a></li>
</ul>
</li>\n";
if (iMEMBER){echo "<div class='navR'>".$locale['global_035']." ".$userdata['user_name']."</div>\n";}else{echo "<li><a href='../../login.php'>Prisijungti</a></li><li><a href='../../register.php'>Registracija</a></li>\n";}
echo"</ul>
</div>
<div class='logo'><a href='".$settings['siteurl']."'><img src='".BASEDIR.$settings['sitebanner']."' alt='".$settings['sitename']."' style='border: 0;float:right' /></a></div>\n";
if(FUSION_SELF == 'news.php') { echo "<div id='cts'><div id='cont' class='cfix side-right-blog'>\n";}else{echo" <div id='cts'><div id='cont' class='cfix $main_style'>\n";}
echo"".(LEFT ? "<div id='side-border-left'>".LEFT."</div>" : "")."
".(RIGHT ? "<div id='side-border-right'>".RIGHT."</div>" : "")."
<div id='main-bg'><div id='container'>".U_CENTER.CONTENT.L_CENTER."
</div></div></div></div>
<div id='farea'><div id='footer'>
<div class='subfooter'><div class='floatL' style='padding-top:9px'>".sprintf($locale['global_172'], substr((get_microtime() - START_TIME),0,4))."</div><div class='floatR' style='padding-top:9px'>".showcounter()."</div></div>
<div class='subfooter'><div class='floatL' style='padding-top:9px'>Conversion by <a href='http://fusionfusion.net'>Mangee</a> ©</div><div class='floatR' style='padding-top:9px'>Based on work from <a href='http://www.isoftwarereviews.com/'>isoftwarereviews</a></div></div>
<div id='copy'>".(!$license ? "<div class='floatL' style='padding-top:9px'>".showcopyright()."</div><div class='floatR' style='padding-top:9px'>".stripslashes($settings['footer'])."</div>" : "")."</div>
<div class='logo'><a href='".$settings['siteurl']."'><img src='".BASEDIR.$settings['sitebanner']."' alt='".$settings['sitename']."' style='border:0' /></a></div>
</div></div>
</div></div></div></div></div>\n";
}
function render_news($subject, $news, $info) {
global $locale;
opentable($subject);
echo "<div class='floatfix'>".$news."</div>
<div class='news-footer'>
".newsposter($info," ·").newsopts($info,"·").itemoptions("N",$info['news_id']).
"</div>\n";
closetable();
}
function render_article($subject, $article, $info) {
global $locale;
opentable($subject);
echo "<div class='floatfix'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</div>
<div class='news-footer'>
".articleposter($info," ·").articleopts($info,"·").itemoptions("A",$info['article_id']).
"</div>\n";
closetable();
}
function opentable($title) {
echo "<div class='tt'>".$title."</div>
<div class='tbody spacer'>\n";
}
function closetable() {
echo "</div>\n";
}
$panel_collapse = true;
function openside($title, $collapse = false, $state = "on") {
static $box_id = 0; $box_id++;
global $panel_collapse; $panel_collapse = $collapse;
echo "<div class='st'>".($collapse ? panelbutton($state,$box_id) : "")."$title</div>
<div class='tbody spacer'>".($collapse ? panelstate($state, $box_id) : "");
}
function closeside() {
global $panel_collapse;
echo ($panel_collapse ? "</div>" : "")."</div>\n";
}
?>
Ir as is tos antro dizaino nezinau nuo kur kelt paneliu koda ir kur i ta pirmesne teisingai iterpt, gal kas nusimanot kaip tai padaryt?
|