Resource icon

Add pictures to member profile page based on user profile field selection

With Arny's and Jake's help I got it up and working :P There was a minor fault in what I did I selected multiple choice selection rather than just a simple drop down.

We assigned random covers (manually xD) to each member, and they can edit it if they wish to, you can see a list of all the profile covers we have currently - http://orojackson.com/threads/profile-cover-submit-and-request.686/

This was a really great idea Arny ^^ Profile pages look better especially with a set category forum like ours.
 
We assigned random covers (manually xD) to each member, and they can edit it if they wish to, you can see a list of all the profile covers we have currently - http://orojackson.com/threads/profile-cover-submit-and-request.686/

WOW! :eek:

You've uploaded over 100 for people to choose from? :notworthy:

That's great for them! And yes, when you have a certain theme to the forum(s) it is MUCH easier to give folks what they want. Imagine a general topic forum .... would need SO many options to satisfy folks and you'd have to ask for almost all user submissions on that one.
 
WOW! :eek:

You've uploaded over 100 for people to choose from? :notworthy:

That's great for them! And yes, when you have a certain theme to the forum(s) it is MUCH easier to give folks what they want. Imagine a general topic forum .... would need SO many options to satisfy folks and you'd have to ask for almost all user submissions on that one.
Yes me and my friend (co-admin) first gathered up all the pictures, then I got to editing them to match the size + placement and stuff of some images.

It took a few hours but we both are motivated to finish something when we start so xD with a few breaks here and there it was done. We'll be adding more too (some of the favorite characters of some members were left out) but we're letting the community fill in the rest :P

It is indeed hard for a general topic forum, imagine all those music bands, movies etc fans who'd want a cover for their favorite stuff xD

But I'm sure we'll see more and more forums using this feature since it improves the general look of the profile pages :P and profile pages are after all a community area so giving the members a area for a custom item is really a awesome idea ^^
 
Hmmm... now to figure out how to put conditionals in to allow only certain usergroups to have this feature....

Anyone? :whistle:

Hmm .... not sure how to do that unless there is something in the usergroup permissions right now.

I know that we can put some conditionals to display the picture for some and not others. But, as far as allowing it as a 'feature' (maybe as a way to entice people to donate) to some and not others, I'm not sure. If you find out, please share with us :)
 
<xen:if is="{$visitor.is_admin} OR {$visitor.is_moderator}">

</xen:if>

Is it possible to use this to wrap around it to only show the custom userfield option to certain groups?
 
Looks like the answer is in this post ;)

http://xenforo.com/community/threads/allowing-custom-field-for-specific-usergroup.23009/#post-286673

Admin CP -> Appearance -> Templates -> custom_fields_edit

Find this:

Code:
<xen:include template="custom_field_edit" />

Replace with this:

Code:
<xen:if is="{$field.field_id} != 'my_identifier' OR {xen:helper ismemberof, $visitor, 4}">
       <xen:include template="custom_field_edit" />
</xen:if>

You need to enter the field_id of the private field as well as the user_group_id of the privileged group.
 
Modified to suit my needs on users being able to add custom profile banners (I can't keep up with clans or trends to be bothered with a multiple choice)
So I simply made it an image option (like an old VBulletin option I transferred over)

Did a simple add to this is by adding max width/height because I don't want my users seeing 1200x1200 sized 'banners'
Replace 715px and 200px for any size. I did this to work for aurora and blackened.

Code:
<xen:if is="{$user.customFields.add_a_banner_above_your_p}">
    <img src="{$user.customFields.add_a_banner_above_your_p}" style="max-width:715px; max-height: 200px;" />
</xen:if>

Works in FF, Chrome, and IE from what i see :)
 
Modified to suit my needs on users being able to add custom profile banners (I can't keep up with clans or trends to be bothered with a multiple choice)
So I simply made it an image option (like an old VBulletin option I transferred over)

Did a simple add to this is by adding max width/height because I don't want my users seeing 1200x1200 sized 'banners'
Replace 715px and 200px for any size. I did this to work for aurora and blackened.

Code:
<xen:if is="{$user.customFields.add_a_banner_above_your_p}">
    <img src="{$user.customFields.add_a_banner_above_your_p}" style="max-width:715px; max-height: 200px;" />
</xen:if>

Works in FF, Chrome, and IE from what i see :)

I'd love to see how you were able to allow for the custom banners to be used. Can you share that part of it?
 
Modified to suit my needs on users being able to add custom profile banners (I can't keep up with clans or trends to be bothered with a multiple choice)
So I simply made it an image option (like an old VBulletin option I transferred over)

Did a simple add to this is by adding max width/height because I don't want my users seeing 1200x1200 sized 'banners'
Replace 715px and 200px for any size. I did this to work for aurora and blackened.

Code:
<xen:if is="{$user.customFields.add_a_banner_above_your_p}">
    <img src="{$user.customFields.add_a_banner_above_your_p}" style="max-width:715px; max-height: 200px;" />
</xen:if>

Works in FF, Chrome, and IE from what i see :)

Like Arny said... what are the chances you could share that with those of us that would love to see this feature. Would pretty much make this complete at that point...
 
I will do a write-up now it really goes along the lines of what is already here. I just modified for my own needs. Can't be bothered with numerous requests from the members!
 
