Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Latest news in centerpanel

Hi all. Wondering if anyone could help make a centerpanel that shows only the latest news (only 1 news). I want to have this panel alone a bit higher on the site, and the other news in the original panel.
OK Ken,

Here are some choices for you.

[Basic Center News Panel & Page]

[Extended News Page]

Or here is a Latest News Panel...

Paste this in a new panel (Admin >>> System >>> Panels.

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]//Latest News
openside("Latest News"wink;
$result = dbquery("SELECT * FROM ".DB_NEWS." WHERE ".groupaccess('news_visibility'wink." ORDER BY news_datestamp DESC LIMIT 0,5"wink;
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {

$itemsubject = trimlink($data['news_subject'], 100);
echo "".THEME_BULLET." <a href='".BASEDIR."news.php?readmore=".$data['news_id']."' title='".$data['news_subject']."' class='side'>$itemsubject</a><br>\n";
} else {
echo "<span class='' style='text-align:center;'>There is no news in this cat</span>\n";

change DESC LIMIT 0,5 to 1

Hope this helps...

If you want to do it like I have on the home.php on fangree.co.uk let me know.
Thanks mate :)
Your Welcome man. ;)
Thread Information
4 posts
2,600 times
Last Post
Last updated on 10 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Ken, Craig