Take A Look With This Latest Topics Script

Started on the old forum in July 2009 · view the original in the archive · old links redirect here

1 reply · 669 views · started 17 years ago · 1 min read

l0rdrayven Developer · 83 posts #1

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 " "; echo "Active Topics"; echo " "; echo " "; $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&tid=$item[0]&go=last">$item[1]</a>"; echo "$lnk "; } } echo " "; echo " "; echo "<a href="search.php?action=tpc&sid=$sid">Search Topics</a> "; echo "<a href="index.php?action=forumindx&sid=$sid">Forum Index</a> "; echo "<a href="index.php?action=main&sid=$sid">"; echo "Home</a> "; echo " "; echo "</card>"; }

Not i rip persons off i will also do your arse !

l0rdrayven Developer · 83 posts #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 " "; echo "Active Topics"; echo " "; echo " "; $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&tid=$item[0]&go=last">$item[1]</a>"; echo "$lnk "; } } echo " "; echo " "; echo "<a href="search.php?action=tpc&sid=$sid">Search Topics</a> "; echo "<a href="index.php?action=forumindx&sid=$sid">Forum Index</a> "; echo "<a href="index.php?action=main&sid=$sid">"; echo "Home</a>"; echo " "; echo "</body>"; }

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

Not i rip persons off i will also do your arse !

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close