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)
-   -   Show user ages in CP (https://vborg.vbsupport.ru/showthread.php?t=33610)

MarkB 12-30-2001 11:28 AM

Nice :)

the_sisko 12-30-2001 02:39 PM

Quote:

Originally posted by Bedhead
Very useful and informative hack.

Is there any way to modify this so that everyone can see the average ages such as this?

I created a user output of the hack as well ;)
Here is the Add On, which can be installed as a stand alone hack, only for user output.

the_sisko 12-30-2001 02:39 PM

And as well a screenshot for it ;)

Lesane 12-30-2001 04:12 PM

Cool :cool: Thanks Again

Bedhead 12-30-2001 06:01 PM

Thanks buddy!:)

the_sisko 01-04-2002 08:15 AM

Quote:

Originally posted by XiXora
whats csv neway?
CommaSeperatedVersion (Version not sure ;))

You get a file like:

15,45
16,4
21,117

And can open this file e.g. with MS Excel and work with the data. Very nice for persentation or statistics ;)

Freddie Bingham 01-04-2002 05:52 PM

Values.

djr 01-04-2002 11:49 PM

I wrote a small 'more information' add-on for 'User ages in CP' and posting it here with approval of the_sisko.

The idea is:
Registered member information
There are 382 members with complete birthday information, out of 2,664 registered members. 2,282 members have decided to not provide their birthday details.

before
PHP Code:

// ###################### get birthdays ####################### 

add this:
PHP Code:

// ###################### get total registered members #######################
$numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
$numbersmembers=$numbersmembers['users']; 

then before:
PHP Code:

// start output on site || edit this text in echo ""; if you like to 

add this:
PHP Code:

// calculate $nobirthday
$nobirthday $numbersmembers $usercount;
$nobirthday number_format($nobirthday);
$numbersmembers number_format($numbersmembers); 

then after:
PHP Code:

doformheader("showage","show"); 

add this:
PHP Code:

maketableheader("Registered member information","",0,3);
echo 
"<tr class='".getrowbg()."' valign='top'><td>There are $usercount members with complete birthday information, out of $numbersmembers registered members. $nobirthday members have decided to not provide their birthday details</td>\n</tr>\n";
restarttable(); 

then change:
PHP Code:

maketableheader("How old are your users ($usercount with complete birthday)","",0,3); 

in:
PHP Code:

maketableheader("How old are your users","",0,3); 


todo:
in the user version of 'user ages' put the same information, and provide users with no birthday information set with a link to their profile to do so.

Have fun and a big thank you goes out to the_sisko for making this wonderfull hack!

- djr

Action-N 01-06-2002 06:38 AM

Hi the_sisko,

Great hack went in with very little effort (once I realized the showage.php went in admin directory). But I do have a negative comment to report, the darn thing said I was 30! Now I accept that I am getting older, but I'm not that old yet, not until this November. Apparently you are only using the year to do your calculations and should definitely figure in the months at least.

the_sisko 01-06-2002 06:01 PM

@Action-N: You are right ;) I forgot to check the month. I'll will take a look at it in the next days. Got some truble with my database at the moment so don't have much time, but after it, I'll take a look at it.


All times are GMT. The time now is 01:46 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.01152 seconds
  • Memory Usage 1,747KB
  • 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
  • (8)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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