![]() |
Quote:
|
I dont understand what I have to edit????
Open plugin.xml and replace all field7 with your fieldID! There are 11 points with field7. If you have another Options in your Profile Field you have to change to your options: field7 = 'Female' ==> fieldX = 'Your Female Option' field7 = 'Male' ==> fieldX = 'Your Male Option' field7 = 'Undisclosed' ==> fieldX = 'Your Undisclosed Option' If you havn't an Undisclosed Option, leave it blank fieldX = '' After then uploud the plugin.xml |
field7 = 'Female'
field7 = 'Male' field7 = 'Undisclosed' You must edit the red words if you have other called Options in the gender field Open plugin.xml and replace all field7 with your fieldID If you have another fieldID you must this edit in the plugin.xml https://vborg.vbsupport.ru/external/...chmentid=36944 You find the fieldID in your admincp ==> profilefields |
Quote:
|
Look at the picture on the third column Name field6 that is the fieldID.
Now go in your admincp ==> User Profile Fields ==> User Profile Field Manager Look to your genderfield and copy your fieldID and replace all in the plugin.xml |
<?xml version="1.0" encoding="ISO-8859-1"?>
<plugins> <plugin active="1" product="vBulletin"> <title>Gender Stats on Forumhome Statistics</title> <hookname>forumhome_complete</hookname> <phpcode><![CDATA[// Gender Stats on Forumhome Statistics $girls= $db->query_first(" SELECT COUNT( * ) as field6 FROM " . TABLE_PREFIX . "userfield WHERE field6 = 'Female' "); $allgirls = intval($girls[field6]); $boys= $db->query_first(" SELECT COUNT( * ) as field6 FROM " . TABLE_PREFIX . "userfield WHERE field6 = 'Male' "); $allboys = intval($boys[field6]); $zwitter= $db->query_first(" SELECT COUNT( * ) as field6 FROM " . TABLE_PREFIX . "userfield WHERE field6 = 'Undisclosed' "); $allzwitter = intval($zwitter[field6]); $gender= $db->query_first(" SELECT COUNT( * ) as field6 FROM " . TABLE_PREFIX . "userfield "); $allgender = intval($gender[field6]); $c_allgirls = ($allgender - $allboys - $allzwitter); $c_allboys = ($allgender - $allgirls - $allzwitter); $c_allzwitter = ($allgender - $allboys - $allgirls); $allgirls_prozent = @substr(100 * $allgirls / $allgender , 0, 5); $allboys_prozent = @substr(100 * $allboys / $allgender , 0, 5); $allzwitter_prozent = @substr(100 * $allzwitter / $allgender , 0, 5); $allgirls_picbar = $allgirls_prozent * 2; $allboys_picbar = $allboys_prozent * 2; $allzwitter_picbar = $allzwitter_prozent * 2;]]></phpcode> </plugin> </plugins> |
This plugin has a query for getting boys, another for getting girls, another for getting undisclosed and another for getting the total (!!) :confused:
Why doing that? The total is the number of users which I think is already there for you to use it and the undisclosed is total users minus girls+boys! You don't need all these queries I think... |
Thanks great hack.
|
How can I get the female percentage on the forumhome to show only 2 decimals? Currently it is showing 3, whilst the other two show 2 decimals.
|
is there any way to show this on my vBadvanced portal page like a module?
|
All times are GMT. The time now is 08:32 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|