vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Letter Statistics in Member Profile v1.0 (https://vborg.vbsupport.ru/showthread.php?t=50249)

Sho 03-15-2003 10:00 PM

Letter Statistics in Member Profile v1.0
 
This hack will add several new statistics to your member's profile pages:

- The number of letters all his/her posts contain.
- The average number of letters he/she posts per day.
- His/her percentage of all letters in all posts in the database.
- The average number of letters a post by him/her contains.


File Modifications: 1 (member.php)
Template Modifications: 1 (getinfo)


This hack was tested with vBulletin 2.2.7 and 2.3.0 Release Candidate 3. I'm confident it will work with every version of vBulletin in the 2.2.x branch. Probably even with older versions.


Two screenshots of the hack in action are included in the ZIP archive:

screenshot1.gif: Plain vBulletin 2.3.0 RC3.
screenshot2.gif: My own forums, a heavily modified vBulletin 2.2.7 translated into German (hack's in English, though).


Special thanks to Logician for helping with the SQL syntax used in this hack. :)


Have fun with it!

gmarik 03-16-2003 06:11 AM

Perfect. Just perfect. Still you could add a link to a demo site.

Sho 03-16-2003 06:15 AM

Thanks. :)

Live demo site: http://www.forenplanet.de/member.php...nfo&userid=450

It's German, though. Buchstaben = letters. (Hack's in English; screenshot of plain English vB 2.3.0 RC3 included.)

pattox 03-16-2003 07:34 AM

I installed it, nice hack.

Intex 03-16-2003 07:36 AM

Nice hack m8. I'll install this soon.

Dean C 03-16-2003 08:45 AM

Lovely idea. I guess this will be server intensive as it breaks down every word and then processes it into a table?

- miSt

Sho 03-16-2003 08:54 AM

No, not significantly. We have about 120.000 posts in our database, and for a user with 2500 posts it slows down the generation of the profile page by circa 0.2 seconds (according to vBMicrostats in our footer). On a not particularly powerful, shared server.

The MySQL function LENGTH() returns the length of the specified fields contents for all records in the table, SUM() adds those values together and returns the result. So it's a SUM(LENGTH(pagetext)) for the table "post" WHERE userid=X. That's a pretty fast way to do it - and it doesn't require multiple changes to newthread/editpost/newreply and new table fields to do it statically.

I'd advice against using the same technique for the postbit, but for the profile pages its good enough.

(Yes, that means spaces between words get counted as well. Well, the user had to push the space button, after all. Fair enough, eh? :))

One-Team 03-16-2003 09:04 AM

Nice hack Install it :pirate:

Koopa 03-16-2003 09:21 AM

Nice hack, I might use this :)

dstruct2k 03-17-2003 02:21 AM

Hey, I like! :D

[high]* dstruct2k clicks install[/high]


All times are GMT. The time now is 08:24 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01073 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete