1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lack of Interest Highlighted threads

Discussion in 'Closed Suggestions' started by ge66, May 11, 2014.

  1. ge66

    ge66 Active Member

    When a thread is important we can make it sticky.
    I am wondering if it wouldn't be a good idea to have a second level of this, highlighted threads. Meaning important thread that will have a different background colour, making it easier to spot in the threadlist.

    Please like this post if you like the idea!
    Veer, Grover and Daniel Hood like this.
  2. Amaury

    Amaury Well-Known Member

    This (by @Brogan) is probably what you're looking for.
  3. Gazhyde

    Gazhyde Well-Known Member

    I'd use a thread prefix to do that. Make it a bright colour and it will stand out nicely.
  4. ge66

    ge66 Active Member

    I think you two might have missunderstood a little. I want this permissionsbased so that you could let users of the right group set this on a thread, maybe after paying to be a member of that group. Another use for this is when using a forum for classifieds. Or moderators could use it to show threads that are extra good but shouldn't be stickied.
    If there are any other addons that does something like this please tell me.
    I know it can be done by hand a thread at the time in EXTRA.css but I would like others to do it, and more easily.
  5. Tracy Perry

    Tracy Perry Well-Known Member

    Prefixes (if I remember correctly) can be group based for use allowance.

    I knew I remembered correctly
    Screen Shot 2014-05-12 at 3.20.39 AM.png
  6. Daniel Hood

    Daniel Hood Well-Known Member

    That still doesn't highlight the background of the entire row. I like what he's suggesting.
    ge66 likes this.
  7. Grover

    Grover Well-Known Member

    I <like> your idea, since I am more or less looking for something similar: http://xenforo.com/community/threads/custom-thread-fields.1267/page-3#post-763362

    I still run vBulletin (since I still can not migrate to Xenforo, since there are still no albums and blogs supported in XF without being dependable on third-party developers) and there I need to alter the templates everytime I add a thread that I need to be highlighted. I believe (as a non-programmer, mind you) Custom Thread Fields could already help fantastically in this, but having an UI/function that actually supports highlighting individual threads (regardless if they are sticky or not) makes it even easier.
    ge66 likes this.
  8. ge66

    ge66 Active Member

    Today I took a new look at this.
    I took the suggestion to use prefixes and made a little template edit to get the thread highlighted. This could probably be made nicer, I am not a programmer.

    Search for:
        <div class="listBlock main">
    in template: thread_list_item
    replace with:
    <xen:if is="{$thread.prefix_id} == xx">
        <div class="listBlock main" style="background-color:#ffc;">
    <xen:else />
        <div class="listBlock main">
    Replace xx with the prefix id of a newly created highlight-prefix
    and replace #ffc with what highlight background colour you want.

    This might not work in all threadlists.

    You should probably only give moderators the permission to use the specific prefix.
    Daniel Hood likes this.
  9. Daniel Hood

    Daniel Hood Well-Known Member

    I'd suggest doing this instead:
    <div class="listBlock main"<xen:if is="{$thread.prefix_id} == xx"> style="background-color:#ffc;"</xen:if>>
    as a template modification so you don't have to do it in the future if there's changes to that template.
    ge66 likes this.
  10. ge66

    ge66 Active Member

    Thank you for cleaning that up.

    Do you or anyone else know if there is an easy way to get the colour of the chosen prefix to be the background-color?
  11. Daniel Hood

    Daniel Hood Well-Known Member

    You'd have to make an addon that adds the thread prefix data (css/etc) to the viewparams so you can access it within the template. Alternatively instead of doing style="background-color: #ffc;" you could do:

    <div class="listBlock main<xen:if is="{$thread.prefix_id} == xx">thread_prefix_{$thread.prefix_id}</xen:if>">
    and in your extra css set a

    background-color: #ffc;
    And add another css rule for each id.
    ge66 likes this.
  12. Joe Link

    Joe Link Well-Known Member

    Good stuff here guys. I got it working, mostly. I'd like to know if there's a way to change the whole thread box's background color based on a specific prefix, rather than just the list box.


Share This Page