YOOtheme: Noble

Written by Evan Petersen on Monday, 29 August 2011. Posted in General Hacks

Sometimes turn key services/packages just don't seem to work when you initially install them.  This was the case when I began putting together EvanPetersen.com.  In this post, I'll walk you through how I went about solving a simple, yet particularly annoying problem.


THE PROBLEM

Rather than start from scratch on design, I selected a template (Noble) from YOOtheme and installed it on top of Joomla! 1.5.  I was rather unhappy to find that the date on my posts appeared with the month spelled out rather than abbreviated to their unique 3 letter code.  

 29 august VS 29 aug

You may be thinking to yourself, "that sure doesn't seem like such a big deal to me...".  And you're right, it's not a big deal, but I also believe that if I am using a service that claims to offer a template that works out of the box, then it should work.

So, with a little bit of shell magic and some Google-fu, I managed to "hack" the template so that month names wouldn't exceed their allotted space (Ridiculous, I know).


FINDING THE ROOT OF THE ISSUE

First things first -- I loaded up Google Chrome and navigated to the offending page.  Right clicked on the element and chose inspect element.  (I use this feature a lot, so expect to see it in most of my future posts).

firebug

Because I am using Joomla!, I can't just navigate to a "flat file" and edit the HTML.  Instead,  I have to search through Joomla!'s seemingly bottomless pit of directories and files.  This task, however, is a walk in the park with the combination of shell access and a basic Unix command -- grep.

 

USING SHELL ACCESS 

Now, it would be silly to do a grep on the /www/ folder seeing as how that includes everything in the website.  No, it's best to narrow your search to where you think the problem is.  In this case, I knew that the problem was somewhere inside the /www/media/zoo/applications/blog/ folder.  So I first CDd to the directory /www/media/zoo/applications/blog/.

Now that I'm inside my target directory, I ran a grep against all files for the string "month" and came up with this:

grep

 

THE HEART OF THE PROBLEM

As much as I like shell access, I broke out my favourite FTP software (FileZilla, look for it in the links to the right) and took down the files full.php and teaser.php from the directory noble/renderer/item/.

I did another search inside the files for the string "month" and found the following line:

      
$month = $this->app->html->_('date', $item->created, $this->app->date->format('%B'), $this->app->date->getOffset());

 

GOOGLE-FU

Now, at first I was unfamiliar with the %B, but after a quick Google search, I landed on this page: http://en.wikipedia.org/wiki/Date_(Unix)

 

THE SOLUTION

According to the article, all I had to do was switch the uppercase B to a lowercase b.

And voila! I finally had the functionality I was looking for.

While this post may sound like it took a lot of time, I think I was only at the problem for a couple of minutes.  I take this same approach (grep, ftp, Google) with most problems and have had decent success. 

Hope you enjoyed this post!  If you know of a better way to do something that I mentioned above, please leave a comment.  There is always room for improvement.

About the Author

Evan Petersen

My name is Evan Petersen, and I work as a Programmer in Southern Oregon. You can visit the home page of my blog at: www.EvanPetersen.com.

I enjoy reserarching new methods to solve age old problems and later sharing my findings with the community at large. Hopefully you'll find something of use!

Follow me on G+

Comments (11)

  • Avo

    Avo

    30 August 2011 at 08:57 |
    Good stuff.
  • Leonardo

    Leonardo

    08 September 2011 at 08:00 |
    Gracias por el aporte.
  • Jonalyn

    Jonalyn

    07 January 2012 at 04:10 |
    Thanks for spending time on the computer (writing) so otehrs don't have to.
  • Cindy

    Cindy

    05 March 2012 at 00:47 |
    After an hour of frustration, this was spectacularly helpful. Thanks very much!
    • Evan Petersen

      Evan Petersen

      05 March 2012 at 08:55 |
      So glad that I could be of help! It can be quite annoying when things don't just "work" out of the box.
  • Yvonne

    Yvonne

    23 March 2012 at 01:58 |
    A better magazine theme would make the blog nicer.:)
    • Evan Petersen

      Evan Petersen

      23 March 2012 at 19:39 |
      Happen to have any suggestions?
      • Evan Petersen

        Evan Petersen

        27 March 2012 at 19:20 |
        Well, I changed the website completely! Hope you enjoy it more now!
  • Pattie

    Pattie

    05 May 2012 at 09:48 |
    Finally! This is just what I was looknig for.
  • Stephanie Barko

    Stephanie Barko

    27 June 2012 at 07:17 |
    Hi Evan-

    My site is written on Yootheme Noble too.
    Last night, static content on my homepage began disappearing.
    Go Daddy assures me it is not a security issue.

    I cannot for the life of me get the content restored.
    Because you know the theme well, I would like to hire you to either teach me how to fix it or fix it for me.

    Would you please email me directly about this ASAP?
    Every minute the nav is missing, I'm losing money and no forum has been able to help me.
    • Evan Petersen

      Evan Petersen

      01 July 2012 at 13:03 |
      Hi Stephanie,

      I just sent you an email -- I apologize for not seeing this sooner. It looks as though your website is performing properly but I thought I'd check with you just to be sure.

      Regards,
      Evan

Leave a comment

You are commenting as guest. Optional login below.