I am not realy a php programmer myself, so any help would be appreciated. I run a website on cms e107.
Now I have installed a menu plugin called "Recent news menu" This will display the latest news articles in the selected menu area on the site.
Now my problem is that it also displays news that is set to "Not display" (see picture)
Can anyone help how to get this not displayed?
Here is all the code:
<?php
global $sql2, $tp;
$caption = "Recent news";
$no_news = "No news items";
$eol_separator = "</td></tr>";
$sol_separator = "<tr><td style='width:0%;text-align:left;'>";
$qry = "SELECT news_id, news_title FROM #news WHERE news_render_type = 0 ORDER BY news_id DESC LIMIT 0,5";
if($sql2->db_Select_gen($qry))
{
$n_text = "<table style='width:100%;'>";
while ($row = $sql2->db_Fetch())
{
$title = $tp->toHTML($row['news_title']);
$n_text .=$sol_separator ."<a href='".e_HTTP."news.php?item.".$row['news_id']."'>".$title."</a>".$eol_separator;
}
$n_text .= "</table>";
}
else
{
$n_text = $no_news;
}
$ns->tablerender($caption, $n_text);