1
MCTheSpartan
Multi Article News Spotlight

Is there any way to use the spotlight features in the recent news block to show more than 1 article? I like the way the block is laid out, much more than having my start page be news. But I do not like that it will only show the latest article, I can do a teaser of the others, but this does not work right as it will show the read more text in the same screen. Is there a hack or something that would allow the spotlight to show more than the 1 article? Thanks.

2
stephenjacob
Re: Multi Article News Spotlight

I'm currently looking for the same thing. I have an article in the begginers corner (which i'm realising probably should be here) with some coding questions.

View my topic

Let me know if you've found any solutions.

Thanks!!

3
stephenjacob
Re: Multi Article News Spotlight

Well here's what i'm currently trying to create for the 5 Article News Block. Any suggestions to why the "hometext" is the same on both but the rest of the content is unique?

http://hamilton-ohio.com/main/

Here's the script i'm trying to use. Thanks in advance!!

global $xoopsDB$xoopsConfig$xoopsUser$xoopsModule$xoopsModuleConfig$HTTP_SERVER_VARS;    
include_once 
XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php';

$topicid 2;

$query "SELECT storyid, title, topicid, hometext FROM ".XOOPS_DB_PREFIX."_stories WHERE topicid='$topicid' ORDER BY storyid ASC";
$result mysql_query($query);
$rows mysql_num_rows($result);
$sarray NewsStory::getAllPublished();
$scount count($sarray);

for ( 
$i 0$i $scount$i++ ) {
    
$storyid $sarray[$i]->storyid();
    
$storytext $sarray[$i]->hometext();
    }


    while (
$row mysql_fetch_object($result))
    {
          if ( 
$row->topic=$topicid)
      { 


echo 
"<table cellspacing=1 class=outer><tr align=left valign=top><th colspan=2>
      <table width=100% cellspacing=0 cellpadding=0><tr>
      <td width=25><img border=0 src=http://domain.com/images/headline_icon.gif></td>"
;
        
echo 
"<td class=subhead>$row->title</td><td class=subhead width=80>";

    if (
is_object($xoopsUser)) {
echo 
"[<a class=white href=http://domain.com/main/modules/news/admin/index.php?op=edit&storyid=$row->storyid>Edit</a>
 | <a class=white href=http://domain.com/main/modules/news/admin/index.php?op=delete&storyid=
$row->storyid>Delete</a>]";
    }
    echo 
"</tr></table></th></tr><tr><td valign=top align='left' class='even'>$storytext</td></tr></table><br>";

}
    }

Login

Who's Online

158 user(s) are online (86 user(s) are browsing Support Forums)


Members: 0


Guests: 158


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits