Posts that have the tag "website"
Update
Hey all, been a while.
I've been working behind the scenes on my website, trying to improve the functionality on the rear end of the site. I've also been working on a mobile version of my blog so that I can write and post entries from my phone.
It's my hope that I can figure out a way to transfer files from a camera to my phone and then be able to upload files from the phone to my website. Right now, that appears to require a laptop of some sort, which isn't too big a deal, in my opinion. If I plan on driving somewhere, I can always stow my computer in the trunk. If I ride my bike, well, I guess I'm out of luck.
Otherwise, my previous statement concerning the weather was a bit optimistic. While we've had some decent weather, a lot of the weather has also been cold, so I've not been going out much in the weather.
On a positive note, I've been making a lot of progress with learning Maya. I've not actually made many interesting things, but I'm getting close to actually making something interesting. I hope to actually post something worthwhile in the near future.
Posted on April 13, 2010 at 12:38 pm. 0 comments. Tags: website weather life cell phone mobile phone
The Future
I've recently, replaced the entirety of my Blog and the majority of image pages with OOP code. The last step I need to take is to make the final touches on my image upload program.
From there, it'll be time to implement some of the functionality that I've been putting off. I've already set up the ability to hide images and folders from the public (the purpose is to provide a place to store images that aren't necessarily for gallery purposes, but can be used in the blog itself), but I need to start implementing it in my HTML and PHP.
I also have ideas to add to my blog functionality, such as the ability to start entries and store them as drafts for later editing. There are, also, other tweaks I want to provide for the main page, such as the ability to go to the first page or the last page.
But, more importantly than the development of this blog, I feel like I need to really start focusing on the content. The excitement of developing a functional blog with functional authentication, BB Code, images and so on is starting to wane, considering I started this project more than a year ago. The first recorded post was made on January 28, 2009. Before that, I had a previous blog that was completely scrubbed after making major development changes and before that, I had already been programming a bit of information in a proto-blog. I've been working on my website in its various incarnations for more than 1.5 years. So, now, it's time to start focusing on providing something interesting.
The good news is that spring is finally here. The past week and a half has shown a dramatic warming of the weather from the low to mid 30s to the 50s. I can finally get out and maybe produce something worthwhile photographically.
Posted on March 11, 2010 at 11:34 am. 0 comments. Tags: dev website photography
Comment Screening
Just in case anyone is curious why I screen comments, I received 155 spam comments last night. Deleting them is a pain, but it's better than searching through all of my blog entries trying to find them.
Posted on February 26, 2010 at 12:31 pm. 0 comments. Tags: admin website spam comments
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
No real updates
I've been slogging away at a description of objects for my blog. I anticipate it will be somewhere around 5-6 pages long and will take a bit of time to organize before I can finally start coding. The good thing is that I already have the logic figured out in my current code (which is mostly imperative). The hard part is figuring out how the objects should interact with each other. I'll try to enumerate everything a little later.
Posted on January 11, 2010 at 02:45 pm. 0 comments. Tags: admin php blog objects website
EXIF data
My image program was designed to work with photos that have EXIF data. Thus, I spent a large quantity of time working with the EXIF data that I extract from the image files. However, I just encountered a problem I didn't even think of: Images without EXIF data, or specific EXIF entries. I recently took many macro photographs using a manual focus lens attached to passive extension tubes. The camera did not include any aperture or focal length information in the meta data. When I uploaded the image to my website, certain pieces of data I was looking for were "null" and I received several errors in uploading the data.
Now, I need to rethink how I'm storing my images on my server. Without EXIF data, I'm wasting a lot of space per image.
Posted on November 25, 2009 at 11:27 pm. 0 comments. Tags: EXIF admin website.
Day Off
I took the day off today. I have a sinus infection, I think, and my nose has been running like crazy. I woke up multiple times this morning with a runny and stuff nose. My throat hurt, my lips were chapped, I was sweating. I had a headache and my body ached. I was in no condition to head to work today, so I stayed home. read more...
Posted on November 13, 2009 at 07:21 pm. 0 comments. Tags: Admin linux image upload website
Search Function
I'm going to add a search function to my blog. Initially, I'm going to give the ability to search only tags. The tags represent a far smaller amount of data and an inefficient search engine won't be too much of a bear on my system (as far as I can tell thus far). If it does become a problem due to abuse, I may have to disable the search function or design restrictions (probably based on IP) to limit the amount of searches on makes in a set amount of time.
I feel that I'll need to research searches to see if there are methods that are more efficient than merely passing sanitized terms to SQL for search.
Posted on October 01, 2009 at 07:19 pm. 0 comments. Tags: website php sql admin search
Long break
Wow, been almost half a month since the last update. The gallery is actually working, but I still haven't written a large chunk of the functionality related to the image gallery.
However, I've been studying 3D modeling in Maya for a few weeks, so that's been hogging my progress. Not much more to report.
Posted on July 26, 2009 at 11:02 pm. 0 comments. Tags: website dev 3D maya
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
Time taken out
I've been busy with other things recently. I've been writing a review of the ASUS My Cinema-EHD3-100 which has been sucking some time out of my life. Moreover, I've been having to run personal errands to clean my apartment and I've otherwise just been plain lazy, resorting to watching The Wire or playing Assassin's Creed on the Xbox 360. Tonight will be no different as I have to get some laundry done.
Reading my Java programming book has been similarly slow as I've felt myself getting too tired frequently on the train. As such, my image gallery project keeps getting pushed back. I will eventually get around to starting the project, but it will take a little time.
In other news, I purchased a few older Xbox 360 games. Mass Effect, Devil May Cry 4, Prince of Persia, Ninja Gaiden II and Dead Rising. Each of which were less than $20 new.
I also decided to purchase Unreal Tournament III. Now, the thing about UT3 is that I really don't have much desire to play the game. Rather, I want to learn to develop levels and models in the UnrealEd engine. For this reason, I opted to purchase the collector's edition version because it contains a bonus disc of video tutorials on using UnrealEd. I also have the UT2k4 Editor's Choice edition, which has similar goodies included. I'll combine this with the Maya Personal Learning Edition (included on the UT2k4 disc) and my learning Maya book to start immersing myself in 3D modeling and animation.
Posted on July 07, 2009 at 02:32 pm. 0 comments. Tags: 3D Maya Unreal Tournament Xbox 360 website dev
Image Conversion
Initially, I had created a script that had two pipes that opened up to the console. The first pipe would access imagemagick and make the conversion from the source file to a lower res, compressed file. Then, the second pipe would remove the source image after the conversion is complete. Initially it worked just fine, but for whatever reason, it's no longer working. Now, it appears that the two pipes run in quick succession, so Linux attempts to delete the file before Imagemagick has completed its operation.
I've built a work around that builds a batch file and then uses a pipe that runs the batch. This appears to work just fine, I've had no problem with that.
My next concern is figuring out how to name the files. With comment and journal entries, the id number is entered, but not utilized anywhere else except during search and retrieval. However, with images, I'd need to utilize the id# in order to name the image as well. So, for an image with ID # 200, I'd expect to name the image 000200.jpg. When naming the image, I'll either have to:
A) Use "null" for the ID # like I usually do, and then do a search immediately afterward for the latest image and use that number or
B) Do a search of the SQL table, find the latest entry and use a ++ increment for everything.
It would seem to me that either option has equal efficiency. I'll have to decide which is easier to write.
Posted on June 28, 2009 at 12:13 pm. 0 comments. Tags: website dev admin imagemagick
Whitelist
I realized that I had the Whitelist function in multiple places. So, I removed the whitelist function I had in my comment script. I then edited the whitelist function I wrote to accept any generic whitelist in array form. Finally, I added a bunch of functions to the whitelist script to accept numerous common whitelist arrays. I also gave the ability to use your own custom array if need be.
Posted on June 26, 2009 at 10:59 am. 0 comments. Tags: website dev
Mobility
The good thing about redesigning my website is that it functions correctly on my blackberry phone. Previously, I had a javascript implementation of SHA-1 that didn't work on blackberry's browser combined with javascript functions I wrote that didn't work very well. Fixing all of that let's me post on my blackberry now. Soon I'll design a mobile version of my browser.
Posted on June 25, 2009 at 05:42 pm. 0 comments. Tags: website blackberry mobile
Done for now
Well, I've systematically altered all the main files and scripts of the website to add comments, make the scripts more efficient, trim the code and fix some of the issues I had before that resulted in odd bugs and anomalies in the way the code worked.
I think I've worked out a lot of the problems that existed before. Now, I just need to integrate my development page into my live page, as both are disparate. Soon, I hope, I can actually start on my image gallery scripts. I've already worked out the way I'm going to organize the galleries. At this point, I just need to start putting the disparate scripts I've been working on together.
Posted on June 25, 2009 at 10:44 am. 0 comments. Tags: website dev server
Adding a Post
I've updated the post script to incorporate many fixes and have everything operate in a single php file
Posted on June 21, 2009 at 01:11 pm. 0 comments. Tags: website
adding a post
Previously, I had the script that added posts or entries as two different scripts. The first script was fairly basic. It called the authentication function. If the user is logged in, they're presented with a fairly basic HTML form in which they can type whatever they want to add. Afterward, they press the "submit" button. The next script analyzed the data, authenticated the user, added the post into the SQL database and displayed a message to the user.
Now, I want to add a preview function and I'm getting the impression that this may be difficult with what I have right now. Thus, I'm going to have to combine both scripts into a single file.
This shouldn't be too difficult. I will just need a lot more testing to determine different conditions, for instance:
-Did the user press submit? If so, add the data to an SQL table and display a message
-Did the user press preview? If so, display the preview and form with previous entries already in the fields.
-Did the user visit this page for the first time? Then do none of the above and show the form.
I'll get started on that this weekend.
Posted on June 19, 2009 at 01:44 pm. 0 comments. Tags: website server admin
Gallery Organization idea
I had a new idea for organizing my photos. Instead of creating multiple tables of galleries of categories and sub categories, I'm going to have one single table of all categories and sub categories. Each category will have an entry called "master category" or something similar. This will indicate which category it is a part of. So, the main category would be Category #0. Then, I would have a few sub categories, like "vacation", "downtown", etc. Vacation would be category #1 and downtown would be category #2. Though both will have a master category listing of "0", indicating that they're sub categories of the main category. Then, something like "miami 2008" would be category #3, but have a master category listing of "1", indicating that it's a sub category of category #1, vacation.
Hopefully this system will cut down on confusion and allow me to expand my categories much further than otherwise.
Posted on June 18, 2009 at 11:50 pm. 0 comments. Tags: admin website server SQL
Renovation Work
I've renovated the code of my blog quite a bit so far. Namely, I've commented a LOT of my code. Before, comments were only used in the more complex or confusing portions of my code. Now, however, I've taken to commenting all but the most obvious. This has helped immensely, because I've seen quite a few glaring problems with my code as I've gone through it. I've had variables here and there that were confusing. After some work and cleaning up, I've removed some of the more superfluous code and replaced it with far more competent functions.
I've also fixed a few problems I had with the code. Most notably, when I tried to log in, I couldn't use a cookie immediately after setting it, so my login page would tell me that I had typed an incorrect username and password, even though it wasn't incorrect. Once I clicked on the "home" link, everything would change to the logged in functionality. Now, however, I refresh the page immediately after logging in before anything is displayed on the page so that the login information is correctly displayed.
Also, the index page used to only change the "previous" and "next" links if it was the first page. If it were anything other than page 1, it would say "previous" and "next", including if it were the last page. I've changed that so that the "next" link is removed if it's the last page.
Other issues on my agenda:
- I need to add a preview function for adding a post. I have a preview function for when I edit a post, but not for when I add a post.
- The amount of comments that need to be screened is displayed on the right side of my page. When I delete a comment for screening, it doesn't immediately count down. I'll need to figure out why it doesn't do that.
I will still go through the rest of my code to renovate for improved clarity and efficiency. I'll see how that works.
Posted on June 18, 2009 at 10:54 am. 0 comments. Tags: Website admin server
6000 Refreshes
Since I had the counter running a few months ago, my pages have been viewed/refreshed 6000 times. This, of course, counts multiple views, refreshes and doesn't discount for a single person viewing every page.
Nonetheless, it seems a feat, considering I wasn't expecting many views at all.
Posted on June 10, 2009 at 10:32 am. 2 comments. Tags: website
Site Updates
Holy Crap, the code for my site was far worse than I expected. I'm currently reviewing the entirety of my website's pages. There are quite a few deficiencies in the logic in some of my pages. Moreover, remnants of debugging exist. Finally, I was far too concerned about removing any bit of javascript from my page that I made some rather roundabout coding when Javascript redirects would have been better. I'm also going through the code attempting to comment the code so that it's more readable.
I'm also pulling apart the code attempting to separate and abstract some of the functionality, such as page redirects, which may be better off as a function.
Moreover, I also learned more about cookies. Turns out that when you initialize a cookie, you cannot use that cookie on the same page. My new code would authorize if it could read all cookies that I set for authorization and de-authorize if it could not read them. This would merely be a variable that would enable certain features on the page for authorized users. So, my page would tell me that I wasn't correctly logged on, but going to any new page would show that I was, in fact, logged on. What I found out was that my old setup would authorize if the cookies were correct but would NOT de-authorize if the cookies were incorrect. This, to me, was rather sloppy. So, I changed this aspect, but it's going to necessitate an extra step in logging in so that the login pages reads correctly.
In the end, this will take a few days to be put up.
Posted on June 01, 2009 at 10:17 am. 0 comments. Tags: dev php javascript website admin
authentication idea
I've been contemplating a new method of authentication. Right now, the authentication is a mass of spaghetti code and hashes of hashes of hashes. Despite the obfuscation of information, there are some worrying problems. Namely, information stored on the client side is static. A session ID changes from time to time, but this could potentially create a problem and may make it easy to deconstruct the authentication.
I've decided to simplify the authentication process and make it more difficult to deconstruct or spoof information. The SQL tables obviously hold hashes of passwords to protect the password information. I've also constructed the website to hash the password client-side so that when information is sent as plain text, no person can grab the password information, only the hash information.
My current idea is to create a table of 500-1000 entries. Each entry will contain a random number of 8 digits or longer. When a password and username are sent to the server, they are checked against the username and hash already stored in the SQL tables. When the username and password are authenticated the first time, a random key will be chosen from the table of random numbers. The random number from the random key will be used as a salt on the end of the password hash. A new hash will be created from this string.
Afterward, 3 cookies will be created on the client's computer.
A) The username
B) The random number key
C) The new hash
When the server attempts to authenticate, all 3 pieces of data will be sent to the server. The password hash of the username will be retrieved as well as the random number from the key. The random number will be salted on the end of the password hash and a new hash will be created. This hash will be compared to the hash stored in a cookie. If everything is correct, they should match. Otherwise, the random number has changed, or a spoof has been thwarted.
This, of course, doesn't solve the problem of the initial contact with the server as nothing is encrypted beyond a hash, but it makes sure that everything after the initial contact isn't in plain text or easily readable.
Posted on May 26, 2009 at 12:42 pm. 0 comments. Tags: hash sha1 website php mysql sql password username administration
Site Design
I changed the title image from a fisheye photo of my car to a picture I took of the moon a couple weeks ago. Enjoy.
Posted on May 18, 2009 at 10:30 am. 0 comments. Tags: website site design photography moon
Java
I'm about half way through my Java book (Sam's Learn Java in 21 Days). At this point in time, I feel as though I have a basic grasp of the syntax, combined with a basic grasp on how to get something done inferred through the code snippets. However, I'm still woefully hazy on how the language works to the point where I could write something without egregious reference to books. Unlike PHP where I can write most without only mild reference to the book.
Whatever the case, I'm still going to finish most of the book. Near the end, I may put the book down to engage other books on the subject. I have another Java book waiting for me at home to read when I'm done with this book.
I anticipate that Java will be great for me in developing server-side programs as well as developing programs for small devices and embedded devices. However, I'm sure I'll have to pick up C++ in the near future to develop programs for the desktop as well.
I may also pick up some books on 3D modeling eventually, too. Though, I need to get a little more into drawing as well.
For my website, I solved the problems I was having with subdomains. I was unaware that I was required to have my domain registrar forward my subdomains to locations. Thankfully, they give me the option to forward all subdomains with a wildcard asterisk. As such, I've set up http://m.kakomu.com as the subdomain for the mobile version of this website. However, I need to revamp the security protocols of this website to make it compatible with Blackberry's arcane javascript handling. After I'm finished with that, I can create a minimalist website for mobile devices.
Posted on May 11, 2009 at 04:55 am. 0 comments. Tags: Java C++ subdomains website apache 3D books security
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
First Post!
The site is now LIVE! I've finally gotten around to writing the necessary components of the blog to make it whole and complete. Because I will remove the temporary database I was initially using, I'll explain this website. This all started as a project on my part to learn PHP and MySQL as well as hone my HTML skills and learn CSS. This site is completely written in Notepad by me. The site is XHTML 1.0 Strict compliant. I host this on my own connection on a TSOP modified Xbox running Xebian, which is a modified form of Debian.
The site utilizes a password protection system to allow me to sign in and out. It uses SHA1 hashing on the client side so that no passwords are sent over HTTP in plain text. The hashes are useless by themselves as validation is protected by cookies and session variables (meaning both client and server side validation).
I've written several scripts to allow for typical Blog navigation including sorting by pages and permalinks. I've also included BBCode styled regex scripts so that I can bold, italicize and add urls. I've worked fairly hard on sanitizing any input that users have to prevent SQL injection.
There are two scripts that I need to write still:
- Tag sorting. Each post will include tags and this should allow me to sort by them
- Comments. Comments will probably take a while to fully flesh out. I'll need to fully sanitize the text field, while providing myself an area to screen, delete and approve comments. Don't expect this for another couple of weeks
I also have another project involving image uploads. I want to write a script that uploads an image file, converts to a downsized, compressed jpeg with a max width or height of 800 pixels. This new file will be stored on the server starting at image 1. It will also produce a thumbnail version. From there, I want to place into a database information about the image, such as the camera, focal length, aperture, ISO speed, shutter speed and date taken as well as any comments I have about the picture.
Anyways, I'll write more later.
