本文整理汇总了PHP中JemHelper::getParam方法的典型用法代码示例。如果您正苦于以下问题:PHP JemHelper::getParam方法的具体用法?PHP JemHelper::getParam怎么用?PHP JemHelper::getParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JemHelper
的用法示例。
在下文中一共展示了JemHelper::getParam方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getUpdatedata
/**
* Retrieval of update-data
*/
function getUpdatedata()
{
$installedversion = JemHelper::getParam(1,'version',1,'com_jem');
$updateFile = "http://www.joomlaeventmanager.net/updatecheck/update.xml";
$checkFile = self::CheckFile($updateFile);
$updatedata = new stdClass();
if ($checkFile) {
$xml = simplexml_load_file($updateFile);
//version to check, not visible in table
$updatedata->version = $xml->version;
//in table
$updatedata->versiondetail = $xml->versiondetail;
$updatedata->date = JEMOutput::formatdate($xml->date);
$updatedata->info = $xml->info;
$updatedata->download = $xml->download;
$updatedata->notes = $xml->notes;
$updatedata->changes = explode(';', $xml->changes);
$updatedata->failed = 0;
$updatedata->installedversion = $installedversion;
$updatedata->current = version_compare($installedversion, $updatedata->version);
} else {
$updatedata->failed = 1;
$updatedata->installedversion = $installedversion;
}
return $updatedata;
}
示例2: getJEMVersion
/**
* Detect tables of JEM.
*
* @return string The version string of the detected JEM component or false
*/
public function getJEMVersion()
{
$db = JFactory::getDbo();
$prefix = $this->jemprefix;
$dbPrefix = $db->getPrefix();
$version = null;
# we will need to know the prefix so let's see if people filled that one.
if ($prefix == '#__' || $dbPrefix == $prefix) {
$otherPrefix = 'false';
} else {
$otherPrefix = 'true';
}
if ($otherPrefix == 'true') {
# detect the fields of the extensions-table
$query = $db->getQuery(true);
$tableresult = array();
try {
$db->setQuery('SHOW FULL COLUMNS FROM ' . $prefix . 'jem_settings');
$fields = $db->loadObjectList();
foreach ($fields as $field) {
$tableresult[$field->Field] = preg_replace("/[(0-9)]/", '', $field->Type);
}
$result = array_keys($tableresult);
} catch (Exception $e) {
$result = false;
}
if ($result) {
$version = JemHelper::getParam(1, 'version', 1, 'com_jem', $prefix);
} else {
$version = null;
}
}
return $version;
}
示例3: getConfigInfo
/**
* Return config information
*/
public function getConfigInfo()
{
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
$quote = "enabled";
} else {
$quote = "disabled";
}
// Get GD version.
$gd_version = '?';
if (function_exists('gd_info')) {
$gd_info = gd_info();
if (array_key_exists('GD Version', $gd_info)) {
$gd_version = $gd_info['GD Version'];
}
} else {
ob_start();
if (phpinfo(INFO_MODULES)) {
$info = strip_tags(ob_get_contents());
}
ob_end_clean();
preg_match('/gd support\\w*(.*)/i', $info, $gd_sup);
preg_match('/gd version\\w*(.*)/i', $info, $gd_ver);
if (count($gd_ver) > 0) {
$gd_version = trim($gd_ver[1]);
}
if (count($gd_sup) > 0) {
$gd_version .= ' (' . trim($gd_sup[1]) . ')';
}
}
// language conflict detection
$language = null;
# retrieve loaded language files
$language = JFactory::getLanguage();
$paths = count($language->getPaths('com_jem'));
$config = new stdClass();
$config->vs_component = JemHelper::getParam(1, 'version', 1, 'com_jem');
$config->vs_plg_comments = JemHelper::getParam(1, 'version', 2, 'plg_jem_comments');
$config->vs_plg_content = JemHelper::getParam(1, 'version', 2, 'plg_content_jem');
$config->vs_plg_mailer = JemHelper::getParam(1, 'version', 2, 'plg_jem_mailer');
$config->vs_plg_search = JemHelper::getParam(1, 'version', 2, 'plg_search_jem');
$config->vs_plg_finder = JemHelper::getParam(1, 'version', 2, 'plg_finder_jem');
$config->vs_plg_xtdevent = JemHelper::getParam(1, 'version', 2, 'plg_editors_xtd_event');
$config->vs_plg_quickicon = JemHelper::getParam(1, 'version', 2, 'plg_quickicon_jemquickicon');
$config->vs_mod_jem_cal = JemHelper::getParam(1, 'version', 3, 'mod_jem_cal');
$config->vs_mod_jem = JemHelper::getParam(1, 'version', 3, 'mod_jem');
$config->vs_mod_jem_wide = JemHelper::getParam(1, 'version', 3, 'mod_jem_wide');
$config->vs_mod_jem_teaser = JemHelper::getParam(1, 'version', 3, 'mod_jem_teaser');
$config->vs_php = phpversion();
$config->vs_php_magicquotes = $quote;
$config->vs_gd = $gd_version;
$config->vs_lng_paths = $paths;
return $config;
}