BP Bookmarklet simplifie le partage dans votre #BuddyPress Activity Stream

CrĂ©dits Photo share the path by monkeyc.net, on Flickrï»ż

Et si vous facilitiez le partage de contenus / liens pour les membres de votre communauté BuddyPress !

ï»żCeci est un plugin beta, Ă  utiliser seulement sous BuddyPress 1.5+

Update du 18/11/2011 ! Fonctionne sur BuddyPress 1.2.7 et versions supérieures

Update du 29/01/2012 ! la version 1.1 ajoute un widget pour positionner le bookmarklet oĂč vous voulez..

Je travaille actuellement sur une nouvelle version de BP Code Snippets, car Ă  ce jour cette extension ne fonctionne pas trĂšs bien sous BuddyPress 1.5. Or, alors que je dĂ©veloppais des adaptations pour corriger, j’ai eu deux idĂ©es ! Et oui ça m’arrive !

  • permettre de pouvoir inclure des snippets dans des sites tiers (type embed)
  • permettre de simplifier l’ajout de snippets via l’utilisation d’un bookmarklet

Sur cette derniĂšre Ă©volution, je me suis dit : « ça serait pas mal de pouvoir rapidement stocker un snippet qui a retenu notre attention.. ». Pour cela, pourquoi ne pas copier le snippet, puis, Ă  l’aide d’un bookmarklet, le coller dans son site propulsĂ© par BuddyPress ?

BuddyPress is awesome !

Du coup, j’ai voulu tester la conception d’un bookmarklet pour faciliter l’ajout de status dans la BuddyPress activity stream.. Et en fait, j’en ai fait un plugin pour le fun 🙂

La démo du plugin

Cette fois-ci, je n’ai pas l’intention de soumettre ce plugin au WordPress repo (sauf Ă  ce que nombre d’entre vous y voient un intĂ©rĂȘt 😉 ). Il vous faudra donc l’installer en l’uploadant depuis le menu « Extension – Ajouter – Upload » de votre administration WordPress.

Une fois le plugin installĂ©, l’utilisateur loggĂ© retrouvera dans son profil un bookmarklet Ă  glisser dans sa toolbar de bookmarks

Profil utilisateur loggé

Une fois que le bookmarklet est en place, dĂ©s qu’il sera cliquĂ©, le titre de la page en cours et son lien seront automatiquement envoyĂ©s Ă  un formulaire pour ajouter un update dans son profil BuddyPress ou dans l’un des groupes dont on est membre…

Sympa non ?

Le bookmarklet dans le navigateur

