Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Naujausi forumo pranesimai

Parašė Lordcraft· 2008 Rugs. 13 02:09:09
#1

Kaip padaryti maza panele kur yra ten naujausi forumo pranesimai ir kad sone rodytu kiek atsakymu? va pati panel:

openside("Naujausi pranesimai");

$result = dbquery("
   SELECT * FROM ".$db_prefix."threads
   INNER JOIN ".$db_prefix."forums ON ".$db_prefix."threads.forum_id=".$db_prefix."forums.forum_id
   WHERE ".groupaccess('forum_access')." ORDER BY thread_lastpost DESC LIMIT 5
");
if (dbrows($result) != 0) {

echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while ($data = dbarray($result)) {
echo "<tr>
<td class='small'>
<img src='".THEME."images/bullet.gif' alt=''> <a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&amp;thread_id=".$data['thread_id']."' title='".$data['thread_subject']."' class='side'>".$data['thread_subject']."</a>
</td>
<td align='right'>".($data['thread_replies']-1)."</td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
echo "";
closeside();






irasius koda ".($data['thread_replies']-1)." man visalaiko rodo -1 o pvz irasius ".$data['thread_views']." viskas buna gerai. kaip reikia padayti kad rodytu ne perziuras o atsakymus normaliai o ne -1 ?

Parašė ramon· 2008 Rugs. 13 02:09:10
#2

Tai bandik rasit kintamaji ".$a." kuris :
$a = $data['thread_replies']-1;



Parašė Lordcraft· 2008 Rugs. 13 18:09:52
#3

ramon parašė:
Tai bandik rasit kintamaji ".$a." kuris :
$a = $data['thread_replies']-1;




kaip suprasti? padaryti taip?:

<td align='right'>".$a = $data['thread_replies']-1."</td>

neveikia.... :[

Redagavo Lordcraft· 2008 Rugs. 13 18:09:23

Parašė Kelmas· 2008 Rugs. 19 13:09:57
#4

Nu jokšimat, asilų apsimeta. :|

openside("Naujausi pranesimai");

$result = dbquery("
   SELECT * FROM ".$db_prefix."threads
   INNER JOIN ".$db_prefix."forums ON ".$db_prefix."threads.forum_id=".$db_prefix."forums.forum_id
   WHERE ".groupaccess('forum_access')." ORDER BY thread_lastpost DESC LIMIT 5
");
if (dbrows($result) != 0) {

echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while ($data = dbarray($result)) {
$a = $data['thread_replies']-1;
echo "<tr>
<td class='small'>
<img src='".THEME."images/bullet.gif' alt=''> <a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&amp;thread_id=".$data['thread_id']."' title='".$data['thread_subject']."' class='side'>".$data['thread_subject']."</a>
</td>
<td align='right'>$a</td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
echo "";
closeside();



Redagavo Kelmas· 2008 Rugs. 19 13:09:22