I will do a write-up now it really goes along the lines of what is already here. I just modified for my own needs. Can't be bothered with numerous requests from the members!

Take your time, no rush. I was just curious if you were going to or not. I do appreciate it either way.
 
Untitled-2.gif
so i made a single line custom user field as viewed in the thumbnail above

Then I went to the tab "Options for text fields"
-Value Match Requirements is set to "None"

and the rest is set to default values.

Replace "add_a_banner_above_your_p" with your specific custom profile ID.
*add to same area as ArnyVee showed in the tutorial* member_view (for each theme you have installed)
Code:
<xen:if is="{$user.customFields.add_a_banner_above_your_p}">
    <img src="{$user.customFields.add_a_banner_above_your_p}" style="max-width:715px; max-height: 200px;" />
</xen:if>
Important Note: Change max-width and max-height to your theme's needs. Mine is set for Aurora.

Tell users to go to their preferences/person details (or wherever you categorized that custom field) and add their image url.
Untitled-4.gif

VOILA!
Untitled-3.gif

I'm working on one where they can upload as well as a community "dump" where they can add their own banners and allow other users to select from a drop down.

And ArnyVee, you can add this/fix this to your tutorial if you want. I really just used what you had and subtracted stuff as you see!
 

Attachments

  • Untitled-4.gif
    Untitled-4.gif
    45 KB · Views: 51
Modified to suit my needs on users being able to add custom profile banners (I can't keep up with clans or trends to be bothered with a multiple choice)
So I simply made it an image option (like an old VBulletin option I transferred over)

Did a simple add to this is by adding max width/height because I don't want my users seeing 1200x1200 sized 'banners'
Replace 715px and 200px for any size. I did this to work for aurora and blackened.

Code:
<xen:if is="{$user.customFields.add_a_banner_above_your_p}">
    <img src="{$user.customFields.add_a_banner_above_your_p}" style="max-width:715px; max-height: 200px;" />
</xen:if>

Works in FF, Chrome, and IE from what i see :)

Worked perfectly for me.

I'm trying to do the same thing for a custom background. Exactly the same way. The problem that I am having is where to actually put that code, i've got the fields and everything ready. I tried putting it in xenforo.css using just css but it won't accept it. So if would be great if there is a template where that code could go which could have an effect on the background of the site. Maybe page_container but I still don't know where to put the code. Any help would be appreciated :)
 
Worked perfectly for me.

I'm trying to do the same thing for a custom background. Exactly the same way. The problem that I am having is where to actually put that code, i've got the fields and everything ready. I tried putting it in xenforo.css using just css but it won't accept it. So if would be great if there is a template where that code could go which could have an effect on the background of the site. Maybe page_container but I still don't know where to put the code. Any help would be appreciated :)
I've been trying to do the same thing for a while. I have to literally re-do the entire members page to make it work and it's OOGLY. lol
 
View attachment 28925
so i made a single line custom user field as viewed in the thumbnail above

Then I went to the tab "Options for text fields"
-Value Match Requirements is set to "None"

and the rest is set to default values.

Replace "add_a_banner_above_your_p" with your specific custom profile ID.
*add to same area as ArnyVee showed in the tutorial* member_view (for each theme you have installed)
Code:
<xen:if is="{$user.customFields.add_a_banner_above_your_p}">
    <img src="{$user.customFields.add_a_banner_above_your_p}" style="max-width:715px; max-height: 200px;" />
</xen:if>
Important Note: Change max-width and max-height to your theme's needs. Mine is set for Aurora.

Tell users to go to their preferences/person details (or wherever you categorized that custom field) and add their image url.
View attachment 28927

VOILA!
View attachment 28924

I'm working on one where they can upload as well as a community "dump" where they can add their own banners and allow other users to select from a drop down.

And ArnyVee, you can add this/fix this to your tutorial if you want. I really just used what you had and subtracted stuff as you see!

Oxy, did you manage to get the user upload function working?
 
View attachment 28925
so i made a single line custom user field as viewed in the thumbnail above

Then I went to the tab "Options for text fields"
-Value Match Requirements is set to "None"

and the rest is set to default values.

Replace "add_a_banner_above_your_p" with your specific custom profile ID.
*add to same area as ArnyVee showed in the tutorial* member_view (for each theme you have installed)
Code:
<xen:if is="{$user.customFields.add_a_banner_above_your_p}">
    <img src="{$user.customFields.add_a_banner_above_your_p}" style="max-width:715px; max-height: 200px;" />
</xen:if>
Important Note: Change max-width and max-height to your theme's needs. Mine is set for Aurora.

Tell users to go to their preferences/person details (or wherever you categorized that custom field) and add their image url.
View attachment 28927

VOILA!
View attachment 28924

I'm working on one where they can upload as well as a community "dump" where they can add their own banners and allow other users to select from a drop down.

And ArnyVee, you can add this/fix this to your tutorial if you want. I really just used what you had and subtracted stuff as you see!
I've followed your method and it works great. I just can't get the correct width, even when I increase the max-width to 1000px it remains the same? I've set the max-height to 144px. Any ideas what I'm doing wrong? The width changes if I increase the height, but then I don't want the height to be more bigger than the size of my display pic. Can it be set so it auto changes to remain align with the display pic? As portrait pics will be longer.


Screen Shot 2013-02-10 at 15.07.57.webp
 
Top Bottom