Thêm liên kết Account Wrapper cho Conversation List và View Sidebar

Admin

Administrator
Thành viên BQT
#1
Thêm liên kết Account Wrapper cho Conversation List và View Sidebar

Đây là một template modification có thêm các liên kết account wrapper cho conversation_list và cho biết thêm các liên kết account wrapper bên dưới sidebar cho conversation_view.

improved convo.jpg

Đặt đoạn code sau ở phía dưới template conversation_list:
Mã:
<xen:sidebar>
<xen:require css="account.css" />
<div class="container">
    <div class="accountSideBar">
        <ul>
            <xen:hook name="account_wrapper_sidebar">
            <li class="section"><h4 class="heading">{xen:phrase your_account}</h4>
                <!--<h4 class="subHeading">{xen:phrase alerts}</h4>-->
                <ul>
                    <xen:hook name="account_wrapper_sidebar_your_account">
                    <li><a
                        class="{xen:if "{$selectedKey} == 'alerts/latest'", 'secondaryContent', 'primaryContent'}"
                        href="{xen:link account/alerts}">{xen:phrase your_alerts}</a></li>
                    <xen:if is="{$xenOptions.enableNewsFeed}"><li><a
                        class="{xen:if "{$selectedKey} == 'alerts/newsFeed'", 'secondaryContent', 'primaryContent'}"
                        href="{xen:link account/news-feed}">{xen:phrase your_news_feed}</a></li></xen:if>
                    <li><a
                        class="{xen:if "{$selectedKey} == 'alerts/likes'", 'secondaryContent', 'primaryContent'}"
                        href="{xen:link account/likes}">{xen:phrase likes_youve_received}</a></li>
                    <li><a
                        class="{xen:if "{$selectedKey} == 'alerts/watchThreads'", 'secondaryContent', 'primaryContent'}"
                        href="{xen:link watched/threads}">{xen:phrase watched_threads}</a></li>
                    </xen:hook>
                </ul>
            </li>
    
            <!-- slot: pre_conversations -->
    
            <li class="section"><h4 class="subHeading">{xen:phrase conversations}</h4>
                <ul>
                    <xen:hook name="account_wrapper_sidebar_conversations">
                    <li><a
                        class="{xen:if "{$selectedKey} == 'conversations/view'", 'secondaryContent', 'primaryContent'}"
                        href="{xen:link conversations}">{xen:phrase view_conversations}</a></li>
                    <li><a
                        class="{xen:if "{$selectedKey} == 'conversations/add'", 'secondaryContent', 'primaryContent'}"
                        href="{xen:link conversations/add}">{xen:phrase start_new_conversation}</a></li>
                    </xen:hook>
                </ul>
            </li>
    
            <!-- slot: pre_settings -->
    
            <li class="section"><h4 class="subHeading">{xen:phrase settings}</h4>
                <ul>
                    <xen:hook name="account_wrapper_sidebar_settings">
                    <li><a
                        class="{xen:if "{$selectedKey} == 'account/personalDetails'", 'secondaryContent', 'primaryContent'}"
                        href="{xen:link account/personal-details}">{xen:phrase personal_details}</a></li>
                    <xen:if is="{$canEditSignature}"><li><a
                        class="{xen:if "{$selectedKey} == 'account/signature'", 'secondaryContent', 'primaryContent'}"
                        href="{xen:link account/signature}">{xen:phrase signature}</a></li></xen:if>
                    <li><a
                        class="{xen:if "{$selectedKey} == 'account/contactDetails'", 'secondaryContent', 'primaryContent'}"
                        href="{xen:link account/contact-details}">{xen:phrase contact_details}</a></li>
                    <li><a
                        class="{xen:if "{$selectedKey} == 'account/privacy'", 'secondaryContent', 'primaryContent'}"
                        href="{xen:link account/privacy}">{xen:phrase privacy}</a></li>
                    <li><a
                        class="{xen:if "{$selectedKey} == 'account/preferences'", 'secondaryContent', 'primaryContent'}"
                        href="{xen:link account/preferences}">{xen:phrase preferences}</a></li>
                    <li><a
                        class="{xen:if "{$selectedKey} == 'account/alertPreferences'", 'secondaryContent', 'primaryContent'}"
                        href="{xen:link account/alert-preferences}">{xen:phrase alert_preferences}</a></li>
                    <li><a
                        class="{xen:if "{$selectedKey} == 'account/following'", 'secondaryContent', 'primaryContent'}"
                        href="{xen:link account/following}">{xen:phrase people_you_follow}</a></li>
                    <li><a
                        class="{xen:if "{$selectedKey} == 'account/ignored'", 'secondaryContent', 'primaryContent'}"
                        href="{xen:link account/ignored}">{xen:phrase people_you_ignore}</a></li>
                    <xen:if is="{$xenCache.userUpgradeCount}"><li><a
                        class="{xen:if "{$selectedKey} == 'account/upgrades'", 'secondaryContent', 'primaryContent'}"
                        href="{xen:link account/upgrades}">{xen:phrase account_upgrades}</a></li></xen:if>
                    <xen:if is="{$xenOptions.facebookAppId}"><li><a
                        class="{xen:if "{$selectedKey} == 'account/facebook'", 'secondaryContent', 'primaryContent'}"
                        href="{xen:link account/facebook}">{xen:phrase facebook_integration}</a></li></xen:if>
                    <li><a
                        class="{xen:if "{$selectedKey} == 'account/security'", 'secondaryContent', 'primaryContent'}"
                        href="{xen:link account/security}">{xen:phrase password}</a></li>
                    </xen:hook>
                </ul>
            </li>
            </xen:hook>
        </ul>
    </div>
