Saturday, November 15, 2008

Final Project : The Client

Drum roll please ...

I'm going to kill two birds with one stone here and my final project will also be the next paying job I have lined up.

http://kasthomes.com/ - A real estate development company

I've done some preliminary meetings with the client and will hash through those notes and create:
  • site maps
  • wire frames
  • process flows
  • user paths
  • functionality charts
My issue in the past has been to plan too much. I'm not going to worry about the smallest details too much because frankly I can't perceive them all till I get dirty and the client isn't being too informative. I image we will both define the specific as the process moves along.

There will be communication with my client throughout this process as well. I'll do my best to share the complete process with you all. Hope you have some comments and suggestions of what I share.

db

Friday, November 14, 2008

FInal Project : Site Structure Full Overview


I've had this idea for some time now as I have a lot of friends and small clients that could fit into this structure in one form or another. I think it would be awesome if I could build a structure for most of the possibilities and pick and choose the blocks I develop for a final project be it for an individual or small company.

I've have used Wordpress for this stuff and it is a powerful tool. With tools like that I wonder why try to do this from scratch myself but all in all it would be a great start to a product I may later turn into a Wordpress theme.

No matter what version of this site structure I come up with in the end for my final project, this was a needed step in the process.

Next:
  • I'm going to take this and define all the possibilities for each kind of page template with a specific client in mind for each pass. Fashion Stylist, Painter, Web Designer, Advertising Agency, Property Developers, Real Estate Agents...
  • Once I define 3 or 4 types of portfolios I'll wireframe the one that works for the final project.
  • In the end I need to decide if this is for an individual or small company and what kinds of bells and whistles I can do by the deadline.

Thursday, November 13, 2008

MySQL Reading : Notes

I just completed the MySQL Tutorial and these are some notes related to the reading.

For the first half of the tutorial I followed along by creating a database and different tables on my own server. We did most of this in class but it was helpful to do it again and sometimes with a different method... like creating a table from using PHP and the "CREATE TABLE" MySQL query function.

The tutorial doesn't mention anything about Foreign Keys or even Primary Keys for that matter. The only mention of two table relating to each other was through Join or Left Join. The tutorial admitted you probably wouldn't understand join from the super simple example. In some other reading I'm realizing Foreign Keys for MySQL have to be assigned by command line as there is no graphic interface for this. I've only worked on this weeks homework assignment for a few hours and I'm having a big issue with table relation.

In practice I brushed up on my formatting of the result and syntax of PHP but I still get a lot of totally blank pages with no errors. Very frustrating. I'm guessing that is due to poor syntax. Debugging methods aren't helping either. Lot to learn still.

I found SQL Injection mysql_real_escape_string() interesting in part because this process of protection is used when running a query for results. In short used when getting data and it kept bugging me that this isn't used when inserting data to the table. Actually I think I'm mixing up the PHP process for sanitizing the user input and the SQL process for making sure nothing malicious is run on the database. Does SQL even have protection on INSERT?

Well, on to defining my final project and getting that blog to work correctly.

Monday, November 10, 2008

Lightbox & Similar Apps for viewing media

Hey there,
(The following use the javascript libraries of Prototype and Scriptaculous we've talked about in class.)

In the last class I noticed a few of us implemented the Lightbox 2.0 Image Viewer on the image gallery. This post relates to the same effect as Lightbox for viewing images... and more!

1) From Lightbox, Jonathan Chirstopher at Suckerfish developed the Suckerfish Hoverbox Redux. I'm not sure if I would really use this myself but wanted to show you yet another derivative of a simple idea that really took off.

2) An alternative to Lightbox is Lightview. Which does single images and galleries like Lightbox but also it does Quicktime, Ajax Form, Ajax Post, iframe, inline content and SWF (Flash)

"Lightview was built to change the way you overlay content on a website.

  • Clean: Designed to compliment your content.
  • Fast: Smart image preloading.
  • Easy: Customizable without having to know CSS.
  • Rounded: Adjustable rounded corners, no PNG images required.
  • Smart: Content resizes to always fit on your screen.
  • Slideshow: One button slideshow.
  • Works on all modern browsers. "
Good luck with all the homework this week!

Friday, November 7, 2008

Class 07 assignment -5 - Well...

http://onepotcooking.com/davidbone/class07/3/

I updated the above
  • I added the Lightbox2 functionality to the gallery page. Click on an image and you'll see what it does... well, after the page loads.
  • In implementing the lightbox I only wanted to update one page so coded the header into a more template friendly fashion and added a footer for each page. Also coded a dynamic class for each page which would be very helpful in the CSS if needed.
I asked some friends to waste some time in the office and test it and sadly I realize this only works in Firefox. Well the uploader doesn't work in IE and I'm not sure why yet.

UPDATE:
I was able to get the uploader to work by putting back in a file type I didn't think was supposed to be there and that is "image/pjpeg"

Class 07 assignment - 4 - It's all workin'

