joomlify {we} make stuff joomla..

SEF urls with mojoBlog

Written by kevin murray Friday, 09 November 2007

Until I can release our plugin for mojo that integrates/injects the core wordpress global variables (post title, blog name, post track and pingback URI's, meta etc.) I've cobbled together a brief tutorial on how to do this using the older joomla theme-switching technique.

In a nutshell what we're doing is making a copy of your existing joomla template index.php file and changing stuff in the file to display all the mojo-specific stuff we want. We'll then create a pre-sniffer file that checks on page load if mojo is the current active component. If the sniffer detects mojo, it loads the mojo-fied template with all the wp-specific goodies, otherwise it loads your stock joomla template.

STEP 1.

Download our mojo-snippets (the code) you'll need to insert/add.

  • Make a copy of your existing joomla template (index.php)
  • Rename your copy to mojo.php (or anything you like, I use mojo.php as an example)
  • Rename and save again as other.php
  • Finally, save your original index.php as index.php.bak
  • Create a new text file and save it as index.php

So now you should have 4 files, 3 identical (from index.php) just different names and 1 empty index.php file.

Mojo SniffSwitcher

Open the empty index.php and add the following:

Note:

Replace "yourjoomlatheme" with the name of your joomla theme.

Save your new mojo sniffswitcher index.php file.

Mojo Template

STEP 2.

Open the file mojo.php in your text editor and find the beginning of the template html structure.

You are looking for the joomla head call that should look like the following below, when you find it, comment it out or delete it as we won't be using it for mojo.

In place of the mosShowhead, paste the following:

Save and close your new mojo template mojo.php file.

Upload ALL

STEP 3.

Upload/FTP mojo.php, other.php, index.php and index.php.bak to your joomla template folder (don't worry about overwriting your existing index.php cause, case you need it, it's the index.php.bak file I had you copy).

Addendum: Here's the iffy part.

  • There's no standard positioning for -where- the mosShowHead appears in joomla templates -except- it has to be somewhere within the head tags.
  • Additionally, you may have duplicate meta already in your head statements so, check or delete my "pragma" and "cache-control" statements to avoid duplicity.
  • Thirdly, the RSS .92 and Atom 0.3 may invalidate (they are wp specific types that joomla doesn't use) delete these if they conflict.
  • Finally, if you're not using SEF friendly, STOCK joomla (as ticked on in your joomla configuration settings), delete the pingback line as it'll break stuff.
bookmark this article:
Digg
Delicious
Spurl
Mister.Wong
Technorati
Last Updated ( Friday, 14 March 2008 )

mojo "spring08" © 2008mojotheme. All rights reserved. | icons courtesy iconbuffet.com bandwidth by site5 hosting