Loại bỏ từ template conversation_view đoạn code sau:
Mã:
    <div class="accountContent section sectionMain">
        <xen:hook name="account_wrapper_content">{xen:raw $_subView}</xen:hook>
    </div>
Đặt đoạn code sau ở phía dưới template conversation_view:
Mã:
<xen:require css="account.css" />
<div class="container">
<div class="accountSideBar">
<ul>
<xen:hook name="account_wrapper_sidebar">
<li class="section"><h4 class="heading">{xen:phrase your_account}</h4>
<!--<h4 class="subHeading">{xen:phrase alerts}</h4>-->
<ul>
<xen:hook name="account_wrapper_sidebar_your_account">
<li><a
class="{xen:if "{$selectedKey} == 'alerts/latest'", 'secondaryContent', 'primaryContent'}"
href="{xen:link account/alerts}">{xen:phrase your_alerts}</a></li>
<xen:if is="{$xenOptions.enableNewsFeed}"><li><a
class="{xen:if "{$selectedKey} == 'alerts/newsFeed'", 'secondaryContent', 'primaryContent'}"
href="{xen:link account/news-feed}">{xen:phrase your_news_feed}</a></li></xen:if>
<li><a
class="{xen:if "{$selectedKey} == 'alerts/likes'", 'secondaryContent', 'primaryContent'}"
href="{xen:link account/likes}">{xen:phrase likes_youve_received}</a></li>
<li><a
class="{xen:if "{$selectedKey} == 'alerts/watchThreads'", 'secondaryContent', 'primaryContent'}"
href="{xen:link watched/threads}">{xen:phrase watched_threads}</a></li>
</xen:hook>
</ul>
</li>
<!-- slot: pre_conversations -->
<li class="section"><h4 class="subHeading">{xen:phrase conversations}</h4>
<ul>
<xen:hook name="account_wrapper_sidebar_conversations">
<li><a
class="{xen:if "{$selectedKey} == 'conversations/view'", 'secondaryContent', 'primaryContent'}"
href="{xen:link conversations}">{xen:phrase view_conversations}</a></li>
<li><a
class="{xen:if "{$selectedKey} == 'conversations/add'", 'secondaryContent', 'primaryContent'}"
href="{xen:link conversations/add}">{xen:phrase start_new_conversation}</a></li>
</xen:hook>
</ul>
</li>
<!-- slot: pre_settings -->
<li class="section"><h4 class="subHeading">{xen:phrase settings}</h4>
<ul>
<xen:hook name="account_wrapper_sidebar_settings">
<li><a
class="{xen:if "{$selectedKey} == 'account/personalDetails'", 'secondaryContent', 'primaryContent'}"
href="{xen:link account/personal-details}">{xen:phrase personal_details}</a></li>
<xen:if is="{$canEditSignature}"><li><a
class="{xen:if "{$selectedKey} == 'account/signature'", 'secondaryContent', 'primaryContent'}"
href="{xen:link account/signature}">{xen:phrase signature}</a></li></xen:if>
<li><a
class="{xen:if "{$selectedKey} == 'account/contactDetails'", 'secondaryContent', 'primaryContent'}"
href="{xen:link account/contact-details}">{xen:phrase contact_details}</a></li>
<li><a
class="{xen:if "{$selectedKey} == 'account/privacy'", 'secondaryContent', 'primaryContent'}"
href="{xen:link account/privacy}">{xen:phrase privacy}</a></li>
<li><a
class="{xen:if "{$selectedKey} == 'account/preferences'", 'secondaryContent', 'primaryContent'}"
href="{xen:link account/preferences}">{xen:phrase preferences}</a></li>
<li><a
class="{xen:if "{$selectedKey} == 'account/alertPreferences'", 'secondaryContent', 'primaryContent'}"
href="{xen:link account/alert-preferences}">{xen:phrase alert_preferences}</a></li>
<li><a
class="{xen:if "{$selectedKey} == 'account/following'", 'secondaryContent', 'primaryContent'}"
href="{xen:link account/following}">{xen:phrase people_you_follow}</a></li>
<li><a
class="{xen:if "{$selectedKey} == 'account/ignored'", 'secondaryContent', 'primaryContent'}"
href="{xen:link account/ignored}">{xen:phrase people_you_ignore}</a></li>
<xen:if is="{$xenCache.userUpgradeCount}"><li><a
class="{xen:if "{$selectedKey} == 'account/upgrades'", 'secondaryContent', 'primaryContent'}"
href="{xen:link account/upgrades}">{xen:phrase account_upgrades}</a></li></xen:if>
<xen:if is="{$xenOptions.facebookAppId}"><li><a
class="{xen:if "{$selectedKey} == 'account/facebook'", 'secondaryContent', 'primaryContent'}"
href="{xen:link account/facebook}">{xen:phrase facebook_integration}</a></li></xen:if>
<li><a
class="{xen:if "{$selectedKey} == 'account/security'", 'secondaryContent', 'primaryContent'}"
href="{xen:link account/security}">{xen:phrase password}</a></li>
</xen:hook>
</ul>
</li>
</xen:hook>
</ul>
</div>
</div>
</xen:sidebar>
Chúc các bạn thành công.


Nguồn: xenforo.com​
 
Top