Artykuły dla userów
|
MaChoni |
Dodany dnia 08.01.2007 18:45:02
|
Przedszkolak
Postów: 50 Ostrzeżeń: 3
v7.00.05 Data rejestracji: 15.06.2006 14:00
|
Witam, mam mały problem. Gość wchodzący w dział artykuły widzi coś takiego:
A chodzi mi oto aby wstawić obrazek oraz treść informującą o zarejestrowaniu się aby móc przeglądać. Mniej więcej jak na screenie poniżej
Jakby ktoś nie wiedział oco mi chodzi dodaje link do strony Pawsona do działu download: www.3gmobile.boo....nloads.php
Pozdrawiam Machoni
|
|
|
|
Wścibski Gość |
Dodany dnia 24.12.2024 03:36:20
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
Pieka |
Dodany dnia 08.01.2007 19:05:39
|
Postów: 19885 Pomógł: 767
v7.02.03 Data rejestracji: 23.02.2005 18:12
|
Wstawic obrazek ponizej warunku iMEMBER i po sprawie
Ewentualnie do statystyk, zaraz nad.
Edytowane przez Pieka dnia 09.01.2007 11:07:07
Jestem jaki jestem
|
|
|
|
MaChoni |
Dodany dnia 08.01.2007 21:22:50
|
Przedszkolak
Postów: 50 Ostrzeżeń: 3
v7.00.05 Data rejestracji: 15.06.2006 14:00
|
To ja moze wstawie kod articles.php
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright ę 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Infusion Created by Fusion-MC
| Inf: Advanced Articles
| Website: http://www.fusion-mc.be
| Contact:
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
include LOCALE.LOCALESET."articles.php";
if (!isset($cat_id)) {
opentable($locale['A001']);
$result = dbquery("SELECT * FROM ".$db_prefix."article_cats WHERE article_parent='$parent' ORDER BY article_cat_name");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0; $columns = 1;
while ($data = dbarray($result)) {
$parent = $data['article_cat_id'];
if (checkgroup($data['article_cat_access'])) {
if ($counter != 0 && ($counter % $columns == 0)) echo "</tr>\n<tr><br>\n";
$num = dbcount("(article_cat)", "articles", "article_cat='".$data['article_cat_id']."'");
$sub_id = $data['article_cat_id'];
$result_subs = dbquery("SELECT * FROM ".$db_prefix."article_cats WHERE article_parent='$sub_id' ORDER BY article_cat_name");
$rowssubs = dbrows($result_subs);
echo "<table width='100%' cellpadding='0' cellspacing='1' class='tbl-border' style='margin-bottom:5px;'>\n<tr>";
$num = dbcount("(article_cat)", "articles", "article_cat='".$data['article_cat_id']."'");
$num2 = dbcount("(article_parent)", "article_cats", "article_parent='".$data['article_cat_id']."'");
echo "<td colspan='2' class='forum-caption'>".$data['article_cat_name']."</td>\n</tr>";
if ($data['article_cat_description'] || $data['article_cat_image'] != "") { echo "<tr>\n<td colspan='2' class='tbl2' width='100%'>";
echo "<table border='0' width='100%' cellpadding='2' style='border-collapse: collapse'>";
echo "<tr>\n<td>".($data['article_cat_image'] ? "<img src='".$data['article_cat_image']."'>" : "")."</td>";
echo "<td valign='top' width='100%'>".$data['article_cat_description']."</td>";
echo "</tr>\n</table></td></tr>";
}
echo "<tr>\n<td width='50%' class='tbl1'>";
if ($rowssubs != "0"){
echo $locale['A007']."<b>$num2</b>";
}
else {
echo $locale['A006']."<b>$num</b>";
}
echo "</td>\n<td width='50%' class='tbl1'><center><b><a href='".FUSION_SELF."?cat_id=".$data['article_cat_id']."'>".$locale['A008']."</a></b></center></td>\n";
echo "</tr>\n</table>\n";
//$counter++;
}
}
include INCLUDES."stats/articles.php";
} else {
echo "<center><br>\n".$locale['A002']."<br><br>\n</center>\n";
}
closetable();
} else {
$parent = $cat_id;
$result_parent = dbquery("SELECT * FROM ".$db_prefix."article_cats WHERE article_parent='$parent' ORDER BY article_cat_name");
$rows_parent = dbrows($result_parent);
if ($rows_parent != 0) {
opentable($locale['A001']);
$result = dbquery("SELECT * FROM ".$db_prefix."article_cats WHERE article_parent='$parent' ORDER BY article_cat_name");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0; $columns = 2;
echo "<table width='100%' cellspacing='0' cellpadding='0' class='tbl'>\n";
while ($data = dbarray($result)) {
$parent = $data['article_cat_id'];
if (checkgroup($data['article_cat_access'])) {
if ($counter != 0 && ($counter % $columns == 0)) echo "</tr>\n<tr>\n<br>\n";
$num = dbcount("(article_cat)", "articles", "article_cat='".$data['article_cat_id']."'");
$sub_id = $data['article_cat_id'];
$result_subs = dbquery("SELECT * FROM ".$db_prefix."article_cats WHERE article_parent='$sub_id' ORDER BY article_cat_name");
$rowssubs = dbrows($result_subs);
echo "<table width='100%' cellpadding='0' cellspacing='1' class='tbl-border' style='margin-bottom:5px;'>\n<tr>";
$num = dbcount("(article_cat)", "articles", "article_cat='".$data['article_cat_id']."'");
$num2 = dbcount("(article_parent)", "article_cats", "article_parent='".$data['article_cat_id']."'");
echo "<td colspan='2' class='forum-caption'>".$data['article_cat_name']."</td>\n</tr>";
if ($data['article_cat_description'] || $data['article_cat_image'] != "") { echo "<tr>\n<td colspan='2' class='tbl2' width='100%'>";
echo "<table border='0' width='100%' cellpadding='2' style='border-collapse: collapse'>";
echo "<tr>\n<td>".($data['article_cat_image'] ? "<img src='".$data['article_cat_image']."'>" : "")."</td>";
echo "<td valign='top' width='100%'>".$data['article_cat_description']."</td>";
echo "</tr>\n</table></td></tr>";
}
echo "<tr>\n<td width='50%' class='tbl1'>";
if ($rowssubs != "0"){
echo $locale['A007']."<b>$num2</b>";
}
else {
echo $locale['A006']."<b>$num</b>";
}
echo "</td>\n<td width='50%' class='tbl1'><center><b><a href='".FUSION_SELF."?cat_id=".$data['article_cat_id']."'>".$locale['A008']."</a></b></center></td>\n";
echo "</tr>\n</table>\n";
//$counter++;
}
}
} else {
echo "<center><br>\n".$locale['A004']."<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 = 1;
opentable($locale['A001'].": ".$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,15");
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
if ($data['article_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
$new = " <span class='small'>[".$locale['A003']."]</span>";
} else {
$new = "";
}
echo "<table width='100%' cellpadding='0' cellspacing='1' class='tbl-border' style='margin-bottom:5px;'>\n<tr>";
echo "<td colspan='3' class='forum-caption'>".$data['article_subject']."$new";
echo "<tr>\n<td colspan='3' class='tbl1'>".stripslashes($data['article_snippet'])."</td>\n</tr>";
echo "<tr>\n<td width='50%' class='tbl2'><b>".$locale['A010']."</b> ".$data['article_reads']."
</td>\n<td width='50%' class='tbl1'><center><a href='readarticle.php?article_id=".$data['article_id']."'><b>".$locale['A009']."</b></a></center></td>\n";
echo "</tr>\n</table>\n";
echo ($i != $numrows ? "<br>\n" : "\n"); $i++;
}
closetable();
if ($rows > 15) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,15,$rows,3,FUSION_SELF."?cat_id=$cat_id&")."\n</div>\n";
} else {
echo "<center><br>".$locale['A004']."<br><a href='articles.php'>".$locale['A005']."</a><br><br></center>\n";
closetable();
}
}
}
if ($res == 0) redirect(FUSION_SELF);
}
}
require_once "side_right.php";
require_once "footer.php";
?>
Niech chociaz ktos zaznaczy gdzie trzeba to wpisac zeby tak wygladalo a ja sobie sam wybiore obrazek i text :)
|
|
|
|
Pieka |
Dodany dnia 08.01.2007 21:30:10
|
Postów: 19885 Pomógł: 767
v7.02.03 Data rejestracji: 23.02.2005 18:12
|
Zaraz nad:
include INCLUDES."stats/articles.php";
Ponizej klamry (}).
Jestem jaki jestem
|
|
|
|
MaChoni |
Dodany dnia 08.01.2007 22:26:59
|
Przedszkolak
Postów: 50 Ostrzeżeń: 3
v7.00.05 Data rejestracji: 15.06.2006 14:00
|
No widze
|
|
|
|
kps |
Dodany dnia 16.01.2007 15:30:37
|
Przedszkolak
Postów: 21
Data rejestracji: 14.12.2006 15:43
|
A czy mogli byście mi powiedzieć jak to zrobić i gdzie co wstawić oto mój kod z articles.php
<?php
/*--------------------------------------------+
| PHP-Fusion 5 - Content Management System |
|---------------------------------------------|
| author: Nick Jones (Digitanium) © 2002-2005 |
| web: http://www.php-fusion.co.uk |
| email: |
|---------------------------------------------|
| 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";
[color=green]if (iGUEST) {
opentable("[b]Zaloguj się[/b]");
echo "[b]treść dla niezalogowanych[/b]";
closetable();
}
else if {
echo "";
}[/color]
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 = 1;
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,15");
$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 "<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 > 15) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,15,$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";
?>
Edytowane przez Shaolin dnia 16.01.2007 15:47:08
|
|
|
|
Shaolin |
Dodany dnia 16.01.2007 15:45:30
|
Bywalec
Postów: 888
Data rejestracji: 23.10.2004 14:59
|
nie testowane w działaniu (pisane z pamięci), ale nie powinno sprawiać problemów. w miejscu gdzie jest pogrubiony tekst zamień go na jakąś swoją treść.
working
|
|
|
|
kps |
Dodany dnia 16.01.2007 15:58:15
|
Przedszkolak
Postów: 21
Data rejestracji: 14.12.2006 15:43
|
Wstawiłem tak ale niestety nie działa, wyskakuje taki błąd:
Parse error: syntax error, unexpected '{', expecting '(' in /home/kps/public_html/inim/articles.php on line 22
a na 22 lini jest to else if {
Prosze o pomoc
Edytowane przez kps dnia 17.01.2007 10:34:39
|
|
|
|
Shaolin |
Dodany dnia 19.01.2007 22:37:34
|
Bywalec
Postów: 888
Data rejestracji: 23.10.2004 14:59
|
spróbuj skasować if. zostaw samo else.
working
|
|
|