Các chức năng đã thêm vào diễn đàn Xenforo

Chuyên mục 'Hướng dẫn sử dụng diễn đàn', người gửi admin, 7/4/12.

  1. admin Administrator

    Bài viết cùng chuyên mục

  2. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
    - Xóa link "Giúp đỡ" ở trang chủ

    Tìm và xóa đoạn này trong "EWRporta_Navtabs":

    Code:
    <li><a href="{xen:link 'help'}">{xen:phrase help}</a></li>
  3. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
    - Thêm Link bài viết mới 1 ngày, 2 ngày, 3 ngày.

    Cũng trong "EWRporta_Navtabs" thêm đoạn này

    Code:
    <li><a href="{xen:link 'find-new/threads', '', 'days=1'}">Bài mới 1 ngày</a></li>
    <li><a href="{xen:link 'find-new/threads', '', 'days=2'}">Bài mới 2 ngày</a></li>
    <li><a href="{xen:link 'find-new/threads', '', 'days=7'}">Bài mới 7 ngày</a></li>
  4. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
    - Thêm thông tin ở chân trang

    Trong template tìm "footer"

    Tìm
    Code:
    <div id="copyright">
    Thêm đằng sau
    Code:
    <b>Bibi Cosmetic - Diễn đàn mỹ phẩm Bibi</b><br />
    <b>Địa chỉ: </b>24 lô B1, khu đô thị mới Đại Kim, Định Công, Hoàng Mai, Hà Nội.<br />
    <b>Showroom: </b>24 lô B1, khu đô thị mới Đại Kim, Định Công, Hoàng Mai, Hà Nội.<br />
    <b>Điện thoại: </b><br />
    <b>E-mail: </b><a href="mailto:info@bibicosmetic.vn"> info@bibicosmetic.vn</a><br />
    Tìm đoạn này và xóa
    Code:
    XenForo skin by XenFocus
    Trong "footer.css" tìm #copyright thêm vào
    Code:
    text-align: left;
    line-height: 18px;
  5. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
    - Trùng link "Trang chủ" ở Breadcum

    Trong Template tìm Breadcum.

    Tìm
    Code:
    <xen:if is="{$showHomeLink}">
                    <span class="crust"{xen:if $microdata, ' itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb"'}>
                        <a href="{$homeLink}" class="crumb"{xen:if $microdata, ' rel="up" itemprop="url"'}><span{xen:if $microdata, ' itemprop="title"'}>{xen:phrase home}</span></a>
                        <span class="arrow"><span></span></span>
                    </span>
                <xen:elseif is="{$selectedTabId} != {$homeTabId}" />
                    <span class="crust"{xen:if $microdata, ' itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb"'}>
                        <a href="{$homeTab.href}" class="crumb"{xen:if $microdata, ' rel="up" itemprop="url"'}><span{xen:if $microdata, ' itemprop="title"'}>{$homeTab.title}</span></a>
                        <span class="arrow"><span></span></span>
                    </span>
                </xen:if>
    Thay bằng
    Code:
                <xen:if is="{$selectedTabId} != {$homeTabId}">
                    <span class="crust"{xen:if $microdata, ' itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb"'}>
                        <a href="{$homeTab.href}" class="crumb"{xen:if $microdata, ' rel="up" itemprop="url"'}><span{xen:if $microdata, ' itemprop="title"'}>{$homeTab.title}</span></a>
                        <span class="arrow"><span></span></span>
                    </span>
                </xen:if>
  6. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
    Thêm Link "Shop mỹ phẩm"

    Trong Template tìm "navigation"
    Tìm
    Code:
    <!-- extra tabs: middle -->
    Thêm bên trên
    Code:
    <li class="navTab members Popup PopupControl PopupClosed PopupContainerControl">
        <a target="_blank" class="navLink" href="http://myphamspa.net">Shop mỹ phẩm</a>           
    </li>
  7. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
    - Sidebar chủ đề mới bình luận

    + Step 1
    Upload the contents of "library" to your XF root directory

    + Step 2
    Import the XML product through your Admin CP
    Admin CP > Home > Install Add-On > Select 'addon-recentthreads.xml'

    +Step 3
    Find your "forum_list" template to include the new sidebar item
    Admin CP > Appearance > Templates > Search for forum_list > Click forum_list to edit it

    Search the template and find:
    Code:
    <xen:hook name="forum_list_nodes">
    Right above it add:
    Code:
    <xen:include template="duythinht_recent_threads"></xen:include>

    Attached Files:

  8. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
    - Chủ đề mới nhất trên sidebar

    Install
    Step 1
    Upload the contents of "library" to your XF root directory

    Step 2
    Import the XML product through your Admin CP
    Admin CP > Home > Install Add-On > Select 'addon_tenshi_latest_thread.xml'

    Step 3
    Find your "forum_list" template to include the new sidebar item

    Admin CP > Appearance > Templates > Search for forum_list > Click forum_list to edit it

    Search the template and find:

    Code:
    </xen:sidebar>
    Right above it add:

    Code:
    <xen:include template="tenshi_latest_thread"></xen:include>

    Attached Files:

  9. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
    Thêm rel="nofollow" vào link

    Áp dụng cho XenForo v1.1.2, các phiên khác cũng tương tự. Bạn vào đây: XenForo v1.1.2/forum/library/XenForo/Helper

    File làm việc: String.php ( XenForo v1.1.2/forum/library/XenForo/Helper/ String.php) tìm đoạn sau:

    Code:
    public static function getLinkClassTarget($url)
    {
    $target = '_blank';
    $class = 'externalLink';
    $type = 'external';
     
    $urlInfo = @parse_url($url);
    if ($urlInfo)
    {
    $host = $urlInfo['host'] . (!empty($urlInfo['port']) ? ":$urlInfo[port]" : '');
    if ($host == XenForo_Application::$host)
    {
    $target = '';
    $class = 'internalLink';
    $type = 'internal';
    }
    }
     
    return array($class, $target, $type);
    }
    
    Và thay thế bằng đoạn sau:

    Code:
    public static function getLinkClassTarget($url)
    {
    $target = '_blank';
    $class = 'externalLink" rel="nofollow '; # Thêm vào rel="nofollow", lưu ý không có dấu " ở cuối cùng.
    $type = 'external';
     
    $urlInfo = @parse_url($url);
    if ($urlInfo)
    {
    $host = $urlInfo['host'] . (!empty($urlInfo['port']) ? ":$urlInfo[port]" : '');
    if ($host == XenForo_Application::$host) # Đây là check tên miền đang sử dụng, không cần thay đổi.
    {
    $target = '';
    $class = 'internalLink';
    $type = 'internal';
    }
    # Đây là tùy biến, nếu bạn muốn cho phép 1 tên miền nào đó được Google theo link, và thêm target="_blank" để mở 1 cửa số mới.
    if ($host == "powernet.vn")
    {
    $target = '_blank ';
    $class = 'internalLink';
    $type = 'internal';
    }
    }
     
    return array($class, $target, $type);
    }
    Với các mã nguồn có phiên bản khác, bạn cũng tìm đoạn public static function getLinkClassTarget($url) và tiến hành giống như vậy.

    Chúc bạn thành công.
  10. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
    MIF's Light Box

    Hướng dẫn : Vào Template - >PAGE_CONTAINER

    Tìm thẻ <header> chèn thêm 2 dòng bên dưới :

    Code:
    <link rel="stylesheet" href="mif-lightbox/style.css" />
    <script type="text/javascript" src="mif-lightbox/mif-lightbox.js"></script>
    Upload folder mif-lightbox chung hàng với index.php

    Attached Files:

    diendanluat.net likes this.
  11. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
    xử lý URL tiếng việt.

    Mở file library/xenforo/link.php
    Tìm:
    Code:
    $title = preg_replace('/[ ]+/', '-', trim($title));
    Thêm vào bên dưới:
    Code:
    $title = strtr($title, array(
     
                        '"' => '', "'" => '',
     
                        "á" => "a", "à" => "a", "ạ" => "a", "ả" => "a", "ã" => "a", "ă" => "a", "ắ" => "a", "ằ" => "a", "ặ" => "a", "ẳ" => "a", "ẵ" => "a", "â"=> "a","ấ" => "a","ầ" => "a", "ậ" => "a", "ẩ" => "a", "ẫ" => "a", "Á" => "a", "À" => "a", "Ạ" => "a", "Ả" => "a", "Ã" => "a", "Ă" => "a", "Ắ" => "a", "Ằ" => "a", "Ặ" => "a", "Ẳ" => "a", "Ẵ" => "a", "Â" => "a","Ấ" => "a", "Ầ" => "a", "Ậ" => "a", "Ẩ" => "a","Ẫ" => "a",
     
                        "ó" => "o", "ò" => "o", "ọ" => "o", "ỏ" => "o", "õ" => "o", "ô" => "o", "ố" => "o", "ồ" => "o", "ộ" => "o", "ổ" => "o", "ỗ" => "o", "ơ" => "o", "ớ" => "o", "ờ" => "o", "ợ" => "o", "ở" => "o", "ỡ" => "o", "Ó" => "o", "Ò" => "o", "Ọ" => "o", "Ỏ" => "o", "Õ" => "o", "Ô" => "o", "Ố" => "o", "Ồ" => "o", "Ộ" => "o", "Ổ" => "o", "Ỗ" => "o", "Ơ" => "o", "Ớ" => "o", "Ờ" => "o", "Ợ" => "o", "Ở" => "o", "Ỡ" => "o",
     
                        "é" => "e", "è" => "e", "ẹ" => "e", "ẻ" => "e", "ẽ" => "e", "ê" => "e", "ế" => "e", "ề" => "e", "ệ" => "e", "ể" => "e", "ễ" => "e", "É" => "e", "È" => "e", "Ẹ" => "e", "Ẻ" => "e", "Ẽ" => "e", "Ê" => "e", "Ế" => "e", "Ề" => "e", "Ệ" => "e", "Ể" => "e", "Ễ" => "e",
     
                        "ú" => "u", "ù" => "u", "ụ" => "u", "ủ" => "u", "ũ" => "u", "ư" => "u", "ứ" => "u", "ừ" => "u", "ự" => "u", "ử" => "u", "ữ" => "u", "Ú" => "u", "Ù" => "u", "Ụ" => "u", "Ủ" => "u", "Ũ" => "u", "Ư" => "u", "Ứ" => "u", "Ừ" => "u", "Ự" => "u", "Ử" => "u", "Ữ" => "u",
     
                        "í" => "i", "ì" => "i", "ị" => "i", "ỉ" => "i", "ĩ" => "i", "Í" => "i", "Ì" => "i", "Ị" => "i", "Ỉ" => "i", "Ĩ" => "i",
     
                        "ý" => "y", "ỳ" => "y", "ỵ" => "y", "ỷ" => "y", "ỹ" => "y", "Ý" => "y", "Ỳ" => "y", "Ỵ" => "y", "Ỷ" => "y", "Ỹ" => "y",
     
                        "đ" => "d", "Đ" => "d",
     
                        ));
    
  12. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
  13. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
    Rút gọn Staff Online vào Members Online
    Add Staff Online into Members Online
    • Đăng nhập Admin Control Panel
    • Chọn Appearance>Templates> sidebar_online_users
    Thay toàn bộ bằng code sau:

    Code:
    <xen:edithint template="sidebar.css" />
     
    <!-- block: sidebar_online_staff -->
    <!-- block: sidebar_online_users -->
    <div class="section membersOnline userList">
        <div class="secondaryContent">
            <h3><a href="{xen:link online}" title="{xen:phrase see_all_online_users}">{xen:phrase members_online_now}</a></h3>
     
    <xen:if hascontent="true">
                    <h4 class="minorHeading">{xen:phrase staff_online_now}</h4>
                <ul class="staffonlinelist">
                    <xen:contentcheck>
                        <xen:foreach loop="$onlineUsers.records" value="$user">
                            <xen:if is="{$user.is_moderator} OR {$user.is_admin}">
                                <li title="{$user.username}" class="Tooltip">
                                    <xen:avatar user="$user" size="s" img="true" />
                                </li>
                            </xen:if>
                        </xen:foreach>
                    </xen:contentcheck>
                </ul>
    <div style="clear:both;"></div>
    </xen:if>
     
            <xen:if is="{$onlineUsers.records}">
     
                <xen:if is="{$visitor.user_id}">
                    <xen:if hascontent="true">
                    <h4 class="minorHeading"><a href="{xen:link account/following}">{xen:phrase people_you_follow}:</a></h4>
                    <ul class="followedOnline">
                        <xen:contentcheck>
                            <xen:foreach loop="$onlineUsers.records" value="$user">
                                <xen:if is="{$user.followed}">
                                    <li title="{$user.username}" class="Tooltip"><xen:avatar user="$user" size="s" img="true" class="_plainImage" /></li>
                                </xen:if>
                            </xen:foreach>
                        </xen:contentcheck>
                    </ul>
                    </xen:if>
                </xen:if>
                    <h4 class="minorHeading"><a href="{xen:link members}">{xen:phrase members}:</a></h4>
                <ol class="listInline">
                    <xen:foreach loop="$onlineUsers.records" value="$user" i="$i">
                        <xen:if is="{$i} <= {$onlineUsers.limit}">
                            <li>
                            <xen:if is="{$user.user_id}">
                                <a href="{xen:link members, $user}"
                                    class="username{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}">{$user.username}</a><xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
                            <xen:else />
                                {xen:phrase guest}<xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
                            </xen:if>
                            </li>
                        </xen:if>
                    </xen:foreach>
                    <xen:if is="{$onlineUsers.recordsUnseen}">
                        <li class="moreLink">... <a href="{xen:link online}" title="{xen:phrase see_all_visitors}">{xen:phrase and_x_more, 'count={xen:number $onlineUsers.recordsUnseen}'}</a></li>
                    </xen:if>
                </ol>
            </xen:if>
     
            <div class="footnote">
                {xen:phrase online_now_x_members_y_guests_z, 'total={xen:number $onlineUsers.total}', 'members={xen:number $onlineUsers.members}', 'guests={xen:number $onlineUsers.guests}'}
            </div>
        </div>
    </div>
    <!-- end block: sidebar_online_staff -->
    <!-- end block: sidebar_online_users -->
    • Chọn Appearance>Templates> EXTRA.css
    thêm code sau:
    Code:
    .staffonlinelist li {
    float: left;
    margin-top: 3px;
    }
    .staffonlinelist img {
    height: 32px;
    width: 32px;
    margin-right:5px;
    padding: 2px;
    }

  14. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
    Google Custom Search

    Tìm template "search_results" thay thế tất cả nội dung trong đó.

    Code:
    <xen:if is="{$search.searchConstraints.title_only}">
    <xen:if is="{$search.search_query}">
    <xen:title>{xen:phrase search_results_for_query}: {$search.search_query}</xen:title>
    <xen:h1>{xen:phrase search_results_for_query}: <a href="{xen:link search, $search, 'searchform=1'}"><em>{$search.search_query}</em></a></xen:h1>
    <xen:else />
    <xen:title>{xen:phrase search_results}</xen:title>
    </xen:if>
     
    <xen:navigation>
    <xen:breadcrumb href="{xen:link full:search}">{xen:phrase search}</xen:breadcrumb>
    </xen:navigation>
     
    <xen:container var="$head.robots">
    <meta name="robots" content="noindex" /></xen:container>
     
    <xen:require css="search_results.css" />
     
    <xen:if is="{$search.searchWarnings}">
    <ol class="searchWarnings">
    <xen:foreach loop="$search.searchWarnings" value="$warning">
    <li>{$warning}</li>
    </xen:foreach>
    </ol>
    </xen:if>
     
    <xen:if is="{$search.users}">
    <xen:sidebar>
    <div class="section userResults avatarList">
    <div class="secondaryContent">
    <h3>{xen:phrase matched_users}</h3>
    <ul>
    <xen:foreach loop="$search.users" value="$user">
    <li class="userResult">
    <xen:avatar user="$user" size="s" img="true" />
    <xen:username user="$user" rich="true" />
    <div class="userTitle">{xen:helper userTitle, $user}</div>
    </li>
    </xen:foreach>
    </ul>
    </div>
    </div>
    </xen:sidebar>
    </xen:if>
     
    <div class="pageNavLinkGroup">
    <div class="linkGroup">
    <a href="{xen:link search, $search, 'searchform=1'}">{xen:phrase search_again}</a>
    </div>
     
    <xen:pagenav link="search" linkdata="{$search}" page="{$page}" perpage="{$perPage}" total="{$totalResults}" />
    </div>
     
    <div class="section sectionMain searchResults">
    <form action="" method="post">
     
    <ol class="searchResultsList">
    <xen:foreach loop="$results" value="$result" i="$i">
    {xen:raw $result}
    </xen:foreach>
    </ol>
     
    <xen:if is="{$userSearchMaxDate}">
    <div class="secondaryContent olderMessages">
    <a href="{xen:link search/member, '', 'user_id={$search.searchConstraints.user_id}', 'before={$userSearchMaxDate}'}">{xen:phrase find_older_messages}</a>
    </div>
    </xen:if>
     
    <div class="sectionFooter searchResultSummary">
    <span class="resultCount">{xen:phrase showing_results_x_to_y_of_z, 'start={xen:number $resultStartOffset}', 'end={xen:number $resultEndOffset}', 'total={xen:number $totalResults}'}</span>
    <xen:if is="{$nextPage}"><a href="{xen:link search, $search, 'page={$nextPage}'}" class="nextLink">{xen:phrase next} &gt;</a></xen:if>
    </div>
     
    </form>
    </div>
     
    <div class="pageNavLinkGroup">
    <div class="linkGroup">
    <xen:if is="{$ignoredNames}">
    <a href="javascript:" class="muted jsOnly DisplayIgnoredContent Tooltip" title="{xen:phrase show_hidden_content_by_x, "names={xen:helper implode, $ignoredNames, ', '}"}">{xen:phrase show_ignored_content}</a>
    </xen:if>
    <a href="{xen:link search, $search, 'searchform=1'}">{xen:phrase search_again}</a>
    </div>
     
    <xen:pagenav link="search" linkdata="{$search}" page="{$page}" perpage="{$perPage}" total="{$totalResults}" />
    </div>
    <xen:else />
    <xen:if is="{$page} > 1">
    <xen:if is="{$search.search_query}">
    <xen:title>{xen:phrase search_results_for_query}: {$search.search_query}</xen:title>
    <xen:h1>{xen:phrase search_results_for_query}: <a href="{xen:link search, $search, 'searchform=1'}"><em>{$search.search_query}</em></a></xen:h1>
    <xen:else />
    <xen:title>{xen:phrase search_results}</xen:title>
    </xen:if>
     
    <xen:navigation>
    <xen:breadcrumb href="{xen:link full:search}">{xen:phrase search}</xen:breadcrumb>
    </xen:navigation>
     
    <xen:container var="$head.robots">
    <meta name="robots" content="noindex" /></xen:container>
     
    <xen:require css="search_results.css" />
     
    <xen:if is="{$search.searchWarnings}">
    <ol class="searchWarnings">
    <xen:foreach loop="$search.searchWarnings" value="$warning">
    <li>{$warning}</li>
    </xen:foreach>
    </ol>
    </xen:if>
     
    <xen:if is="{$search.users}">
    <xen:sidebar>
    <div class="section userResults avatarList">
    <div class="secondaryContent">
    <h3>{xen:phrase matched_users}</h3>
    <ul>
    <xen:foreach loop="$search.users" value="$user">
    <li class="userResult">
    <xen:avatar user="$user" size="s" img="true" />
    <xen:username user="$user" rich="true" />
    <div class="userTitle">{xen:helper userTitle, $user}</div>
    </li>
    </xen:foreach>
    </ul>
    </div>
    </div>
    </xen:sidebar>
    </xen:if>
     
    <div class="pageNavLinkGroup">
    <div class="linkGroup">
    <a href="{xen:link search, $search, 'searchform=1'}">{xen:phrase search_again}</a>
    </div>
     
    <xen:pagenav link="search" linkdata="{$search}" page="{$page}" perpage="{$perPage}" total="{$totalResults}" />
    </div>
     
    <div class="section sectionMain searchResults">
    <form action="" method="post">
     
    <ol class="searchResultsList">
    <xen:foreach loop="$results" value="$result" i="$i">
    {xen:raw $result}
    </xen:foreach>
    </ol>
     
    <xen:if is="{$userSearchMaxDate}">
    <div class="secondaryContent olderMessages">
    <a href="{xen:link search/member, '', 'user_id={$search.searchConstraints.user_id}', 'before={$userSearchMaxDate}'}">{xen:phrase find_older_messages}</a>
    </div>
    </xen:if>
     
    <div class="sectionFooter searchResultSummary">
    <span class="resultCount">{xen:phrase showing_results_x_to_y_of_z, 'start={xen:number $resultStartOffset}', 'end={xen:number $resultEndOffset}', 'total={xen:number $totalResults}'}</span>
    <xen:if is="{$nextPage}"><a href="{xen:link search, $search, 'page={$nextPage}'}" class="nextLink">{xen:phrase next} &gt;</a></xen:if>
    </div>
     
    </form>
    </div>
     
    <div class="pageNavLinkGroup">
    <div class="linkGroup">
    <xen:if is="{$ignoredNames}">
    <a href="javascript:" class="muted jsOnly DisplayIgnoredContent Tooltip" title="{xen:phrase show_hidden_content_by_x, "names={xen:helper implode, $ignoredNames, ', '}"}">{xen:phrase show_ignored_content}</a>
    </xen:if>
    <a href="{xen:link search, $search, 'searchform=1'}">{xen:phrase search_again}</a>
    </div>
     
    <xen:pagenav link="search" linkdata="{$search}" page="{$page}" perpage="{$perPage}" total="{$totalResults}" />
    </div>
    <xen:else />
    <xen:if is="{$search.search_query}">
    <xen:title>{xen:phrase search_results_for_query}: {$search.search_query}</xen:title>
    <xen:h1>{xen:phrase search_results_for_query}: <a href="{xen:link search, $search, 'searchform=1'}"><em>{$search.search_query}</em></a></xen:h1>
    <xen:else />
    <xen:title>{xen:phrase search_results}</xen:title>
    </xen:if>
     
    <ul class="tabs Tabs" data-panes="#damme_GoogleCustomSearch_Panes > li">
    <li><a href="{xen:link search, $search}#gcs">Kết quả tìm kiếm từ Google</a></li>
    <li><a href="{xen:link search, $search}#xf">Kết quả tìm kiếm từ Diễn đàn</a></li>
    </ul>
     
    <ul id="damme_GoogleCustomSearch_Panes">
    <li id="gcs">
    <div id="cse">Đang tải kết quả tìm kiếm từ Google ...</div>
    <script src="http://www.google.com/jsapi" type="text/javascript"></script>
    <script type="text/javascript">
                google.load('search', '1', {language : ''});
                google.setOnLoadCallback(function() {
                    var customSearchOptions = {};
               
                    var customSearchControl = new google.search.CustomSearchControl(
                        '003080289431182703778:kac1hbcf5ji',
                        customSearchOptions
                    );
                    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
               
                    var options = new google.search.DrawOptions();
                    options.enableSearchResultsOnly();
               
                    customSearchControl.draw('cse', options);
                    customSearchControl.execute('{$search.search_query}');
                }, true);
            </script>
    </li>
    <li id="xf">
    <xen:navigation>
    <xen:breadcrumb href="{xen:link full:search}">{xen:phrase search}</xen:breadcrumb>
    </xen:navigation>
     
    <xen:container var="$head.robots">
    <meta name="robots" content="noindex" /></xen:container>
     
    <xen:require css="search_results.css" />
     
    <xen:if is="{$search.searchWarnings}">
    <ol class="searchWarnings">
    <xen:foreach loop="$search.searchWarnings" value="$warning">
    <li>{$warning}</li>
    </xen:foreach>
    </ol>
    </xen:if>
     
    <xen:if is="{$search.users}">
    <xen:sidebar>
    <div class="section userResults avatarList">
    <div class="secondaryContent">
    <h3>{xen:phrase matched_users}</h3>
    <ul>
    <xen:foreach loop="$search.users" value="$user">
    <li class="userResult">
    <xen:avatar user="$user" size="s" img="true" />
    <xen:username user="$user" rich="true" />
    <div class="userTitle">{xen:helper userTitle, $user}</div>
    </li>
    </xen:foreach>
    </ul>
    </div>
    </div>
    </xen:sidebar>
    </xen:if>
     
    <div class="pageNavLinkGroup">
    <div class="linkGroup">
    <a href="{xen:link search, $search, 'searchform=1'}">{xen:phrase search_again}</a>
    </div>
     
    <xen:pagenav link="search" linkdata="{$search}" page="{$page}" perpage="{$perPage}" total="{$totalResults}" />
    </div>
     
    <div class="section sectionMain searchResults">
    <form action="" method="post">
     
    <ol class="searchResultsList">
    <xen:foreach loop="$results" value="$result" i="$i">
    {xen:raw $result}
    </xen:foreach>
    </ol>
     
    <xen:if is="{$userSearchMaxDate}">
    <div class="secondaryContent olderMessages">
    <a href="{xen:link search/member, '', 'user_id={$search.searchConstraints.user_id}', 'before={$userSearchMaxDate}'}">{xen:phrase find_older_messages}</a>
    </div>
    </xen:if>
     
    <div class="sectionFooter searchResultSummary">
    <span class="resultCount">{xen:phrase showing_results_x_to_y_of_z, 'start={xen:number $resultStartOffset}', 'end={xen:number $resultEndOffset}', 'total={xen:number $totalResults}'}</span>
    <xen:if is="{$nextPage}"><a href="{xen:link search, $search, 'page={$nextPage}'}" class="nextLink">{xen:phrase next} &gt;</a></xen:if>
    </div>
     
    </form>
    </div>
     
    <div class="pageNavLinkGroup">
    <div class="linkGroup">
    <xen:if is="{$ignoredNames}">
    <a href="javascript:" class="muted jsOnly DisplayIgnoredContent Tooltip" title="{xen:phrase show_hidden_content_by_x, "names={xen:helper implode, $ignoredNames, ', '}"}">{xen:phrase show_ignored_content}</a>
    </xen:if>
    <a href="{xen:link search, $search, 'searchform=1'}">{xen:phrase search_again}</a>
    </div>
     
    <xen:pagenav link="search" linkdata="{$search}" page="{$page}" perpage="{$perPage}" total="{$totalResults}" />
    </div>
    </li>
    </ul>
    </xen:if>
    </xen:if>
     
    <xen:sidebar>
    </xen:sidebar>
    Thêm vào cuối file "search_results" đoạn sau:
    Code:
    .gsc-adBlock {border-bottom: medium none !important; height: 0 !important; display: none !important;}
    .gsc-adBlockVertical {height: 0 !important; display: none !important;}
    ul#damme_GoogleCustomSearch_Panes {padding: 0 8px; border-bottom: 1px solid #CCC; border-left:1px solid #CCC; border-right: 1px solid #CCC;}
  15. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
    Firstpost postbit display in thread

    Bài viết sẽ hướng dẫn các bạn cách làm hiển thị bài viết đầu tiên dạng nằm ngang, các reply sẽ hiển thị theo kiểu mặc định.

    1. Mở template EXTRA.css thêm đoạn code sau:

    Code:
    /*Display Postbit in first post*/
    .firstPost .messageUserInfo {
        float: none;
    }
    .firstPost .messageUserInfo .messageUserBlock .arrow {
        display: none;
    }
    .firstPost .messageInfo {
        margin-left: 5px !important;
        margin-top: 10px;
    }
    .newIndicator {
        display: none !important;
    }
    .firstPost .messageUserInfo {
        width: 100% !important;
    }
    .firstPost .messageUserInfo .messageUserBlock .arrow {
        display: none;
    }
    .firstPost .messageUserBlock {
        -moz-border-bottom-colors: none !important;
        -moz-border-image: none !important;
        -moz-border-left-colors: none !important;
        -moz-border-right-colors: none !important;
        -moz-border-top-colors: none !important;
        background: none repeat scroll 0 0 transparent !important;
        border-color: -moz-use-text-color -moz-use-text-color #CDE5F0 !important;
        border-style: none none dashed !important;
        border-width: 0 0 1px !important;
        height: 64px;
    }
    .firstPost .avatar .img {
        margin-left: 0 !important;
    }
    .firstPost .avatarHolder {
        padding: 0 !important;
        position: absolute !important;
    }
    .firstPost .userText {
        margin-left: 58px;
        position: absolute !important;
        top: 18px;
    }
    .firstPost .tt_share_page {
        margin-left: 220px;
        position: absolute;
        top: 34px;
        width: 420px;
    }
    .firstPost .shareControl {
        float: right;
    }
    .firstPost .addthis {
        padding-left: 20px;
    }
    .titleBar h1 {
        font-size: 20pt !important;
    }
    2. Tạo template mới với tên message_user_info_firstpost

    Code:
    <xen:require css="message_user_info.css" />
     
    <div class="messageUserInfo" itemscope="itemscope" itemtype="http://data-vocabulary.org/Person">
    <div class="messageUserBlock">
        <xen:hook name="message_user_info_avatar" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
                    <div class="avatarHolder">
                <span class="helper"></span>
                            <xen:avatar user="$user" size="s"/>
                <!-- slot: message_user_info_avatar -->
            </div>
        </xen:hook>
     
    <xen:if is="!{$isQuickReply}">
        <xen:hook name="message_user_info_text" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
            <h3 class="userText">
                <xen:username user="$user" itemprop="name" rich="true" />
                <xen:if hascontent="true"><em class="userTitle" itemprop="title"><xen:contentcheck>{xen:helper userTitle, $user}</xen:contentcheck></em></xen:if>
                <!-- slot: message_user_info_text -->
            </h3>
        </xen:hook>
       
    </xen:if>
    <span class="tt_share_page">
          <div class="facebookLike shareControl">
                <fb:like href="{$url}" layout="button_count" action="{$xenOptions.facebookLikeAction}" font="trebuchet ms" colorscheme="@fbColorScheme"></fb:like>
          </div>
          <div class="plusone shareControl">
            <div class="g-plusone" data-size="medium" data-count="true" data-href="{$url}">
          </div>
          <div class="tweet shareControl">
                <a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal"
            data-lang="{xen:helper twitterLang, $visitorLanguage.language_code}"
            data-url="{$url}"
            {xen:if {$xenOptions.tweet.via}, 'data-via="{$xenOptions.tweet.via}"'}
            {xen:if {$xenOptions.tweet.related}, 'data-related="{$xenOptions.tweet.related}"'}>{xen:phrase tweet}</a>
          </div>
    </span>
        <span class="arrow"><span></span></span>
    </div>
    </div>
    3. Mở template message tìm đoạn code sau:

    Code:
    <li id="{$messageId}" class="message {xen:if $message.isDeleted, 'deleted'} {xen:if '{$message.is_admin} OR {$message.is_moderator}', 'staff'} {xen:if $message.isIgnored, ignored}" data-author="{$message.username}">
        <xen:include template="message_user_info">
            <xen:map from="$message" to="$user" />
        </xen:include>
    Thay bằng:

    Code:
    <xen:if is="{$post.position} == 0 AND !{$message.conversation_id}">
    <li id="{$messageId}" class="message firstPost {xen:if $message.isDeleted, 'deleted'} {xen:if '{$message.is_admin} OR {$message.is_moderator}', 'staff'} {xen:if $message.isIgnored, ignored}" data-author="{$message.username}">
        <xen:include template="message_user_info_firstpost">
            <xen:map from="$message" to="$user" />
        </xen:include>
    <xen:else />
    <li id="{$messageId}" class="message {xen:if $message.isDeleted, 'deleted'} {xen:if '{$message.is_admin} OR {$message.is_moderator}', 'staff'} {xen:if $message.isIgnored, ignored}" data-author="{$message.username}">
        <xen:include template="message_user_info">
            <xen:map from="$message" to="$user" />
        </xen:include>
    </xen:if>
  16. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
    Chức năng: Thay ảnh đại diện bằng ảnh trong bài viết (mặc định là avatar của poster)

    Cách làm:

    - Yêu cầu phải sử dụng Widget Framework
    - Upload đè (overwrite) file Threads.php vào /library/WidgetFramework/WidgetRenderer/
    - Mở template wf_widget_threads thay toàn bộ code bằng:
    Code:
    <style>
    .xp-thread-top .clear{
    clear:both;
    }
    .xp-thread-bottom .xp-left{
    float:left;
    }
    .xp-thread-bottom .xp-right a{
    font-size: 15px;
    }
    .sidebar .avatarList .avatar img {
    width:60px;
    height:60px;
    }
    </style>
     
     
    <xen:if hascontent="true">
        <div class="avatarList">
            <ul>
                <xen:contentcheck>
              <xen:foreach loop="$new" value="$thread">
                  <li>
                  <div class="xp-thread-bottom">
    <div class="xp-left">
    <xen:if is="{$thread.attachment}">
    <a href="{xen:link threads, $thread}" class="avatar" class="Tooltip">
    <img src="{$thread.attachment}" alt="{$thread.title}" title="{$thread.title}" />
    </a>
    <xen:else />
    <xen:avatar user="$thread" size="m" img="true" />
    </xen:if>
    </div>
                                <div class="xp-right">
      <xen:include template="wf_widget_threads_thread_title">
    <xen:set var="$_showPrefix">{$widget.options.display.show_prefix}</xen:set>
    </xen:include>
    <div class="userTitle">{xen:phrase wf_x_posted, 'user={$thread.username}'} <xen:datetime time="{$thread.post_date}" /></div>
                                </div>
                            </div>
                  </li>
              </xen:foreach>
              <xen:foreach loop="$recent" value="$thread">
                  <li>
                  <div class="xp-thread-bottom">
    <div class="xp-left">
    <xen:if is="{$thread.attachment}">
    <a href="{xen:link threads, $thread}" class="avatar" class="Tooltip">
    <img src="{$thread.attachment}" alt="{$thread.title}" title="{$thread.title}" />
    </a>
    <xen:else />
    <xen:avatar user="$thread" size="m" img="true" />
    </xen:if>
    </div>
                                <div class="xp-right">
                              <xen:include template="wf_widget_threads_thread_title">
    <xen:set var="$_showPrefix">{$widget.options.display.show_prefix}</xen:set>
    <xen:set var="$_threadLink">{xen:if '{$visitor.user_id} > 0', {xen:link threads/unread, $thread}, {xen:link posts, {xen:array 'post_id={$thread.last_post_id}'}}}</xen:set>
    </xen:include>
    <div class="userTitle">{xen:phrase wf_x_replied, 'user={$thread.username}'} <xen:datetime time="{$thread.last_post_date}" /></div>
                                </div>
                            </div>
                  </li>
              </xen:foreach>
              <xen:foreach loop="$popular" value="$thread">
                  <li>
                  <div class="xp-thread-bottom">
    <div class="xp-left">
    <xen:if is="{$thread.attachment}">
    <a href="{xen:link threads, $thread}" class="avatar" class="Tooltip">
    <img src="{$thread.attachment}" alt="{$thread.title}" title="{$thread.title}" />
    </a>
    <xen:else />
    <xen:avatar user="$thread" size="m" img="true" />
    </xen:if>
    </div>
                                <div class="xp-right">
                              <xen:include template="wf_widget_threads_thread_title">
                                    <xen:set var="$_showPrefix">{$widget.options.display.show_prefix}</xen:set>
    </xen:include>
    <div class="userTitle">{xen:phrase wf_x_posted, 'user={$thread.username}'} <xen:datetime time="{$thread.post_date}" /></div>
                                </div>
                            </div>
                  </li>
              </xen:foreach>
                    <xen:foreach loop="$mostReplied" value="$thread">
                  <li>
                  <div class="xp-thread-bottom">
    <div class="xp-left">
    <xen:if is="{$thread.attachment}">
    <a href="{xen:link threads, $thread}" class="avatar class="Tooltip">
    <img src="{$thread.attachment}" alt="{$thread.title}" title="{$thread.title}" />
    </a>
    <xen:else />
    <xen:avatar user="$thread" size="m" img="true" />
    </xen:if>
    </div>
                                <div class="xp-right">
                              <xen:include template="wf_widget_threads_thread_title">
                                    <xen:set var="$_showPrefix">{$widget.options.display.show_prefix}</xen:set>
    </xen:include>
    <div class="userTitle">{xen:phrase wf_x_posted, 'user={$thread.username}'}, {xen:phrase replies}: {xen:number $thread.reply_count}</div>
                                </div>
                            </div>
                      </li>
              </xen:foreach>
                    <xen:foreach loop="$mostLiked" value="$thread">
                        <li>
                  <div class="xp-thread-bottom">
    <div class="xp-left">
    <xen:if is="{$thread.attachment}">
    <a href="{xen:link threads, $thread}" class="avatar" class="Tooltip">
    <img src="{$thread.attachment}" alt="{$thread.title}" title="{$thread.title}" />
    </a>
    <xen:else />
    <xen:avatar user="$thread" size="m" img="true" />
    </xen:if>
    </div>
                                <div class="xp-right">
                              <xen:include template="wf_widget_threads_thread_title">
                                    <xen:set var="$_showPrefix">{$widget.options.display.show_prefix}</xen:set>
    </xen:include>
    <div class="userTitle">
                                    {xen:phrase wf_x_posted, 'user=<a href="{xen:link 'members', {$thread}}">{$thread.username}</a>'},
                                    {xen:phrase likes}: <a href="{xen:link 'posts/likes', {xen:array 'post_id={$thread.first_post_id}'}}" class="OverlayTrigger">{xen:number $thread.first_post_likes}</a>
                                </div>
                                </div>
                            </div>
                        </li>
              </xen:foreach>
              <xen:foreach loop="$polls" value="$thread">
                  <li>
                  <div class="xp-thread-bottom">
    <div class="xp-left">
    <xen:if is="{$thread.attachment}">
    <a href="{xen:link threads, $thread}" class="avatar" class="Tooltip">
    <img src="{$thread.attachment}" alt="{$thread.title}" title="{$thread.title}" />
    </a>
    <xen:else />
    <xen:avatar user="$thread" size="m" img="true" />
    </xen:if>
    </div>
                                <div class="xp-right">
                              <xen:include template="wf_widget_threads_thread_title">
    <xen:set var="$_showPrefix">{$widget.options.display.show_prefix}</xen:set>
    </xen:include>
    <div class="userTitle">{xen:phrase wf_x_posted, 'user={$thread.username}'} <xen:datetime time="{$thread.post_date}" /></div>
                                </div>
                            </div>
                          </li>
              </xen:foreach>
                </xen:contentcheck>
            </ul>
        </div>
    </xen:if>
    - Done

    Attached Files:

  17. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
  18. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
    Speedup Xenforo

    <IfModule pagespeed_module>
    ModPagespeed: On
    ModPagespeedAllow: On
    ModPagespeedAvoidRenamingIntrospectiveJavascript: On
    ModPagespeedBeaconUrl: On
    ModPagespeedCombineAcrossPaths: On
    ModPagespeedCssFlattenMaxBytes: On
    ModPagespeedCssImageInlineMaxBytes: On
    ModPagespeedCssInlineMaxBytes: On
    ModPagespeedCssOutlineMinBytes: On
    ModPagespeedDisableFilters
    ModPagespeedDisallow
    ModPagespeedDomain: On
    ModPagespeedEnableFilters: On
    ModPagespeedImageInlineMaxBytes: On
    ModPagespeedImageLimitOptimizedPercent: On
    ModPagespeedImageLimitResizeAreaPercent: On
    ModPagespeedJpegRecompressionQuality: On
    ModPagespeedJsInlineMaxBytes: On
    ModPagespeedJsOutlineMinBytes: On
    ModPagespeedLowercaseHtmlNames:
    ModPagespeedMapOriginDomain: On
    ModPagespeedMapRewriteDomain: On
    ModPagespeedMaxHtmlParseBytes: On
    ModPagespeedMaxInlinedPreviewImagesIndex: On
    ModPagespeedMinImageSizeLowResolutionBytes: On
    ModPagespeedModifyCachingHeaders: On
    ModPagespeedRetainComments: On
    ModPagespeedRewriteLevel: On
    </IfModule>
  19. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
    Tạo một Templates mới có tên là backtotop_tmcodon và thêm vào đoạn mã dưới đây
    Code:
    <script type='text/javascript'>
    $(function() {
    $(window).scroll(function() {
    if($(this).scrollTop()!=0) {
    $('#bttop').fadeIn();
    }
    else {
    $('#bttop').fadeOut();
    }
    });
    $('#bttop').click(function()
    {
    $('body,html').animate({scrollTop:0},800);
    });
    });
    </script>
    <div id='bttop'>LÊN ĐẦU TRANG</div>

    Sau đó tìm Template header tìm:
    Code:
    <div id="header">
    Thêm bên dưới:
    Code:
    <xen:include template="backtotop_tmcodon" />
    
    Vào Extra.css thêm:

    Code:
    #bttop{border:1px solid #4adcff;background:#24bde2;text-align:center;padding:5px;position:fixed;bottom:35px;right:10px;cursor:pointer;display:none;color:#fff;font-size:11px;font-weight:900;}#bttop:hover{border:1px solid #ffa789;background:#ff6734;}
  20. admin

    admin Administrator Staff Member

    Tham gia:
    1/4/12
    Bài viết:
    1,072
    "Like" đã nhận:
    12
    Xóa User Panel và Login button ở sidebar

    - Tìm template "sidebar_visitor_panel" và xóa hết nội dung trong đó.