21
bbgds
Re:Are multiple news modules possible?
  • 2004/10/29 20:18

  • bbgds

  • Just popping in

  • Posts: 93

  • Since: 2004/7/23


Kahumbu....

I got tired of waiting around for approval that will likely not come at all, and decided to start work on my own news site at http://nationalnewsregister.com

I don't have any content yet, except some that I snagged for testing purposes.

Anyway, I started to modify the Topics Block, but I haven't really gotten anywhere with it. Here is the code I have for the block so far....

----

World Events




----

I'm only working with one category right now till I get it figured out. But the stories don't actually display. (I don't think I'm there yet on the code.) Any suggestions you could give me?

22
kahumbu
Re:Are multiple news modules possible?
  • 2004/11/9 20:21

  • kahumbu

  • Documentation Writer

  • Posts: 277

  • Since: 2003/8/23


Hi bbgds,

Got your email. Here is the code in one of the blocks in my Topics Block module:

<div style="padding-bottom: 5px;">
<
a href="<{$xoops_url}>/modules/news/index.php?storytopic=2">Newsa>&nbsp;|&nbsp;
<
a href="<{$xoops_url}>/modules/news/index.php?storytopic=13">PhilHealtha>div>
<{foreach 
item=item from=$block.items}>
<
div style="padding-bottom: 3px;">» <a href="<{$xoops_url}>/modules/news/article.php?storyid=<{$item.id}>" style="font-weight: normal;"><{$item.title}>a>div>
<{/foreach}>


Basically, I hard-coded the name of Category into each block I am using. But you need to let the <{foreach}> do its own looping to get the news items displayed. I am not sure if the foreach you used and the Smarty tags in there are from the Topics Block module.

Here is a screenshot of my Block Settings:
Resized Image

Hope this helps.

23
bbgds
Re:Are multiple news modules possible?
  • 2004/11/15 1:29

  • bbgds

  • Just popping in

  • Posts: 93

  • Since: 2004/7/23


Okay, some wierdness now. I modified the topics block template, and entered a couple of test articles. But what it seems to have done is transfered the preview block from the topic page to the Front Page.

You can see it at http://nationalnewsregister.com

Also, how did you get the admin block options? Was that another script you wrote?

24
bbgds
Re:Are multiple news modules possible?
  • 2004/11/15 3:32

  • bbgds

  • Just popping in

  • Posts: 93

  • Since: 2004/7/23


Kahumbu...

Okay, fixed the problem with the preview blocks (my fault, I had a link in imenu configured wrong.)

But the block doesn't show the links to the individual articles. What else do I need to do here?

Login

Who's Online

140 user(s) are online (58 user(s) are browsing Support Forums)


Members: 0


Guests: 140


more...

Donat-O-Meter

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

Latest GitHub Commits