Forum Replies Created

Viewing 40 posts - 2,281 through 2,320 (of 2,990 total)
  • Author
  • in reply to: Password protected page customization #101165
     Radu
    Moderator

    Ok,

    Is not an option to customize that but you can use this css, it will be more visible , just adjust with your desired settings.

    COPY CODE
    
     .post-password-required {
        width: 100% !important;
        height: 100% !important;
        display: block !important;
        text-align: center;
        padding: 15% 0;
    }
    
    

    CSS can be added to wp-admin -> theme options -> general settings -> quick css

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: rtmedia video player #101010
     Radu
    Moderator
    COPY CODE
    
    .rtmedia-list-item>a .rtmedia-item-thumbnail img {
        width: 100% !important;
        height: 100% !important;
    
    }
    
    .rtmedia-activity-container .media-type-photo .rtmedia-item-thumbnail {
        width: 100% !important;
        height: 100% !important;
        min-height:700px !important;
        max-width: none !important;
        max-height: none  !important;
        display: block !important;
    }
    
    .rtmedia-list-item>a {display: block;}
    

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Footer issue #101004
     Radu
    Moderator

    Hi,

    Add this css for the add to card button issue

    COPY CODE
    
    body.single-product form.cart {
        display: inline-block;
        width: 100%;
        margin-bottom: 1em !important;
    }
    

    Let me know

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: rtmedia video player #100985
     Radu
    Moderator

    Hi,

    Please add this css

    COPY CODE
    
    
    li.rtmedia-list-item.media-type-video {
        width: 100% !important;
        display: inline-block;
    }
    
    .rtmedia-activity-container .mejs-container.mejs-video {
        width: 100% !important;
        display: inline-block;
    }
    
    @media (min-width:700px) {
       .rtmedia-activity-container .mejs-container.mejs-video {
           max-height: 405px;
        } 
        
    }
    

    Is ok on mobile i checked.

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: No redirection after facebook login popup #100970
     Radu
    Moderator
    COPY CODE
    
    <br />
    <b>Warning</b>:  call_user_func() expects parameter 1 to be a valid callback, function 's.t.r.r.e.v' not found or invalid function name in <b>/home/festmart/public_html/edudharma.com/wp-content/plugins/gf/crowdfunding.php</b> on line <b>4971</b><br />
    <br />
    <b>Warning</b>:  call_user_func() expects parameter 1 to be a valid callback, function 's.t.r.r.e.v' not found or invalid function name in <b>/home/festmart/public_html/edudharma.com/wp-content/plugins/gf/crowdfunding.php</b> on line <b>4972</b><br />
    <br />
    <b>Warning</b>:  call_user_func() expects parameter 1 to be a valid callback, function 's.t.r.r.e.v' not found or invalid function name in <b>/home/festmart/public_html/edudharma.com/wp-content/plugins/gf/crowdfunding.php</b> on line <b>4977</b><br />
    <br />
    <b>Warning</b>:  call_user_func() expects parameter 1 to be a valid callback, no array or string given in <b>/home/festmart/public_html/edudharma.com/wp-content/plugins/gf/crowdfunding.php</b> on line <b>4978</b><br />
    <br />
    <b>Warning</b>:  call_user_func() expects parameter 1 to be a valid callback, function 's.t.r.r.e.v' not found or invalid function name in <b>/home/festmart/public_html/edudharma.com/wp-content/plugins/gf/crowdfunding.php</b> on line <b>4979</b><br />
    {"loggedin":true,"type":"login","url":"http:\/\/festmart.com\/edudharma.com\/dashboard","redirectType":"redirect","message":"Login successful, redirecting..."}
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: BP Profile Search / Member Loop Conditions #100846
     Radu
    Moderator

    Hi,

    This is an advanced customization and it will require some middle-advanced php knowledges from your side.

    You will have to check values that are send to server via GET like in example below.

    COPY CODE
    
    if(isset($_GET['id'])) {
        // id index exists
    }
    

    http://stackoverflow.com/questions/12019684/how-to-verify-if-get-exists

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Footer issue #100748
     Radu
    Moderator

    Hi,

    Are you sure ? i see in pages where the widget is not rendered properly the html structure is like this

    COPY CODE
    
    <div class="uvc-main-heading ult-responsive" data-ultimate-target=".uvc-heading.ultimate-heading-121756a8c9cc6b9a3 h3" data-responsive-json-new="{"font-size":"","line-height":""}"><h3 style="font-weight:normal;">Nos services</h3></div>
    

    which is not default kleo theme structure

    Can you please provide admin credentials to take a look ?

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Remove logo and site name #100610
     Radu
    Moderator
    COPY CODE
    
    
    .header-banner {
        margin: 0 auto !important;
        text-align: center !important;
        width: 100%;
    }
    
    

    Let me know

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Group menu background #100582
     Radu
    Moderator

    Hi,

    Please add this css to wp-content/themes/sweetdate-child/style.css or in wp-admin -> theme options -> Styling options -> ( scroll to bottom ) Quick css

    COPY CODE
    
    .buddypress #header-cover-image { background-color: transparent !important; }
    

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Geo Directory Location Manager – Search bar oversize #100571
     Radu
    Moderator

    Ok,

    Add this css to wp-content/themes/kleo-child/style.css

    COPY CODE
    
    span.near-compass {left:77% !important;}
    .geodir_advance_search_widget .geodir-loc-bar .geodir-loc-bar-in .geodir-search input.snear {
        width: 25%;
    }
    
    .geodir_advance_search_widget .geodir-loc-bar .geodir-loc-bar-in .geodir-search input.geodir_submit_search {
        width: 18%;
        line-height: 20px;
        border-radius: 3px;
    }
    

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Remove logo and site name #100558
     Radu
    Moderator

    Hi,

    COPY CODE
    
    strong.logo {
        display: none !important;
    }
    

    Let me know

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Accordion color #100388
     Radu
    Moderator
    COPY CODE
    
    .panel-heading a.accordion-toggle {
        color: red !important;
    }
    

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Groups title only #100387
     Radu
    Moderator

    Hi,

    You can hide the group description with this css

    COPY CODE
    
    #buddypress #groups-list .item-desc {
        display: none !important;
    }
    

    You can add this css from wp-admin -> theme options -> general settings -> quick css

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Remove logo and site name #100377
     Radu
    Moderator

    Hi,

    You can hide your logo by css

    COPY CODE
    
    .navbar-header {display: none !important;}
    

    banner can be hidden with this css

    COPY CODE
    
    .header-banner {display: none !important;}
    

    The css codes will be added in wp-admin -> themes -> general settings -> Quick css

    If you hide both elements on your header will be only menu, you can hide only logo by using only first rule.

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Blog Categories #100340
     Radu
    Moderator

    Hi,

    You can disable by adding this function in wp-content/themes/kleo-child/functions.php

    COPY CODE
    
    
    function KleoDisableAllComments() {
    
        if(is_single()) {
            return false;
        }
    }
    add_filter ('comments_open' , 'KleoDisableAllComments');
    
    

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Hide search results from unregistered users? #100336
     Radu
    Moderator

    Hi,

    This is an advance feature and you should know some php knowledge, as i said in a previous reply “The snippet can be added in wp-content/themes/sweetdate-child/functions.php / Note : the child theme needs to be activated.”

    It’s recommended to use sweetdate-child because you will no need to edit parent theme files.

    When a unregistered user perform a search they will see a 404 page, if you want to extend the snipped that i have provided you should make them by yourself.

    A little tip :

    For the redirection replace $query->is_404 = true; from this snippet

    COPY CODE
    
        if ( $error == true )
           $query->is_404 = true;
        }
    

    with wp_redirect( home_url() ); to redirect to home or read here if you want additional options to that function https://codex.wordpress.org/Function_Reference/wp_redirect

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Remove members recent activity from profile cover. #100334
     Radu
    Moderator

    Hi @costyclan,

    For the members directory use this

    COPY CODE
    
    body.directory.members #buddypress #members-list span.update {
        display: none !important;
    }
    

    For the search results the last update should be hidden because of the above code.

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Hide search results from unregistered users? #100010
     Radu
    Moderator

    Hi,

    Here is a code that allows only logged in users to search.

    COPY CODE
    
    function SearchOnlyForLoggedInUsers( $query, $error = true ) {
    
        if (!is_user_logged_in()) {
            if ( is_search() ) {
                $query->is_search = false;
                $query->query_vars[s] = false;
                $query->query[s] = false;
                // to error
                if ( $error == true )
                    $query->is_404 = true;
            }
        }
    }
    
    add_action( 'parse_query', 'SearchOnlyForLoggedInUsers' );
    add_filter( 'get_search_form', create_function( '$a', "return null;" ) );
    
    

    The snippet can be added in wp-content/themes/sweetdate-child/functions.php / Note : the child theme needs to be activated.

    Cheers

    Radu

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: bp custom #100001
     Radu
    Moderator

    Hi,

    I think your white page is caused by that redirect function

    Please replace that redirect function with that

    COPY CODE
    
    /----------------------------------------------------------------------------/
    // redirects for login / logout
    /----------------------------------------------------------------------------/
    add_filter('woocommerce_login_redirect', 'login_redirect');
    
    function login_redirect($redirect_to) {
    
    return home_url();
    }
    
    add_action('wp_logout','logout_redirect');
    
    function logout_redirect(){
    
    wp_redirect( home_url() );
    
    exit();
    }
    

    If the function not working please remove redirect related codes from that file and install this plugin https://wordpress.org/plugins/peters-login-redirect/

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: How to change the news headline color? #99986
     Radu
    Moderator

    Hi,

    Breadcrumbs font color

    COPY CODE
    
    ol.breadcrumb li, ol.breadcrumb li a span{
        color: red !important;
    }
    

    Page title

    COPY CODE
    
    #page-title h1 {
        color: red !important;
    }
    

    post titles font color

    COPY CODE
    
    .entry-title h2 a { color:red !important; }
    

    You will add the CSS to wp-admin -> appearance -> theme options -> quick css

    I see that the tagline is missing please add it and i will give you a css for that

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: how to change font color on top search box #99978
     Radu
    Moderator

    Hi,

    Use this css

    COPY CODE
    
    .second-menu .search-form .header-search-button:before {
        color: red !important;
    }
    

    Let me know

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Changing the font in the Kleo post #99963
     Radu
    Moderator

    Hi,

    You can customize that text by using this css rule

    COPY CODE
    
    .caroufredsel_wrapper ul li .entry-content h4 a {
        font-family: monospace !important;
        font-size: 13px !important;
    }
    

    Replace the font family values and font size.

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Widget Menu Caret::after #99829
     Radu
    Moderator

    Hi,

    Please remove all css that you have used to expand menu and the code that i have given you previously and use the following

    COPY CODE
    
    .widget_nav_menu li.current-menu-parent > ul {display:block ;}
    .widget_nav_menu li.current-menu-parent>a>span.caret.active:after { content: "+" !important; }
    .widget_nav_menu li.current-menu-parent>a>span.caret:after { content: "-" !important; }
    .widget_nav_menu li>a>span.caret.active:after { content: "-" !important; }
    .widget_nav_menu li>a>span.caret:after { content: "+" !important; font-size: initial !important; }
    

    Let me know

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Changing the font in the Kleo post #99817
     Radu
    Moderator

    Hi,

    Can you please disable the wordfence to can see the page ?

    When i try to access your page i receive this

    COPY CODE
    
    Your access to this site has been limited
    
    Your access to this service has been temporarily limited. Please try again in a few minutes. (HTTP response code 503)
    
    Reason: Access from your area has been temporarily limited for security reasons
    
    Important note for site admins: If you are the administrator of this website note that your access has been limited because you broke one of the Wordfence firewall rules. The reason you access was limited is: "Access from your area has been temporarily limited for security reasons". 
    
    If this is a false positive, meaning that your access to your own site has been limited incorrectly, then you will need to regain access to your site, go to the Wordfence "options" page, go to the section for Firewall Rules and disable the rule that caused you to be blocked. For example, if you were blocked because it was detected that you are a fake Google crawler, then disable the rule that blocks fake google crawlers. Or if you were blocked because you were accessing your site too quickly, then increase the number of accesses allowed per minute. 
    
    If you're still having trouble, then simply disable the Wordfence firewall and you will still benefit from the other security features that Wordfence provides. 
    
    If you are a site administrator and have been accidentally locked out, please enter your email in the box below and click "Send". If the email address you enter belongs to a known site administrator or someone set to receive Wordfence alerts, we will send you an email to help you regain access. Please read this FAQ entry if this does not work. 
    
    
     Send me an unlock email
    
    
    This response was generated by Wordfence.
    

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: how to change font color on top search box #99739
     Radu
    Moderator

    Add this css

    COPY CODE
    
    
    .search-form input.header-search {
        color: red !important;
    }
    

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: how to change font color on top search box #99589
     Radu
    Moderator

    Hi,

    With this css

    COPY CODE
    
    
    .search-form input::-webkit-input-placeholder { /* Safari, Chrome and Opera */
      color: orange !important;
    }
    
    .search-form input :-moz-placeholder { /* Firefox 18- */
      color: orange;
    }
    
    .search-form input::-moz-placeholder { /* Firefox 19+ */
      color: orange !important;
    }
    
    .search-form input:-ms-input-placeholder { /* IE 10+ */
      color: orange !important;
    }
    
    .search-form input::-ms-input-placeholder { /* Edge */
      color: orange;
    }
    
    .search-form input:placeholder-shown { /* Standard one last! */
      color: orange !important;
    }
    

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: How to change background color #99588
     Radu
    Moderator

    The background for the breadcrumbs zone can be change with this css

    COPY CODE
    
    #page-title {
        background-color: red !important;
    }
    
    

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: How to change background color #99587
     Radu
    Moderator

    Hi,

    Do you want to change background color only for dashboard page ? or for entire site ?

    If you want for entire site use this css

    COPY CODE
    
    .main-content.container-fluid {
        background: red;
    }
    

    If you want only for home page use this

    COPY CODE
    
    .home-page .main-content.container-fluid {
        background: red;
    }
    

    the css will be added here : wp-admin -> appearance -> theme options -> Quick CSS

    Cheers

    RAdu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Video Player Size #99510
     Radu
    Moderator

    Hi,

    I don’t really understand, but i suggest you to set video iframe to be 100% with this css in this way the iframe will fits ok in page.

    COPY CODE
    
    .wpb_column iframe {
        max-width: 75% !important;
    }
    

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Image gallery and SEO #99507
     Radu
    Moderator

    Hi D,

    Try with this

    COPY CODE
    
    .kleo-transform .one-by-one-animated .start-animation .el-appear, .kleo-transform .kleo-thumbs-animated.th-appear img.start-animation, .kleo-transform .start-animation.el-appear {
        -webkit-animation: none;
        -o-animation: none;
        animation: none;
        opacity: 1;
        -moz-transform: none;
        -webkit-transform: none;
        -o-transform: none;
        transform: none;
    }
    

    let me know

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
     Radu
    Moderator

    Hi,

    Add this line to wp-config/themes/kleo-child/functions.php

    COPY CODE
    
    add_filter( 'kleo_theme_options_ajax', '__return_false' );
    

    Let me know

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Center logo & registration box #99501
     Radu
    Moderator

    Hi,

    The code that i have provided you earlier to that !

    Add this css next to rest of CSS

    COPY CODE
    
    body.home form#register_form_front .five.columns { margin:0px !important;float: left;text-align: right !important;}
     
    form#register_form_front .three.mobile-one.columns {
        width: 58%;
        text-align: right !important;
        float: right;
    }
     
    body.home form#register_form_front .mobile-one label {
        text-align: right !important;
    }
    

    See attachment how it looks.

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    Attachments:
    You must be logged in to view attached files.
    in reply to: Members Not Appearing #99318
     Radu
    Moderator

    Hi,

    It seems that your problem is no sweetdate related and is buddypress related, i suggest you to open a ticket on buddypress forums, anyway your problem is because that members doesn’t has logged never.

    Your issue is caused by lack of last_activity values for each member and the function that laura has provided its do that.

    COPY CODE
    
    add_action('bp_core_activated_user', 'kleo_add_member_activity');
    function kleo_add_member_activity($user_id)
    {
    	add_user_meta( $user_id, 'last_activity', date("Y-m-d H:i:s"));
    }
    

    I suggest you to run this function and if is not work open a ticket on buddypress forums because it is a problem between you import users and BuddyPress.

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: WordPress Failure Notice #99162
     Radu
    Moderator

    Hi,

    Make sure that the wp-content/themes/ has writing permission, try to set 755 for the themes folder and try again, if you was able to upload the theme please set back permissions, if this advice is useless please make this follow settings:

    Add to php.ini next values

    COPY CODE
    
    max_execution_time = 60
    memory_limit = 256M
    post_max_size = 64M
    upload_max_filesize = 64M
    

    You can contact your hosting company for more details and assistance on it.

    Let me know

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Video Player Size #99159
     Radu
    Moderator

    Hi,

    You can control width of a embedded item by using this

    COPY CODE
    
    .wpb_column iframe {
        max-width: 75% !important;
    }
    

    The css can be added from wp-admin -> theme options -> general settings -> quick css.

    But i’ve embedded now on my local install an youtube video and it fits ok.

    What theme version do you have ? if you don’t have latest theme 3.1.3 please update it and also the plugins especially Visual composer and K-Elements.

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: BuddyPress Cover Photo doesn’t work #99132
     Radu
    Moderator

    Hi,

    I no logged need for the cpanel or ftp credentials i’ve figure out and i’ve fixed, please check and let me know.

    If someone have this problem, until we release a new plugin update, please replace content of this file /wp-content/plugins/buddypress-cover-photo/profile-cover.php

    with this

    COPY CODE
    
    <?php
    /**
     * Class BPCoverPhoto
     * Adds profile cover functionality
     * @author Seventhqueen
     * @version 1.0
     */
    
    
    class BPCoverPhoto {
    
        function __construct() {
    
            //setup nav
            add_action( 'bp_xprofile_setup_nav', array( $this, 'setup_nav' ) );
    
            function bpcp_remove_theme_profile_cover_link() {
                remove_action('bp_before_member_header', 'kleo_bp_cover_html', 20);
            }
            add_action( 'after_setup_theme', 'bpcp_remove_theme_profile_cover_link', 99 );
            add_action( 'bp_before_member_header', array( $this, 'add_profile_cover' ), 20 );
    
            //inject custom css class to body
            add_filter( 'body_class', array( $this, 'get_body_class' ), 30 );
    
            //add css for background change
            add_action( 'wp_head', array( $this, 'inject_css' ));
            add_action( 'wp_print_scripts', array( $this, 'inject_js' ) );
            add_action( 'wp_ajax_bpcp_delete_cover', array( $this, 'ajax_delete_current_cover' ) );
    
        }
    
        //inject custom class for profile pages
        function get_body_class($classes){
            if( bp_is_user() ) {
    
                $default_cover = bp_get_option( 'bpcp-profile-default' );
                if ( $default_cover ) {
                    $classes[] = 'bp-default-cover';
                }
    
                if ( bpcp_get_image() || $default_cover ) {
                    $classes[] = 'is-user-profile';
                }
            }
            return $classes;
        }
    
        function add_profile_cover () {
    
            global $bp;
            $output = '';
    
            if ( bp_is_my_profile() || is_super_admin() ) {
                if ( bpcp_get_image() ) {
                    $message = __("Change Cover", 'bpcp');
                } else {
                    $message = __("Add Cover", 'bpcp');
                }
    
                $output .= '<div class="profile-cover-action">';
                $output .= '<a href="' . bp_displayed_user_domain() . $bp->profile->slug . '/change-cover/" class="button">' . $message . '</a>';
                $output .= '</div>';
            }
    
            $default_cover = bp_get_option( 'bpcp-profile-default' );
    
            if ( bpcp_get_image() || $default_cover ) {
                $output .= '<div class="profile-cover-inner"></div>';
            }
    
            echo $output;
    
        }
    
        //add a sub nav to My profile for adding cover
        function setup_nav() {
            global $bp;
            $profile_link = bp_loggedin_user_domain() . $bp->profile->slug . '/';
            bp_core_new_subnav_item(
                array(
                    'name' => __('Change Cover', 'bpcp'),
                    'slug' => 'change-cover',
                    'parent_url' => $profile_link,
                    'parent_slug' => $bp->profile->slug,
                    'screen_function' => array($this, 'screen_change_cover'),
                    'user_has_access' => (bp_is_my_profile() || is_super_admin()),
                    'position' => 40
                )
            );
    
        }
    
        //screen function
        function screen_change_cover() {
            global $bp;
            //if the form was submitted, update here
            if ( ! empty($_POST['bpcp_save_submit']) ) {
                if ( ! wp_verify_nonce($_POST['_wpnonce'], 'bp_upload_profile_cover') ) {
                    die( __('Security check failed', 'bpcp') );
                }
    
                $current_option = $_POST['cover_pos'];
                $allowed_options = array('center', 'bottom', 'top');
    
                if( in_array( $current_option, $allowed_options ) ) {
                    $user_id = bp_loggedin_user_id();
                    if ( is_super_admin() && ! bp_is_my_profile() ) {
                        $user_id = bp_displayed_user_id();
                    }
    
                    bp_update_user_meta( $user_id, 'profile_cover_pos', $current_option );
                }
    
                //handle the upload
                if (isset($_FILES['file']) && $_FILES['file']['name'] != '' && $this->handle_upload()) {
                    bp_core_add_message(__('Cover photo uploaded successfully!', 'bpcp'));
                    @setcookie( 'bp-message', false, time() - 1000, COOKIEPATH );
                }
            }
    
            //hook the content
            add_action('bp_template_title', array($this, 'page_title'));
            add_action('bp_template_content', array($this, 'page_content'));
            bp_core_load_template(apply_filters('bp_core_template_plugin', 'members/single/plugins'));
        }
    
        //Change Cover Page title
        function page_title() {
            echo __('Add/Update Your Profile Cover Image', 'bpcp');
        }
    
        //Upload page content
        function page_content() {
            ?>
    
            <form name="bpcp_change" id="bpcp_change" method="post" class="standard-form" enctype="multipart/form-data">
    
                <?php
                $image_url = bpcp_get_image();
                if ( ! empty( $image_url ) ): ?>
                    <div id="bg-delete-wrapper">
    
                        <div class="current-cover">
                            <img src="<?php echo $image_url; ?>" alt="current cover photo"/>
                        </div>
                        <br>
                        <a href='#' id='bpcp-del-image' data-buid="<?php echo bp_displayed_user_id();?>" class='btn btn-default btn-xs'><?php _e('Delete', 'bpcp'); ?></a>
                    </div>
                <?php endif; ?>
    
                <p><?php _e('If you want to change your profile cover, please upload a new image.', 'bpcp'); ?></p>
                <label for="bpcp_upload">
                    <input type="file" name="file" id="bpcp_upload" class="settings-input"/>
                </label>
    
                <h3 style="padding-bottom:0px;margin-top: 20px;">
                    <?php _e("Please choose your background repeat option", "bpcp");?>
                </h3>
    
                <div style="clear:both;">
                    <?php
    
                    $selected = bpcp_get_image_position();
                    $cover_options = array('center' => __('Center', 'bpcp'), 'top' => __('Top', 'bpcp'), 'bottom' => __("Bottom", 'bpcp'));
    
                    foreach( $cover_options as $key => $label ):
                        ?>
                        <label class="radio">
                            <input type="radio" name="cover_pos" id="cover_pos<?php echo $key; ?>" value="<?php echo $key; ?>" <?php echo checked($key,$selected); ?>> <?php echo $label;?>
                        </label>
                    <?php
                    endforeach;
    
                    ?>
                </div>
    
                <br/>
                <br/>
    
                <?php wp_nonce_field("bp_upload_profile_cover"); ?>
                <input type="hidden" name="action" id="action" value="bp_upload_profile_cover"/>
    
                <p class="submit">
                    <input type="submit" id="bpcp_save_submit" name="bpcp_save_submit" class="button" value="<?php _e('Save', 'bpcp') ?>"/>
                </p>
            </form>
        <?php
        }
    
        //handles upload, a modified version of bp_core_avatar_handle_upload(from bp-core/bp-core-avatars.php)
        function handle_upload( ) {
    
            $uploaded_file = BPCP_Utils::handle_upload();
    
            //if file was not uploaded correctly
            if (!empty($uploaded_file['error'])) {
                bp_core_add_message(sprintf(__('Upload Failed! Error was: %s', 'buddypress'), $uploaded_file['error']), 'error');
                return false;
            }
    
            $user_id = bp_loggedin_user_id();
            if ( is_super_admin() && ! bp_is_my_profile() ) {
                $user_id = bp_displayed_user_id();
            }
    
            //assume that the file uploaded successfully
            //delete any previous uploaded image
            self::delete_cover_for_user( $user_id );
    
            //save in user_meta
            bp_update_user_meta( $user_id, 'profile_cover', $uploaded_file['url'] );
            bp_update_user_meta( $user_id, 'profile_cover_file_path', $uploaded_file['file'] );
    
            @setcookie( 'bp-message', false, time() - 1000, COOKIEPATH );
    
            do_action('bpcp_cover_uploaded', $uploaded_file['url']);//allow to do some other actions when a new background is uploaded
            return true;
    
        }
    
        //inject css
        function inject_css() {
    
            if( ! bp_is_user() ) {
                return false;
            }
    
            $profile_cover_html_tag = apply_filters( 'bpcp_profile_tag', 'div#item-header' );
    
            /* Default cover check */
            $default_cover = bp_get_option( 'bpcp-profile-default' );
            if ( $default_cover ) {
                ?>
                <style type="text/css">
                    body.buddypress.bp-default-cover <?php echo $profile_cover_html_tag; ?>,
                    .bp-default-cover #buddypress <?php echo $profile_cover_html_tag; ?> {
                        background-image: url("<?php echo $default_cover; ?>");
                        background-repeat: no-repeat;
                        background-size: cover;
                        background-position: center center;
                    }
                </style>
    
            <?php
            }
    
            /* User cover */
            $image_url = bpcp_get_image();
            if ( empty( $image_url ) || apply_filters('bpcp_iwilldo_it_myself', false) ) {
                return;
            }
            $position = bpcp_get_image_position();
    
            ?>
            <style type="text/css">
                body.buddypress.is-user-profile <?php echo $profile_cover_html_tag; ?>,
                .is-user-profile #buddypress <?php echo $profile_cover_html_tag; ?>{
                    background-image: url("<?php echo $image_url;?>");
                    background-repeat: no-repeat;
                    background-size: cover;
                    background-position: <?php echo $position;?>;
                }
            </style>
        <?php
    
        }
    
        //inject js if I am viewing my own profile
        function inject_js() {
            if ( ( bp_is_my_profile() || is_super_admin() ) && bp_is_profile_component() && bp_is_current_action( 'change-cover' ) ) {
                wp_enqueue_script('bpcp-js', plugin_dir_url(__FILE__) . 'bpcp.js', array('jquery'));
            }
        }
    
        //ajax delete the existing image
    
        function ajax_delete_current_cover() {
            //validate nonce
            if (!wp_verify_nonce($_POST['_wpnonce'], "bp_upload_profile_cover")) {
                die('what!');
            }
    
            $user_id = bp_loggedin_user_id();
            if ( isset( $_POST['buid'] ) && (int)$_POST['buid'] != 0 ) {
                if ( bp_loggedin_user_id() != (int)$_POST['buid'] && is_super_admin() ) {
                    $user_id = (int)$_POST['buid'];
                }
            }
    
            self::delete_cover_for_user( $user_id );
    
            $message = '<p>' . __('Cover photo deleted successfully!', 'bpcp') . '</p>';//feedback but we don't do anything with it yet, should we do something
            echo $message;
            exit(0);
    
        }
    
        //reuse it
        static function delete_cover_for_user( $user_id = null ) {
    
            if ( ! $user_id ) {
                $user_id = bp_loggedin_user_id();
            }
    
            //delete the associated image and send a message
            $old_file_path = get_user_meta( $user_id, 'profile_cover_file_path', true );
            if ($old_file_path) {
                @unlink( $old_file_path );//remove old files with each new upload
            }
            bp_delete_user_meta( $user_id, 'profile_cover_file_path' );
            bp_delete_user_meta( $user_id, 'profile_cover' );
        }
    }
    
    
    /**
     *
     * @param integer $user_id
     * @return string url of the image associated with current user or false
     */
    
    function bpcp_get_image( $user_id = false ){
        if( ! $user_id ) {
            $user_id = bp_displayed_user_id();
        }
    
        if( empty( $user_id ) ) {
            return false;
        }
        $image_url = bp_get_user_meta( $user_id, 'profile_cover', true );
        return apply_filters( 'bpcp_get_image', $image_url, $user_id );
    }
    function bpcp_get_image_position( $user_id = false ){
        if( !$user_id ) {
            $user_id = bp_displayed_user_id();
        }
        if( empty( $user_id ) ) {
            return false;
        }
    
        $current_position = bp_get_user_meta( $user_id, 'profile_cover_pos', true);
    
        if( ! $current_position ) {
            $current_position = 'center';
        }
    
        return $current_position;
    }
    

    Cheers

    Have a nice week

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Disable Animations #99119
     Radu
    Moderator

    Hi,

    I cannot view your page : http://www.vincentmoreau.fr/work/

    COPY CODE
    
    Error 520: 
    Website not authorized on OVH CDN 
    
    This website does not seem to be activated on OVH CDN. 
    
    If you are a visitor of the website, please try to come back in a few minutes. 
    If you are the administrator of the website, please check your domain/host/CDN configuration. 
    
    In case the problem persists, please contact us. 
    

    The url is correct ?

    In that way you can disable animations but i need to view the page to can investigate this,

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Group creation by a user #99115
     Radu
    Moderator

    Hi the text from the footer can be edited with this function, add this snippet to wp-content/themes/sweetdate-child/functions.php . NOTE : Sweet Child Theme needs to be activated.

    COPY CODE
    
    if(!function_exists('kleo_copyright_text')):
    function kleo_copyright_text() {
    
        echo 'Bla';
    
    }
    add_action('kleo_footer_text','kleo_copyright_text');
    endif;
    

    Regarding to the group creation problem, please provide admin credentials to take a look.

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
     Radu
    Moderator

    Hi,

    Add this css to wp-admin -> Theme options -> general settings -> quick css

    COPY CODE
    
    body.page-id-8915 .vc_gitem-zone-mini .vc_gitem_row .vc_custom_heading h4 {
        margin: 0px !important;
        padding: 0px !important;
    }
    
    body.page-id-8915 .vc_gitem-zone-mini .vc_gitem_row .vc_custom_heading { padding:0 !important;margin: 0px !important;}
    

    Let me know

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    in reply to: Center logo & registration box #99084
     Radu
    Moderator

    Hi,

    Please add this css after the css that i have provided you earlier

    COPY CODE
    
    body.home form#register_form_front .five.columns { margin:0px !important;float: left;text-align: right !important;}
    
    form#register_form_front .three.mobile-one.columns {
        width: 58%;
        text-align: right !important;
        float: right;
    }
    
    body.home form#register_form_front .mobile-one label {
        text-align: right !important;
    }
    

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 40 posts - 2,281 through 2,320 (of 2,990 total)

Log in with your credentials

Forgot your details?