11
Hi there, I've downloaded xmspotlight and I find it sweet! The only problem I've got is the same as some people, I want more topics. I've done what you said about the code but didnt work for me. I'm going to try and do it by copying and modifying the code itself but I would apreciate any help because I really want 8 topics to show on the frontpage.
-EDIT-
Ok, after a while I finally acomplished half of what I wanted to do
I placed this just before the
return $block; line:
$sql = "SELECT * FROM ".$xoopsDB->prefix('xmspotlight')." WHERE xmspotlight_id = 6";
$topic5 = $xoopsDB->fetchArray($xoopsDB->query($sql));
$news6 = array();
$storyarray6 = NewsStory::getByTopic(1,3);
$news6 = '';
foreach($storyarray6 as $article6)
{
if(!in_array($article6->storyid(),$txt)){
$news6['newstitle'] = $article6->title();
$news6['storyid'] = $article6->storyid();
$xt = new XoopsTopic($xoopsDB->prefix('topics'), $article6->topicid());
$block['image5'] = $xt->topic_imgurl("S");
$block['imgpath5'] = XOOPS_URL."/modules/news/images/topics/";
$block['category5'] = $xt->topic_title();
$block['stories6'][] = $news6;
}
}
Then added this line
at the end of the template:
<{foreach item=news6 from=$block.stories6}><a href="<{$xoops_url}>/modules/news/article.php?storyid=<{$news6.storyid}>"><{$news6.newstitle}>a><br><br><{/foreach}>
And ended up with this:
http://www.counter-strike.es/images/news.JPGAs you can see, is the same news as it is above except for that there is no image and there is no title for it. I chose the same topic (topic 1 for me) so I could see if it was working.
Now I'll have to play around to make it show the title and the image. And when im done I will need to add 3 more topics for my web page.
Of course maybe someone knows how to do it, but as I get no response I'm doing my best to achieve it by my own ways. Hope this helps someone.