Blog Archives

5 reasons why you need a CMS right now

Posted in AuroraCMS, Our Products

If you’re a business owner maintaining a web site (really, who isn’t these days) do you find yourself waiting days for updates to your web site to be completed? Are you constantly frustrated at the time, money and effort to interact with your web team to get things done?

Nearly every web site owner asks these questions and more. If you weren’t sure that you needed a CMS (Content Management System) or you didn’t know what one was, let me enlighten you.

Here’s 5 reasons how a CMS (like our own AuroraCMS) can benefit your business.

Timely changes

A CMS gives you the power to bring your changes to the web as fast as you can type. Changing content on the fly, updating mistakes or misinformation and uploading documents can be performed with ease.

Lower maintenance costs

Sometimes it can cost several hundred, or even thousands of dollars for a few content changes to a web site. With a CMS you can change and update as often as you like, at your convenience, for no extra cost. A CMS takes the pain and stress out of maintaining your website.

Anyone can update the content

Now you don’t need someone with web knowledge to maintain the website. As long as you have basic computer skills (word processing level), you can easily take control of your web site. A business owner, team member or secretary can take care of everything.

Site design remains intact

Using software like FrontPage can render your website a disgrace after a round of changes. A CMS prevents you from altering the sites basic template structure and graphic design. This means that you can trust anyone to change your content with a minimum of fuss.

Tired of your existing site design? Have a new template designed up and drop it right in. Your content will already be there and working.

Access from anywhere, at any time

Forget FTP programs or clunky software that only works on one computer in the office. On any computer load up the web browser and log in. Even away on business or using the laptop on the train to work you can draft up or publish an update.

Convinced? Then get in touch with us to discuss AuroraCMS today.

Animating Table Rows with jQuery

Posted in AuroraCMS, Code, Product Reviews, Tips and Tricks

Animating table rows in the browser is problematic. You see, they aren’t block elements and as such don’t have a height or width property. Instead they take their constraints from the content inside them, and the elements that contain them. For rows this typically means they’re constrained by the containing table, and filled by the contained columns.

Today I wanted to slide a row up, and then when it had finished sliding I wanted to remove it from the DOM. Essentially giving it a nice effect when something is deleted.

Given that the height of a row is controlled by it’s content, I figured the easiest way to do this would be to wrap all of the content inside each column with a block element, in this case a div, and then resize those.

jQuery makes this extremely easy :

var el = $(options.element_prefix + id);
el.children("td").each(function() {
    $(this).wrapInner("< div />").children("div").slideUp(function() {el.remove();})
});

NOTE : The div tag in the wrapInner() is malformed because it won’t display properly otherwise. Please remove the space between the opening bracket and ‘div’.

It’s all pretty easy to understand. Essentially my root element is a row, and so for each td in that row wrap it’s content in a div. Then for the child divs in each td, run the slideUp() method. The callback in the slideUp() method says after the animation is done, remove the row. Given the speed of computers these days, no one will notice that the last few columns quite likely just vanish instead of complete their animation.

Syntax highlighting code in blog posts

Posted in AuroraCMS, Code

I recently asked the programming community what were the best options for highlighting code snippets in blog posts. A lot of good answers came back and I settled on using SyntaxHighlighter.

There’s a handy plugin for WordPress users, though be sure to use the HTML editor and not the Visual/WYSIWYG editor otherwise the name attribute will be stripped from the <pre> tag.

Here’s an example of some Ruby code to show you SyntaxHighlighter in action. This code is, taken from the upcoming AuroraCMS v2.0 – stay tuned for more news on this product in the coming weeks.

def force_login
  if params[:controller] != 'session'
    redirect_to login_path unless logged_in
  end
end

def force_logout(message = 'You have been logged out.')
  self.current_user.forget_me if logged_in?
  cookies.delete :auth_token
  reset_session
  flash[:notice] = message
  redirect_to login_path
end

Previously I’ve used vim’s :TOhtml command to export syntax-highlighted code snippets, but I think this is a much nicer alternative. It also means that we’ll have consistent highlighting across all of our posts regardless of individual poster’s preferences or .vimrc.

Search Posts

Featured Posts

Categories

Archives

View more archives