PLEASE fix it so that the main forum page counts ALL posts and shows it!

Started by ivanjs, January 30, 2005, 08:02:38 PM

Previous topic - Next topic

ivanjs

I keep getting emails and IMs from users who say they leave messages in sub boards, but the main board shows no posts and no replies! PLEASE create a variable that keeps count of ALL posts and shows them on the main boards. There are straight 0s down the line on all my main boards, although there are many posts and replies in the sub boards.

John
Lyzrd Stomp Forum:
http://www.lyzrd.com/lyzrdforum/
Photoshop Tutorials and More!
http://www.lyzrdstomp.com/

andrea

There *is* already a variable available which you can use - via template customization.

Copy the file "BoardIndex.template.php" from the default theme into your custom theme directory. Then alter the boardindex such that you total the totals from the child board array and display this total value in your boardindex.

The child forum totals are contained in these variables:
$context['boards']['children'] is the array which contains then the children subarrays, for example if the board with id "n" is a child of the board, there will be the array elements
$context['boards']['children'] [n]['topics']
$context['boards']['children'] [n]['posts']

Andrea Hubacher
Ex Lead Support Specialist
www.simplemachines.org

Personal Signature:
Most recent work:
10 Aqua Themes for SMF



ivanjs

Hey, Andrea-
Thanks for the reply.

I actually know enough php to add variables together, but couldn't find the topics variable or posts variable for the MAIN boards (just the child boards). Where's the main board topic and post variables?

Also, can you go ahead and post a tutorial on exactly how to change the file for me and others who want this on the main board? There are several posts here concerning this very question, and may be of interest to others besides myself! :)

Anyway, why DOES it default to showing 0 on the main page? Wouldn't a total of all boards have made sense on the forum main page? Seems like an odd decision to leave that off...
John
Photoshop Tutorials and More!
http://www.lyzrdstomp.com/

Grudge

Easiest way to do this:

// A valid child!
$isChild = true;


Add after:

$this_category[$row_board['ID_PARENT']]['posts'] +=$row_board['numPosts'];
$this_category[$row_board['ID_PARENT']]['topics'] +=$row_board['numTopics'];


1.1 will have a template variable for this in place I believe. However, the default function of SMF will always be not to list it as a total. Board totals are supposed to list the number of posts/topics in that board, not in every sub-board. Although it would be relatively easy to do just one sub-board in, if you have more than one layer of sub-boards this can get very slow and hence why we don't do it.
I'm only a half geek really...

ivanjs

Thanks for the reply. At least now I understand why you didn't automatically make it do that.

Thanks.
John
Photoshop Tutorials and More!
http://www.lyzrdstomp.com/

andrea


Andrea Hubacher
Ex Lead Support Specialist
www.simplemachines.org

Personal Signature:
Most recent work:
10 Aqua Themes for SMF



[Unknown]

I ask again.  If you have $1000 dollars, and your mother has, herself, $400, and your grandmother has just herself $700... would you consider your grandmother to really have $2100 dollars?  No, because she has what she has, and you have what you have.

Most people only want this to either increase the counts to look better (bleh) or because they're using child boards with a completely empty parent (not the original intent of the feature.)  And as Grudge said, there'll be an option for this, okay?  You can make your forum crawl if you want it to.

-[Unknown]

andrea

Quote from: [Unknown] on January 31, 2005, 04:18:05 PM
I ask again.  If you have $1000 dollars, and your mother has, herself, $400, and your grandmother has just herself $700... would you consider your grandmother to really have $2100 dollars?  No, because she has what she has, and you have what you have.

Not the grandmother has $2100 dollars - but the family has $2100 dollars. It depends on the point of view - some people might see the bi totals show the family totals.

Andrea Hubacher
Ex Lead Support Specialist
www.simplemachines.org

Personal Signature:
Most recent work:
10 Aqua Themes for SMF



[Unknown]

No the family has more (other siblings, fathers, etc.) and that's the total shown in "key stats" in the default theme.

-[Unknown]

andrea

Still depends on the view. I meant with family the board including its child boards (you mean with family the whole forum if I understand right). I could see the board with its children as family and the whole forum (the totals of which show in keystats) as "tribe" (I mean a set of several families and singles (those without children)).

Andrea Hubacher
Ex Lead Support Specialist
www.simplemachines.org

Personal Signature:
Most recent work:
10 Aqua Themes for SMF



Grudge

I'm only a half geek really...

ivanjs

Oh, man, what an analogy! LOL!

Anyway, I'm not trying to increase counts  (!??!?!), I want people to know that there ARE posts (look, the whole reason I even asked about this is because I'm getting emails asking why the main boards show 0 but once they snoop around, they actually find posts).

Anyway, I put this in my News box at the top of the forum:
NOTICE: Please ignore the fact that there are zeros in some of the main boards. There may actually be posts inside in the child boards.
Always look in the "Last Post" column to determine if there are posts in a given board.         

John               

Quote from: [Unknown] on January 31, 2005, 04:18:05 PM
I ask again.  If you have $1000 dollars, and your mother has, herself, $400, and your grandmother has just herself $700... would you consider your grandmother to really have $2100 dollars?  No, because she has what she has, and you have what you have.

Most people only want this to either increase the counts to look better (bleh) or because they're using child boards with a completely empty parent (not the original intent of the feature.)  And as Grudge said, there'll be an option for this, okay?  You can make your forum crawl if you want it to.

-[Unknown]
Photoshop Tutorials and More!
http://www.lyzrdstomp.com/

James Woodcock

I believe this should be an option in admin to enable this way of making the totals in the next version of SMF.  There can always be a warning along with it!

Jerry



- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

James Woodcock


SanSite.Info


HEB XI 1

Quote from: Jerry on February 03, 2005, 04:32:50 AM
1.1 will have this option :)

That's because 1.02 comes before 1.1 ... 1.1 isn't out except to Charter Members.

Jerry

if you search the forums, there is a solution for this problem ;)


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

drhamad

I use empty parents (hence why I'm really wanting a sub-categories mod, not just sub-forums (aka child boards), so this feature is important to me.  Good to see it is coming in 1.1.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

md80forum

Yes, me too. Don't forget to put the option in with the final 1.1 ...   8)

Jan-Erik

Advertisement: