Forum Replies Created
Viewing 10 posts - 1 through 10 (of 10 total)
-
Author
-
NormanParticipant
hi sharmstr I want to share this with you. WPML provided a solution that works with your top menu login !
COPY CODEfunction add_language_variable( $custom_redirect_to, $variable, $user ) { global $sitepress; if( 'language' == $variable && defined('ICL_LANGUAGE_CODE') && $sitepress->get_default_language() != ICL_LANGUAGE_CODE ) { return ICL_LANGUAGE_CODE; } return $custom_redirect_to; } add_filter( 'rul_replace_variable', 'add_language_variable', 10, 3 );
if the above code is added in the functions.php
than this can be added in peters login redirect:[variable]language[/variable]
it works on my site. maybe you can use that
NormanParticipantCOPY CODE/* Add social login to Kleo login modal */ add_action( 'kleo_before_login_form','add_social_to_login_modal' ); function add_social_to_login_modal() { do_action('oa_social_login'); }
January 14, 2015 at 14:13 in reply to: upload attached picture in buddypress profile activity doesn't work #42018NormanParticipantAbe important rtMedia fixed the bug !!
you have to add this code to the themes function.php ( i tested it, it works !)
COPY CODEfunction rtmedia_modify_upload_params_upload_url( $params ){ if( class_exists( 'BuddyPress' ) && bp_displayed_user_id() && bp_is_activity_component() ) { $params['url'] = '/' . bp_get_activity_root_slug() . '/upload/'; } return $params; } add_filter( 'rtmedia_modify_upload_params','rtmedia_modify_upload_params_upload_url', 10, 1 );
November 30, 2014 at 21:42 in reply to: bp activity loader plugin install needs container info to work #37169NormanParticipantoh right . sorry sharmstr.
yes it works.here for everyone who wants to run the BP ACTIVITY LOADER PLUGIN.
just copy and replace this code:COPY CODE/** * Please note, this plugin requires the jQuery cookie plugin, which comes bundled with the bp-default theme and many BuddyPress themes. * If you theme does not include it it, please copy it from bp-default/_inc/global.js and paste in your js file **/ jQuery(document).ready( function() { var jq=jQuery; var is_activity_loading=false;//We'll use this variable to make sure we don't send the request again and again. //Check the window scroll event. jq(window).scroll(function() { //Find the visible "load more" button. //since BP does not remove the "load more" button, we need to find the last one that is visible. var load_more_btn=jq(".load-more:visible"); //If there is no visible "load more" button, we've reached the last page of the activity stream. if(!load_more_btn.get(0)) return; //Find the offset of the button. var pos=load_more_btn.offset(); //If the window height+scrollTop is greater than the top offset of the "load more" button, we have scrolled to the button's position. Let us load more activity. if(jq(window).scrollTop() + jq(window).height() > pos.top ) { load_more_activity(); } }); /** * This routine loads more activity. * We call it whenever we reach the bottom of the activity listing. * */ function load_more_activity(){ //Check if activity is loading, which means another request is already doing this. //If yes, just return and let the other request handle it. if(is_activity_loading) return false; //So, it is a new request, let us set the var to true. is_activity_loading=true; //Add loading class to "load more" button. //Theme authors may need to change the selector if their theme uses a different id for the content container. //This is designed to work with the structure of bp-default/derivative themes. //Change #content to whatever you have named the content container in your theme. jq(".activity li.load-more").addClass('loading'); if ( null == jq.cookie('bp-activity-oldestpage') ) jq.cookie('bp-activity-oldestpage', 1, { path: '/' } ); var oldest_page = ( jq.cookie('bp-activity-oldestpage') * 1 ) + 1; //Send the ajax request. jq.post( ajaxurl, { action: 'activity_get_older_updates', 'cookie': encodeURIComponent(document.cookie), 'page': oldest_page }, function(response) { jq(".load-more").hide();//Hide any "load more" button. jq(".activity li.load-more").removeClass('loading');//Theme authors, you may need to change #content to the id of your container here, too. //Update cookie... jq.cookie( 'bp-activity-oldestpage', oldest_page, { path: '/' } ); //and append the response. jq(".activity ul.activity-list").append(response.contents); //Since the request is complete, let us reset is_activity_loading to false, so we'll be ready to run the routine again. is_activity_loading=false; }, 'json' ); return false; } });//end of dom ready
November 30, 2014 at 20:58 in reply to: bp activity loader plugin install needs container info to work #37161NormanParticipantis change to this. still not working
COPY CODE/** * Please note, this plugin requires the jQuery cookie plugin, which comes bundled with the bp-default theme and many BuddyPress themes. * If you theme does not include it it, please copy it from bp-default/_inc/global.js and paste in your js file **/ jQuery(document).ready( function() { var jq=jQuery; var is_activity_loading=false;//We'll use this variable to make sure we don't send the request again and again. //Check the window scroll event. jq(window).scroll(function() { //Find the visible "load more" button. //since BP does not remove the "load more" button, we need to find the last one that is visible. var load_more_btn=jq(".load-more:visible"); //If there is no visible "load more" button, we've reached the last page of the activity stream. if(!load_more_btn.get(0)) return; //Find the offset of the button. var pos=load_more_btn.offset(); //If the window height+scrollTop is greater than the top offset of the "load more" button, we have scrolled to the button's position. Let us load more activity. if(jq(window).scrollTop() + jq(window).height() > pos.top ) { load_more_activity(); } }); /** * This routine loads more activity. * We call it whenever we reach the bottom of the activity listing. * */ function load_more_activity(){ //Check if activity is loading, which means another request is already doing this. //If yes, just return and let the other request handle it. if(is_activity_loading) return false; //So, it is a new request, let us set the var to true. is_activity_loading=true; //Add loading class to "load more" button. //Theme authors may need to change the selector if their theme uses a different id for the content container. //This is designed to work with the structure of bp-default/derivative themes. //Change #content to whatever you have named the content container in your theme. jq("#.activity li.load-more").addClass('loading'); if ( null == jq.cookie('bp-activity-oldestpage') ) jq.cookie('bp-activity-oldestpage', 1, { path: '/' } ); var oldest_page = ( jq.cookie('bp-activity-oldestpage') * 1 ) + 1; //Send the ajax request. jq.post( ajaxurl, { action: 'activity_get_older_updates', 'cookie': encodeURIComponent(document.cookie), 'page': oldest_page }, function(response) { jq(".load-more").hide();//Hide any "load more" button. jq("#.activity li.load-more").removeClass('loading');//Theme authors, you may need to change #content to the id of your container here, too. //Update cookie... jq.cookie( 'bp-activity-oldestpage', oldest_page, { path: '/' } ); //and append the response. jq("#.activity ul.activity-list").append(response.contents); //Since the request is complete, let us reset is_activity_loading to false, so we'll be ready to run the routine again. is_activity_loading=false; }, 'json' ); return false; } });//end of dom ready
November 30, 2014 at 20:07 in reply to: bp activity loader plugin install needs container info to work #37148NormanParticipantCOPY CODE/** * Please note, this plugin requires the jQuery cookie plugin, which comes bundled with the bp-default theme and many BuddyPress themes. * If you theme does not include it it, please copy it from bp-default/_inc/global.js and paste in your js file **/ jQuery(document).ready( function() { var jq=jQuery; var is_activity_loading=false;//We'll use this variable to make sure we don't send the request again and again. //Check the window scroll event. jq(window).scroll(function() { //Find the visible "load more" button. //since BP does not remove the "load more" button, we need to find the last one that is visible. var load_more_btn=jq(".load-more:visible"); //If there is no visible "load more" button, we've reached the last page of the activity stream. if(!load_more_btn.get(0)) return; //Find the offset of the button. var pos=load_more_btn.offset(); //If the window height+scrollTop is greater than the top offset of the "load more" button, we have scrolled to the button's position. Let us load more activity. if(jq(window).scrollTop() + jq(window).height() > pos.top ) { load_more_activity(); } }); /** * This routine loads more activity. * We call it whenever we reach the bottom of the activity listing. * */ function load_more_activity(){ //Check if activity is loading, which means another request is already doing this. //If yes, just return and let the other request handle it. if(is_activity_loading) return false; //So, it is a new request, let us set the var to true. is_activity_loading=true; //Add loading class to "load more" button. //Theme authors may need to change the selector if their theme uses a different id for the content container. //This is designed to work with the structure of bp-default/derivative themes. //Change #content to whatever you have named the content container in your theme. jq("#activity-stream li.load-more").addClass('activity'); if ( null == jq.cookie('bp-activity-oldestpage') ) jq.cookie('bp-activity-oldestpage', 1, { path: '/' } ); var oldest_page = ( jq.cookie('bp-activity-oldestpage') * 1 ) + 1; //Send the ajax request. jq.post( ajaxurl, { action: 'activity_get_older_updates', 'cookie': encodeURIComponent(document.cookie), 'page': oldest_page }, function(response) { jq(".load-more").hide();//Hide any "load more" button. jq("#activity-stream li.load-more").removeClass('activity');//Theme authors, you may need to change #content to the id of your container here, too. //Update cookie... jq.cookie( 'bp-activity-oldestpage', oldest_page, { path: '/' } ); //and append the response. jq("#activity-stream ul.activity-list").append(response.contents); //Since the request is complete, let us reset is_activity_loading to false, so we'll be ready to run the routine again. is_activity_loading=false; }, 'json' ); return false; } });//end of dom ready
November 30, 2014 at 06:02 in reply to: bp activity loader plugin install needs container info to work #37081NormanParticipantCOPY CODE/** * Please note, this plugin requires the jQuery cookie plugin, which comes bundled with the bp-default theme and many BuddyPress themes. * If you theme does not include it it, please copy it from bp-default/_inc/global.js and paste in your js file **/ jQuery(document).ready( function() { var jq=jQuery; var is_activity_loading=false;//We'll use this variable to make sure we don't send the request again and again. //Check the window scroll event. jq(window).scroll(function() { //Find the visible "load more" button. //since BP does not remove the "load more" button, we need to find the last one that is visible. var load_more_btn=jq(".load-more:visible"); //If there is no visible "load more" button, we've reached the last page of the activity stream. if(!load_more_btn.get(0)) return; //Find the offset of the button. var pos=load_more_btn.offset(); //If the window height+scrollTop is greater than the top offset of the "load more" button, we have scrolled to the button's position. Let us load more activity. if(jq(window).scrollTop() + jq(window).height() > pos.top ) { load_more_activity(); } }); /** * This routine loads more activity. * We call it whenever we reach the bottom of the activity listing. * */ function load_more_activity(){ //Check if activity is loading, which means another request is already doing this. //If yes, just return and let the other request handle it. if(is_activity_loading) return false; //So, it is a new request, let us set the var to true. is_activity_loading=true; //Add loading class to "load more" button. //Theme authors may need to change the selector if their theme uses a different id for the content container. //This is designed to work with the structure of bp-default/derivative themes. //Change #content to whatever you have named the content container in your theme. jq(„#.content li.load-more").addClass('loading'); if ( null == jq.cookie('bp-activity-oldestpage') ) jq.cookie('bp-activity-oldestpage', 1, { path: '/' } ); var oldest_page = ( jq.cookie('bp-activity-oldestpage') * 1 ) + 1; //Send the ajax request. jq.post( ajaxurl, { action: 'activity_get_older_updates', 'cookie': encodeURIComponent(document.cookie), 'page': oldest_page }, function(response) { jq(".load-more").hide();//Hide any "load more" button. jq("#content li.load-more").removeClass('loading');//Theme authors, you may need to change #content to the id of your container here, too. //Update cookie... jq.cookie( 'bp-activity-oldestpage', oldest_page, { path: '/' } ); //and append the response. jq("#content ul.activity-list").append(response.contents); //Since the request is complete, let us reset is_activity_loading to false, so we'll be ready to run the routine again. is_activity_loading=false; }, 'json' ); return false; } });//end of dom ready
-
AuthorPosts
Viewing 10 posts - 1 through 10 (of 10 total)