• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
[tLk] Gender Percent

[tLk] Gender Percent 1.2.0

No permission to download

DRE

Well-known member
#3
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.jpg
 
#5
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.png

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?
 

Dr.Yontem

Formerly Tilkißey
#6
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)
 

Hyperion

Active member
#7
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% (?)
 

Dr.Yontem

Formerly Tilkißey
#8
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
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
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>
 

Sheldon

Well-known member
#11
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?
 

ineedhelp

Well-known member
#13
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.