[tLk] Gender Percent

[tLk] Gender Percent 1.2.0

No permission to download
Works great! 5 Stars.

If you have bd_widget framework installed then to add this you must pull up your wf_widget_stats template.

My wf_widget_stats template looks like this:

Code:
<div class="pairsJustified">
    <dl class="discussionCount"><dt>{xen:phrase discussions}:</dt>
        <dd>{xen:number $boardTotals.discussions}</dd></dl>
    <dl class="messageCount"><dt>{xen:phrase messages}:</dt>
        <dd>{xen:number $boardTotals.messages}</dd></dl>
    <dl class="memberCount"><dt>{xen:phrase members_count}:</dt>
        <dd>{xen:number $boardTotals.users}</dd></dl>
        <dl><dt>Gender Ratio:</dt>
                <dd><xen:hook name="tlk_genderpercent" /></dd></dl>
    <dl><dt>{xen:phrase latest_member}:</dt>
        <dd><xen:username user="$boardTotals.latestUser" /></dd></dl>
    <!-- slot: forum_stats_extra -->
</div>

genderratio.webp
 
This is a brilliant add-on, but I am having trouble getting it to work with XenPorta block EWRblock_BoardTotals.

It shows up as blank:
xenporta_gender.webp

This is what the block template looks like:
HTML:
<div class="section">
    <div class="secondaryContent statsList" id="boardStats">
        <h3>{xen:phrase forum_statistics}</h3>
        <div class="pairsJustified">
            <dl class="discussionCount"><dt>{xen:phrase discussions}:</dt>
                <dd>{xen:number $BoardTotals.discussions}</dd></dl>
            <dl class="messageCount"><dt>{xen:phrase messages}:</dt>
                <dd>{xen:number $BoardTotals.messages}</dd></dl>
            <dl class="memberCount"><dt>{xen:phrase members}:</dt>
                <dd>{xen:number $BoardTotals.users}</dd></dl>
                    <dl><dt>Gender Ratio:</dt>
                <dd><xen:hook name="tlk_genderpercent" /></dd></dl>           
            <dl class="mostCount"><dt>User Record:</dt>
                <dd class="Tooltip" title="{xen:dateTime $BoardTotals.most_users.time}">{xen:number $BoardTotals.most_users.total}</dd></dl>
            <dl><dt>{xen:phrase latest_member}:</dt>
                <dd><a href="{xen:link members, $BoardTotals.latestUser}" class="username">{$BoardTotals.latestUser.username}</a></dd></dl>
        </div>
    </div>
</div>

Does anyone know what I have to do to make it work?
 
This is a brilliant add-on, but I am having trouble getting it to work with XenPorta block EWRblock_BoardTotals.

It shows up as blank:
View attachment 27750

This is what the block template looks like:
HTML:
codes

Does anyone know what I have to do to make it work?

there is no support for xenporta (for now, maybe i can add xenporta support on next releases)
 
Hi.

Where should I change the code so that this

Sex Ratio:
(47% 37% 16%)
Turns into this:
Sex Ratio:
47% (M) 37% (F) 16% (?)
By the way, I know where to remove the color, but removed it above to show what I am trying to do.

Oh, as a separate issue, I wonder how I would switch male and female so that it shows up like this:

Sex Ratio:
37% (F) 47% (M) 16% (?)
 
Hi.

Where should I change the code so that this


Turns into this:

By the way, I know where to remove the color, but removed it above to show what I am trying to do.

Oh, as a separate issue, I wonder how I would switch male and female so that it shows up like this:

u should edit tlk_genderpercent template for special modifications

the original codes
Rich (BB code):
<xen:if is="{$TilkiBey_GenderPercent}">
<xen:foreach loop="$TilkiBey_GenderPercent" value="$TilkiBeyGenderPercent">
(<span title="{xen:phrase male}" style="{$xenOptions.tlk_genderpercent_male}">{$TilkiBeyGenderPercent.male}%</span>
<span title="{xen:phrase female}" style="{$xenOptions.tlk_genderpercent_female}">{$TilkiBeyGenderPercent.female}%</span>
<span title="{xen:phrase unspecified}" style="{$xenOptions.tlk_genderpercent_unspecified}">{$TilkiBeyGenderPercent.unspecified}%</span>)
</xen:foreach>
</xen:if>

example edited codes
Rich (BB code):
<xen:if is="{$TilkiBey_GenderPercent}">
<xen:foreach loop="$TilkiBey_GenderPercent" value="$TilkiBeyGenderPercent">
<span title="{xen:phrase female}" style="{$xenOptions.tlk_genderpercent_female}">{$TilkiBeyGenderPercent.female}% (F)</span>
<span title="{xen:phrase male}" style="{$xenOptions.tlk_genderpercent_male}">{$TilkiBeyGenderPercent.male}% (M)</span>
<span title="{xen:phrase unspecified}" style="{$xenOptions.tlk_genderpercent_unspecified}">{$TilkiBeyGenderPercent.unspecified}% (?)</span>
</xen:foreach>
</xen:if>
 
This is a brilliant add-on, but I am having trouble getting it to work with XenPorta block EWRblock_BoardTotals.

It shows up as blank:
View attachment 27750

This is what the block template looks like:
HTML:
<div class="section">
    <div class="secondaryContent statsList" id="boardStats">
        <h3>{xen:phrase forum_statistics}</h3>
        <div class="pairsJustified">
            <dl class="discussionCount"><dt>{xen:phrase discussions}:</dt>
                <dd>{xen:number $BoardTotals.discussions}</dd></dl>
            <dl class="messageCount"><dt>{xen:phrase messages}:</dt>
                <dd>{xen:number $BoardTotals.messages}</dd></dl>
            <dl class="memberCount"><dt>{xen:phrase members}:</dt>
                <dd>{xen:number $BoardTotals.users}</dd></dl>
                    <dl><dt>Gender Ratio:</dt>
                <dd><xen:hook name="tlk_genderpercent" /></dd></dl>         
            <dl class="mostCount"><dt>User Record:</dt>
                <dd class="Tooltip" title="{xen:dateTime $BoardTotals.most_users.time}">{xen:number $BoardTotals.most_users.total}</dd></dl>
            <dl><dt>{xen:phrase latest_member}:</dt>
                <dd><a href="{xen:link members, $BoardTotals.latestUser}" class="username">{$BoardTotals.latestUser.username}</a></dd></dl>
        </div>
    </div>
</div>

Does anyone know what I have to do to make it work?

Has this been figured out yet?
 
Not working

vtpj7.png
 
I've added this, but it's not on the right next to the number of members….. It's on the left next to "Members:" :eek:

How do I move it thanks.
 
This is awesome. If you could write another addon with percentage of people in each user group that would rock!
 
Top Bottom