What's new
Xen Factory

Register today to become a member! Once signed in, you'll be able to start purchasing our products, ask questions, request support and suggest new ideas!

  • This area is dedicated to the support of our xF1 add-ons. For xF2, please use the dedicated area: HERE.
  • We are aware that a no permission error was shown when you tried to purchase in the last 2 days, this is now fixed.

Suggestion Implemented Putting register button on tournament listing

CritiKiL

New Member
I'm trying to put the register button on the tournament listing page like this:
7f6f58f96b6d470992c96e982f15591a.png


But the problem is, only the "Unregister" button shows. I can't get the register button to show.

Here is the modification I did.

Code:
<li class="tournamentListItem" id="tournament-{$tournament.tournament_id}">
    <div class="listBlock main">
        <div class="listBlockInner">   
            <h3 class="title">
                <a href="{xen:link tournaments, $tournament}">
                <xen:if is="!{$tournament.bracket} AND ({$tournament.isRegistered} OR {$canRegisterTournament})">
            <div class="section {xen:string strtolower, $visitorLanguage.text_direction}" id="xfa_tourn_register">
                <div class="callToAction" style="display:inline-block; float: right;">
                    <div style="text-align: center;">
                    <xen:if is="!{$tournament.isRegistered}">
                        <a href="{xen:link tournaments/register, $tournament}">{xen:phrase xfa_tourn_register_now}</a>
                    <xen:else />
                            <a href="{xen:link tournaments/unregister, $tournament}">{xen:phrase xfa_tourn_unregister}</a>
                    </xen:if>
                    </div>
                </div>
            </div>
            </xen:if>
                {$tournament.title}</a>
            </h3>
            <div class="tournamentDetails muted"><xen:username user="{$tournament}" />,
                <a href="{xen:link tournaments, $tournament}" class="faint"><xen:datetime time="{$tournament.creation_date}" /></a><xen:comment>
                </xen:comment><xen:if is="{$showCategoryTitle}">, <a href="{xen:link tournaments/categories, $tournament}">{$tournament.category_title}</a></xen:if>
            </div>
        </div>
    </div>
    <div class="listBlock tournamentStats">
        <div class="listBlockInner">
            <div class="pairsJustified">
                <xen:if is="{$tournament.winner_id}">
                    <dl class="tournamentWinner"><dt>{xen:phrase xfa_tourn_winner}:</dt> <dd><xen:username user="$tournament.winner" rich="true" /></dd></dl>
                <xen:else />
                <dl class="tournamentEnd">
                        <dt>{xen:phrase xfa_tourn_end_registering}:</dt>
                        <dd>
                            <xen:if is="{$tournament.endRegistration}">
                                {xen:phrase xfa_tourn_closed}
                            <xen:elseif is="{$tournament.end_date}" />
                                <xen:datetime time="{$tournament.end_date}" />       
                            <xen:else />
                                {xen:phrase xfa_tourn_no_milestone}                     
                            </xen:if>
                        </dd>
                </dl>
                <dl class="tournamentSlots"><dt>{xen:phrase xfa_tourn_slots}:</dt> <dd>{$tournament.user_count}/{$tournament.slots}</dl>
                <dl class="tournamentUpdated"><dt>{xen:phrase xfa_tourn_updated}:</dt> <dd><xen:datetime time="{$tournament.last_update}" /></dd></dl>
                </xen:if>
            </div>
        </div>
    </div>
</li>

Do you know how to get the register button to show? Thanks!
 

Clement

Freaky Coder
Staff member
Hello,

It's because on the index, the registered status is not retrieved by the php code.

Can move that to feature request if you want.

Clément
 
Top