Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 46 total)
  • @matt-mcfarland

    Participant

    “parent theme?” Can you try wordpress twentytwelve or bp default?

    @matt-mcfarland

    Participant

    Please submit a screenshot of WP-Dashboard -> Appearance -> Menus, BP Items should be in there.

    @matt-mcfarland

    Participant

    Hey,

    Does the tab work right on the default theme? If so, it’s your theme that is the issue and your theme author should have the skills necessary to fix this!

    @matt-mcfarland

    Participant

    Hi slyv,

    Would love to help, but not sure about a few things. What version of WP are you running, what version of BP are you running, what theme are you using, what plugins are you using. Please provide hyperlinks to the plugins and the theme (as names can be identical and difficult to track down)

    @matt-mcfarland

    Participant

    thanks for sharing slyviavie, is nice there is a plugin for this.

    @matt-mcfarland

    Participant

    @modemlooper – you need to also copy files over if bp-legacy is naturally not overwriting the wp theme properly. honestly wish that could be disabled.

    @matt-mcfarland

    Participant

    that is after login,

    to change home page, what are you using for your home page button?

    You’ll need to use is_user_logged_in() and output a different a href depending on the result. You’ll also want to hardcode the menu link into your template (ie: not use the wp nav menu for home buttons) take a look at header.php!

    hope this helps.

    @matt-mcfarland

    Participant

    drop the following into your functions.php file:

    
    function my_login_redirect(){
       return home_url().'/activity';
    
    }
    add_filter("login_redirect", "my_login_redirect", 10, 3);
    

    @matt-mcfarland

    Participant

    Wangguard worked for me for a while but spammers started slipping through the cracks. A great plugin (which you can use in conjunction with wanngguard) is recaptcha:

    https://wordpress.org/plugins/wp-recaptcha/

    It works with BP 1.9 and WP 3.8 (confirmed, using it, loving it)

    @matt-mcfarland

    Participant

    I am having the same issue. intuition tells me this is a JS issue. Currently tested on Chrome.

    Have left this issue (forgot about it) until I read this.

    Here’s a few troubleshooting things you could try:

    First the mundane things that should always be done when something isnt working right (lol):

    0. Try in all browsers – see if this is a browser issue or not, clear cache etc
    1. Try using buddypress default theme, see if it stops there then you know its something to do with your theme. (then we go from there)
    2. If still having the problem, try without all other plugins disabled – if it works now then you know it has something to do with a plugin.

    Haven’t really dug into this (too many other irons in the fire!!) but am curious about it, hope you get it resolved and will follow this thread.

    @matt-mcfarland

    Participant

    Hi there,

    I created my own theme and had to manually bp into it to get everything functioning properly.

    What you do is make a subfolder called buddypress in your theme directory.

    THen you want to copy /template/bp-legacy/* over to buddypress recursively.

    To change the CSS, you’ll want to copy or create a buddypress.css file and put it in the buddypress folder you made.

    hth

    @matt-mcfarland

    Participant

    @modemlooper
    cc @chouf1
    cc @henrywright-1

    I have figured out how to get this in the header, without hacking bp or running a custom sql query.

    So basically, what I did was create a function that loads the data by using global $bp, and a very powerful $bp function known as bp_activity_get

    Now that I’ve dissected your bp-activity-functions.php file the sky is the limit.

    Here’s a very small sample of this in action (mine also grabs rtmedia etc, now finally facebook will grab any images uploaded and all the content, finally)

    First, you want a function that is going to run in the <head> tag like so:

    add_action( 'wp_head', 'insert_fb_in_head', 5 );

    So it’s going to run in wp_head (yay) and it will be called ‘insert_fb_in_head’, priority lvl 5.

    You may also want to load bp_head() before you run wp_head() in your header.php file. I didn’t test it the other way around, just know this WORKS:

    So here comes the magic:

    
    function insert_fb_in_head() {
    
    	global $post;
    	global $bp;
    	
    	if (bp_is_current_component('activity') ) {
    		$title = "HVAC Hacks";
    		$description = "Here's Why You Choose a Professional";
    		$keywords = "hvac, hvac hacks, hvac hacks and other screw ups, hvac memes, hvac meme";
    		$domain = "HVAC-Hacks.com";
    		$image = $default_image;
    	
    		$activity_id = $bp->current_action;
    		if ($activity_id)  {
    			$get_act = bp_activity_get(array('in'=>$activity_id));
    				$activities = ($get_act['activities']);
    				foreach ($activities as $activity)  {
    					$description = strip_tags($activity->action);
    					$image = html_get_attr($activity->content, "img","src");
    				}
    			//HTML META
    			echo '<meta name="description" content="'.$description.'">';
    			echo '<meta name="keywords" content="'.$keywords.'">';
    			//FACEBOOK
    			echo '<meta property="og:title" content="' . $title . '"/>';
    			echo '<meta property="og:type" content="article"/>';
    			echo '<meta property="og:url" content="http://www.hvac-hacks.com'.$_SERVER['REQUEST_URI'].'"/>';
    			echo '<meta property="og:site_name" content="'.$title.'"/>';	
    			echo '<meta property="og:description" content="'.$description.'"/>';
    			echo '<meta property="og:image" content="' . $image  . '"/>';
    			//TWITTER
    			echo '	<meta name="twitter:card" content="photo">
    					<meta name="twitter:site" content="@hvachacks">
    					<meta name="twitter:creator" content="@hvachacks">
    					<meta name="twitter:title" content="'.$title.'">
    					<meta name="twitter:domain" content="www.hvac-hacks.com">
    					<meta name="twitter:image:src" content="'.$image.'">';
    			return;
    			}		
    	}
    

    Oh and here’s the proof: https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.hvac-hacks.com%2Fmembers%2Fgene-warren-391%2Factivity%2F4293%2F

    That’s facebook’s debugger tool telling me it grabbed all the necessary info…. yay… win..

    @matt-mcfarland

    Participant

    Thanks for your feedback! 😀

    I fixed the css issues you brought to my attention. Also fixed the number count (broke after updating to 1.9 beta, had to copy over legacy again to fix)

    As for only one image showing up in your activity feed that is strange, did you try editing entry.php?

    @matt-mcfarland

    Participant

    Hi there,

    If you are getting a blank page then you are trowing a php exception (error, most likely syntax error)

    Please take a look at your error logs. IT is most likely a plugin or theme conflict.

    @matt-mcfarland

    Participant

    Hi, and thanks for that chouf!


    @modemlooper
    why was bp made this way? seems to be bad engineering, despite it’s awesomeness. trust me when I say, it is a great web application. Just hate it’s architecture, to be blunt it’s highly limiting compared to wp. can’t grab outside loop? wth? Anyway love it though, love it.


    @danbp
    That really does help, I see how I can grab db info for the future.

    @matt-mcfarland

    Participant

    Can you tell me how to get the data by ID or via SQL?

    @matt-mcfarland

    Participant

    Or you could just make your own theme and throw in the php 😉

    The following tutorial changed my life forever and I’ll never look back to the days I used much of the dashboard page editor at all:
    The ThemeShaper WordPress Theme Tutorial: 2nd Edition

    @matt-mcfarland

    Participant

    Also just take a look at this: https://codex.wordpress.org/Function_Reference/wp_get_current_user;

    $current_user = wp_get_current_user();

    Then you can do:

    $current_user->user_login instead of wp_get_current_user()->user_login just in case. altho I think both would work.

    @matt-mcfarland

    Participant

    You’re putting that in the page itself? Yeah you have to use a php file.

    You could use hanacode plugin https://wordpress.org/plugins/hana-code-insert/ to insert php

    @matt-mcfarland

    Participant

    Great! the code I posted above should work then. I havent tested it but that will work if you’re using permalinks. becuase bp will do members/user_login/profile/ by default so you jsut need their user_login which you can ECHO out via the PHP using wordpress alone.

    @matt-mcfarland

    Participant

    If you just want to get a link to the current user that is logged in’s profile, and you’re using permalinks, this will work:

    <a href="/members/<?php echo wp_get_current_user()->user_login; ?>/profile/">
    //your html here
    </a>

    @matt-mcfarland

    Participant

    Hi there,

    IF you’re familiar with wp_nav_menu() (see wp codex) bp_nav_menu() behaves the same way, and that’s the easiest way, I”ve found, to customize it. I hope this helps

    @matt-mcfarland

    Participant

    You’re very welcome 🙂

    @matt-mcfarland

    Participant

    Latest version of BP works without using its theme. Works out of the box with themes that are using wp standards (like wp 2012)

    You need to read these docs:https://codex.buddypress.org/getting-started/

    @matt-mcfarland

    Participant

    You’re welcome! Hope they get it sorted for you quickly.

Viewing 25 replies - 1 through 25 (of 46 total)
Skip to toolbar