Forum Replies Created
-
Author
-
Rincon805Participant
Yeah, this code snippet didn’t work for me, either. It made the footer almost full width, but the row above it grew a little bit and the header stayed the same.
Thanks for the assist, though.
Rincon805ParticipantHey Sharmstr,
Yeah, I did that. Thought I had it working too. I’ve swapped out different categories and see that lil guy every time. Not sure what the deal is.
Any thoughts appreciated. Not sure I’ll keep it around – might go to a different home page model, but thought I’d investigate reasons why.Thanks,
Rincon805ParticipantWow. that’s awesome/embarrassing.
Thank you! Where is the limiting # to display portfolio items?
-H
Rincon805ParticipantRIghton. Thanks, all. I thought there might be some icon source I could pull from.
Rincon805ParticipantHi Laura,
Thanks for this. I’ll bet that it probably will, but I was wondering if anyone knew how to trigger the javascript function of that plugin by way of adding a little icon that would look the same to the “Share This” icons that Kleo uses.Sortof a long shot, but thought I’d ask.
Thanks,Rincon805ParticipantCool. Can we link to the popup with a button? When I try it takes me to a separate page, not the popup.
Rincon805ParticipantThanks for that, Abe. Is the autoplay the default option for video hosted on our own server – b/c I wasn’t seeing that functionality.
Thanks
Rincon805ParticipantOk, so I don’t think I’m explaining myself adequately. Please see attached screensnaps. I have a boxed layout. I’m wanting to have my homepage be full width, however. Right now, when I put any shortcode into the Header Box, the limits are still defined by the “box” layout. Is it at all possible to have the rest of the site be “boxed” but have the homepage be full-width? If so, how do I accomplish this?
Thanks,
-HAttachments:
You must be logged in to view attached files.Rincon805ParticipantGotcha. Thanks.
I don’t want a slider in there, however. I’m looking to auto-play a movie. How do I go about setting a hosted movie to autoplay?
Thanks,
-HRincon805ParticipantHeya.
I appreciate the feedback, but there’s no full width shortcode option – that IS available, though, right?
Thanks,
Rincon805ParticipantSorry to piggyback here, but @sharmstr, if I may, how did you manage to get the video header to span full width and autoplay?
Thanks,
Rincon805ParticipantTo all those that are interested, here’s how I got the redirect working. I set the default component to be the activity page. Now all I have to do is figure out how to add a submenu item that calls all activity….
This was put into bp-custom.php
<?php
/*Make sure profile is default component*/
define(‘BP_DEFAULT_COMPONENT’,’activity’);/*let us filter where to redirect */
add_filter(“login_redirect”,”bpdev_redirect_to_profile”,10,3);function bpdev_redirect_to_profile($redirect_to_calculated,$redirect_url_specified,$user)
{
if(empty($redirect_to_calculated))
$redirect_to_calculated=admin_url();/*if the user is not site admin,redirect to his/her profile*/
if(!is_site_admin($user->user_login))
return bp_core_get_user_domain($user->ID );
else
return $redirect_to_calculated; /*if site admin or not logged in,do not do anything much*/}
add_filter(‘logout_url’,”bpdev_logout_url”,100,2);
function bpdev_logout_url( $logout_url, $redirect) {
//simply ignore the redirect and set it to the main domain
//let us check for buddyopress,if yes,let us get the bp root domain right ?
if(function_exists(“bp_core_get_root_domain”))
$redirect=bp_core_get_root_domain();
else
$redirect = get_blog_option( SITE_ID_CURRENT_SITE, ‘siteurl’ );$args = array( ‘action’ => ‘logout’ );
if ( !empty($redirect) ) {
$args[‘redirect_to’] = $redirect;
}$logout_url = add_query_arg($args, site_url(‘wp-login.php’, ‘login’));
$logout_url = wp_nonce_url( $logout_url, ‘log-out’ );return $logout_url;
}
?>Rincon805ParticipantSweet! Does anybody have a link that will show me what shortcodes are available? Specifically a full width shortcode?
Thanks
Rincon805ParticipantI found IfMenu (https://wordpress.org/plugins/if-menu/) but upon activation it displays that there’s another plugin that manages menu items so it disables Ifmenu.
I’d be curious to hear what other plugins affect the menu option to make the decision on whether or not we need them. Custom menu visibility would be amazing.
Rincon805ParticipantAlso, how would i go about changing the FB login to be the member’s profile – not just a static page?
Thanks,
Rincon805ParticipantHmm… it appears that the FB redirect works well, but I can’t get the regular login to redirect me.
Here’s the code I’m using:
<?php
/**
* @package WordPress
* @subpackage Kleo
* @author SeventhQueen <themesupport@seventhqueen.com>
* @since Kleo 1.0
*//**
* Kleo Child Theme Functions
* Add custom code below
*/
function kleo_ajax_login()
{
// Check the nonce, if it fails the function will break
check_ajax_referer( ‘kleo-ajax-login-nonce’, ‘security’ );// Nonce is checked, continue
$secure_cookie = ”;// If the user wants ssl but the session is not ssl, force a secure cookie.
if ( !empty($_POST[‘log’]) && !force_ssl_admin() ) {
$user_name = sanitize_user($_POST[‘log’]);
if ( $user = get_user_by(‘login’, $user_name) ) {
if ( get_user_option(‘use_ssl’, $user->ID) ) {
$secure_cookie = true;
force_ssl_admin(true);
}
}
}if ( isset( $_REQUEST[‘redirect_to’] ) ) {
$redirect_to = $_REQUEST[‘redirect_to’];
// Redirect to https if user wants ssl
if ( $secure_cookie && false !== strpos($redirect_to, ‘wp-admin’) )
$redirect_to = preg_replace(‘|^http://|’, ‘https://’, $redirect_to);
} else {
$redirect_to = ”;
}$user_signon = wp_signon( ”, $secure_cookie );
if ( is_wp_error( $user_signon ) ){
$error_msg = $user_signon->get_error_message();
echo json_encode(array( ‘loggedin’ => false, ‘message’ => ‘<span class=”wrong-response”><i class=”icon icon-attention”></i> ‘ . $error_msg . ‘</span>’ ));
//echo json_encode(array( ‘loggedin’ => false, ‘message’ => ‘<span class=”wrong-response”><i class=”icon icon-attention”></i> ‘ . __( ‘Wrong username or password. Please try again.’, ‘kleo_framework’ ) . ‘</span>’ ));
} else {
if ( sq_option( ‘login_redirect’ , ‘default’ ) == ‘reload’ ) {
$redirecturl = apply_filters( ‘kleo_modal_login_redirect’, ‘/’ . BP_MEMBERS_SLUG . ‘/’ . $_POST[‘log’], ”,}
else {
$requested_redirect_to = isset( $_REQUEST[‘redirect_to’] ) ? $_REQUEST[‘redirect_to’] : ”;
/**
* Filter the login redirect URL.
*
* @since 3.0.0
*
* @param string $redirect_to The redirect destination URL.
* @param string $requested_redirect_to The requested redirect destination URL passed as a parameter.
* @param WP_User|WP_Error $user WP_User object if login was successful, WP_Error object otherwise.
*/
$redirecturl = apply_filters( ‘login_redirect’, $redirect_to, $requested_redirect_to, $user_signon );}
echo json_encode(array(‘loggedin’=>true, ‘redirecturl’ => $redirecturl, ‘message’=> ‘<span class=”good-response”><i class=”icon icon-ok-circled”></i> ‘ . __( ‘Login successful, redirecting…’,’kleo_framework’ ) . ‘</span>’ ));
}die();
}Rincon805ParticipantHey Sharmstr,
Thanks for the assist (again), but I’m not sure that i’m understanding you correctly. I implemented the code off your post, but upon login I’m not getting redirect.This is what I entered into my child theme’s functions.php
function kleo_ajax_login()
{
// Check the nonce, if it fails the function will break
check_ajax_referer( ‘kleo-ajax-login-nonce’, ‘security’ );// Nonce is checked, get the POST data and sign in user
$info = array();
$info[‘user_login’] = $_POST[‘log’];
$info[‘user_password’] = $_POST[‘pwd’];
$info[‘remember’] = (isset( $_POST[‘remember’] ) && $_POST[‘remember’] === true) ? true : false ;$info = apply_filters(‘kleo_ajaxlogin_atts’, $info);
$user_signon = wp_signon( $info, false );
if ( is_wp_error( $user_signon ) ){
$error_msg = $user_signon->get_error_message();
echo json_encode(array( ‘loggedin’ => false, ‘message’ => ‘<span class=”wrong-response”><i class=”icon icon-attention”></i> ‘ . $error_msg . ‘</span>’ ));
//echo json_encode(array( ‘loggedin’ => false, ‘message’ => ‘<span class=”wrong-response”><i class=”icon icon-attention”></i> ‘ . __( ‘Wrong username or password. Please try again.’, ‘kleo_framework’ ) . ‘</span>’ ));
} else {
if ( sq_option( ‘login_redirect’ , ‘default’ ) == ‘reload’ ) {
$redirecturl = apply_filters( ‘kleo_modal_login_redirect’, ‘/activity/’, ”, $user_signon );
}
else {
$redirecturl = apply_filters( ‘kleo_modal_login_redirect’, ‘/’ . BP_MEMBERS_SLUG . ‘/’ . $info[‘user_login’], ”, $user_signon );
}echo json_encode(array(‘loggedin’=>true, ‘redirecturl’ => $redirecturl, ‘message’=> ‘<span class=”good-response”><i class=”icon icon-ok-circled”></i> ‘ . __( ‘Login successful, redirecting…’,’kleo_framework’ ) . ‘</span>’ ));
}die();
}Thanks,
Rincon805ParticipantHi Andrei,
Thanks for the reply and thanks for the update. I’m wondering if it’s at all possible to put an iframe into a “portfolio” post and have it render like the other pre-defined portfolio options on the front end. The other predefined items (hosted video, image, slider, etc) render on the front end in a nice grid layout displaying an image. I’m asking if I can use an iframe and achieve the same effect (the iframe is then called instead of the featured image/slide/etc).Does that make sense?
Thanks,
Rincon805ParticipantSorted it – I think. My guess is that it had something to do with my categories being named the same as the page title.
Thanks,
-HRincon805ParticipantI guess another way to ask this is: is it possible to use the portfolio’s “top bar” feature to sort items with the “regular” posts with iframe content?
Rincon805ParticipantWell, I never heard back from them, but did some digging on their support forum found that if you go to this file:
buddyPress-activity-plus/lib/class_bpfb_binder.php
and on line 340, edit this: if (
to this:
if (
true
||things work the way they should. Thanks again for the assist, sharmstr!
Rincon805Participant+1 sharmstr. Thanks again. I’ve asked and am awaiting a reply. I appreciate the head’s up.
Rincon805ParticipantHi Andrei,
Thanks for the assistance. I thought the same thing, but if you’ll notice, the activity plus is hooked onto the Group Page AND the Activity page (http://col.thelaw.agency/activity/), but not the homepage with the “activity page” module. For some reason the module isn’t pulling the default “activity” is my guess. Maybe I’m wrong, though.
Thanks again,
-
AuthorPosts