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
    • ITVNN HOSTING - Thiết kế website, Cung cấp Domain, Hosting, VPS 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ài: Extra Node Icons

Tăng kích thước phông chữ Giảm kích thước phông chữ
  1. #1
    s0ct0j0c's Avatar
    Banned

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

    Default Extra Node Icons  

    A few people have requested a mod to add extra icons next to the forum nodes.
    This version is made with fairly simple templates edits and should give you the same result with no file edits.

    Please note that currently it's not possible to enable icons only in certain nodes due to the lack of support of arrays in the templates without file edits.

    Kier posted that he is going to implement support for more complex conditionals.

    When he does that I will include that option

    1) in node_forum_level2 template look for:

    Code: 
    <span class="nodeIcon" title="{xen:if '{$forum.hasNew} OR !{$visitor.user_id}', '{xen:phrase unread_messages}', ''}"></span>
    Directly below add:

    Code: 
    <span class="node_icons"><img src="@imagePath/xenforo/node_icons/{$forum.node_id}.png" alt="" /></span>
    2) in node_page_level2 template look for
    Code: 
    <span class="nodeIcon" title="{xen:if '{$forum.hasNew} OR !{$visitor.user_id}', '{xen:phrase unread_messages}', ''}"></span>
    Directly below add
    Code: 
    <span class="node_icons"><img src="@imagePath/xenforo/node_icons/{$page.node_id}.png" alt="" /></span>
    3) In node_category_level_2 template look for
    Code: 
    <span class="nodeIcon" title="{xen:if '{$category.hasNew} OR !{$visitor.user_id}', '{xen:phrase unread_messages}', ''}"></span>
    Directly below add
    Code: 
    <span class="node_icons"><img src="@imagePath/xenforo/node_icons/{$category.node_id}.png" alt="" /></span>
    4) In node_link_level2 template look for
    Code: 
    <span class="nodeIcon" title="{xen:if '{$forum.hasNew} OR !{$visitor.user_id}', '{xen:phrase unread_messages}', ''}"></span>
    Directly below add
    Code: 
    <span class="node_icons"><img src="@imagePath/xenforo/node_icons/{$link.node_id}.png" alt="" /></span>
    5) Create a new template with the name node_icons.css

    Inside the node_icons.css template enter the below CSS:
    Code: 
    .node_icons { float:left; height:36px; margin:10px; width:36px; }
    6) In PAGE_CONTAINER template look for
    Code: 
    <!--XenForo_Require:CSS-->
    Directly below add
    Code: 
    <!-- node icons css --> <xen:require css="node_icons.css" />
    7) create a new folder called node_icons here:
    Code: 
    http://yourforum.com/styles/your_skin_name/xenforo/node_icons
    Please note replace your_skin_name with your actual skin folder name and yourforum.com with your actual XenForo domain name or installation directory!

    8) Upload your new custom icons in the node_icons folder.

    Default image size is 36px by 36px but you can change that in the node_icons.css template.

    !Important: Icons must be named accordingly to the corresponding node ids

    example: 1.png, 4.png, 5.png, 7.png

    Please note:
    Snow Drives by Janik Baumgartnerare are used in my screenshot for illustrative purpose only and they are not included.
    I'm sure if you are going to use this mod you are going to have your custom icons tailored for your own forum niche

    How do you determine the correct node id for a specific node?

    In XenForo Admin CP go to Application, Display Node Tree.

    Under Node Tree simply hover on the name of the forum nodes or click on them to edit and you see the actual id in the URL

    For example: http://xenforo.dev/admin.php?nodes/official-forums.7/edit

    7 is the correct id for the "Official Forums", so my icon will be named 7.png



 

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Tìm ứng viên lập trình node.js
    By CUTEGALAXY in forum Domains & Hosting
    Trả lời: 0
    Bài mới gởi: 06-07-2017, 03:56 PM
  2. Xin giúp đỡ về mod extra threadfields
    By phanvanhai in forum Hỏi đáp & Thảo luận
    Trả lời: 3
    Bài mới gởi: 23-09-2011, 11:58 AM
  3. Hỏi về chatbox extra file 3.6.0 vb4
    By babylovevt in forum Hỏi đáp & Thảo luận
    Trả lời: 7
    Bài mới gởi: 01-07-2011, 10:35 PM
  4. xin mod extra threadfields cho vb4.1
    By duynhan07 in forum v4.0.x Modifications
    Trả lời: 2
    Bài mới gởi: 26-01-2011, 07:15 PM
  5. Extra Shoutbox Pro
    By admin in forum v4.0.x Modifications
    Trả lời: 0
    Bài mới gởi: 01-04-2010, 09:35 PM

Tags for this Thread

Bookmarks

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
  •