Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 151 through 175 (of 254 total)
  • @3sixty

    Participant

    Here’s how I do it:

    Print out the Username:

    echo bp_get_loggedin_user_fullname()

    There is also a related function that avoids the need to ‘echo’ that function. Search your bp files for this function and it’s immediately above or below that one.

    Print out a URL to their Profile page:

    echo bp_core_get_userlink( bp_loggedin_user_id() )

    Although I think that gives you a hyperlinked userlink – if you review that function you should be able to figure out a way to output the raw url, if that’s what you are looking for.

    @3sixty

    Participant

    Just to clarify, would the “report this” functionality sit only on the activity stream, or does it extend into the native content type (blogs, forums, etc)?

    This plugin use crowdsourcing to help site admins finding contents to moderate. It adds a “report this” link to every posted content in the site, so members can easily report contents to admins.

    @3sixty

    Participant

    good luck with this – you are obviously well motivated! Let us know what support you need.

    @3sixty

    Participant

    It would be really nice if bp_has_activities (and bp_has_members, etc) had some sort of exclude or exclude_by argument. I might try writing a realistic patch for the core that would make something like this more than just a hack.

    YES… PLEASE! I have made this exact point before. That would be awesome.

    Also, not to litter these threads with circular references, but Jeff Sayre just said that his Privacy plugin component is going to allow fine-grained control over display of any activity stream. I think he’s anticipating having that ready in about 10 days or so.

    But for tweakers, having the ability to directly interact with the streams via bp_has_activities() would be ideal, so if you’re able to do a core patch that allows exclude or exclude_by, I think it would be a huge help.

    @3sixty

    Participant

    My aforementioned Privacy Component will offer fine-grained filtering of any activity stream content–that is as long as the plugin developer made sure to register all the activity stream actions for their component. No need for fancy bp-custom.php functions, core hacks, and the like.

    wow… nice!! Another great plugin to melt our heads.

    @3sixty

    Participant

    The achilles heel of @boonebgorges otherwise excellent approach is that you are essentially just removing items from the array, which causes activity stream atrophy. If you have a 20-item activity stream and 11 of those are blog comments, then you only have 9 items in the page before we get to “load more”, whereas you have a slow comment period, there may be 18 items on the page.

    One a clean way to exclude blog post comments and/or forum replies from the main activity stream, but still preserve the activity stream length, would be by passing an additional WHERE != item to the database query. I couldn’t figure out a way to pass it, so as a proof-of-concept, I did this to exclude forum comments from the main page activity stream (on a BP install set up to display activity on the front page):

    Go to Line 123 in bp-activity-classes.php:
    $where_sql = 'WHERE ' . join( ' AND ', $where_conditions );

    Add this line below it:
    if ( $bp->current_component == "") { $where_sql .= " AND a.type != 'new_forum_post' "; }

    This is just a proof-of-concept. I WOULD NOT take this approach for your site, because it will get overwritten when you upgrade your BP files.

    Is anyone able to suggest a way to do this without messing with the BP core files?

    @3sixty

    Participant

    I figured out a clean way to exclude blog post comments and forum replies from the main activity stream by essentially editing the bp-activity-classes.php file (not ideal, but it’s a start)

    It’s a little off topic so I’ll continue the discussion on the previous thread where this came up:

    https://buddypress.org/forums/topic/excluding-blog-post-comments-from-activity-stream-page

    @3sixty

    Participant

    That approach is OK if you definitely do not care about recording admin activity for other uses. If you want to keep the activity stream recording as usual, you would have to go with an approach similar to the “my_admin_denied_activity” function.

    @3sixty

    Participant

    @nuprn1 this code is promising, but results in an erratic number of activity stream items… For example, if your activity stream is set to 20 items, and 11 of them are admin items, you only display 9 items total. Is there any way to “normalize” the number of activity stream items?

    @3sixty

    Participant

    Last-viewed pages are saved in a cookie. So if I set the filter on the activity stream to “Show Blog Comments”, a cookie to that effect is stored in my browser. Next time I load the page on the same browser, “Show Blog Comments” is shown.

    In global.js, I believe the function that handles this is bp_init_activity(). If you comment the call to this function out (around line 15 of global.js), it should stop the cookie from overriding your default settings.

    This works! Thank you Boone.

    Andy’s approach is also a nice one because it preserves the cookie functionality if you want to use it elsewhere.

    @3sixty

    Participant

    Update: still not there, but I just realized that overriding global.js defeats the ajax page loading altogether. (My browser was loading a cached version of the page)

    So I’m guessing that something in global.js is responsible for overriding the default tab selection?

    @3sixty

    Participant

    I am having this same problem (I copied ajax.php to my child theme, but BP is still loading ajax.php from the parent theme).

    In reply to: Activity filter

    @3sixty

    Participant

    do you mean like in the bp-default theme, under /activity/ folder? look for activity-loop.php

    @3sixty

    Participant

    I am working on a database version of this.

    @3sixty

    Participant

    now I’m thinking about jumping the fence and offering my services to timbo85. :)

    @3sixty

    Participant

    I’m already regretting posting this. I hope it doesn’t run counter to the BuddyPress ethic. Sorry in advance.

    @3sixty

    Participant

    Hi guys – we’re awaiting an update of that plugin. The developer is on the case but we need to be patient on that one.

    https://buddypress.org/forums/tags/bp-events

    @3sixty

    Participant

    Tweetstream doesn’t work with my forums with this plugin enabled…

    Are you sure it’s Forum Extras causing the problem?? What are you trying to do that’s not working?

    On my BP install, the current version of Tweetstream works when posting updates from the ACtivity page, but NOT from the forums. This issue occurs regardless of whether or not Forum Extras is enabled.

    @3sixty

    Participant

    15 hours since Hashcash 4.5.1 was installed and still no new splogs registered. This compares with about 40 splogs over the preceding 3 days.

    @3sixty

    Participant

    Jens, I think Rich is referring to this page, which has a link to download the BP skeleton component:

    https://codex.buddypress.org/developer-docs/creating-a-custom-buddypress-component/

    The “skeleton component” is (I think) designed to hook into the Activity Stream, so by looking at that code, you might find what you need?

    @3sixty

    Participant

    The plugin wordpress Hashcash (updated today to 4.5.1) should now work for BuddyPress registration but it stops EVERYBODY from registering.

    This is not true for me. I just registered a test user with Hashcash 4.5.1 installed. Though still waiting to see if it stops BP splog spammers.

    @3sixty

    Participant

    1.2.3: Am I supposed to be able to tweet forum comments? I see the “to twitter” button but nothing happens. Seems to work perfectly in the Activity boxes, though.

    In reply to: Indexation of content

    @3sixty

    Participant

    I am fairlly certain this will be a non-issue by the time 3.0 is out.

    How so?

    Can anyone report back on indexing of BP content in Google? I’m particularly interested in whether Forum posts are indexed adequately?

    @3sixty

    Participant

    @3sixty

    You are correct, it does display in the order created. Would still like the ability to reorder someday if it’s possible.

    I managed to choose my own forum order with this adaptation of “foreach ( (array)$forumlisting as $listing)”

    (though rich will cringe when he sees how I mangled/reverse engineered his great code)

    <?php $forum_entries = array(9, 10, 7, 6, 3, 2, 1); /*this is the order I want my forums to appear in the forum index*/ ?>

    <?php foreach ($forum_entries as $forum_entry) {

    foreach ( (array)$forumlisting as $listing) {

    if ($listing->id == $forum_entry) {

    if (!is_user_logged_in() && $listing->status == ‘private’) {

    $forumlink = $bp->root_domain . ‘/’ . $bp->groups->slug . ‘/’ . $listing->slug . ‘/’;

    } else {

    $forumlink = $bp->root_domain . ‘/’ . $bp->groups->slug . ‘/’ . $listing->slug . ‘/forum/’;

    } ?>

    <tr>

    <td class=”num td-title”><?php if ($groupavatar) bp_forum_extras_the_forum_avatar( ‘item_id=’. $listing->id ) ?>

    <h5>“><?php echo $listing->forum_name; ?></h5>

    <small> – <?php echo $key . ‘ ‘ . $listing->forum_desc; ?></small></td>

    <td class=”num td-topiccount alt”><?php echo $listing->topics; ?></td>

    <td class=”num td-postcount”><?php echo $listing->posts; ?></td>

    <td class=”num td-members alt”><?php echo $listing->total_member_count; ?></td>

    </tr>

    <?php } ?>

    <?php } ?>

    <?php } ?>

    </table>

    <?php }

    @3sixty

    Participant

    LOL. Had no idea. Will check out the admin panel!

Viewing 25 replies - 151 through 175 (of 254 total)
Skip to toolbar