Posts on the childboards do not count

Started by animeri, December 21, 2009, 03:48:26 PM

Previous topic - Next topic

animeri

Me again:)
I have posted a message in a childboard but it does not count in the main board (page) even I had ticked the appropriate checkbox. Checkbox definition can be translated as "add childboard count to main board count". How can I solve this?
Thanks.

Arantor

There's a separate option in the board's own configuration for whether it should count posts or not, check that it is ticked.

animeri

Message was posted on "let's say" sub2. Then comes sub1(upper) board and then main board. Post count is checked on all of these. Any suggestions?

Arantor



Arantor

Ah... I see. Child board of a child board won't count.

It doesn't carry more than two levels for efficiency reasons. It *is* possible to change that but it requires modifying the raw code, and slowing down the site in both the front page and the topic listing pages to do it.

animeri

I want it to be shown, the forum will be a small one in terms of post numbers. I mean, the performance probably won't be affected so much.  So do you know how I can change the raw code? Many thanks.

Arantor

#7
It's not about the number of posts as such. It's more about the number of boards and how many posts in each board.

To do it, edit Sources/Subs-BoardIndex.php

Code (find) Select
WHERE {query_see_board}' . (empty($boardIndexOptions['countChildPosts']) ? (empty($boardIndexOptions['base_level']) ? '' : '
AND b.child_level >= {int:child_level}') : '
AND b.child_level BETWEEN ' . $boardIndexOptions['base_level'] . ' AND ' . ($boardIndexOptions['base_level'] + 1))


Code (replace) Select
WHERE {query_see_board}'

This may have other side effects though, not sure off the top of my head. If in doubt, backup first.

animeri

I got this error:

Parse error: syntax error, unexpected T_ARRAY in /home/www/website/Sources/Subs-BoardIndex.php on line 75

I have loaded the original file back. Any solutions?

Arantor

Did you leave the comma at the end of the line?

animeri

No, If I leave comma I get this error:

Parse error: syntax error, unexpected ',' in /home/www/website/Sources/Subs-BoardIndex.php on line 74

Arantor

Can you attach that file here please (the modified one)?

Arantor

Nope, the comma was removed.

WHERE {query_see_board}')
      array(
         'current_member' => $user_info['id'],
         'child_level' => $boardIndexOptions['base_level'],
         'blank_string' => '',
      )


Should have been:
WHERE {query_see_board}'),
      array(
         'current_member' => $user_info['id'],
         'child_level' => $boardIndexOptions['base_level'],
         'blank_string' => '',
      )

animeri

No, I've just removed it. If I put it, I get this:

Parse error: syntax error, unexpected ',' in /home/www/website/Sources/Subs-BoardIndex.php on line 74

Here is the file (sorry, I've just discovered additional options and attachment now.)


Arantor

I still see no comma after the bracket.

WHERE {query_see_board}')
array(
'current_member' => $user_info['id'],
'child_level' => $boardIndexOptions['base_level'],
'blank_string' => '',
)


That came from the file you just attached.

WHERE {query_see_board}') should have a comma after it.

animeri

I can send you the comma version if you want, but it does not matter because it gives me this error:

Parse error: syntax error, unexpected ',' in /home/www/website/Sources/Subs-BoardIndex.php on line 74

Arantor

GAH, I'm sorry, I miscounted the brackets.

The line should have been WHERE {query_see_board}',

animeri


Arantor

Awesome. Guess we can now mark this one solved?


Advertisement: