MarkFoster
04-15-2009, 10:15 PM
I want to edit something in my PHP file.
This is what I want changed:
WHERE thread.forumid = " . intval($vbulletin->options['rwc_newsforum']) . "
I want to change it so I can type a forum ID right there instead of it loading from a vbulletin option.
Below is the full code.
<?php
unset($latestnewsbits);
$threads = $vbulletin->db->query_read("
SELECT thread.threadid, thread.title, thread.iconid, thread.dateline, thread.postusername, thread.postuserid,
post.pagetext
FROM " . TABLE_PREFIX . "thread AS thread
INNER JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = thread.firstpostid)
WHERE thread.forumid = " . intval($vbulletin->options['rwc_newsforum']) . "
ORDER BY thread.dateline DESC
LIMIT 5
");
while ($thread = $vbulletin->db->fetch_array($threads))
{
$dateposted = vbdate("jS F Y \\- g:iA", $thread['dateline']);
$message = fetch_trimmed_title(strip_bbcode($thread['pagetext'], true, true), 200);
eval('$latestnewsbits .= "' . fetch_template('rwc_latestnews_bit') . '";');
}
$can_moderate_rwc = can_moderate(intval($vbulletin->options['rwc_newsforum']));
eval('$home["$mods[modid]"][\'content\'] = "' . fetch_template('rwc_latestnews') . '";');
?>
This is what I want changed:
WHERE thread.forumid = " . intval($vbulletin->options['rwc_newsforum']) . "
I want to change it so I can type a forum ID right there instead of it loading from a vbulletin option.
Below is the full code.
<?php
unset($latestnewsbits);
$threads = $vbulletin->db->query_read("
SELECT thread.threadid, thread.title, thread.iconid, thread.dateline, thread.postusername, thread.postuserid,
post.pagetext
FROM " . TABLE_PREFIX . "thread AS thread
INNER JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = thread.firstpostid)
WHERE thread.forumid = " . intval($vbulletin->options['rwc_newsforum']) . "
ORDER BY thread.dateline DESC
LIMIT 5
");
while ($thread = $vbulletin->db->fetch_array($threads))
{
$dateposted = vbdate("jS F Y \\- g:iA", $thread['dateline']);
$message = fetch_trimmed_title(strip_bbcode($thread['pagetext'], true, true), 200);
eval('$latestnewsbits .= "' . fetch_template('rwc_latestnews_bit') . '";');
}
$can_moderate_rwc = can_moderate(intval($vbulletin->options['rwc_newsforum']));
eval('$home["$mods[modid]"][\'content\'] = "' . fetch_template('rwc_latestnews') . '";');
?>