Skip to Content Skip to Menu

Changing Profile Image

  • kdave321
  • kdave321
  • OFFLINE
  • Posts: 189
  • Thanks: 24
  • Karma: 1
3 weeks 6 days ago #339194 by kdave321
Changing Profile Image was created by kdave321
I just found a solution to dynamically change a profile image, and thought I'd share it.

Our site policy is to keep profiles up, after someone passses away, as a memoriam page, but change the profile image to Black & White.

I had been changing the photos but realized that CSS could do it.

I added a new field, "cb_imageclass", and then added this to Profile Image "Profile Value Layout":
Code:
<span class="[cb:userdata field="cb_imageclass" /]">[value]</span>

Then I made a class RIP in my template file with "filter: grayscale(100%);".  Now when the imageclass field for a member is changed to RIP, their profile image is B&W.


 
The following user(s) said Thank You: krileon

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum