Take A Look With This Latest Topics Script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Take A Look With This Latest Topics Script

    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&amp;sid=$sid&amp;t id=$item[0]&amp;go=last\">$item[1]</a>";
    echo "$lnk<br/>";
    } } echo "</p>";
    echo "<p align=\"center\">";
    echo "<a href=\"search.php?action=tpc&amp;sid=$sid\">Search Topics</a><br/>";
    echo "<a href=\"index.php?action=forumindx&amp;sid=$sid\">F orum Index</a><br/>";
    echo "<a href=\"index.php?action=main&amp;sid=$sid\">";
    echo "Home</a><br/>";
    echo "</p>";
    echo "</card>";
    }

    #2
    Just add it to index.php file and heres the hmtl version i translated..


    //////////////////////////////////////////Latest Topics
    else if($action=="ltpc")
    { addonline(getuid_sid($sid),"Vieweng Latest Topics","index.php?action=$action");
    echo "<head>";
    echo "<title>Latest Topics</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body>";
    echo "<timer value=\"300\"/>";
    //////ALL LISTS SCRIPT <<
    if($page=="" || $page<=0)$page=1;
    $num_items = regmemcount(); //changeable
    $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&amp;sid=$sid&amp;t id=$item[0]&amp;go=last\">$item[1]</a>";
    echo "$lnk<br/>";
    } } echo "</p>";
    echo "<p align=\"center\">";
    echo "<a href=\"search.php?action=tpc&amp;sid=$sid\">Search Topics</a><br/>";
    echo "<a href=\"index.php?action=forumindx&amp;sid=$sid\">F orum Index</a><br/>";
    echo "<a href=\"index.php?action=main&amp;sid=$sid\">";
    echo "Home</a>";
    echo "</p>";
    echo "</body>";
    }

    It is all working with no errors the only problem is the private topics.help me pls to correct this misc.thanks...

    Comment

    Working...
    X