Adding a no conflict in a php file
Hello,
I am really hoping you guys can help me with this. I am not exactly javascript and/or jquery savy. I have this code, which I have below. Several people have looked at it, and told me it needs to load jQuery library with no conflict mode. I'm not sure exactly how to do so. So if anyone would not mind taking a look at this code, it's not very long, I would very very very very much so appreciate it.
- <?php
/**
* @package $Id: stylepanel.php 6448 2013-01-14 12:32:26Z arifin $
* @version 1.7 May 16, 2013
* @author RocketTheme http://www.rockettheme.com
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
*
* Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
*
*/
defined('JPATH_BASE') or die();
gantry_import('core.gantryfeature');
class GantryFeatureStylePanel extends GantryFeature {
var $_feature_name = 'stylepanel';
function init(){
global $gantry;
if ($this->isEnabled()){
$gantry->addScript('stylepanel.js');
$gantry->addInlineScript("var GantryURL = '". $gantry->gantryUrl."'");
$gantry->addInlineStyle('.presets-block a.active {border: 1px solid '.$gantry->get('accent-color').';}');
}
}
function isEnabled()
{
global $gantry;
$cookie = 0;
if ($gantry->browser->platform == 'iphone' || $gantry->browser->platform == 'android')
{
$prefix = $gantry->get('template_prefix');
$cookiename = $prefix . $gantry->browser->platform . '-switcher';
$cookie = $gantry->retrieveTemp('platform', $cookiename);
}
if (1 == (int)$this->get('enabled') && $cookie == 0) return true;
return false;
}
function render($position="") {
ob_start();
global $gantry;
$user = JFactory::getUser();
$site = JURI::root(true);
?>
<div class="style-panel-container">
<div class="style-panel-toggle"><span>Teamspeak</span></div>
<div class="style-panel hide">
<div class="presets-block">
<strong><a href="ts3server://ts3.9thsword.org:9988">Click to Join the Server</a></strong>
<script src="http://test.9thsword.org/tswebviewer/ajax.php?config=9thsd&id=viewer&s=true" type="text/javascript"></script>
<div id="viewer"></div>
</div>
</div>
</div>
<?php
return ob_get_clean();
}
}