[solved] Warning Message Feature



  • As seen here on Lowyat.NET Hardware Subforum, I thought it is cool if NodeBB has this kind of feature to display "warning message" just after the header before the thread list.

    Screen Shot 2014-06-11 at 10.04.37 PM.png



  • @aixnr

    Already possible. (Sort of) You can only apply header widgets to global, so I noticed on the page you supplied that the text inside changed per page. We would have to ask someone like @psychobunny to implement homepage header and category header independently if you wanted it to change. 👍

    Edit: Forgot to actually tell you how to do it. Go to ACP>Templates>Widget, drag the HTML widget into Global Header and add your rules in there. then drag a style from further down into the bottom of the 3 boxes.

    Home_NodeBB_-_2014-06-12_03.34.54.png



  • Thanks a lot for the tips. I guess it would be helpful if NodeBB has the ability to implement the header widget independently according to specific tag / subforum. Thanks again 👍


  • Admin

    I wonder what fanboyism means... 😛

    You could theoretically change the message using JavaScript:

    var someMessage = '';
    
    if (ajaxify.variables.get('category_id') === 1) {
      someMessage = 'Welcome to Category 1, aka Announcements!'   
    }
    
    $('#someDiv').html(someMessage)
    


  • Don't stare me like that hahahaha.



  • I know it is blasphemy to reply/reopen an old thread, but I think I have some sort of workaround for this. Say that per-category header warning message is 1) not going to be as native functionality, or 2) still waiting for plugin for that, I think a pinned thread atop all threads would suffice.


Log in to reply
 

Suggested Topics

  • 7
  • 5
  • 6
  • 1
  • 26
| |