The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Plugin Conditional
Hi, I have a latest post plugin and I want to not show certain forums, what would I add to this plugin to do so?
Code:
$siteposts = $db->query_read(" SELECT thread.lastposter, thread.lastpost, thread.views, thread.open, thread.forumid, thread.replycount, thread.threadid, thread.pollid, thread.title, user.username, user.userid, user.usergroupid, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid FROM thread as thread LEFT JOIN user AS user ON (user.username = thread.lastposter) ORDER BY lastpost DESC LIMIT 0, 25"); while($latest = $db->fetch_array($siteposts)) { $latest['title'] = str_replace($hidechar, " ", $latest['title']); if (strlen($latest['title']) > 28) { $latest['title'] = substr($latest['title'], 0, 28) . '...'; } else { $latest['title'] = $latest['title']; } $latest['title'] = htmlspecialchars($latest['title']); $trans = array("&" => "&"); $latest['title'] = strtr($latest['title'], $trans); $latest['replycount'] = number_format($latest['replycount']); $lastest[musername] = fetch_musername($latest); $lastest[musername] = $db->escape_string($lastest['musername']); $date = date("g:i a",$latest['lastpost']); $latest_posts .= " <div style='padding: 4px;'> <div style='font-size: 11px;'>• <a href='showthread.php?t=$latest[threadid]' title='$latest[title]' style='font-size: 10px;'><b>$latest[title]</b></a></div> <div style='padding-top: 1px; padding-bottom: 1px;'><a href='member.php?u=$latest[userid]' style='font-size: 9px;'>$latest[musername] Posted this thread at $date</a></div> </div>"; } $db->free_result($siteposts); |
#2
|
|||
|
|||
In the query you need to add a WHERE clause with something like
[sql] WHERE thread.forumid NOT IN (X,Y,Z) [/sql] Replace X, Y, Z with actual forumids. Keep in mind that your code does not consider forum permissions! |
#3
|
|||
|
|||
Quote:
How would I add this? and where would I add this? Im still a newbie at coding. |
#4
|
|||
|
|||
Sorry, I don't have access to the code right now... I think your best bet would be to search for such a modification, I doubt that one hasn't been released yet. Maybe you can adapt to it to suit your needs.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|