inherit
114253
0
Apr 1, 2024 6:38:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on Oct 28, 2013 11:25:59 GMT -8
If someone could please make a template mod that allows the following:
I would like to allow specific users to have their threads they create in their own color of their choice. By this I mean the thread title when you go to thread list. Their threads will stand out from others with their own unique color. It would have to be user specific.
Can anyone do this?
|
|
Former Member
inherit
guest@proboards.com
131621
0
Apr 23, 2024 17:01:24 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Oct 28, 2013 22:11:40 GMT -8
Uhmm... hmm.
If you made a custom profile field where they insert a hex code color, then target that custom profile field and name it as the background color it might work.... if custom fields will work by who posted it... one moment, let me fiddle. Not sure this will work. xD
|
|
Former Member
inherit
guest@proboards.com
131621
0
Apr 23, 2024 17:01:24 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Oct 28, 2013 22:23:37 GMT -8
yep, it appears possible! Here are the steps: First, make a Custom Profile Field named Thread Color. Instruct members to put a hashtag and then the hex code color, like #000000 Then, go to your Admin > Themes > Layout Templates > Board > Thread List On a DEFAULT template, you will add the parts in red: {foreach $[thread]}{foreach $[thread.created_by.custom_field]} {if $[thread.created_by.custom_field.name] == "Thread Color"} <tr id="$[thread.content_id]" class="$[thread.content_class]" style="background-color: $[thread.created_by.custom_field.value];"> <td class="icon">$[thread.icon]</td> <td class="checkbox clickable">$[thread.checkbox]</td> <td class="main clickable" title="$[thread.short_content]"> <table> <tr> <td>$[thread.icons]</td> <td> $[thread.labels] <span class="link target">$[thread]</span> {if $[thread.pagination]}<div class="ui-micro-pagination">Pages: $[thread.pagination]</div>{/if} </td> </tr> </table> </td> <td class="created-by clickable">$[thread.created_by]</td> <td class="replies clickable">$[thread.replies]</td> <td class="views">$[thread.views]</td> <td class="latest last">by $[thread.last_post.created_by]<br />$[thread.last_post.created_on]</td> </tr> {/foreach}
{if !$[thread]} <tr class="last"> <td class="last center" colspan="7">No threads were found.</td> </tr> {/if}
Please note I did not test this extensively and there may be problems. If you report there aren't any glitches, I'll add this to the template library. I tested this here, the green color being what I added as my hex code in Edit Profile for that custom profile field, so it does appear to be working. But again, that's as far as I took it so not positive!
|
|
inherit
114253
0
Apr 1, 2024 6:38:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on Oct 28, 2013 23:25:47 GMT -8
ELF, thanks for this, ill try it out tomorrow, but a quick question, can that field be made available only to specific member groups?
|
|
Former Member
inherit
guest@proboards.com
131621
0
Apr 23, 2024 17:01:24 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Oct 29, 2013 0:40:23 GMT -8
Hmm you could always make it so only staff members can edit the custom profile field
|
|
inherit
114253
0
Apr 1, 2024 6:38:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on Oct 29, 2013 14:52:58 GMT -8
That would work Thanks I appreciate you taking the time to do this for me I'll test it out just to see how it works
|
|
Former Member
inherit
guest@proboards.com
131621
0
Apr 23, 2024 17:01:24 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Oct 30, 2013 4:15:38 GMT -8
Let me know so I can add it to the template library if it lacks glitches
|
|
inherit
182185
0
Apr 28, 2013 19:19:40 GMT -8
Thomasss
5,180
August 2012
thomje112
|
Post by Thomasss on Oct 30, 2013 7:58:08 GMT -8
I'm testing this out now on Teg's board (I'm an admin there), and it's actually hiding all the threads in a board. Heres a screenshot: As you can see, there are "supposed" to be threads there, they just don't show. As I had a custom made template for it, I reset it to default to see if this was my code causing the issue, and it still does the same thing.
|
|
Former Member
inherit
guest@proboards.com
131621
0
Apr 23, 2024 17:01:24 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Oct 30, 2013 16:38:42 GMT -8
Thomasss, I'm gonna guess it's lacking a background-color defined if the thread creator doesn't have a hex code color in their profile field, so it is just not showing the thread. Do any of the thread creators that are supposed to be showing up in that board there have a hex code color defined? Just to see if that part is working. I'll mess with the glitch and let you know =)
|
|
inherit
182185
0
Apr 28, 2013 19:19:40 GMT -8
Thomasss
5,180
August 2012
thomje112
|
Post by Thomasss on Oct 30, 2013 16:53:23 GMT -8
Never thought of that, just saw all the threads missing. Let me reimplement it, and give it a go ahead.
|
|
inherit
182185
0
Apr 28, 2013 19:19:40 GMT -8
Thomasss
5,180
August 2012
thomje112
|
Post by Thomasss on Oct 30, 2013 17:01:47 GMT -8
It indeed works when I have it filled out (test forum) and does not when it's not filled out.
|
|
Former Member
inherit
guest@proboards.com
131621
0
Apr 23, 2024 17:01:24 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Oct 30, 2013 18:08:18 GMT -8
Ahkay, I figured that was the problem. I'll work on this now then
|
|
Former Member
inherit
guest@proboards.com
131621
0
Apr 23, 2024 17:01:24 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Oct 30, 2013 18:17:08 GMT -8
I'm really not sure on this for a few reasons. 1) the variable I am using is thread.created_by so it should be showing the color of whoever created the thread, not the current user. And yet if you are logged into a profile that does not have a hex color set in their profile field, the threads of people with the field filled out still doesn't show, which makes it act as if I used current_user instead. I'm not sure why it's doing that. 2) there isn't a way to set a default background color that I can think of in the layout template because, until a new feature they have added to their list is pushed, a code like: {foreach $[thread.created_by.custom_field]} {if $[thread.created_by.custom_field.name] == "Thread Color"} <div style="background-color: $[thread.created_by.custom_field.value]"> {else} <div style="background-color: #000000;"> {/if} {/foreach} isn't going to work. Which means I'm not sure what else I can do to make a color show up if the member doesn't have the profile field filled out. Hopefully I described those problems clearly, I'm gonna see if Tim Camara has any ideas?
|
|
inherit
182185
0
Apr 28, 2013 19:19:40 GMT -8
Thomasss
5,180
August 2012
thomje112
|
Post by Thomasss on Nov 2, 2013 7:15:22 GMT -8
Bump
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on Nov 4, 2013 9:51:03 GMT -8
I'm really not sure on this for a few reasons. 1) the variable I am using is thread.created_by so it should be showing the color of whoever created the thread, not the current user. And yet if you are logged into a profile that does not have a hex color set in their profile field, the threads of people with the field filled out still doesn't show, which makes it act as if I used current_user instead. I'm not sure why it's doing that. 2) there isn't a way to set a default background color that I can think of in the layout template because, until a new feature they have added to their list is pushed, a code like: {foreach $[thread.created_by.custom_field]} {if $[thread.created_by.custom_field.name] == "Thread Color"} <div style="background-color: $[thread.created_by.custom_field.value]"> {else} <div style="background-color: #000000;"> {/if} {/foreach} isn't going to work. Which means I'm not sure what else I can do to make a color show up if the member doesn't have the profile field filled out. Hopefully I described those problems clearly, I'm gonna see if Tim Camara has any ideas? 1. I'd need a link to this problem. 2. I have no idea what feature request you're talking about, but I can't tell you what's wrong without a link to it not working.
|
|