BuddyDev

Search

[Resolved] BP Custom Background For Users Profile plugin

  • Participant
    Level: Initiated
    Posts: 6
    Andrew Hill on #4817

    Thank you Brajesh Singh for your quick response.
    Here is a copy and paste of my earlier post. I hope it’s in the right place.

    Hello,
    I am running wordpress 4.5.3 and buddypress 2.6.1.1 and buddyboss 4.3.2
    I just installed BP Custom Background For Users Profile plugin and it doesn’t change the background.. it shows the profile photo in the profile but the background still remains blank. Can you please tell me how i can fix this. I will send a screenshot if necessary.
    Thank you for your time.
    Andrew

    As you can see the profile picture is loaded, but the background is still white/blank.

    Screenshot link
    http://digitalporch.org/wp-content/uploads/2016/07/screen1.png

    I would like each member to have his/her own background in his/her own wall.

    Please tell me where to put the code.

    Thank you very much for your time.
    Andrew

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #4821

    Hi Andrew,
    Thank you.

    We will need to modify the css which is easy. I need the selector for the above section. Can you please point me to the correct css selector or link me to a user profile(I can take the css selector from there).

    I will post the code then.

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 6
    Andrew Hill on #4828

    Thank You Brajesh for your fast reply,

    Here is some links to a members wall and profile. I want each member to have their own background they choose on their own WALL. Wall only.

    Please tell me where to put the code. I thank you for your assistasnce.

    Link to a members WALL
    http://digitalporch.org/digitalporch-members-tribe/super-chicken/

    Link to a members profile encase you need it
    http://digitalporch.org/digitalporch-members-tribe/super-chicken/profile/

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #4840

    Hi Andrew,
    Thank you.

    Please put this code and see if it works for you or not?

    
    
    add_filter( 'bppg_iwilldo_it_myself', '__return_true' );//do not generate css for us
    
    //Our own css
    function buddydev_custom_inject_css() {
    	if ( ! function_exists( 'bppg_get_image' ) ) {
    		return ;// no trouble when the plugin is disabled
    	}
    
    	$image_url = bppg_get_image();
    
    	if ( empty( $image_url ) ) {
    		return;
    	}
    
    	$repeat_type = bp_get_user_meta( bp_displayed_user_id(), 'profile_bg_repeat', true );
    
    	if ( ! $repeat_type ) {
    		$repeat_type = 'repeat';
    	}
    	?>
    	<style type="text/css">
    		body.is-user-profile .site{
    			background: url(<?php echo $image_url; ?>);
    			background-repeat: <?php echo $repeat_type; ?>;
    		}
    
    	</style>
    	<?php
    }
    add_action( 'wp_head', 'buddydev_custom_inject_css', 200 );
    

    You may twak the selector body.is-user-profile .site to suit in better way.

    Hope that helps.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 6
    Andrew Hill on #4842

    Thank you Brajesh, for your fast response.

    Please forgive me but i placed this in my custom CSS widget and there were no changes. Please forgive me but where should i place this code, in themes child style.CSS, or Functions.PHP custom.CSS. ?

    I don’t want to make any more mistakes.

    Regards
    Andrew

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #4843

    Hi Andrew,
    Please put it into your themes/or child theme’s functions.php

  • Participant
    Level: Initiated
    Posts: 6
    Andrew Hill on #4844

    Hello Brajesh,
    I did what you said and it didn’t work. It bricked my site so i had to go to cpanel to delete the code, when i refreshed the page things were fine, now i can’t get in my site. So i’m doing a website restore. I also deleted the plugin through cpanel
    Is there another plugin or option to let users change their background?

    Thank you for your time
    Andrew

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #4855

    Hi Andrew,
    I am sorry that you had to go through such inconvenience.
    Most probably, The code got mixed in functions.php

    May I ask if you are comfortable with php? If not, Can you please post the code on pastebin? I can update the file myself.

    I will update this plugin in future to allow using selector from the backend settings to make it easy. For now, I don’t see another alternative.

  • Participant
    Level: Initiated
    Posts: 6
    Andrew Hill on #4856

    Hello Brajesh,
    Thank you for getting back to me; i’m only a little comfortable with php.
    I got a pastebin account and posted the code there.

    Name – digitalporch
    Paste name – dp background

    Again thank you for your time with this, when you repost i’ll reinstall the plugin and follow your instructions.
    If you have any questions just ask.

    Regards
    Andrew

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #4857

    Hi Andrew,
    Thank you.
    Is that the only content in your functions.php ?
    If yes, all we need to do is add http://pastebin.com/smwaUGXM

    But if it is not all the content of functions.php, then pleas post the complete content.

    Thank you
    Brajesh

The topic ‘ [Resolved] BP Custom Background For Users Profile plugin’ is closed to new replies.

This topic is: resolved