XF 1.1 Custom Background member_view?

@Jeremy
I Create a custom field "background"
In PAGE_CONTAINER, i find:
Code:
<div id="content" class="{$contentTemplate}">
Replace:
Code:
<div id="content"<xen:if is="{$visitor.customFields.largebackground} == 'yes'"><xen:if is="{$visitor.customFields.background}"> style="background-image: url({$visitor.customFields.background});background-position: center;background-attachment:fixed;"</xen:if><xen:else /><xen:if is="{$visitor.customFields.background}"> style="background-image: url(http://vietnamairline.edu.vn/wp-content/uploads/2013/02/co-cay.jpg);"</xen:if></xen:if> class="{$contentTemplate}">

In code this.
Link : http://vietnamairline.edu.vn/wp-content/uploads/2013/02/co-cay.jpg
It is default background.


But, i didn't work.!
 
@Brogan
Can you help me?

I don't have time to give exact steps right now... but I would suggest looking at this tutorial:

http://xenforo.com/community/resour...ge-based-on-user-profile-field-selection.535/


Instead of placing the image in the member view profile page, you can possibly use some custom CSS with a conditional, something like this:

Code:
<xen:if is="{$contentTemplate} == 'member_view'">
<xen:if is="{$user.customFields.testfield}">
html { background: url(@imagePath/xenforo/custombg/{$user.customFields.testfield}.jpg) no-repeat top center #000 !important; }
</xen:if>
</xen:if>

It's early in the morning with no coffee so this might not work but :D, the conditional checks to see if you're in the member view page(I think)

The conditional checks to see if the user you're viewing has a custom field set then applies a background. If the user doesn't have a custom field set the html css shouldn't load therefore the default background would load.

I hope this works for you :D


 
Top Bottom