The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Custom Profile Fields

View previous topic View next topic Go down

In progress Custom Profile Fields

Post by MarcoNecroX on Mon Nov 03, 2014 9:44 am

Hey

So, I need help with custom profile fields on the posts. The issue is that all custom fields are spawned as a single DD element, like the Rank / Username, like this:

Code:

<dd>
<!-- BEGIN profile_field -->
{postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
<!-- END profile_field -->
</dd>

I want to have access to the custom profile fields separatedly so that I can reposition them using CSS.

MarcoNecroX
Forumember

Posts : 97
Reputation : 3
Language : English

http://www.medianxl.com

Back to top Go down

In progress Re: Custom Profile Fields

Post by _Twisted_Mods_ on Mon Nov 03, 2014 9:48 am

if this doesn't do the trick let me know each thing you wanna add spacing to and ill be more specific with the elements

Code:
  .postprofile a{line-height: 30px;}
  .postprofile span{line-height: 20px;}
  .postprofile img{padding-top: 20px;}
avatar
_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

In progress Re: Custom Profile Fields

Post by MarcoNecroX on Mon Nov 03, 2014 10:18 am

That doesn't access the fields directly, what I want to do is exactly that.

MarcoNecroX
Forumember

Posts : 97
Reputation : 3
Language : English

http://www.medianxl.com

Back to top Go down

In progress Re: Custom Profile Fields

Post by Ange Tuteur on Tue Nov 04, 2014 1:50 pm

Hello MarcoNecroX,

Are you wanting to add a classname to specific profile fields, so that you may reposition them ? I just want to clarify before I do anything.

Thanks Smile
avatar
Ange Tuteur
Forumaster

Male Posts : 13072
Reputation : 2743
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Custom Profile Fields

Post by MarcoNecroX on Tue Nov 04, 2014 1:56 pm

Hi,

Yes, but I'm talking about the custom ones. For example badge fields I have on my forums, but not all users have them.

MarcoNecroX
Forumember

Posts : 97
Reputation : 3
Language : English

http://www.medianxl.com

Back to top Go down

In progress Re: Custom Profile Fields

Post by Ange Tuteur on Tue Nov 04, 2014 2:15 pm

Is the badge field just an image, or does it have text also ?
avatar
Ange Tuteur
Forumaster

Male Posts : 13072
Reputation : 2743
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Custom Profile Fields

Post by MarcoNecroX on Tue Nov 04, 2014 2:33 pm

well images yes, which can be accessed by img[src=""], but there are also text / number fields in it.

MarcoNecroX
Forumember

Posts : 97
Reputation : 3
Language : English

http://www.medianxl.com

Back to top Go down

In progress Re: Custom Profile Fields

Post by Ange Tuteur on Tue Nov 04, 2014 3:05 pm

Could you give me an example; a link or image ?

There isn't a specific way via templates, but you can use regular expressions to wrap the fields you want with tags. If it's just an image, you are correct that you can use the src attribute in your selector.
avatar
Ange Tuteur
Forumaster

Male Posts : 13072
Reputation : 2743
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Custom Profile Fields

Post by MarcoNecroX on Tue Nov 04, 2014 5:04 pm

example thread: http://www.medianxl.com/t6095-contest-results#164932

you can see Cookies field. I would for example like to move that. How would I move it without using :nth selectors (because not all users have that field)?

Without js/jq of course - my question is if it can be done via templates / css alone (in a reliable way)

MarcoNecroX
Forumember

Posts : 97
Reputation : 3
Language : English

http://www.medianxl.com

Back to top Go down

In progress Re: Custom Profile Fields

Post by Ange Tuteur on Tue Nov 04, 2014 9:20 pm

As far as I know your only way without JavaScript would be :nth-child, but in your situation it's unreliable. The templates wouldn't be possible as the profile fields are in variables. By wrapping them with tags, you add that class to all fields :
Code:
<div class="profile_field">{postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}</div>
avatar
Ange Tuteur
Forumaster

Male Posts : 13072
Reputation : 2743
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum