The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
simple one..
I have this hack that calls threads from my fourms. The problem I have is it will mess up my tables when people put in the vb code or urls. How can I tell it to ignore those?
Here is the hack... I have had it for almost 2 years... I have no idea where it came from. <? require("/config.php"); $num_active = 4; $num_chars = 40; $db=mysql_connect($servername,$dbusername,$dbpassw ord); mysql_select_db($dbname); $querylatest="select * from thread where forumid='1' or forumid='78' or forumid='45' or forumid='11' or forumid='15' or forumid='43' or forumid='2' or forumid='35' or forumid='65' or forumid='7' or forumid='86' or forumid='85' or forumid='87' or forumid='12' or forumid='46' or forumid='3' or forumid='80' or forumid='4' or forumid='5' or forumid='36' or forumid='37' or forumid='44' or forumid='17' or forumid='81' or forumid='38' or forumid='69' or forumid='13' or forumid='14' or forumid='96' or forumid='97' or forumid='95' order by lastpost desc limit $num_active"; $resultlatest = mysql_query($querylatest,$db); print("<table width=\"75%%\" cellspacing=\"0\" cellpadding=\"1\">"); while ($latest_array = mysql_fetch_array($resultlatest)) { $querythread="select * from post where threadid='$latest_array[threadid]' order by dateline asc limit 1"; $result_thread_text= mysql_query($querythread,$db); $result_thread_array = mysql_fetch_array($result_thread_text); printf ("<td align=\"left\" width=\"75%%\" bgcolor=\"#ffffff\"><font face=\"arial,Verdana, ArialHelveticasans-serif\" size=\"2\">%s... </font><a href=\"/boards/showthread.php?threadid=%s\"><font face=\"arial,Verdana, ArialHelveticasans-serif\" size=\"2\">Rant Here </font></a></td></tr>",substr(strip_tags($result_thread_array["pagetext"]),0,$num_chars),$latest_array["threadid"]); printf ("<tr><td colspan=\"2\" width=\"75%%\"> </td></tr>"); } printf ("</table>"); ?> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|