09th Sep2011

Module to remove the address select from Ubercat Checkout

by admin

I was recently working on a website where the process required to have the address select drop-down fields not appear on the ubercart checkout page  so i wrote this small module.

I saw other people ask how to-do it, so here is your answer.

Remove Ubercart Address Select field
Remove Ubercart Address Select field

Please let mew know if it helped you. :)

11th May2011

From Joomla 1.0 to WordPress 3.1

by admin

I recently had a client who had an Joomla website with hundreds of posts. He had a couple of problems with his old website:

  • The site was loading very slow or not loading at all some times
  • Website flexibility was an issue
  • the person hired to maintain and to-do all the updates had a hard time working with very not intuitive Joomla

The client made a decision that its time to migrate site to some other CMS (content management system). The question became which would it be Drupal or WordPress. So we sat down and looked at his current site (whatever we were able to see, since part of the loading issue was the template we had to temporally switch to a different template). Here is a short list of stuff we looked at (and thoughts):

  • The site had a few hundred articles (need an automatic importer)
  • The articles are to the most part text with some image in the middle (WordPress could do it)
  • Though the articles are broken down into categories the layout to display them is identical (Would be easier to replicate with Drupal, but does the client actually care about this or would he not care to have all of them look the same)

As you probably guessed we went for the WordPress in this case. We started looking for a migration/importer solution to bring over the old content, but we hit a roadblock, there was an importer from Joomla 1.5 to WordPress 3, (to make it work would need to update the joomla first) and there was one for Joomla 1.0 to wordpress 2.3 (to make this work will need to install an old version of wordpress import and then upgrade or export as wordress to wordpress).  Since i wasn’t in the mood of updating an already broken Joomla site. I decided to use the second script Joomla to WordPress Import Wizard.

So here are the steps we took.

  • Install a new wordpress 3.0 on a sub-domain ”New”
  • Install wordpress 2.3 on sub-domain ”temp”
  • upload the importer/migration script to “import” folder
  • create all the Post categories corresponding to the old site in the temporary wordpress install
  • run the import script to import the content one category at a time
  • Clean up (move the contents of “new” sub-domain to the main public_html/www folder, delete unnecessary temp sub-domain and import folder)
  • Enjoy the new site

The whole process including theme customization took approximatively 15 Hours. And here is a link to the new website http://arniegotfryd.com. Any comments or questions?

04th Feb2010

Drupal Hacks – How to add a custom login box into your Drupal theme

by admin

Login BoxI just did a guest post on lichtman.ca please read it there.

03rd Jan2010

Should you use WordPress or Drupal?

by admin

I spend most of my working days working with Drupal so it’s no surprise that my first blog post on my site was about Drupal. You probably noticed though, that my blog runs on WordPress. I knew someone will point it out to me and ask me why, and i got this question today from a friend of mine. So i decided to write a blog post about the general difference between WordPress and Drupal, and when you should choose one or another.

WordPress:

lets start with an excerpt from the WordPress.org site:

WordPress started as just a blogging systems, but has evolved to be used as full content management system and so much more through the thousands of plug-ins, widgets, and themes, WordPress is limited only by your imagination. (And tech chops.)

Now my thought based on experience and observation:

WordPress is an excellent system to use when creating a website that lets you quickly get your thoughts out on the web, but while it is often used as a blog, it can be configured to work in many other interesting ways as well. I have used it several times with clients that are brand new to the Internet and having a website, yet they can pick this system up and use it quicker than the other two (Drupal or Joomla). Since WP is already developed to work as a blog, though, it can be setup to do so without any hesitation. Comments are already built into the system, as well as pinging services, multiple blogger profiles, track-backs and more. Most of the time nothing needs to be done to those systems either, because they already work the way that the user would want them to.
WordPress, however, is not to be used for everything.

While i know there are e-commerce sites powered by WordPress, people have had little success (its there, just not much) using WordPress as a shopping cart. The reason that WordPress was created, was to put the keys of starting your own websites in everyones hand, take for instance their famed five minutes install. But by doing it they stripped it to the bare minimum, which in turn now stops people keep people from wanting to customize it to do things that are much more advanced. It is supposed to be used as built, out of the box, because any modification that you give to it may very well cause it to break. You will find many users of WP complaining that it is not developer friendly and rightfully so, because there will be countless times in your journey to that great website that an upgrade released by the WP developers causes your entire site to simply disappear, or for those modifications that you made previously to no longer even exist.

WordPress Pros:

  • Simple to use – No need for modifications
  • Excellent for blogging or sharing thoughts in a sequential manner
  • Even the most elderly of users can get the hang of it quickly

WordPress Cons

  • Not very developer friendly
  • The community seems to like to complain much more that the Drupal community for example
  • Upgrades, while they are extremely easy to do, sometimes bring more bugs than fixes, and the more plugins you have the bigger the chance of it happening

Drupal

If you are the type of person who would rather hand-code the content of your pages than use a WYSIWYG Editor, or if you enjoy tweaking the code that makes up the framework of a website, then Drupal is probably for you. This advanced content management system, sometimes more closely resembles a developer platform than a traditional CMS. Its not to say that only developers can use the system though, but to say that they will feel more at home here than in the other two. Interestingly, being more developer friendly does not automatically make it more user friendly in fact the developer has to work hard to make it that way if they need the end-product to do so.

There are dozens of more functions that can be used to develop in Drupal than in WordPress. Every single node has its own set of commands and tags that can be placed elsewhere to manipulate the function of the site, and this makes for a very intense experience (whether or not you know what you are doing). For those that are not so developer-minded, this can be the trial of their lives, but for people who live in code well, they can literally get lost developing some very cool websites.

