Linki wyświetlane pod grafiką kategorii w news_cats.php
|
Kubir |
Dodany dnia 30.05.2009 21:51:41
|
Przedszkolak
Postów: 52 Ostrzeżeń: 2
Data rejestracji: 02.06.2007 21:48
|
Chciałbym zapytać, w jaki sposób można dostosować kategorie newsów, tzn. jak zmienić aby linki wyświetlały się pod grafiką reprezentująca daną kategorię, a nie po prawej stronie, obecnie mam grafiki kategorii tak duże że linki wchodzą pod panele po prawej strony i są nie widzialne. Zbytnio nie wiem co należy zmienić w pliku ze stylami, albo w pliku odpowiedzialnym za kategorie newsów.
Z góry dziękuje za pomoc.
www.hsmusical.pl
Tutaj widać problem:
http://www.hsmusi...s_cats.php
(ze strony głównej nie da się tam wejść, bo usunąłem link póki nie działa to jak powinno).
PW od moderatora:
- Zmiana nazwy tematu - Pieka 30.05 - 22:58
- Przeniesienie tematu - Pieka 30.05 - 22:59
Edytowane przez Pieka dnia 31.05.2009 00:30:33
|
|
|
|
Wścibski Gość |
Dodany dnia 24.11.2024 22:23:11
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
Gismo_PL |
Dodany dnia 30.05.2009 21:59:36
|
Bywalec
Postów: 462 Pomógł: 40 Ostrzeżeń: 2
v7.01.05 Data rejestracji: 25.02.2007 21:13
|
Z góry poproszę o adres strony .
|
|
|
|
Kubir |
Dodany dnia 30.05.2009 22:02:23
|
Przedszkolak
Postów: 52 Ostrzeżeń: 2
Data rejestracji: 02.06.2007 21:48
|
Proszę:
www.hsmusical.pl
Tutaj widać problem:
http://www.hsmusi...s_cats.php
(ze strony głównej nie da się tam wejść, bo usunąłem link póki nie działa to jak powinno) |
|
|
|
Gismo_PL |
Dodany dnia 30.05.2009 22:20:37
|
Bywalec
Postów: 462 Pomógł: 40 Ostrzeżeń: 2
v7.01.05 Data rejestracji: 25.02.2007 21:13
|
To teraz @Kubir podrzuć kodzik pliku: news_cats.php i zrobimy porządek z tym Twoim bałaganem
|
|
|
|
Kubir |
Dodany dnia 30.05.2009 22:31:08
|
Przedszkolak
Postów: 52 Ostrzeżeń: 2
Data rejestracji: 02.06.2007 21:48
|
Poniżej przedstawiam kod pliku:
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: news_cats.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| 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).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."news_cats.php";
add_to_title($locale['global_200'].$locale['400']);
opentable($locale['400']);
if (isset($_GET['cat_id']) && isnum($_GET['cat_id'])) {
$res = 0;
$result = dbquery("SELECT * FROM ".DB_NEWS_CATS." WHERE news_cat_id='".$_GET['cat_id']."'");
if (dbrows($result) || $_GET['cat_id'] == 0) {
$data = dbarray($result);
$rows = dbcount("(news_id)", DB_NEWS, "news_cat='".$_GET['cat_id']."' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_draft='0'");
if ($rows) {
$res = 1;
echo "<!--pre_news_cat--><table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
if ($_GET['cat_id'] != 0) {
echo "\n<td width='150' class='tbl1' style='vertical-align:top'><!--news_cat_image--><img src='".get_image("nc_".$data['news_cat_name'])."' alt='".$data['news_cat_name']."' /><br /><br />";
echo "<strong>".$locale['401']."</strong> ".$data['news_cat_name']."<br />\n<strong>".$locale['402']."</strong> $rows</td>\n";
echo "<td class='tbl1' style='vertical-align:top'>\n";
} else {
echo "</td>\n</tr>\n<tr>\n<td width='150' class='tbl1' style='vertical-align:top'>".$locale['403']."<br />\n";
echo "<strong>".$locale['401']."</strong> $rows</td>\n<td class='tbl1' style='vertical-align:top'><!--news_cat_news-->\n";
}
$result2 = dbquery("SELECT * FROM ".DB_NEWS." WHERE news_cat='".$_GET['cat_id']."' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_draft='0' ORDER BY news_datestamp DESC");
while ($data2 = dbarray($result2)) {
echo THEME_BULLET." <a href='news.php?readmore=".$data2['news_id']."'>".$data2['news_subject']."</a><br />\n";
}
echo "</td>\n</tr>\n<tr>\n<td colspan='2' class='tbl1' style='text-align:center'>".THEME_BULLET." <a href='".FUSION_SELF."'>".$locale['406']."</a>";
echo "</td>\n</tr>\n</table><!--sub_news_cat-->\n";
}
}
if (!$res) { redirect(FUSION_SELF); }
} else {
$res = 0;
$result = dbquery("SELECT * FROM ".DB_NEWS_CATS." ORDER BY news_cat_id");
if (dbrows($result)) {
echo "<!--pre_news_cat_idx--><table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
while ($data = dbarray($result)) {
$rows = dbcount("(news_id)", DB_NEWS, "news_cat='".$data['news_cat_id']."' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_draft='0'");
echo "<tr>\n<td width='150' class='tbl1' style='vertical-align:top'><!--news_cat_image--><img src='".get_image("nc_".$data['news_cat_name'])."' alt='".$data['news_cat_name']."' /><br /><br />\n";
echo "<strong>".$locale['401']."</strong> ".$data['news_cat_name']."<br />\n<strong>".$locale['402']."</strong> $rows</td>\n";
echo "<td class='tbl1' style='vertical-align:top'><!--news_cat_news-->\n";
if ($rows) {
$result2 = dbquery("SELECT * FROM ".DB_NEWS." WHERE news_cat='".$data['news_cat_id']."' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_draft='0' ORDER BY news_datestamp DESC LIMIT 10");
while ($data2 = dbarray($result2)) {
echo THEME_BULLET." <a href='news.php?readmore=".$data2['news_id']."'>".$data2['news_subject']."</a><br />\n";
}
if ($rows > 10) { echo "<div style='text-align:right'>".THEME_BULLET." <a href='".FUSION_SELF."?cat_id=".$data['news_cat_id']."'>".$locale['405']."</a></div>\n"; }
} else {
echo THEME_BULLET." ".$locale['404']."\n";
}
echo "</td>\n</tr>\n";
}
$res = 1;
}
$result = dbquery("SELECT * FROM ".DB_NEWS." WHERE news_cat='0' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_draft='0' ORDER BY news_datestamp DESC LIMIT 10");
if (dbrows($result)) {
if ($res == 0) { echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n"; }
$nrows = dbcount("(news_id)", DB_NEWS, "news_cat='0' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_draft='0'");
echo "<tr>\n<td width='150' class='tbl1' style='vertical-align:top'>".$locale['403']."<br />\n";
echo "<strong>".$locale['402']."</strong> $nrows</td>\n<td class='tbl1' style='vertical-align:top'>\n";
while ($data = dbarray($result)) {
echo THEME_BULLET." <a href='news.php?readmore=".$data['news_id']."'>".$data['news_subject']."</a><br />\n";
}
$res = 1;
if ($nrows > 10) { echo "<div style='text-align:right'>".THEME_BULLET." <a href='".FUSION_SELF."?cat_id=0'>".$locale['405']."</a></div>\n"; }
echo "</td>\n</tr>\n";
}
if ($res == 1) {
echo "</table><!--sub_news_cat_idx-->\n";
} else {
echo "<div style='text-align:center'><br />\n".$locale['407']."<br /><br />\n</div>\n";
}
}
closetable();
require_once THEMES."templates/footer.php";
?>
Edytowane przez Kubir dnia 30.05.2009 22:31:40
|
|
|
|
Gismo_PL |
Dodany dnia 30.05.2009 23:13:27
|
Bywalec
Postów: 462 Pomógł: 40 Ostrzeżeń: 2
v7.01.05 Data rejestracji: 25.02.2007 21:13
|
Mam nadzieję, że niczego nie zamieszałem :):
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| Filename: news_cats.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| 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 www.gnu.org/licen... Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."news_cats.php";
add_to_title($locale['global_200'].$locale['400']);
opentable($locale['400']);
if (isset($_GET['cat_id']) && isnum($_GET['cat_id'])) {
$res = 0;
$result = dbquery("SELECT * FROM ".DB_NEWS_CATS." WHERE news_cat_id='".$_GET['cat_id']."'");
if (dbrows($result) || $_GET['cat_id'] == 0) {
$data = dbarray($result);
$rows = dbcount("(news_id)", DB_NEWS, "news_cat='".$_GET['cat_id']."' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_draft='0'");
if ($rows) {
$res = 1;
echo "<!--pre_news_cat--><table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
if ($_GET['cat_id'] != 0) {
echo "\n<td width='150' class='tbl1' style='vertical-align:top'><!--news_cat_image--><img src='".get_image("nc_".$data['news_cat_name'])."' alt='".$data['news_cat_name']."' /><br /><br />";
echo "<strong>".$locale['401']."</strong> ".$data['news_cat_name']."<br />\n<strong>".$locale['402']."</strong> $rows</td></tr>\n";
echo "<tr><td class='tbl1' style='vertical-align:top'>\n";
} else {
echo "</td>\n</tr>\n<tr>\n<td width='150' class='tbl1' style='vertical-align:top'>".$locale['403']."<br />\n";
echo "<strong>".$locale['401']."</strong> $rows</td>\n<td class='tbl1' style='vertical-align:top'><!--news_cat_news-->\n";
}
$result2 = dbquery("SELECT * FROM ".DB_NEWS." WHERE news_cat='".$_GET['cat_id']."' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_draft='0' ORDER BY news_datestamp DESC");
while ($data2 = dbarray($result2)) {
echo THEME_BULLET." <a href='news.php?readmore=".$data2['news_id']."'>".$data2['news_subject']."</a><br />\n";
}
echo "</td>\n</tr>\n<tr>\n<td colspan='2' class='tbl1' style='text-align:center'>".THEME_BULLET." <a href='".FUSION_SELF."'>".$locale['406']."</a>";
echo "</td>\n</tr>\n</table><!--sub_news_cat-->\n";
}
}
if (!$res) { redirect(FUSION_SELF); }
} else {
$res = 0;
$result = dbquery("SELECT * FROM ".DB_NEWS_CATS." ORDER BY news_cat_id");
if (dbrows($result)) {
echo "<!--pre_news_cat_idx--><table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
while ($data = dbarray($result)) {
$rows = dbcount("(news_id)", DB_NEWS, "news_cat='".$data['news_cat_id']."' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_draft='0'");
echo "<tr>\n<td width='150' class='tbl1' style='vertical-align:top'><!--news_cat_image--><img src='".get_image("nc_".$data['news_cat_name'])."' alt='".$data['news_cat_name']."' /><br /><br />\n";
echo "<strong>".$locale['401']."</strong> ".$data['news_cat_name']."<br />\n<strong>".$locale['402']."</strong> $rows</td></tr>\n";
echo "<tr><td class='tbl1' style='vertical-align:top'><!--news_cat_news-->\n";
if ($rows) {
$result2 = dbquery("SELECT * FROM ".DB_NEWS." WHERE news_cat='".$data['news_cat_id']."' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_draft='0' ORDER BY news_datestamp DESC LIMIT 10");
while ($data2 = dbarray($result2)) {
echo THEME_BULLET." <a href='news.php?readmore=".$data2['news_id']."'>".$data2['news_subject']."</a><br />\n";
}
if ($rows > 10) { echo "<div style='text-align:right'>".THEME_BULLET." <a href='".FUSION_SELF."?cat_id=".$data['news_cat_id']."'>".$locale['405']."</a></div>\n"; }
} else {
echo THEME_BULLET." ".$locale['404']."\n";
}
echo "</td>\n</tr>\n";
}
$res = 1;
}
$result = dbquery("SELECT * FROM ".DB_NEWS." WHERE news_cat='0' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_draft='0' ORDER BY news_datestamp DESC LIMIT 10");
if (dbrows($result)) {
if ($res == 0) { echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n"; }
$nrows = dbcount("(news_id)", DB_NEWS, "news_cat='0' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_draft='0'");
echo "<tr>\n<td width='150' class='tbl1' style='vertical-align:top'>".$locale['403']."<br />\n";
echo "<strong>".$locale['402']."</strong> $nrows</td></tr>\n<tr><td class='tbl1' style='vertical-align:top'>\n";
while ($data = dbarray($result)) {
echo THEME_BULLET." <a href='news.php?readmore=".$data['news_id']."'>".$data['news_subject']."</a><br />\n";
}
$res = 1;
if ($nrows > 10) { echo "<div style='text-align:right'>".THEME_BULLET." <a href='".FUSION_SELF."?cat_id=0'>".$locale['405']."</a></div>\n"; }
echo "</td>\n</tr>\n";
}
if ($res == 1) {
echo "</table><!--sub_news_cat_idx-->\n";
} else {
echo "<div style='text-align:center'><br />\n".$locale['407']."<br /><br />\n</div>\n";
}
}
closetable();
require_once THEMES."templates/footer.php";
?> Kliknij i zaczekaj na załadowanie kodu ...
Edytowane przez Pieka dnia 30.05.2009 23:41:21
|
|
|
|
Kubir |
Dodany dnia 31.05.2009 00:16:05
|
Przedszkolak
Postów: 52 Ostrzeżeń: 2
Data rejestracji: 02.06.2007 21:48
|
Działa wszystko pięknie, dzięki |
|
|