1
Herko
[news 1.44] how to get comments count in top news block (spotlight and more news)
  • 2006/8/15 15:35

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


As the title of this post reveals, I'm looking for a solution that will bring the comments count variable to the top news block, for all news items visible (so the spotlighted news item and the list of other news items shown).

This variable isn't made available in the blocks/news_top.php file, and subsequently not usable in the templates/blocks/news_block_top.html template file. When clicking a news category, or when viewing the news index page however, the comments counter is available.

And I can't find where or how the comments for stories are counted, so I can add this to the news_top.php file and the template I'm building.

Anyone here who can help me out?

Herko

2
hervet
Re: [news 1.44] how to get comments count in top news block (spotlight and more news)
  • 2006/8/15 16:01

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Hello,

You can use $tmpstory->comments(), $story->comments() and spotlightArticle->comments() in the block's code (depending where you are) and assign it to a smarty variable.

bye,
Hervé

3
Herko
Re: [news 1.44] how to get comments count in top news block (spotlight and more news)
  • 2006/8/15 16:22

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


Thanks Hervé for the quick reply, I will try this out and let you know the results!

Herko

4
Herko
Re: [news 1.44] how to get comments count in top news block (spotlight and more news)
  • 2006/8/15 16:25

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


It works! Thanks a lot!

Herko

Login

Who's Online

243 user(s) are online (151 user(s) are browsing Support Forums)


Members: 0


Guests: 243


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