Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Sign Up
Sign in to follow this  
Jones

 Coding SMF displaying custom profile field info

Recommended Posts

How do?

 

Yes. Me. Again. 😔 I am rewriting the poster section of the display.template to create nicer looking mini profiles. I want to display certain custom fields, not as a block the way the code currently does. I want some of them above the avatar, some below, etc. And I cannot, for the life of me, figure out the PHP bits to make this happen. I know the names for my custom fields, I know where I want to put them. I just cannot figure how to get the value of specific fields to display. Anyone feel like pointing me in the right direction?  

 

p.s. I appreciate you all so much smart people thanks so much

Share this post


Link to post
Share on other sites

$message['member']['options']['cust_<key from the database here, most likely it will be the first 6 letters of the field name without spaces>']

Say we've got a custom field titled Full Name.

It is cust_fullna most likely.

 

This is how you pull custom fields manually globally. Just, it's $context in profiles and I believe $member in the member list.

If you have it set to parse BBC, you'll need to manually turn it on when you manual pull. It also won't have surrounding HTML or whatnot that's set in the field settings.

i.e. parse_bbc($message['member']['options']['cust_fullna'])

  • Thank you 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.



×

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.