Jump to content

Shu

Vortex
  • Posts

    93
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Shu

  1. With XF2 it's really simple to add a Page as the homepage and populate it with widgets to create a "portal" page.As a few people have asked how to do it I thought I'd post this quick guide. Go to admin.php?nodes/ and click Add a NodeSelect Page as the node type: Set up the Page node and add any widgets you want to the template: Navigation Section: Home (sets the page to the home tab).I used <xf:h1 hidden="true" /> to hide the page node title on the page itself.I also use this at the bottom of the template to hide the breadcrumb bar: <xf:css> .p-breadcrumbs { display:none }</xf:css> Then it's a simple case of adding widgets to the template.Go to admin.php?widgets/ to see what widgets you have available: Any of those can be added into the template (as shown above) using the widget key (which you can see above).The final step is to go to admin.php?options/groups/basicBoard/ and set the Page created above as the homepage using the page url portion you set above. That's basically it. You can create extra widgets and add them to the homepage. I'm using to display the contents of latest posts with our "Featured" prefix.
  2. Version 1.0.5

    20 downloads

    This widget works like the New threads widget with the option to filter by prefix id and extra option to enter a custom url path for the header (optional). Update 12/09/2017Added new option to limit character length
  3. After trying ALMUSA's sticky thread separator, I went a bit further and decided to try customising the look of the stickies.This seems to be much simpler than in xf1, the following added to EXTRA.less will change the background colour, font style and font colour of the main text (i.e. the links) .structItemContainer-group.structItemContainer-group--sticky {background:#000; font-style:italic;} .structItemContainer-group.structItemContainer-group--sticky a {color:#fff}
  4. As I was trying to separate normal threads from sticky ones I finally managed to do it and it was very simple. There is no need for template modification whatsoever.1- Go to template forum_view2- find this code <xf:macro template="thread_list_macros" name="item" arg-thread="{$thread}" arg-forum="{$forum}" /> </xf:foreach> </div> 3- Place this code below the above code and hit save. <xf:if is="{$stickyThreads}"> <hr class="stickySeparator"/> </xf:if> 4- Now go to template extra.less and add this .stickySeparator { height: 12px; background-color: #ececec; border-style:solid; margin: 0px; } Hit save and you are good to go. You can play with the css code in case you want to change the color or the hight of the bar as I did below in the screenshot.Here is the after math.
  5. Conditional Statements for XenForo 2The conditional statements can be expanded by using AND, OR conditional statements operators and using xf:if, xf:else, xf:elseif.If there are any conditional statements that you want to add, please add it as a message and the article will be updated.1. How can I show content to Administrators? <xf:if is="$xf.visitor.is_admin"> Show content... </xf:if> 2. How can I show content to Moderators? <xf:if is="$xf.visitor.is_moderator"> Show content... </xf:if> 3. How can I show content to Administrators and Moderators? <xf:if is="$xf.visitor.is_admin OR $xf.visitor.is_moderator"> Show content... </xf:if> 4. How can I Show content for member? <xf:if is="$xf.visitor.user_id"> Show content... </xf:if> 5. How can I Show content if not a member? <xf:if is="!$xf.visitor.user_id"> Show content... </xf:if> 6. How can I show different content to members and guests? <xf:if is="!$xf.visitor.user_id"> Show only members <xf:else /> Show only guests </xf:if> 7. How can I Show content for banned members? <xf:if is="$user.is_banned"> Show content... </xf:if> 8. How can I show content from x if the user's likes is bigger? <xf:if is="$user.like_count|number > x"> Show content... </xf:if> 9. How can I show content from x if the user's message is bigger? <xf:if is="$user.message_count|number > x"> Show content... </xf:if> 10. How can I show content from x if the user's points is bigger? <xf:if is="$user.trophy_points|number > x"> Show content... </xf:if> 11. How can I show content to a specific member? <xf:if is="$xf.visitor.user_id == x"> Show content... </xf:if> 12. How can I show content to more than one member? <xf:if is="in_array($xf.visitor.user_id, [x, x, x, x])"> Show content... </xf:if> 13. How can I Show content from more than one user group? <xf:if is="{{$xf.visitor.isMemberOf(x)}}"> Show content... </xf:if> 14. How can I hide content from more than one user group? <xf:if is="{{!$xf.visitor.isMemberOf(x)}}"> Hide content... </xf:if> 15. How can I show content after the first post in a thread? <xf:if is="$post.position % $xf.options.messagesPerPage == 0"> Show content... </xf:if> 15. How can I show content after post x on every page in a thread? <xf:if is="$post.position % $xf.options.messagesPerPage == x"> Show content... </xf:if> 16. How can I show content on pages with a sidebar? <xf:if is="$sidebar"> Show content... </xf:if> 17. How can I show content only at home? <xf:if is="$template != 'forum_list'"> Show content... </xf:if> 18. How can I hide content only at home? <xf:if is="$template !== 'forum_list'"> Hide content... </xf:if> 19. How can I show the content only when creating a thread? <xf:if is="$template == 'forum_post_thread'"> Show content... </xf:if 20. How can I hide the content only when creating a thread? <xf:if is="$template != 'forum_post_thread'"> Hide content.. </xf:if> 21. How can I show the content only when creating a resource? <xf:if is="$template == 'xfrm_category_add_resource'"> Show content.. </xf:if> 22. How can I hide the content only when creating a resource? <xf:if is="$template != 'xfrm_category_add_resource'"> Hide content.. </xf:if> 23. How can I show you only when viewing the search page? <xf:if is="$template == 'search_form'"> Show content.. </xf:if> 24. How can I hide you only when viewing the search page? <xf:if is="$template != 'search_form'"> Hide content.. </xf:if> `25. How can I show content only in what's new? <xf:if is="$template == 'whats_new'"> Show content.. </xf:if> 26. How can I hide content only in what's new? <xf:if is="$template != 'whats_new'"> Hide content.. </xf:if> 27. How can I show content message on in a conversation? <xf:if is="$template == 'conversation_view'"> Show content.. </xf:if> 28. How can I hide content message on in a conversation? <xf:if is="$template != 'conversation_view'"> Hide content.. </xf:if> 29. How can I show only on the conversation list? <xf:if is="$template == 'conversation_list'"> Show content.. </xf:if> 30. How can I hide only on the conversation list? <xf:if is="$template != 'conversation_list'"> Hide content.. </xf:if> 31. How can I show only resources on the homepage? <xf:if is="$template == 'xfrm_overview'"> Show content.. </xf:if> 32. How can I hide only resources on the homepage? <xf:if is="$template != 'xfrm_overview'"> Hide content.. </xf:if> 33. How can I show only when viewing sources content? <xf:if is="$template == 'xfrm_resource_view'"> Show content.. </xf:if> 34. How can I hide only when viewing sources content? <xf:if is="$template != 'xfrm_resource_view'"> Hide content.. </xf:if> 35. How can I show when the thread is displayed? <xf:if is="$template == 'thread_view'"> Show content.. </xf:if> 36. How can I hide when the thread is displayed? <xf:if is="$template !='thread_view'"> Hide content.. </xf:if> 37. How can I show it in the thread list? <xf:if is="$template =='forum_view'"> Show content.. </xf:if> 38. How can I hide it in the thread list? xf:if is="$template != 'forum_view'"> Hide content.. </xf:if> 39. How can I show content to Discouraged Users? <xf:if is="{$xf.visitor.Option.is_discouraged}"> Show content... </xf:if> 40. How can I display the content only for those users who have an Gravatar? <xf:if is="{$xf.visitor.gravatar}"> Show content... </xf:if> 41.How can I display the content only for staff? <xf:if is="{$xf.visitor.is_staff}"> Show content... </xf:if> 42.How can I display the content only for users who have not confirmed email address? <xf:if is="{$xf.visitor.isAwaitingEmailConfirmation()}"> Show content... </xf:if> 43. How can I show content in more than one forum? <xf:if is="in_array({$forum.node_id}, [X,Y,Z])"> Show content.. </xf:if> 44. How do I hide content in multiple forums? <xf:if is="!in_array({$forum.node_id}, [X,Y,Z])"> Hide content.. </xf:if> 45. How can I show content in a specific forum? <xf:if is="{$forum.node_id} == 3"> Show content.. </xf:if> 46. How can I hide content on a specific forum? <xf:if is="{$forum.node_id} != 3"> Hide content.. </xf:if> 47. How to show a banner only under the first post of each page of a thread? <xf:if is="{$post.position} % {$xf.options.messagesPerPage} == 1"> Show content.. </xf:if> 48. How to show a banner only inside of only the first post of each page of a thread? <xf:if is="{$post.position} % {$xf.options.messagesPerPage} == 0"> Show content.. </xf:if> 49. The location field is specified <xf:if is="{$xf.visitor.location}"> Show content... </xf:if> 50. The website field is specified <xf:if is="{$xf.visitor.website}"> Show content... </xf:if> 51. The signature is indicated. <xf:if is="{$xf.visitor.signature}"> Show content... </xf:if> 52. The user activated <xf:if is="{$xf.visitor.user_state} == 'valid'"> Show content... </xf:if> 53. Awaiting email confirmation (after editing): <xf:if is="{$xf.visitor.user_state} == 'email_confirm_edit'"> Show content... </xf:if> 54. Email is not valid <xf:if is="{$xf.visitor.user_state} == 'email_bounce'"> Show content... </xf:if>
  6. This will add a Google custom search form to your xenForo Advanced Search and will do a Google search of your site/s.You will of course first need to sign up and have registered your site/s with Google CSEOnce you have configured that you will be able to get the code you can add to the form1. At the end of the template search_form add the following. Text in capitals is to be replaced. <xf:comment>Google Custom Serach Form starts here</xf:comment> <div class="block-container"> <div class="block-body block-row"> <h1 class="p-title-value">TITLE E.G. GOOGLE CUSTOM SEARCH</h1> <span class="ADD CSS CLASS FOR YOUR TEXT (OPTIONAL)">ADD YOUR TEXT HERE (OPTIONAL)</span> ADD THE GOOGLE SCRIPT HERE <div> <gcse:searchresults> </gcse:searchresults> </div> </div> </div> Note that this includes the code for the search results, so you only need the first first stage when you click the Google CSE Get Code button (it's bit confusing) Tip: Change the phrase advanced_search to add a description to that button
  7. This will give you a prefix menu above the thread list which filters threads by prefix. (Much more obvious and intuitive than the existing Filter by prefix)Here's one I made earlier: Filter Prefix Menu small.mp4 - XenForo community.MP4 You can do this via a template modification or just customise the template itself. Make a note of the prefix names and IDs (you can see the ID number in the URL of the main Thread Prefixes list - click on the prefix and note the number at the end. Alternatively click on the prefix in the thread list. Make a note of the forum URL when NOT filtered by any prefix. This is for the initial All menu item to quickly get back to unfiltered. Make a note of the forum ID (the number at the end of the forum URL) Add the code below to the top of the template forum_view (capitalised text to be replaced, they are instructions what to insert in the code) First we need to make sure this only appears in the forum we want (you can do this for as many forums as you want). In this case the forum ID is 68Step A: <div style="margin-bottom:10px"> <xf:if is="{$forum.node_id} == 68"> <span class="">Filter by Prefix:</span> <a href="INSERT FORUM URL HERE"> <span class="label label--red">All</span></a> CODE FOR STEP B WILL BE INSERTED HERE </xf:if> </div> Then we add the different prefixes as menu items. Obviously you can choose your preference of color. Insert the step B code into the aboveStep B: <a class="labelLink" href="?prefix_id=1"> <span class="label label--red">Name of Prefix 1</span></a> <a class="labelLink" href="?prefix_id=2"> <span class="label label--red">Name of Prefix 2</span></a> <a class="labelLink" href="?prefix_id=3"> <span class="label label--red">Name of Prefix 3</span></a> ADD AS MANY PREFIXES AS YOU HAVE FOR THAT FORUM You can obviously style your div (e.g. add a class to extra.less) or <span>Filter by Prefix:</span> span to suit
  8. With this script you can show Adblock users a simple not annoying message to please disable Adblock.Example: First you have to create a new (or edit a existing) advertisement. (/admin.php?advertising/)I chose "Container breadcrumb (top): Above".Add the following to the HTML: <div class="blockMessage blockMessage--important blockMessage--iconic fuckAdblock-message" style="display: none;"> Please disable Adblock and help us to pay server costs. </div> <script>function adBlockDetected() { // If Adblocker detected show "Please disable Adblock message" otherwise stay hidden. $(".fuckAdblock-message").show();}if(typeof fuckAdBlock !== 'undefined' || typeof FuckAdBlock !== 'undefined') { adBlockDetected();} else { var importFAB = document.createElement('script'); importFAB.onload = function() { fuckAdBlock.onDetected(adBlockDetected) fuckAdBlock.onNotDetected(adBlockNotDetected); }; importFAB.onerror = function() { adBlockDetected(); }; importFAB.integrity = 'sha256-xjwKUY/NgkPjZZBOtOxRYtK20GaqTwUCf7WYCJ1z69w='; importFAB.crossOrigin = 'anonymous'; importFAB.src = 'https://cdnjs.cloudflare.com/ajax/libs/fuckadblock/3.2.1/fuckadblock.min.js'; document.head.appendChild(importFAB);}</script> hope this will help you
  9. For XF2.0, Ignore tag First you need to configure the widgets you want in tabs without position (Write down the widgets keys)Now create a widget html and in the template put something like this <div class="block"> <div class="block-container"> <h2 class="widget-tabs block-tabHeader tabs hScroller" data-xf-init="tabs h-scroller" data-state="replace" role="tablist"> <span class="hScroller-scroll"> <a href="url to the content" class="tabs-tab is-active" role="tab" aria-controls="widget key 1">Tab title 1</a> <a href="url to the content" class="tabs-tab" id="widget key 2" role="tab">Tab title 2</a> <a href="url to the content" class="tabs-tab" id="widget key 3" role="tab">Tab title 3</a> </span> </h2> <ul class="tabPanes widget--tab"> <li class="is-active" role="tabpanel" id="widget key 1"> <xf:widget key="widget key 1" /> </li> <li role="tabpanel" aria-labelledby="widget key 2"> <xf:widget key="widget key 2" /> </li> <li role="tabpanel" aria-labelledby="widget key 3"> <xf:widget key="widget key 3" /> </li> </ul> </div> </div> <xf:css> .widget-tabs { overflow: hidden; .tabs-tab {font-size: 13px;} } .widget--tab .block-minorHeader {display:none;} </xf:css> In my example i want to show latest threads, latest post and latest profile post, so i replace the values with something like this. <div class="block"> <div class="block-container"> <h2 class="widget-tabs block-tabHeader tabs hScroller" data-xf-init="tabs h-scroller" data-state="replace" role="tablist"> <span class="hScroller-scroll"> <a href="{{ link('whats-new/posts/') }}?skip=1" class="tabs-tab is-active" role="tab" aria-controls="tab_lastest_threads">Latest threads</a> <a href="{{ link('whats-new/posts/') }}?skip=1" class="tabs-tab" id="tab_lastest_post" role="tab">New posts</a> <a href="{{ link('whats-new/profile-posts/') }}?skip=1" class="tabs-tab" id="tab_lastest_profile_post" role="tab">Latest profile posts</a> </span> </h2> <ul class="tabPanes widget--tab"> <li class="is-active" role="tabpanel" id="tab_lastest_threads"> <xf:widget key="tab_lastest_threads" /> </li> <li role="tabpanel" aria-labelledby="tab_lastest_post"> <xf:widget key="tab_lastest_post" /> </li> <li role="tabpanel" aria-labelledby="tab_lastest_profile_post"> <xf:widget key="tab_lastest_profile_post" /> </li> </ul> </div> </div> <xf:css> .widget-tabs { overflow: hidden; .tabs-tab {font-size: 13px;} } .widget--tab .block-minorHeader {display:none;} </xf:css> Now just configure the widget key, title, positions, check the option advanced mode option and saveThe result should be something like this
  10. NB: I have found this may cause jumping on some browsers, will post an update fix tomorrow.Option 1 (very very simple) Edit the code (see below) to include each ad's LINK_URL and IMAGE_URL (Optional) Edit duration of display var howOften = 7; default =7 seconds Create an ad in ACP > Setup > Advertising Paste both part 1 and part 2 of the code in the ad (it doesn't matter which order) Option 2 ( very simple)After editing as above Paste part 1 of the code at the bottom of PAGE_CONTAINER template Paste part 2 of the code in your ad Note that option two may be better practice, but you will need to add part 1 to the template in every style.The Ad locationBefore using this please test that your ad location is actually showing as expected. To do this, simply create the ad and type in some text, e.g. TEST, or add a simple html to display an image. Now check that i shows on your forum.Jumping issues with some browsersNB: Ideally your ad banner images should be the same dimension or the page will jump when they rotate. Even if they are the same height, there can still be jumping issues with some browsers.For this reason we included the container style style="min-height:100px". The height here should be as high as the images (or largest image)This is the down and dirty fix, the only tiny problem is it would cause a vertical gap to show on smaller devices. Here is the more advanced fix if you know css: The CodeNB: keep exactly as is, replace only the where the text is RED, ie LINK_URL, ALT_TEXT and IMAGE_URL. It is important not to change the single quote to double quote, ie do not change ' to ".URLs with queries ? may not work. Remember this is down and dirty, simple and easy. For more complex features I would recommend you get an addon that will accomodate those. Part 1 <xf:comment>Part 1 javascript</xf:comment> <script type="text/javascript" language="JavaScript1.2"> var howOften = 7; //number often in seconds to rotate var current = 0; //start the counter at 0 var ns6 = document.getElementById&&!document.all; //detect netscape 6 var items = new Array(); items[0]="<a href='LINK_URL' ><img alt='ALT_TEXT' src='IMAGE_URL' height='auto' width='100%' /></a>"; items[1]="<a href='LINK_URL'><img alt='ALT_TEXT' src='IMAGE_URL' height='auto' width='100%' /></a>"; function rotater() { document.getElementById("placeholder").innerHTML = items[current]; current = (current==items.length-1) ? 0 : current + 1; setTimeout("rotater()",howOften*1000); } function rotater() { if(document.layers) { document.placeholderlayer.document.write(items[current]); document.placeholderlayer.document.close(); } if(ns6)document.getElementById("placeholderdiv").innerHTML=items[current] if(document.all) placeholderdiv.innerHTML=items[current]; current = (current==items.length-1) ? 0 : current + 1; //increment or reset setTimeout("rotater()",howOften*1000); } window.onload=rotater; //--> </script> Part 2 <xf:comment>Part 2 - The ad container that appears on your page</xf:comment> <layer id="placeholderlayer"></layer><div style="min-height:100px" id="placeholderdiv"></div> Screenshot (Firefox Responsive mode)
  11. Thanks for this one. Now I can switch back to Xmas theme
  12. Version 1.0.2

    31 downloads

    Allow users to bookmark any threads, posts, or any other content on your forum as bookmarks. This even allows your users to make notes on different bookmarks which can then be shown on your users' profiles. Administrators are able to create widgets in different positions, rather it be on the sidebar, forum list, resource category, resource overview, or any other position that you choose. Users can also choose what content types can be seen on their profile, how many bookmarks are shown per page, what pop-up content is seen, and how many bookmarks are limited on the popup. Users are able to choose if their bookmarks can be public or not. Including, they can choose if they want to watch the thread, receive or not receive email notifications. Make notes public to display on your profile Bookmark nodes, threads, posts, resources and media Choose how many bookmarks can be shown per page Create widgets that show bookmarks in different parts of your forum So many more features
  13. Version 1.0.5 Patch Level 4

    85 downloads

    With [TH] Reactions you able to control how you want your reactions to work. Rather it be the icon, image, color, or if it shows a negative outcome. Configure which reactions can send alerts, publish into the newsfeed, which reactions can be undone by the users, and how many reactions can be used per day. With reaction types, you can choose what order the reaction type will appear in to the user. Choose what order the reaction type will appear in to the user while also changing if they are positive, negative, or neutral. Unlimited amount of reactions and reaction types Choose what order the reaction type will appear in to the user Define the color of the reaction type. Choose what user groups can and can not use reactions
  14. Version 1.0.3 Patch Level 1

    40 downloads

    This add-on allows you setup forums based on Question & Answers with just a few clicks. Also, allow users to ask questions while other users are able to answer the question with multiple. Then, the question starter may then mark which answer fits best. Questions & Answers Forum allows you to turn your forum into a knowledge base, support portal, or just a questionnaire based community. Also, you can choose which forums are QA based or add a custom widget that allows your users to see which threads are unanswered. Upvote/downvote posts Widget for unanswered threads Threads get marked answered with a label when complete Display order to display either by best vote (default) or chronologically Enable an Unanswered Threads Widget to keep a watch out for those who need answers
  15. Version 1.0.0

    15 downloads

    This add-on is designed to allow you to optimize any images that are uploaded on your forum by users while also compressing with best-in-class algorithms. General Features: Optimize any image that is uploaded on your forum Save bandwidth and storage space Improve your website's load time Optimize all images uploaded or optimize images via cron Please be sure that you have an active subscription on kraken.io before purchasing this product! Optimize any image on your forum Save bandwidth and storage space Improve your website's load time Optimize all images uploaded or optimize images via cron
  16. Version 1.0.0

    101 downloads

    [TH] Nodes allows you to style your nodes, icons, and so much more. Rather it being changing the node color, style, or icon on a specific node for just one or two of your themes.Features include: Allows for multiple column layouts of nodes that can be set globally for all categories, on individual categories, or within a category Layouts are fully responsive based on the device viewing them allowing for the theme creator to decide how to optimally show the nodes on their forum Allows for customization of individual nodes backgrounds, and colors Allows you to set a custom read/unread icon for each forum Also this add-on allows you to navigate to a forum or sub-forum faster by clicking the more link below the node. Also, you can post a new thread easily by clicking the plus symbol which is also below each node.
  17. Version 2.0.1.1.0

    172 downloads

    Introducing the fan favorite UI.X for XenForo 2. Based off of the tried true methodologies of its XenForo 1 predecessor, UI.X continues to push the boundaries of intelligent, performant, perfected design. Modern tools that increase user interactions, familiar user interface based on Google’s ever popular Material design, and the backing of a team well-versed in the XenForo software make UI.X a wise choice for any forum. ThemeHouse has been building products for XenForo since day one of the software’s release and we aren’t going anywhere. Just a minute to install, a few clicks to easily change images and colors in line with your brand, and you’re off and running. And if you ever have a question, we’re here to help. Coming from XenForo 1? As a thank you to all those who have stuck by UI.X, those with an active license receive 50% off when upgrading to UI.X2. Just use coupon code UpgradeUIX. If you have ever purchased a UI.X product, we have a 20% even if its inactive, just use coupon code UpgradeUIX20.
  18. Version 2.0.0.2

    120 downloads

    Introducing the fan favorite UI.X for XenForo 2. Based off of the tried true methodologies of its XenForo 1 predecessor, UI.X continues to push the boundaries of intelligent, performant, perfected design. Modern tools that increase user interactions, familiar user interface based on Google’s ever popular Material design, and the backing of a team well-versed in the XenForo software make UI.X a wise choice for any forum. ThemeHouse has been building products for XenForo since day one of the software’s release and we aren’t going anywhere. Just a minute to install, a few clicks to easily change images and colors in line with your brand, and you’re off and running. And if you ever have a question, we’re here to help. Coming from XenForo 1? As a thank you to all those who have stuck by UI.X, those with an active license receive 50% off when upgrading to UI.X2. Just use coupon code UpgradeUIX. If you have ever purchased a UI.X product, we have a 20% even if its inactive, just use coupon code UpgradeUIX20. Google's Material standard integrated Setup and ready to go in minutes Hundreds of new settings Millions of customization possibilities Optimized for big boards as well Node grid customization options
  19. For those who don't understand what he just said... He wants to add IPS Copyright information on a nulled copy from WF My guess is that you have some sort of tick mark in theme options or so
  20. How can I limit it to only a certain sub forum?
    And what about the icons you have in front os usernames?
  21. +1 on what Jrock said. You could try a clean install of the same script and use try importing the database using convert in IPS or just import something in XF but I don't recommend that
×
×
  • Create New...