Customizing SMF > SMF Coding Discussion

Help me write this code...

<< < (2/8) > >>

Liam_michael:

--- Quote from: DanCarroll on March 11, 2012, 06:12:48 PM ---Okay, without developing the code for you, let's see what you have. You say you have the code to be modified narrowed down to the 'link' line of code? Do you have the logic set up to filter by the groups you need? If so, you can set a style class up in the anchor tag and then set the color in your style sheet. Or if you don't mind inline styles, just set the color style in your anchor tag.

Hopefully all of this makes sense to you. I don't know what your level of proficiency or understanding is but this is a problem that will require some php, html, and css to synthesize a solution.

--- End quote ---

I understand what you mean.

No, I don't mind in-line styles at all.

I just want all topics displayed in the message index to show a different color, let's say red, when the original author (topic starter) is in membergroup 15, for instance.

IchBin™:
Not as easy as you'd think. You'll need to pull the user's member group based on the ID of the $row['id_first_msg']. Most likely will cost you an additional query. Once you have their groups, then you can do a check to see if their groups match any of the groups you want. If it matches then you just change the 'link' section in the first post to put a style tag in with the color you want.

Labradoodle-360:
As Brad said, for something so small and minor, it's really not worth the performance (although you wouldn't notice it, it's still there).

Liam_michael:

--- Quote from: Labradoodle-360 on March 12, 2012, 01:44:19 PM ---As Brad said, for something so small and minor, it's really not worth the performance (although you wouldn't notice it, it's still there).

--- End quote ---

I still would like this done, can anyone help.

Labradoodle-360:
IchBin did. He told you exactly what you need to do.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version