Advertisement:

[REQUEST] Post count, Split into Topic Count and Reply Count

Aloittaja Lucnet, toukokuu 26, 2007, 03:40:36 IP

« edellinen - seuraava »

Lucnet

I am wanting to have Topic Count and Reply Count on my forum instead of just Post count.

Anybody know how I can do this?
LucnetSolutions - World Wide Hosting Solutions
DecalCity - Decals and Custom Decals

SudeeraJ

If you can please create a mod, i need it too,

I think it would be very usefull because, we could find real , high posters rather than, just  1 line 2 line repliers.

Thank You.
My Implimentation Of SMF:
http://www.tmmlk.com [nofollow]


erlend_sh

This could be a great mod, have had similar thoughts since very first time I started browsing forums.

Could also be important for this mod:
Being able to sort between thread-creators and repliers (most and fewest of course) in memberslist and stuff like that.

SudeeraJ

My Implimentation Of SMF:
http://www.tmmlk.com [nofollow]


codenaught

Wouldn't be too hard to do. However SMF doesn't currently store how many topics a user has made, when such information is asked for on the stats page, it is generated on the fly, which would be far too inefficient to do when inside a topic. I believe a new column would need to be stored in the members table that gets updated each time a member makes a new topic. Also, there would need to be a utility that could be run that could recalculate everyone's topic count on the spot. This would especially be needed to be done when the mod would first be installed.
Dev Consultant
Former SMF Doc Coordinator

erlend_sh

Lainaus käyttäjältä: akabugeyes - syyskuu 16, 2007, 12:11:19 AP
Wouldn't be too hard to do. However SMF doesn't currently store how many topics a user has made, when such information is asked for on the stats page, it is generated on the fly, which would be far too inefficient to do when inside a topic. I believe a new column would need to be stored in the members table that gets updated each time a member makes a new topic. Also, there would need to be a utility that could be run that could recalculate everyone's topic count on the spot. This would especially be needed to be done when the mod would first be installed.
- Maybe all the more reason to make it a default feature? I don't see how this makes SMF more bloated in any way, it just adds a feature that many people have simply overlooked, but I think many will find quite useful. Breaking out of the standard a bit is usually healthy :)

FaNtEcH

I'd love this mod too. It'd be lovely if someone could make it!

SudeeraJ

Lainaus käyttäjältä: Sadr - syyskuu 16, 2007, 06:05:46 IP
Lainaus käyttäjältä: akabugeyes - syyskuu 16, 2007, 12:11:19 AP
Wouldn't be too hard to do. However SMF doesn't currently store how many topics a user has made, when such information is asked for on the stats page, it is generated on the fly, which would be far too inefficient to do when inside a topic. I believe a new column would need to be stored in the members table that gets updated each time a member makes a new topic. Also, there would need to be a utility that could be run that could recalculate everyone's topic count on the spot. This would especially be needed to be done when the mod would first be installed.
- Maybe all the more reason to make it a default feature? I don't see how this makes SMF more bloated in any way, it just adds a feature that many people have simply overlooked, but I think many will find quite useful. Breaking out of the standard a bit is usually healthy :)

i simply do AGREE !!
My Implimentation Of SMF:
http://www.tmmlk.com [nofollow]


metallica48423

#8
LainaaHowever SMF doesn't currently store how many topics a user has made

Yes it does, or, at least it is calculated.

Look in profile stats.

You could get this either way by querying the topics table and count the number of results where ID_MEMBER is equal to the member ID.  Or you could go the more conservative way and actually store the running total and update the topic count when creating a new topic.  The first way is more versatile but more server intensive

So you could technically load that data in Display.template.php and Subtract the topics total from the post count and get the replies total.

I'll take a look at this if i get a chance sometime, but i'm very short on time, someone else may want to take it up.
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

LainaaMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

SudeeraJ

Dear Sir,
If so How Can The "Total Topics Started" by some user displayed near his/her posts ( Like Post Count is Displayed)
My Implimentation Of SMF:
http://www.tmmlk.com [nofollow]


karlbenson

Re Metallica,
Yes it would be possible to query how many topics created by each user, HOWEVER it would be a huge hit on performance.  It would mean an extra query PER poster on that page.

Thats probably why smf stores a post count.

The stats page is less of an issue because it is viewed less frequently, so the extra load will be few and far between, while the topics are the main content of the forum.

If someone is to do this, IMO the only way to do it without affecting performance is to
a) add topics column
b) run a query on install to recalculate everyones topics count (and reducing post count accordingly)
c) on post, if reply increase reply, else increase topic
d) show the altered topics/replies split on display.template.php (each topic)

SudeeraJ

Please Tell me a query that would calculate everyones topics count, and a query that would increase or decrease reply count.
:D
Please do..
My Implimentation Of SMF:
http://www.tmmlk.com [nofollow]


erlend_sh

Lainaus käyttäjältä: karlbenson - syyskuu 19, 2007, 10:29:34 AP
Re Metallica,
Yes it would be possible to query how many topics created by each user, HOWEVER it would be a huge hit on performance.  It would mean an extra query PER poster on that page.

Thats probably why smf stores a post count.

The stats page is less of an issue because it is viewed less frequently, so the extra load will be few and far between, while the topics are the main content of the forum.

If someone is to do this, IMO the only way to do it without affecting performance is to
a) add topics column
b) run a query on install to recalculate everyones topics count (and reducing post count accordingly)
c) on post, if reply increase reply, else increase topic
d) show the altered topics/replies split on display.template.php (each topic)
- Ehm, uhm, in other words: Making this a default feature would avoid making it a resource-hog, ever? Or?.. I just feel like this is an ingenious feature that has been overlooked by all forums for so long, and it could completely change the way you sort people by ranks and so on. Let SMF hold it's banner high and start marching!

karlbenson

I personally don't think it should be a default feature.  It does'nt need to be in by default to be "efficient" and not a resource hog.

I just thought it important to explain how I would make the mod if I had the time. And make it in an efficient way that isnt unduly affect the server resources as the method proposed by Metallica.

Its a slightly more complex way, but probably necessary.  So hopefully if someone wishes to make the mod, they have some tips.


metallica48423

ironically enough, i was going to propose the less server intensive method first :P
* metallica48423 works bass-ackwards
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

LainaaMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

codenaught

@metallica, quoting only part of what I said? Shame on you. :P

LainaaHowever SMF doesn't currently store how many topics a user has made, when such information is asked for on the stats page, it is generated on the fly, which would be far too inefficient to do when inside a topic.

And it really isn't stored anyway. It is queried when it needs to be on the stats page.

I am seeing similar stuff to what I said, although with what karlbenson said, I think there isn't that much of an advantage splitting it into a reply/topic counts in the actual database. It seems a little risky to modify the actual infrastructure of SMF, what happens when the mod is uninstalled during an upgrade? It probably would be fine enough to use: Replies = Posts - Topics.
Dev Consultant
Former SMF Doc Coordinator

karlbenson

^ akabugeyes you maybe right.

You don't necessarily need to change the architecture of the db.  Just change the appearance ;)

SudeeraJ

anybody please , a MOD, please.
I know it is hard, but please guys look in to it, this will be great, because it will change the rankings, Lets MaRcH!
My Implimentation Of SMF:
http://www.tmmlk.com [nofollow]


karlbenson

Thats a point.  If it didnt affect/reduce the post count.  It wouldn't affect the memberlevels.
So whatever they currently are, they would continue to be counted based on the total posts eg(replies+topics)

Advertisement: