Extending Tidypic - Idea!

Hi. I think this addition would be greatly appreciated by developers.

For me, my site does posts (such as news posts) but for nightclubs, events, etc. I want to integrate photo albums into these groups, but I don't want to create my own photo album. 

 

So what I'm suggesting is a way to extend tidypics so that I can do is call the certain function I need.

 

For example:
On the form, i can call a view to show the upload box and upload the picture for taht entity
elgg_view('tidypics/add_profile_picture', array('entity'=> $vars['entity']));

 

then to displace it I would use
elgg_view('tidypics/view_profile_picture', array('entity'=> $vars['entity']));

 

Then for albums we can do things such as:
elgg_view('tidypics/filmstrip', array('entity'=> $vars['entity'], 'position'=> 'horizonal/vertical'));

This would show you about 7 picture or so in a horizontal or vertical form, then you click on one and it takes you to that picture in the album

 

Honestly, I wouldn't know how to thank you guys enough for this. It would expand tidypics SO much! Just think of the possibilities!

  • Afrog2,

    You can extend this by generating a TidyPics Extension plugin that implement the views you are requesting.

    I had a similar thought regarding your process and I re-wrote TidyPics to be more object oriented, essentially having something called TidyPicsDelegator which delegates all your requests through TidyPics objects.

    The reason I wanted to do this was to generate "anonymous" albums and pictures, where they're not owned by anyone.

    I expose a set of public static methods that essentially live on to expedite view design, abstracting all common model operations. An example of code is:

     

    $pic = new TidyPicsImage();
    TidyPicsHelper::generate_upload_form($pic); // this will output a form, that will save it into $pic
    ...

    //now, I want to show this image

    $pic->display_image(); //will echo the image out using proper header/mime settings

    //now, I want to persist image to an ElggObject // ElggFile

    $elggFileGUID = $pic->persist(); // persists and returns my guid.

     

    I'm planning to release this as soon as I can after I discuss it with TidyPics developers.

  • That would be extremely helpful! I really hope it gets released soon so that I can implement it into my system. You would never be able to tell if my site was on an elgg engine or not :P