Jump to:

10931 Posts in 2614 Topics by 1810 members

All other Modules

SilverStripe Forums » All other Modules » Bulk Uploader Module: Testers needed!

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2 3 4 5 6 7 8
Go to End
Author Topic: 12774 Views
  • UncleCheese
    Avatar
    4085 Posts

    Re: Bulk Uploader Module: Testers needed! Link to this post

    Ahh.. I see it now. Yeah, Safari doesn't like something there. I took out the scrolling for now. Do another checkout.

    Until I get a stable version, I think I'll stick with SVN. It's too much to keep track of to have zip files floating around all over the place when I'm making dozens of updates every day.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Bulk Uploader Module: Testers needed! Link to this post

    As far as your syntax error, you're going ot have to look at your Resource.php file. I'm not sure what is causing that. Looks like a missing comma or something.

  • Amir Mostofi
    Avatar
    Community Member
    59 Posts

    Re: Bulk Uploader Module: Testers needed! Link to this post

    OK, it all works now. I don't actually mind the lack of fixed height scrolling. It's now controlled by the height of the container iframe and its scrollbar.

    I have a question regarding listing the files in a template file. When I use a code similar to the following, the files and their attributes get listed, however, they are in the order originally imported and attached to a page, not in the re-sorted order using sortable_dataobject.

    -----------------
          <% if Resources %>
          <% control Resources %>
          <p>$PDF.URL - $Name - $Description - $PDF.FileType - $PDF.Icon</p>
          <% end_control %>
          <% end_if %>
    -----------------

    What am I doing wrong?

  • Amir Mostofi
    Avatar
    Community Member
    59 Posts

    Re: Bulk Uploader Module: Testers needed! Link to this post

    OK, I noticed the database field 'SortOrder' in table 'Resource' and wrote the following the function and used it as a page control. It all works. Please let me know if there was an easier way.

    ----------------
       public function GetFiles() {
          $Files = DataObject::get("Resource", "PageID = {$this->ID}", "SortOrder ASC","", "");
          return($Files) ? $Files : false;
       }
    ----------------

  • Amir Mostofi
    Avatar
    Community Member
    59 Posts

    Re: Bulk Uploader Module: Testers needed! Link to this post

    If I decide not to use the swfupload module and the 'Upload Files' links on the left, can you please tell me what I need to remove besides the whole of swfupload folder. What code in bulk_uploader do I need to remove / comment out?

  • UncleCheese
    Avatar
    4085 Posts

    Re: Bulk Uploader Module: Testers needed! Link to this post

    Hey, Amir,

    That's actually something I've been struggling with on the SortableDataObject class -- forcing a sort order without requiring any code from the user. And seeing your note prompted me to look back into it. I think I've got it working. I'm pretty psyched.

    Can you check out from:

    http://svn.codespaces.com/carlinowebdesign/sortable_dataobject

    Shouldn't need that function anymore. The sort should be implicit.

    As far as removing SWFUpload, it's pretty well baked into the module. That's really the whole point -- bulk uploading.

    Glad it's working for you. Keep doing checkouts. Development continues rapidly!

  • Amir Mostofi
    Avatar
    Community Member
    59 Posts

    Re: Bulk Uploader Module: Testers needed! Link to this post

    I checked out the latest SVN for sortable_dataobject. But when I do a dev/build, the following error appears:

    Fatal error: Bad class to singleton() - GalleryPhoto in /Users/Amir/Sites/silverstripe/sapphire/core/Core.php on line 263

  • Amir Mostofi
    Avatar
    Community Member
    59 Posts

    Re: Bulk Uploader Module: Testers needed! Link to this post

    The reason for wanting to remove the 'Upload Files' link on the left are:

    1. We already have the 'Files & Images' section of SS which allows creation of folders/subfolders, uploading of files and moving them between folders.

    2. In the swfupload module, we can only define a central location for all files to be uploaded. I'm referring to

    'file_destination_path' => '/assets/' (or similar) defined in swfupload/_config.php

    It would be nice if each time you use the swfupload to upload files, you could dynamically choose one of your existing assets folder as the destination.

    Or at least, if we were to create two instances of the bulk uploader (say one with a 'Files' tab and the other with an 'Images' tab for example), we could define the destination folders in the two instances as

    'file_destination_path' => '/assets/uploads/files/'

    and

    'file_destination_path' => '/assets/uploads/images/'

    respectively.

    12774 Views
Page: 1 2 3 4 5 6 7 8
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.