Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Letting the user upload a custom background? (33 posts)

Started 11 months, 1 week ago by: findly.tk

  • Profile picture of findly.tk findly.tk said 11 months, 1 week ago:

    How can I allow the user to upload a custom background?

  • Profile picture of Brajesh Singh Brajesh Singh said 11 months, 1 week ago:

    Hi, I have done something similar in one of my project. So, I may put the code here. Where do you want to show the background. Just on user profile page or for every page on the site when the user is logged in. I mean if you see twitter, It allows to setup the background for user profile, while on orkut, the theme changes sitewide. Just trying to understand your need.

  • Profile picture of findly.tk findly.tk said 11 months, 1 week ago:

    I want to show it on just the profile.

    Thanks for your help so far.

  • Profile picture of Brajesh Singh Brajesh Singh said 11 months, 1 week ago:

    Thanks. Let me clean the code and put the plugin in an hour here :)

  • Profile picture of findly.tk findly.tk said 11 months, 1 week ago:

    Thank you very much :)

  • Profile picture of Brajesh Singh Brajesh Singh said 11 months, 1 week ago:

    Ok, Here you go

    https://github.com/sbrajesh/bp-custom-background-for-user-profile

    Please note, I have not added localization to the plugin yet. It will work with single/Multisite both. Once you activate the plugin, a user can visit his/her profile and change Background link will be present next to the change avatar. Hope that helps.

  • Profile picture of pcwriter pcwriter said 11 months, 1 week ago:

    @sbrajesh

    Nice job… works great! You da man… as usual ;-)
    Maybe an update could include an option to have the chosen background image stay fixed on screen or scroll with pages?

  • Profile picture of Brajesh Singh Brajesh Singh said 11 months, 1 week ago:

    @pcwriter
    Thanks Patrick. Will sure do that in update. It was something I did in an hour, so could not do much.
    btw, you can do your own css section using some code (here is an example)

    https://gist.github.com/1034853

    just putting that in functions.php or bp-custom.php and you can modify it :)

  • Profile picture of @mercime @mercime said 11 months, 1 week ago:

    Thank you @sbrajesh. Just tested it and it’s working as advertised, cool.

  • Profile picture of naijaping naijaping said 11 months, 1 week ago:

    what a nice plugin, just tried it and it work like a charm. but i will prefer if it can change the colour of the container rather than the site background.

  • Profile picture of Brajesh Singh Brajesh Singh said 11 months, 1 week ago:

    @mercime, thank you :)
    @naijaping thanks. That is easily achievable. If you are using Bp-default theme, you can use this code in your functions.php

    https://gist.github.com/1034872

    That should do it.

  • Profile picture of pcwriter pcwriter said 11 months, 1 week ago:

    @sbrajesh

    Thanks. I’ll give those additional snippets a try tomorrow :-)

  • Profile picture of gregfielding gregfielding said 11 months, 1 week ago:

    Probably should be an option to delete the background image.
    Any chance of adding a color picker option?

  • Profile picture of pcwriter pcwriter said 11 months, 1 week ago:

    This looks like it’s gonna be one of those oh-so-popular goodies by Brajesh! :-)

  • Profile picture of @mercime @mercime said 11 months, 1 week ago:

    @sbrajesh – Now you’ve done it. We’re cooking up with more feature requests :-)
    … add option to change background for groups as well?
    Thank you.