Now, Drupal websites can act and function in some pretty cool ways, but Drupal has the problem that it just doesn’t look that great (at least not withoput long hours of work…). I have seen very few websites built in Drupal that look and feel as good as they function. Not that they don’t exist they are just few compared to the other ones. And the problem is not that its not themable, take for example a site we made (in conjunction with U2R1media) for Amaravati a gorgeous site but we spent probably almost twice the time on the theming as on functionality. So the problem is just the opposite its very themable and customizable, but out of the box it looks like a site back from nineties, and theming has extremely steep learning curve. You can especially see this in the theme directory on the Drupal.org website, where there are dozens of these themes built to prove the exact point I just made. It’s a shame really, because with all of the development advancements the software has, it would almost be perfect with a stronger usability and design interface. It has made huge improvements with the core 6.x but more is needed and according to what i have read and saw about Drupal core 7.x they are putting a lot of effort into this area, but we will have to wait until it’s first stable release is out and then  some time until all the important modules have their stable releases out the door.

Drupal Pros

  • Extremely developer friendly.
  • Strong community to help discern the dozens (hundreds) of functions, modules and patches available.
  • Can be used to create some really awesome websites that can outperform a majority of other sites out there.
  • Scales as no other system would

Drupal Cons

  • Not very designer and user-friendly. It’s hard for someone with little code knowledge to make the leaps required to do the very cool things that Drupal is becoming known for.
  • Themes for Drupal has been a huge case of fail (until recently). Probably because it has been developers, not designers, that are making the themes.
  • Getting a Drupal website published could cost you more time, and thus more money, than WordPress.
  • While WordPress could be hosted on a very cheap hosting, Drupal needs an access to a lot of RAM.

How Secure is it to use open source CMS

Drupal was all over the news a couple of month ago when WhiteHouse.gov remade their website in Drupal, it was definitely a vote of confidence in  in Drupal’s security by a site thats one of the most targeted by hackers in the world. Now while WordPress was not chosen by the White House, it’s known that BlackBerry is considered a brand of secure communications, so much so that even the President of United States Barack Obama was permitted by his security team to have one, and when they recently remade their Inside BlackBerry blog they used WordPress. So as far as Security is concerned, i would say it should not be on top of your list if you create in either one of the systems.

What do you consider to be the pros and cons of each system? Do you disagree with any of the remarks i made about them? please feel free to leave a comment.

29th Dec2009

Couple of things I learned while creating sites in Drupal

by admin

DrupalI am now creating my 5-th site in Drupal, three of them being pretty big and totally custom. So using a free or even premium theme was not an option. Each section of the site looked so much different that if i would cover logo and name of the site, you would probably think twice before saying thats its the same site. Obviously i made a lot of mistakes, but as they say “The best way to learn is from your mistakes”. So let me share with you some of my mistakes and what i learned from them, plus some of the modules that i found really useful.

Starter Theme

Start with free blueprint theme this will give you a starting point so that you will have all the elements on the page but without actually having any design, so that when you start putting in your design you don’t have to fight with legacy code from the theme.

Admin

Next very important step is going to be to install Admin Menu. This module is so important that it was included in core of Drupal 7.

Javascript

As i mentioned earlier the sites i was working on were very custom they were using:  jQuery, Cufon,  Accordion, Ajax, Thickbox, In-Field Labels… The version of jQuery that comes prepackaged with Drupal is old. So what i did is just put the latest version in the theme… I got it to work but not without having multiple versions of jQuery being included on every page, which in turn forced me to use “jQuery no conflict mode”. Even though we got it to work eventually, every time you add any module that uses jQuery i have to go through the javascript and substitute “$” sign with “jQuery”. So obviously there must be a better way. An indeed there is, what i could, and should, have done is install jQuery Update module, which would update the version in a “Drupal” way. Also there is a jQuery UI Module which contains:

  • Accordion
  • Datepicker
  • Dialog
  • Progressbar
  • Slider
  • Tabs

There is also a Cufon Module, Thickbox Module etc. So whatever you trying to do try to find a Drupal way of doing it.

Theming the site

There are few must have tools (Modules) in this area. You will need Devel Module to see whats going on under the hood of your drupal site what templates and what functions are used and which names you could use to override those. Another module that i find myself using a lot is Views. I use it for two entirely different purposes, one to create a custom block or a page. Another use is not so “Drupal”, sometimes you have no other choice but to stick in a SQL query into your theme, but the problem you will encounter is Drupal is so flexible and generic that sometimes to get one entry from the database you will need to connect and join three, four or even five tables, so to write the SQL query by hand will take you a while, here is where my second use of Views comes into play, there is an option to show you the SQL query the view runs while generating content you requested, so you could just copy it and stick it into your theme.

Other Modules i use:

  • Token – Used mostly by other modules
  • imageapi – Used by other modules
  • Disqus – substitutes the default comment system with the one from Disqus  which lets your readers comment by login in with their Twitter, Facebook login or others, plus it lets you have the conversation all across the web, i find it truly amazing.
  • CCK – Lets you add custom fields aside from title and body
    • filefield – File type of CCK Field
    • imagefield – Image type of CCK Field
  • imagecache – Lets you show the same image in variety of sizes, based on presets
  • Poormanscron – runs the cron jobs for you (will be included in core of Drupal 7)
  • pathauto – automatically generates aliases
  • globalredirect – makes sure that node/10 takes you to node10alias, so that there is only one URL to unique content
  • webform – If you are planning to have any forms on your site
    • webformblock – If you want to show the form in a block, versus a whole page

As i continue to make more mistakes (read learn) i will continue to share more lessons i learned. If there is anything you would like to share or ask, feel free to do so in the comments.

If you liked this post you might want to read the part 2.

Reblog this post [with Zemanta]