Bạn ghé thăm diễn đàn lần đầu? hãy đăng ký ngay bây giờ để tham gia.
  • Đăng nhập:

Chào mừng bạn đến với ITVNN FORUM - Diễn đàn công nghệ thông tin.

Nếu đây là lần đầu tiên bạn tham gia diễn đàn, xin mời bạn xem phần Hỏi/Ðáp để biết cách dùng diễn đàn. Để có thể tham gia thảo luận bạn phải đăng ký làm thành viên, click vào đây để đăng ký.

  • Partner Area
    • Chương trình khuyến mãi khi chuyển dịch vụ về 123HOST Việt Nam Anh Hùng - Thông tin truyền thông
kết quả từ 1 tới 1 trên 1
Tăng kích thước phông chữ Giảm kích thước phông chữ
  1. #1
    s0ct0j0c's Avatar

    Trạng thái
    Họ tên
    Kiều Sơn Lâm
    Tham gia ngày
    Jan 2011
    Thành viên thứ
    Đến từ
    Giới tính
    Bài gởi
    Level: 41 [?]
    Experience: 2,246,750
    Next Level: 2,530,022
    Cảm ơn 91
    Cảm ơn 89 lần / 68 Bài viết

    Default [XenFans] Let's get started .. (for 0 posters) [Template Modification]  

    [XenFans] Let's get started .. (for 0 posters) [Template Modification]

    With this little template modification we want to demonstrate how to customize the end-user experience on your site. We're using it on http://xenfans.com/ for new guests and newly registered members who are about to register or have just confirmed their account, (and have 0 posts); Inviting them to introduce themselves via a new thread, to upload an avatar or to complete their profile settings. You could use it on your site for the same reasons, or perhaps to point them to the forum help page, or contact sales, etc.

    To demonstrate what a minute of customizing can do, here's the xenfans.com version :


    Confirmed / registered members:

    What does the xenfans.com version do?
    - user is NOT logged in, or unregistered, gets a block with sign-up or login buttons, which drop down the login bar in the top. This is also a great place to explain what the board is about.
    - user is registered, but didn't confirm email: default xenforo 'activate account' msg
    - user is registered, but has 0 posts: gets invited to introduce him/herself msg
    - user is registered, but regardless of post count, gets invited to set a gender, and/or upload avatar ~ depending if they have one or not.

    It requires 1 template modification (and some css), and respects your customized design, replacing the 'your account is waiting confirmation' once confirmed with 'thank you for signing up, lets get started..' (or whatever you want to use as text). And guests will be introduced to the board.

    For demo purpose, it does not use phrases. It's quite easy to add a phrase yourself if your community has more than one language. And if you just have one international language, manually change the text.

    Anyway, let's get started.

    We're going to address the registered user, who is not waiting account confirmation, and has exactly zero posts, with an important message. And a link to an end-goal, in this case a "new thread" creation page where they can introduce themselves.

    Obviously what you need to do is change that end-goal with the link + text of your own choice.

    Step one, go to the admin.php > appearance > templates > PAGE_CONTAINER > and find this code:
    PHP Code: 
          <!-- top breadcrumbtop ctrl --> 
    and above it on a new line add this code:
    PHP Code: 
    <xen:if is="!{$isAwaitingEmailConfirmation} AND {$visitor.user_id} AND {$visitor.message_count} == 0">
    class="importantMessage" style="line-height: 1.6em;">
    Thank you for signing up {$visitor.username}, and welcome to {$xenOptions.boardTitle}.
    br /><span class="xenfans_welcome"><a href="{xen:link forums/offtopic/create-thread}" class="concealed">Let's get started by Introducing yourself ...</a></label></span>
                            <xen:if is="!{$isAwaitingEmailConfirmation} AND {$visitor.user_id}">
                                <xen:if is="{$visitor.avatar_date} == 0 AND !{$visitor.gravatar} OR !{$visitor.gender}">
                                <p class="importantMessage" style="line-height: 1.6em;">
                                    We invite you to personalize and complete your profile :) <br />
                                    <xen:if is="{$visitor.avatar_date} == 0 AND !{$visitor.gravatar}">
                                        <span class="xenfans_welcome"><a href="{xen:link account/avatar}" class="OverlayTrigger" class="concealed">Upload avatar ..</a></label></span>
                                    <xen:if is="!{$visitor.gender}">
                                        <span class="xenfans_welcome"><a href="{xen:link account/personal-details}" class="concealed">Select Gender ..</a></label>
                            <xen:if is="!{$visitor.user_id}">
                                <p class="importantMessage" style="line-height: 1.6em;">
                                <b>Welcome to {$xenOptions.boardTitle}!</b><br />
    re currently viewing our site as a guest user. <span class="xenfans_welcome"><label for="LoginControl"><a href="{xen:link login}" class="concealed">Sign up</a></label></span> or <span class="xenfans_welcome"><label for="LoginControl"><a href="{xen:link login}" class="concealed">Login</a></label></span><br />
    Having an account grants you additional privilegessuch as creating-, and participating in discussions.

    and save the template.

    Step two, still in the same template, find the newly added code:
    PHP Code: 
     <a href="{xen:link forums/offtopic/create-thread}">Let's get started by Introducing yourself ...</a> 
    and replace the LINK and the TEXT to your own site's introduction forum or whatever you want to do with it. Optionally you can replace everything within <p> .. </p> with whatever you want, youtube embed to show site-training video, images, custom menu, donation button or a flower.

    Of course, go through all the text and links, so it matches your board. Then Save the template.

    Step three: to extra.css, add:
    PHP Code: 
     .xenfans_welcome {
    padding3px 6px;
    border1px solid @primaryLight;
    background: @primaryLighterStill url('@imagePath/xenforo/gradients/tab-unselected-25px-light.png'repeat-x top;
    font11px verdana,sans-serif;
    color: @primaryMedium;
    text-shadow1px 1px 0px #fff;

    Save the template again, and go test! It should not show to users with a post. Nor should it show to users who are newly registered but haven't confirmed their account yet via email. It should show to users with 0 posts, and a confirmed account.


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VSa - Top Posters of the Month/Year
    By admin in forum v4.0.x Modifications
    Trả lời: 1
    Bài mới gởi: 13-11-2011, 06:28 PM
  2. Template Modification System
    By admin in forum v4.x Modifications
    Trả lời: 0
    Bài mới gởi: 27-09-2011, 07:54 PM
  3. XenFans.com - Welcome Blocks - Product
    By s0ct0j0c in forum Add-ons and Modifications
    Trả lời: 0
    Bài mới gởi: 21-04-2011, 02:40 PM
  4. VSa - Attention Zero-Posters
    By admin in forum v4.0.x Modifications
    Trả lời: 1
    Bài mới gởi: 28-03-2010, 05:44 PM
  5. Cyb - Attention Zero-Posters
    By thanhdia in forum v3.8.x Modifications
    Trả lời: 0
    Bài mới gởi: 06-10-2009, 05:16 PM

Tags for this Thread


Quuyền Hạn Của Bạn

  • Bạn không thể tạo chủ đề mới
  • Bạn không thể trả lời bài viết
  • Bạn không thể gửi file đính kèm
  • Bạn không thể chỉnh sửa bài viết