1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Exclude Certain "Nodes" From "Whats New"

Discussion in 'Add-on Requests [Archive]' started by jimbothompson, Jun 10, 2011.

  1. jimbothompson

    jimbothompson Member

    I have a few nodes that I auto populate with RSS data. There is so much data here that I would like to make sure that when someone clicks on "Whats New?" that these nodes do not show up. Anyone want to take on a project like this?

    I would be willing to pay to have this done.
     
    Renegade likes this.
  2. Digital Doctor

    Digital Doctor Well-Known Member

  3. jimbothompson

    jimbothompson Member

    If they are more then likely to include this in 1.1 I misewell just wait for that. It would be a great function to have. Letting me import my RSS data guilt free :D
     
  4. dieketzer

    dieketzer Well-Known Member

    until 1.1 is released, you can cheat and achieve this functionality using template conditionals.
    in template thread_list_item:
    find:
    Code:
    <li id="thread-{$thread.thread_id}" class="discussionListItem {$thread.discussion_state} {xen:if {$thread.sticky}, 'sticky'} {xen:if {$thread.isNew}, 'unread'}" data-author="{$thread.username}">
    replace with:
    Code:
    <li <xen:if is="{$showForumLink} AND {$thread.node_id} == 4">style="hidden;" </xen:if>id="thread-{$thread.thread_id}" class="discussionListItem {$thread.discussion_state} {xen:if {$thread.sticky}, 'sticky'} {xen:if {$thread.isNew}, 'unread'}" data-author="{$thread.username}">
    change the number in {$thread.node_id} == 4 to reflect the node id of the forum you wish to hide on whats new (and jaxals portals 'recent threads' as well).
    one caveat is that pagination will not be affected, meaning that if 10 of the twenty 'whats new' threads are hidden, the page will only display 10 threads.
     
  5. jimbothompson

    jimbothompson Member

    Thanks so much for the tip. That is so much cleaner then my exclude thread code in vb :)
     
  6. James

    James Well-Known Member

  7. CFodder

    CFodder Well-Known Member

    How would you do this for more than one node?
     
  8. Itworx4me

    Itworx4me Well-Known Member

    Code:
    <li <xen:if is="{$showForumLink} AND in_array({$thread.node_id}, array('1','2','3'))">style="hidden;" </xen:if>id="thread-{$thread.thread_id}" class="discussionListItem {$thread.discussion_state} {xen:if {$thread.sticky}, 'sticky'} {xen:if {$thread.isNew}, 'unread'}" data-author="{$thread.username}">
    Untested....Not sure if you can use an array statement after the AND....Can't hurt to try....lol
     
    CFodder likes this.
  9. CFodder

    CFodder Well-Known Member

    Sadly it didn't work, actually the initial code with one node isn't working either ... oh well, will just have to wait for 1.1. Thanks for trying Itworx :).
     
  10. Forsaken

    Forsaken Well-Known Member

    Thats if the ignore feature in 1.1 has support for ignoring nodes.
     
  11. CFodder

    CFodder Well-Known Member

    Hope so!
     
  12. dieketzer

    dieketzer Well-Known Member

    i havent tried the array, but the initial code does work.
    the first lines of my thread_list_item:
    Code:
    <xen:require css="discussion_list.css" />
    
    <xen:if is="{$thread.isDeleted}"><xen:include template="thread_list_item_deleted" /><xen:else />
    
    <li <xen:if is="{$showForumLink} AND {$thread.node_id} == 17">style="display: none;" </xen:if>id="thread-{$thread.thread_id}" class="discussionListItem {$thread.discussion_state} {xen:if {$thread.sticky}, 'sticky'} {xen:if {$thread.isNew}, 'unread'}" data-author="{$thread.username}">
     

Share This Page