Feature
Post

Category
Friday Focus

Friday Focus #30

Number thirty! Enjoy the weekend everyone.

Sites of the Week

Starting this week off is Unfortunate. This site makes the list because I really like the idea, and I think it’s pretty fun. The site itself isn’t bad either, but I think it’s the originality of the project that gets more vote a bit more.

Unfortunate

Next up is a site for Syntax clothing. If you’ve followed Friday Focus for weeks and weeks on end, you know what I’m a sucker for online store fronts, and Syntax is no different. With a site designed to look likes its inside of a bag, Syntax really looks great.

Syntax Clothing

And rounding out this weeks picks is a personal portfolio, with some really cool work. Owlscout is a dark brown design, but I really like a lot of the graphics and illustration found in the portfolio. Give it a look if you get the chance.

Owlscout

Digg Weekly

Favorites from the past 7 days

DesignHow to make sexy buttons using css
This tutorial was simple and the results were pretty nice. If you want clean looking buttons, considering trying this css technique.

ProgrammingTop 5 Javascript Frameworks
The top five javascript frameworks (according to this author), with a brief summary of each ones features.

Up and Coming

DesignHow do you write a graphic design brief?
A design brief ensures that you know exactly what you want to achieve from your project and allows a point of reference for designers to focus on.

ProgrammingThe JavaScript Programming Language
Want to learn JavaScript? Here’s five videos to help you out.

Design Dilemma

How do you convince a micro-managing style-challenged client that having a plethora of fonts on business cards, posters, or websites is not only third grade, but that it looks absolutely dreadful?

Have your own dilemma? Send Ronald yours and we’ll feature it in the next focus (with a credit to your site).

WordPress Plugin Spotlight

I didn’t find any plugins this week to spotlight, but there is some cool WordPress news. From Avinash I learned that WordPress 2.2 RC1 has been released. I’ve had the opportunity to tinker with it (to test plugin compatibility) and haven’t found any problems so far. The changes are mostly under the hood. One of the features I really like is a plugin sandbox that makes sure a plugin has no errors before loading it or activating it.

WordPress Plugin Series

I have started a plugin series that is sure to benefit all WordPress users who are interested in getting started with plugin design. Here are the posts so far:

Feature
Post

Category
Code

Structure of a WordPress Plugin

How To Write a WordPress Plugin Series

This post was written as part of the How to Write a WordPress Plugin series.

One of the more important aspects of developing a WordPress plugin is how you structure it. This post will go over some tips on how to structure your plugin to organize your plugin resources and avoid naming collisions. Each plugin author is different in the way they structure a plugin, so these tips are merely my own personal preference. I’ll first briefly describe how a WordPress plugin works and then go into a plugin’s structure.

How a WordPress Plugin Works

After placing a WordPress plugin into the “wp-content/plugins/” folder, the plugin should automatically be available to install.

When a plugin is “Activated”, this tells WordPress to load your bit of code on “each” page (including admin pages). This is why if you have many plugins activated, your WordPress installation may be very slow due to the amount of code being included.

Since WordPress loads your code automatically when the plugin is activated, you can take advantage of this by tapping into the WordPress Plugin Application Program Interface (API). You can also access the WordPress template tags or create your own.

I suggest reading into the WordPress loop if you plan on making changes to the post content or comments. The WordPress loop is the loop that displays your posts. Some template tags will not work outside of this loop, so it is imperative that you know exactly where your code is executing. You can control this by taking advantage of actions and filters, which will be explained in later posts.

Folder Structure

All WordPress plugins will be installed in the wp-content/plugins directory. Some plugin authors simply include a PHP file for their plugin, but I recommend always creating a folder to store your plugin.

I typically structure my plugin in this folder structure:

  • Plugin Folder Name (The name of your plugin with no spaces or special characters)
    • Main plugin php file
    • js folder (for JavaScript files)
    • css folder (for StyleSheet files)
    • php folder (for other PHP includes)

For example purposes, here is a sample structure I have created:

  • devlounge-plugin-series
    • devlounge-plugin-series.php
    • js
    • css
    • php

