Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 25 total)

  • levin
    Participant

    @levinng

    @r-a-y

    Thank you so much for your effort!! Looking forward on your new version :)


    levin
    Participant

    @levinng

    Hi, I just added a embed provider like the following code in theme functions.php, it can work with blog post, but not the activity stream, I tried to add mytube.com in the whitelist but still doesnt’ work. Is there i’ve something missing?

    I’m using WPMU 2.9.1.1 and BP 1.2.1

    Thanks so much for your help

    <?php

    function wp_embed_handler_mytube( $matches, $attr, $url, $rawattr ) {

    // If the user supplied a fixed width AND height, use it

    if ( !empty($rawattr[‘width’]) && !empty($rawattr[‘height’]) ) {

    $width = (int) $rawattr[‘width’];

    $height = (int) $rawattr[‘height’];

    } else {

    list( $width, $height ) = wp_expand_dimensions( 640, 360, $attr[‘width’], $attr[‘height’] );

    }

    return apply_filters( ’embed_mytube’, ‘<object height=”‘ . esc_attr($height) . ‘” width=”‘ . esc_attr($width) . ‘” ><param value=”http://www.my-tube.com/em?v=&#8217; . esc_attr($matches[1]) . ‘” name=”movie”></param><embed src=”http://www.my-tube.com/em?v=&#8217; . esc_attr($matches[1]) . ‘” allowfullscreen=”true” width=”‘ . esc_attr($width) . ‘” height=”‘ . esc_attr($height) . ‘” align=”middle” allowScriptAccess=”always” type=”application/x-shockwave-flash”></embed></object>’, $matches, $attr, $url, $rawattr );

    }

    function register_embed_handlers() {

    wp_embed_register_handler( ‘mytube’, ‘#http://www.my-tube.com/v\?v=([A-Za-z0-9]{0,50})#i’, ‘wp_embed_handler_mytube’ );

    }

    add_action(‘wp’, ‘register_embed_handlers’);

    ?>


    levin
    Participant

    @levinng

    anyone?


    levin
    Participant

    @levinng

    Got it, will try it in BP 1.2 :)


    levin
    Participant

    @levinng

    Generally, I could customize it in bp-activity-templatetags.php for the widgets, but after that the RSS feed won’t update anymore… :(


    levin
    Participant

    @levinng

    copy the footer.php to themes/bp-default and edit that one, your modification will be kept in the future when you upgrade the parent theme.


    levin
    Participant

    @levinng

    @andy

    I sent the files to you.

    And there have character set issues, I found the retrieved tweets isn’t i18n friendly, all chinese character cannot show properly.


    levin
    Participant

    @levinng

    BP is not yet support standalone wordpress, when you implement your site with MU, you can simply disable blog registering for individuals and remove the “Create blog” option in usermenu with some tick.


    levin
    Participant

    @levinng

    @andy

    a localization file is ready for this plugin, where to submit it :P?


    levin
    Participant

    @levinng

    look better =P


    levin
    Participant

    @levinng

    agree :P


    levin
    Participant

    @levinng

    Tried @stwc change register-slugs suggestion, zero spam registration in a week! thanks alot!


    levin
    Participant

    @levinng

    It was encountered when the FB user’s name contains full of chinese characters, all characters pass into wp insert users function will be stripped(because wp username is ansi only), it finally added a empty character user_login/user_nicename, also user_url will be http://www.facebook.com/people//XXXXXXX

    That user can still login, but cannot access his profile page indeed.

    I’d like to suggest the future BP-FBConnect, could use the character test statement, if found incompatible username characters, then just simply replace it with FacebookUser instead.


    levin
    Participant

    @levinng

    make a plugin as below to allow non-ansi character account name

    <?php

    add_filter( 'sanitize_user', 'my_sanitize_user',3,3);

    function my_sanitize_user($username, $raw_username, $strict){

    $username = $raw_username;

    $username = strip_tags($username);

    $username = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '', $username);

    $username = preg_replace('/&.+?;/', '', $username); // Kill entities

    if ( $strict )

    $username = preg_replace('|[^a-z0-9 _.\-@\x80-\xFF]|i', '', $username);

    $username = preg_replace('|\s+|', ' ', $username);

    return $username;

    }

    ?>


    levin
    Participant

    @levinng

    Minor bug fixed on Members Page.


    levin
    Participant

    @levinng

    @stwc

    Thanks for your effort, i just put it into my site, hope it can stop the spam registration.


    levin
    Participant

    @levinng

    @Andrea_r

    thanks for your handy information, do you know is it work for sub-domain configuration too?


    levin
    Participant

    @levinng

    @andrepan

    yeah, i tried 1.1.2, same result.


    levin
    Participant

    @levinng

    Tested in different contain variation with turn-half-on supercache and turn off, site wide activity RSS is completely lost control while supercache is on.

    Post new blog post: work fine

    Post new forum topic/reply: random hours delay

    New user registration: disappeared

    When turn off supercahce, everything back to normal, i tried to exclude is_feed and several feed, /feed/, /activity/feed/ but no effect at all.

    I’m using BP1.1.2 and 2.8.5.2 mu and supercache 0.9.7


    levin
    Participant

    @levinng

    Whao, it looks GREAT!, would anyone tried and could tell me is it quota aware for user’s upload?


    levin
    Participant

    @levinng

    consider to set a short GC time and don’t cache for logged in user alost exclude most active RSS feed path


    levin
    Participant

    @levinng

    i dont know taiwan, i’m from hong kong actually, and i believe my buddypress is alone in my place… anyway BP is growing fast and i bet on WP as well. Let’s sit tight and wait.


    levin
    Participant

    @levinng

    Yeah, here i’m getting same problem,

    https://trac.buddypress.org/ticket/1279


    levin
    Participant

    @levinng

    @andy

    I think the send-to flied should validate on Name BP from “Base Profile” as well for friend or non-friend, of coz, it should preserve auto-completion for friend only.

    Most user change to their Full name or nickname, non-friend user usually try to compose to a user’s Full name but can’t be validated.

    Example: if I want to send a message to a “web admin” which shown in member list, however his/her username is admin1.. it’s quite confusing when they try to type in “web admin” on send-to field but got a error.


    levin
    Participant

    @levinng

    i was getting similar behavior, a user commented on a main blog post, but the entry didnt shown up in RSS feed. Somewhat 19 hour later, the entry raise in RSS feed. weird!

    the site is running 2.8.4a and 1.1.2 BP without caching stuff.

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