Przedszkolak
Postów: 3 Ostrzeżeń: 1
Data rejestracji: 16.05.2010 19:03
|
Witam zaczynam dopiero kodować własnego thema chciałbym zrobić aby każdy news pojawiał się w nowej tabelce oraz żeby tekst nie wyjeżdżał za tabelkę niestety mam tak:
Plik theme.php:
<?php
define("THEME_WIDTH", "100%");
define("THEME_BULLET", "<span class='bullet'>·</span>");
$enable_colour_switcher = true;
$enable_fontsize_switcher = true;
$enable_column_switcher = true;
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";
require_once THEMES."templates/switcher.php";
$colour_switcher = new Switcher("select", "colour", "png", "blue", "switcherbutton");
if(!$enable_colour_switcher){
$colour_switcher->disable();
}
$column_switcher = new Switcher("select", "columns", "png", "both", "switcherbutton");
if(!$enable_column_switcher){
$column_switcher->disable();
}
$fontsize_switcher = new Switcher("increment", "fontsize", "png", 1, "switcherbutton", "", true, array("step" => 0.1, "max" => 1.5));
if(!$enable_fontsize_switcher){
$fontsize_switcher->disable();
}
redirect_img_dir(THEME."forum", THEME."forum/".$colour_switcher->selected);
set_image("pollbar", THEME."images/navbg.jpg");
function get_head_tags(){
global $fontsize_switcher;
echo "<link href='".THEME."/menu.css' rel='Stylesheet' type='text/css' />
<link href='".THEME."/belka.css' rel='Stylesheet' type='text/css' />
<style type='text/css'>body{font-size: ".$fontsize_switcher->selected."em;}</style>";
}
function render_page($license=false) {
global $aidlink, $locale, $settings, $fontsize_switcher, $main_style;
echo "<body>";
//Grórne pole//
echo " <div id='cala'>
<!--Logo -->
<div id='logo'>
<div id='cz1'>
<div id='ewo'></div>
<!--Menu Górne -->
<div id='prawo'>
<ul id='menu1'>
<li><a href='ink1.html'>Strona Główna</a></li>
<li><a href='link2.html'>Forum</a></li>
<li><a href='link3.html'>Kontakt</a></li>
</ul>
</div>
</div>
<div id='cz2'>Portal poswięcony Aikido Kobayashi...</div>
</div>
<div id='belka'>
<div id='reklama'>
<dl>
<dt>Reklama!!!!</dt>
<a href='czcionki.html'>Czcionki</a>
<a href='tekst.html'>Tekst</a>
<dd><a href='tlo.html'>Tło</a></dd>
<dd><a href='arginesy.html'>Marginesy</a></dd>
<dd><a href='obramowanie.html'>Obramowanie</a></dd>
</dl>
</div>
<div id='forum'>
<dl><dt>Ostatnio na forum!!!!</dt>";
if (!defined("IN_FUSION")) { die("Access Denied"); }
echo "<dd><strong>".$locale['global_021']."</strong>\n";
$result = dbquery("
SELECT tt.forum_id, tt.thread_id, tt.thread_subject, tt.thread_lastpost FROM ".DB_THREADS." tt
INNER JOIN ".DB_FORUMS." tf ON tt.forum_id=tf.forum_id
WHERE ".groupaccess('forum_access')." ORDER BY thread_lastpost DESC LIMIT 5
");
if (dbrows($result)) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['thread_subject'], 23);
echo THEME_BULLET." <a href='".FORUM."viewthread.php?thread_id=".$data['thread_id']."' title='".$data['thread_subject']."'>$itemsubject</a><br />\n";
}
} else {
echo "<div style='text-align:center'>".$locale['global_023']."</div>\n";
}
echo "<strong>".$locale['global_022']."</strong>\n";
list($min_posts) = dbarraynum(dbquery("SELECT thread_postcount FROM ".DB_THREADS." ORDER BY thread_postcount DESC LIMIT 4,5"));
$result = dbquery("
SELECT tf.forum_id, tt.thread_id, tt.thread_subject, tt.thread_postcount
FROM ".DB_FORUMS." tf
INNER JOIN ".DB_THREADS." tt USING(forum_id)
WHERE ".groupaccess('forum_access')." AND tt.thread_postcount >= '$min_posts'
ORDER BY thread_postcount DESC, thread_lastpost DESC LIMIT 5
");
if (dbrows($result) != 0) {
echo "\n";
while($data = dbarray($result)) {
$itemsubject = trimlink($data['thread_subject'], 20);
echo "\n>".THEME_BULLET." <a href='".FORUM."viewthread.php?thread_id=".$data['thread_id']."' title='".$data['thread_subject']."' >$itemsubject</a></td>\n";
}
echo "</table>\n";
} else {
echo "<div style='text-align:center'>".$locale['global_023']."</dd></div>\n";
}
echo "</dl></div><div id='mistrzowie'>
<dl>
<dt>Mistrzowie Aikido</dt>
</dl>
<div id='ttt1'> </div>
<div id='ttt2'>
<ul id='menu12'>
<li style='margin-left:96px;' ><a href='link1.html'>Morihei Ueshiba</a></li>
</ul>
</div>
<div id='ttt3'>
<ul id='menu123' >
<li><a href='link1.html'>Więcej!!</a></li>
</ul>
</div>
</div>
</div>";
//Rozmieszczenie strony//
echo"<div id='cont' class='clearfix $main_style'>
".(LEFT ? "<div id='menudol'>".LEFT."</div>" : "")."
<div id='newsydol'><div id='container'>".U_CENTER.CONTENT.L_CENTER."
</div>
</div>
<div id='stopka'>
Wykonanie Projekt/Szablon Xorx<br />
Code- Karol Kucharski</div>";
}
// Stopka //
function render_news($subject, $news, $info) {
global $locale;
opentable($subject);
echo "<div class='news2'>".$news."</div>
<div class='news3'>
".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) { // Nagłówki Newsow oraz artykułów
echo "<div id='d1'>$title</div>\n";
echo "<div id='news2'>\n";
}
function closetable() {
echo "</div></div>\n";
echo "<div id='news3'>\n";
}
function openside($title, $collapse = false, $state = "on") { // Panele Poczne
global $panel_collapse; $panel_collapse = $collapse;
echo "\n";
if ($collapse == true) {
$boxname = str_replace(" ", "", $title);
echo "".panelbutton($state,$boxname)."</div>\n";
}
echo "<div id='d1'>".$title."</div>\n"; // Nagłówki w Panelach
echo "<div id='d2'>\n"; // Tekst w panelach
if ($collapse == true) { echo panelstate($state, $boxname); }
}
function closeside($collapse = false) {
global $panel_collapse;
if ($panel_collapse == true) { echo "</div>\n"; }
echo "</div><br />\n";
}
?>
Plik styles.css:
body {
margin-left:0px;
margin-right:0px;
margin-bottom:0px;
margin-top:0px;
background-color:#686464;
font-family:Verdana;
}
#cala {
width: 982px;
margin-right: auto;
margin-left: auto;
}
#logo {
height: 231px;
width: 982px;
border: 1px dotted #FFFFFF;
margin-top: 10px;
}
#cz1 {
height: 95px;
width: 982px;
background:url(images/strona-aikido_03.png);
}
#cz2 {
height: 136px;
width: 982px;
background:url(images/strona-aikido_03-02.png);
font-size: 10px;
color: #FFFFFF;
text-indent: 200px;
}
#lewo {
height: 95px;
width: 690px;
float: left;
}
#prawo {
height: 95px;
width: 292px;
float: right;
}
#belka {
height: 227px;
width: 982px;
margin:0px;
padding:0px;
background-image: url(images/strona-aikido33_08.png);
background-repeat: repeat-x;
margin-top: 5px;
border: 1px solid #423f3f;
}
#reklama {
float: left;
height: 227px;
width: 327px;
border-right-width: 1px;
border-right-style: dashed;
border-right-color: #CCCCCC;
}
#forum {
height: 227px;
width: 327px;
float: left;
margin-left:20px;
border-right-width: 1px;
border-right-style: dashed;
border-right-color: #CCCCCC;
}
#mistrzowie {
float: right;
height: 227px;
width: 298px;
background-image: url(images/strona-aikidoTT_09.png);
background-repeat: no-repeat;
}
#ttt1 {
height: 130px;
width: 300px;
background-image: url(images/ush11_09.png);
background-repeat: no-repeat;
background-position: 105px;
}
#ttt2 {
height: 25px;
width: 300px;
}
#ttt3 {
height: 28px;
background-repeat: no-repeat;
margin-top: 12px;
margin-right: 5px;
margin-left: 88px;
margin-bottom: 2px;
background-position: 28px 0px;
width: 115px;
background-color: #666666;
border: 1px solid #423f3f;
}
#dol {
width: 982px;
margin-top: 10px;
}
#menudol {
margin-top:7px;
float: left;
width: 220px;
height: auto;
font-family: Verdana;
font-size: 12px;
color: #FFFFFF;
}
#stopka {
clear: both;
width: 941px;
background-image: url(images/stopa_09.png);
background-repeat: repeat-x;
height: 25px;
border: 1px solid #423f3f;
padding-top: 15px;
padding-left: 20px;
padding-right: 20px;
color: #918e8e;
font-family:Verdana;
text-align:center;
text-decoration:underline;
font-size: 12px;
display: block;
margin-bottom:20px;
}
#d2 {
height: auto;
background-image: url(images/mennu_11.gif);
background-repeat: repeat-y;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-right-color: #000000;
border-bottom-color: #000000;
border-left-color: #000000;
padding-top: 5px;
padding-bottom: 5px;
padding-left: 20px;
padding-right: 20px;
}
#newsydol {
float: right;
height: auto;
margin-top:7px;
width: 732px;
font-family: Verdana;
font-size: 12px;
color: #FFFFFF;
margin-bottom: 20px;
}
#news1 {
background-image: url(images/m22_09.png);
background-repeat: repeat-x;
border: 1px solid #000000;
text-align: center;
height: 26px;
width: 680px;
padding-top: 8px;
font-weight: bolder;
text-decoration: underline;
}
#news2 {
background-image: url(images/news_09.png);
background-repeat: repeat-y;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-bottom-style: dashed;
border-left-style: solid;
border-right-color: #000000;
border-bottom-color: #CCCCCC;
border-left-color: #000000;
padding-top: 10px;
padding-right: 20px;
padding-bottom: 10px;
padding-left: 20px;
}
#news3 {
padding-top: 10px;
padding-right: 20px;
padding-bottom: 10px;
padding-left: 20px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-right-color: #000000;
border-bottom-color: #000000;
border-left-color: #000000;
background-image: url(images/news_09.png);
background-repeat: repeat-y;
}
#d1 {
background-image: url(images/m22_09.png);
background-repeat: repeat-x;
height: 26px;
border: 1px solid #000000;
text-align: center;
padding-top: 8px;
text-decoration: underline;
font-family: Verdana;
font-size: 12px;
font-weight: bold;
color: #FFFFFF;
}
html {font-size: 75%;}
* html body{
width: 100%;
overflow: hidden;
}
#body2 {
background: #fff;
color: #3d3d3d;
}
* {
font-family: Verdana, Arial, Sans, sans-serif;
margin: 0;
padding: 0;
border: 0;
font-size: 1em;
}
/*Linki*/
a {
color : #000000;
text-decoration : none;
}
a:hover {
color : #333333;
text-decoration : none;
}
a.side {
color : #ffffff;
text-decoration : none;
}
a:hover.side {
color : #333333;
text-decoration : none;
}
a.white {
color : #ccc;
text-decoration : none;
}
a:hover.white {
color : #ccc;
text-decoration : underline;
}
#main-bg {
width:799px;
padding-top:10px;
z-index: 3;
}
#side-border-left {
width: 200px;
padding: 0.5em 0 0 0.5em;
z-index: 1;
float: left;
display: inline;
}
.side-both #main-bg {margin: 0 190px;}
/*Misc Styles*/
.pagenav {padding: 0.4em;}
.pagenav span, .pagenav a, .pagenav a:hover {
color: #ccc;
border: 1px solid #ccc;
padding: 0.2em 0.4em 0.2em 0.4em;
margin: 0.2em;
text-decoration: none;
}
.pagenav a {
color: #333;
}
.switcherbutton {
height: 16px;
width: 16px;
}
.textbox, .button {
color: #555;
background: #fff;
border: 1px solid #ddd;
font-size: 1em;
margin-top: 0.1em;
padding: 0.25em;
}
.textbox:focus {
color: #333;
border-color: #999;
}
.button{
color: #aaa;
}
.bbcode{
background: #fff;
border: 1px solid #ddd;
}
.news-category {
float: left;
margin: 0.2em 0.5em 0 0;
}
#side-border-right .panelbody {
border-right: 3px solid #ccc;
}
#side-border-left .panelbody {
}
.cbr {
background: url(images/cbr.png) no-repeat bottom right;
height: 1%;
padding: 0.95em 0.95em;
}
.code_bbcode div{
border: 1px solid #ddd;
border-left: 3px solid #ccc;
}
.code_bbcode div.tbl2{border-bottom: none;}
/*Admin*/
.quote,.admin-message {
border: 1px solid #ddd;
border-left: 3px solid #ccc;
background: #f3f3f3;
margin: 0 2em;
padding: 3pt;
}
.admin-message{
color: #999;
padding: 0.5em;
margin: 1em auto;
width: 70%;
}
/* Shoutbox*/
.shoutboxname, .comment-name {font-weight: 700;}
.shoutboxdate {
color:red ;
font-size: 0.8em;
}
.small,.small2,.side-small {font-size: 0.9em;}
/*Częśc dotycząca oprawy np: formularzy, fora */
.tbl-border{
background: #f0f0f0;
border: 1px solid #f5f2eb;
}
.tbl,.tbl1,.tbl2,.forum-caption {padding: 3pt;}
.forum-caption { /*Forum- dekoracja kategorji */
color: #666;
font-variant: small-caps;
font-weight: 700;
background: #eee;
}
h1,h2,h3,h4,h5,h6 {font-size:20px;}
/*Helpers*/
.center {margin: 0 auto;}
.content_center {text-align: center;}
Pieka jeśli coś się nie zgadza proszę napisz a na pewno zmienię..
Edytowane przez Pieka dnia 29.05.2010 17:44:30
|