The dropbox plugin – working version

Good news comes better late than never, and with that in mind the plugin should now be uploaded to wordpress.com and be fully functional.

There have been several changes to how the plugin looks and work, which have taken me through several libraries, feature lists and bugs. It’s a bit of a patch job so I make no guarantees for stability, usability, security, or risks to global warming. The innards are a complete mess, but it appears to work. Since nobody came here for stories I’ll cut straight to the ‘how to’:

To access your dropbox you will need to set up a dropbox app in order to get a consumer key and a secret key.

1) Go to https://www.dropbox.com/developers/apps

2) Click “Create an App”

3) Add a name and description

4) Copy and paste the two codes in thee corresponding text boxes of the plugin options screen

To display the box use the shortcode with these parameters:

Name (default value) – description

home() – root folder, case sensitive, ex: /Photos

separator(~) – folder separator used in displayed box

hometext(home) – text for link to specified root

dirsfirst(true) – display directories before files

orderby(date) – parameter to order files and folders, possible values: date, size, type

orderdir(1) – 1 for asending -1 for descending

showdirs(true) – show directories in box

dateformat(l jS \of F Y h:i:s A) – format for date

allowdownload(true) – allow download of files, can be true/false

allownavigate(true) – alow folder navigation, can be true/false

columns(INDSD) – order of columns I:icon, N:name, D:date, S:size, a column may appear more than one time or not at all

asctxt(▲) – text used for link for ascending ordering

desctxt(▼) – text used for link for ascending ordering

ordering(true) – allow user to order the files/folders

allowupload(false) – allow user to upload files to current folder

In order to add icons place files in the ‘images’ folder(located in the plugin folder). File names must be ‘[extension of file].png’. For example ‘txt.png’ will be used as the icon for all *.txt files, ‘folder.png’ will be used for folders, and ‘default.png’ will be used for everything without a match.

As the plugin uses this wonderful library a special thanks goes out to its creator.

Note: the home parameter must be defined as

home=”/pathto/folder”

and NOT
home=”pathto/folder”
or
home=”/pathto/folder/”
or
home=”pathto/folder/”

CLICK FOR THE DEMO PAGE | CLICK TO DOWNLOAD THE LATEST VERSION

To do:

  • home parameter correction
  • pagination
  • upload forms
  • option to hide files
  • compatibility with folder restricted app
  • thumbnails
  • cache
FAQ/troubleshooting:
Q: It doesn’t download big files!
A: It probably doesn’t and you really shouldn’t try. It’s a great way to make your host angry. What happens is the plugin loads all the file contents internally then spits them back out. It doesn’t ‘stream’ files.
Q: I get corrupted files several KB in size, why?
A: Open them up in notepad and let me know what’s inside.

Q:Has this plugin made you famous? rich? the envy of all your friends? or just been really useful? Want to show your appreciation but don’t know how?

A:You can buy me a beverage of your choice:

