Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Average age in forumhome Details »»
Average age in forumhome
Version: 1.03, by Lea Verou Lea Verou is offline
Developer Last Online: Jul 2012 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 10-24-2005 Last Update: 10-24-2005 Installs: 59
Uses Plugins Template Edits
 
No support by the author.

This is a modification I really wanted for my forum and I am posting it cause I thought that others may find it useful as well. However, I only had the idea as Xenon helped my really much with the query (My SQL knowledge is very basic and this is why this hack isn't supported, I wish I could support it but I don't have the knowledge to do so).
Thanks also to tamarian for fixing the issue with the table prefix.

Instructions


1. Import the attached XML file. It's a plugin, not a product
2. Edit template FORUMHOME:
Find:
HTML Code:
<span title="<phrase 1="$vboptions[activememberdays]">$vbphrase[within_the_last_x_days]</phrase>">$vbphrase[active_members]: $activemembers</span>
                </if>
Add below:
HTML Code:
Average Age: $avg_age
You're done!
If you liked this and you are using it, don't forget to click INSTALL!

If you want less or more than 2 decimals at the average then:
  • In the plugin manager click Avg Age in order to edit the plugin code.
  • Find DAYOFYEAR(NOW())) / 365), 2) and change the 2 in green to the number of decimals you like.

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 02-19-2006, 07:53 PM
Lea Verou Lea Verou is offline
 
Join Date: Jul 2005
Location: Greece
Posts: 1,856
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

did you solve the problem?
Reply With Quote
  #23  
Old 02-19-2006, 08:16 PM
El Barto El Barto is offline
 
Join Date: Oct 2005
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, i did at first place "Average Age: $avg_age" above if.
Reply With Quote
  #24  
Old 02-19-2006, 09:58 PM
alfaowner alfaowner is offline
 
Join Date: Jul 2003
Location: London
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works well, thanks
Reply With Quote
  #25  
Old 02-23-2006, 01:03 AM
yowen yowen is offline
 
Join Date: Mar 2004
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not displaying anything for me...

this is what I see: "Average Age: "

I upgraded from 3.0.0 RC4 and my forumhome template does show up (in admincp home) as one of the templates that has been updated. But I cant find anything in there that would cause this code not to work, I just put it in the code right after the member count

btw. This is on a password protected test forum, not the one listed in my profile.
Reply With Quote
  #26  
Old 02-23-2006, 09:35 AM
PJSkiboy PJSkiboy is offline
 
Join Date: Nov 2002
Location: Bowling Green, KY
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent little addition.

I have one forum member (oldest guy on the forums) always saying everyone is so young, yada yada yada....

Now he can eat some humble pie.

Thanks a ton.
Reply With Quote
  #27  
Old 02-23-2006, 02:29 PM
Lea Verou Lea Verou is offline
 
Join Date: Jul 2005
Location: Greece
Posts: 1,856
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is the plugin enabled yowen?
Reply With Quote
  #28  
Old 02-25-2006, 04:55 PM
yowen yowen is offline
 
Join Date: Mar 2004
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes it is.
Reply With Quote
  #29  
Old 04-02-2006, 07:51 AM
Pagandream Pagandream is offline
 
Join Date: Jan 2004
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

thx for this hack? But one question, how does it calculate the age? In my forum 50 % doesn't have fill out her age, coz it not necessary for getting registered. Does it only use those with an age in the profile or does it use all member?

For example you have 4 Members, all are 20 years old but only 3 have fill out their age, so will it calculate 60:3 = 20 or 60:4=15

Sorry for my bad english
Reply With Quote
  #30  
Old 04-02-2006, 07:53 AM
Lea Verou Lea Verou is offline
 
Join Date: Jul 2005
Location: Greece
Posts: 1,856
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I calculates from all members that have entered a date
Reply With Quote
  #31  
Old 04-30-2006, 06:31 PM
dutchbb dutchbb is offline
 
Join Date: Nov 2003
Posts: 899
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Julie
Hm, funny little thing this Thanks!

*installs*
Unfortunatly a funny little thing that adds 1 query, and imho, that's not really worth it.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:45 PM.


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.07665 seconds
  • Memory Usage 2,296KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete