Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthormisterbrandt
    • CommentTimeFeb 11th 2008 edited
     permalink
    I have an early version of my Upload Manager module available for testing - it seemed to make sense to solicit feedback BEFORE the big push to get a final release out the door. In its current form, it is pretty much feature-complete in terms of accessing already-uploaded files, but upload capabilities are still on the to-do list.

    This module gives you a thumbnail/list view of the contents of your upload folder, and when a file is selected, the active HTML snippet/template is used to insert that image into the body of the text feather. Templates can be customized and saved via the "settings" page for this module.

    FEATURES:
    • gives you easy access to the contents of your upload folder as you are composing your text feather
      [*] thumbnail view / list view
      [*] preset, customizable templates for inserting images into
      [*] compatible with WYSIWYG module
      [*] comes with a stand-alone phpThumb module (required) that handles thumbnail generation, as well as providing smart resizing of images inserted into posts (width to match content width)


  1. TO-DO:
      [*] better auto-detection of chyrp's install path
      [*] "upload to this folder" mini-form
      [*] option to limit users to /upload/%username%/ folder
      [*] enable/test for other feather pages (currently only enabled for Text Feather)
      [*] add %CONTENTWIDTH% as a variable for templates, add to settings page
      [*] improved "list view" CSS
      [*] improved interaction with [url=http://chyrp.net/extend/view/21]Unplucked[/url] module, so that interacting with upload manager form fields doesn't count as "editing" the feather

    So, please download and try it out. Post your comments/suggestions/feature requests in this thread, and I will get working on the next release. (download .ZIP includes both the Upload Manager and phpThumb modules) I have been testing in 1.1.2 (.yaml) so I think it should work in 1.1.3 as well.

    Edit: REQUIRES AN UPDATED YAML PARSER. DO NOT USE ON VANILLA CHYRP INSTALL
    Needs Spyc 0.2.5 to be uploaded to /chyrp/includes/lib/ to overwrite the buggy Spyc 0.3 that ships with Chyrp 1.1.x (see this thread). Alex has fixed this in SVN, but the PHP5 instability has prevented a release with this included yet.
    •  
      CommentAuthorSimon
    • CommentTimeFeb 11th 2008 edited
     permalink
    Hmm, I think it broke my development install of Chyrp. Looks like it's looping, nothing seems to load anymore.

    Guess a warning is in place: do not install this on your main Chyrp site.

    Edit:

    Ah, got an error for ya now:

    Fatal error: Maximum execution time of 30 seconds exceeded in /blabla/path/chyrp/includes/lib/spyc.php on line 315

    (fixed it now by deactivating the module)
  •  permalink
    Oh crap. Yeah, I totally forgot. Sorry, Simon. I have been there as well. If you need to repair you install, open /includes/config.yml.php and delete any config items associated with the upload manager. (I have been in that position many times.)

    I edited the original post, but let me reiterate:
    REQUIRES AN UPDATED YAML PARSER. DO NOT USE ON VANILLA CHYRP INSTALL

    The YAML parser that ships with Chyrp 1.1.x does not do well with multi-line data, as Simon has discovered. This module requires the last stable version of the YAML parser -- Spyc 0.2.5 -- to be uploaded to /chyrp/includes/lib/ to overwrite the buggy Spyc 0.3 that ships with Chyrp 1.1.x (see this thread). Alex has fixed this in SVN, but the PHP5 instability has prevented a release with this included yet.
    • CommentAuthorSneak
    • CommentTimeFeb 11th 2008
     permalink

    Thanks misterbrandt — this looks perfect for what I need :)
    I don’t have much time to play with it right now, but initially when I try to enable the module it hangs on the AJAX loading bar. If I cancel and refresh the page, then it turns up as being active but the Uploads drawer doesn’t expand on the Write page. I updated Spyc before installing, so I’ll keep an eye on this thread — maybe I’ve missed something.

    • CommentAuthorAlex
    • CommentTimeFeb 11th 2008
     permalink
    Found a few bugs, one of which was Chyrp's fault and I've fixed in SVN.

    1. The notification wasn't working because the quotes around "upload" were breaking the JSON string. This has been fixed.
    2. This line:
    if ( <?php echo in_array('wysiwyg', $config->enabled_modules) ?> ) {
    breaks the JavaScript because it won't output anything if it's false (you end up with if ( ) {).

    I'd suggest changing it to be something like:

    <?php if ($misc->module_enabled("wysiwyg")): ?>
    tinyMCE.execCommand('mceInsertRawHTML', false, template);
    <?php else: ?>
    $('#body').replaceSelection(template);
    <?php endif; ?>
  •  permalink
    Sneak, thanks for the report. I have seen that "hangs while enabling" thing occasionally before -- my suspicion is that it is Spyc struggling to handle multiline data. but it is not consistently reproducible, at least on my end. Perhaps I can make the initial templates single-line and see if it runs a little more smoothly.

    All of a sudden on my test install the "uploads" dealie isn't expanding either. i must have borked it late last night or early this morning in my rush to get it out. i will investigate this evening... not a very smooth beta release, even for "beta" :)
    • CommentAuthorAlex
    • CommentTimeFeb 11th 2008
     permalink
    misterbrandt: That JSON parsing glitch was the cause for the hanging.

    Found another bug - phpThumb() is trying to render my mp3 file. Ouch. :P
  •  permalink
    Alex, under what circumstances is it rendering your mp3? is the file extensions filter not catching it as a non-image file?
    • CommentAuthorAlex
    • CommentTimeFeb 11th 2008
     permalink
    Not sure, haven't checked the code. You should probably do a file extension check though either way.
    • CommentAuthorSneak
    • CommentTimeFeb 11th 2008
     permalink

    I got the module operational using the fix Alex mentioned above, and after changing the image folder path in the config file (my Chyrp install is in the server root, rather than a /chyrp subfolder) I was able to add an image to my post just fine :)

    I’ll keep playing with it and let you know if I find anything else unusual. The image upload form feature will be really handy when it gets added.

  •