background-image perso

background-image perso

Postby loxido on Tue Jun 23, 2009 5:20 pm


Is it possible for each user to choose a background image has a blog?
The only change these personal that members of my site wishes for my moment I can not find any info on the subject ..

thank you I'm asking Responses
Posts: 2
Joined: Sat Jun 20, 2009 10:29 pm
LifeType Version: 1.2.8

Re: background-image perso

Postby jondaley on Mon Jun 29, 2009 10:39 am

Probably what I would do is make your template use
<img src="{$url->blogLink()}gallery/{$blog->getId()}/background.jpg" />

(or wherever you include the static image now (if you need smarty variables in a css file, you need to name it style.css.template and then use the {literal} tags as appropriate))

Once all that is done, users simply need to upload a background.jpg into their resources, and it will automatically be used.

If you need a default image for users that don't upload an image, I'd probably do it with an .htaccess rule.
Lifetype Expert
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Return to Templates