58 commentaires sur “BP Bookmarklet simplifie le partage dans votre #BuddyPress Activity Stream

  1. Great concept plugin.

    I installed it on the latest wordpress 3.3beta3 and buddypress 1.5nightly.

    Using firefox I am able to put the bookmarklet in my browser, and when I visit a webpage and click the marklet I do get the popup. (However) the popup is not displaying the url of the site. Everything else does work though.

    *is there an english vs. of your website about this plugin?

    1. Hi, sorry this plugin is still experimental, so i guess it can bug on config i haven’t tested…
      Unfortunately there’s no english version of my site.
      FYI, i just tried with firefox 6.0.1 for Mac… seems to work. i dont know for WIndows or Linux powered PCs sorry.

  2. @shawn,
    OOps! That was my fault, i forgot to modify something in the file /bp-bookmarklet/templates/bookmarklet-dir.php.. You can try by replacing line 12 with this one
    <script type="text/javascript" src="<?php echo get_bloginfo('url') .'/'.WPINC;?>/js/jquery/jquery.js"></script>
    I updated the downloadable zip file so you can also just download it again..

    Thanks for your feedback.. It may worked now 😉

  3. Works great, nice plugin, and an absolute must have for buddypress!.

    One question, you can post to your profile, or to a group.
    Is there the possibility to add as a « private » bookmark?, and the ability for others to « like » it?

    Nice work, and well done

  4. Forgot to ask……
    Adding « tags » as well, which then allow others to search by tags.

    I guess anythings possible with time, money and effort 😉

    1. Hello Ryan,

      as you said : everything is possible with time 😉
      I thought about finding a way to allow other plugins to interact with it and many people asked me to work on a way to integrate with bp activity plus…. i’ll look at all suggestions as soon as i find some time 🙂
      Thanks for your comments,

  5. I look forward to updates, this plugin really suits a site i’m building, so if I can help any way i will.

    Also, as a thought, consider using Jquery to append the sites favicon to link:

    I’ll also post you some code of the updates to the bookmark page I’m doing (similar functionality/look to the way facebook submit).

    All the best 😉


  6. Imath, excuse, moi, je vais ĂȘtre un peu hors sujet. je voulais juste te signaler qu’il y a un souci dans ta navigation. La homepage et les pages suivantes sont les mĂȘmes. Probablement une mauvaise gestion de la pagination avec un query posts.

    1. Salut SĂ©bastien,

      Je sais, je l’ai signalĂ© au concepteur du thĂšme… DĂ©solĂ© pour ce dĂ©sagrĂ©ment. Le plus simple est de choisir une des 2 catĂ©gories depuis la sidebar pour pouvoir voir les articles plus anciens par catĂ©gorie.


  7. Hey ! great plugin 😀

    I’m using it on BP 1.5.1 + WP 3.2.1 with Google Chrome 15.0.874.106 and FF 8.0.1.

    I’m having some problems with the CSS. I saw the code and I noticed you’re including post-form.php but the CSS is not loaded (the generated windo has a white background and no styling).

    Could it be possible to add custom syling ?
    Thanks !

  8. Hello & TY @ Abyss for your comment.

    Line 10 of /bp-bookmarklet/templates/bookmarklet-dir.php the stylesheet of the theme is loaded.

    If you want to add your style, i recommend you 2 alternatives :

    1/ override the template bookmarklet-dir.php by copying it & pasting it into your active theme’s folder, then once in your theme’s folder edit the template the way you want…
    2/ or you can use one of my hook to add your custom style. In your functions.php script of the active theme simply add something like this :

    function abyss_specific_style(){

    hope my reply will help you fix your style issue..

  9. Thank you very much for your answer !! I’ll try it and then I’ll post the result 🙂

    Another question. I was thinking of having the bookmarklet inside a post page (do a nice presentation, explaining how it works, adding screenshots, etc). Would be this possible ? I’m trying to move it somewhere else than bp_profile_header_meta.

    Thanks again !

  10. Hi again 🙂 I started to look into the code with the tips you pointed out and I found out why if my theme’s CSS was correctly loaded I didn’t get the same result as in my main site.

    The thing is that I’m running a bp-default’s child theme and the parent’s styles are not being load.

    I added a nasty hack (sorry, I’m not a programmer :)) and it works, but I’m sure there must be a much better/elegant solution.

    In bookmarklet-dir.php:

    <link rel="stylesheet" href=" » type= »text/css » media= »screen » />

    From what I saw, many people run child themes of bp-default (because it’s the easier thing to do if you are a newbie) so I think this could be a issue for some.

    Cheers !

  11. Sorry, the blog parsed the PHP code 😛

    <link rel="stylesheet" href=" » type= »text/css » media= »screen » />

  12. Salut IMATH

    TrÚs bonne initiative et excellent idée

    J’ai cependant le CSS qui marche pas bien ds le bookmarklet
    Est il possible de m’indiquer quoi faire pour hĂ©riter du CSS de mon thĂšme, j’ai vu les commentaires deja postes mais y a un maillon qui manque a la chaine, comment faire, quel fichier modifier ?


    1. J’ai rĂ©pondu sur facebook 😉

      1. Copier le fichier bookmarklet-dir.php du répertoire /bp-bookmarklet/templates/
      2. Le coller dans ton thĂšme
      3. Ajouter les css souhaitées.

      Je ne comprends pas le bug, de mon cÎté tout est ok..

  13. Hey!

    Nice pluging!

    But I have a question:

    Neither in Firefox nor in Chrome the window doesnÂŽt close autmatically after I update activity wiht this bookmarklet.

    Could you tell me a solution for this, please?


  14. Hey @ ticle,

    Just tested in chrome and firefox. Everything seems to be ok. It could be because cookies are not allowed as the script is checking if $_COOKIE[‘bp-message-type’] is success to close the window after 1 second..

  15. Thanks for your great work! I tested adding the bookmarklet to my toolbar in firefox 12 for win7. Is there a way to define a favicon for the bookmarklet? Also to remove the name so it is basically just a button?

  16. Ok, Thank you very much for the suggestions. I’m barely any good with php, my javascript skills are none existence lol. If I find someone to help me do the coding work I will absolutely post the code changes back here for your inspection/use. Thanks again for this awesome plugin!

  17. Merci beaucoup pour le plugin.

    It works very well in buddypress single installation.

    Perhaps when the time comes to do an update you may consider two items.

    1) iPad – how to get the bookmarklet onto the Bookmarks Toolbar ?

    2) At the moment in a multi-network environment bp-bookmarklet appears not to function. I would be thrilled if you could get it to work in multi-network set-ups.

    Many thanks, again.

  18. i spoke too soon. apologies!

    Bookmarklet works (via the widget) in multi networks

    Many Thanks!

  19. Hello

    My site went extremly slow and the analytics says:

    Sum of request timings doesn’t correspond to the total value: http://www.babbleding.com/wp-content/plugins/bp-bookmarklet/css/bkmk-button.css?ver=3.4.1 (request.time: 340 vs. sum: 3161), request#: 4, parent page: page_29053

    Negative time is not allowed: http://www.babbleding.com/wp-content/plugins/bp-bookmarklet/css/bkmk-button.css?ver=3.4.1, request#: 4, parent page: page_29053

    Do you have an idea where this could result from?
    Merci beaucoup,

  20. Hi
    Thank you for your nice plugin . I have a problem with it . When I am logged in everything works perfect but when I’m not I write my username and password but it redirects to the dashboard page except the bookmarklet page .
    What should I do ?

    1. Well, il seems that your theme is not adding a redirect hidden fields as BP Default does, you should check this function which is located in /buddypress/bp-themes/bp-default/functions.php line 716:

      function bp_dtheme_sidebar_login_redirect_to() {
      add_action( 'bp_sidebar_login_form', 'bp_dtheme_sidebar_login_redirect_to' );

  21. Hi
    Thanks a lot . I use my own theme so I add the following code to my theme function file and it works !

    if ( !function_exists( ‘bp_dtheme_sidebar_login_redirect_to’ ) ) :
    * Adds a hidden « redirect_to » input field to the sidebar login form.
    * @since BuddyPress (1.5)
    function bp_dtheme_sidebar_login_redirect_to() {
    $redirect_to = !empty( $_REQUEST[‘redirect_to’] ) ? $_REQUEST[‘redirect_to’] :  »;
    $redirect_to = apply_filters( ‘bp_no_access_redirect’, $redirect_to ); ?>

    <input type="hidden" name="redirect_to" value=" » />

    add_action( 'bp_sidebar_login_form', 'bp_dtheme_sidebar_login_redirect_to' );

  22. Bonjour,

    Je lis au dĂ©but de ce mĂ©mo « permettre de pouvoir inclure des snippets dans des sites tiers (type embed) »… Est-ce une fonction qui a Ă©tĂ© rĂ©alisĂ©e ?


  23. Hi imath, thanks for a great plugin. Do you plan to keep developing it?
    What is the possibility you might add automatic thumbnail detection and/or the possibility to add thumbnail upload?


    1. Thanks, i need to check this plugin against BP 1.7. I hope to do it soon, i’ll check the plugin you mentionned then.

  24. sorry my english 🙂

    I installed and working all browser. I wnt to learn how can we use this for mobile… How can people send a web site to our web site (to share activity)…


    1. I think you can copy the code provided into the settings/bookmarklet subnav then create a new bookmarklet into your mobile brower and paste the code. I agree it’s a bit complex but it should work 😉

Les commentaires sont fermés.