Showing posts with label Joomla. Show all posts
Showing posts with label Joomla. Show all posts

Wednesday, May 20, 2009

How to add SiteCatalyst Code in Joomla

There are more and more companies move their platforms to the open source CMS Joomla. At the same time they need to migrate their Omniture SiteCatalyst tracking code to Joomla platform as well. Joomla is good, however as most of the open source system, the development documentation for Joomla is limited. Here I share some PHP code and SiteCatalyst tracking code to show how can you add the tracking code into the Joomla Template and generate the PageName dynamically.

You just need the add the follow code into the Template index.php file.

global $mainframe;

// Get the PathWay object from the application
$pathway =& $mainframe->getPathway();
$items = $pathway->getPathWay();


$PagePath="MainPage";
$count = count($items);
for ($i = 0; $i < $count; $i ++)
{
$items[$i]->name = stripslashes(htmlspecialchars($items[$i]->name));
//echo $items[$i]->name;
$PagePath=$PagePath.":".$items[$i]->name;


}
echo $PagePath;

?>




Friday, December 26, 2008

Joomla: Could not connect to host "127.0.0.1" Error

Monkey uses Joomla as the CMS system for my personal website. For some reason after upgrade to the 1.5.8 verson, there is an error on FTP layer that whenever I tried to install a new extension. It gave me the error JFTP::connect: Could not connect to host "127.0.0.1" on port 21. Which make me cannot install new extension at all. I believe this is the bug in Joomla 1.5.8 or every 1.5.7. I hope someone will fix it in next version.

However I found a way to get around it.
1. Go to Global Configuration FTP Setting to disable the FTP
2. When you try to install a new extension, e.g Components, Plugins, Administrator/Components you need to change to directory property to public writeable. i.e. 777.
3. Install the Components
4. Change the Directories attributes back to 755.

A little bit trouble some compare to before, but it works, and I can keep improving my site and wait for the better next version.