![]() |
Gender Stats on Forumhome Addon
This Hack based on the Gender Image In Postbit from tnguy3n but it can change to your Gender Options.
Instructions todo are in the gender_stats_language.txt. Before install the plugin.xml read the gender_stats_language.txt! For members which have 2 gender-options (like: Female + Male) take the 2_options.zip Seen on the first picture. For members which have 3 gender-options (like: Female + Male + Undisclosed) take the 3_options.zip. Seen on the second picture. For members which havn't a gender hack from first boardinstalltime get this query: Replace fieldX with you fieldID fo gender. Code:
UPDATE `userfield` SET `fieldX` = 'Male' WHERE `fieldX` = '' |
Nice idea. ;)
|
Looks nice, will have a look later :)
|
looks great XD
|
what do you mean with your fieldID in the install instructions?
|
If you going into your admincp ==> User Profile Field Manager
Replace all fieldX with the field where on my picture is field6 |
ah ok i think i get it first you install the original hack :)
|
No, that I link in first of the post the Original :)
Quote:
|
Good idea! :)
|
fun!!
[high]* GrendelKhan{TSU clicks install. :)[/high] |
Hey, Renee! Installed and working fine. Thanks. :)
|
can you make the text file with each instruction on 1 line cause im having trouble with it i gotta keep scrolling to the right
|
Very nice. My members are always making a gender poll threadf, but now they can see the results better and easier lol.
|
Thanks, I really needed something like this!
You saved me time :D |
Quote:
Did you have these hack? |
Quote:
|
I tried to do this I uploaded it edited the template, and it didnt work, I then removed the plugin and my forum worked agin I dont know what I ddi wrong?
it is showing the icons with sex male femlae etc, but no info, www.tipstersforum.com I am installing mods before the forum goes live |
where to add this?
Step 3) Go in your admincp. Add 1 new phrase: Name: ==> Description: gender_on_board ==> Gender on board: |
Quote:
|
Quote:
|
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?
|
Pretty good, is there a hack that makes them fill in there gender in there usercp ??
|
Quote:
Thank you for this hack. 2 Things though In your install instructions (both) you forgot class="smallfont" for the femail div tag. And a question. Would it be possible to make this hack fully phrased? I use a multilanguage forum and I would like to have the gender option in the profile also phrased so I can offer a german description for my german users. Would be nice [high]* StarBuG clicks install[/high] |
*clicks install*
I have an existing test user, but it doesn't include the stat. Does each user have to select it before it appears? Also, how can I put it all in one row instead of three rows? Thanks!! |
Quote:
|
Quote:
|
Quote:
Quote:
|
Quote:
Goto AdminCP => User Profile Field Manager => Gender => Set Default: Yes Quote:
Code:
<div class="smallfont">$vbphrase[gender_on_board] |
Quote:
Nope, that's not correct. Just add 3 phrases: gender_male, gender_female, gender_undisclosed. Then in the template put instead of the words $vphrase[gender_male], $vbphrase[gender_male], $vbphrase[gender_undisclosed] ;) edit: Oh you mean in the profile fields? In that case you're right :( |
Quote:
I love it!!!!! w00t!!! Those kitties are soooo cute! |
Quote:
But I seen now it gives a hack for that you can use phrases in profilefields: https://vborg.vbsupport.ru/showthread.php?t=98904 Quote:
edit: You have a nice signature :D |
All times are GMT. The time now is 04:14 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|