cnp_studio (cnp studio) - An interactive division of Clark/Nikdel/Powell

A unique mix of technology, creativity and human interaction makes cnp_studio a Web development firm focused on connecting people. Creating simple, useful Web sites is what we do. Learn more about us.

cnp_studio Blog

cnp_studio Blog

WordPress iPhone App Coming Soon

posted by nick on July 13th, 2008

I was lucky enough to get my hands on a new iPhone while out in California last week, so I've spent the weekend playing with that. Coming from my Blackberry 8200 this has been a long overdue upgrade.

Sadly, the launch of the iPhone Apps store did not include the WordPress iPhone App (Raanan assures me it wasn't for lack of trying). While we wait for the app you can always check out this video of the app in action. Some highlights of the app are:

  • Works with both WordPress.com as well as self-hosted blogs
  • Write and manage posts.
  • Upload pictures from your camera and photo library.
  • Preview posts from Safari.

It will be interesting to see if/how the app handles accounts for several different blogs. Having a "favorites" list of sorts that would store login info for multiple sites and allowing for one-click login into a site would be great.

Oh, and not to skip over the fact that I haven't posted here in 3 months, I've neglected this seriously (a product of working on others blogs way more than our own) but will be picking back up on regular posting. Got some really exciting projects in the works now that I can't wait to share.

Update: It's here! Check it out at http://iphone.wordpress.org

Around the Office - Toys!

posted by nick on April 9th, 2008

As seen around the office...

Spuda Fett
Spuda Fett

Darth Mash
Darth Mash

Ugly Doll - Big Toe
Big Toe

Lego AT-AT
Lego Motorized AT-AT

Thanks to Josh for the use of the new D300 for the shots.

cnp_studio Gets a Mention on the WordPress Publisher Blog

posted by nick on April 8th, 2008

Raanan over at the WordPress Publisher Blog just posted a note about our involvement with the PlayStation Blog (and that it's running WordPress). He specifically references our recent post that took a more in-depth look at the work behind the project.

The Publisher Blog highlights some of the lesser known features of WordPress, interesting plugins and also projects using WordPress (hence the PS feature) so check it out if you’re not already.

PlayStation.Blog - A Closer Look at the WordPress Customizations

posted by nick on April 3rd, 2008

In January of 2007 we were asked by the guys over at Voce if we’d like to work on the development of the official PlayStation Blog. We had to check our calendar, but it just so happened that we had a place where we could squeeze the project in.

Customizing WordPress

The PlayStation Blog is a design by Josh that pulls influences directly from the main Sony PlayStation website.

PlayStation.Blog

Customizations on the theme include:

  • The home page pulls in the two most recent posts in their entirety (or until the MORE tag is used) and then the next five entries as headline and excerpt.
  • The PS Blog requires users to have an account in order to comment on posts. The wp-login.php page was completely re-skinned from the traditional WordPress login to match the site.
  • The registration process was customized to include an age gate. In order to comment on the site you must be at least a certain age so we check for that (I can't tell you what age, then you'll just cheat the system).

Plugins We Used

The great thing about WordPress and the community behind it is that in most instances if you want to do something, someone has already created a plugin for that. In our case we have quite a few plugins at work on the PS Blog including:

Plugins We Developed

Sometimes you need something and there isn’t a plugin for it. No problem, you develop a plugin to fill that need. What’s really great is when you have a group like the guys at Sony Computer Entertainment America (SCEA) who want to contribute back to the WordPress community and then release these plugins back for others:

  • Image Rotator – Adds the ability to insert a random image rotation panel into a WordPress blog.
  • Author Comment Replies – Gives authors the ability to reply directly to a posted comment. Unlike threaded comments only authors can respond, not all visitors.

Maximizing Performance

No matter the amount of traffic every blog can benefit from a caching plugin such as WP Cache or 1 Blog Cacher. A site like the PlayStation Blog receives a constant high volume of traffic and the difference between using one of these caching plugins and not is incredible.

If you manage your own servers and are running WordPress then a session on performance at last year's WordCamp is a worthwhile watch. Barry Abrahamson and Matt Mullenweg give great tips on topics such as opcode caching, WP Cache and HyperDB. Watch it, learn it, and increase your blog's performance.

My WordPress Wish

In my perfect WordPress world, plugin developers will get together with developers of plugins that complement what they’ve created and make them play nice together. This may be happening out there more than I realize, so excuse me if this is, even better, let me know which plugins you're developing that work together. I only bring this up because of two plugins we use on this blog that just don’t play well together. One would be a recent comments plugin, the other would be the comment paging plugin. I’ve already written an extensive post about this once before, so read more on my frustrations there.

Just the Surface

This really just scratches the surface of customizations on this blog. If there’s something specific that you’d like to know more about let me know and I’ll do my best to answer. I hope to do more in-depth looks at some of our other projects here soon… time permitting.

Breathe in… Now Release

posted by nick on April 2nd, 2008

OK, so I said we'd been MIA for a bit, busy on projects and whatnot and we're very excited about two coming in for a landing today. I'll touch on that here in just a sec, but first something I've been neglecting to recognize…

WordPress Had Some Work Done

In the midst of the hustle we skipped right over posting about the release of WordPress 2.5. Kudos to Automattic and Happy Cog for the wonderful administration facelift. Expect to see our full thoughts on the upgrade in a future post.

With the upgrade of WordPress the WordPress.org website also received an update. A section of the homepage is dedicated to a rotation of companies with sites powered by WordPress. I’m very excited to say we have several of our projects in the rotation. See below…

Hat Trick

That eBay logo is a new one for us… as this week we were able to launch the official eBay Corporate Blog (eBay INK) as well as the eBay Insider Blog (both of which are cnp_studio/Voce joints). The others – PlayStation (PlayStation.Blog) and Yahoo! (Yodel Anecdotal) are previous releases that continue to grow. You can see more about each of those in the portfolio.

Where’d We Go?

posted by nick on March 28th, 2008

Posting has been a bit light here lately. We’ve had a jam-packed last several weeks and the exciting thing is that some big sites are in the home stretch. Can't wait to share.

We've been doing even more with WordPress and as a result are finishing a few posts on the topics of security, performance and scaling. All three seem to be a recurring theme lately so it seems fitting. Speaking of WordPress, WordCamp is this weekend out in Dallas. I won't be making it, but they say they’ll make the videos available online a week or two after the fact. In the mean time I'll watch the trackbacks on the schedule pages for anyone blogging the sessions.

We'll get the posting back to normal here soon. Lots to talk about.

Buzzwords Say It All

posted by nick on March 3rd, 2008

Recently I was talking with someone who threw out a few buzzwords which prompted all of us here to start reminiscing on some of our favorites. You know, synergize, monetize, vertical, end-to-end... the list goes on really. Well this prompted Mike to find this little gem, the Web Economy Bullshit Generator.

Be sure to save this. You never know when you might get into a war of buzzwords with someone and need to "engage scalable web services."

SQL Server Side Paging

posted by mike on February 29th, 2008

I was extremely excited about GridViews and DataGrids when I first started working with .NET. The thought of having controls with built in paging and sorting just blew me away. Needless to say, this excitement was short lived. By the end of my first project in .NET, I found that this built in sorting and paging had some major performance issues. It was too much data to send back and forth between the web server and the SQL server; not to mention that .NET just isn't as optimized to sort that much data as fast as SQL Server.

The alternative was to have SQL Server sort and page the data and only send back the data that was needed to the web server. After some research and some time to combine the ideas I found into my own solution I came up with:

 
CREATE PROCEDURE dbo.ReturnPage
(
  @SelectStmt varchar(1000), --Select Statement with Where Clause
  @OrderBy varchar(1000), --Order By Clause 'ASC' is required
  @StartRow int, --First Row of Page
  @EndRow int, --Last Row of Page
  @totRows int output --Output: Total Rows in Set
)
AS
 
DECLARE @ColList varchar(2000)
DECLARE @WhereCls varchar(2000)
DECLARE @i int
DECLARE @i2 int
DECLARE @tmp varchar(1000)
DECLARE @dec varchar(1000)
DECLARE @f varchar(100)
DECLARE @d varchar(100)
DECLARE @Symbol char(2)
DECLARE @SQL varchar(4000)
DECLARE @Sort varchar(1000)
DECLARE @tmpSQL NVARCHAR(4000)
 
--Assign the total number of rows available to @totRows for output
SET @SQL = N'SELECT @totRows = COUNT(*) FROM (' + @SelectStmt + ') tbl'
SET @tmpSQL = '' + @SQL
EXEC sp_executesql  @tmpSQL , N'@totRows int OUTPUT',
     @totRows = @totRows OUTPUT
 
SET @Sort = @OrderBy + ', '
SET @dec = ''
SET @WhereCls  = ''
SET @SQL = ''
 
SET @i = charindex(',' , @Sort)
 
--Pull apart the sort by clause for declarations
WHILE (@i != 0)
BEGIN
  SET @tmp = LEFT(@Sort,@i-1)
  SET @i2 = charindex(' ', @tmp)
  SET @f = ltrim(rtrim(LEFT(@tmp,@i2-1)))
  SET @d = ltrim(rtrim(substring(@tmp,@i2+1,100)))
  SET @Sort = rtrim(ltrim(substring(@Sort,@i+1,100)))
  SET @i = charindex(',', @Sort)
  SET @symbol = case when @d = 'ASC' then '>' else '< ' end +
          case when @i=0 then '=' else '' end
 
  SET @dec = @dec + 'declare @' + @f + ' sql_variant; '
  SET @ColList = isnull(REPLACE(REPLACE(@colList,'>','='),'< ','=') +
    ' and ','') + @f + @Symbol + ' @' + @f
  SET @WhereCls = @WhereCls + ' OR (' + @ColList + ') '
  SET @SQL = @SQL + ', @' + @f + '= ' + @f
 END
 
--Put together Transact SQL for final output
SET @SQL = @dec + ' ' +
  'SET ROWCOUNT ' + convert(varchar(10), @StartRow) + '; ' +
  'SELECT ' + substring(@SQL,3,7000) + ' from ('
  + @SelectStmt + ') a ORDER BY ' +  @OrderBy + '; ' +
  'SET ROWCOUNT ' +
  convert(varchar(10), 1 + @EndRow - @StartRow) + '; ' +
  'select * from (' + @SelectStmt + ') a WHERE ' +
  substring(@WhereCls,4,7000) + ' ORDER BY ' + @OrderBy +
  '; SET ROWCOUNT 0;'
 
EXEC(@SQL)
GO
 

What's it doing?

The procedure works by turning a simple query like:

 
SELECT col1, col2, col3, col4 FROM TABLE ORDER BY col1 ASC
 

and turning it into the following to add the paging.

 
DECLARE @col1 sql_variant
SET ROWCOUNT = @StartRow
SELECT @col1 = col1 FROM TABLE ORDER BY col1 ASC
SET ROWCOUNT = (@EndRow - @StartRow) + 1
SELECT col1, col2, col3, col4 FROM tbl WHERE col1 > @col1
  ORDER BY col1 ASC
 

Simple enough right?

Disclaimer

While this procedure does work with more complex queries containing SUB-SELECTS, JOINS and WHERE clauses, it does have its limitations. GROUP BY clauses do not work in this version. Maybe in the future.

I wouldn't suggest calling this procedure directly as that would mean you're building your query in-code, and probably not doing necessary escaping to prevent security issues. Creating a stored procedure that builds the original query from passed in WHERE and ORDER BY Parameters and then calls the ReturnPage procedure will be much more efficient and secure.

I hope to post a complete sample that will illustrate the changes to the .NET code and the wrapping procedure soon.

At Future of Web Apps (FOWA)

posted by nick on February 29th, 2008

After a late arrival to Miami last night, Josh and I are down here for Future of Web Apps today.

Future of Web Apps

Rarely do I make it down to Miami, but this is the second time now within a month that I've been down here. The last time was for some personal abuse, though.

2008 Local Addy Awards

posted by nick on February 26th, 2008

This past Friday everyone from the CNP offices attended the local Addy Awards banquet to see what kind of awards we would walk out with this year. The Addy Awards are conducted by the American Advertising Federation and the local competition is the entry point to their national competition. Awards are given across a multitude of categories from printed newsletters to TV commercials, product packaging to web sites.

Addy Awards
Photo by Sean

Basically, how it works is that we submit our best works from the previous year to the local competition and based on several criteria are awarded a gold award, silver award or nothing. Anything that is awarded a gold at the local level is then sent on to the state competition for the next round. I'm pleased to say that at this year's competition we had four of our submissions receive gold and they will move on to the next level. They were:

cnp_studio (one gold for the web site, one gold for our logo/stationery/business cards)

cnp_studio Web site

SeaWorld Journey to Atlantis

SeaWorld Journey to Atlantis

Kelly Homes

Kelly Homes Web Site

The award on the Kelly Homes site is bittersweet. We're glad the site did well, but sadly the entire site design as well as the HTML and CSS behind the site were completely copied and used by someone who thought it was OK to do such a thing. Expect to see more on this in another post here.

Sites receiving silver awards include Girl Scouts of West Central Florida, Polk Transportation Planning Organization, TrueDemand Software and Heacock Classic Car Insurance.

All of this is a result of the hard work of an all star team (Mike, Pete, Sean, Jeremy) and our great clients.

Latest Comments

andrew:
hey mike -- thanks for the reply, let me clarify what i mean.... I know that PHP fu...

nick:
Hi Jeff, Thanks for the heads up on the link. It's all fixed now and you should...

Jeff:
I would love to try your plugin, but the download link appears to be dead again. Ca...

mike:
@Denise: 1. The image is selected randomly each time the code is run. So normally ...

andrew:
hey -- great plugin and would like to use on several different pages, not just the ...

Categories Archives