1
defwind77
Cloning Module - XMSpotlight
  • 2006/1/22 14:32

  • defwind77

  • Not too shy to talk

  • Posts: 180

  • Since: 2005/11/11


Ok first of all the XMSpotlight is awesome! You can FINALLY get that xoops.org look - so go and check it out!

Now I have it working with news 1.44 on my site and it's great - however I need more than four topics (eight in fact)

Now this doesn't appear very easy in this module as it doesn't have anyway of selecting which topics appear in the module - I think it just selects the first four in News 1.44 and that's your lot.

So I guess I could either:

a) edit the XMSpotlight block template and add the extra topics there somehow.

OR

b) clone the module and add another block and just change this to show topics 5-8 from news, rather than 1-4

Does anyone know if either of these is likely to succeed or any other way to get around this limitation?

Many thanks!

2
smdcom
Re: Cloning Module - XMSpotlight

To add one more category, edit file xmspotlight_block_news.php

Add this line before code return $block;

*Red color: your topic id

$news6 = array();
    
$storyarray6 NewsStory::getByTopic([b][color=ff0000]10[/color][/b],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'), $article5->topicid());
            
$block['image6'] = $xt->topic_imgurl("S");
            
$block['imgpath6'] = XOOPS_URL."/modules/news/images/topics/";
            
$block['category6'] = $xt->topic_title();
            
$block['stories6'][] = $news6;
        }
    }


Edit Template. Add this code...

<{foreach item=news6 from=$block.stories6}><a href="<{$xoops_url}>/modules/news/article.php?storyid=<{$news6.storyid}>"><{$news6.newstitle}></a><br><br><{/foreach}>


In the next release i will add this feature where you can more topic...

-SMD-

3
defwind77
Re: Cloning Module - XMSpotlight
  • 2006/1/22 21:19

  • defwind77

  • Not too shy to talk

  • Posts: 180

  • Since: 2005/11/11


Hi SMD - that's very kind of you - however it doesn't appear to work - I note from the xmspotlight_block_news.php that there's a couple of extra lines above each 'block' that's missing in the code you posted - I altered it like:

$sql = "SELECT * FROM ".$xoopsDB->prefix('xmspotlight')." WHERE xmspotlight_id = 6";
$topic5 = $xoopsDB->fetchArray($xoopsDB->query($sql));

But it still doesn't appear - can you tell me where I insert the template line you posted second - again is it 'just' what you posted or do I need to replicate the table code like the other four?

Many thanks! ;)

4
Peter_GW
Re: Cloning Module - XMSpotlight
  • 2006/1/24 21:35

  • Peter_GW

  • Just popping in

  • Posts: 20

  • Since: 2005/12/12


Problems with that modul ....

1.) Is it a bug or a prob with my website that the module dont show me the complete latest news entry above the categorys?

2.) it shows also news entries that are set as automatic posts

Im the only one with that probs or not?

5
defwind77
Re: Cloning Module - XMSpotlight
  • 2006/1/25 8:52

  • defwind77

  • Not too shy to talk

  • Posts: 180

  • Since: 2005/11/11


Hmm I can't say I experienced the first - it could be if you have longer titles though.

What do you mean by automatic posts?

6
konadu
Re: Cloning Module - XMSpotlight
  • 2006/1/25 17:29

  • konadu

  • Not too shy to talk

  • Posts: 116

  • Since: 2005/11/27


does anyone know where i can get the XMSpotlight module?

7
davidl2
Re: Cloning Module - XMSpotlight
  • 2006/1/25 17:41

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26



8
konadu
Re: Cloning Module - XMSpotlight
  • 2006/1/25 17:53

  • konadu

  • Not too shy to talk

  • Posts: 116

  • Since: 2005/11/27


Thanks allot...


Xoops support is Fantastic....

9
davidl2
Re: Cloning Module - XMSpotlight
  • 2006/1/25 18:44

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


We can only try

10
Peter_GW
Re: Cloning Module - XMSpotlight
  • 2006/1/26 6:02

  • Peter_GW

  • Just popping in

  • Posts: 20

  • Since: 2005/12/12


Quote:

defwind77 wrote:
Hmm I can't say I experienced the first - it could be if you have longer titles though.

What do you mean by automatic posts?


When u write an news Article u have the option that the article can be published at a specific date and time and not at this moment.

Like i want that this article will not be published now - he shall become active tomorrow at 12:00.


thx.

Login

Who's Online

184 user(s) are online (94 user(s) are browsing Support Forums)


Members: 0


Guests: 184


more...

Donat-O-Meter

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

Latest GitHub Commits