Było już na tym forum o wyróżnianiu przyklejonego newsa ale było to w PHP Fusion, a wydaje mi się że struktura theme.php w PHP Fusion różni się trochę od struktury theme.php w EF.
Jak więc wyróżnić przyklejonego newsa w EF. Wstawiam theme.php z EF.
Z góry dzięki za pomoc!
<?
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
| THEME: LinuxGnomeGreen
+----------------------------------------------------+
| Copyright © 2005 Nichelini Giuseppe
| http://www.nichelini.it/
+----------------------------------------------------*/
// theme settings
$body_text = "#7CAA6A";
$body_bg = "#DFDFDF";
$theme_width = "100%";
$theme_width_l = "190";
$theme_width_r = "190";
if ($settings['locale'] == "Italian") { $mydate = "%A, %d %B %Y"; } else { $mydate = "%A, %B %d, %Y"; }
function render_header($header_content) {
global $theme_width,$settings,$mydate;
echo "<table width='$theme_width' cellspacing='0' cellpadding='0' align='center'>\n";
echo "<tr><td>\n";
echo "<table width='100%' cellspacing='0' cellpadding='0'>\n";
echo "<tr><td class='full-header'>\n";
echo "<table width='100%' cellspacing='0' cellpadding='0'>\n";
echo "<tr><td height='90' valign='middle'>".$header_content."</td>\n";
echo "</tr></table>\n";
echo "</td></tr>\n";
echo "</table>\n";
echo "<table align='center' width='$theme_width' cellspacing='0' cellpadding='0'>\n";
echo "<tr><td width='6' valign='bottom' align='left'><img border='0' src='".THEME."images/menu-left-corner.gif' width='6' height='22' alt=''></td>\n";
echo "<td background='".THEME."images/title-bluebg.gif' nowrap> <font color='#FFFFFF'><b>\n";
$result = dbquery("SELECT * FROM ".DB_PREFIX."site_links WHERE link_position>='2' ORDER BY link_order");
if (dbrows($result) != 0) {
$i = 0;
while($data = dbarray($result)) {
if (checkgroup($data['link_visibility'])) {
if ($data['link_url'] != "---") {
if ($i != 0) { echo " ·\n"; } else { echo "\n"; }
$link_target = ($data['link_window'] == "1" ? " target='_blank'" : "");
if (strstr($data['link_url'], "http://") || strstr($data['link_url'], "https://")) {
echo "<a href='".$data['link_url']."'".$link_target." class='white'>".$data['link_name']."</a>";
} else {
echo "<a href='".BASEDIR.$data['link_url']."'".$link_target." class='white'>".$data['link_name']."</a>";
}
}
$i++;
}
}
}
echo "</b></font></td>\n";
echo "<td background='".THEME."images/title-silverbg.gif'><img border='0' src='".THEME."images/title-cascade.gif' width='43' height='22' alt=''></td>\n";
echo "<td width='5%' align='right' background='".THEME."images/title-silverbg.gif' nowrap><b>".ucwords(showdate($mydate, time()))."</b></td>\n";
echo "<td width='6' valign='bottom' align='left'><img border='0' src='".THEME."images/menu-right-corner.gif' width='6' height='22' alt=''></td>\n";
echo "</tr>\n";
echo "<table width='100%' cellspacing='0' cellpadding='0'>\n<tr>\n";
}
function render_footer($license=false) {
global $theme_width,$settings,$locale;
$textfooter = $settings['counter']." ".($settings['counter'] == 1 ? $locale['140']." | \n" : $locale['141']." | \n");
if ($license == false) {
$textfooter .= "Powered by <a target='_blank' href='http://www.php-fusion.co.uk' class='white'><img src='".THEME."images/pf_green.gif' style='vertical-align:top;' alt='powered by php-fusion' border='0'></a> v".$settings['version']." © 2003-2005\n";
$textfooter .= " | Theme LinuxGnomeGreen v1.20 <a target='_blank' href='http://www.nichelini.it' class='white'><img src='".THEME."images/nick56_micro.gif' style='vertical-align:top;' alt='Design by Nick56' border='0'></a>\n";
}
echo "</tr>\n</table>\n";
echo "<table align='center' width='$theme_width' cellspacing='0' cellpadding='0'>\n";
echo "<tr><td width='100%' class='footer' _background='".THEME."images/title-bluebg.gif' nowrap align='center'><b>".$textfooter."</b></td></tr>\n";
echo "</table>\n";
}
function render_news($subject, $news, $info) {
global $locale,$mydate;
tablebreak();
echo "<table align='center' width='100%' cellspacing='0' cellpadding='0'>\n";
echo "<tr><td width='6' valign='bottom' align='left'><img border='0' src='".THEME."images/title-left-corner.gif' width='6' height='22' alt=''></td>\n";
echo "<td background='".THEME."images/title-bluebg.gif' nowrap> <font color='#FFFFFF'><b>".$subject."</b></font></td>\n";
echo "<td background='".THEME."images/title-silverbg.gif'><img border='0' src='".THEME."images/title-cascade.gif' width='43' height='22' alt=''></td>\n";
echo "<td width='5%' align='right' background='".THEME."images/title-silverbg.gif' nowrap> </td>\n";
echo "<td width='6' valign='bottom' align='left'><img border='0' src='".THEME."images/title-right-corner.gif' width='6' height='22' alt=''></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td width='6' background='".THEME."images/left-tube-bg.gif' valign='top' align='left'><img border='0' src='".THEME."images/left-tube-bg.gif' width='6' height='5' alt=''></td>\n";
echo "<td colspan='3'>".$news."</td>\n";
echo "<td width='6' background='".THEME."images/right-tube-bg.gif'><img border='0' src='".THEME."images/right-tube-bg.gif' width='6' height='5' alt=''></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td width='6' background='".THEME."images/left-tube-bg.gif' valign='top' align='left'><img border='0' src='".THEME."images/left-tube-bg.gif' width='6' height='5' alt=''></td>\n";
echo "<td valign='bottom' align='left' colspan='3'><hr>";
echo "".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>\n";
echo "".$locale['041'].showdate("longdate", $info['news_date'])."<br>\n";
echo "".($info['news_ext'] == "y" ? "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ·\n" : "");
if ($info['news_allow_comments']) echo "(".$info['news_comments'].")<a href='news.php?readmore=".$info['news_id']."'>".$locale['043']."</a> ·\n";
echo "(".$info['news_reads'].")".$locale['044']." <a href='print.php?type=N&item_id=".$info['news_id']."'>".$locale['045']."</a>\n";
echo "</td><td width='6' background='".THEME."images/right-tube-bg.gif'><img border='0' src='".THEME."images/right-tube-bg.gif' width='6' height='5' alt=''></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td width='6' valign='top' align='left' height='5'><img border='0' src='".THEME."images/bottom-left-corner.gif' width='6' height='5' alt=''></td>\n";
echo "<td width='50%' height='5' background='".THEME."images/bottom-bluebg.gif'><img border='0' src='".THEME."images/bottom-bluebg.gif' width='10' height='5' alt=''></td>\n";
echo "<td width='50%' height='5' valign='top' align='right' background='".THEME."images/bottom-bluebg.gif'><img border='0' src='".THEME."images/bottom-cascade.gif' width='23' height='5' alt=''></td>\n";
echo "<td width='75' height='5' background='".THEME."images/bottom-silverbg.gif'><img border='0' src='".THEME."images/bottom-silverbg.gif' width='10' height='5' alt=''></td>\n";
echo "<td width='6' height='5'><img border='0' src='".THEME."images/bottom-right-corner.gif' width='6' height='5' alt=''></td>\n";
echo "</tr></table>\n";
}
function render_article($subject, $article, $info) {
global $locale,$mydate;
tablebreak();
echo "<table align='center' width='100%' cellspacing='0' cellpadding='0'>\n";
echo "<tr><td width='6' valign='bottom' align='left'><img border='0' src='".THEME."images/title-left-corner.gif' width='6' height='22' alt=''></td>\n";
echo "<td background='".THEME."images/title-bluebg.gif' nowrap> <font color='#FFFFFF'><b>".$subject."</b></font></td>\n";
echo "<td background='".THEME."images/title-silverbg.gif'><img border='0' src='".THEME."images/title-cascade.gif' width='43' height='22' alt=''></td>\n";
echo "<td width='5%' align='right' background='".THEME."images/title-silverbg.gif' nowrap> </td>\n";
echo "<td width='6' valign='bottom' align='left'><img border='0' src='".THEME."images/title-right-corner.gif' width='6' height='22' alt=''></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td width='6' background='".THEME."images/left-tube-bg.gif' valign='top' align='left'><img border='0' src='".THEME."images/left-tube-bg.gif' width='6' height='5' alt=''></td>\n";
echo "<td class='storybox' colspan='3'>".$article."</td>\n";
echo "<td width='6' background='".THEME."images/right-tube-bg.gif'><img border='0' src='".THEME."images/right-tube-bg.gif' width='6' height='5' alt=''></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td width='6' background='".THEME."images/left-tube-bg.gif' valign='top' align='left'><img border='0' src='".THEME."images/left-tube-bg.gif' width='6' height='5' alt=''></td>\n";
echo "<td valign='bottom' align='left' colspan='3'><hr>";
echo "".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>\n";
echo "".$locale['041'].showdate("longdate", $info['article_date'])."<br>\n";
echo "".($info['article_ext'] == "y" ? "<a href='articles.php?readmore=".$info['article_id']."'>".$locale['042']."</a> ·\n" : "");
if ($info['article_allow_comments']) echo "(".$info['article_comments'].")<a href='articles.php?readmore=".$info['article_id']."'>".$locale['043']."</a> ·\n";
echo "(".$info['article_reads'].")".$locale['044']." <a href='print.php?type=A&item_id=".$info['article_id']."'>".$locale['045']."</a>\n";
echo "</td><td width='6' background='".THEME."images/right-tube-bg.gif'><img border='0' src='".THEME."images/right-tube-bg.gif' width='6' height='5' alt=''></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td width='6' valign='top' align='left' height='5'><img border='0' src='".THEME."images/bottom-left-corner.gif' width='6' height='5' alt=''></td>\n";
echo "<td width='50%' height='5' background='".THEME."images/bottom-bluebg.gif'><img border='0' src='".THEME."images/bottom-bluebg.gif' width='10' height='5' alt=''></td>\n";
echo "<td width='50%' height='5' valign='top' align='right' background='".THEME."images/bottom-bluebg.gif'><img border='0' src='".THEME."images/bottom-cascade.gif' width='23' height='5' alt=''></td>\n";
echo "<td width='75' height='5' background='".THEME."images/bottom-silverbg.gif'><img border='0' src='".THEME."images/bottom-silverbg.gif' width='10' height='5' alt=''></td>\n";
echo "<td width='6' height='5'><img border='0' src='".THEME."images/bottom-right-corner.gif' width='6' height='5' alt=''></td>\n";
echo "</tr></table>\n";
}
function opentable($title) {
tablebreak();
echo "<table align='center' width='100%' cellspacing='0' cellpadding='0'>\n";
echo "<tr><td width='6' valign='bottom' align='left'><img border='0' src='".THEME."images/title-left-corner.gif' width='6' height='22' alt=''></td>\n";
echo "<td background='".THEME."images/title-bluebg.gif' nowrap> <font color='#FFFFFF'><b>".$title."</b></font></td>\n";
echo "<td background='".THEME."images/title-silverbg.gif'><img border='0' src='".THEME."images/title-cascade.gif' width='43' height='22' alt=''></td>\n";
echo "<td width='5%' align='right' background='".THEME."images/title-silverbg.gif' nowrap></td>\n";
echo "<td width='6' valign='bottom' align='left'><img border='0' src='".THEME."images/title-right-corner.gif' width='6' height='22' alt=''></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td width='6' background='".THEME."images/left-tube-bg.gif' valign='top' align='left'><img border='0' src='".THEME."images/left-tube-bg.gif' width='6' height='5' alt=''></td>\n";
echo "<td class='storybox' colspan='3'>\n";
}
function closetable() {
echo "</td>\n";
echo "<td width='6' background='".THEME."images/right-tube-bg.gif'><img border='0' src='".THEME."images/right-tube-bg.gif' width='6' height='5' alt=''></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td width='6' valign='top' align='left' height='5'><img border='0' src='".THEME."images/bottom-left-corner.gif' width='6' height='5' alt=''></td>\n";
echo "<td width='50%' height='5' background='".THEME."images/bottom-bluebg.gif'><img border='0' src='".THEME."images/bottom-bluebg.gif' width='10' height='5' alt=''></td>\n";
echo "<td width='50%' height='5' valign='top' align='right' background='".THEME."images/bottom-bluebg.gif'><img border='0' src='".THEME."images/bottom-cascade.gif' width='23' height='5' alt=''></td>\n";
echo "<td width='75' height='5' background='".THEME."images/bottom-silverbg.gif'><img border='0' src='".THEME."images/bottom-silverbg.gif' width='10' height='5' alt=''></td>\n";
echo "<td width='6' height='5'><img border='0' src='".THEME."images/bottom-right-corner.gif' width='6' height='5' alt=''></td>\n";
echo "</tr></table>\n";
}
function openside($title) {
tablebreak();
echo "<table align='center' width='100%' cellspacing='0' cellpadding='0'>\n";
echo "<tr><td width='6' valign='bottom' align='left'><img border='0' src='".THEME."images/title-left-corner.gif' width='6' height='22' alt=''></td>\n";
echo "<td background='".THEME."images/title-bluebg.gif' nowrap> <font color='#FFFFFF'><b>".$title."</b></font></td>\n";
echo "<td background='".THEME."images/title-silverbg.gif'><img border='0' src='".THEME."images/title-cascade.gif' width='43' height='22' alt=''></td>\n";
echo "<td align='right' background='".THEME."images/title-silverbg.gif' nowrap> </td>\n";
echo "<td width='6' valign='bottom' align='left'><img border='0' src='".THEME."images/title-right-corner.gif' width='6' height='22' alt=''></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td width='6' background='".THEME."images/left-tube-bg.gif' valign='top' align='left'><img border='0' src='".THEME."images/left-tube-bg.gif' width='6' height='5' alt=''></td>\n";
echo "<td class='side-body' colspan='3'>\n";
}
function closeside() {
echo "</td>\n";
echo "<td width='6' background='".THEME."images/right-tube-bg.gif'><img border='0' src='".THEME."images/right-tube-bg.gif' width='6' height='5' alt=''></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td width='6' valign='top' align='left' height='5'><img border='0' src='".THEME."images/bottom-left-corner.gif' width='6' height='5' alt=''></td>\n";
echo "<td _width='50%' height='5' background='".THEME."images/bottom-bluebg.gif'><img border='0' src='".THEME."images/bottom-bluebg.gif' width='10' height='5' alt=''></td>\n";
echo "<td _width='50%' height='5' valign='top' align='right' background='".THEME."images/bottom-bluebg.gif'><img border='0' src='".THEME."images/bottom-cascade.gif' width='23' height='5' alt=''></td>\n";
echo "<td _width='75' height='5' background='".THEME."images/bottom-silverbg.gif'><img border='0' src='".THEME."images/bottom-silverbg.gif' width='10' height='5' alt=''></td>\n";
echo "<td width='6' height='5'><img border='0' src='".THEME."images/bottom-right-corner.gif' width='6' height='5' alt=''></td>\n";
echo "</tr></table>\n";
}
function opensidex($title,$open="on") {
if($open=="on"){$box_img="off";}else{$box_img="on";}
tablebreak();
echo "<table align='center' width='100%' cellspacing='0' cellpadding='0'>\n";
echo "<tr><td width='6' valign='bottom' align='left'><img border='0' src='".THEME."images/title-left-corner.gif' width='6' height='22' alt=''></td>\n";
echo "<td background='".THEME."images/title-bluebg.gif' nowrap> <font color='#FFFFFF'><b>".$title."</b></font></td>\n";
echo "<td background='".THEME."images/title-silverbg.gif'><img border='0' src='".THEME."images/title-cascade.gif' width='43' height='22' alt=''></td>\n";
echo "<td width='15%' align='right' background='".THEME."images/title-silverbg.gif' nowrap><img onclick=\"javascript:flipBox('$title')\" name='b_$title' border='0' src='".THEME."images/panel_$box_img.gif'></td>\n";
echo "<td width='6' valign='bottom' align='left'><img border='0' src='".THEME."images/title-right-corner.gif' width='6' height='22' alt=''></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td width='6' background='".THEME."images/left-tube-bg.gif' valign='top' align='left'><img border='0' src='".THEME."images/left-tube-bg.gif' width='6' height='5' alt=''></td>\n";
echo "<td class='side-body' colspan='3'>\n";
echo "<div id='box_$title'"; if($open=="off"){ echo "style='display:none'"; } echo ">\n";
}
function closesidex() {
echo "</div></td>\n";
echo "<td width='6' background='".THEME."images/right-tube-bg.gif'><img border='0' src='".THEME."images/right-tube-bg.gif' width='6' height='5' alt=''></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td width='6' valign='top' align='left' height='5'><img border='0' src='".THEME."images/bottom-left-corner.gif' width='6' height='5' alt=''></td>\n";
echo "<td width='50%' height='5' background='".THEME."images/bottom-bluebg.gif'><img border='0' src='".THEME."images/bottom-bluebg.gif' width='10' height='5' alt=''></td>\n";
echo "<td width='50%' height='5' valign='top' align='right' background='".THEME."images/bottom-bluebg.gif'><img border='0' src='".THEME."images/bottom-cascade.gif' width='23' height='5' alt=''></td>\n";
echo "<td width='75' height='5' background='".THEME."images/bottom-silverbg.gif'><img border='0' src='".THEME."images/bottom-silverbg.gif' width='10' height='5' alt=''></td>\n";
echo "<td width='6' height='5'><img border='0' src='".THEME."images/bottom-right-corner.gif' width='6' height='5' alt=''></td>\n";
echo "</tr></table>\n";
}
function tablebreak() {
global $body_bg;
echo "<table width='100%' cellspacing='0' cellpadding='0' bg_color='".$body_bg."'>
<tr><td height='8'></td></tr>
</table>\n";
}
?>
Edytowane przez piotrek027 dnia 18.07.2009 20:18:25
|