mates i modified a latest topic script and it is fully working with wml at hmtl version.the only problems are the club topics w/c is private is goin to be accessible because of the link of topic shown in this latest forum topic script.please do include what code to be inserted so that private topics tittle convert in text form like Private Topic And not a link or not show the private topics in the latest forum topic page.heres the code for wml version.
/////////////////////////////////////////Latest Topics
else if($action=="ltpc")
{ addonline(getuid_sid($sid),"Vieweng Latest Topics","index.php?action=$action");
echo "<card id=\"main\" title=\"Latest Topics\">";
echo "<timer value=\"300\"/>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$num_items = regmemcount(); //changable
$items_per_page= 20;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
//changable sql
$sql = "SELECT id, name, lastpost FROM ibwf_topics ORDER BY lastpost DESC
LIMIT 0, 15 ";
echo "<p align=\"center\">";
echo "<b><small>Active Topics</small></b>";
echo "</p>";
echo "<p align=\"left\">";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{ while ($item = mysql_fetch_array($items))
{ $lnk = "<a href=\"index.php?action=viewtpc&sid=$sid&t id=$item[0]&go=last\">$item[1]</a>";
echo "$lnk<br/>";
} } echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"search.php?action=tpc&sid=$sid\">Search Topics</a><br/>";
echo "<a href=\"index.php?action=forumindx&sid=$sid\">F orum Index</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Home</a><br/>";
echo "</p>";
echo "</card>";
}
/////////////////////////////////////////Latest Topics
else if($action=="ltpc")
{ addonline(getuid_sid($sid),"Vieweng Latest Topics","index.php?action=$action");
echo "<card id=\"main\" title=\"Latest Topics\">";
echo "<timer value=\"300\"/>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$num_items = regmemcount(); //changable
$items_per_page= 20;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
//changable sql
$sql = "SELECT id, name, lastpost FROM ibwf_topics ORDER BY lastpost DESC
LIMIT 0, 15 ";
echo "<p align=\"center\">";
echo "<b><small>Active Topics</small></b>";
echo "</p>";
echo "<p align=\"left\">";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{ while ($item = mysql_fetch_array($items))
{ $lnk = "<a href=\"index.php?action=viewtpc&sid=$sid&t id=$item[0]&go=last\">$item[1]</a>";
echo "$lnk<br/>";
} } echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"search.php?action=tpc&sid=$sid\">Search Topics</a><br/>";
echo "<a href=\"index.php?action=forumindx&sid=$sid\">F orum Index</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Home</a><br/>";
echo "</p>";
echo "</card>";
}
Comment