Teddy Rogers Posted February 5, 2022 Posted February 5, 2022 (edited) What is the recommended method for using multiple colours in group names. After setting the group formatting colour is adding this in to the group name field okay? Invision Community <span style='color:#666999'>Team</span> It has worked fine for decade(s) (and still functions without problems) I do come across fields like this in AdminCP where groups titles are listed... Team"' href='https://bringbackticketsupport.com/?app=core&module=members&controller=groups&do=permissions&id=666'> Invision Community Team Ted. Edited February 5, 2022 by Teddy Rogers
Randy Calvert Posted February 5, 2022 Posted February 5, 2022 This typically happened because you applied the closing tag incorrectly. For example: FIRST BOX <span style="color:purple;font-weight:bold"> SECOND BOX </span> You would not want the close span included in the first box (as it would not apply anything to the group name itself. If you forget to include the close span in the second box, it will also break the HTML and not render correctly and possibly output like you described above. Another example would be something like IPS used to do for the Customer group by putting a red + mark in front of their name and making it italic. It might look something like: FIRST BOX <span style="color:red"><strong>+</strong></span> <i> SECOND BOX </i> And the output might look like + Randy Calvert Teddy Rogers 1
Teddy Rogers Posted February 5, 2022 Author Posted February 5, 2022 That was how it was being output/ rendered. Rather than defining a code I specified the colour and it seemed to fix it up. Oddly it only rendered like that in AdminCP. You are correct about the closing tags... 👍 Ted.
Solution Randy Calvert Posted February 5, 2022 Solution Posted February 5, 2022 I'm glad that just picking a color with the color picker worked for you! If you need help with something more "robust", feel free to post the specific opening and closing tags you're trying to use. Someone might be able to give you some feedback on it! Teddy Rogers and SeNioR- 2
Teddy Rogers Posted February 5, 2022 Author Posted February 5, 2022 Tags were okay in this instance, I meant I agreed with you regarding closing tags being required. Changing the hex code value to a defined colour seemed to fix it (or the formatting) for some reason. The sample I gave was of the rendered (visible) text being displayed alongside group names, only a problem in AdminCP. Anyway, all good now and thanks for your help... 👍 Ted.
Jim M Posted February 5, 2022 Posted February 5, 2022 Am I correct in assuming that this was on the URL you listed at in your code example? Just want to see if this is a parsing error on our end, we take care of it or find a more robust way to validate those when they are inserted into this field.
Teddy Rogers Posted February 5, 2022 Author Posted February 5, 2022 26 minutes ago, Jim M said: Am I correct in assuming that this was on the URL you listed at in your code example? Yes, that is correct... Ted. Jim M 1
Jim M Posted February 5, 2022 Posted February 5, 2022 Thank you! Unfortunately, what I thought was happening here does not appear to be so. Likely, the closing tag here was involved with the error.
Teddy Rogers Posted February 5, 2022 Author Posted February 5, 2022 I went back and double checked. The problem turns out its the way I typed in using single quotes and doubles. Go to "Group Name" field and enter this in... Invision Community <span style='color:red'>Team</span> Now go to a forum and view permissions and you will see the change in the list of group names. Using double quotes works fine, like this... Invision Community <span style="color:red">Team</span> Ted.
Marc Posted February 7, 2022 Posted February 7, 2022 Glad to hear you managed to resolve the issue there. Really this is not intended to be used in the way you are describing. You should be using "Group formatting" rather than adding spam tags in the group name
Recommended Posts