Przedszkolak
Postów: 9
Data rejestracji: 07.08.2008 09:08
|
Chciałbym podłączyć się do tematu wstawiania menu do theme.php
1. Zrobiłem menu w DHTML menu 8 i opublikowałem w Javie, tak , że mam 5 plików *.js w tym stmenu.jsktóre wrzuciłem do katalogu INCLUDES i pare obrazków *.gif które wrzuciłem do katalogu THEMES->moja_skorka (fusion5)->images.
2. W pliku theme.php mojej skórki zamieniłem:
<?
// theme settings
$body_text = "#000000";
$body_bg = "#888888";
$theme_width = "100%";
$theme_width_l = "180";
$theme_width_r = "180";
function render_header($header_content) {
global $theme_width,$settings,$locale;
echo "<table align='center' width='$theme_width' cellspacing='0' cellpadding='0' style='border:1px #444 solid'>
<tr>
<td>
<table width='100%' cellspacing='0' cellpadding='0'>
<tr>
<td class='header'>
<table width='100%' cellspacing='0' cellpadding='0'>
<tr>
<td>$header_content</td>
</tr>
</table>
</td>
</tr>
</table>\n";
echo "<table width='100%' cellspacing='0' cellpadding='0' style='border-top:1px #333 solid;border-bottom:1px #333 solid;'>\n<tr>
<td class='header2'>\n";
[color=#0033ff]$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++;
}
}
[/color]}
echo ($i == 0 ? " " : "")."</td><td align='right' class='header2'>".ucwords(showdate("%A, %B %d, %Y", time()))."</td>
echo ($i == 0 ? " " : "")."</td>
echo ($i == 0 ? " " : "")."</td>
</tr>
</table>\n";
echo "<table width='100%' cellspacing='0' cellpadding='0'>\n<tr>\n";
}
function render_footer($license=false) {
global $theme_width,$settings,$locale;
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='footer'>".stripslashes($settings['footer'])."</td>
</tr>
</table>
</td>
</tr>
</table>
<table align='center' width='$theme_width' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='center' class='footer2'>
".$settings['counter']." ".($settings['counter'] == 1 ? $locale['140']."<br><br>\n" : $locale['141']."<br><br>\n");
if ($license == false) {
echo "Powered by <a href='http://www.php-fusion.co.uk' target='_blank'><img src='".THEME."images/fusion.gif' alt='PHP-Fusion' title='PHP-Fusion' border='0' style='vertical-align:middle;'></a> v".$settings['version']." © 2003-2005<br><br>\n";
}
echo "</td>
</tr>
</table>\n";
}
function render_news($subject, $news, $info) {
global $locale;
echo "<table width='100%' cellpadding='0' cellspacing='1' class='border'>
<tr>
<td class='caption'>$subject</td>
</tr>
<tr>
<td class='main-body'>
$news
</td>
</tr>
<tr>
<td class='infobar'>
".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>
".$locale['041'].showdate("longdate", $info['news_date'])."<br>
".($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> ·\n";
echo $info['news_reads'].$locale['044']."
<a href='print.php?type=N&item_id=".$info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' border='0' style='vertical-align:middle;'></a>
</td>
</tr>
</table>\n";
}
function render_article($subject, $article, $info) {
global $locale;
echo "<table width='100%' cellpadding='0' cellspacing='1' class='border'>
<tr>
<td class='caption'>$subject</td>
</tr>
<tr>
<td class='main-body'>\n";
echo ($info['article_breaks'] == "y" ? nl2br($article) : $article)."
</td>
</tr>
<tr>
<td class='infobar'>
".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>
".$locale['041'].showdate("longdate", $info['article_date'])."<br>\n";
if ($info['article_allow_comments']) echo $info['article_comments'].$locale['043']." ·\n";
echo $info['article_reads'].$locale['044']."
<a href='print.php?type=A&item_id=".$info['article_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' border='0' style='vertical-align:middle;'></a>
</td>
</tr>
</table>\n";
}
function opentable($title) {
echo "<table width='100%' cellpadding='0' cellspacing='1' class='border'>
<tr>
<td class='caption'>$title</td>
</tr>
<tr>
<td class='main-body'>\n";
}
function closetable() {
echo "</td>
</tr>
</table>\n";
}
function openside($title) {
echo "<table width='100%' cellpadding='0' cellspacing='1' class='border'>
<tr>
<td class='side-caption'>$title</td>
</tr>
<tr>
<td class='side-body'>\n";
}
function closeside() {
echo "</td>
</tr>
</table>\n";
tablebreak();
}
function opensidex($title,$open="on") {
$box_img = ($open=="on" ? "off" : "on");
echo "<table width='100%' cellpadding='0' cellspacing='1' class='border'>
<tr>
<td>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='side-caption'>$title</td>
<td class='side-caption' align='right'>
<img onclick=\"javascript:flipBox('$title')\" name='b_$title' alt='$box_img' border='0' src='".THEME."images/panel_$box_img.gif'>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class='side-body'>
<div id='box_$title'".($open=="off" ? "style='display:none'" : "").">\n";
}
function closesidex() {
echo "</div>
</td>
</tr>
</table>\n";
tablebreak();
}
function tablebreak() {
echo "<table width='100%' cellspacing='0' cellpadding='0'>
<tr><td height='8'></td></tr>
</table>\n";
}
?>
na :
echo'<script type="text/javascript" language="JavaScript1.2" src="".INCLUDES."stmenu.js"></script>
<script type="text/javascript" language="JavaScript1.2">
<!--
echo'<script type="text/javascript" language="JavaScript1.2" src="".INCLUDES."stmenu.js"></script>
<script type="text/javascript" language="JavaScript1.2">
<!--
stm_bm(["menu6352",860,"/pcrs","blank.gif",0,"","",0,0,250,0,1000,1,0,0,"","100%",0,0,1,2,"default","hand","file:///D|/dokumenty/strona.www.przywidz/menu"],this);
stm_bp("p0",[0,4,0,0,2,3,0,7,100,"",-2,"",-2,50,0,0,"#999999","#E6EFF9","",3,1,1,"#000000"]);
stm_ai("p0i0",[0,"Strona \r\nGłówna","","",-1,-1,0,"http://www.przywidz.pl/news.php","_self","","","","",0,0,0,"","",0,0,0,0,1,"#8AAEC6",0,"#8AAEC6",0,"","",3,3,1,1,"#E6EFF9","#000000","#003366","#003366","bold 8pt Verdana","bold 9pt Verdana",0,0],80,0);
stm_aix("p0i1","p0i0",[0,"Inwestycje","","",-1,-1,0,"","_self","","","","",0,0,0,"arrow_r.gif","arrow_r.gif",7,7]);
stm_bpx("p1","p0",[1,4,0,0,2,3,0,0,100,"",-2,"",-2,50,0,0,"#999999","#B7CEE2"]);
stm_aix("p1i0","p0i0",[0,"Rok 2007","","",-1,-1,0,"http://www.przywidz.pl/viewpage.php?page_id=66","_self","","","","",0,0,0,"","",0,0,0,0,1,"#FFFFFF",0,"#B7CEE2",0,"","#B7CEE2",3,3,1,1,"#E6EFF9","#000000","#999999","#000000","bold 7pt Verdana","bold 8pt Verdana"]);
stm_aix("p1i1","p1i0",[0,"Rok 2008","","",-1,-1,0,"http://www.przywidz.pl/viewpage.php?page_id=67","_self","","","","",0,0,0,"","",0,0,0,0,1,"#FFFFFF",0,"#B7CEE2",0,"",""]);
stm_ep();
stm_aix("p0i2","p0i1",[0,"Przetargi"]);
stm_bpx("p2","p0",[1,4,0,0,2,3,0,0]);
stm_aix("p2i0","p1i1",[0,"Ogłoszone","","",-1,-1,0,"http://www.viewpage.php?page_id=68"]);
stm_aix("p2i1","p1i1",[0,"Zakończone","","",-1,-1,0,"http://www.przywidz.pl/viewpage.php?page_id=69"]);
stm_aix("p2i2","p1i1",[0,"Unieważnione","","",-1,-1,0,"http://www.przywidz.pl/viewpaage.php?page_id=70"]);
stm_ep();
stm_aix("p0i3","p0i1",[0,"Planowanie\r\nprzestrzenne"]);
stm_bpx("p3","p2",[]);
stm_aix("p3i0","p1i1",[0,"Studium","","",-1,-1,0,"http://www.przywidz.pl/viewpage.php?page_id=71"]);
stm_ep();
stm_aix("p0i4","p0i0",[0,"Galeria","","",-1,-1,0,"http://www.przywidz.pl/photogallery.php"]);
stm_aix("p0i5","p0i0",[0,"Szukaj","","",-1,-1,0,"http://www.przywidz.pl/search.php"]);
stm_ep();
stm_em();
//-->
Kod po zamianie daje rezultat taki , że górnego menu po prostu nie ma.
Sugerowałem się postem http://www.php-fu...post_97704 z tym , że autor QooBooS pisal na forum dla eXtreme Fusion. Ja korzystam z v. 6.01.15
U mnie jest problem z przyjęciem Javy do pliku theme.php .
Nie wiem teraz czy mam :
1. zamieniać wszystkie " na ' lub \' - próby stosowania tego nie dają rezultatu (menu wciąż nie ma) a w zamian komunikat Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /themes/Fusion5/theme.php on line 33 poprawki nie dają nic i ten sam komunikat powtarza się .
W niektórych postach jak tu http://www.php-fu...post_50489 sprawa też nie jest dla mnie jasna.
Czy w ogóle zainkludowałem ten script Javy??
Proszę o pomoc w znalezieniu błędu |