Siliconera Image Gallery

February 4th, 2010 kaheidt No comments

Siliconera Image GalleryMy task for this project was to create a WordPress image gallery plugin that displays thumbnails of all images in a post along with a main full-size image.  This project was actually quite enjoyable simply because all throughout the project, different situations popped up that forced me to go deeper down the WordPress rabbit hole than ever before.

The front-end of the gallery itself is fairly standard as far as image galleries go.  The gallery part of the page is a specific size, and the thumbnail area displays a minimum of 1 row and maximum of 3 rows at one time.  If there are more than 3 rows of thumbnails, then thumbnail-viewer control buttons come up for sliding the thumbnail area up or down.  If the “UP” button is pressed when the thumbnail area is already at the top, then it wraps to the last 3 rows, ditto for “DOWN”.  There’s also some hover animations for the thumbnails.

The back-end of the gallery is a different story.  The “postgallery” plugin has two different tasks that it needs to complete:

  1. When a single post is being displayed, modify the content of the post so that the images in it become links to the postgallery page, which includes the postID so that the postgallery page knows what post it needs to display as well as the index of each individual image in the order that they appear in the post
  2. When the postgallery page is being displayed, get the content for the postID that was passed, and then pull out and prep information from that post for the actual displaying of the postgallery page content

Needless to say, regular expressions are used for these two tasks in many places and in a variety of ways.

Going into this project, I had a solid typical-Wordpress-plugin approach that I was going to take, which initially I had actually followed through on and completed.  But once this initial plugin was put in place on the client’s test site, one by one, obstacles popped up that altered how I had to approach what I was trying to accomplish.  In addition, there were some specific requests that the client had for how different functions should be done that differed from how I initially programmed.  In the end, the final product is actually completely different from my initial plan of attack, which is pretty “that’s so how it is” with programming.

Oh, it also didn’t help that my IP was temporarily banned by the client’s hosting company because of the number of times and the different ways I was trying to access the FTP folder that the client had set up.  Luckily it really was only temporary.

Categories: All Projects, CSS, JQuery, Javascript, PHP, Wordpress Tags:


January 14th, 2010 kaheidt 1 comment

Categories: Videos Tags:

Your Hair

January 14th, 2010 kaheidt No comments

Categories: Videos Tags:

Code Snippet and Include Repository

December 16th, 2009 kaheidt No comments

If you’re any sort of programmer what so ever, regardless of what language you code in, then you have most likely at one time or another run into efficiency antagonist known as “reinventing the wheel”.  I’m talking about that string reformatting function that you’ve just written for the third time which is a little different (and hopefully a little better) than the first two versions because you forgot the first two even existed.  If you DO remember that you already invented the wheel, then you spend a good amount of time trying to figure out where you put that damned wheel.  And if you work in a team environment, any situation where one programmer creates a subroutine and then another programmer many months later remembers the email from the first programmer and then reuses that code, well that’s what we call “a friggin miracle”.

In an effort to fight this never-ending war, I suggested to my manager at work that we implement a centralized documentation system that everyone can update with their own pieces of code.  Then if you need to create a function to perform some task, you can search through the system to see if anyone has done something similar.  For my work place, this system ended up being an open source WIKI.  It’s not bad, and it’s certaintly better than nothing, but it still leaves the problem of having to search by a keyword and then sift through the results until it looks like there’s something useful, if anything.  This is especially true if you’re trying to search by one of the key words in your programming language.  You’d probably end up with every single entry as a result.

After thinking about possible ideas to make searching for code a little easier, I came up with one that I think could be really useful.  Basically my idea is to come up with a search method that is specifically designed for searching for code.  My initial thought is to allow a person the ability to search using specific input and/or output and overall characteristics and examples, and then have the search results be listed in priority using the percentage likeliness of a match.

For example, let’s suppose I wrote a function that is designed to take a dollar amount and then round it to the nearest multiple of 50.  My entry of this function into my documentation system would have the following characteristics:

Name: Round Amount To Nearest Multiple Of 50
Keywords: Rounding, Amount, Multiples of 50, Number
Input Type: String
Input Length: 20
Input Example: "342.99"
Output Type: String
Output Length: 20
Output Example: "350.00"
Variable Types Used: String, Integer
Search Process: [See Below]
Function: [The actual function code]

Then if I wanted to search for a function that did what the above does, I could search with the following criteria:

Keywords: Amounts, Rounding
Input Type: Integer
Input Length:
Input Example: 320
Output Type: Integer
Output Length:
Output Example: 300
Variable Types used: Integer

