PDA

View Full Version : allow users to custom there own background


Sc0rian
02-02-2007, 06:14 PM
Hey,

I'm looking for a mod that allows users to custom the background.

Thanks

Ben

paul41598
02-02-2007, 06:45 PM
background of the forum or their profile?

Sc0rian
02-03-2007, 08:29 AM
background of the forum or their profile?

for the forum - the colour.

RedTyger
02-03-2007, 11:12 AM
Create a custom field with a single-line text box. This is where users put the URL of the background they want to have. Make a note of the fieldX number. Open the headinclude template and find this:


<!-- CSS Stylesheet -->
$style[css]
<if condition="is_browser('opera') AND !is_browser('opera', '8.0.1')">
<style type="text/css">
ul, ol { padding-left:20px; }
</style>
</if>
<!-- / CSS Stylesheet -->



then below it add:


<style type="text/css">
<if condition="!$bbuserinfo[userid] AND $bbuserinfo[fieldx] != ''>
body { background: #fff url(images/defaultbackground.jpg) top center repeat; }
<else />
body { background: #fff url($bbuserinfo[fieldx]) top center repeat; }
</if>
</style>


Replace fieldx with the number of the custom field you created and remove any body background information from the CSS for the style(s) template you modified. Tested, works fine.

Edit: That's for a custom background image, for just the colour replace #fff url($bbuserinfo['fieldx']) top center repeat; with just $bbuserinfo['fieldx'] and your users can put either in the custom field, they can define any background information they want.