• Resolved jlgouwy

    (@jlgouwy)


    Hi,

    I’d like to add a success message when a file is uploaded.
    I never use backbone, but i watch your code, and i try something quickly.

    in buddydrive-views.js , i add this :
    this.listenTo( buddydrive.Uploader.filesUploaded, 'add', this.displaySuccess );

    displaySuccess: function( file ) {
         var message = 'File uploaded !';
         if(BP_Uploader.strings.feedback_messages[2] != undefined) {
    	message = BP_Uploader.strings.feedback_messages[2];
         }
    
          this.views.add( '#buddydrive-status', new buddydrive.Views.Feedback( {
            value: message
          } ) );
    
          setTimeout(function(currentInstance){
            currentInstance.cleanViews( '#buddydrive-status' );
          }, 3000, this);
    },

    i know, this is not clean, but it works for now.
    I don’t master Buddypress + Buddydrive. I just retrieve the project.
    Have you a solution cleaner than mine ?

    Problem if we update the plugin, the code’ll be remove.
    But i’ve no choice for now :/

    And i’ve an issue with translation. In SearchForm View, we’ve a placeholder “Search”, but the website is French, so, i’ve momentarily replace “Search” by “Recherche”.

    Thanks for your feedback,

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jlgouwy

    (@jlgouwy)

    The plugin is still support ?
    Because there is no answer.

    Thanks.

    Plugin Author mrpritchett

    (@mrpritchett)

    Hi, thanks for using BuddyDrive. Unfortunately, the support forums are not monitored daily. But yes, there is support for this plugin. Unfortunately, we cannot support custom code especially when it hacks core plugin files. A new version of BuddyDrive is coming soon. We’ll consider adding this functionality in the future. On the translation, you should be able to translate all strings using the translation files. Thanks.

    Thread Starter jlgouwy

    (@jlgouwy)

    Hi,

    Good to hear it’s still support.

    Thanks for considering “Success upload message” feature.

    On the other hand, about “Search” string, you said:

    “On the translation, you should be able to translate all strings using the translation files.”

    -> I agree, but the “search” string isn’t in the translation files because “Search” is wrotten by developpers in a javascript file.
    Here : https://github.com/imath/buddydrive/blob/master/includes/js/buddydrive-views.js#L601

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add a “success uploaded file” message + translation “search”’ is closed to new replies.