When the search with the above criteria is executed, the search program would not only check for similarities of what I actually put for each item versus what’s entered for each function, but it would also perform whatever data manipulation is entered in the “Search Process” part of the function entry on the example input data of the criteria in order to see how closely the results match the example output.  In order to do that, there’d have to be some translation depending on what language the document system is built in versus what language the code is that the repository is for, but believe me, it would be really REALLY nice to be able to provide my data and what I’d like my data to look like, and have the necessary code snippet come up to be copied and pasted.

Maybe there’s already something like this, or even more advanced than this, I have no idea.  But if it doesn’t already exist, well damn it, it very well should.  Google… read this and then do that thing you do to make dreams come true.  Thanks.

Categories: Thoughts Tags:

WordPress Freelance Project

December 16th, 2009 kaheidt No comments

Today I was notified that I had the winning bid for a project to develop a WordPress plugin that turns image thumbnails inside a post into links which open an image gallery of all images in that post. I’m really looking forward this project because 1) I have a good start on the necessary code because I’m doing something similar for the PCVC site revamp, and 2) because I can predict expanding on the end result long after the project is completed to make fanciar variations. I really want to get my first decent 3D flash papervision creation completed and published, and a post image gallery may be the perfect place to start. I indicate as much in my post about creating a custom RSS feed for Flash AS3 to work with (which I just realized is still only a draft… work work work). Good times on the Internet, ladies and gentlemen.

Categories: Wordpress Tags:

California Part 2

December 10th, 2009 kaheidt No comments

Well it’s good to be home. I had a lot of fun at the Encore conference in California, but there’s no place like home. I met a lot of fun people and had some very interesting conversations, several of which were about Google Analytics and how it can be applied to collection campaign strategies. If there’s one thing I know plenty about it’s Google’s…. well it’s Google Anything really. But Google Analytics has become almost an essential part of any website for any number of reasons. Knowing the number of visitors your website is receiving, how those visitors are ending up at your site, and how many are returning visitors is excellent information to have, even if it’s just used to determine if it make sense to pay for another month of hosting or not. But I can see it being a huge benefit for the collections world, and I sincerely applaud the initiative to branch out into the unknown to tap into new resources for the sake of moving the industry forward. I think that I was able to bring some excellent professional knowledge to the table discussion surrounding this topic, and there was some excellent follow up interest from people that were there to listen and learn. Nothing makes me happier than feeling like the information I contribute is valued to any degree.

I really hope that some of the other people that attended follow up with me in the future, regardless of if they are my company’s client or not. As I mentioned to many of the people that I held discussions with, I’m a huge advocate for open source communities. The whole collective thought behind such a community is that if information is guarded close to the chest, then as an industry or community, we move forward at a fraction of the speed that we would if we were to share openly. Some may say that this is a terrible approach as far as business plans go. I’m no expert, but I think in the long run, I’ll still personally benefit the same, if not more, as I would if I kept what I know to myself. My ideas and services are useless unless enough people know about them to know that they would be beneficial to purchase and implement.

You stay classy San Diego.
head shot

Categories: Uncategorized Tags:


December 6th, 2009 kaheidt No comments

Well, I leave for San Diego, CA in a couple of hours, where I’ll spend the next 2 days telling clients (and potential clients) about emerging technologies and capabilities with the Internet. This should be interesting, considering how it’s a group of collection agencies. I plan on talking a bit about Google’s CDS, and open source solutions. Should be a good time.

Categories: Uncategorized Tags:

Upgrading PCVC

November 23rd, 2009 kaheidt No comments

One of the nice things about my ongoing relationship with the American Cancer Society is that they provide me with a unique opportunity to expand my current skill set by providing ideas for enhancements to their current site. Since they are a non-profit organization, any extra work that I do outside of changes that they request is considered a donation and therefore is tax deductible. Furthermore, the director of the ACS that I am working with is very receptive to new ideas and has some great ideas of his own, so you can understand how they are easily one of my favorite clients.

Right now I am currently working on implementing WordPress into the current website in order to allow the PCVC staff to make changes to parts of the website on their own. This task involves creating a custom WordPress theme that mimics the current layout and functionality of the existing website, which is not overly difficult once you understand the inner workings of WordPress. The key is to keep in mind what part of the existing site typically sees little or no changes requested by my client, and what parts have the most changes requested. Once that’s been figured out, then it’s easy to determine how the site should be split up in order to minimize the possibility of something being accidentally corrupted when someone else makes a content change.

I’m very excited about the outcome of this upgrade because in addition to having a solid CMS backbone, there will be many other pieces of the site that will be optimized. The site, as a whole, will be MUCH faster to load. More to come.

