Witam.
Próbuję zmodyfikować panel z linka: http://www.php-fu...ost_114254
Dodałem wyświetlanie BBCode. Pozostało do zrobienia - jednak nie mogę rozgryźć, jak wyświetlić zawartość poszczególnej podkategorii w dowolnej ilości kolumn. Proszę o pomoc.
Zmiany dotyczą pliku accordion_navigation_panel.php
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: accordion_navigation_panel.php
| Author: Robert Gaudyn (Wooya)
| Version: 1.0
+--------------------------------------------------------+
| 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"); }
add_to_head("<style type='text/css'>
/* A few IE bug fixes */
* html ul ul li a { height: 100%; }
* html ul li a { height: 100%; }
* html ul ul li { margin-bottom: -1px; }
</style>");
add_to_head("<script type='text/javascript' src='".INFUSIONS."accordion_navigation_panel/accordion.js'></script>
<script type='text/javascript' src='".INFUSIONS."accordion_navigation_panel/jquery.cookie.js'></script>");
add_to_head("<script type='text/javascript'>
jQuery().ready(function(){
// applying the settings
jQuery('#navigation').Accordion({
active: 'h2.selected',
header: 'h2.head',
alwaysOpen: false,
animated: true,
showSpeed: 400,
hideSpeed: 800
});
});
</script>");
$list_open = false;
$i = 0;
opentablepod($locale['global_001']);
require_once BASEDIR."chat/src/pfcinfo.class.php";
$info = new pfcInfo(md5("mojczat"));
$users = $info->getOnlineNick();
$nb_users = count($users);
$ta = "<span style=\"color: #FFFF00\"><b>Chat</b></span> <strong>(".$nb_users.")</strong>";
$result = dbquery(
"SELECT tl.link_id, tl.link_name, tl.link_url, tl.link_window, tl.link_order FROM ".DB_SITE_LINKS." tl
WHERE ".groupaccess('tl.link_visibility')." AND link_position<='2'
ORDER BY link_order"
);
if (dbrows($result)) {
$counter = 0;
$columns = 2;
echo "<div id='navigation'>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>";
while($data = dbarray($result)) {
if ($data['link_name'] != "---" && $data['link_url'] == "---") {
if (isset($_COOKIE['accordion_open']) && $_COOKIE['accordion_open']=="lid".$data['link_id']) {
$cls = "head selected";
} else if (!isset($_COOKIE['accordion_open']) && !$i) {
$cls = "head selected";
} else {
$cls = "head";
}
echo "<h2 onclick=\"$.cookie('accordion_open', 'lid".$data['link_id']."', { path: '/', expires: 7 });\" id='lid".$data['link_id']."' class='".$cls."' style='cursor:pointer'>".parseubb($data['link_name'], "b|i|u|img|color")."</h2>\n";
} else if ($data['link_name'] == "---" && $data['link_url'] == "---") {
echo "<hr class='side-hr' />\n";
} else {
$link_target = ($data['link_window'] == "1" ? " target='_blank'" : "");
if ($counter != 0 && ($counter % $columns == 0)) { echo "</tr>\n<tr>\n"; }
if (strstr($data['link_url'], "http://") || strstr($data['link_url'], "https://")) {
echo "<td><a href='".$data['link_url']."'".$link_target." class='side'>".THEME_BULLET." <span>".parseubb($data['link_name'], "b|i|u|img|color")."</span></a></td>\n";
} else {
if($data['link_name'] == "chat")
echo "<td><a href='".BASEDIR.$data['link_url']."'".$link_target." class='side'>".THEME_BULLET." ".$ta."</a></td>\n";
echo "<td><a href='".BASEDIR.$data['link_url']."'".$link_target." class='side'>".THEME_BULLET." <span>".parseubb($data['link_name'], "b|i|u|img|color")."</span></a></td>\n";
}
}
$i++;
$counter++;
}
echo "</tr>\n</table>\n";
echo "</div>\n";
} else {
echo $locale['global_002'];
}
closetablepod();
?>
PW od moderatora:
- Odświeżenie Tematu - bartek124 17.10 - 13:49
Edytowane przez Pieka dnia 14.10.2009 10:59:13
|