There is always more to do... but for now I'm happy. Especially happy to be finished after yesterday I completed the project then promptly proceeded to delete all of my work. That's right I pulled a Homer and had to go back a days work! You would think I could have just whipped up the code again after completing it once but no I still didn't quite understand. I think I do now :o)

For you to test (please) onepotcooking.com/davidbone/class07/3/

My toDo list since last post:
  • Get the home page working with gallery
  • Limit the view to last 50 (thanks JackP, who also alerted me to array_reverse)
  • Design the layout + figure out thumbnails
  • Work on security which is non-existent at the moment.
  • Test the limit on file size upload. I don't believe it is working. I was able to restrict the size of file and type of file
  • Template the error messages onto one location like I saw Jonathan do... good idea.
  • + Figure out true thumbnails. Creating and saving on the fly.
Assignment 07 Notes:

page_login.php
  • Checks to see if you have a cookie that has you logged in. This cookie expires in 24hrs.
  • Post form for entering in username and password.
  • On form submit with values: reads the data txt file for username and password and if matched then sends user on to gallery page. If no match then there is an error message. Also sets two cookies. One for loggedin and one with the username.
  • On form submit with no values: error message
page_newmember.php
  • Checks to see if you have a cookie that has you logged in. If so, on to gallery page.
  • Post form for entering in new usernames and passwords.
  • On form submit with values: writes entries to a txt file in a comma delimited fashion. (no security on this yet). On success of writing to file, send user back to login page w/ message.
  • There are other error messages (alerts) related to txt file but most likely will never be called unless there is an error on the server.
  • On form submit with no values: error message
page_home.php
  • Checks to see if you don't have the needed cookie. Send user to login if failed.
  • Personal message to user from username cookie.
  • Gallery of images. Showing only latest 50. Showing last entry first.
  • Thumbnail size controlled by CSS.
  • All images link to the full size.
  • Alert message when successfully uploaded an image
page_uploader.php
  • Checks to see if you don't have the needed cookie. Send user to login if failed.
  • Post form data entry. Writes the file path, caption, username and date to a txt file for gallery page to read.
  • File upload field is limiting file size to 2M by a hidden form field and php. The php also restricts file type to gif, jpeg, jpg or png. (The method from Amos, restricting the file size, didn't work for me)
  • Only the image is required.
Coding Observations:
I feel like I'm in the Matrix movie where all those lines of "code" are on the screen and to the learned eye, you can visualize what's going on. Still at low resolution though.

File management was a desire for me with folders for includes, functions, style... Because of this I came across path issues. When a function writes to a file it would have a different path than the other function that would read.

Testing is where it's at! Many examples of me learning through testing but the last run through revealed I forgot to check for empty form fields when entering the site. This resulted in one of my cookies being set and letting the user in but it didn't set the second one. Because this second one wasn't 'on' I saw behavior from my code that I didn't realize was there.

I learned a ton, especially since I did just about everything repeatedly. I still see myself looking for answers out on the web but now it's more for reference than for stealing.

Syntax is still an issue for me... that is where practice comes in.

Wednesday, November 5, 2008

Class 07 assignment - 3 - Did I say, "Almost Done?"

Moving along but like the Tortoise.

Working files at this point are here onepotcooking.com/davidbone/class07/2/

Coding Observations
  • I like my file management to be consistent. Because of this I had some issue with file paths and in particular the image path for this project. I was looking for a way to set a base directory for the whole project and have all links start from that point. I didn't figure that out but I did break out the paths in the variable definitions because there was a different path for moving the image file compared to writing the image file's path to be read later from a file at a different folder level.
  • Arrays are huge and very important in the loop. I need to understand these better as I needed to look at other's code to get it... thanks again Jonathan.

My toDo list since last post:
  • Get the home page working with gallery
  • Limit the view to last 50
  • Design the layout + figure out thumbnails
  • Work on security which is non-existent at the moment.
  • Test the limit on file size upload. I don't believe it is working.
  • Template the error messages onto one location like I saw Jonathan do... good idea.
I'm doomed - HA!

Tuesday, November 4, 2008

Class 07 assignment - 2 - Almost Done

onepotcooking.com/davidbone/class07/

I have the home page gallery listing left to code. All else is working pretty good but wouldn't use it on a live site.

Would like to do still:
  • Get the home page working with gallery
  • Limit the view to last 50
  • Design the layout
  • Work on security which is non-existent at the moment.
  • Test the limit on file size upload. I don't believe it is working.
  • Template the error messages onto one location like I saw Jonathan do... good idea.
Hope I can get this completed tonight... I've got real work to do ;-)

Where to code : Appending the upload content

I could use a suggestion:
I'm to the stage where I'm trying to get my image path, username and caption to write to a txt file. I'm able to print those variables to screen but not to the file. I'm more than certain it isn't a file permission thing because I created an else in the loop that would state an error but the code isn't getting to that point.

Right now my result is a blank screen and I know it is due to the highlighted code in the following image.

Is this the correct place to try to code in a fwrite?
I figured if the image file could be moved to also write to the txt file in the same move_uploaded_file function but maybe that is incorrect.

Does anyone have some incite?