Jump to content

Open Coterie  ·  19 members

SMF Staff People

Display Alliance & Department in Poster


Jones
 Share

Recommended Posts

Putting the final touch on miniprofiles for the WiP site. Finish line is so close now. Just wondering how to set it up so I can display the alliance and department in their appropriate colors? I know ',$message['member']['group'] will get me the characters Department, and I know how to set it to the right color by giving it an inline style that calls on ['member']['group_color']. But I would like to be able to do the same for their alliance too. It's an HP themed site so our Alliances are Magical and Muggle, each with same 3 departments just divided by color. Remembering which colors are for wizards and which are for muggles will take time for new members though so I would like to have both displayed for quick reference.

 

Thanks so much, @Arceus. You've been such a huge help getting this thing pulled together. Even aside from your awesome character mod.

 

operation: bowtruckles & bombs

R6MmD.png

Link to comment
Share on other sites

All the way at the bottom of Load.php, there should be this function:

acmLoadCharacterContext($id_character)

What you want already loads. You just need to output it by adding to the $character array.

			'alliance' => $row['alliance_name'],
			'department' => $row['department_name'],

This is the function that controls what loads and is available for characters in Display.template. You will have to do an empty check on it or your error log will fill up with PHP warnings, as regular members won't have these keys in their memberContext array.

',(!empty($message['member']['alliance']) ? $message['member']['alliance'] : ''),'

Something like that.

  • Thank you 1

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

Worked perfectly thanks so much. I also ended up adding alliance color to the array, going off the way you did group_color.

'alliance_color' => ((!empty($row['alliance_color']) ? $row['alliance_color'] : '')),

 

 

operation: bowtruckles & bombs

R6MmD.png

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.