https://www.icyphoenix.com/viewtopic.php?f=35&t=6590
-----------------------------------
pax
Tue 20 Oct, 2009 00:16

Don't Show News Comments In Home
-----------------------------------
Sorry for my english...

http://www.viscarani.it/portalesws/index.php?topic_id=1467


Comment are 12, but in home only 10 show...and don't show "page 2"

Why?

other example:

http://www.viscarani.it/portalesws/index.php?news=article&start=91

in this example comments are 21, show page 2 after 10 comment, but show 18 comments in total!

Can help me??

Thanks


-----------------------------------
Mighty Gorgon
Wed 21 Oct, 2009 21:03

Re: Don't Show News Comments In Home
-----------------------------------
Try this...

OPEN [b]includes/news_data.php[/b]
FIND
[codeblock]	function fetchPosts($topic_id, $start = 0)
	{
		$topic_id = intval($topic_id);
		$start = intval($start);
		$start = ($start < 0) ? 0 : $start;

		if($topic_id < 0)
		{
			return array();
		}

		$num_items = $this->num_items;[/codeblock]
REPLACE WITH
[codeblock]	function fetchPosts($topic_id, $start = 0)
	{
		global $board_config;

		$topic_id = intval($topic_id);
		$start = intval($start);
		$start = ($start < 0) ? 0 : $start;

		if($topic_id < 0)
		{
			return array();
		}

		$num_items = $board_config['posts_per_page'];[/codeblock]


Please let me know if it is working fine.


-----------------------------------
Mighty Gorgon
Wed 21 Oct, 2009 21:30

Re: Don't Show News Comments In Home
-----------------------------------
The problem is much more complex than appeared, I have fixed it, but current fix requires many files to be edited... at the moment the best thing you can do is set the number of news to the same value both in ACP and in CMS News Block.

Maybe if you set 10 to both you should fix the issue.

I may provide a fix with a patch, but not sure yet.


-----------------------------------
pax
Thu 22 Oct, 2009 01:13

Re: Don't Show News Comments In Home
-----------------------------------
[quote user="Mighty Gorgon" post="45194"]at the moment the best thing you can do is set the number of news to the same value both in ACP and in CMS News Block. [/quote]

don't work!

[quote user="Mighty Gorgon" post="45194"]
Maybe if you set 10 to both you should fix the issue.
[/quote]

Set 10 work, thanks!

Wait for the fix...


