Archive for the ‘PHP’ Category

Simple image gallery with Flex and PHP

Sunday, August 3rd, 2008

Pictures demo screenshot

Here you go as a promise to a friend to have this uploaded this weekend. I’ve included the source code. Just do the right click and choose View Source on the demo or click here.

Here are some notes for navigating the demo:

  1. To create, rename or delete category use the button on the top of the screen.
  2. To view the content of the category, click the category name.
  3. To delete the picture(s), drag and drop them to the bar at the bottom of the screen.
  4. To assign the picture(s), drag and drop them to one of the listed category on the first container. By default dropping the picture(s) will move the picture(s) to different category. To copy them to different category, hold control (ctrl) key while dropping the picture(s).
  5. To upload your picture(s), click the “Upload Picture(s)” button. It will redirect you to the demo of my previous post. I have not put a link back to this demo from the uploader, so you can just press the browser’s back button :D
  6. To view a larger picture, double click the thumbnail

The code is still kind of messy and I don’t have time to refactore them (If any of you guys can do it, please do and let me know :) ). The main purpose of this app is just a playground for me for learning stuff. Within this app I am using:

  1. Flex
  2. PHP
  3. AMFPHP – to communicate between Flex and PHP
  4. flexlib – Google Code – for the flowbox as the categories container
  5. MySql – to store the images and categories data
  6. Misc stuff I took from here and there

Anyway, I’ve included everything (including the sql script to create the database). Feel free to use it and if you have any question feel free to shoot it. Have fun.

PS: I might miss some of the source files (unlikely). If I did, please let me know.

Multiple File Upload with Flex and PHP

Thursday, July 17th, 2008

Flex File Upload

I needed to create a FLEX file uploader with PHP on the server side. So I googled “flex upload”, found this site 9 Flex File Upload Examples Visited and found what I was exactly looking for on the first link (Flex File Upload Component).

So, I grabbed and did play a little bit by adding this stuff:

  • Filtering for the file type
  • Limiting the max file size
  • Modifying the progress bar in the bottom to show overall progress status instead of individual upload status
  • Add progress bar on individual file upload

Anyway, try the demo by clicking the screenshot above and if you like it feel free to use it (as usual, do right click then view source will get you to the source or just click here).
Just don’t forget to include the credit for the guys at weblog.cahlan.com as the most work were done by them :)

Update: Sun, 08.03.2008 – modified the upload.php to save the uploaded images in the database. I need it for collecting sample pictures of my other demo. If you want to delete your upload, go here and you will find it under “Not Categorized” category for the successful upload. Drag and drop your picture(s) to the bar at the buttom of the screen to delete your uploaded picture(s).