Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'custom activity page'

Viewing 25 results - 776 through 800 (of 831 total)
  • Author
    Search Results
  • #66217
    Tim Nicholson
    Participant

    Ok, here’s where I’m at so far. I found out what BP uses to determine if a WP user is a BP user. There is NOT a separate table for BP users. A WP user is considered a BP user if that user has performed ANY “activity”. The BP Members page displays ONLY users that have done something in BP.

    For example, when a new user registers, an activity is created saying that user registered. The standard WP user meta table (wp_usermeta) gets a record added for that User ID called “last_activity” and the meta value is the current date and time. Once a user has a last_activity record, then they are displayed in the BP Member directory. You’ll notice that in the Member directory it shows the total users, which should be your total number of WP users, but it also says “Viewing member 1 to x (of x active members”.

    I have verified this by manually adding a record to the user meta table for one of my users that registered before I was running BP. That person now shows in the BP member directory.

    Now I also see code in BP that attempts to update (or create if not found) the user’s last_activity meta record every 5 minutes while they are logged in. This is so that BP can show how long ago a particular user was “active” for various pages and widgets. I tested this by logging in as another WP user (non-BP user) and it added the record and now displays that person in the list. It also seems to have added that user’s full name in the BP custom profile field table (wp_bp_xprofile_data).

    So without doing ANYTHING, our BP member directory will grow as users log in to our site. This probably isn’t a bad thing because if there are users that registered a long time ago for some reason and don’t plan on ever coming back, why list them in the directory?

    However, I may still go ahead and try to figure out the best way to programatically add records for all the WP users. My site is new and since I only have 221 users, I’d like to have them added to BP, if for no other reason than for better testing of the plugin before I roll it out. I currently have BP activated, but have hidden all the menus so user’s don’t really know how to get to any of it. My site is at http://xtremelysocial.com if you want to check it out. Just go directly to a BP URL, such as http://xtremelysocial.com/activity/. I’m jacking around with adding BP support to my highly customized WP theme right now so if the formatting looks whacky, that’s why.

    I’ll post an update if I work something out programatically to add all the WP users to the BP member directory.

    #66170
    Carl Chapman
    Member

    Ray – thanks for the input. I managed to get that far myself (after trying every other combination) and seein another of your posts. Very helpful.

    My remaining problem is this, everything is redirected to the ‘home’ page of the blog.

    1. Which version of WP/MU are you running?

    WP 2.9.2

    2. Did you install WP/MU as a directory or subdomain install?

    directory

    3. If a directory install, is it in root or in a subdirectory?

    sub-directory

    4. Did you upgraded from a previous version of WP/MU? If so, from which version?

    no, not on MU

    5. Was WP/MU functioning properly before installing/upgrading BuddyPress (BP)? e.g. permalinks, creating a new post, commenting.

    yes

    6. Which version of BP are you running?

    plugin – Version 1.2.1

    7. Did you upgraded from a previous version of BP? If so, from which version?

    no – fresh install

    8. Do you have any plugins other than BuddyPress installed and activated?

    yes, but it doesn’t matter, I deactivated every plugin except Buddy Press, same behavior

    9. Are you using the standard BuddyPress themes or customized themes?

    I have tried using custom themes as well as the default BuddyPress themes

    10. Have you modified the core files in any way?

    no

    11. Do you have any custom functions in bp-custom.php?

    no

    12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in?

    it came with it built in, but I haven’t turned it one yet…

    13. Please provide a list of any errors in your server’s log files.

    no errors

    14. Which company provides your hosting?

    HostGator

    I have installed BuddyPress in a development environment so that I can test its functionality. It is located at this address http://www.irreia.org/dev (which is a copy of my live blog.

    I can successfully navigate to the several pages that are created by BuddyPress:

    http://internationalresidentialrealestateinvestorsassociation.org/dev/activity/

    http://internationalresidentialrealestateinvestorsassociation.org/dev/groups/

    http://internationalresidentialrealestateinvestorsassociation.org/dev/members/

    But if I try to use the admin bar, I can’t get to any page – all pages are redirected to the ‘home’ page of the blog.

    I have two members Admin and Carl Chapman, who show up as listed on the main member page, but the hyperlinks to their individual pages are redirected to the ‘home’ page of the blog.

    It is the same for any other ‘sub-page’… all are redirected to the ‘home’ page of the blog.

    I’m completely stumped. What am I doing wrong? What’s happening and how do I fix it?

    Carl Chapman
    Member

    I think I am having the same problem or at lease very similar.

    1. Which version of WP/MU are you running?

    WP 2.9.2

    2. Did you install WP/MU as a directory or subdomain install?

    directory

    3. If a directory install, is it in root or in a subdirectory?

    sub-directory

    4. Did you upgraded from a previous version of WP/MU? If so, from which version?

    no, not on MU

    5. Was WP/MU functioning properly before installing/upgrading BuddyPress (BP)? e.g. permalinks, creating a new post, commenting.

    yes

    6. Which version of BP are you running?

    plugin – Version 1.2.1

    7. Did you upgraded from a previous version of BP? If so, from which version?

    no – fresh install

    8. Do you have any plugins other than BuddyPress installed and activated?

    yes, but it doesn’t matter, I deactivated every plugin except Buddy Press, same behavior

    9. Are you using the standard BuddyPress themes or customized themes?

    I have tried using custom themes as well as the default BuddyPress themes

    10. Have you modified the core files in any way?

    no

    11. Do you have any custom functions in bp-custom.php?

    no

    12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in?

    it came with it built in, but I haven’t turned it one yet…

    13. Please provide a list of any errors in your server’s log files.

    no errors

    14. Which company provides your hosting?

    HostGator

    I have installed BuddyPress in a development environment so that I can test its functionality. It is located at this address http://www.irreia.org/dev (which is a copy of my live blog.

    I can successfully navigate to the several pages that are created by BuddyPress:

    http://internationalresidentialrealestateinvestorsassociation.org/dev/activity/

    http://internationalresidentialrealestateinvestorsassociation.org/dev/groups/

    http://internationalresidentialrealestateinvestorsassociation.org/dev/members/

    But if I try to use the admin bar, I can’t get to any page – all pages are redirected to the ‘home’ page of the blog.

    I have two members Admin and Carl Chapman, who show up as listed on the main member page, but the hyperlinks to their individual pages are redirected to the ‘home’ page of the blog.

    It is the same for any other ‘sub-page’… all are redirected to the ‘home’ page of the blog.

    I’m completely stumped.What am I doing wrong? What’s happening and how do I fix it?

    rohit4all
    Participant

    My WPMU & BP is working fine. Even I am able to browse everything like forums, groups, activity with ease. I can create individual blogs as well & further I can post new topic. I am able to access those posts & blogs. But when I click on “Blog” icon on header I will get message like this

    “Page Not Found

    The page you were looking for was not found.”

    I changed nothing except in control panel for dns entry for a “/” for subdomain.

    1. Which version of WPMU are you running? WordPress MU 2.9.1.1

    2. Did you install WPMU as a directory or subdomain install? directory

    3. If a directory install, is it in root or in a subdirectory? subdirectory

    4. Did you upgrade from a previous version of WPMU? If so, from which version? fresh install

    5. Was WPMU functioning properly before installing/upgrading BuddyPress? Yes, sure it was i even created a blog and was reading the posts normally.

    6. Which version of BuddyPress (BP) are you running? BP1.2.1

    7. Did you upgrad from a previous version of BP? If so, from which version? No

    8. Do you have any plugins other than BuddyPress installed and activated? no

    9. Are you using the standard BuddyPress themes or customized themes? standard

    10. Have you modified the core files in any way? no

    11. Do you have any custom functions in bp-custom.php? no

    12. If running bbPress, which version? NO

    13. Please provide a list of any errors in your server’s log files.

    Please help me solve this, I have struggled a lot with it. Thank you!

    #66118
    pollycoke :)
    Participant

    Here’s how: in your /plugins/ directory, create a file called bp-custom.php with this content:

    <?php

    function bp_remove_comment_ac() { remove_action( ‘comment_post’, ‘bp_blogs_record_comment’, 10, 2 ); } add_action( ‘bp_init’, ‘bp_remove_comment_ac’ );

    ?>

    It works on blog comments posted after you do this.

    Many thanks to apeatling for the solution!

    #65979
    oracleappscommunity
    Participant

    Thanks david. I don’t want blog posts on home page as I use custom home page. In top navigation (home, activity, groups, forums etc), how to I add ‘Blog’ and clicking on the link would display blogposts. This is how it used to work in prior to 1.2 upgrade

    #65953
    David Lewis
    Participant

    You have to create a new WordPress Page called “Blog” and then go into “Settings > Reading” and switch the front page mode to static with the “Blog” page selected as your “Posts page”. I think it will use the index.php template. Do you have a custom homepage?

    #65932
    hotdvl666
    Member

    Thank you! You guys have been of great help.

    @Philip: I have done what you’ve said, exactly, but it seems like I can only make the code work if I edit header.php.

    Here’s the code I used (I adapted the method you used in your first reply and second reply):

    <?php if (is_user_logged_in()) { ?>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

    <head profile="http://gmpg.org/xfn/11">

    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    <title><?php bp_page_title() ?></title>

    <?php do_action( 'bp_head' ) ?>

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

    <?php if ( function_exists( 'bp_sitewide_activity_feed_link' ) ) : ?>

    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php _e('Site Wide Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_sitewide_activity_feed_link() ?>" />

    <?php endif; ?>

    <?php if ( function_exists( 'bp_member_activity_feed_link' ) && bp_is_member() ) : ?>

    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php bp_displayed_user_fullname() ?> | <?php _e( 'Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_member_activity_feed_link() ?>" />

    <?php endif; ?>

    <?php if ( function_exists( 'bp_group_activity_feed_link' ) && bp_is_group() ) : ?>

    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php bp_current_group_name() ?> | <?php _e( 'Group Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_group_activity_feed_link() ?>" />

    <?php endif; ?>

    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> <?php _e( 'Blog Posts RSS Feed', 'buddypress' ) ?>" href="<?php bloginfo('rss2_url'); ?>" />

    <link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> <?php _e( 'Blog Posts Atom Feed', 'buddypress' ) ?>" href="<?php bloginfo('atom_url'); ?>" />

    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

    <?php wp_head(); ?>

    </head>

    <body <?php body_class() ?> id="bp-default">

    <?php do_action( 'bp_before_header' ) ?>

    <div id="header">

    <h1 id="logo">" title="<?php _e( 'Home', 'buddypress' ) ?>"><?php bp_site_name() ?></h1>

    <ul id="nav">

    <li<?php if ( bp_is_front_page() ) : ?> class="selected"<?php endif; ?>>

    " title="<?php _e( 'Home', 'buddypress' ) ?>"><?php _e( 'Home', 'buddypress' ) ?>

    <?php if ( 'activity' != bp_dtheme_page_on_front() && bp_is_active( 'activity' ) ) : ?>

    <li<?php if ( bp_is_page( BP_ACTIVITY_SLUG ) ) : ?> class="selected"<?php endif; ?>>

    /<?php echo BP_ACTIVITY_SLUG ?>/" title="<?php _e( 'Activity', 'buddypress' ) ?>"><?php _e( 'Activity', 'buddypress' ) ?>

    <?php endif; ?>

    <li<?php if ( bp_is_page( BP_MEMBERS_SLUG ) || bp_is_member() ) : ?> class="selected"<?php endif; ?>>

    /<?php echo BP_MEMBERS_SLUG ?>/" title="<?php _e( 'Members', 'buddypress' ) ?>"><?php _e( 'Members', 'buddypress' ) ?>

    <?php if ( bp_is_active( 'groups' ) ) : ?>

    <li<?php if ( bp_is_page( BP_GROUPS_SLUG ) || bp_is_group() ) : ?> class="selected"<?php endif; ?>>

    /<?php echo BP_GROUPS_SLUG ?>/" title="<?php _e( 'Groups', 'buddypress' ) ?>"><?php _e( 'Groups', 'buddypress' ) ?>

    <?php if ( bp_is_active( 'forums' ) && bp_is_active( 'groups' ) && ( function_exists( 'bp_forums_is_installed_correctly' ) && !(int) bp_get_option( 'bp-disable-forum-directory' ) ) && bp_forums_is_installed_correctly() ) : ?>

    <li<?php if ( bp_is_page( BP_FORUMS_SLUG ) ) : ?> class="selected"<?php endif; ?>>

    /<?php echo BP_FORUMS_SLUG ?>/" title="<?php _e( 'Forums', 'buddypress' ) ?>"><?php _e( 'Forums', 'buddypress' ) ?>

    <?php endif; ?>

    <?php endif; ?>

    <?php if ( bp_is_active( 'blogs' ) && bp_core_is_multisite() ) : ?>

    <li<?php if ( bp_is_page( BP_BLOGS_SLUG ) ) : ?> class="selected"<?php endif; ?>>

    /<?php echo BP_BLOGS_SLUG ?>/" title="<?php _e( 'Blogs', 'buddypress' ) ?>"><?php _e( 'Blogs', 'buddypress' ) ?>

    <?php endif; ?>

    <!--<?php wp_list_pages( 'title_li=&depth=1&exclude=' . bp_dtheme_page_on_front() ); ?>-->

  • Back to The 7th Zone »
  • <?php do_action( 'bp_nav_items' ); ?>

    <!-- #nav -->

    <div id="search-bar">

    <div class="padder">

    <form action="<?php echo bp_search_form_action() ?>" method="post" id="search-form">

    <input type="text" id="search-terms" name="search-terms" value="" />

    <?php echo bp_search_form_type_select() ?>

    <input type="submit" name="search-submit" id="search-submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />

    <?php wp_nonce_field( 'bp_search_form' ) ?>

    </form><!-- #search-form -->

    <?php do_action( 'bp_search_login_bar' ) ?>

    </div><!-- .padder -->

    </div><!-- #search-bar -->

    <?php do_action( 'bp_header' ) ?>

    </div><!-- #header -->

    <?php do_action( 'bp_after_header' ) ?>

    <?php do_action( 'bp_before_container' ) ?>

    <center>Network: The 7th Zone :: Home | Grand Theft Auto HQ | Hot Devil 666's HQ | Silent Fiona's HQ

    </center><p>

    <div id="container">

    <?php } else { ?>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

    <head profile="http://gmpg.org/xfn/11">

    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    <title><?php bp_page_title() ?></title>

    <?php do_action( 'bp_head' ) ?>

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

    <?php if ( function_exists( 'bp_sitewide_activity_feed_link' ) ) : ?>

    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php _e('Site Wide Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_sitewide_activity_feed_link() ?>" />

    <?php endif; ?>

    <?php if ( function_exists( 'bp_member_activity_feed_link' ) && bp_is_member() ) : ?>

    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php bp_displayed_user_fullname() ?> | <?php _e( 'Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_member_activity_feed_link() ?>" />

    <?php endif; ?>

    <?php if ( function_exists( 'bp_group_activity_feed_link' ) && bp_is_group() ) : ?>

    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php bp_current_group_name() ?> | <?php _e( 'Group Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_group_activity_feed_link() ?>" />

    <?php endif; ?>

    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> <?php _e( 'Blog Posts RSS Feed', 'buddypress' ) ?>" href="<?php bloginfo('rss2_url'); ?>" />

    <link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> <?php _e( 'Blog Posts Atom Feed', 'buddypress' ) ?>" href="<?php bloginfo('atom_url'); ?>" />

    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

    <?php wp_head(); ?>

    </head>

    <body <?php body_class() ?> id="bp-default">

    <?php do_action( 'bp_before_header' ) ?>

    <div id="header">

    <h1 id="logo">" title="<?php _e( 'Home', 'buddypress' ) ?>"><?php bp_site_name() ?></h1>

    <ul id="nav">

    <li<?php if ( bp_is_front_page() ) : ?> class="selected"<?php endif; ?>>

    " title="<?php _e( 'Home', 'buddypress' ) ?>"><?php _e( 'Home', 'buddypress' ) ?>

    <?php if ( 'activity' != bp_dtheme_page_on_front() && bp_is_active( 'activity' ) ) : ?>

    <li<?php if ( bp_is_page( BP_ACTIVITY_SLUG ) ) : ?> class="selected"<?php endif; ?>>

    /<?php echo BP_ACTIVITY_SLUG ?>/" title="<?php _e( 'Activity', 'buddypress' ) ?>"><?php _e( 'Activity', 'buddypress' ) ?>

    <?php endif; ?>

    <li<?php if ( bp_is_page( BP_MEMBERS_SLUG ) || bp_is_member() ) : ?> class="selected"<?php endif; ?>>

    /<?php echo BP_MEMBERS_SLUG ?>/" title="<?php _e( 'Members', 'buddypress' ) ?>"><?php _e( 'Members', 'buddypress' ) ?>

    <?php if ( bp_is_active( 'groups' ) ) : ?>

    <li<?php if ( bp_is_page( BP_GROUPS_SLUG ) || bp_is_group() ) : ?> class="selected"<?php endif; ?>>

    /<?php echo BP_GROUPS_SLUG ?>/" title="<?php _e( 'Groups', 'buddypress' ) ?>"><?php _e( 'Groups', 'buddypress' ) ?>

    <?php if ( bp_is_active( 'forums' ) && bp_is_active( 'groups' ) && ( function_exists( 'bp_forums_is_installed_correctly' ) && !(int) bp_get_option( 'bp-disable-forum-directory' ) ) && bp_forums_is_installed_correctly() ) : ?>

    <li<?php if ( bp_is_page( BP_FORUMS_SLUG ) ) : ?> class="selected"<?php endif; ?>>

    /<?php echo BP_FORUMS_SLUG ?>/" title="<?php _e( 'Forums', 'buddypress' ) ?>"><?php _e( 'Forums', 'buddypress' ) ?>

    <?php endif; ?>

    <?php endif; ?>

    <?php if ( bp_is_active( 'blogs' ) && bp_core_is_multisite() ) : ?>

    <li<?php if ( bp_is_page( BP_BLOGS_SLUG ) ) : ?> class="selected"<?php endif; ?>>

    /<?php echo BP_BLOGS_SLUG ?>/" title="<?php _e( 'Blogs', 'buddypress' ) ?>"><?php _e( 'Blogs', 'buddypress' ) ?>

    <?php endif; ?>

    <!--<?php wp_list_pages( 'title_li=&depth=1&exclude=' . bp_dtheme_page_on_front() ); ?>-->

  • Back to The 7th Zone »
  • <?php do_action( 'bp_nav_items' ); ?>

    <!-- #nav -->

    <div id="search-bar">

    <div class="padder">

    <form action="<?php echo bp_search_form_action() ?>" method="post" id="search-form">

    <input type="text" id="search-terms" name="search-terms" value="" />

    <?php echo bp_search_form_type_select() ?>

    <input type="submit" name="search-submit" id="search-submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />

    <?php wp_nonce_field( 'bp_search_form' ) ?>

    </form><!-- #search-form -->

    <?php do_action( 'bp_search_login_bar' ) ?>

    </div><!-- .padder -->

    </div><!-- #search-bar -->

    <?php do_action( 'bp_header' ) ?>

    </div><!-- #header -->

    <center>Network: The 7th Zone :: Home | Grand Theft Auto HQ | Hot Devil 666's HQ | Silent Fiona's HQ

    </center><p>

    <div id="container">

    <div id="content">

    <div class="padder">

    <div class="page" id="blog-page">

    <h2 class="pagetitle">Welcome to the party!</h2>

    <div class="post" id="post-68">

    <div class="entry">

    <p>Social networking at The 7th Zone is like partying! …and more! Joining in the fun at The 7th Zone is nothing like you’ve experienced on Facebook, MySpace, or any major social networking sites! Akin to a crazed, wild college party, The 7th Zone is where fun-loving youths, as well as video game enthusiasts and tech geeks can hang out!</p>

    <p>Staying up late to snag that cool-sounding medal in Halo 3, or piloting that Annihilator helicopter in Grand Theft Auto IV’s Free Mode? Fancy that VAIO Z laptop, or are you going nuts over a MacBook Pro refresh? Think the iPad is gimmicky and expected so much more? Prefer metal over the Jonas brothers, and classic Hip Hop over auto-tuned sh*t? This site is for you, the cool kid!</p>

    <p>Right here at The 7th Zone Community, you can create your own free blogs. With 500 MB of upload space, a feature-packed plugins set, and 117 beautiful themes, just how much more can you get for $0? More details here.</p>

    <p>Join us now. Registration is as easy as a few clicks! Hit the jump below to register yourself!</p>

    <div align="right">

    <h2>Register Me! »</h2>

    </div>

    <p>Edit this entry.</p>

    </div>

    </div>

    </div><!-- .page -->

    <?php do_action( 'bp_after_blog_page' ) ?>

    </div><!-- .padder -->

    </div><!-- #content -->

    <?php locate_template( array( 'sidebar.php' ), true ) ?>

    <?php get_footer(); ?>

    <?php } ?>

    For some reason, my site still displays whatever page I’m on for non-logged in users, and it does so after the footer for the else case. I have no clue what I did wrong. I have no experience in PHP code, but it looks fine to me. Is there an error I made somewhere?

    It also seems that if I set the activity stream to be the home page, the custom home page title that I’ve set in the All-in-One SEO pack doesn’t seem to take effect too. If I want to show logged in users the activity stream as the home page, with my custom home page title, how do I go about doing that?

    Thanks.

#65919
Mariusooms
Participant

@Avi M I have not tested it with sub-domains sadly. I will see if I can get a test environment for that as well. If anyone else can chime in on subdomains issues, feel free.

@Mike Thanks…let me know what could be useful to add. Group activity streams will come, but I’m not sure how exactly yet. Therefore I included a custom groupblog activity loop on the group blog page.

#65814
nickrita
Participant

Similar question here. I want to see New Blog posts as default.

I already read this: https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/

but it doesn’t help, becaus there is not one example for the complete code, only the snippets.

#65237
sawyerh
Participant

Hi Guys,

Still haven’t been able to find a solution to this problem and would love to figure this out.

Here’s an update on the what’s working and what is not:

The initial problem was the username wasn’t being displayed at the end of the member’s links which was causing the links to redirect to the homepage. This problem was sitewide EXCEPT when on the forum topics (weird). By adding define( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE', true ); to /wp-content/plugins/bp-custom.php, I was able to get the username to display at the end of the member’s links inside the Member’s list, but by doing so, it is now causing the problem to occur on member’s links on forum topics. The problem is also still occurring in the activity streams.

Any help?

Thanks!

#64767
Hugo Ashmore
Participant

Oh dear not the response I was hoping for :-)

So it is an issue and frankly a horrendous one, blogs are offered to users as fully functioning ones.

Sadly it’s not necessarily a straightforward matter to upgrade, at the moment I would have to run the backwards-compatibility plugin as I have got the community up and running based on a child theme overriding bp-sn file where necessary, in tests on local dev install upgrade to 1.2 I had to do a fair bit of work to get the existing theme running again and to rework styles to accommodate the new activity stream layout.

Thanks for the quick response though DJPaul I have to now figure how we proceed as too many aspects of the 1.x are demonstrating problems and I’m beginning to wish we had been able to wait for 1.2 to be released.

One point of interest though on another of the many test installs I keep running and one that I have kept pretty close to the production site in plugins and customizations this issue doesn’t arise and I can create pages quite happily so this can’t simply be a inherent BP issue but triggered by some action or plugin but don’t see what at this stage.

#64719
@mercime
Participant

@Michaelmarian, For the Members subsection, easiest way is as Boone Gorges mentioned using body classes: e.g. Member’s Profile page use selector body.profile; Member’s Blog Page use selector body.my-blogs; Member’s Message Page use selector body.messages; etc.

However, if you still want to use conditional statements see

https://codex.buddypress.org/developer-docs/conditional-template-tags/

Thing is, locate_template array did not work for me in all the different incarnations of custom child themes I made before so this method might help you too

<?php
if (bp_is_profile_component()) {
include ('mystuff1.php');
}
elseif (bp_is_activity_component()) {
include ('mystuff2.php');
}
elseif (bp_is_friends_component()) {
include ('mystuff3.php');
}
else {
include ('mystuff4.php');
}
?>

– For more specificity you could probably add – && bp_is_page(‘members’) – or whatever slug you used

– Add wp_reset_query(); right after the opening <?php if this query is placed latter part of the page or add the reset just before ?> if placed near top of the page.

#64569

In reply to: Indexation of content

podictionary
Participant

Index and search are important related issues. A few points:

1) Database content search throughout needs serious thinking. How to include (and how to distinguish in results) blogposts, comments, activity updates, forums…

2) Indexing for search engines needs thought. What serious website doesn’t want to show up in Google?

3) A Google custom search is an option but shows up the problems of appearing in Google results; namely that scrolling activity lists result in indexes pointing to pages that no longer hold that content.

@nexia I see that at wordpress.com there is “search wordpress.com blogs” so MU can and does somehow allow for this.

#63961
/* Bounce user to their profile when logging in */
function custom_login_redirect_to_profile( $url, $isset, $user ) {
return bp_core_get_user_domain( $user->ID );
}
add_filter( 'login_redirect', 'custom_login_redirect_to_profile', 11, 3 );

You could also make a child theme of your own, and use home.php as members/single/activity.php. Or instead of using home.php, make a custom page template and assign that page as your front page.

#63924
lhnz
Participant

<?php bp_has_activities(‘per_page=25’);

while ( bp_activities() ) : bp_the_activity(); ?>

<div><?php bp_activity_content() ?></div>

<?php endwhile; ?>

This worked. Frankly the lack of documentation and my lack of time is making this a nightmare to code… :/

#63815
gregfielding
Participant

Great idea…think of the customization options that this could bring…

Logged in users could see activity from their friends, groups, blogs they “follow”, and even sitewide posts by certain category or tag.

Maybe there would be defaults where certain “top news” posts are displayed to everyone. (which would be incredible for my real estate site)

It could be like an igoogle page…

#63035
danbpfr
Participant

1 – manually, you have to rearrange the list order in header.php

how to do that ?

if you use 1.2 inspire you with this:

https://buddypress.org/forums/topic/bp-12-how-to-add-a-custom-tab-on-the-home-activity-section

3 – yes, and on each individual blog page too or by typing “wp-admin” at the end of your url: hxxp://exemple.com/wp-admin

#62835
_tomr
Participant

I did it! Jesus Christ, took me more than 4 hours to find that one line. It’s in activity-loop.php. Now, that was the easy part.

<?php if ( bp_has_activities( 'action=activity_update' ) ) : ?>

that’s how it’s supposed to look if you want to hard code the filter to one specific value. The hard part was finding out the proper argument for the bp_has_activities function. Well, now I got it. But seriously, why are you making it so hard for users to modify?

Anyway, thats how it looked before editing:

<?php if ( bp_has_activities( bp_dtheme_ajax_querystring( 'activity' ) ) ) : ?>

I tried using the docs for buddypress, specifically this page:

https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/

But is it outdated, or is it just the wrong page for what I was looking for?

#62470
Mike Pratt
Participant

so here’s a tweaked version and the latest in my custom tab efforts, fyi:

// passes MyClass scope into ajax query for custom Class Year activity filter
function bn_ajax_querystring_activity_filter( $query_string, $object, $filter, $scope, $page, $search_terms, $extras ) {

global $bp;

if ( !is_user_logged_in() || $object != 'activity' )
return $query_string;

$args = array();
parse_str( $query_string, $args );
$args['object'] = $bp->groups->id;

switch ($scope){

case 'myclass':

$slug = "usma-". bp_get_profile_field_data( array('field'=> 'Class Year', 'user_id' => $bp->loggedin_user->id));
$groupid = BP_Groups_Group::get_id_from_slug($slug);
$args['primary_id'] = $groupid;
break;

case 'mycadetco':

$slug = bp_get_profile_field_data( array('field'=> 'Cadet Company', 'user_id' => $bp->loggedin_user->id));
$groupid = BP_Groups_Group::get_id_from_slug($slug);
$args['primary_id'] = $groupid;
break;

case 'mybranch':

$slug = sanitize_title(bp_get_profile_field_data( array('field'=> 'Branch', 'user_id' => $bp->loggedin_user->id)));
$groupid = BP_Groups_Group::get_id_from_slug($slug);
$args['primary_id'] = $groupid;
break;

default:

return $query_string;
}

return http_build_query( $args );
}
add_filter( 'bp_dtheme_ajax_querystring', 'bn_ajax_querystring_activity_filter', 1, 7 );

and the action:

function bn_add_activity_tab() {

if ( !is_user_logged_in() )
return false;
?>
<!-- default item-list-tabs activity-type-tabs

<ul> -->

</div><!-- default item-list-tabs activity-type-tabs -->

<div class="item-list-tabs activity-type-tabs" id="bn-tabs">

</ul>
<ul>
<li id="activity-myclass">
<a>" title="<?php _e( 'Activity for my Class Year', 'buddypress' ) ?>">
<?php printf( __( 'My Class', 'buddypress' ) ) ?>
</a>

<li id="activity-mycadetco">
<a>" title="<?php _e( 'Activity for my Cadet Company', 'buddypress' ) ?>">
<?php printf( __( 'My Cadet Company', 'buddypress' ) ) ?>
</a>

<li id="activity-mybranch">
<a>" title="<?php _e( 'Activity for my Army Branch', 'buddypress' ) ?>">
<?php printf( __( 'My Branch', 'buddypress' ) ) ?>
</a>

<?php
}
add_action( 'bp_activity_type_tabs', 'bn_add_activity_tab', 1, 2 );

A few things to note:

1. use the WP function sanitize_title() if you have a field that might return more than one word e.g. the group ‘Military Police’ returns ‘military police’ but transforms into ‘military-police’ (a pretty slug0 which gives you a correct slug now.

2. I added addl markup to force my new tabs into their own element.

3. Don’t be shy to make suggestions and keep improving this technique. I think many will use it to customize their installs.

#62376
MrMaz
Participant

UPDATE:

The filtering has been consolidated and drastically improved as of revision 2580. Here is an updated example:

function my_activity_filter( $query_string, $object, $filter, $scope, $page, $search_terms, $extras ) {
global $bp;

if ( $object != 'activity' || $scope != 'myclass' || !is_user_logged_in() )
return $query_string;

$args = array();
parse_str( $query_string, $args );
$args['object'] = $bp->groups->id;
$args['primary_id'] = function_to_get_group_id_for_logged_in_user();

return http_build_query( $args );
}
add_filter( 'bp_dtheme_ajax_querystring', 'my_activity_filter', 1, 7 );

As you can see a TON more information about the request is being passed to the filtering, so you can more easily determine what you need to do to handle it properly.

#61842
lautering
Participant

Just to add more detail: this is what renders the activity stream on the homepage. Commenting out the small amount of code in home.php doesn’t seem to do anything. Commenting this out in functions.php seems to break things.

Is there a way to either eliminate the option to set what appears on your homepage, thus giving you complete control over what appears there (and maybe building/adding a special “Activity” page to replace it), or to amend this function in some way that let’s you call modify how it renders?

function bp_dtheme_show_on_frontpage() {
$settings = get_option( 'bp_dtheme_options' );

if ( empty( $settings['show_on_frontpage'] ) || 'blog' == $settings['show_on_frontpage'] )
return 'blog';

return 'activity';
}

I completely understand the easy-to-use, out-of-the-box logic behind the setting for what appears on your homepage, and it’s certainly Facebook-like, but I’m using the default template to build out a full site that needs to have a unique hompeage with other content elements. The activity stream is a small part of it, and I’d like to have it there in some way, but certainly not as prominent as it is now.

This is the code that’s in home.php (all of it):

<?php
/***
* Should we show the blog on the front page, or the activity stream?
* This is set in wp-admin > Appearance > Theme Options
*/

if ( 'blog' == bp_dtheme_show_on_frontpage() )
locate_template( array( 'index.php' ), true );
else
locate_template( array( 'activity/index.php' ), true );
?>

The comment obviously notes the intention of activity stream OR blog, but what about ‘neither’? I’m going to work on this later, but one idea I have is to try to add a third option of “custom”, which would pull something like “custom.php”. Sound right? Something else?

Thanks in advance!

#61726
bbrian017
Participant

I got the site running the latest trunk version.

I lost out in 80 USD it seems for the custom template (maybe)

I’m having issues with the forums loading now. It’s saying page not found.

See here, https://buddypress.org/forums/topic/forums-not-showing-up-after-trunk-update

#61384
dainismichel
Participant

OK, went in and selected the same theme for

http://community.urine-therapy.org/testing2/ that

http://community.urine-therapy.org/testing3/ uses,

but the changes I made to sidebar.php have affected testing2 and not testing3. I’m actually pretty sure I am using the same theme on both of these test member blogs. Maybe I have to go in and reselect the theme for the changes to take effect? I don’t know on that one.

Now, why don’t

Blog

Members

Groups

Forums

Blogs

work in either testing2 or testing3?

Basically, I just want those links to go to the links of the main site.

Is the logic that I make a blog and people come and make blogs and each blog gets members and sub members?

Basically, what I am going for is:

Members join and make a profile page and a blog.

They can post but not make pages

Their posts appear in sitewide activity

When you visit their blog you see only the member’s posts

There are no sub-sub members (members don’t have members)

There are no sub-sub-blogs members only get one blog and that’s it

I am starting to make some changes, but I really don’t know why just yet.

#60767
peterverkooijen
Participant

Have you tried scattering alert statements to see where in the ajax process things are getting hung up?

I can’t find a function in ajax.js with “delete-activity”, the class on the delete button, so I don’t no where to put that test. Is that function supposed to be there?

In the 1.0 version of my site I had no classes at all on the delete link (custom theme). Deleting an item does not have fancy Ajax; the page reloads with “Wire message successfully deleted” in <div id=”message”>.

At least that works! I’d like to just recreate that for my 1.1.3 version.

So I tried removing the following:

class="item-button delete-activity confirm"

from the delete button link in bp-activity-templatetags.php.

That kills the ugly “Are you sure?” popup, but it then goes to “Page Not Found’ and when you go back to the page the item is still there. So it also kills the delete process…

Next trying to spot the differences with the process in version 1.0…

How do those wpnonce links work? What do they do? There’s nothing about them in the codex.

Viewing 25 results - 776 through 800 (of 831 total)
Skip to toolbar