Przedszkolak
Postów: 55 Ostrzeżeń: 3
v7.02.05 Data rejestracji: 16.02.2008 18:53
|
Witam Serdecznie!
Mam problem z którym borykam się już od pewnego czasu i nie mam żadnego pomysłu jak by go rozwiązać. Mój wygląd newsów wygląda w tej chwili tak:
Chciałbym zmienić cały wygląd newsów na taki:
Czy ktoś mógłby mnie nakierować, aby dokonać takiej zmiany w wyglądzie newsów ?
theme.php
<?php
/*-------------------------------------------------------+
| PHP-Fusion 7 Content Management System
| Copyright © 2002 - 2007 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Theme: Nordic Gold Theme
| Version: 1.0 for PHP-Fusion v7
| Author: TNGrafik
| Home: http://www.lemvig.info
| Note: It is a fixed theme and will not work right
| if width is changed.
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
define("THEME_BULLET", "<span class='bullet'>·</span>");
require_once INCLUDES."theme_functions_include.php";
function render_page($license=false) {
global $settings, $main_style, $locale;
$theme_width = 1180;
//Header
echo "<table cellpadding='0' cellspacing='0' align='center' width='$theme_width'>\n<tr>\n";
echo "<td class='sub-header-left' width='30'>\n</td>\n";
echo "<td class='sub-header' align='right'><iframe src='".THEME."clock/clock2.htm' width='250' height='22' allowtransparency='true' frameborder='0' scrolling='no' marginwidth='0' marginheight='0' style='align:right;margin-right:130px;' /></iframe></td>\n";
echo "<td class='sub-header-right' width='30'>\n</td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' align='center' width='$theme_width'>\n<tr>\n";
//echo "<td class='full-header'>\n".showbanners()."</td>\n";
echo "<td class='full-header'>";
//Delete this section to remove the Theme logo//
echo "<div style='position:relative;'><a href='".BASEDIR."index.php'><img src='".THEME."images/liverpool_logo.png' border='0' alt='Liverpool Theme by TNGrafik' title='Liverpool Theme by TNGrafik' style='position:absolute;top:-124px;left:22px;' /></a>
</div>";
//Delete this section to remove Theme logo//
echo "<div style='position:relative;'><a href='".BASEDIR."index.php'><img src='".THEME."images/liverpool_logo2.png' border='0' alt='Liverpool Theme by TNGrafik' title='Liverpool Theme by TNGrafik' style='position:absolute;top:-106px;left:224px;' /><img src='".THEME."images/player2.png' border='0' style='position:absolute;top:-103px;left:864px;' /></a></div></td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' align='center' width='$theme_width'>\n<tr>\n";
echo "<td class='sub-header' width='180'>\n</td>\n";
echo "<td class='sub-header'>".showsublinks("<img src='".THEME."images/white_bullet.gif'>","white")."</div></td>\n";
echo "<td class='sub-header' width='30'>\n</td>\n";
echo "</tr>\n</table>\n";
//Content
echo "<table cellpadding='0' cellspacing='0' align='center' width='$theme_width' class='$main_style'>\n<tr>\n";
if (LEFT) { echo "<td class='side-border-left' valign='top'>".LEFT."</td>"; }
echo "<td class='main-bg' valign='top'><div style='position:relative;'><img src='".THEME."images/main_left.gif' border='0' style='position:absolute;top:-6px;left:-4px;' /></div><div style='position:relative;'><img src='".THEME."images/main_right.gif' border='0' style='position:absolute;top:-6px;right:-4px;' /></div>".U_CENTER.CONTENT.L_CENTER."</td>";
if (RIGHT) { echo "<td class='side-border-right' valign='top'>".RIGHT."</td>"; }
echo "</tr>\n</table>\n";
//Footer
echo "<table cellpadding='0' cellspacing='0' width='$theme_width' align='center'>\n<tr>\n";
echo "<td class='full-header'>\n";
echo "<div style='position:relative;'><img src='".THEME."images/player1.png' border='0' style='position:absolute;top:-212px;left:-14px;' /></div><div style='position:relative;'><img src='".THEME."images/liverpool_logo3.png' border='0' style='position:absolute;top:-65px;left:1015px;' /></div></td>";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='$theme_width' align='center'>\n<tr>\n";
echo "<td class='sub-header-left-1' width='30'>\n</td>\n";
echo "<td class='sub-header-down' width='$theme_width' align='left'><a target='_blank' href='http://www.lemviginfo.dk'><img src='".THEME."images/theme_logo.png' border='0' align='left'></a></td>\n";
echo "<td class='sub-header-right-1' width='30'>\n</td></tr>\n";
echo "<tr>\n";
echo "<td class='main-footer' colspan='3' align='center'>".stripslashes($settings['footer']);
if (!$license) { echo "<br />\n".showcopyright(); }
echo "</td>\n";
echo "</tr>\n</table>\n";
}
function render_news($subject, $news, $info) {
global $locale, $data;
if ($data['news_sticky']==1) { echo" <h1> NAJNOWSZA WIADOMOŚĆ !! </h1>"; }
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='capmain-left'></td>\n";
echo "<td class='capmain'>".$subject."</td>\n";
echo "<td class='capmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table width='100%' cellpadding='0' cellspacing='0' class='spacer'>\n<tr>\n";
echo "<td class='main-body middle-border'>".$info['cat_image'].$news."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td align='center' class='news-footer middle-border'>\n";
echo newsposter($info," ·").newsopts($info,"·").itemoptions("N",$info['news_id']);
echo "</td>\n";
echo "</tr><tr>\n";
echo "<td style='height:2px;background-color:#00A398;'></td>\n";
echo "</tr>\n</table>\n";
}
function render_article($subject, $article, $info) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n<tr>\n";
echo "<td class='capmain-left'></td>\n";
echo "<td class='capmain'>".$subject."</td>\n";
echo "<td class='capmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table width='100%' cellpadding='0' cellspacing='0' class='spacer'>\n<tr>\n";
echo "<td class='main-body middle-border'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td align='center' class='news-footer'>\n";
echo articleposter($info," ·").articleopts($info,"·").itemoptions("A",$info['article_id']);
echo "</td>\n</tr>\n</table>\n";
}
function opentable($title) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='capmain-left'></td>\n";
echo "<td class='capmain' align='center'>".$title."</td>\n";
echo "<td class='capmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>\n<tr>\n";
echo "<td class='main-body'>\n";
}
function closetable() {
echo "</td>\n";
echo "</tr><tr>\n";
echo "<td style='height:2px;background-color:#00A398;'></td>\n";
echo "</tr>\n</table>\n";
}
function openside($title, $collapse = false, $state = "on") {
global $panel_collapse; $panel_collapse = $collapse;
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='scapmain-left'></td>\n";
echo "<td class='scapmain' align='center'>$title</td>\n";
if ($collapse == true) {
$boxname = str_replace(" ", "", $title);
echo "<td class='scapmain' align='right'>".panelbutton($state, $boxname)."</td>\n";
}
echo "<td class='scapmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>\n<tr>\n";
echo "<td class='side-body'>\n";
if ($collapse == true) { echo panelstate($state, $boxname); }
}
function closeside() {
global $panel_collapse;
if ($panel_collapse == true) { echo "</div>\n"; }
echo "</td>\n</tr>\n</table>\n";
}
?>
news.php
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: news.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
// Predefined variables, do not edit these values
$i = 0;
// Number of news displayed
$items_per_page = $settings['newsperpage'];
add_to_title($locale['global_200'].$locale['global_077']);
if (!isset($_GET['readmore']) || !isnum($_GET['readmore'])) {
$rows = dbcount(
"(news_id)",
DB_NEWS,
groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().")
AND (news_end='0'||news_end>=".time().")
AND news_draft='0'"
);
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($rows) {
$result = dbquery(
"SELECT tn.*, tc.*, tu.user_id, tu.user_name, tu.user_status
FROM ".DB_NEWS." tn
LEFT JOIN ".DB_USERS." tu ON tn.news_name=tu.user_id
LEFT JOIN ".DB_NEWS_CATS." tc ON tn.news_cat=tc.news_cat_id
WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().")
AND (news_end='0'||news_end>=".time().") AND news_draft='0'
GROUP BY news_id
ORDER BY news_sticky DESC, news_datestamp DESC LIMIT ".$_GET['rowstart'].",".$items_per_page
);
$numrows = dbrows($result);
echo "<div id='accordion'>";
while ($data = dbarray($result)) {
$i++;
$comments = dbcount("(comment_id)", DB_COMMENTS." WHERE comment_type='N' AND comment_hidden='0' AND comment_item_id='".$data['news_id']."'");
$news_cat_image = "";
$news_subject = "<a name='news_".$data['news_id']."' id='news_".$data['news_id']."'></a>".stripslashes($data['news_subject']);
$news_cat_image = "<a href='".FUSION_SELF."?readmore=".$data['news_id']."'>";
if ($data['news_image_t2'] && $settings['news_image_frontpage'] == 0) {
$news_cat_image .= "<img src='".IMAGES_N_T.$data['news_image_t2']."' alt='".$data['news_subject']."' class='news-category' /></a>";
} elseif ($data['news_cat_image']) {
$news_cat_image .= "<img src='".get_image("nc_".$data['news_cat_name'])."' alt='".$data['news_cat_name']."' class='news-category' /></a>";
} else {
$news_cat_image = "";
}
$news_news = $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_news'])) : stripslashes($data['news_news']);
$news_info = array(
"news_id" => $data['news_id'],
"user_id" => $data['user_id'],
"user_name" => $data['user_name'],
"user_status" => $data['user_status'],
"news_date" => $data['news_datestamp'],
"cat_id" => $data['news_cat'],
"cat_name" => $data['news_cat_name'],
"cat_image" => $news_cat_image,
"news_subject" => $data['news_subject'],
"news_ext" => $data['news_extended'] ? "y" : "n",
"news_reads" => $data['news_reads'],
"news_comments" => $comments,
"news_allow_comments" => $data['news_allow_comments'],
"news_sticky" => $data['news_sticky']
);
echo "<!--news_prepost_".$i."-->\n";
render_news($news_subject, $news_news, $news_info);
}
echo "<!--sub_news_idx-->\n";
if ($rows > $items_per_page) echo "<div align='center' style=';margin-top:5px;'>\n".makepagenav($_GET['rowstart'],$items_per_page,$rows,3)."\n</div>\n";
} else {
opentable($locale['global_077']);
echo "<div style='text-align:center'><br />\n".$locale['global_078']."<br /><br />\n</div>\n";
closetable();
}
} else {
$result = dbquery(
"SELECT tn.*, tc.*, tu.user_id, tu.user_name, tu.user_status FROM ".DB_NEWS." tn
LEFT JOIN ".DB_USERS." tu ON tn.news_name=tu.user_id
LEFT JOIN ".DB_NEWS_CATS." tc ON tn.news_cat=tc.news_cat_id
WHERE ".groupaccess('news_visibility')." AND news_id='".$_GET['readmore']."' AND news_draft='0'
LIMIT 1"
);
if (dbrows($result)) {
include INCLUDES."comments_include.php";
include INCLUDES."ratings_include.php";
$data = dbarray($result);
if (!isset($_POST['post_comment']) && !isset($_POST['post_rating'])) {
$result2 = dbquery("UPDATE ".DB_NEWS." SET news_reads=news_reads+1 WHERE news_id='".$_GET['readmore']."'");
$data['news_reads']++;
}
$news_cat_image = "";
$news_subject = $data['news_subject'];
if ($data['news_image_t1'] && $settings['news_image_readmore'] == "0") {
$img_size = @getimagesize(IMAGES_N.$data['news_image']);
$news_cat_image = "<a href=\"javascript:;\" onclick=\"window.open('".IMAGES_N.$data['news_image']."','','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=".($img_size[0]+20).",height=".($img_size[1]+20)."')\"><img src='".IMAGES_N_T.$data['news_image_t1']."' alt='".$data['news_subject']."' class='news-category' /></a>";
} elseif ($data['news_cat_image']) {
$news_cat_image = "<a href='news_cats.php?cat_id=".$data['news_cat']."'><img src='".get_image("nc_".$data['news_cat_name'])."' alt='".$data['news_cat_name']."' class='news-category' /></a>";
}
$news_news = stripslashes(parseubb($data['news_extended'] ? "<table><tr><td>".$data['news_news']."</td></tr><tr><td><br /><br />".$data['news_extended']."</td></tr></table>" : $data['news_news']));
if ($data['news_breaks'] == "y") { $news_news = nl2br($news_news); }
$news_info = array(
"news_id" => $data['news_id'],
"user_id" => $data['user_id'],
"user_name" => $data['user_name'],
"user_status" => $data['user_status'],
"news_date" => $data['news_datestamp'],
"cat_id" => $data['news_cat'],
"cat_name" => $data['news_cat_name'],
"cat_image" => $news_cat_image,
"news_subject" => $data['news_subject'],
"news_ext" => "n",
"news_reads" => $data['news_reads'],
"news_comments" => dbcount("(comment_id)", DB_COMMENTS, "comment_type='N' AND comment_item_id='".$data['news_id']."' AND comment_hidden='0'"),
"news_allow_comments" => $data['news_allow_comments'],
"news_sticky" => $data['news_sticky']
);
add_to_title($locale['global_201'].$news_subject);
echo "<!--news_pre_readmore-->";
render_news($news_subject, $news_news, $news_info);
echo "<!--news_sub_readmore-->";
if ($data['news_allow_comments']) { showcomments("N", DB_NEWS, "news_id", $_GET['readmore'], FUSION_SELF."?readmore=".$_GET['readmore']); }
if ($data['news_allow_ratings']) { showratings("N", $_GET['readmore'], FUSION_SELF."?readmore=".$_GET['readmore']); }
} else {
redirect(FUSION_SELF);
}
}
require_once THEMES."templates/footer.php";
?>
Z góry dziękuję za pomoc.
Pozdrawiam
P.S Skórka na której pracuję nazywa się "Liverpool Theme by TN Grafik". Nie pamiętam gdzie ją znalazłem, ale używając szukajki google nie mogę jej znaleźć. Wiem, że w theme jest nazwa skórki, dokładniej "Nordic Gold Theme" ale i takowej nie sposób znaleźć w googlach.
P.S2 Nie wiem czy w dobrym dziale utworzyłem temat. W razie w. proszę o przeniesienie. Pozdrawiam
PW od moderatora:
- Ogólna uwaga - bogdan 03.07.2012 19:07
|