PHP and Javascript Project

In Progress Posted Dec 15, 2014 Paid on delivery
In Progress Paid on delivery

Greetings!

I have an exciting project (well, I'm excited about it :) that I need your help with.

I've built a website for a writing exercise that helps a person write a story. The design is nearly finished, and I have some of the basic PHP work done, but I need help finishing up.

A visitor goes to this page to write a story: [login to view URL]

They write their story and submit it. Each section of the story is saved to a MySQL database, along with the author, author url, story title, date, IP address.

The story is assigned a random ID, then they are sent here to view their story: [login to view URL]

So there you have it. Pretty simple. But, I want to allow for more customization. On the left side of the page you will see some icons. These will allow the author to customize/modify their story, and have the edits saved to the database.

Specific list of tasks:

1) I need a way for users to identify themselves as the author, giving them persmission edit the story. I'm not sure of the best way to do this, so I'm open to suggestions, but I'm not keen on managing usernames and passwords.

Here's one idea... After submitting the story, send user to special URL that allows them to edit the story. Maybe a randomly generated key in the url? E.g. "[login to view URL]"

2) Allow authors to upload their own image on [login to view URL] when they click the "Upload Image" button. Maximum size 1MB. Save image in /backgrounds/custom/. Rename image file to the story's ID.

Example: for [login to view URL], if user uploads "[login to view URL]", it's saved as "/backgrounds/custom/[login to view URL]"

3) Allow authors to edit contents of story, title, author name, and author URL by clicking on the edit icon that pops up on hover. Also, I would prefer to have all edits saved asynchronously with AJAX instead of requiring users to hit a save button.

4) When requesting new random background, wait until image is loaded to fadeIn() background div. Right now, I just use a timeout, so the image may not necessarily be loaded by the time the div is set to fadeIn().

5) Save background from [login to view URL] to database, and then load the same background in story.php. Right now, [login to view URL] will pull a new random image instead of keeping the image from write.php.

6) On [login to view URL], make all story fields required except author name and url. If user attempts to submit with empty fields, scroll to top-most missing field and display div with "missing field" error message.

7) Story IDs are currently very long, e.g. "548a1447dd910." Is there a way to use shorter IDs but still have enough room a lot of stories? Something more like imgur's IDs ([login to view URL])

8) URL rewrite "[login to view URL]" to "/w73Rm1"

Is this possible using .htaccess?

9) IP addresses are currently saved in the database in a format that I don't understand. They are just one string of characters like "2549929226". Please explain, how do I turn that into an IP address?

10) Make sure forms are protected from SQL injection or other exploits, and uploading images is safe.

11) Do you have any other suggestions for how to make this application better? Or, do you know of a better way to do something than how I've requested it? Let me know!

JavaScript jQuery / Prototype MySQL PHP Software Architecture

Project ID: #6869154

About the project

26 proposals Remote project Active Dec 15, 2014