Within the devlounge-plugin-series folder, I would include just the main PHP file and put all other files in their respective folders. This structure will assist other plugin authors who look at your code to be able to tell what the main plugin file is and where all the supporting files are located.

WordPress also recommends placing images in their own directory and including a read me file for your plugin.

Main Plugin File

When you start a new plugin file, the first seven lines are the lines that describe your plugin.

<?php
/*
Plugin Name: Your Plugin Name Here
Plugin URI: Your Plugin URI
Version: Current Plugin Version
Author: Who Are You?
Description: What does your plugin do?

Line 3 allows you to name your plugin. Line 4 allows you to point a user to the web location of your plugin. Line 5 allows you to specify the current version. Line 6 allows you to specify the author of the plugin. Line 7 allows you to describe your plugin.

Shown below is an example of the code filled out:

<?php
/*
Plugin Name: Devlounge Plugin Series
Plugin URI: http://www.devlounge.net/
Version: v1.00
Author: <a href="http://www.ronalfy.com/">Ronald Huereca</a>
Description: A sample plugin for a <a href="http://www.devlounge.net">Devlounge</a> series.

Shown below is a screenshot of what the plugin would look like in the WordPress Plugins panel.

Devlounge Plugin Screenshot

Set Up a Class Structure

You don’t have to be incredibly familiar with PHP Classes to develop a WordPress plugin, but it sure helps. A class structure is necessary in order to avoid naming collisions with other WordPress plugins. If someone out there sets up the same function name as yours in a plugin, an error will result and WordPress will be rendered inoperable until that plugin is removed.

To avoid naming collisions, it is imperative that all plugins incorporate a PHP class structure. Here is some bare-bones code that will allow you to set up a class structure.

if (!class_exists("DevloungePluginSeries")) {
	class DevloungePluginSeries {
		function DevloungePluginSeries() { //constructor

		}

	}

} //End Class DevloungePluginSeries

What the above code does is checks for the existence of a class named DevloungePluginSeries. If the class doesn’t exist, the class is created.

Initialize Your Class

The next bit of code will initialize (instantiate) your class.

if (class_exists("DevloungePluginSeries")) {
	$dl_pluginSeries = new DevloungePluginSeries();
}

All the above code checks for is if the class DevloungePluginSeries has been created. If it has, a variable called $dl_pluginSeries is created with an instance of the DevloungePluginSeries class.

Set Up Actions and Filters

The next bit of code sets up a place holder for WordPress actions and filters (which I will go over in a later post).

//Actions and Filters
if (isset($dl_pluginSeries)) {
	//Actions

	//Filters
}

?>

The above code checks to make sure the $dl_pluginSeries variable is set. If it is (and that’s only if the class exists), then the appropriate actions and filters are set up.

Conclusion

The post served as a very basic foundational structure for starting a WordPress plugin. If you want to download the sample code, please feel free. The code will be available after almost every post in this series for you to dig through.

Download the Code Used In This Post

Digging through plugin code is a great way to learn the in’s and out’s of plugin design. I still do it, and I learn something new almost every time. Thank you Lewis for the tip suggestion.

For further reading, please check out these links:

Feature
Post

Category
Homepage News

Updates from HQ

After a pretty long absence, I’m back and ready to go with putting together the next edition of Devlounge. I listened to all the positive and negative feedback about this design, previous ones, and what was going to be the next design. I’m taking everyones ideas and suggestions and mixing them all together to restore Devlounge to the site it once was. I promise you, this is going to be one hell of an exciting summer for us and our long time readers are going to enjoy all the changes that are going to occur. We promise content is going to get better and much more frequent, and the site will be a piece of cake to navigate through, while of course keeping that “artistic touch” that has made people love us. Stay tuned, June is looking like a good one.

Feature
Post

Category
General

How to Get Ideas for WordPress Plugins

How To Write a WordPress Plugin Series

This post was written as part of the How to Write a WordPress Plugin series.

If you are convinced that you would like to investigate the possibility of creating your own WordPress plugin, it may be hard to think of that idea that will allow you to take the plunge. Fortunately, there are many places to find inspiration regarding developing your own WordPress plugin. Within this post, I will list several ways to get ideas for your very own WordPress plugin.

Listen to your Readers

Your readers are a valuable asset when it comes to getting ideas for plugins. For example, a reader might request an easy way to reply to or edit comments. Since blog readers are the ones who use your blog the most, they have a unique insight in what they want out of your blog. Just the other day, one of my readers asked me to have a way to preview a comment before posting. Luckily there is already a few plugins out there for that, but sometimes your readers will suggest something that has yet to be implemented as a plugin.

Listen to Yourself

“If only WordPress could do…”

If you find that WordPress lacks a feature that you truly want, why not program it yourself in the form of a plugin? Chances are that if you desire the feature added, others will too.

Check out Blogging Resources

Sites such as The Blog Herald and Weblog Tools Collection are great resources for plugin ideas. On Wednesday, The Blog Herald has a column called WordPress Wednesday. Within this column are plugin requests and a “wishlist” for WordPress. Weblog Tools Collection typically has a plugin announcement almost every day, and from there you can get an idea of what kind of plugins people are churning out.

Check out the WordPress Support Forums

The WordPress Support Forums are full of people looking for help on extending their WordPress blog. A particularly useful forum for plugin ideas is the Requests and Feedback forum. Another area is the WordPress ideas page.

Investigate APIs

Online services such as Flickr, FeedBurner, Google Maps, and others have APIs (Application Program Interfaces) that allow third-party applications the ability to interface with their services. Through these APIs, you start programming your own WordPress solution.

If there is a service that you really like, but you would like to see it included in WordPress, investigate the service’s API and see if it would make a good plugin.

Third Party Applications

There are many third-party applications that people may have installed along with a WordPress blog. Examples of such programs are Mint, Vanilla, and many others. Why not develop a WordPress plugin that integrates these third-party applications into a WordPress blog?

Existing WordPress Plugins

If you find a WordPress plugin you really like and would like to branch out with your own idea, feel free to do so. If you don’t like the implementation of a particular plugin, build your own implementation. There are many plugins out there that essentially do the same thing, but are all slightly different.

Conclusion

Hopefully you now have several resources for you to go out and find ideas for that next WordPress plugin. If you have any further suggestions regarding getting ideas, please share them in the comments.

Feature
Post

Category
General

Seven Reasons to Write a WordPress Plugin

How To Write a WordPress Plugin Series

This post was written as part of the How to Write a WordPress Plugin series.

While writing the “How to Write a Plugin” series, I thought it would be beneficial to list some reasons why WordPress users would want to write a WordPress plugin in the first place.

Listed below are seven reasons why a WordPress user should consider writing a WordPress plugin.

You like a plugin’s idea, but don’t like the plugin’s implementation

Whether discovering WordPress plugins on Weblog Tools Collection, the official WordPress plugins directory, or the WordPress Plugin Database, you will inevitably find a plugin that meets your needs — sort of.

You like the idea of the plugin, but not really the approach the plugin author took with it. Why not run with the original idea and create your own separate version?

You want to modify existing plugin code

Sometimes the plugin’s output needs to be tweaked a little bit or some functionality you would like is missing. You can try convincing the plugin author to add your feature, but plugin authors are usually quite busy or they may not like your suggestion. It takes a lot of effort by a plugin author to provide support and field feature and bug requests for a plugin that is free. Sometimes the plugin is no longer supported by anyone.

In the event the plugin author is unable to your needs, it will be up to you to take the initiative and modify the existing plugin code. If you do a good enough job and make enough changes, you can re-release the plugin as long as the original plugin was released under a GPL compatible license.

Usually one of the first things I do when I install or test a new plugin is to look at the code and see what I can modify, what I can’t modify, and what I can possibly add or take away.

You want to extend a plugin

Sometimes a plugin is good as it is, but you would like to build upon it and release your own version. For example, you may think a plugin would work better using AJAX, or would like to add more hooks so that it is compatible with other plugins. You may want to add an admin panel so you don’t have to dig through the code to change the output.

As stated earlier, if a plugin is released as GPL compatible, you are free to release your own version.

You want portable theme code

For those of us who opted to build a custom theme from scratch rather than download one, you may find yourself re-using code snippets all over the place. Wouldn’t it be better just to write your own plugin that combined all the little code snippets so that you could use them as template tags?

The beauty of template tags is that you can re-use them over and over for your theme and any future ones you build. And you only have one place to change the code rather than several.

You are a theme designer

I would argue that if you are a template designer for WordPress, the next logical step is to be a plugin author. Writing plugins gives you a more intimate knowledge of how WordPress behaves and allows you to extend the functionality of your released themes.

You want to make money

A good plugin author can usually get paid on the side for custom work. Some plugin authors take donations as well or charge extra for providing support or for consulting.

If you are a custom theme designer, you can package your custom plugins in with the theme for an extra charge.

You want incoming links

When launching the Reader Appreciation Project, one of the goals I had was to rapidly build incoming links. The best way I knew how was to write some WordPress plugins and promote them. One of my plugins (WP Ajax Edit Comments) turned out to be very popular and has currently generated more than 100 incoming links.

Conclusion

As you can see from the reasons listed above, there are many reasons to write a WordPress plugin. My next post in the series will go over how to get plugin ideas.

If you have any more reasons that I did not mention, feel free to add them in the comments.

Feature
Post

Category
General

How to Write a WordPress Plugin – Introduction

How To Write a WordPress Plugin Series

This post was written as part of the How to Write a WordPress Plugin series.

For any WordPress user, plugins are essential. WordPress Plugins allow those with little to no programming skills to extend the functionality of their blog. Plugins come in all shapes and sizes, and there is a plugin that does just about anything for WordPress.

As good as WordPress is as a standalone application, there are still things that WordPress lacks. Users are requesting more and more features for WordPress that would be very feasible to write as a plugin. There are many untapped ideas out there, and new ones created every day.

Having released three plugins already (not counting the custom ones I wrote), I am aware of some of the limitations of WordPress and wish to share some of the lessons I have learned (and am still learning) about creating WordPress plugins. As a result, I will be starting series that will discuss various topics regarding writing your own WordPress plugin. The series will start off very introductory and will assume your plugin knowledge is zilch.

Who is this Series For?

This series is for any WordPress user who is curious about or wants to learn how to write their own WordPress plugin. Readers of this series will have an intermediate knowledge of PHP, know a little JavaScript, and be decent at Cascading Style Sheets.

This plugin series will benefit theme designers, those that like to tinker with plugin code, and those that are interested in writing their own plugin from scratch.

Tools to Get the Job Done

To write plugins, any text editor will do. Here are the tools I personally use to create plugins.

This series assumes you have WordPress 2.1.x or greater installed.

Code Samples

All code I use will be available for download after each post in the Conclusion section. I will be building the code as I go along, so each download will be different. I will be creating a plugin that doesn’t really do anything other than to show you the basics of how a plugin works.

Since each post in this series builds on top of each other, it is recommended to read this series in the order it is presented.

I highly recommend not using the test plugin on a production WordPress installation. Instead, use a local WordPress installation.

Topics

I plan to start off really basic and move quickly into the more hard-core WordPress plugin functions. This series will not be a comprehensive micro-detail of plugin development, but will hopefully give you a nice foundation to start your own plugin development. If you have any questions or suggestions, please leave a comment or e-mail me using the Devlounge contact form (Ronald). I do ask that you not rely on Devlounge for support and instead use the WordPress Support forums.

Techniques

Some of the techniques I use in my code samples may not be the best way to present code and you may be cringing because I don’t have a lot of shortcuts. I apologize in advance. Everybody has a different coding style.

As far as plugin techniques, structure, behavior, and other nuisances, if there is a better and easier way that I overlooked, I am all ears (er, eyes).

Series Publication Schedule

A post from this series is planned to be published every two days. To stay up to speed on the series, I suggest you subscribe to the Devlounge feed.

Conclusion

Thank you for reading the series introduction. My hope is that this series will prove beneficial to the readers. Any feedback is welcome. Thank you.

Feature
Post

Category
Friday Focus

Friday Focus #29

One more week to go before we hit 30 weeks of Friday excitement. Just to let you know, I’m cutting out one site of the week and my weekly “Top Week Submissions” from Digg for this weeks Focus, because I didn’t have time during the week (see “Slow Month“), and since I didn’t do much browsing around the web this week, I thought it’d be better to leave out entries than try to half-ass them all too quickly. So, most of this weeks focus content comes from Ronalfy, who by the way has multiple posts on the writing block in a series you’re truly going to enjoy (especially you WordPress fans). Hopefully it’ll start this week.

Sites of the Week

First up this week is Visit Cascadia. A fun but very nicely designed site. I like it a lot, and some great uses of flash here and there really add to it.

VC

And wrapping it this [short] week is UKOS. I love the tabbed navigation, and even though it’s simply, the layout is very balanced and clean.

UKOS

Digg Weekly

Up and Coming

Design16 Best-Loved Fonts In Web Design
A great collection of the various fonts shown throughout the web.

Software20 Sure-Fire Ways to Come Up With Great Ideas
A great list of how to come up with good ideas.

Design Dilemma

This week’s design dilemma is contributed by Inspiration Bit.
Would you consider using tables for laying out forms and cut the headache with the cross-browser issues, or would you still bang your head trying to get the form to display correctly working with DIVs?

Have your own dilemma? Send Ronald yours and we’ll feature it in the next focus.

WordPress Plugin Spotlight

Simple Yearly Archive Plugin is very similar to the Clean Archives plugin. Both allow you to display your posts categories by year and offer different display options. For a way to show your archives by categories, check out a plugin called Categories and Posts.

Feature
Post

Category
Interviews

Craig Elimeliah of Firstborn

Today we sit down and ask some questions to Craig of Firstborn Multimedia, an excellent flash design that puts out some truly excellent and fun work.

Q: Hello Craig, how’s everything going? Mind introducing yourself along with Firstborn to all of our readers?

My name is Craig Elimeliah, I am a producer at Firstborn Multimedia. I have been designing, developing and producing interactive websites and applications for about 9 years now. I actually started my design career while in rabbinical school in Jerusalem. Upon returning to the States in 1997 I got myself a job at a MAC lab in a private school in NJ where I scored some free equipment and software and the rest is history. I owned an interactive firm called Pixelon Design and then a software company called Fashionware, after I sold Fashionware I joined Firstborn.

Craig Elimeliah of Firstborn

Firstborn is one of the top interactive development firms in the world. We have an amazing team of designers and developers and very talented producers.

Q: When did Firstborn first come about, and how many people make up your team?

Firstborn is turning 10 this year, a real achievement for an interactive shop. Firstborn was started by Michael Ferdman, Vas Sloutchevsky and Mark Ferdman. Today Michael is the sole owner. Firstborn has about 30 employees and is always looking for passionate and talented people who love the interactive realm and work really hard. What separates us from most other companies is that we are comprised of many different personalities that all bring something different to the table. We are all about hard work and dedication, we all love what we do and we are very privileged to be able to work with the world’s top brands and best projects.

Firstborn

Q: One of your most recent projects was for Microsoft Forefront. Mind explaining the process that was involved in putting together this project, and what it’s like to work with big companies (Macy’s, Victoria Secret, MTV, etc)?

Microsoft Forefront was a really exciting project to work on; I flew out to LA and took along Tim Nolan (fellow producer) and John White (art director extraordinaire) to shoot the video for the site. We had an amazing time working with McCann SF in Hollywood and our insistence on high def video and other various flash considerations paid off big time, McCann really allowed us to take the reigns and produce something special.

We were absolutely obsessed with taming alpha video on the web, we had gotten so many crappy assets in the past we knew that this was the project where we were going to solve all of our alpha video mysteries and produce a site that was going to be comprised of ONLY video assets.

Alon Zouaretz programmed the hell out of this site and made it all come together. He is an absolute genius when it comes to site structure and organization. Joon, our creative director, did the amazing effects for the intro and everyone else in the company stepped in and helped out with the GIGS AND GIGS of raw video.

It was truly a company wide collaborative experience and I was really fortunate to have the opportunity to head it up as the producer. We are all very proud of the results and Microsoft is just as happy.

My latest round of projects included brands like Axe, Intel, Samsung, Microsoft, some work for a famous hip hop star and a really fun site for Perdue. As you see I have been really lucky this year to have worked on all of these high profile brands. Firstborn attracts the best clients out there and we always deliver big time. We also do a lot of projects that we can’t even mention, also major brands and successful sites.

Everyone at Firstborn enjoys working on highly profile projects that change the landscape of the interactive realm. I can’t imagine not working with the best brands because it allows us to set the bar every time we launch a new project. Sometimes I feel like I am a bit spoiled. I am truly fortunate for being able to work such great projects.

Sorry to say this but 2.0 just can’t produce that kind of emotional impact. There is nothing overrated about Flash. Its engaging and entertaining, 2.0 is not anywhere near Flash in that respect.
- Craig on Flash “Dying Out”

Q: Obviously by the caliber of your flash and motion work, the benefits of Flash are still extremely great. What would you say to all those “web 2.0ers” who believe flash is dying out and is over-rated now?

Dying out? That’s news to me. 2.0 is cool for like Blogs and community driven sites like Digg, but Flash is so pure, so emotional. Flash is passionate, it tells a story. Innovation will level out and Flash will be in the hands of more people very shortly, however it will be the inspirational aspect that will drive the new wave of developers. I am also a writer, and to me Flash resembles the beauty of words, it allows the user to enter new worlds and to connect on an emotional level. Sorry to say this but 2.0 just can’t produce that kind of emotional impact. There is nothing overrated about Flash. Its engaging and entertaining, 2.0 is not anywhere near Flash in that respect.

Q: With such a mass collection of portfolio work, are there any particular projects / clients you’ve enjoyed working on / with the most?

Fila Adatto.

Fila was my baby. It was the most unusual and unique project I had ever worked on. It was one of the first projects I had taken on at Firstborn. Fila approached us to come up with a customized web-based flash enabled foot scanner so they would be able to sell custom made shoes to their customers. You can check out my case study here. This project involved everything from Flash, 3D, hardware, software, integration, back ends, front ends, databases and some very unique personalities. I even spent a few weeks selling the actual shoes in the store so that I could test the kiosk and make sure everything worked perfectly. This project had it all. I learned so much producing this project and it gained me a lifetime of experience. The results were amazing and the kiosk launched worldwide.

I could literally write a book on the whole process and drama that took place during this project.

Q: What tools do you use the most when combining live motion with flash design? Will the launch of Flash CS3 have any major impact on your work flow process?

We use lots of different tools. Our developers are very flexible and will do whatever it takes to get the right results. We use all the Adobe products like After Effects, Flash, Photoshop and Illustrator as well as Ultra and even 3Ds Max and other 3D programs. We use a host of compression methods and programming methods to help tie together the various technologies included in that is lots of creative brain power and hard work.

CS3 is going to have a major impact with how developers and designer do everything. We have already started tinkering with it and we will continue to master the new features so that we can deliver the best possible work to our clients and to make sure that our future projects are the best they can be. I am personally very excited to get my hands dirty and to pick up some of the new tools for my personal work that I enjoy doing in my free time.

CS3 is the ultimate package and a re-birth of sorts for Adobe. It is putting very powerful and easy to use tools in the hands of many people who will be creating the new digital landscape.

Q: Any work worth checking out on the horizon (For example, a free Devlounge promo piece)?

Nice one, we can talk about that after the interview. We have some very exciting new things on the horizon that I can’t talk about here. We have a new website coming out this year that will coincide with our ten year anniversary and that is very exciting for us. Keep your eyes peeled because there is going to be a whole new level of excitement and quality being churned out of Firstborn.

Q: Thanks for taking the time to chat. Keep up the excellent work and regards to everyone at FB!

My pleasure! Thanks for bringing us the community that is Devlounge and keep up the good work.