-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
596 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?php | ||
/** | ||
* @package JJ_Shoutbox | ||
* @copyright Copyright (C) 2011 - 2014 JoomJunk. All rights reserved. | ||
* @license GPL v3.0 or later http://www.gnu.org/licenses/gpl-3.0.html | ||
*/ | ||
|
||
|
||
defined('JPATH_PLATFORM') or die; | ||
|
||
/** | ||
* Form Field to check if Freichat is enabled. | ||
* | ||
* @package JJ_Shoutbox | ||
* @since 2.0.0 | ||
*/ | ||
class JFormFieldCheck extends JFormField | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
protected $type = 'Check'; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
protected function getLabel() | ||
{ | ||
|
||
// Database query to check id Freichat exists | ||
$db = JFactory::getDbo(); | ||
$query = $db->getQuery(true); | ||
|
||
$query->select(array('*')) | ||
->from($db->quoteName('#__extensions')) | ||
->where($db->quoteName('element') . ' = '. $db->quote('mod_freichatx')); | ||
|
||
$db->setQuery($query); | ||
$result = $db->loadObjectList(); | ||
|
||
if($result) | ||
{ | ||
// Detect Joomla version and render the message | ||
if (version_compare(JVERSION, '3.0.0', 'ge')) | ||
{ | ||
$application = JFactory::getApplication(); | ||
$application->enqueueMessage(JText::_('WARNING_FREICHAT_IS_INSTALLED'), 'warning'); | ||
} | ||
else | ||
{ | ||
return JError::raiseNotice( 100, JText::_('WARNING_FREICHAT_IS_INSTALLED') ); | ||
} | ||
} | ||
|
||
} | ||
|
||
/** | ||
* @return mixed | ||
*/ | ||
protected function getInput() | ||
{ | ||
return; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<html><body bgcolor="#FFFFFF"></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!DOCTYPE html><title></title> |
Oops, something went wrong.