@edit: Udało mi się już wszystko zrobić - temat do usunięcia :P
Witam
Zwykle miewam bardziej skomplikowane problemy ale dziś was zaszokuje i przedstawie banalny problem z którym sobie nie mogę poradzić (mam nadzieję że banalny).
Jest to kontynuacja problemu z nawigacją. Potrzbuje zlikwidować w kodzie odwoływanie się do styli. To znaczy potrzebuje połączyć kod php i kod css w kod php.
Kod php:
function openside($title) {
global $advanced_navigation, $navigation_hidden, $p_data;
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr>";
echo "<td class='panel-left'><img src='".THEME."images/blank.gif' width='18' height='31' alt='' style='display:block'></td>";
echo "<td width='100%' class='panel-main'>$title</td>";
echo "<td class='panel-right'><img src='".THEME."images/blank.gif' width='18' height='31' alt='' style='display:block'></td>";
echo "</tr></table>";
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr>";
echo "<td class='border-left'><img src='".THEME."images/blank.gif' height='1' alt='' style='display:block'></td>";
echo "<td class='side-body'>\n";
if($advanced_navigation == 1 AND $p_data['panel_filename'] == 'navigation_panel'){
$query = dbquery("SELECT * FROM `".DB_PREFIX."panels` WHERE panel_name ='".$title."'");
if(dbrows($query) != 0){
$result = dbquery("SELECT * FROM ".DB_PREFIX."site_links WHERE link_position<='2' ORDER BY link_order");
while($data = dbarray($result)) {
if (checkgroup($data['link_visibility'])) {
if ($data['link_name'] != "---" && $data['link_url'] == "---") {
echo "
<div class='side-label2'><b>".$data['link_name']."</b></div>\n";
} else if ($data['link_name'] == "---" && $data['link_url'] == "---") {
echo "
<hr class='side-hr2'>\n";
} else {
$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='navigation'>".$data['link_name']."</a><br>\n";
} else {
echo "
<a href='".BASEDIR.$data['link_url']."'".$link_target." class='navigation'>".$data['link_name']."</a><br>\n";
}
}
}
}
echo "<div style='position: absolute; top:5px; height: 1px; width:1px; overflow:hidden;'>";
$navigation_hidden = 1;
}
}
}
function closeside() {
global $navigation_hidden , $advanced_navigation;
if($advanced_navigation == 1){
if($navigation_hidden == 1){
echo "</div>";
$navigation_hidden = 0;
}
}
echo "</td>";
echo "<td class='border-right'><img src='".THEME."images/blank.gif' width='18' height='1' alt='' style='display:block'></td></tr></table>";
echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'><tr>";
echo "<td align='left' background='".THEME."images/border-bleft.gif' width='18'></td>";
echo "<td class='border-bmain'><img src='".THEME."images/blank.gif' width='1' height='20' alt='' style='display:block'></td>";
echo "<td class='border-bright'><img src='".THEME."images/blank.gif' width='18' height='20' alt='' style='display:block'></td>";
echo "</tr></table>\n";
}
Styles.css
a.navigation{ display: block; color:#000; text-decoration:none; padding: 3px; margin-bottom:-11px; margin-left: -4px; border-left: 3px solid #ddd;}
a:hover.navigation { display: block; color:#231931; background-color: #ddd; text-decoration:none; padding: 3px; margin-bottom:-11px; margin-left: -4px; border-left: 3px solid #fff;}
Mam nadzieję że ktokolwiek zrozumiał o co mi chodzi :P
Bardzo proszę o pomoc
Edytowane przez Pruzio dnia 13.11.2006 22:22:26
|