Logo linkiem do news.php
|
Seraf |
Dodany dnia 21.05.2008 15:44:49
|
Przedszkolak
Postów: 82
Data rejestracji: 09.02.2006 20:11
|
Jak to zrobić by logo strony na górze było linkiem do news.php?
PW od moderatora:
- Zmiana nazwy tematu - piotrek199214 21.05 - 16:10
Edytowane przez piotrek199214 dnia 21.05.2008 16:33:14
|
|
|
|
Wścibski Gość |
Dodany dnia 22.12.2024 21:29:31
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
kefirek |
Dodany dnia 21.05.2008 15:56:16
|
Zaawansowany
Postów: 1191 Pomógł: 418 Ostrzeżeń: 1
v6.00.xxx Data rejestracji: 06.04.2008 21:59
|
Daj kod theme to ci zrobię.
Edytowane przez szymon dnia 21.05.2008 16:32:15
|
|
|
|
Seraf |
Dodany dnia 21.05.2008 16:01:46
|
Przedszkolak
Postów: 82
Data rejestracji: 09.02.2006 20:11
|
<?
/*--------------------------------------------+
| PHP-Fusion v6 - Content Management System |
|---------------------------------------------|
| author: Nick Jones (Digitanium) © 2002-2005 |
| web: http://www.php-fusion.co.uk |
| email: |
|---------------------------------------------|
| Released under the terms and conditions of |
| the GNU General Public License (Version 2) |
+--------------------------------------------*/
/*--------------------------------------------+
| The PFT Red Theme for PHP-Fusion v6 |
|---------------------------------------------|
| author: PHP-Fusion Themes - Shedrock © 2005 |
| web: http://phpfusion.org |
| email: |
|---------------------------------------------|
| Released under the terms and conditions of |
| the GNU General Public License (Version 2) |
+--------------------------------------------*/
/************************/
/* Theme Settings */
/************************/
$body_text = "#000000";
$body_bg = "#EDEDED";
$theme_width = "100%";
$theme_width_l = "165";
$theme_width_r = "165";
function render_header($header_content) {
global $theme_width,$settings;
echo "<table class='forumline' align='center' width='900' cellspacing='0' cellpadding='0'>";
echo "<tr><td><table align='center' width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr><td><table align='center' width='100%' cellspacing='1' cellpadding='0'>";
echo "<tr><td class='header' style='background-color:#E7E7E7;padding:5px;'>";
// Start banner code
echo "<table width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr><td>$header_content</td>";
echo "</tr></table></tr></td></table>\n";
// End banner code
echo "<table width='100%' cellspacing='0' cellpadding='0'>\n<tr>";
echo "<td class='sub-header'>\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 " <img alt='' src='".THEME."images/bullet.gif'> \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 class='white' href='".$data['link_url']."'".$link_target.">".$data['link_name']."</a>";
} else {
echo "<a class='white' href='".BASEDIR.$data['link_url']."'".$link_target.">".$data['link_name']."</a>";
}
}
$i++;
}
}
}
echo ($i == 0 ? " " : "")."</td>";
echo "<td align='right' class='sub-header'>".ucwords(showdate($settings['subheaderdate'], time()))."";
echo "</td></tr></table>\n";
echo "<table width='100%' cellpadding='4' bgcolor='#F8F8F8' cellspacing='0' border='0'>";
}
function render_footer($license=false) {
global $theme_width,$locale,$settings;
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'><tr>";
echo "<td>".stripslashes($settings['footer'])."</td>";
echo "</tr></table></td></tr></table><br>";
echo "<table cellSpacing='0' cellPadding='2' width='100%' border='0'>";
echo "<tr><td width='32%' class='footer' align='left'><div align='left'>";
if ($license == false) {
echo "Powered by <a target='_blank' href='http://www.php-fusion.co.uk'><img alt='' src='".THEME."images/fusion.gif' style='vertical-align:middle;'></a> v".$settings['version']." © 2003-2005";
}
echo "</div></td>";
echo "<td width='35%' class='footer' align='center'>";
echo "The PFT Red Theme by: <a target='_blank' href='http://phpfusion.org/'><img alt='' src='".THEME."images/fthemes.gif' style='vertical-align:middle;'></a></td>";
echo "<td width='33%' class='footer' align='right'>";
echo "<font class='clock'><b>".$settings['counter']." </b></font>".($settings['counter'] == 1 ? $locale['140']."\n" : $locale['141']."\n");
echo "</td></tr></table>";
}
function render_news($subject, $news, $info) {
global $locale;
echo "<table class='news-border' border='0' cellspacing='1' width='100%' cellpadding='1'><tr>";
echo "<td class='table-cellpic'>$subject</td>";
echo "</tr></table>";
echo "<table width='100%' cellpadding='0' cellspacing='0' class='border'><tr>";
echo "<td><table width='100%' cellpadding='0' cellspacing='0'><tr>";
echo "<td class='main-body'>$news</td></tr></table>";
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr>";
echo "<td class='news-footer'>";
echo "".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> ";
echo "".$locale['041'].showdate("longdate", $info['news_date'])." </td>";
echo "<td height='24' align='right' class='news-footer'>";
echo "".($info['news_ext'] == "y" ? "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ·\n" : "")."";
if ($info['news_allow_comments'])
echo "<a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].$locale['043']."</a> · ";
echo "".$info['news_reads'].$locale['044']." ";
echo "<a href='print.php?type=N&item_id=".$info['news_id']."'><img alt='' src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;' style='vertical-align:middle;'></a>";
echo "</td></tr></table></td></tr></table>\n";
}
function render_article($subject, $article, $info) {
global $locale;
echo "<table class='news-border' border='0' cellspacing='1' width='100%' cellpadding='1'><tr>";
echo "<td class='table-cellpic'>$subject</td>";
echo "</tr></table>";
echo "<table width='100%' cellpadding='0' cellspacing='0' class='border'><tr>";
echo "<td><table width='100%' cellpadding='0' cellspacing='0'><tr>";
echo "<td class='main-body'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."";
echo "</td></tr></table>";
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr>";
echo "<td class='news-footer'>";
echo "".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> ";
echo "".$locale['041'].showdate("longdate", $info['article_date'])."</td>";
echo "<td height='24' align='right' class='news-footer'>";
if ($info['article_allow_comments']) echo $info['article_comments'].$locale['043']." · ";
echo "".$info['article_reads'].$locale['044']." ";
echo "<a href='print.php?type=A&item_id=".$info['article_id']."'><img alt='' src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;' style='vertical-align:middle;'></a>";
echo "</td></tr></table></td></tr></table>\n";
}
// Open table begins
function opentable($title) {
echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>";
echo "<tr><td width='100%'><table class='panel-border' cellSpacing='0' cellPadding='1' width='100%' border='0'>";
echo "<tr><th width='100%'><div class='table-cellpic' align='left'>$title</div></th></tr>";
echo "<tr><td class='main-body' width='100%' bgColor='#EDEDED'>";
}
// Close table end
function closetable() {
echo "</td></tr></table></td></tr></table>";
}
function openside($title) {
echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>";
echo "<tr><td width='100%'><table class='panel-border' cellSpacing='0' cellPadding='1' width='100%' border='0'>";
echo "<tr><th width='100%'><div class='panel-cellpic' align='left'>$title</div></th></tr>";
echo "<tr><td class='side-body' width='100%' bgColor='#EDEDED'>";
}
function closeside() {
echo "</td></tr></table></td></tr></table>";
tablebreak();
}
function opensidex($title,$open="on") {
$boxname = str_replace(" ", "", $title);
$box_img = $open == "on" ? "off" : "on";
echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>";
echo "<tr><td width='100%'><table class='panel-border' cellSpacing='0' cellPadding='1' width='100%' border='0'>";
echo "<tr><th width='100%'>";
echo "<div class='panel-cellpic' align='center'><img align='right' src='".THEME."images/panel_$box_img.gif' name='b_$boxname' alt='' onclick=\"javascript:flipBox('$boxname')\">$title</div>";
echo "</th></tr>";
echo "<tr><td class='side-body' width='100%' bgColor='#EDEDED'>";
echo "<div id='box_$boxname'".($open=="off"?" style='display:none'":"").">\n";
}
function closesidex() {
echo "</td></tr></table></td></tr></table>";
tablebreak();
}
// Table functions
function tablebreak() {
echo "<table width='100%' cellspacing='0' cellpadding='0'><tr><td height='8'></td></tr></table>\n";
}
?>
Dziękuję z góry za pomoc.
Edytowane przez szymon dnia 21.05.2008 16:32:42
|
|
|
|
kefirek |
Dodany dnia 21.05.2008 16:11:17
|
Zaawansowany
Postów: 1191 Pomógł: 418 Ostrzeżeń: 1
v6.00.xxx Data rejestracji: 06.04.2008 21:59
|
Dodaj w swoim kodzie theme.php to co na czerwono i zobacz czy działa
<?
/*--------------------------------------------+
| PHP-Fusion v6 - Content Management System |
|---------------------------------------------|
| author: Nick Jones (Digitanium) © 2002-2005 |
| web: http://www.php-fu... |
| email: |
|---------------------------------------------|
| Released under the terms and conditions of |
| the GNU General Public License (Version 2) |
+--------------------------------------------*/
/*--------------------------------------------+
| The PFT Red Theme for PHP-Fusion v6 |
|---------------------------------------------|
| author: PHP-Fusion Themes - Shedrock © 2005 |
| web: http://phpfusion.org |
| email: |
|---------------------------------------------|
| Released under the terms and conditions of |
| the GNU General Public License (Version 2) |
+--------------------------------------------*/
/************************/
/* Theme Settings */
/************************/
$body_text = "#000000";
$body_bg = "#EDEDED";
$theme_width = "100%";
$theme_width_l = "165";
$theme_width_r = "165";
function render_header($header_content) {
global $theme_width,$settings;
echo "<table class='forumline' align='center' width='900' cellspacing='0' cellpadding='0'>";
echo "<tr><td><table align='center' width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr><td><table align='center' width='100%' cellspacing='1' cellpadding='0'>";
echo "<tr><td class='header' style='background-color:#E7E7E7;padding:5px;'>";
// Start banner code
echo "<table width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr><td>[color=red][b]<a href='".BASEDIR."news.php'><img src='$header_content'/></a>[/b][/color]</td>";
echo "</tr></table></tr></td></table>\n";
// End banner code
echo "<table width='100%' cellspacing='0' cellpadding='0'>\n<tr>";
echo "<td class='sub-header'>\n";
$result = dbquery("SELECT * FROM ".DB_PREFIX."site_links WHERE link_position>='2' ORDER BY link_order");
Edytowane przez kefirek dnia 21.05.2008 16:11:53
|
|
|
|
Seraf |
Dodany dnia 21.05.2008 16:19:40
|
Przedszkolak
Postów: 82
Data rejestracji: 09.02.2006 20:11
|
Zrobiłem to i był błąd. Nie działa niestety. |
|
|
|
piotrek199214 |
Dodany dnia 21.05.2008 16:21:45
|
Bywalec
Postów: 977 Pomógł: 168
v7.01.05 Data rejestracji: 17.12.2007 21:05
|
Proszę sprawdzić tak:
<a href='".BASEDIR."/news.php'><img src='$header_content'/>
Sprawdź ten drugi kod, bo tamten był od mego zmienionego thema.
Tam gdzie to kefirek zaznaczył na czerwono.
Poprawiłem.
Edytowane przez piotrek199214 dnia 21.05.2008 18:01:51
Pomogłem Ci? Wystarczy podziękować i oznaczyć post jako pomocny
Tanie tworzenie wtyczek, masz problem napisz.
|
|
|
|
Seraf |
Dodany dnia 21.05.2008 16:25:54
|
Przedszkolak
Postów: 82
Data rejestracji: 09.02.2006 20:11
|
Wyskakuje błąd:
Parse error: syntax error, unexpected $end in /home/forumff/public_html/zarzew/themes/PFT-Red/theme.php on line 1
Gdy zrobię tak
[code]// Start banner code
echo "<table width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr><td><a href='".BASEDIR."/news.php'><img src='$header_content'/></a></td>";
echo "</tr></table></tr></td></table>\n";
Wyskakuje w/w bład.
wstawiamy błędy w znacznik // piotrek199214
Było dobrze. Ja źle wstawiałem kod.
<a href='news.php'><img src='$header_content'/>
Nie może być tak. Musi być cały adres strony głównej, bo jak jest się na forum i kliknie sie na baner to "nie można wyświetlić strony", gdyż w katalogu forum nie ma news.php
Edytowane przez Seraf dnia 21.05.2008 17:20:14
|
|
|
|
k@mil007 |
Dodany dnia 21.05.2008 17:43:14
|
Przedszkolak
Postów: 56 Pomógł: 5
v7.02.02 Data rejestracji: 18.05.2008 20:06
|
<a href='".BASEDIR."news.php'>
|
|
|
|
Seraf |
Dodany dnia 21.05.2008 17:49:23
|
Przedszkolak
Postów: 82
Data rejestracji: 09.02.2006 20:11
|
Pisałem już wyżej, że nie może być
<a href='".BASEDIR."news.php'>
Jak będziesz na forum i klikniesz w to, to nie wyświetli Ci strony. |
|
|
|
piotrek199214 |
Dodany dnia 21.05.2008 17:50:42
|
Bywalec
Postów: 977 Pomógł: 168
v7.01.05 Data rejestracji: 17.12.2007 21:05
|
Ma być ".BASEDIR.". Tak jak kolega wyżej napisał. Ponieważ basedir odnosi się do twojej głównej www.
Pomogłem Ci? Wystarczy podziękować i oznaczyć post jako pomocny
Tanie tworzenie wtyczek, masz problem napisz.
|
|
|
|
tubi |
Dodany dnia 21.05.2008 20:03:20
|
Przedszkolak
Postów: 34
Data rejestracji: 27.05.2007 23:47
|
<a href='".BASEDIR."news.php'>$header_content</a>
Tak działa.
Edytowane przez Pieka dnia 21.05.2008 20:05:56
|
|
|
|
bartipl |
Dodany dnia 31.08.2009 19:30:28
|
Przedszkolak
Postów: 7
Data rejestracji: 23.08.2009 01:07
|
Witam
Mógłby ktoś pomóc i wskazać w którym miejscu mam wstawić kod (link) do news.php. Poniżej kod theme. Oczywiście chodzi mi o logo na górze strony.
<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }
define("THEME_WIDTH", "1000");
define("THEME_BULLET", "<span class='bullet'>·</span>");
require_once INCLUDES."theme_functions_include.php";
//v7 sublinks
function thesublinks($sep="·",$class="") {
echo "<script type='text/javascript' src='".THEME."/fader.js'></script>";
$i = 0; $res = "";
$sres = dbquery("SELECT * FROM ".DB_PREFIX."site_links WHERE link_position>='2' AND ".groupaccess('link_visibility')." AND link_url!='---' ORDER BY link_order ASC");
if (dbrows($sres)) {
while($sdata = dbarray($sres)) {
if ($i != 0) { $res .= " ".$sep."\n"; } else { $res .= "\n"; }
$link_target = $sdata['link_window'] == "1" ? " target='_blank'" : "";
$link_class = $class ? " class='$class'" : "";
if (strstr($sdata['link_url'], "http://") || strstr($sdata['link_url'], "https://")) {
$res .= "<a href='".$sdata['link_url']."'".$link_target.$link_class.">".$sdata['link_name']."</a>";
} else {
$res .= "<a href='".BASEDIR.$sdata['link_url']."'".$link_target.$link_class.">".$sdata['link_name']."</a>";
}
$i++;
}
}
if ($i != 0) { return $res; } else { return " "; }
}
function render_page($license=false) {
global $settings, $main_style, $locale;
//Header
echo "<table cellpadding='0' cellspacing='0' width='".THEME_WIDTH."' align='center'>\n<tr>\n";
echo "<td class='full-header'></td>\n";
echo "</tr>\n</table>\n";
//sublinks css
echo "<table width='".THEME_WIDTH."' border='0' cellspacing='0' cellpadding='0' align='center'><tr><td>";
echo "<div id='altlinkler'>";
echo "<ul><li>".thesublinks("</li>\n<li>");
echo "</li></ul><div class='clear-both'> </div></div>";
echo "</td></tr></table>\n";
//Content
echo "<table cellpadding='0' cellspacing='0' width='".THEME_WIDTH."' align='center' 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'>".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 align='center' class='bottom-footer'><br />".stripslashes($settings['footer']);
if (!$license) { echo "</a>
<br />\n".showcopyright(); }
echo "</td>\n";
echo "</tr>\n</table>\n";
}
function render_news($subject, $news, $info) {
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='capmain-center-left'></td>\n";
echo "<td class='main-body middle-border'>".$news."</td>\n";
echo "<td class='capmain-center-right'></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='capmain-bottom-left'></td>\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 "<td class='capmain-bottom-right'></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='capmain-center-left'></td>\n";
echo "<td class='main-body middle-border'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td>\n";
echo "<td class='capmain-center-right'></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='capmain-bottom-left'></td>\n";
echo "<td align='center' class='news-footer'>\n";
echo articleposter($info," ·").articleopts($info,"·").itemoptions("A",$info['article_id']);
echo "</td>\n";
echo "<td class='capmain-bottom-right'></td>\n";
echo "</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'>".$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='capmain-center-left'></td>\n";
echo "<td class='main-body'>\n";
}
function closetable() {
echo "</td>\n";
echo "<td class='capmain-center-right'></td>\n";
echo "</tr><tr>\n";
echo "<td class='capmain-bottom-left'></td>\n";
echo "<td class='news-footer'></td>\n";
echo "<td class='capmain-bottom-right'></td>\n";
// echo "</tr><tr>\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'>$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='scapmain-center-left'></td>\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";
echo "<td class='scapmain-center-right'></td>\n";
echo "</tr><tr>\n";
echo "<td class='scapmain-bottom-left'></td>\n";
echo "<td class='side-footer'></td>\n";
echo "<td class='scapmain-bottom-right'></td>\n";
echo "</table>\n";
}
?>
Edytowane przez bartipl dnia 31.08.2009 19:34:15
|
|
|