BzZzZ - ustvarjamo podobe logo
slovenščina
english
Showing different templates or sites to different visitors in Joomla
Od Klas Berlič   

This is one of the Joomla's hidden features - there is builtin JBrowser library in Joomla that detects browsers and their capabilities and by using it you can show different template or content to different user types.

We are successfully using it on some of our sites to detect whether user/browser has javascript support (or is a robot) and redirect them later to appropriate site version with few simple lines of code:

 

$browser=new JBrowser;
if($browser->isRobot()==true) {$js=0; }
if($browser->hasFeature('javascript')==false) {$js=0;}

 

We combine this with header redirection inside noscript tags to improve reliability for visitors that don't send their browser versions or use unknown ones.

Other example uses of this library:

  • Is visitor a robot? Render no javascript version
  • Is this a mobile browser? Show them mobile version
  • Which quirks we need to use?  e.g. include png transparency fix for IE6

 

Joomla API documentation page for JBrowser:
http://api.joomla.org/Joomla-Framework/Environment/JBrowser.html

 

If builtin Joomla library is not  reliable or up to date enough, you can additionally improve reliability by using one of this scripts that get updated more regulary:

 
  • strateško usmerjeno
  • integrirano
  • s kreativnostjo pospešeno
  • učinkovito komuniciranje
© BzZzZ 2008
stik z nami    zaposlitev    kazalo strani