Posts that have the tag "images"
New Blog Update
I've been working on my new blog software for a few months now. I don't intend on adjusting the outward appearance of my blog in any appreciable way, so when I move from the old software to the new software, it should look the same. Rather, all of the changes I'm making are all on the back end of things.
I've been working to objectify my PHP code. Right now, my blog spans over 20 disparate files. There are a few files that are common to them all (similar to classes), but they're mostly for the more complex features. The problem I've been having is reconciling similar functionality and standardizing my coding practices. For instance, I recently spotted a bug in my site redirect script. Were my program stored in a few central classes, I would only have to modify a few portions of the code. However, because everything was apart, I had to modify 15-20 different files correcting the bug. Of course, even with classes, I may have to modify a fair amount of items. For instance, adding, editing and deleting information has a similar procedure with a different query string. With 4 different information classes with an add, edit and delete method in each, that's 12 instances of the exact same code. Making a method for the redundant code makes the code more succinct AND makes it easier to modify down the line.
Currently, I have information classes: my blog entries, comments, image info and image folders. I also have a class for database use, a utilities class, a user authentication class and an HTML class. So far, I've written most of the database and information classes. I need to fine tune and correct any logic errors and try to synchronize common class types. I've also finished writing my utility classes, as they were taken from the old utilities I used before.
The authentication and HTML classes will take a fair amount of time, but most of the logic and styles for each have already been written. I'll just need to slice them up and edit them to function correctly in a modular fashion.
If I were to give a percentage of completion, I'd say that I'm somewhere around 60%. I've completed a lot of the logic grunt work and I have a little left. Afterward, it will be about testing the applications to insure proper working order.
Posted on February 22, 2010 at 12:26 pm. 0 comments. Tags: website admin blog images programming php mysql database
Image Uploads
I thought I was going to get the search functionality started, but I've been working on the image upload script. Initially it was designed merely to work, but now I'm revamping the code to be far more extensible. I've added a for loop so that I can upload and deal with multiple files at the same time.
Posted on October 04, 2009 at 06:12 pm. 0 comments. Tags: dev image upload images gallery
Images in posts
I've finally added the ability to add images to my post using syntax commands similar to bbcode. Here's an example:...
Posted on July 29, 2009 at 08:55 pm. 0 comments. Tags: image gallery images
to-do list, follow up
In regard to the to-do list that I posted earlier, I've done the following:
In re 1): I've decided to just use a single folder genre for images right now. Later on, I can create a second layer of folders that can hold multiple other folders. But, having a folder that can contain both folders and images was just too much to handle right now. It would just end up looking pretty bad.
In re 2): I've experimented with the ability to upload multiple files. It looks like I can just add as many upload boxes as I want. I'll have to handle each file, though. In the end, file handling will probably be relegated to a for loop that will check for file availability. If the file isn't available, there was nothing uploaded.
In re 3): I've not touched on this yet.
In re 4): I've set the appropriate image quality settings I want. I've also decided to strip all EXIF data from the actual images, as they don't need them. The resultant images have about 15kb less data.
In re 5): I've not touched on this yet.
So far, I've added the Image file and folder info to the MySQL database. I've modified the upload program to add the EXIF data to the SQL database. It will also name the files based on the next incremented ID. I've also built the php-based folder gallery, image gallery and image display pages.
As soon as I implement user authentication (in order to allow editing files and folders) and design methods to modify the data, I think I'll be ready to start making the site live.
Posted on July 15, 2009 at 01:33 am. 0 comments. Tags: website image gallery images dev
Image Gallery to-do list
I want to write out what needs to be done for my image gallery program. Today, I organized the files related to my image gallery and modified them to be modular for later use. I also renamed them to clarify their purpose. So, instead of a bunch of numbered files, I have names that denote their use. I fixed some bugs and updated the upload page to have text areas and a drop down box for comments, tags and folders. I've also refined the tables for images and their respective folders for when I create the tables.
The following is my to-do list for the image gallery:
1) I need to decide how the folders are going to be organized and displayed
2) Figure out how to upload multiple files at once
3) Develop methods to modify image information at a later time, including moving to another folder
4) Finalize image quality settings
5) Develop a script that allows me to add and remove folders and edit the folders properties, such as the folder icon
I can't think of much more to do beyond that, so I'll get back when I think of more to add.
Posted on July 14, 2009 at 09:36 pm. 0 comments. Tags: dev images image gallery website
Update
I recently wrote a script for my server that uploads a file. At its base is a HTML form that allows a user to choose a file and upload the file. From there, PHP will catch the file, move the file to a temporary upload directory and output information on the file. That, in and of itself, is neither difficult nor complex. In fact, it took only about 20 minutes to get an idea of what I need to do, edit the php.ini file to allow for larger file uploads and so forth.
The problem, however, is how browsers treat file uploads. When you upload a file using plain HTML, the browser will sit there uploading with a blank screen. Once the file is uploaded, then the next page loads and renders. To me, that's intolerable. If there's a problem with the upload, or it's going oppressively slow, you won't be able to figure out why. Thus, feedback was necessary for an upload script to function well enough.
Initially, I was looking at writing a CGI/PERL script or learning enough java to write a scriplet to facilitate the upload bar. But, the amount of time needed to figure that out was way too long. Though, I found out that PHP did have some function called APC that caches data and allows me to retrieve it. IBM wrote an article on APC usage that helped me out. I found that a lot of people had trouble getting apc_fetch to work and that it would return "false" when uploading data. I found that you needed to add "apc.rfc1867 = on" to your php.ini file. Afterward, it functioned correctly.
The page itself is a form with two buttons and a text bar. One button to browse for a file and one to submit. I have two Iframes on this page, which both start blank. The left Iframe is where the uploaded data is sent. So that frame will sit there loading. When the file is uploaded, the data on the file is displayed. The right Iframe is where the progress is shown. A Javascript function was written to wait 1 second (to make sure the cache had enough time to be reset) and then load the progress bar. The script reads the cache file and retrieves the amount of data sent and amount received and produces a percentage. The bar itself is a div box that's 100 pixels wide and 20 pixels tall that's white with a 1 pixel black border. A second div box is inside with a width that's the same as the percentage complete. So it extends as time goes on. Another javascript function is written to reload the progress page every half second until progress is equal to 100.
What this means, to me, is that I'll be able to write my pages and scripts for uploading, converting, storing and showing my photos for my website.
Posted on May 01, 2009 at 05:13 am. 0 comments. Tags: Images Server PHP Javascript website
Images Scripts Update
I was thinking about this and I feel that things would be better if I stuck to a single sub-gallery method and just implemented tags of one sort or another. That way, I can have my sub-galleries of special events, such as specific vacations. And I can also just add tags to all the images, so that I can separate them by genre or type.
Posted on March 13, 2009 at 10:33 am. 0 comments. Tags: dev site images
Image Gallery
I've come to a realization that I've missed something in my image gallery. read more...
Posted on March 12, 2009 at 06:01 pm. 0 comments. Tags: dev images site
Image system
The next project I'll work on is my automated image indexing system that will take image uploads, convert to lower resolution images with a converted thumbnail and possibly a medium-sized, blog-friendly size. The image information will then be placed into a table and an image index will be created. I hope to incorporate tags as well into my system.
