Customizing SMF > SMF Coding Discussion

Where does SMF increment the user post count?

<< < (2/5) > >>

Arantor:
-sigh- Please tell me we're not going to do this again.

There are a bunch of places that potentially get involved. If you're asking, it's because you want to change it. How you want to change it reflects in where and how things get changed.

Few people ask how a random subsystem works out of 'curiosity', it's because they want to change it.

Flynnn:
I'd like to know all places in the source code that the post count could get changed, or at least what to look for in order to find those places. Believe it or not, it's out of curiosity

Arantor:
Why? What could you hope to learn from it?

Flynnn:
How the system works!

Surely you understand curiosity.

Again, I don't work like most people work, I'd prefer to just have my information and not be asked why. In this case there really isn't even a why.


However, while we are on the topic, same version of SMF, I DO have another question so that this post does not turn completely useless -- Would you happen to know the file that prints the ?board=XYZ page?


Why, you ask? I want to modify the structure of how it publishes. If there is a way to do this with themes, that would be much better.

Sorck:

--- Quote from: Flynnn on July 17, 2012, 02:18:16 AM ---How the system works!

Surely you understand curiosity.

Again, I don't work like most people work, I'd prefer to just have my information and not be asked why. In this case there really isn't even a why.
--- End quote ---
It's handled in the createPost() function (look it up in the SMF function database) but it takes a value 'update_post_count' in $posterOptions which is a bool which says whether or not to update the count. Check /Sources/Post.php line 1906 where the function is called and 1884 where the update_post_count setting is set...

But, as Arantor said, what you want to do with it would change where you want to look.


--- Quote from: Flynnn on July 17, 2012, 02:18:16 AM ---However, while we are on the topic, same version of SMF, I DO have another question so that this post does not turn completely useless -- Would you happen to know the file that prints the ?board=XYZ page?


Why, you ask? I want to modify the structure of how it publishes. If there is a way to do this with themes, that would be much better.

--- End quote ---
Sources/BoardIndex.php contains the database queries for the board index and Themes/Default/BoardIndex.template.php contains how it's displayed.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version