Categories: All Projects, HTML, PHP, Wordpress Tags:

Delayed Link Opening

November 16th, 2009 kaheidt No comments

Depending on the type of animations and actions you have in your site, you might be interested in having an anchor link perform some kind of animation that finishes before opening the link in the href attribute. For example, I’m currently working on a site that has a colored box behind the navigation link of the current page. Then when another link in the navigation is clicked, the colored box slides to be behind that link. So I wouldn’t want the url for that second navigation link to open until the colored box is done moving. I’ll cover two ways to do this.

The first method is the validation method. You’ll see this a lot with forms, where a validation function must be returned as true in order for a form to be submitted. If it’s returned false, then the form won’t be submitted. This will also work for anchor tags, and is all made possible by the two event models. Here’s an example of the javascript code that would be called.

< script src=”http:/” type=”text/javascript”>< /script>
< script type=”text/javascript”>
function validate(field){
$(field).animate({“top”:”100px”}, 1000,”",function(){
if ($(field).attr(“target”)==”_blank”){$(field).attr(“href”));
return false;
}< /script>

And here’s the anchor html code that would be used:

< a id="link1" class="link" onclick="return validate(link1)" name="link1" href="" target="_blank">Google< / a>

The second method is very similar, except we don’t need to use inline javascript event handling, which is nice for dynamic page management. So here’s what the javascript would look like:

< script src="http:/" type="text/javascript">< /script>
< script type="text/javascript">
$(this).animate({"top":"100px"}, 1000,"",function(){
if ($(this).attr("target")=="_blank"){$(this).attr("href"));
< /script>

And here’s what the anchor HTML code would look like:

< a class="link" href="" target="_blank">Google< / a>

You can see how it would be much easier to not have to maintain unique IDs for each link that you want to open. The “live” function of JQuery takes care of every anchor that has a class of “link” applied to it. The other nice thing about this is that if you click the link with your middle mouse button to force it to open into a new page or tab, it will do so right away without waiting for animations or anything.

Categories: JQuery, Javascript Tags:

The PReS Challenge

October 20th, 2009 kaheidt No comments

What is PReS?
PReS is a software package that I use every single day at my current position which contains several utilities that ultimately are intended to take external data and use it to create printable document files.  Included in this package is a script compiler which will turn a bunch of script commands into a compiled file, which is what actually creates the document files.  The rest of the utilities are just extras.  These scripts which contain a whole bunch of PReS-specific commands are what I spend a lot of my time creating and updating each day.
PReS Screenshot

PReS Screenshot

To get into any more detail than that would be cruel and unusual punishment for you, the reader.  The only other detail about PReS that you need to know is that it was built with the idea that it would be used a specific way, and therefore has functionality limitations as far as programming languages go.  There’s also some undocumented behind-the-scenes problems with the software that can produce unpredictable results which a programmer, such as myself, must keep in mind when designing a script that very well may have modifications in the future.

This leads me to my topic of discussion: The PReS Challenge

The challenge that I am speaking of is the natural ever-present task as a a member of the IT industry to create systems that are more efficient,  more robust, and age more gracefully than my previous systems using tools that never change.  The version of PReS that we use at work was created in 2001, and there has been no updates to it since that time.  Oh, there’s been updates released by PrintSoft, but we just haven’t invested in them for reasons that I won’t go into.  The bottom line is that while technology in general becomes more advanced over time, the demands of our clients become more complex, but the tools that I have at my disposal remain the same.  The only option that I have in order to meet the demands of my clients is to adapt my thinking of how to use these tools to be more out-of-the-box by forcing PReS to function in a way that it was never intended to be used.  It reminds me of the movie “Flight of the Phoenix”, with Dennis Quaid, where his plane crashes in the middle of the desert, and the only way they can survive is by building a new plane using parts from the wreckage.  You see now why I said that you don’t need to know anything else about PReS is because the situation that PReS presents to me is not specific just to PReS programming.  It can be applied to any number of situations in life where the number of options are finite, none of which solve a problem, so you have to turn to creative problem solving by using bits and pieces from each options to achieve the intended goal.

There’s a comment that I’ve heard a lot of people say about technology that goes “As technology gets smarter, people get dumber”.  That may be true in some cases, like auto spellchecking or complex calculators, but in other cases just the opposite is true.  Technology is a very broad term, and the advancement of technology applies the idea that technological tools are either enhanced or replaced.  But in the situation of my work with PReS at my day job, my technology is neither advanced nor replaced.  So as more common technologies do evolve while my tools remain as they are, I end up becoming smarter because I am forced to think more creatively.

Categories: Thoughts Tags: , ,
Contact Form Powered By :