The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
I am having a couple problems.
1. How do I get this code to loop more then once. As it is now, it only displays 1 entry and I dont know why. Code:
//Display The News
$newsquery = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "home_news");
while ($news = $vbulletin->db->fetch_array($newsquery))
{
$newstitle = htmlspecialchars_uni($news['newstitle']);
$newstext = htmlspecialchars_uni($news['message']);
$tid = $news['threadnum'];
eval('$home_newslist = "' . fetch_template('home_newslist') . '";');
}
eval('$home_news = "' . fetch_template('home_news') . '";');
|
|
#2
|
|||
|
|||
|
You need to concat the $home_newslist with .=:
eval('$home_newslist .= "' . fetch_template('home_newslist') . '";'); |
|
#3
|
||||
|
||||
|
Thanks that worked. Now for an answer to the 2nd question.
|
|
#4
|
|||
|
|||
|
Select the last thread from the forum where the pollid does not equal 0.
So [minicode] WHERE forumid = X AND pollid != 0 [/minicode] You'd then need too pull the poll information from the poll table, maybe with a join statement? Best would be to set up a test poll and see what is going on. |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|