XF 2.1 Xenforo 2.1.X Math

Codeless

Active member
Hi can i use here math

PHP:
<div class="block-footer">
            <span class="block-footer-counter">{{ phrase('online_now_x_members_y_guests_z',{
                'total': number($online.counts.total), x8
                'members': number($online.counts.members), x4
                'guests': number($online.counts.guests)}) x12
            }}</span>
        </div>

like that ? i written i know its wrong format but what will be correct format
 
I'd advise against it, because it's misleading with very little benefit, but if you must then this is will work:
HTML:
<div class="block-footer">
    <span class="block-footer-counter">{{ phrase('online_now_x_members_y_guests_z',{
        'total': number($online.counts.total * 8),
        'members': number($online.counts.members * 4),
        'guests': number($online.counts.guests * 12)})
    }}</span>
</div>
 
i agree its wrong but i am testing something else
here is template i want to edit
PHP:
<div class="block"{{ widget_data($widget) }}>
    <div class="block-container">
        <h3 class="block-minorHeader">{$title}</h3>
        <div class="block-body block-row">
            <dl class="pairs pairs--justified">
                <dt>{{ phrase('members_online') }}</dt>
                <dd>{$counts.members|number}</dd>
            </dl>

            <dl class="pairs pairs--justified">
                <dt>{{ phrase('guests_online') }}</dt>
                <dd>{$counts.guests|number} x 50 </dd>
            </dl>

            <dl class="pairs pairs--justified">
                <dt>{{ phrase('total_visitors') }}</dt>
                <dd>{$counts.total|number} x 50 </dd>
            </dl>
        </div>
        <div class="block-footer">
            {{ phrase('totals_may_include_hidden_visitors') }} + 100
        </div>
    </div>
</div>
 
Code:
{{$a*8}}
{{$b/3)}}

I think you may be like it
 
Code:
{{$a*8}}
{{$b/3)}}

I think you may be like it
actually i am dont need a module but i dont understand your method can you implement on my code posted above
 
Back
Top Bottom