Skip to:
Content
Pages
Categories
Search
Top
Bottom

External Group Blogs bug


  • Anton
    Participant

    @antonrsaopencirclecoza

    I’m running wp single with bp 1.2.1 and the latest external group blogs plugin (1.2.1)

    At first it fetches the the external rss feed items but after an hour it adds the same items again to the activity stream resulting in a couple of duplicate feed items.

    Where can I add something to check for existing records before they are added to the activity stream? I have tried this with no luck.

    /* Record or update in activity streams. */

    $own=mysql_query(“select * from wp_bp_activity where content=”.$activity_content);

    if(mysql_num_rows($own) == 0)

    {

    groups_record_activity( array(

    ‘id’ => $id,

    ‘user_id’ => false,

    ‘action’ => $activity_action,

    ‘content’ => $activity_content,

    ‘primary_link’ => $item[‘link’],

    ‘type’ => ‘exb’,

    ‘item_id’ => $group_id,

    ‘secondary_item_id’ => wp_hash( $post[‘blogurl’] ),

    ‘recorded_time’ => gmdate( “Y-m-d H:i:s”, $post_date ),

    ‘hide_sitewide’ => $hide_sitewide

    ) );

    }

Viewing 15 replies - 1 through 15 (of 15 total)
  • i notified Andy of this problem, but here is my fix – needs to hash the post link (but this would leave to problems when removing a feed and the activity not deleting)

    /* Fetch an existing activity_id if one exists. */
    if ( function_exists( 'bp_activity_get_activity_id' ) )
    $id = bp_activity_get_activity_id( array( 'user_id' => false, 'component' => $bp->groups->id, 'type' => 'exb', 'item_id' => $group_id, 'secondary_item_id' => wp_hash( $post['link'] ) ) );

    /* Record or update in activity streams. */
    groups_record_activity( array(
    'id' => $id,
    'user_id' => false,
    'action' => $activity_action,
    'content' => $activity_content,
    'primary_link' => $post['link'],
    'type' => 'exb',
    'item_id' => $group_id,
    'secondary_item_id' => wp_hash( $post['link'] ),
    'recorded_time' => gmdate( "Y-m-d H:i:s", $post_date ),
    'hide_sitewide' => $hide_sitewide
    ) );


    Anton
    Participant

    @antonrsaopencirclecoza

    by deactivating and activating the plugin removes the duplicates but it will happen again :(


    Anton
    Participant

    @antonrsaopencirclecoza

    Any news on this fix?


    Robert
    Member

    @gesdesites

    I have the same problem.

    Is it possible to make external blogs appear in a specific page and hide it from the site wide activity? It could be a great news aggregator if there’s a fix for the duplicates and if the links are configured to open in a new window. I’ve edited the plug-in and used “target=”_blank” but didn’t work.


    modemlooper
    Moderator

    @modemlooper

    Andy posted a bit ago he is fixing this plugin this weekend :)


    edelwater
    Participant

    @edelwater

    I’m using the plugin “wp-external-links-bar” which makes a bar appear for external links but only for posts and pages.

    Inside this plugin I added “http://farmvillechicken?” before

    $items[$key][‘blogurl’] = ‘http://farmvillechicken.com?’.$rss->channel[‘link’];

    and

    ‘ .

    to make that happen.

    I wonder if it is possible to add some kind of filters/plugin settings for this to make it easier to upgrade.


    edelwater
    Participant

    @edelwater

    I copied and pasted the fix however… see: http://farmvillechicken.com/ on the left you see the entries with minimal 5 duplicate entries.

    the fix is not retro-active – so you’ll need to delete those out


    edelwater
    Participant

    @edelwater

    I’ve let it run for a little while and the new key works.

    Thanks Etiviti !!!! (cant give out kudos)


    abcde666
    Participant

    @erich73

    @andy
    Just wondering whether this is really a bug and if so, whether this is fixed in the latest release of the Plugin ?

    Many thanks,
    Erich


    edelwater
    Participant

    @edelwater

    I dont know for sure but if I go to { group url}/admin/external-blog-feeds without being logged in i can edit the rss feeds.

    nice catch but if andy hasn’t updated this plugin to address the simple dup bug….

    so

    this could either be a class BP_Group_Extension issue or when a plugin extends the class and setting some check

    ` // Make sure user has access
    if ( !$bp->is_item_admin )
    return false;
    `

    so I would crack open the plugin file and add the above code snippet inside the functions create_screen(), edit_screen(),


    edelwater
    Participant

    @edelwater

    done. Actually the reason why i was looking at the code was to see if I could add a twitter feed e.g. `http://search.twitter.com/search.rss?q=wordpress` and somehow not have the forum icon showing in the activity feed but the icon of the original author of the “tweets”

    this is in the google:image_link entry so I was thinking if “groups_record_activity” handles something like “avatar” , have to look in to it

    re: activity avatars – wait for 1.2.6 as i believe JJJ added/fixed the ability to change up the avatars via a filter. (just need to store that reference, activity_meta)


    Sunandan
    Participant

    @sastry

    Hi , Is there are a way to redirect avatar link to group page instead of sending the user to members page.

    When i am using External group blog. The posts coming from external sites have avatar of this group but the avatar link is redirecting to memebers page i want this to redirect to Group page. Where should i change the code.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘External Group Blogs bug’ is closed to new replies.
Skip to toolbar