Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
porostorm каза:Каква е разликата м/у последна тема и последно коментирана тема :roll:
<?php
$user=""; //DB user
$pass=""; //DB pass
$db=""; //DB name
$address="; //пътя до форума без / накрая
$broi_temi="12"; // Колко последни теми да показва
$broi_bukvi="27"; //До колко букви от заглавието на темата да показва
$broi_bukvi2="33"; //До колко букви от заглавието на темата да показва категорията
mysql_connect(localhost,$user,$pass);
mysql_select_db($db) or die( "Unable to select database");
$query="SELECT c.topic_time , c.topic_last_post_id, c.topic_title,c.forum_id,c.topic_id, c.topic_replies, c.topic_views, c.topic_type,f.forum_name FROM phpbb_topics c, phpbb_forums f WHERE c.forum_id=f.forum_id and f.auth_view like '0' ORDER BY c.topic_last_post_id ";
$result=mysql_query($query);
$num=mysql_num_rows($result);
mysql_close();
$ii=$num-$broi_temi;
for ($i=$num-1; $i>$ii;$i--)
{
$tema=mysql_result($result,$i,"c.topic_title");
$id=mysql_result($result,$i,"c.forum_id");
$topic_broi=mysql_result($result,$i,"c.topic_replies");
$topic_id=mysql_result($result,$i,"c.topic_id");
$topic=mysql_result($result,$i,"c.topic_type");
$cat=mysql_result($result,$i,"f.forum_name");
$views=mysql_result($result,$i,"c.topic_views");
if (strlen($tema)>$broi_bukvi)
{$totchki='...';}
else
{$totchki='';}
$tema=substr($tema,0 , $broi_bukvi);
if
(strlen($cat)>$broi_bukvi2)
{$totchki2='...';}
else
{$totchki2='';}
$cat=substr($cat,0 , $broi_bukvi2);
echo"$cat$totchki2 » <a class='gensmall' href='$address/viewtopic.php?t=$topic_id' target='_blank'>$tema$totchki ($topic_broi)</a><br />";
}
?>
porostorm каза:Това ти трябва:
Код:<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251"> <meta http-equiv="Content-Language" content="bg"> </head> <table>temi</table> <body> <?php $user=""; //DB user $pass=""; //DB pass $db=""; //DB name $address="; //пътя до форума без / накрая $broi_temi="12"; // Колко последни теми да показва $broi_bukvi="27"; //До колко букви от заглавието на темата да показва $broi_bukvi2="33"; //До колко букви от заглавието на темата да показва категорията mysql_connect(localhost,$user,$pass); mysql_select_db($db) or die( "Unable to select database"); $query="SELECT c.topic_time , c.topic_last_post_id, c.topic_title,c.forum_id,c.topic_id, c.topic_replies, c.topic_views, c.topic_type,f.forum_name FROM phpbb_topics c, phpbb_forums f WHERE c.forum_id=f.forum_id and f.auth_view like '0' ORDER BY c.topic_last_post_id "; $result=mysql_query($query); $num=mysql_num_rows($result); mysql_close(); $ii=$num-$broi_temi; for ($i=$num-1; $i>$ii;$i--) { $tema=mysql_result($result,$i,"c.topic_title"); $id=mysql_result($result,$i,"c.forum_id"); $topic_broi=mysql_result($result,$i,"c.topic_replies"); $topic_id=mysql_result($result,$i,"c.topic_id"); $topic=mysql_result($result,$i,"c.topic_type"); $cat=mysql_result($result,$i,"f.forum_name"); $views=mysql_result($result,$i,"c.topic_views"); if (strlen($tema)>$broi_bukvi) {$totchki='...';} else {$totchki='';} $tema=substr($tema,0 , $broi_bukvi); if (strlen($cat)>$broi_bukvi2) {$totchki2='...';} else {$totchki2='';} $cat=substr($cat,0 , $broi_bukvi2); echo"$cat$totchki2 » <a class='gensmall' href='$address/viewtopic.php?t=$topic_id' target='_blank'>$tema$totchki ($topic_broi)</a><br />"; } ?> </body> </html>