VN:F [1.9.22_1171]
Rating: 8.0/10 (6 votes cast)
The dropbox plugin - working version, 8.0 out of 10 based on 6 ratings
  • Pingback: Dropbox plugin for wordpress | Software

  • http://www.yoursuperva.com jaime

    i’ve gotten the app, the key and the secret key, and put them in the TDP options page. i hit connect, and a new window opens up with this: Fatal error: Call to undefined function curl_init() in /var/www/www.thewebsiteiuse.com/wp-content/plugins/dropbox-plugin/dropbox.php on line 336

    how can i solve this?

    • http://software.o-o.ro Andrew

      Does your host have curl enabled? It’s required.

  • http://www.yoursuperva.com jaime

    curl is installed. it throws the same error. any other thoughts? thanks for your prompt reply earlier. that’s reassuring. :)

    • http://software.o-o.ro Andrew

      Hmm did you hit the save button before clicking the link?

      • http://www.yoursuperva.com jaime

        lol. yes. i also tried with and without the link back enabled. one thing i noticed, and i chalked it up to maybe a language issue, was that the plugin requests a consumer key/secret, where dropbox is giving me an app key/secret. anything to that?

        • http://software.o-o.ro Andrew

          The link back doesn’t affect it, that would be evil :)

          What it requests is just a bad choice of words, it’s definitely the data from the dropbox page.

          The line that gives the error is what initiates curl, but if that’s installed and enabled then I’m not sure what the problem can be. I have the same version running on the example page.

          Is there any way you can test the plugin on another host/ double check if your curl is working properly?

          The only other solution I can think of is to get a newer version of the dropbox library.

  • http://www.yoursuperva.com jaime

    okay. where would i find a newer version of the dropbox library?

  • Patrik Redgård

    Thank you for a wonderful plugin! I love the idea of it.

    Forget a newbie, but how do you use the syntax?
    I tried [dropbox hometext(myowntext)] but it doesn’t react. Do I do anything wrong?

    • http://software.o-o.ro Andrew

      I forgot to mention that, my apologies

      [dropbox hometext="myowntext"]

      and to add more

      [dropbox hometext="myowntext" columns="IN"]

      and so on

  • http://www.findmanna.eu Jesper Friis

    Hi Andrew and sorry for the looooooooong delay – I lost track of the whereabouts of the discussion! (hmmm)

    You suggested I moved this question to this string instead – I asked you abot an error I got when trying to access a subfolder on: http://www.findmanna.eu/extranet” – And you asked me if there where any special characters, a large filesize or something else that could explain the rather large error response I got when trying to click the subfolder.

    No special characters – file in subfolder a PDF 1.9MB – some “.ai” files in root folder.

    Any idea what it could be?

    Cheers JEsper – and again sorry for the long waiting time (not that I think it kept you sleepless ;) )

    • http://software.o-o.ro Andrew

      I’ve narrowed it down to the way dropbox handles file paths, while I knew they weren’t case sensitive, I falsely assumed that they keep the casing consistent.

      The update (0.103) should show up any minute now, and it should have the problem fixed.

      • http://www.findMANNA.eu jesper

        super – now it works! :)

        Thanx a lot for the effort Andrew!

        Cheers, Jesper

  • http://www.markryankilpatrick.com Mark Kilpatrick

    For some reason I’m getting no response. It says “Dropbox
    Don’t forget to connect the plugin to your dropbox”, The only issue is that I have placed the key and the secret into the tdp_options

    vsd4uoi6r7mxphg
    <input type="text" name="tdp_mail" value="” />

    The key and secret are most definitely correct. Any thoughts?

    • http://software.o-o.ro Andrew

      After you saved the options, did you click the link to authorise the plugin to use dropbox? It should be right under the save changes button.

  • http://www.markryankilpatrick.com Mark Kilpatrick

    I don’t have a setting box. Under my plugins box I have the option to “edit” and when I get into the edit box I open the plugin file “tdp_options” and placed the key and secret where is noted for them.

    When I hit update file nothing happens. I am assuming that I am supposed to have a “settings option”? As with many of my plugins I do, but when I installed the one it didnt have that option.

    • http://software.o-o.ro Andrew

      That’s not entirely how it’s supposed to work. You might want to try reinstalling the plugin to get fresh files, then under ‘Settings’ of the general wordpress dashboard you’ll find ‘TDP Options’. If you click that it should take you to the plugin’s options.

      • Philipp

        Thank you for your question you saved me another 2 or 3 hours of searching!
        BTW: Great Plugin!!
        But i guess for me it was only the first step, because I still get a ‘DropboxException’ with message ‘couldn’t connect to host’ in dropbox-plugin/dropbox.php on line 350

        • http://software.o-o.ro Andrew

          Have you inserted the correct key and secret from the dropbox website, then saved then pressed the link to connect?

          • Philipp

            Yes, I did.
            I tried it already with another app key and secret key but still the same problem.

            Fatal error: Uncaught exception ‘DropboxException’ with message ‘couldn’t connect to host’ in /wp-content/plugins/dropbox-plugin/dropbox.php:350 Stack trace: #0 /wp-content/plugins/dropbox-plugin/dropbox.php(761): Dropbox->doOAuthCall(’0/oauth/request…’, NULL, ‘POST’, false) #1 /wp-content/plugins/dropbox-plugin/conn.php(23): Dropbox->oAuthRequestToken() #2 {main} thrown in /wp-content/plugins/dropbox-plugin/dropbox.php on line 350

            • http://software.o-o.ro Andrew

              As that’s a curl error, do other curl calls work properly on your server?

  • Brent MacNicol

    Hi, I am trying out your plugin 0.104 with WordPress 3.2.1 and loving it so far. Is there any way that I can restrict users from being able to upload and download based on WordPress role? I would like to only allow subscribers or above to upload or download files. Something like [dropbox auth_level="subscriber"] ?

    • http://software.o-o.ro Andrew

      At the moment you can only restrict globally per shortcode. One solution would be to show different pages with different shortcodes based on user permissions or if you get a plugin to embed php in pages you could try something like:

      < ?php
      ...
      //manually add parameters
      $attributes["allowdownload"]="true";
      $attributes["home"]="/Photos";

      ...
      //call function directly
      if(current_user_can( 'upload_files' )) show_dropbox($attributes);
      else if (current_user_can( 'edit_posts' ))
      show_dropbox($otherattributes);
      ...
      ?>

      I’ve never actually tried doing it this way but it should work. Let me know if it does :D

      • Brent MacNicol

        Thanks for the quick reply. I tried it with “Shortcode Exec PHP” but I’m not sure it is able to see the functions and variables in your code. Keeps evaluating at an empty string. I’ll work on it a bit and let you know if I find anything out.

        • http://software.o-o.ro Andrew

          Just ran a quick test, try:

          echo show_dropbox($attributes);

          • Brent MacNicol

            That did it! Thank you for all this help. I just left you 5 stars on wordpress.org.

            • http://software.o-o.ro Andrew

              You’re welcome, and than you.

  • Michael

    Hey,

    First – thanks for the great plugin! :) Just found it today!

    I seem to be having trouble getting the custom home directory to work.

    I’ve called the shortcode as follows
    [dropbox home="pathto/otherfolder/" showdirs=true allowupload=false allownavigate=true ]
    When I do so, the info appears fine, but the link the download the files is not working. The link looks like
    http://www.mysebsite.com/thepage/?g=/Filename.png
    When I think it should be
    http://www.mysebsite.com/thepage/?g=/pathto/otherfolder/Filename.png

    I’ve checked that it is all working by just using the [dropbox] shortcode and then navigating to the file.
    I also checked that it wasn’t a theme thing by reverting to the wordpress default theme.
    Am running the latest wordpress.

    Have I missed something obvious? Thanks in advance.

    Cheers,

    Michael

    • http://software.o-o.ro Andrew

      “/pathto/otherfolder/” doesn’t appear in the link due to security reasons. I don’t think you’d want people knowing the directory structure to your dropbox, it’s added to the api calls by the plugin internally

      Try home=”/pathto/otherfolder/” instead of home=”pathto/otherfolder/” there should be an extra “/”.

      Let me know if it works.

      • Michael

        That makes sense! :)
        I’ve tried it again with [dropbox home="/pathto/otherfolder/" ] and it just has an empty column where the file name and links should be. I’ve not changed any other options. If I drop off the home setting, I can navigate from the dropbox root to the directory in question and it all appears fine.

        • http://software.o-o.ro Andrew

          Try removing the trailing “/” so it looks like home=”/pathto/otherfolder”

          I should probably add an automatic check for this next time I update the plugin.

          • Michael

            Awesome :) That worked! Sorry, that was an easy fix – I thought I had also tried that possibility, but obviously not. Thanks for the great plugin!!!

            • http://software.o-o.ro Andrew

              Glad it worked :D

  • http://www.yasyf.com Yasyf

    Having a bit of an issue, when clicking on a folder:

    Invalid signature. Expected signature base string:

    • http://software.o-o.ro Andrew

      Is the home parameter defined as:
      home=”/pathto/folder”

      and NOT
      home=”pathto/folder”
      or
      home=”/pathto/folder/”
      or
      home=”pathto/folder/”

      • http://www.yasyf.com Yasyf

        Thanks! That fixed it!

        • http://www.yasyf.com Yasyf

          Except now I have another issue of getting a 404 missing error in the actual body of every document. As in every file i click on is a 5kb 404 document that gets downloaded!

  • http://www.yasyf.com Yasyf

    Except now I have another issue of getting a 404 missing error in the actual body of every document. As in every file i click on is a 5kb 404 document that gets downloaded!

    • http://software.o-o.ro Andrew

      That’s unusual. If the plugin works with the default [dropbox] tag (no parameters) then the problem would be with the home parameter. Does it contain any spaces/special characters?

      • http://www.yasyf.com Yasyf

        The plugin does work by default, home param has no spaces or special chars. The plugin will list fine, but gives the issue i described upon the DOWNLOAD of any file. Don’t know were to go from here!

        • http://software.o-o.ro Andrew

          I meant the default works including download. Is it possible to post a link to the page you’re having trouble with? (or send one via the contact form in the about page?)

  • keren

    Is there any way to limit number of files and have like a couple “pages” of files?

    • http://software.o-o.ro Andrew

      Not at the moment. I’ll look into adding that functionality in one of the next updates. I recommend sorting the files into multiple folders and using those as a sort of pagination.

  • sunil

    Is there any option to only upload files.
    i don’t want to display files in the upload folder.
    i need only upload box.

    • http://software.o-o.ro Andrew

      Not at the moment, there will be one in the next update.

    • sunil

      i have found the solution.
      by using the function tdp_upload() file can be uploaded

      Thanks a lot for the amazing plug-in.

  • Dr.Drake

    Hi,

    Like everyone else, I really love the plugin.

    There is, however, something that I would like to achieve, and I would love to get some pointers in the right direction.

    When I open e.g. a Word-file through the browser, it’s put in the temp folder. Let’s say we do some editing of the document, and save it.

    What would need to happen for this file to re-upload itself to the Dropbox?

    • http://software.o-o.ro Andrew

      I’m not sure what you mean but you can call

      $dropbox->filesPost($targetdir, $tmpFile);

      where $targetdir is the destination of the file (where it was downloaded from) and $tmpFile is the path to the temp file.

      • Dr.Drake

        Hi again,

        Thank you for your response.

        Here is what I want to achieve:

        The dropbox plugin has its own page in a Buddypress community solution. The folders available to the members contain documents.

        If a user clicks on the link to the document, the browser asks to open or to save the file.

        The user clicks “open”, edits the document, hits save and closes the Word. The edited copy is now stored in the system’s temp folder (c:\windows\temp).

        I want this copy to re-uploaded to the dropbox after editing is done.

        Mind you, these users are not connected to this dropbox via sharing folders.

        • http://software.o-o.ro Andrew

          Is the editing done on the site somehow or on the user’s machine?

          • Dr.Drake

            On the user’s machine I assume, otherwise I would have to install some kind of texteditor in BP?

            Thanks.

            • http://software.o-o.ro Andrew

              There’s no way for the server to fetch a file from the user’s machine without the user initiating the transfer unless we’re talking spyware. I advise to instruct the users to upload the file manually.

  • KB

    Great Idea – this is going to be great for our site (once I get it working!)

    I’ve added the two codes after creating the app. I can save the changes, but when I click the link under the Save Changes button, I get a 404, and then it redirects to my homepage. It looks like it’s trying to get to a conn.php file, and I’ve verified that it’s there… not sure what I’m doing wrong here, but any help would be great.

    Thanks,
    KB

    • KB

      I get the “Don’t forget to connect the plugin to your dropbox ” message when trying to put in shortcode, btw.

    • http://software.o-o.ro Andrew

      I’m not sure what’s going on but if you navigate to the conn.php file ‘manually’ it should redirect to dropbox where you can authorize the plugin(you must still be logged into wordpress)

      It’s located in the plugin folder, on a normal install:
      EXAMPLE.COM/wp-content/plugins/dropbox-plugin/conn.php

      If you have it in another folder I’d appreciate it if you could tell me how it differs so I can try fixing it so that it always works.

      • KB

        Andrew,

        First off, thanks for the quick response.

        Per your directions, I’ve made sure the conn.php file is in the correct location. The actual path of our website is EXAMPLE.COM/SITE, so it’s in EXAMPLE.COM/SITE/wp-content/plugins/dropbox-plugin/conn.php (with the rest of our plugins).

        By manually navigate to it, do you mean FTP to it, or type that path into the address bar?

        Weird thing is, if I type in EXAMPLE.COM/SITE/wp-content/plugins/dropbox-plugin/ , which is the file’s parent folder, I see conn.php, but when I click on it, it says it isn’t found and redirects.

        • http://software.o-o.ro Andrew

          I meant the whole path in the address bar, file included.

          Can you check if the permissions on the file/folder allow it to be accessed?

          • KB

            When I type the full path into the address bar, same deal. When I type in the parent folder, I see the conn.php, but when I click on it I get the 404 still.

            Permissions seem to be correct… I’ve given all the permission I can, and still no dice.

            • http://software.o-o.ro Andrew

              Try backing up your .htaccess file and adding this line to it:

              RewriteCond %{REQUEST_FILENAME} !-f

              This should disable mod rewrite for existing files(wordpress might assume you’re trying to get to one of its pages instead of an existing file). Alternatively you could briefly rename the .htaccess file, run the conn.php file and then restore the filename.

              Note that I’m by no means an authority on mod rewrite and changing the file could potentially break the site, so do a backup!

              • KB

                That doesn’t seem to work either – Definitely glad I ran a backup, b/c it just threw up an error.

                I do notice that when I Edit the Plugin, the only .php file that is set to Active is tdp_main.php… conn.php, dropbox.php, and tdp_options.php are all set to inactive. Could this have something to do with it?

                • http://software.o-o.ro Andrew

                  I’ve checked the installation on this site and they’re marked as inactive as well.

                  An idea would be to copy everything in the conn file to another folder/ embed it in a page/post using a php plugin and try aces sing it that way.

                  Don’t forget to change require ‘../../../wp-blog-header.php’;
                  to match the new location of the blog-header.php file

  • Pingback: The Dropbox Plugin for WordPress | Greenbrook

  • reid

    Getting the following error on a local wordpress install of current 0.104 version of the plugin…

    Warning: Parameter 1 to array_multisort() expected to be a reference, value given in /Users/username/Sites/wp_multisite/wp-content/plugins/dropbox-plugin/tdp_main.php on line 68

    I am still able to upload and browse but following upload the same error appears with additional “File successfully uploaded to your Dropbox!” and “Error: Can not rename uploaded file”

    Warning: Parameter 1 to array_multisort() expected to be a reference, value given in /Users/username/Sites/wp_multisite/wp-content/plugins/dropbox-plugin/tdp_main.php on line 68
    File successfully uploaded to your Dropbox!

    Warning: Parameter 1 to array_multisort() expected to be a reference, value given in /Users/username/Sites/wp_multisite/wp-content/plugins/dropbox-plugin/tdp_main.php on line 68
    Error: Can not rename uploaded file

    • http://software.o-o.ro Andrew

      Is uploading working correctly in spite of the error and warning?

      • Reid

        Yes, the upload still works.

        • http://software.o-o.ro Andrew

          That’s strange. It shouldn’t. Do you have multiple boxes on the same page?

          The warning is harmless, it doesn’t interfere with the plugin.

          • reid

            No multiple boxes. I will test it not on a local install and see if that makes a difference.

  • Shawn McCollum

    Say I wanted to use this to allow people to upload videos, but only videos, to my dropbox account. The idea is to create a site where people from around the world could upload a short video where they wish my wife a happy birthday (why they would do so is something that I have yet to work out). Could the plugin be modified to restrict file extensions?

    • http://software.o-o.ro Andrew

      Yes
      In the tdp_main.php file find:

      if (!move_uploaded_file($_FILES['file']['tmp_name'], $tmpFile))
      throw new Exception(‘Can not rename uploaded file’);

      and add this before it:

      $ext = pathinfo($tmpFileName, PATHINFO_EXTENSION);
      if($ext!=”avi”) throw new Exception(‘Not the right extension’);

      You can use this for any extension. I haven’t gotten around to trying it but it should work. Let me know if it does/doesn’t.

      And happy birthday for your wife :D

    • http://software.o-o.ro Andrew

      You may have to retype the ” yourself. They sometimes get messed up when copy-pasting from wordpress.

  • http://mgcomodoro.com mgcomodoro

    I Upload the plugin, but when i tried to activate the file, I receive:

    “Fatal error: Cannot redeclare show_dropbox() in /home3/hernan/public_html/wp-content/plugins/dropbox-plugin/tdp_main.php on line 141″

    How can i solve this??

  • http://mgcomodoro.com mgcomodoro

    well… it seemed that i had another dropbox plugin that conflicted there…
    I think im not using this right… while I was able to publish the directories, i dont seem to find how can i make the users upload files!

    • http://software.o-o.ro Andrew

      Adding

      allowupload=”true”

      to the parameters should do it

      [dropbox ............. allowupload="true"]

  • http://www.scweinfelden.ch Andi

    Hi

    I do have a visitors telling me, that they do only get a message “if you see this you were probably not playing nice, if you were, this error comes from the dropbox plugin”. I was not able to reproduce no matter where I tried this. Might this be cookie-related or something? Can someone give me an advice what I could do or tell them?

    I only found this link about it all: http://software.o-o.ro/dropbox-plugin-for-wordpress/ I’m running the newest version, so the discussion didn’t help me.

    Thank you very much in advance, would be very sad to change onto another plugin, as this one is a real pretty.

    • http://software.o-o.ro Andrew

      Do you have multiple boxes on one page? or are using multiple boxes in general?

  • http://www.scweinfelden.ch Andi

    Oh, that was quick, thank you very much.

    No, I’m just using a single one on the whole page. You can find the box here:
    http://www.scweinfelden.ch/verein/agenda/

    has it possibly something to do with the rights I set or the security settings of the visitors? [dropbox home="/SCW/Trainingsplan" hometext="" allownavigate(false) allowupload(false) separator="" columns=NDS dateformat="d-m-Y" ordering=false]

    • http://software.o-o.ro Andrew

      No that shouldn’t have anything to do with it. That error is part of a way to prevent unauthorised access to other folders/boxes.

      Generally users have to visit the page with the box before downloading (which also prevents hotlinking) are your users attempting to access the download link directly in some way?

  • http://www.scweinfelden.ch Andi

    I did not set any direct link on the file especially not as the files are recently updated. That is exactly why I do like this plugin. I can give every member of the club access to upload and download without any special knowledge.

    So I think the users had no other chance then loading the page including the box and then download the file by click. They do not look as If they’re very common in using pcs.

    • http://software.o-o.ro Andrew

      Could it be possible they’re using download managers? I’ve tried and couldn’t replicate the behaviour. If you could get a user to report step by step how he or she got the error, on what browser and so on maybe that could help narrow it down.

  • http://www.scweinfelden.ch Andi

    Hi Andrew

    Again: Thanks a lot for your Support!

    They tried with IE8 and 9, download managers are non in sight – at least as far as they know. Here is what she told me would apear if she opens the page:
    Agenda
    by age on Jul 26, 2011 • 10:53 amKeine Kommentare

    Warning: Invalid argument supplied for foreach() in /home/unterkla/www/scw.unterklassig.ch/wordpress/wp-content/plugins/dropbox-plugin/tdp_main.php on line 230
    Warning: Invalid argument supplied for foreach() in /home/unterkla/www/scw.unterklassig.ch/wordpress/wp-content/plugins/dropbox-plugin/tdp_main.php on line 62
    Warning: Invalid argument supplied for foreach() in /home/unterkla/www/scw.unterklassig.ch/wordpress/wp-content/plugins/dropbox-plugin/tdp_main.php on line 62
    Warning: array_multisort() [function.array-multisort.php]: Argument #5 is expected to be an array or a sort flag in /home/unterkla/www/scw.unterklassig.ch/wordpress/wp-content/plugins/dropbox-plugin/tdp_main.php on line 68
    Warning: Invalid argument supplied for foreach() in /home/unterkla/www/scw.unterklassig.ch/wordpress/wp-content/plugins/dropbox-plugin/tdp_main.php on line 283
    Spiel- und Trainingsplan als Excel
    HC TG NW_SCW Kalender 2011_2012.pdf

    • http://software.o-o.ro Andrew

      I could only get that to show by navigating straight to http://scweinfelden.ch/verein/agenda/?g=/HC%20TG%20NW_SCW%20%20Kalender%202011_2012.pdf

      (Try the link in another browser /incognito mode)

      The warnings themselves are harmless and do not interfere with the plugin functionality.

      • http://www.scweinfelden.ch Andi

        I see, so the user is one more time the real reason, I will guide him one more time. Thank you very much.

      • Andi

        Hi Andrew

        Rather sorry to bring this all up again, but in between I did hear complainings from different users all around. We sadly have to stop using the plugin because of this. Do you have any other idea? I’d prefer much more likely to keep it up and running.

        • http://software.o-o.ro Andrew

          If you track down this line in the tdp_main.php file and remove it it should “work”

          if($lasttemp!=$anothertemp)die(“if you see this you were probably not playing nice, if you were, this error comes from the dropbox plugin”);

          I’ll take this opportunity to remind you I don’t take any responsibility for what might happen with the line taken out. Or with the line inside for that matter. :)

  • http://www.scweinfelden.ch Andi

    “/home/unterkla/www/scw.unterklassig.ch” of course is my serverpath

  • Stoobydoo

    The dropbox files show OK but when trying to upload, I get Error: Invalid response.

    • Stoobydoo

      Can anyone help me with this or help me to find the cause of the error.  Nothing in the web server error logs.

  • http://www.facebook.com/profile.php?id=600597255 Stewart Dean

    Hi, I’ve got a problem as well, I can see the files and they appear to download but they’re only 4k each. What’s going on. 

    • http://software.o-o.ro Andrew

      Does this help? http://software.o-o.ro/the-dropbox-plugin-working-version/#comment-334262089

      • http://www.facebook.com/profile.php?id=600597255 Stewart Dean

        I’m getting the same problem as Yasyf. Do you know the solution he used?  The path is correct. Is it down to something like case of the folder or spaces in file names?

        • http://www.facebook.com/profile.php?id=600597255 Stewart Dean

          A bit more delving and it’s not a 404 error but this  (xxxx i’ve put in just for quoting here, not the actual path)

          Fatal error:  Uncaught exception ‘DropboxException’ with message ‘%’ in /xxxx/public_html/wp-content/plugins/dropbox-plugin/dropbox.php:501Stack trace:

          #0 /xxxx/public_html/wp-content/plugins/dropbox-plugin/dropbox.php(931): Dropbox->doCall(’0/files/dropbox…’, NULL, ‘GET’, NULL, false, true)

          #1 /xxxx/public_html/wp-content/plugins/dropbox-plugin/tdp_main.php(132): Dropbox->filesGet(‘/Folder/Folder2…’, false)

          #2 /xxxx/public_html/wp-includes/plugin.php(405): tdp_elephant_sandwitch(”)

          #3 /xxxx/public_html/wp-settings.php(302): do_action(‘tdp_elephant_sa…’, Array)

          #4 /xxxx/public_html/wp-config.php(76): require_once(‘/xxxx/p…’)

          #5 /xxxx/public_html/wp-load.php(29): require_once(‘/xxxx/p…’)

          #6 /xxxx/public_html/wp-blog-header.php(12): require_once(‘/xxxx/p…’)

          #7 /xxxx/public_html/index.php(17): require(‘/xxxx/p…’)

          #8 {main}  thrown in /xxxx/public_html/wp-content/plugins/dropbox-plugin/dropbox.php on line 501

          and the short code I’m using is…

          [dropbox home="/Folder/Folder" columns="INS" allowupload="false" ordering="true" showdirs="true" separator=" : "]

          Any suggestions?

          • http://software.o-o.ro Andrew

            That’s a new one. Does the default shortcode with no parameters work?

            • http://www.facebook.com/profile.php?id=600597255 Stewart Dean

              you mean just with the home link? Nope, same problem.

              • http://www.facebook.com/profile.php?id=600597255 Stewart Dean

                With just ‘dropbox’ same issue.

                • http://software.o-o.ro Andrew

                  Is curl installed and working properly? are there any ususual spaces or characters in the folder names?

                  • http://www.facebook.com/profile.php?id=600597255 Stewart Dean

                    Sorry, don’t know what curl is. There’s no unusual spaces in the folder names, but they start with capitals.

                    • http://www.facebook.com/profile.php?id=600597255 Stewart Dean

                      I’m going to have to find another solution as I can see but not download files. Shame, so close.

                    • http://software.o-o.ro Andrew

                      Sorry it didn’t work. If I ever track down what went wrong I’ll let you know.

                    • http://www.facebook.com/profile.php?id=600597255 Stewart Dean

                      Looks like it was host dependent. I think you may be relying on something that WordPress doesn’t require. I moved across to another server and it worked fine. Thanks for plugin and responding to mine and others messages.

                • http://software.o-o.ro Andrew

                  I meant unusual

  • Boris

    Hi, I can’t connect to dropbox so far. I created the app and inserted the keys in the plugin, but on the page it just says: “Don’t forget to connect the plugin to your dropbox”. Any idea?
    Thanx for any help!

    • http://software.o-o.ro Andrew

      Click the link in the options page of the plugin. it should be under the save options button.

      • Anonymous

        same problem here. i’m forwarded to dropbox and told that my session is over and that i should try again.

        • http://software.o-o.ro Andrew

          That’s never happened before. Try logging out and logging back in. also check 
          https://www.dropbox.com/account#applications to see if the app shows up.

          • Anonymous

            the plugin doesn’t show up on the dropbox-applicationpage. re-login dosn’t change anything.

            • http://software.o-o.ro Andrew

              If you’ve saved the keys in the plugin options and then clicked the link to connect it should work, so I’m not sure what causes the problem. I’ve done a test and it works fine for me. Maybe try another browser?

              • Anonymous

                i tested it with ie and firefox.

                • http://software.o-o.ro Andrew

                  Can you provide a screenshot maybe?

                  • Anonymous

                    But when i make a right click on Click here after you saved everything to connect to your Dropbox
                    -> open in a new tab i get the message: Everything should be working now. You may close this window :)

                    But when I open the Page with the [dropbox]-tag i get the message: Don’t forget to connect the plugin to your dropbox

                    • http://software.o-o.ro Andrew

                      I’m getting some odd behavior when opening in a new tab as well. Wile I look into it try simply clicking the link(left click)

                    • Anonymous

                      when i just click on the link alternately the dropbox page opens (and you see the message from the screenshot) and when i click on the linke once again a new tab opens, which is closed immediately.

                    • http://software.o-o.ro Andrew

                      I can’t seem to replicate the issue so there’s not much I can do. You can check your wordpress optinos and see if there is one called tdp_tokens, maybe add the tokens to the database manually.

                    • Anonymous

                      where can i find this optians and do you mean my wordpress-db?

                    • http://software.o-o.ro Andrew

                      To get the tokens you can edit the conn.php file and echo them right before the everything  ok message,

                      In your database in the _options table there should be a row with option_name “tdp tokens” if there isn’t make one and add a value like so:
                      a:2:{s:18:”oauth_token_secret”;s:NNNN:”XXXXXXXXX”;s:11:”oauth_token”;s:MMMM:”YYYYYY”;}

                      where XXXXX and YYYY are the tokens and NNN and MMM are the numbers of characters in each one

                    • Michiel

                      Sorry to inform you that I have the same problem here. As  I looked into the DB tdp_tokens was not set correctly.

                    • http://software.o-o.ro/ Andrew

                      Did settingthem manually fix it?

                    • Michiel

                      nope.
                      Everytime i save the key settings i look in the db and tdp_tokens is a:0:{}

                    • Boris

                      I found the optionstable in the wp-db but no tdp tokens. Adding a row opens so many fields to fill in that I am lost. I know almost nothing about db. :-(
                      Can you give me a guide for dummies on this?

          • Boris

            In dropbox the app shows up. When I hit the 

            Click here after you saved everything to connect to your Dropbox
            a new tab opens with dropbox asking to login. When that is done it says something like “the session has expired. Please return to your app and try again”
            I hit the connect to dropbox button again and now I get a 404 page of my WP side.
            I hit the connect to dropbox button again and I am back to Dropbox sayin my session has expired.
            I hit agin – 404 – again – dropbox session expired and so on.
            Perhaps this behaviour helps to track down the bug?

    • Nándor Bíró

      Hi, at TDP options (after you’ve entered the key and secret and clicked on save) click on the “Click here after you saved everything to connect to your Dropbox”

  • Michiel

    when adding tdp_tokens manually in wp_options as proposed in the other comment there is an error:

    [quote]
    Fatal error: Uncaught exception ‘DropboxException’ with message ‘Access token not found.’ in /home/xxxx/domains/yyyy.nl/public_html/website/wp-content/plugins/dropbox-plugin/dropbox.php:570 Stack trace: #0 /home/xxxx/domains/yyyy.nl/public_html/website/wp-content/plugins/dropbox-plugin/dropbox.php(984): Dropbox->doCall(’0/metadata/drop…’, Array) #1 /home/xxxx/domains/yyyy.nl/public_html/website/wp-content/plugins/dropbox-plugin/tdp_main.php(227): Dropbox->metadata(‘/WebsiteDrop/’, 1000, false, true, false) #2 [internal function]: show_dropbox(Array, ”, ‘dropbox’) #3 /home/xxxx/domains/yyyy.nl/public_html/website/wp-includes/shortcodes.php(206): call_user_func(‘show_dropbox’, Array, ”, ‘dropbox’) #4 [internal function]: do_shortcode_tag(Array) #5 /home/xxxx/domains/yyyy.nl/public_html/website/wp-includes/shortcodes.php(151): preg_replace_callback(‘/(.?)[(wp_capt...', 'do_shortcode_ta...', '[dropbox name="...') #6 [internal function]: do_shortcode(‘[dropbox name=". in /home/xxxx/domains/yyyy.nl/public_html/website/wp-content/plugins/dropbox-plugin/dropbox.php on line 570
    [/quote]
    where xxxx and yyyy as fictious…

    • Michiel

      FYI: in the dropbox account#application it says: You’re not using any Dropbox API Apps.
      In dropbox developers is states that this App is still in development status (aply for productions status).Clicking that says:Please test this appThere are no users linked to this app. Please test this app’s API integration with your dropbox @fea44adae8de0c4dd945c117f7c80346:disqus  yyy.nl account before applying for production status.

      • Boris

        Same thing here. Any Idea how to link users to the app?

  • http://software.o-o.ro Andrew

    In case you’re having issues connecting the plugin to dropbox I’m working on it. 

    • Boris

      Cool! Here is an other curiosity: At the bottom of my member directory I got this message: Warning: session_start() [function.session-start]:
      Cannot send session cache limiter – headers already sent (output
      started at
      /mnt/web9/53/45/5321645/htdocs/Visionautik/Teilnehmer/wp-content/themes/Visionauts/members/members-loop.php:3)
      in /mnt/web9/53/45/5321645/htdocs/Visionautik/Teilnehmer/wp-content/plugins/dropbox-plugin/tdp_main.php on line 98

      • http://software.o-o.ro Andrew

        The warning’s harmless that I know of, you can remove that line if the session is started by something else.

        I managed to sort out the issue with the plugin not connecting properly for new users. Unless the unexpected happens I’ll upload it later today(or tomorrow depending on timezones)

        • Boris

          Thanks for that. Looking forward to the running version.

          • http://software.o-o.ro/ Andrew

            The new version 0.105 is up

            • Boris

              THANKS! Works like a charm.

    • http://twitter.com/HydroPunk69 Carlos Jaramillo

      same issue

      • Andrew

        When making the app on dropbox choose “full dropbox”

  • Mehine Weedster

    sorry iam new to this, bus how can i add the upload function:
    [dropbox]    — where to add allowupload(true)

    • http://software.o-o.ro/ Andrew

      [dropbox allowupload="true"]

      • Mehine Weedster

        thanks, w0rks perfect!

  • Stoobydoo

    Can anyone help- with the error I am getting when trying to upload files.  The folder contents are all displayed correctly but when I try to upload a file, I get Error: Invalid Response returned in red. I have tried with the new version 105 but the same thing happens.

    • http://software.o-o.ro Andrew

      The plugin requires PHP 5 >= 5.2.0, PECL json >= 1.2.0, and CURL

      Do you have all those?

      • Itsme16688

        i have all of those and i’m getting the same message.

        • Stoobydoo

          Yes, I have PHP 5.2.7, json 1.2.1 and CURL enabled.

          • http://software.o-o.ro Andrew

            Not sure what’s going on. Do the files get uploaded correctly?

            • Stoobydoo

              no, the files do not get uploaded

  • Anonymous

    Hi Andrew! I’m having some problems with your plugin. I have the latest version ( 0.105 ), and I have tested with two dropbox accounts, three different apps, and both on localhost and out on the web. I have clicked the connect to dropbox link under TDP options and even printed out the tokens, and made sure they are updated in wp_options table, as well. I always get the same error:

    Fatal error: Uncaught exception ‘DropboxException’ with message ‘The
    provided token does not allow this operation’ in
    /Library/WebServer/Documents/memetor/core/wp-content/plugins/dropbox-plugin/dropbox.php:570
    Stack
    trace:
    #0
    /Library/WebServer/Documents/memetor/core/wp-content/plugins/dropbox-plugin/dropbox.php(984):
    Dropbox->doCall(’1/metadata/drop…’, Array)
    #1
    /Library/WebServer/Documents/memetor/core/wp-content/plugins/dropbox-plugin/tdp_main.php(227):
    Dropbox->metadata(‘/’, 1000, false, true, false)
    #2 [internal function]: show_dropbox(”, ”, ‘dropbox’)
    #3
    /Library/WebServer/Documents/memetor/core/wp-includes/shortcodes.php(206):
    call_user_func(‘show_dropbox’, ”, ”, ‘dropbox’)
    #4 [internal function]: do_shortcode_tag(Array)
    #5
    /Library/WebServer/Documents/memetor/core/wp-includes/shortcodes.php(151):
    preg_replace_callback(‘/(.?)[(wp_capt...', 'do_shortcode_ta...', 'This is the ...')
    #6 [internal function]: do_shortcode(‘
    This is the …’)
    #7 /Library/WebServer/Documents/memetor/core/wp-includes/plugin.php( in
    /Library/WebServer/Documents/memetor/core/wp-content/plugins/dropbox-plugin/dropbox.php
    on line 570

    All I do is adding [dropbox] shortcode without any params to a page. Any idea whats causing this error?

    Thanks!
    Thomas

    • http://software.o-o.ro/ Andrew

      When you created the app, did you make it full dropbox or restricted to a specific folder?

      • Anonymous

        Thanks for the quick reply! Restricted to a specific folder only, as I thought that was the only option for dev?

        • http://software.o-o.ro Andrew

          The folder option is new and I haven’t tested it with the plugin yet. Try full.

          • Anonymous

            Thanks! That did the trick! Is there any chance the plugin will support the App folder access type of dropbox?

            • http://software.o-o.ro Andrew

              I’ll add it to the to do list but no promises

    • osama algendy

      i have also the same problem

  • Nándor Bíró

    hi, I have the following issue:
    the connection works, it shows the file list on the page, but if I click on an item I always get this:

    Warning: Invalid argument supplied for foreach() in /var/www/vhosts/mydomain.com/httpdocs/wp-content/plugins/dropbox-plugin/tdp_main.php on line 230

    Warning: Invalid argument supplied for foreach() in /var/www/vhosts/mydomain.com/httpdocs/wp-content/plugins/dropbox-plugin/tdp_main.php on line 62

    Warning: Invalid argument supplied for foreach() in /var/www/vhosts/mydomain.com/httpdocs/wp-content/plugins/dropbox-plugin/tdp_main.php on line 62

    Warning: array_multisort() [function.array-multisort]: Argument #5 is expected to be an array or a sort flag in /var/www/vhosts/mydomain.com/httpdocs/wp-content/plugins/dropbox-plugin/tdp_main.php on line 68

    Warning: Invalid argument supplied for foreach() in /var/www/vhosts/mydomain.com/httpdocs/wp-content/plugins/dropbox-plugin/tdp_main.php on line 283

    How can I fix this? Thank you for the help in advance!

    • http://software.o-o.ro Andrew

      Does the plugin work in spite of the warnings?

      • Nándor Bíró

        only the filelist appears (the home=”" parameter works too). If I try to download with click on an item I get that warnings and the list-items disappears

        • http://software.o-o.ro Andrew

          I’ll upload a fix later today. Meanwhile in tdp_main.php you can add this before line 230
          if(is_array($stuff)){

          then find the line with 
          else $output=”Don’t forget to connect the plugin to your dropbox”;
          and add } before it

          Let me know how it works on a multisite install, as far as I know you’re the only one to try it so far.

          • Nándor Bíró

            The codes have added to the tdp_main.php. Now there is no warning message but the download doesn’t start neither.
            After clicking on an item, the filelist table disappears and I only see the path (which used to shown on the top of the table (eg.:home~sample_dir~file.pdf)).
            If I click on many times fastly on the file.pdf in that path something generates a 0-1 kb size pdf file which is corrupted.
            So I got the same result as earlier but without warnings. :-/
            The upload works perfectly!
            Any other suggestions?
            thanks for the help so far!

            • Andrew

              There might be a conflict with another plugin. Can you try disabling the other ones and enabling them one at a time?

              • Nándor Bíró

                I disabled all the relevant plugins. After the WP-Filebase plugin deactivation the dropbox plugin seems to be working so after clicking an item on the list, the list doesn’t disappear and the download starts. It works with doc and png files but with pdf and docx files I get only a 1kb size corrupt file with the original filename. I deactivated the dropbox plugin then activated again. It’s still wrong.
                There are some network-activeted plugins (so activated on all site of the multisite): Akismet (for avoid spam), Google Analyticator, JetPack (connection with wordpress.com), Wp-Backup and Wp-Stats-Dashboard. I didn’t deactivate theese plugins. Should I?

                • Nándor Bíró

                  inside the corrupted pdf file I see this:

                  Fatal error:  Uncaught exception ‘DropboxException’ with message ‘%’ in /var/www/vhosts/mydomain.com/httpdocs/wp-content/plugins/dropbox-plugin/dropbox.php:501
                  Stack trace:
                  #0 /var/www/vhosts/mydomain.com/httpdocs/wp-content/plugins/dropbox-plugin/dropbox.php(931): Dropbox->doCall(’1/files/dropbox…’, NULL, ‘GET’, NULL, false, true)
                  #1 /var/www/vhosts/mydomain.com/httpdocs/wp-content/plugins/dropbox-plugin/tdp_main.php(132): Dropbox->filesGet(‘/gtk/3_felev/bi…’, false)
                  #2 [internal function]: tdp_elephant_sandwitch(”)
                  #3 /var/www/vhosts/mydomain.com/httpdocs/wp-includes/plugin.php(405): call_user_func_array(‘tdp_elephant_sa…’, Array)
                  #4 /var/www/vhosts/mydomain.com/httpdocs/wp-settings.php(304): do_action(‘init’)
                  #5 /var/www/vhosts/mydomain.com/httpdocs/wp-config.php(100): require_once(‘/var/www/vhosts…’)
                  #6 /var/www/vhosts/mydomain.com/httpdocs/wp-load.php(29): require_once(‘/var/www/vhosts…’)
                  #7 /var/www/vhosts/mydomain.com/httpdocs/wp-blog-header.php(12): require_once(‘/var/www/vhosts…’)
                  #8 /var/www/vhosts/n in /var/www/vhosts/mydomain.com/httpdocs/wp-content/plugins/dropbox-plugin/dropbox.php on line 501

  • elm

    Hi,
    First of all thanks for that great plugin, it’s really nice.
    Unfortunately I’ve got a problem with the download of large files. When I try to download a large file, first it takes relatively long until the download message is displayed and then it shows a file size of 0 or 246 bytes, no matter how large the original file was. The largest file i’ve tested for download and that worked was 8MB. 16 MB didn’t work, and neither did larger ones (up to 120MB).
    I’ve already tried to increase WP_memory_limit, but it didn’t help.
    Do you have any idea how to solve that?
    thanks,
    Elm

    • Andrew

      It’s to do with php settings as it loads the file and then writes it out. It doesn’t ‘stream’ it.

      • elm

        do you know which settings these are? are the files loaded into (php) memory before offering them for download or are they written as a file to the server before the download?

        • http://software.o-o.ro Andrew

          They are loaded into memory

  • Lolivovv

    Hello, I am not very familiar with programming, and I am trying to get this to work. I get the message that i should connect my plugin to dropbox. I also dont know exactly where and how i put the parameters for the shortcode…Also, with dropbox, is it ok that my app is statused as development? Please help! This seems like the perfect plugin for me… Thanx, and sorry for ignorance.

    • Andrew

      Yes development is fine since your account is the only one connected to the app. :) (Make sure that the app is set to full dropbox when making it though)

      After you input the codes from dropbox into the plugin’s options page and save, click the link under the fields, and give it permission to access the files. That should do it. 

      • Lolivovv

        thanks Andrew. I did this, but I still get the message to connect the plugin to dropbox. I filled in my email and pass in the empty fields next to the codes in the settings panel. but still doesnt work… hm. any ideas?

        • Lolivovv

          I now have the box connected, but nothing appears on the page… hm

          • Andrew

            Did you make sure the app is set to full dropbox? Does anything show up for using just [dropbox] on the page/post?

            • Lolivovv

              hey, if i put just dropbox the whole dropbox shows with all files and folders-great! thing is i want to put the parameters for upload and download and such-.. how? i now tried to put this; mabe its wrong… [dropbox home=”/docs” allowdownload="true" allownavigate="true" allowupload="true"]

              • Lolivovv

                i now got this to work too! fantastic, the only thing i dont get to work now is the upload button! i get this: Error: Can not create temporary directory!home~docs~

  • Pingback: MMXII

  • BI News

    Hello Andrew
    I’m a litlle bit noobs on wordpress and I don’t how to put this code.
    Could you told me where must I have to setup this ?
    I’ve followed step 1/2/3/4 and then, where do I have to put the code please ?
    Thanks

    • Andrew

      In your wordpress admin menus you should see “TDP Options”. There/

      • BI News

        Waouw, you’ve already answered, , thanks !
        Yes I’ve updated the options and put the 2 keys.
        The point is after, how do I have to put the shortcode
        Thanks

        • http://www.facebook.com/tiagoluizd Tiago Luiz Dos Santos

          I also would like to know that. This seems to be very useful for what I am doing, but don’t know how to see the TDP Options.

          • http://twitter.com/SOLUTIONBI SOLUTION BI

            Hello
            Someone could help us please ? Rgds

            • Andrew

              [dropbox parameter1="value1" parameter2="value" …]

  • Jeff Ducharme

    Hello Andrew,

    You are a magician!! Thank you so much for your wonderful dropbox plugin. It’s doing practically everything i’d like right out of the box, with a few exceptions.

    Will you be adding support for creating / deleting files/folders? Maybe adding an option on the settings page to increase/decrease the upload/download limits.

    Otherwise. I could kiss you for this. Can you heal people with your touch too? Cuz you are seriously a miracle worker!

    • Andrew

      The local doctor’s union doesn’t allow me to get within touching distance of people anymore. 

      I’m not planning on adding creation/deletion options since that goes beyond the original scope of the plugin, but I might add upload/download limits.

  • Jeff Ducharme

    I’m getting this error Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 489441 bytes) in wp-content/plugins/dropbox-plugin/dropbox.php on line 434

    tried adding a php.ini file to my admin dir with this code in it. didn’t help

    memory_limit = 100M
    upload_max_filesize = 192M
    post_max_size = 100M
    file_uploads = On

  • Jeff Ducharme

    Also getting this error when trying to upload a .rb file Error: Invalid response.

  • Laurence

    Hi, firstly thanks for the plugin…it is working fine on my local development machine, but I get an error when trying to download from a live site. The contents of the file are as follows;

    Fatal error:  Uncaught exception ‘DropboxException’ with message ‘%’ in E:Domainsmxxxx.comuserhtdocsmLocalwp-contentpluginsdropbox-plugindropbox.php:501
    Stack trace:
    #0 E:Domainsmxxxx.comuserhtdocsmLocalwp-contentpluginsdropbox-plugindropbox.php(931): Dropbox->doCall(’1/files/dropbox…’, NULL, ‘GET’, NULL, false, true)
    #1 E:Domainsmxxxx.comuserhtdocsmLocalwp-contentpluginsdropbox-plugintdp_main.php(133): Dropbox->filesGet(‘/mLocal/Process…’, false)
    #2 [internal function]: tdp_elephant_sandwitch(”)
    #3 E:Domainsmxxxx.comuserhtdocsmLocalwp-includesplugin.php(405): call_user_func_array(‘tdp_elephant_sa…’, Array)
    #4 E:Domainsmxxxx.comuserhtdocsmLocalwp-settings.php(304): do_action(‘init’)
    #5 E:Domainsmxxxx.comuserhtdocsmLocalwp-config.php(90): require_once(‘E:Domainsmma…’)
    #6 E:Domainsmxxxx.comuserhtdocsmLocalwp-load.php(29): require_once(‘E:Domainsmma…’)
    #7 E:Domainsm in E:Domainsmxxxx.comuserhtdocsmLocalwp-contentpluginsdropbox-plugindropbox.php on line 501

    Any ideas? Thanks in advance!

    • Andrew

      Not sure what’s going on there. Do you have curl up and running? php5+? Any other significant difference between the two server setups?

  • Kapsicum

     Great plugin ! but i’m confronted with a mysterious bug…
    No PHP error, nothing… connexion between the plugin and Dropbox is well done…. listing files ok… but, the filenames do not appear !
    (look at the screenshots)

    Any issue ?

    • Andrew

      Until I can look into it further did you make sure to include N in the columns parameter? Maybe a link to the site in question would help. You can send it via the contact form if you don’t want it listed in the comments.

      • Kapsicum

        Here is my shortcode… but including the N parameter, didn’t resolve the issue…

        [dropbox columns="INDS" home="/" hometext="Espace dropbox" allowdownload="true" allownavigate="true" allowupload="false" ordering="false" separator=" » " dateformat="d M Y - h:i:s"]

        • Kapsicum

          We finaly found out a solution !

          File : tdp_main.phpFunction : placenames()

          [BEFORE]$ou.=”“.trim(strrchr($temp, “/”),”/”).”“;[AFTER]
          $ou.=”“.trim(strrchr($itm["path"], “/”),”/”).”“;We replace $temp by $item["path"] and everything goes well.Another change, is to comment this line in the function tdp_upload()ini_set(‘memory_limit’, ’32M’);it makes domino-crash the PHP execution and other plugin.

          • Kapsicum

            But there are still a little little bug….

            When downloading a JPG file…. Windows Viewer doesn’t show it…. despite Photoshop who didn’t have any problem to handle it.

            With your demo plugin, this problem doesn’t appear…

            very vicious bug this one…

  • Stephan S.

    Hey,
    i have a problem. if the upload function is true and i upload a file, i get the following Error: Can not create temporary directory! 
    please help me

  • Diego Emme

    Hi,

    i’d like to hotlink to my dropbox folder
    it is possible?
    thank you

    • Andrew

      No that’s what the public folder is for ;)

  • http://www.facebook.com/apa.saja Apa Saja

    http://natal25desember.com/tes/

    I tested your plugin. It connects to my dropbox account. Just connect, no more.

    I got error message with this shortcode [dropbox allowupload(true)]

    Fatal error: Uncaught exception ‘DropboxException’ with message
    ‘The provided token does not allow this operation’ in
    /home/natal252/public_html/wp-content/plugins/dropbox-plugin/dropbox.php:570
    Stack
    trace:
    #0
    /home/natal252/public_html/wp-content/plugins/dropbox-plugin/dropbox.php(984):
    Dropbox->doCall(’1/metadata/drop…’, Array)
    #1
    /home/natal252/public_html/wp-content/plugins/dropbox-plugin/tdp_main.php(227):
    Dropbox->metadata(‘/’, 1000, false, true, false)
    #2 /home/natal252/public_html/wp-includes/shortcodes.php(235):
    show_dropbox(Array, ”, ‘dropbox’)
    #3 /home/natal252/public_html/wp-includes/shortcodes.php(151):
    do_shortcode_tag(‘show_dropbox’, Array, ”, ‘dropbox’)
    #4 /home/natal252/public_html/wp-includes/plugin.php(170):
    do_shortcode(Array)
    #5 /home/natal252/public_html/wp-includes/post-template.php(167):
    apply_filters()
    #6
    /home/natal252/public_html/wp-content/themes/neoclassical/page.php(15):
    the_content()
    #7 /home/natal252/public_html/wp-includes/template-loader.php(43):
    include(‘/home/natal252/…’)
    #8 /hom in /home/natal252/public_html/wp-content/plugins/dropbox-plugin/dropbox.php on line 570

    Please your enlightenment for me.

    • Andrew

      Make sure the app permissions are set to full dropbox when you create it.

      • http://www.facebook.com/apa.saja Apa Saja

        I want to put upload buttons in widget (without “explorer view”).
        I put the shortcode, but I cannot hide “explorer view” in widget.

        • Andrew

          There is no such functionality at the moment but seeing as how you’re the second to request it i’ll try to add it this week.

          • http://www.facebook.com/apa.saja Apa Saja

            Thank you.
            Full-page view and widget view are needed

  • Friis

    Hi Andrew – and thanks for the great plugin – I have one isssue though – I get errors whenever I try to upload to Dropbox….

    Warning: mkdir() [function.mkdir]: open_basedir restriction in effect. File(/tmp/theDdropboxPlugin-4f79a2b3be729) is not within the allowed path(s): (/var/www/web314) in /var/www/web314/web/wp-content/plugins/dropbox-plugin/tdp_main.php on line 338

    Error: Can not create temporary directory!

    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/tmp/theDdropboxPlugin-4f79a2b3be729) is not within the allowed path(s):
    (/var/www/web314) in
    /var/www/web314/web/wp-content/plugins/dropbox-plugin/tdp_main.php on
    line 359This is what I wrote…:[dropbox home="/dealers/dealer2"
    hometext="Dropbox" Name="default value" columns="INDS"
    allowdownload="true" allownavigate="true" allowupload="true" separator="
    >>> " dateformat="d M Y - h:i:s" showdirs(true)]

    Cheers, Jesper

     

    • Andrew

      My guess is that your hosts restricts usage of those functions. Give them a call/email about it.

      • Friis

         Hi Andrew I contacted the host – they replied that the prot for this particular website is: /var/www/web58/… Where can I correct this?

        • Friis

           Hi – again Andrew…. Could you (or anyone who knows the answer) point me in the direction of where in the code to correct the path for uploading to DropBox via the plugin?

          Many thx in advance, Jesper

          • Reggiescottjr

             I too am having the same problem Friis. Did you ever find a solution?

  • Rev Alice

    Is it possible to open the file in a new tab ?

    • Andrew

      You should be able to edit the link to the file in the plugin files and add target=”_blank” to it

      • Rev Alice

        Sorry I try but I don’t find were !

  • Audra

    wondering if its slow for anyone else?

    • Andrew

      Is your installation slow or is the demo slow?