本文整理汇总了PHP中gantry_import函数的典型用法代码示例。如果您正苦于以下问题:PHP gantry_import函数的具体用法?PHP gantry_import怎么用?PHP gantry_import使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了gantry_import函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: fetchElement
function fetchElement($name, $value, &$node, $control_name)
{
global $gantry;
gantry_import('core.gantrydiagnostic');
$diagnose = new GantryDiagnostic();
$errors = $diagnose->checks();
$output = "";
if (count($errors) > 0) {
$klass = "errors";
$output = implode("", $errors);
} else {
$klass = "success";
$output = "Diagnostic checks successfully passed.";
}
$output .= '<br/><a href="'.JURI::base(true).'?option=com_admin&tmpl=gantry-ajax-admin&model=diagnostics&template='.$gantry->templateName.'">Download Diagnostic Info</a>';
return "
<div id='diagnostic' class='".$klass."'>
<div id='diagnostic-bar' class='g-title'>".JText::_('DIAGNOSTICS')." - ". ucfirst($klass) ." <span class='arrow'></span></div>
<div id='diagnostic-desc' class='g-inner'>
".$output."
</div>
</div>";
}
开发者ID:rkern21,项目名称:videoeditor,代码行数:28,代码来源:diagnostic.php
示例2: display
function display($tpl = null)
{
/** @var $gantry Gantry */
global $gantry;
$language = JFactory::getLanguage();
$language->load('com_templates');
$this->item = $this->get('Item');
JHtml::_('behavior.framework', true);
require_once JPATH_LIBRARIES . "/gantry/gantry.php";
gantry_import('core.config.gantryform');
GantryForm::addFormPath(JPATH_COMPONENT_ADMINISTRATOR);
GantryForm::addFormPath($gantry->templatePath);
GantryForm::addFieldPath($gantry->gantryPath . '/admin/forms/fields');
GantryForm::addFieldPath($gantry->templatePath . '/fields');
GantryForm::addFieldPath($gantry->templatePath . '/admin/forms/fields');
GantryForm::addGroupPath($gantry->gantryPath . '/admin/forms/groups');
GantryForm::addGroupPath($gantry->templatePath . '/admin/forms/groups');
$this->state = $this->get('State');
$this->form = $this->get('Form');
$this->override = $this->get('Override');
$this->gantryForm = $this->get('GantryForm');
$this->activeTab = isset($_COOKIE['gantry-admin-tab']) ? $_COOKIE['gantry-admin-tab'] + 1 : 1;
$this->tabs = $this->getTabs($this->gantryForm);
$this->assignmentCount = $this->getAssignmentCount($this->item->id);
$model = $this->getModel();
$model->checkForGantryUpdate();
//$this->addToolbar();
JToolBarHelper::title('');
ob_start();
parent::display($tpl);
$buffer = ob_get_clean();
echo $buffer;
}
开发者ID:Rikisha,项目名称:proj,代码行数:33,代码来源:view.html.php
示例3: init
function init(&$gantry)
{
gantry_import("core.utilities.gantryxml");
$this->xml = new GantryXML();
$this->xml->loadFile($gantry->templatePath . '/templateDetails.xml');
$this->positions =& $this->_getPositions();
$this->params = $this->_getParams($gantry);
}
开发者ID:janssit,项目名称:www.casaiberico.be,代码行数:8,代码来源:gantrytemplatedetails.class.php
示例4: fetchElement
/**
* @global gantry used to access the core Gantry class
* @param $name
* @param $value
* @param $node
* @param $control_name
* @return void
*/
function fetchElement($name, $value, &$node, $control_name)
{
global $gantry;
$output = "";
$document =& JFactory::getDocument();
$arrayList = "'" . implode("', '", explode(",", str_replace(" ", "", $node->attributes('default')))) . "'";
if (!defined('GANTRY_ADMIN')) {
include_once dirname(dirname(__FILE__)) . '/../gantry.php';
gantry_import('core.gantrybrowser');
$browser = new GantryBrowser();
$gantry_created_dirs = array($gantry->custom_dir, $gantry->custom_menuitemparams_dir);
$this->template = end(explode(DS, $gantry->templatePath));
gantry_addStyle($gantry->gantryUrl . '/admin/widgets/gantry.css');
if ($browser->name == 'ie' && $browser->version == '7' && file_exists($gantry->gantryPath . DS . 'admin' . DS . 'widgets' . DS . 'gantry-ie7.css')) {
gantry_addStyle($gantry->gantryUrl . '/admin/widgets/gantry-ie7.css');
}
gantry_addScript($gantry->gantryUrl . '/admin/widgets/gantry.js');
gantry_addInlineScript("var GantrySlideList = [" . $arrayList . "];var AdminURI = '" . JURI::base() . "';var UnallowedParams = ['" . implode("', '", $gantry->dontsetinmenuitem) . '\'];');
gantry_addInlineScript($this->gantryLang());
// fixes Firefox < 3.7 input line-height issue
if ($browser->name == 'firefox' && $browser->version < '3.7' || $browser->name == 'ie' && $browser->version > '6') {
$css = ".text-short, .text-medium, .text-long, .text-color {padding-top: 4px;height:19px;}";
gantry_addInlineStyle($css);
}
if ($browser->name == 'ie' && $browser->shortversion == '7') {
$css = "\n\t\t\t\t\t.g-surround, .g-inner, .g-surround > div {zoom: 1;position: relative;}\n\t\t\t\t\t.text-short, .text-medium, .text-long, .text-color {border:0 !important;}\n\t\t\t\t\t.selectbox {z-index:500;position:relative;}\n\t\t\t\t\t.group-fusionmenu, .group-splitmenu {position:relative;margin-top:0 !important;zoom:1;}\n\t\t\t\t\t.scroller .inner {position:relative;}\n\t\t\t\t\t.moor-hexLabel {display:inline-block;zoom:1;float:left;}\n\t\t\t\t\t.moor-hexLabel input {float:left;}\n\t\t\t\t";
gantry_addInlineStyle($css);
}
//create dirs needed by gantry
foreach ($gantry_created_dirs as $dir) {
if (is_readable(dirname($dir)) && is_writeable(dirname($dir)) && !JFolder::exists($dir)) {
JFolder::create($dir);
}
}
if (version_compare(JVERSION, '1.5.14', '<=')) {
$tmpscripts = array();
foreach ($document->_scripts as $script => $type) {
if ($script != $gantry->baseUrl . 'media/system/js/mootools.js') {
$tmpscripts[$script] = $type;
} else {
$tmpscripts[$gantry->gantryUrl . '/js/mootools-1.1.2.js'] = $type;
}
}
$document->_scripts = $tmpscripts;
}
$this->checkAjaxTool();
define('GANTRY_ADMIN', 1);
}
if (file_exists($gantry->templatePath . "/gantry.scripts.php") && is_readable($gantry->templatePath . "/gantry.scripts.php")) {
include_once $gantry->templatePath . "/gantry.scripts.php";
if (function_exists('gantry_params_init')) {
gantry_params_init();
}
}
$this->_parent->addElementPath($gantry->templatePath . DS . 'elements');
$this->_parent->addElementPath($gantry->templatePath . DS . 'admin/elements');
}
开发者ID:navinpai,项目名称:GEC-Tandav,代码行数:65,代码来源:gantry.php
示例5: _dateFormat
function _dateFormat($instance)
{
gantry_import('core.utilities.gantrydate');
global $gantry;
$now = new GantryDate();
$formats = str_replace("%", "\$", $instance['format']);
$gantry->addInlineScript("dateFormat.i18n = {" . $this->_dateLanguage() . "};var dateFeature = new Date().format('{$formats}');\n");
$js = "\n\t\t\t\tvar dates = \$\$('.date-block .date');\n\t\t\t\tif (dates.length) {\n\t\t\t\t\tdates.each(function(date) {\n\t\t\t\t\t\tdate.set('text', dateFeature);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\n";
return $js;
}
开发者ID:rotoballer,项目名称:emily,代码行数:10,代码来源:date.php
示例6: getInput
public function getInput()
{
/** @var $gantry Gantry */
global $gantry;
$name = (string) $this->element['name'];
$class = $this->element['class'] ? 'class="' . $this->element['class'] . '"' : 'class="inputbox"';
$mode = $this->element['mode'];
if (!isset($mode)) {
$mode = 'dropdown';
}
$options = array();
if (!array_key_exists($name, $gantry->presets)) {
return 'Unable to find the preset information';
}
foreach ($gantry->presets[$name] as $preset_name => $preset_value) {
$val = $preset_name;
$text = $preset_value['name'];
if (!array_key_exists('disabled', $preset_value)) {
$preset_value['disabled'] = 'false';
}
$options[] = GantryHtmlSelect::option((string) $val, JText::_(trim((string) $text)), 'value', 'text', (string) $preset_value['disabled'] == 'true');
}
if (!defined('GANTRY_PRESET')) {
gantry_import('core.gantryjson');
$template_path_parts = explode('/', $gantry->templatePath);
$this->template = end($template_path_parts);
$gantry->addScript($gantry->gantryUrl . '/admin/widgets/preset/js/preset.js');
$gantry->addScript($gantry->gantryUrl . '/admin/widgets/preset/js/preset-saver.js');
$gantry->addInlineScript('var Presets = {};var PresetsKeys = {};');
if (isset($gantry->customPresets[$name])) {
$gantry->addInlineScript('var CustomPresets = ' . GantryJSON::encode($gantry->customPresets[$name]) . ';');
} else {
$gantry->addInlineScript('var CustomPresets = {};');
}
define('GANTRY_PRESET', 1);
}
$this->presets = $gantry->originalPresets[$name];
$gantry->addInlineScript($this->populatePresets((string) $this->element['name']));
if ($mode == 'dropdown') {
include_once 'selectbox.php';
$gantry->addDomReadyScript("PresetDropdown.init('" . $name . "');");
$selectbox = new JElementSelectBox();
$node->addAttribute('preset', true);
return $selectbox->fetchElement($name, $value, $node, $control_name, $options);
} else {
$gantry->addDomReadyScript("Scroller.init('" . $name . "');");
return $this->scrollerLayout($this->element);
}
}
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:49,代码来源:preset.php
示例7: fetchElement
function fetchElement($name, $value, &$node, $control_name)
{
global $gantry;
$class = ( $node->attributes('class') ? 'class="'.$node->attributes('class').'"' : 'class="inputbox"' );
$mode = $node->attributes('mode');
if (!isset($mode)) $mode = 'dropdown';
$options = array();
if (!array_key_exists($name,$gantry->presets)) {
return JText::_('Unable to find the preset information');
}
foreach ($gantry->presets[$name] as $preset_name => $preset_value)
{
$val = $preset_name;
$text = $preset_value['name'];
$options[] = JHTML::_('select.option', $val, JText::_($text));
}
if (!defined('GANTRY_PRESET')) {
gantry_import('core.gantryjson');
$this->template = end(explode(DS, $gantry->templatePath));
gantry_addScript($gantry->gantryUrl.'/admin/widgets/preset/js/preset.js');
gantry_addScript($gantry->gantryUrl.'/admin/widgets/preset/js/preset-saver.js');
gantry_addInlineScript('var Presets = {};var PresetsKeys = {};');
if (isset($gantry->customPresets[$name])) {
gantry_addInlineScript('var CustomPresets = '.GantryJSON::encode($gantry->customPresets[$name]).';');
}
define('GANTRY_PRESET', 1);
}
$this->presets = $gantry->originalPresets[$name];
gantry_addInlineScript($this->populatePresets($name));
if ($mode == 'dropdown') {
include_once('selectbox.php');
gantry_addInlineScript("window.addEvent('domready', PresetDropdown.init.bind(PresetDropdown, '$name'));");
$selectbox = new JElementSelectBox;
$node->addAttribute('preset', true);
return $selectbox->fetchElement($name, $value, $node, $control_name, $options);
} else {
gantry_addInlineScript("window.addEvent('domready', Scroller.init.bind(Scroller, '$name'));");
return $this->scrollerLayout($name, $value, $node, $control_name);
}
}
开发者ID:rkern21,项目名称:videoeditor,代码行数:49,代码来源:preset.php
示例8: render
function render($position = "")
{
global $gantry;
if ($gantry->browser->platform != 'iphone' && $gantry->browser->platform != 'ipad' && $gantry->browser->platform != 'android') {
return false;
}
gantry_import('facets.menu.gantrymenu');
$params = $gantry->getParams($this->_feature_name, true);
$module_params = '';
foreach ($params as $param_name => $param_value) {
$module_params .= $param_name . "=" . $param_value['value'] . "\n";
}
$passing_params = new JParameter($module_params);
$gantrymenu = GantryMenu::getInstance($passing_params);
return $gantrymenu->render($passing_params);
}
开发者ID:Simarpreet05,项目名称:joomla,代码行数:16,代码来源:touchmenu.php
示例9: fetchElement
function fetchElement($name, $value, &$node, $control_name)
{
global $gantry;
gantry_import('core.gantrydiagnostic');
$diagnose = new GantryDiagnostic();
$errors = $diagnose->checks();
$output = "";
if (count($errors) > 0) {
$klass = "errors";
$output = implode("", $errors);
} else {
$klass = "success";
$output = "Diagnostic checks successfully passed.";
}
return "\n\t\t<div id='diagnostic' class='" . $klass . "'>\n\t\t\t<div id='diagnostic-bar' class='g-title'>" . JText::_('DIAGNOSTICS') . " - " . ucfirst($klass) . " <span class='arrow'></span></div>\n\t\t\t<div id='diagnostic-desc' class='g-inner'>\n\t\t\t" . $output . "\n\t\t\t</div>\n\t\t</div>";
}
开发者ID:KIZI,项目名称:sewebar-cms,代码行数:16,代码来源:diagnostic.php
示例10: gantry_addStyle
function gantry_addStyle($file)
{
gantry_import('core.gantrybrowser');
$browser = new GantryBrowser();
$document =& JFactory::getDocument();
$filename = basename($file);
$relative_path = dirname($file);
// For local url path get the local path based on checks
$file_path = gantry_getFilePath($file);
$url_file_checks = $browser->getChecks($file_path, true);
foreach ($url_file_checks as $url_file) {
$full_path = realpath($url_file);
if ($full_path !== false && file_exists($full_path)) {
$document->addStyleSheet($relative_path . '/' . basename($full_path));
}
}
}
开发者ID:navinpai,项目名称:GEC-Tandav,代码行数:17,代码来源:gantry.php
示例11: getInput
public function getInput()
{
global $gantry;
gantry_import('core.gantrydiagnostic');
$diagnose = new GantryDiagnostic();
$errors = $diagnose->runChecks();
$output = "";
if (count($errors) > 0) {
$klass = "errors";
$title = "Something Wrong :(";
$output = implode("", $errors);
} else {
$klass = "success";
$title = "Good!";
$output = "Congratulations! All the diagnostic test have passed successfully. There are no show-stopper issues. You can however still download the ";
}
//$output .= '<a href="'.$gantry->baseUrl.'?option=com_admin&tmpl=gantry-ajax-admin&model=diagnostics&template='.$gantry->templateName.'">Diagnostic Status Information archive</a>.';
return "\n\t\t<div id='diagnostic' class='" . $klass . "'>\n\t\t\t<div id='diagnostic-bar' class='h2bar'>Diagnostics: <span>" . $title . "</span></div>\n\t\t\t<div id='diagnostic-desc' class='g-inner'>\n\t\t\t" . $output . "\n\t\t\t</div>\n\t\t</div>";
}
开发者ID:resmun,项目名称:template-hawk1-j25,代码行数:19,代码来源:diagnostic.php
示例12: render
function render($position)
{
/** @var $gantry Gantry */
global $gantry;
JHTML::_('behavior.framework', true);
if ($gantry->browser->platform != 'iphone' && $gantry->browser->platform != 'ipad' && $gantry->browser->platform != 'android') {
return false;
}
gantry_import('facets.menu.gantrymenu');
$params = $gantry->getParams($this->_feature_name, true);
$module_params = '';
foreach ($params as $param_name => $param_value) {
$module_params .= $param_name . "=" . $param_value['value'] . "\n";
}
$passing_params = new GantryRegistry();
$passing_params->loadString($module_params, 'INI');
$gantrymenu = new GantryMenu($passing_params);
return $gantrymenu->render($passing_params);
}
开发者ID:bobozhangshao,项目名称:HeartCare,代码行数:19,代码来源:touchmenu.php
示例13: init
function init(&$gantry)
{
gantry_import("core.utilities.gantrysimplexmlelement");
$this->xml = new GantrySimpleXMLElement($gantry->templatePath . '/templateDetails.xml', null, true);
if ($this->xml === false) {
// TODO: figure out way to return error properly
echo "Unable to find templateDetails.xml file";
}
$this->positions =& $this->_getPositions();
$tmp_options = get_option($gantry->templateName . '-template-options');
if ($tmp_options !== false) {
foreach ($tmp_options as $option_name => $option_value) {
$this->_addTemplateSettings($option_name, $option_value);
}
}
$this->params = $this->_getParams($gantry);
$this->template_info = $this->_getTemplateInfo();
$this->widget_styles = $this->_getWidgetStyles();
}
开发者ID:rotoballer,项目名称:emily,代码行数:19,代码来源:gantrytemplatedetails.class.php
示例14: get_version_update_info
function get_version_update_info()
{
$buffer = '';
gantry_import('core.gantryupdates');
$gantry_updates = GantryUpdates::getInstance();
$currentVersion = $gantry_updates->getCurrentVersion();
$latest_version = $gantry_updates->getLatestVersion();
if (version_compare($latest_version, $currentVersion, '>')) {
$klass = "update";
$upd = JText::sprintf('COM_GANTRY_VERSION_UPDATE_OUTOFDATE', $latest_version, 'index.php?option=com_installer&view=update');
} else {
$klass = "noupdate";
jimport('joomla.utilities.date');
$nextupdate = new JDate($gantry_updates->getLastUpdated() + 24 * 60 * 60);
$upd = JText::sprintf('COM_GANTRY_VERSION_UPDATE_CURRENT', JHTML::_('date', $gantry_updates->getLastUpdated() + 24 * 60 * 60, JText::_('DATE_FORMAT_LC2'), true));
}
$buffer .= "\n <div id='updater' class='" . $klass . "'>\n <div id='updater-bar' class='h2bar'>Gantry <span>v" . $currentVersion . "</span></div>\n <div id='updater-desc'>" . $upd . "</div>\n </div>";
return $buffer;
}
开发者ID:resmun,项目名称:template-hawk1-j25,代码行数:19,代码来源:edit.php
示例15: form
function form($instance)
{
gantry_import('core.config.gantryform');
global $gantry;
$defaults = $this->_defaults;
$gantry->addScript('mootools.js');
$instance = wp_parse_args((array) $instance, $defaults);
foreach ($instance as $variable => $value) {
${$variable} = GantryWidget::_cleanOutputVariable($variable, $value);
$instance[$variable] = ${$variable};
}
$this->_values = $instance;
$form = GantryForm::getInstance($this, $this->short_name, $this->short_name);
$form->bind($this->_values);
ob_start();
$fieldSets = $form->getFieldsets();
foreach ($fieldSets as $name => $fieldSet) {
?>
<fieldset class="panelform">
<?php
foreach ($form->getFieldset($name) as $field) {
?>
<div class="field-wrapper">
<?php
echo $field->label;
?>
<?php
echo $field->input;
?>
</div>
<?php
}
?>
</fieldset>
<?php
}
echo ob_get_clean();
}
开发者ID:rotoballer,项目名称:emily,代码行数:38,代码来源:iphonemenu.php
示例16: defined
<?php
/**
* @version $Id: grouped.php 2325 2012-08-13 17:46:48Z btowles $
* @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
*/
defined('GANTRY_VERSION') or die;
gantry_import('core.config.gantryformgroup');
class GantryFormGroupGrouped extends GantryFormGroup
{
protected $type = 'grouped';
protected $baseetype = 'group';
public function getInput()
{
$buffer = '';
$buffer .= "<div class='wrapper'>";
foreach ($this->fields as $field) {
$buffer .= '<div class="gantry-field">';
if ($field->show_label) {
$buffer .= $this->preLabel($field) . $field->getLabel() . $this->postLabel($field) . "\n";
}
$buffer .= $field->getInput();
$buffer .= "<div class='clr'></div>\n";
$buffer .= "</div>";
}
$buffer .= "</div>";
return $buffer;
}
}
开发者ID:interfaceslivres,项目名称:ccmd-ufpb,代码行数:31,代码来源:grouped.php
示例17: getInput
public function getInput()
{
global $gantry;
gantry_import('core.gantrypositions');
$output = '';
$lis = '';
$currentScheme = '';
$this->template = end(explode(DS, $gantry->templatePath));
$this->default = explode(',', str_replace(' ', '', $this->element['default']));
$this->defaultCount = count($this->default);
// [0] => schemas | [1] => words | [2] => maxgrid | [3] => type
//$opts = $node->children();
$this->maxGrid = (int) $gantry->get('grid_system');
if (!$this->maxGrid) {
$this->maxGrid = 12;
}
if ($this->element->grid) {
$this->maxGrid = (int) $this->element->grid;
} else {
$this->maxGrid = (int) $gantry->get('grid_system');
}
$this->words = explode(",", $this->element->words);
$this->schemas = explode(",", $this->element->schemas);
$this->type = $this->element->type ? $this->element->type : 'regular';
$this->layoutSchemas = $gantry->layoutSchemas[$this->maxGrid];
$this->defaultMainbodySchemas = $gantry->mainbodySchemas;
$this->mainbodySchemas = $gantry->mainbodySchemasCombos[$this->maxGrid];
$this->keyName = '';
if ($this->type == 'custom') {
$tmpName = str_replace("Position", "Schemas", $this->element['name']);
$tmpSchema = $this->{$tmpName};
$this->keyName = key($tmpSchema[1][0]);
}
if (!defined('GANTRY_CSS')) {
$gantry->addStyle($gantry->gantryUrl . '/admin/widgets/gantry.css');
define('GANTRY_CSS', 1);
}
if (!defined('POSITIONS')) {
if (!defined('GANTRY_SLIDER')) {
$gantry->addScript($gantry->gantryUrl . '/admin/widgets/slider/js/slider.js');
define('GANTRY_SLIDER', 1);
}
$gantry->addScript($gantry->gantryUrl . '/admin/widgets/slider/js/unserialize.js');
$gantry->addScript($gantry->gantryUrl . '/admin/widgets/positions/js/positions-utils.js');
$this->settings = array("words" => $this->words, "schemas" => $this->schemas, "maxGrid" => $this->maxGrid);
if ($this->type == 'custom') {
$this->customCombinations = $this->getCombinations();
} else {
$this->combinations = $this->getCombinations();
}
define('POSITIONS', 1);
}
$posName = $this->element['name'] == "mainbodyPosition" ? "sidebar" : $this->position_info->id;
$realCount = $gantry->countModules($posName);
if ($posName == 'sidebar') {
$realCount += 1;
}
if ($realCount > 0) {
if (!in_array($realCount, $this->schemas)) {
$realCount = $this->schemas[0];
}
$this->default = $this->oneCharConversion($this->layoutSchemas[$realCount]);
$this->defaultCount = $realCount;
}
// if the same type of combinations are requested, use the cached ones, otherwise get the new set
if ($this->type != "custom" && ($this->words != $this->settings["words"] || $this->schemas != $this->settings["schemas"] || $this->maxGrid != $this->settings["maxGrid"])) {
$this->combinations = $this->getCombinations();
}
if ($this->type == "custom") {
$this->customCombinations = $this->getCombinations();
}
if (!in_array((string) $this->defaultCount, $this->schemas)) {
$this->defaultCount = (int) $this->schemas[0];
}
$i = 0;
$max_positions = isset($this->position_info) ? $this->position_info->max_positions : false;
if (!$max_positions) {
$max_positions = 6;
}
foreach ($this->schemas as $scheme) {
$active = "";
if ($i >= $max_positions) {
break;
}
if ((int) $scheme == $this->defaultCount) {
$active = ' class="active"';
$currentLayout = $scheme;
}
$lis .= '<li' . $active . '><a href="#"><span>' . $scheme . '</span></a></li>';
$i++;
}
$scriptinit = $this->sliderInit($this->id);
$gantry->addDomReadyScript($scriptinit);
$gantry->addDomReadyScript($this->showmax($this->id));
$letters = array('a', 'b', 'c', 'd', 'e', 'f');
$output = '
<div class="wrapper">
<div id="' . $this->id . '-grp" class="g-position">
<div class="navigation">
<span class="title">Positions:</span>
//.........这里部分代码省略.........
开发者ID:Simarpreet05,项目名称:joomla,代码行数:101,代码来源:positions.php
示例18: defined
<?php
/**
* @version 3.2.20 June 19, 2012
* @author RocketTheme http://www.rockettheme.com
* @copyright Copyright (C) 2007 - 2012 RocketTheme, LLC
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
*/
defined('GANTRY_VERSION') or die;
gantry_import('core.config.gantryformfield');
/**
* @package gantry
* @subpackage admin.elements
*/
class GantryFormFieldTips extends GantryFormField
{
protected $type = 'tips';
protected $basetype = 'none';
public function getInput()
{
global $gantry;
$gantry->addScript($gantry->gantryUrl . '/admin/widgets/tips/js/tips.js');
$xmlist = $gantry->templatePath . '/admin/tips/' . $this->element['tab'] . '.xml';
if (!file_exists($xmlist)) {
die($xmlist . ' file not found');
}
$xml = simplexml_load_file($xmlist);
$count = count($xml);
$random = rand(0, $count - 1);
$output = "\n\t\t<div class=\"gantrytips\">\n\n\t\t\t<div class=\"gantry-pin\"></div>\n\n\t\t\t<div class=\"gantrytips-controller\">\n\n\t\t\t\t<div class=\"gantrytips-arrow gantrytips-left\">◀</div>\n\n\t\t\t\t<div class=\"gantrytips-middle\"><span><span class=\"current-tip\">" . ($random + 1) . "</span> / " . $count . "</span></div>\n\n\t\t\t\t<div class=\"gantrytips-arrow gantrytips-right\">▶</div>\n\n\t\t\t</div>\n\n\t\t\t<div class=\"gantrytips-desc\">\n\n\t\t\t\t<div class=\"gantrytips-wrapper\">\n";
for ($i = 0; $i < $count; $i++) {
开发者ID:laiello,项目名称:senluonirvana,代码行数:31,代码来源:tips.php
示例19: defined
<?php
/**
* @version 3.2.19 April 2, 2012
* @author RocketTheme http://www.rockettheme.com
* @copyright Copyright (C) 2007 - 2012 RocketTheme, LLC
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
*/
defined('GANTRY_VERSION') or die;
gantry_import('core.config.gantryformfield');
gantry_import('core.config.gantryhtmlselect');
class GantryFormFieldGroupedList extends GantryFormField
{
/**
* The form field type.
*
* @var string
* @since 1.6
*/
protected $type = 'groupedlist';
protected $basetype = 'select';
/**
* Method to get the field option groups.
*
* @return array The field option objects as a nested array in groups.
* @since 1.6
*/
protected function getGroups()
{
// Initialize variables.
$groups = array();
开发者ID:resmun,项目名称:template-hawk1-j25,代码行数:31,代码来源:groupedlist.php
示例20: defined
<?php
/**
* @version 1.26 September 14, 2012
* @author RocketTheme http://www.rockettheme.com
* @copyright Copyright (C) 2007 - 2012 RocketTheme, LLC
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
*
*/
defined('GANTRY_VERSION') or die;
gantry_import('core.gantrylayout');
/**
*
* @package gantry
* @subpackage html.layouts
*/
class GantryLayoutCommentsTempl_Basic extends GantryLayout
{
var $render_params = array('commentLayout' => 'basic');
function render($params = array())
{
global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage;
global $gantry;
$fparams = $this->_getParams($params);
$comment_layout_name = 'comment_' . $fparams->commentLayout;
$layout = $gantry->_getLayout($comment_layout_name);
$className = 'GantryLayout' . ucfirst($comment_layout_name);
// Do not delete these lines
ob_start();
if (post_password_required()) {
?>
开发者ID:rotoballer,项目名称:emily,代码行数:31,代码来源:commentstempl_basic.php
注:本文中的gantry_import函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论