ElkArte Community

Elk Development => Feature Discussion => Topic started by: Barcelona on May 22, 2018, 08:44:11 am

Title: Custom Profile Field
Post by: Barcelona on May 22, 2018, 08:44:11 am
Hi, I'm new here so Hello Everybody!

I've got a question about Custom Profile Field and where we can place it. I would like to add some information below Avatar, Rank Icons etc.

How can I do it? I have tried everything and nothing works.

Regards!
Title: Re: Custom Profile Field
Post by: emanuele on May 23, 2018, 02:27:57 am
You mean not in the popup?
Title: Re: Custom Profile Field
Post by: Barcelona on May 24, 2018, 02:35:56 pm
Yes, exactly.
(Link-5835)
Title: Re: Custom Profile Field
Post by: emanuele on May 24, 2018, 06:08:50 pm
That requires theme changes.
When this area was designed, it was not thought to be that flexible.
Now I can't help much.
Maybe someone else has the edits handy.
Title: Re: Custom Profile Field
Post by: ahrasis on May 24, 2018, 10:27:41 pm
I think it is to be done either in display or generic template file or both but that should not be that difficult.

Just remember  to create new theme based on the default, copy the relevant template files to it and then make your modifications to that new theme.

Ask if you are not sure.
Title: Re: Custom Profile Field
Post by: Barcelona on May 25, 2018, 05:12:05 pm
I'm not sure at all. To be honest this is my first time with ElkArte and I have no idea where to start.
Title: Re: Custom Profile Field
Post by: ahrasis on May 25, 2018, 06:49:52 pm
You'll have to find your own way to start of which I'd suggest by exploring at the theme settings page and learn the basic from there.

Honestly, it will be harder for any of us to help if you really don't know anything.
Title: Re: Custom Profile Field
Post by: Barcelona on May 26, 2018, 10:04:22 am
So, I have to copy the main theme and paste into a new folder, than edit either display or generic template?
Could you point me where should I start editing those files?
Title: Re: Custom Profile Field
Post by: Spuds on May 26, 2018, 12:08:59 pm
You will need to edit the GenericMessages.template.php file

In that file you will see the function called "template_build_poster_div" ... this function returns a set of list items that are then wrapped in a UL in the various templates that call it. 

In that function you will find "// The member info dropdown starts here." ... you will want to pull the "stuff" you want elsewhere out of that section and probably move them to somewhere around "// Show the post group icons, but not for guests." ...

There is a quite a bit of logic around what custom icons are shown and where but it should be somewhat self explanatory by looking at the code in the spots I've indicated.