Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Straipsniai
Parašė Giedrunskis· 2008 Lap. 5 01:11:30
#1
Na saike, padekit man :D
nesusitvarkau su straipsniais.
Ir po siu straipsniu eitu naujas rowstart (t.y. numeruotusi puslapiai)
Tai duodu pavizdy kaip as noriu, kad butu tie straipsniai mano :)
Esme ta, kad ir ka bedaryciau, vieni errorai.
Bandziau darytis pagal naujienas, nes modu saite yra kazkas link tos puses, bet kad ir is to man nieko nesigauna.
Ačiū labai kas padės!
Redagavo Giedrunskis· 2008 Lap. 5 15:11:19
Parašė WantedBoy· 2008 Lap. 5 15:11:39
#2
Iš dovanų sistemos lengvai pasidarytum ;)
Parašė mXt· 2008 Lap. 5 15:11:38
#3
Nu jeigu gerai supratau, tai su table pasidarai kaip tu nori kad viskas atrodytu, o tada is DB jami informacija :)
Parašė Giedrunskis· 2008 Lap. 5 15:11:45
#4
Subine gaunasi, daugmaz pasidarai tas lenteles, bet vat su ta informacija tai kvailai cia gaunasi.
Va normalesnis img:
Redagavo Giedrunskis· 2008 Lap. 5 16:11:39
Parašė Giedrunskis· 2008 Lap. 5 22:11:24
#5
Na va pasidariau, kad eitu straipsniai ne stulpeliu o eilute, bet kaip ikeliu daugiau nei keturis jie ir toliau man eina eilute, kaip padaryti, kad keliant kitus straipsnius persikeltu i kita eilute?
Ir dar, kazkas netaip su ta vieta kur yra Klipai: Muzikiniai. Susitrauke toje vietoje.
Kodas:
<?php
/*--------------------------------------------+
| PHP-Fusion 5 - Content Management System |
|---------------------------------------------|
| author: Nick Jones (Digitanium) © 2002-2005 |
| web: http://www.php-fusion.co.uk |
| email: nick@php-fusion.co.uk |
|---------------------------------------------|
| Released under the terms and conditions of |
| the GNU General Public License (Version 2) |
+--------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
include LOCALE.LOCALESET."articles.php";
if (!isset($cat_id)) {
opentable($locale['400']);
$result = dbquery("SELECT * FROM ".$db_prefix."article_cats WHERE ".groupaccess('article_cat_access')." ORDER BY article_cat_name");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0; $columns = 2;
echo "<table cellpadding='0' cellspacing='0' width='100%' class='tbl'>\n<tr>\n";
while ($data = dbarray($result)) {
if ($counter != 0 && ($counter % $columns == 0)) echo "</tr>\n<tr>\n";
$num = dbcount("(article_cat)", "articles", "article_cat='".$data['article_cat_id']."'");
echo "<td align='center' valign='top' width='50%'><a href='".FUSION_SELF."?cat_id=".$data['article_cat_id']."'>".$data['article_cat_name']."</a> <span class='small2'>($num)</span>";
if ($data['article_cat_description'] != "") echo "<br>\n<span class='small'>".$data['article_cat_description']."</span>";
echo "</td>\n";
$counter++;
}
echo "</tr>\n</table>\n";
} else {
echo "<center><br>\n".$locale['401']."<br><br>\n</center>\n";
}
closetable();
} else {
$res = 0;
if (!isNum($cat_id)) fallback(FUSION_SELF);
$result = dbquery("SELECT * FROM ".$db_prefix."article_cats WHERE article_cat_id='$cat_id'");
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['article_cat_access'])) {
$res = 2;
opentable($locale['400'].": ".$cdata['article_cat_name']);
$rows = dbcount("(article_id)", "articles", "article_cat='$cat_id'");
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
$result = dbquery("SELECT * FROM ".$db_prefix."articles WHERE article_cat='$cat_id' ORDER BY ".$cdata['article_cat_sorting']." LIMIT $rowstart,4");
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
if ($data['article_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
$new = " <span class='small'>[".$locale['402']."]</span>";
} else {
$new = "";
}
echo "<td style='text-align: left'><a href='readarticle.php?article_id=".$data['article_id']."'>".$data['article_subject']."</a>$new<br>\n".stripslashes($data['article_snippet']);
echo ($i != $numrows ? "<br><br>\n" : "\n"); $i++;
}
closetable();
if ($rows > 4) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,4,$rows,3,FUSION_SELF."?cat_id=$cat_id&")."\n</div>\n";
} else {
echo "<center>".$locale['403']."</center>\n";
closetable();
}
}
}
if ($res == 0) redirect(FUSION_SELF);
}
require_once "side_right.php";
require_once "footer.php";
?>
Rdaguota eilute:
echo "<td style='text-align: left'><a href='readarticle.php?article_id=".$data['article_id']."'>".$data['article_subject']."</a>$new<br>\n".stripslashes($data['article_snippet']);