SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 253 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

We can check if a browser is a robot using the isRobot() method:
$browser =& JBrowser::getInstance();
if ($browser->isRobot())
{
JError::raiseError('403', JText::_('Robots are disallowed'));
}
When we use components, we can choose to modify the MIME type of a response.
Before we do this, using JBrowser, we can check that the browser supports the
MIME type. This example checks that the browser can handle the MIME type
application/vnd.ms-excel (an MS Excel file) before displaying a certain link:
$browser =& JBrowser::getInstance();
if ($browser->isViewable('application/vnd.ms-excel'))
{
echo 'href="'.JRoute::_('index.php?option=com_myextension&format=
raw&application=xls').'">Link to an XLS document';
}
??? ??? ??? ??? ??? ??? ??? ???
Chapter 7
[ 189 ]
Imagine we want to display an image of a padlock if we access the site via SSL
(Secure Sockets Layer). We can use the isSSLConnection() method:
$browser =& JBrowser::getInstance();
if ($browser->isSSLConnection())
{
echo '241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6