Windows Live Photo Gallery and CakePHP - windows

I am currently working on a CakePHP application that includes among other things a photo album that will be mainly maintained by an administrator.
I have now started to develop the Photo Album section of the site and was wondering about he following:
I know I have still to research into Windows Live Photo Gallery API
I am planning on using CakePHP Media Plugin to process my uploads and place each pictures in its corresponding folder.
However, what is the best approach to tackle this?
Should I create a Model/Controller with functions to handles this. For examples wluploads.php for the model and wluploads_controller.php. The model would then actsAs the Media Plugin.
Within the controller I would have actions like function upload(){, etc, to handle automatically/looped file uploads.
Is this a good approach. Can someone shed some light into some better approach?
Thank you very much!

You may find it easier (if you're comfortable with cakephp) just to create your own models/controllers and write the corresponding actions than using a plugin.
Should I create a Model/Controller with functions to handles this. For examples wluploads.php for the model and wluploads_controller.php. The model would then actsAs the
Media Plugin.
Within the controller I would have actions like function upload(){, etc, to handle automatically/looped file uploads.
Is this a good approach. Can someone shed some light into some better approach?
That is pretty much how I would do it - make a mode/controller with the relevant actions (upload_image etc) and post to the WL Photo Gallery API.

Related

View Controller with Multiple sub views

I have a website page which I need to replicate in my app (as a reference for anyone that wants to help the url is http://www.sccgformulary.co.uk/gis.html) There is a title, some sub-headings, plenty of text in different sections and a few different tables. The colouring in the background isn't needed.
My question is how would this be implemented in Interface Builder (if it is even possible?) I don't know how to design the layout of a page which extends further than 1 screen. I've done it before programatically - is this the only way to design views which need a scrollview with multiple subviews? any help would be greatly appreciated!
What you are looking for is probably a simple UITableView with a custom UITableViewCell.
You might need some way of feeding data to your application via a web service. JSON is popular. but before you go ahead I suggest you read up on UITableView and look at some similar Apps to find out exactly what you want.

wordpress plugin making friendly URLs and accessing variables

I've been searching for a couple of days for a particular answer to my question. I have written a custom plugin for wordpress which we will be using on our site. It was easier to make this a custom plugin rather than trying to use or hack existing ones.
As an example, let's say we are selling cars. My plugin lets us create a new car, upload a photo and write reviews about that car. This is all done through my plugin.
I now need to integrate that to the existing site using friendly urls.
I'd like domain.com/cars/ford-focus/2234 as the url. that would look like index.php?pagename=cars&model=matched[1]&otherid=matched[2]
also domain.com/category/hatchback would be index.php?pagename=category&cat=matched[1]
Both those urls would call a function and I will display the records on the page.
I am really struggling as to whether I create a page called "cars" and have a [shortcode] or do I handle everything in my plugin and rewrite urls. I have tried all sorts and its just not working. I don't know if I fully understand the way it works!?
Also - I have tried the route of using custom post types etc, but for our needs it's not right.
Thanks for any help!!

Symfony Sonata AJAX image multi-upload

I am trying to create a portfolio site and am stuck finding a good approach to deal with images. I have integrated the SonataAdmin Bundle and have setup Admin classes for "Projects" and "Images". My goal is to go into a Project and add images to it and select one of these images as the Project thumbnail.
Ideally I would like to integrate an AJAX multi-uploader. I am not sure the best approach for this and am looking for any suggestions / thoughts.
I have looked at the Sonata Media Bundle, though it seems more robust than I actually need and the learning curve to customize it seems a bit steep. I have already setup an image entity (symfony2 cookbook for uploading documents) I imagine I can create a many-to-one on images and projects rather than using the MediaBundle, though I am still at a loss of how to integrate an AJAX script for this.
Thanks in advance for any advice!
Shawn
I suggest you to look at https://github.com/punkave/symfony2-file-uploader-bundle
This bundle is based on the excellent blueimp jQuery-File-Upload package and provides multiple file uploads.
Edit 28/04/14: There is now also OneupUploaderBundle which supports a variety of uploaders and seems to be under more active development.
checkout https://github.com/ruian/RuianUploadifyBundle its support multiupload but only with flash plugin.
Also this bundle is worth a shot. Not really mentioning AJAX, but seems really strong in basic uploading features. Once you get that done, you can ajaxify by yourself. I'm planning to try this bundle in few days, I may update this answer later.
So I endedup using Valumns Ajax multi uploader: http://valums.com/ajax-upload/
I tried to customize the Sonata Admin Page but this proved a bit difficult, Instead I simply created a route / controller / view specifically for uploading batch images. It seems to be working great!

Implement drag-and-drop using AJAX in CakePHP

I wish to create a drag and drop feature for adding profile picture using CakePHP. Are there any samples which I can follow or a step by step guide?
I sourced many samples online but none of them cater for CakePHP.
I basically need a simple drag n drop for users to drag their profile image and the URL of the image is reflected in the database. The user will be able to edit another profile image. What approach should I use for this?
what you want to do is mostly about front-end, the back-end is generic server handling (in this case, PHP upload handling) and has little to do with Cake. That's why you don't see a specific cake tutorial for this. So, look up jquery drag drop and ajax upload. You'll also need to understand Cake rather well (well enough to adapt those online sample code to your Cake app).
I recommend you to use jQuery UI's draggable and droppable interactions.
Integrating them in CakePHP is quite easy, just follow the manual instructions to include Javascript files in a CakePHP application.
Finally, updating the database to reflect the URL of the image can be easily done with jQuery as well, using the AJAX related methods (e.g. post).

Extend iPhoto to post pictures to a different web service?

Currently iPhoto lets me upload pictures to Facebook and Flickr.
Is there any way (perhaps write a plugin) to extend this so that I can post photos to a different web service e.g. Picasa?
Its possible. If you are looking for a Picasa plugin, though, Google already has one (I haven't used it in the current version of iPhoto). If you are looking to develop your plugins, this article might help.

Resources