本文整理汇总了PHP中NextendText类的典型用法代码示例。如果您正苦于以下问题:PHP NextendText类的具体用法?PHP NextendText怎么用?PHP NextendText使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了NextendText类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetchElement
function fetchElement()
{
$this->_values = array();
$css = NextendCss::getInstance();
$css->addCssLibraryFile('element/switcher.css');
$js = NextendJavascript::getInstance();
$js->addLibraryJsAssetsFile('dojo', 'element.js');
$js->addLibraryJsAssetsFile('dojo', 'element/switcher.js');
$html = "";
$html .= "<div class='nextend-switcher' style='" . NextendXmlGetAttribute($this->_xml, 'style') . "'>";
$html .= "<div class='nextend-switcher-vertical'>";
$html .= "<div class='nextend-switcher-vertical-dot'>";
$html .= "</div>";
$html .= "</div>";
$html .= "<div class='nextend-switcher-units'>";
foreach ($this->_xml->unit as $unit) {
$this->_values[] = (string) $unit->attributes()->value;
$html .= "<span class='nextend-switcher-units-unit'>";
$html .= NextendText::_((string) $unit);
$html .= "</span>";
}
$html .= "</div>";
$this->_value = $this->_form->get($this->_name, $this->_default);
$hidden = new NextendElementHidden($this->_form, $this->_tab, $this->_xml);
$hiddenhtml = $hidden->render($this->control_name, false);
$html .= $hiddenhtml[1];
$html .= "</div>";
$js->addLibraryJs('dojo', '
new NextendElementSwitcher({
hidden: "' . $this->_id . '",
values: ' . json_encode($this->_values) . '
});
');
return $html;
}
示例2: fetchElement
function fetchElement()
{
$this->setfolder();
$files = NextendFilesystem::files($this->_folder);
$this->_xml->addChild('option', NextendText::_('No_image'))->addAttribute('value', -1);
for ($i = 0; $i < count($files); $i++) {
$ext = pathinfo($files[$i], PATHINFO_EXTENSION);
if ($ext == 'jpg' || $ext == 'jpeg' || $ext == 'png') {
$this->_xml->addChild('option', htmlspecialchars(ucfirst($files[$i])))->addAttribute('value', NextendFilesystem::toLinux(NextendFilesystem::pathToRelativePath($this->_folder . $files[$i])));
}
}
if (nextendIsWordPress()) {
$wpfolder = get_template_directory() . '/' . NextendXmlGetAttribute($this->_xml, 'folder') . '/';
if (isset($_GET['nextendpath'])) {
echo $wpfolder . "<br />";
}
if (NextendFilesystem::existsFolder($wpfolder)) {
$files = NextendFilesystem::files($wpfolder);
for ($i = 0; $i < count($files); $i++) {
$ext = pathinfo($files[$i], PATHINFO_EXTENSION);
if ($ext == 'jpg' || $ext == 'jpeg' || $ext == 'png') {
$this->_xml->addChild('option', htmlspecialchars(ucfirst($files[$i])))->addAttribute('value', NextendFilesystem::toLinux(NextendFilesystem::pathToRelativePath($wpfolder . $files[$i])));
}
}
}
}
$css = NextendCss::getInstance();
$css->addCssLibraryFile('element/imagelist.css');
$html = "<div class='nextend-imagelist' style='" . NextendXmlGetAttribute($this->_xml, 'style') . "'>";
$html .= parent::fetchElement();
$html .= '</div>';
return $html;
}
示例3: render
function render($control_name)
{
$this->initTabs();
$js = NextendJavascript::getInstance();
$js->addLibraryJsAssetsFile('jquery', 'tab/tabbed.js');
$count = count($this->_tabs);
$id = 'nextend-tabbed-' . $this->_name;
$active = intval(NextendXmlGetAttribute($this->_xml, 'active'));
$active = $active > 0 ? $active - 1 : 0;
$js->addLibraryJs('jquery', "new nextendTabTabbed('" . $id . "-container', " . $active . ")");
echo "<div id='" . $id . "-container' class='nextend-tab nextend-tab-tabbed nextend-clearfix'>";
echo '<div class="smartslider-greybar smartslider-button-grey">';
$i = 0;
foreach ($this->_tabs as $tabname => $tab) {
echo '<div class="smartslider-toolbar-options smartslider-button-grey' . ($i == $active ? ' active' : '') . ($i == 0 ? ' first' : '') . ($i == $count - 1 ? ' last' : '') . '"><div>' . NextendText::_(NextendXmlGetAttribute($tab->_xml, 'label')) . '</div></div>';
$i++;
}
echo '</div>';
echo "<div id='" . $id . "' class='nextend-tab-tabbed-panes nextend-clearfix' style='width: " . $count * 100 . "%; margin-left: " . -$active * 100 . "%;'>";
$i = 0;
foreach ($this->_tabs as $tabname => $tab) {
echo "<div class='nextend-tab-tabbed-pane' style='width: " . 100 / $count . "%; visibility: " . ($i == $active ? 'visible' : 'hidden') . ";'>";
$tab->render($control_name);
echo "</div>";
$i++;
}
echo "</div>";
echo "</div>";
}
示例4: fetchElement
function fetchElement()
{
$element = new SimpleXMLElement('<param type="hidden" label="' . NextendText::_($this->_label) . '" default="' . NextendText::_($this->_label) . '" name="' . $this->_name . 'customlabel" />');
$customlabel = new NextendElementHidden($this->_form, $this, $element);
$h = $customlabel->render($this->control_name, false);
return $h[1] . parent::fetchElement();
}
示例5: onNextendSliderGeneratorList
function onNextendSliderGeneratorList(&$group, &$list, $showall = false)
{
$group[$this->_group] = 'Image';
if (!isset($list[$this->_group])) {
$list[$this->_group] = array();
}
$list[$this->_group][$this->_group . '_fromfolder'] = array(NextendText::_('From_folder'), $this->getPath() . 'fromfolder' . DIRECTORY_SEPARATOR, true, false, true, 'image');
}
示例6: fetchElement
function fetchElement()
{
$easings = array("dojo.fx.easing.linear" => "Linear", "dojo.fx.easing.quadIn" => "Quad_In", "dojo.fx.easing.quadOut" => "Quad_Out", "dojo.fx.easing.quadInOut" => "Quad_In_Out", "dojo.fx.easing.cubicIn" => "Cubic_In", "dojo.fx.easing.cubicOut" => "Cubic_Out", "dojo.fx.easing.cubicInOut" => "Cubic_In_Out", "dojo.fx.easing.quartIn" => "Quart_In", "dojo.fx.easing.quartOut" => "Quart_Out", "dojo.fx.easing.quartInOut" => "Quart_In_Out", "dojo.fx.easing.quintIn" => "Quint_In", "dojo.fx.easing.quintOut" => "Quint_Out", "dojo.fx.easing.quintInOut" => "Quint_In_Out", "dojo.fx.easing.sineIn" => "Sine_In", "dojo.fx.easing.sineOut" => "Sine_Out", "dojo.fx.easing.sineInOut" => "Sine_In_Out", "dojo.fx.easing.expoIn" => "Expo_In", "dojo.fx.easing.expoOut" => "Expo_Out", "dojo.fx.easing.expoInOut" => "Expo_In_Out", "dojo.fx.easing.circIn" => "Circ_In", "dojo.fx.easing.circOut" => "Circ_Out", "dojo.fx.easing.circInOut" => "Circ_In_Out", "dojo.fx.easing.backIn" => "Back_In", "dojo.fx.easing.backOut" => "Back_Out", "dojo.fx.easing.backInOut" => "Back_In_Out", "dojo.fx.easing.bounceIn" => "Bounce_In", "dojo.fx.easing.bounceOut" => "Bounce_Out", "dojo.fx.easing.bounceInOut" => "Bounce_In_Out");
foreach ($easings as $k => $easing) {
$this->_xml->addChild('option', NextendText::_($easing))->addAttribute('value', $k);
}
return parent::fetchElement();
}
示例7: generateOptions
function generateOptions(&$xml)
{
$html = '';
foreach ($xml->option as $option) {
$v = NextendXmlGetAttribute($option, 'value');
$html .= '<option value="' . $v . '" ' . $this->isSelected($v) . '>' . ($this->_translateable ? NextendText::_((string) $option) : (string) $option) . '</option>';
}
return $html;
}
示例8: sprintf
static function sprintf($text)
{
$args = func_get_args();
if (count($args) > 0) {
$args[0] = NextendText::_($args[0]);
return call_user_func_array('printf', $args);
}
return $text;
}
示例9: fetchElement
function fetchElement()
{
$css = NextendCss::getInstance();
$css->addCssLibraryFile('element/fontmanager.css');
$js = NextendJavascript::getInstance();
$js->addLibraryJsAssetsFile('dojo', 'element.js');
$js->addLibraryJsAssetsFile('dojo', 'element/fontmanager.js');
$this->_value = $this->_form->get($this->_name, $this->_default);
if (intval(NextendXmlGetAttribute($this->_xml, 'base64'))) {
$this->base64 = 1;
$js->addLibraryJsFile('jquery', NEXTENDLIBRARYASSETS . 'js' . DIRECTORY_SEPARATOR . 'base64.js');
$json = json_decode($this->_value);
if ($json != null && $json != $this->_value) {
$this->_value = base64_encode($this->_value);
$this->_form->set($this->_name, $this->_value);
}
}
$hidden = new NextendElementHidden($this->_form, $this->_tab, $this->_xml);
$html = '';
$fontmanager = NextendFontmanager::getInstance();
$fontmanager->_currentform = $this->_form;
$html .= $fontmanager->render();
$html .= '<a id="nextend-' . $this->_name . '-button" class="nextend-font-button" href="#">' . NextendText::_('Font') . '</a>';
$html .= '<a id="nextend-' . $this->_name . '-button-export" class="nextend-button-css nextend-font-export nextend-element-hastip" title="' . NextendText::_('FONTMANAGER_Export') . '" href="#"></a>';
$html .= '<a id="nextend-' . $this->_name . '-button-import" class="nextend-button-css nextend-font-import nextend-element-hastip" title="' . NextendText::_('FONTMANAGER_Import') . '" href="#"></a>';
$html .= '<div id="nextend-' . $this->_name . '-message" class="nextend-message"></div>';
$html .= "<div class='nextend-fontmanager nextend-clearfix'>";
$hiddenhtml = $hidden->render($this->control_name, false);
$html .= $hiddenhtml[1];
$html .= "</div>";
$tabs = explode('|', NextendXmlGetAttribute($this->_xml, 'tabs'));
$translatedTabs = array();
for ($i = 0; $i < count($tabs); $i++) {
$translatedTabs[$i] = NextendText::_($tabs[$i]);
}
$this->printjs = '
new NextendElementFontmanager({
hidden: "' . $this->_id . '",
button: "nextend-' . $this->_name . '-button",
importbtn: "nextend-' . $this->_name . '-button-import",
exportbtn: "nextend-' . $this->_name . '-button-export",
message: "nextend-' . $this->_name . '-message",
tabs: ' . json_encode($tabs) . ',
translatedTabs: ' . json_encode($translatedTabs) . ',
firsttab: "' . $tabs[0] . '",
txt: {
importingdone: "' . NextendText::_('FONTMANAGER_Importing_done') . '",
youcanimport: "' . NextendText::_('FONTMANAGER_Now_you_can_import_the_settings_of_this_font') . '"
},
base64: ' . $this->base64 . '
});
';
if ($this->_includeJS) {
$js->addLibraryJs('dojo', $this->printjs);
}
return $html;
}
示例10: render
function render()
{
if ($this->_form) {
return;
}
$html = '';
$css = NextendCss::getInstance();
$css->addCssLibraryFile('fontmanager.css');
$js = NextendJavascript::getInstance();
nextendimport('nextend.form.form');
$form = new NextendForm();
$form->loadXMLFile(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'fontmanager' . DIRECTORY_SEPARATOR . 'form.xml');
$this->_form =& $form;
$js->addLibraryJsLibraryFile('dojo', 'dojo/window.js');
$js->addLibraryJsAssetsFile('dojo', 'window.js');
$js->addLibraryJsAssetsFile('dojo', 'element.js');
$js->addLibraryJsAssetsFile('dojo', 'fontmanager.js');
$id = 'nextend-fontmanager-lightbox-' . md5(time());
$html .= '<div id="' . $id . '" class="gk_hack nextend-window ' . $this->_currentform->get('class', isset($_REQUEST['view']) && $_REQUEST['view'] == 'sliders_settings' ? 'smartslider' : '') . '">';
$html .= '<div class="gk_hack nextend-window-container">';
$html .= '<div class="gk_hack nextend-topbar"><div class="gk_hack nextend-topbar-logo"></div>';
$manual = $this->_currentform->get('manual');
if ($manual != "") {
$html .= '<a href="' . $manual . '" target="_blank" class="gk_hack nextend-topbar-button nextend-topbar-manual">' . NextendText::_('Manual') . '</a>';
}
$support = $this->_currentform->get('support');
if ($support != "") {
$html .= '<a href="' . $support . '" target="_blank" class="gk_hack nextend-topbar-button nextend-topbar-support">' . NextendText::_('Support') . '</a>';
}
$html .= '<div id="nextend-fontmanager-save" class="nextend-window-save"><div class="NextendWindowSave">' . NextendText::_('APPLY') . '</div></div>';
$html .= '</div>';
$html .= '<div class="gk_hack nextend-window-container-inner">';
$html .= '<fieldset id="nextend-fontmanager-panels" class="gk_hack panelform">';
$html .= '<div id="nextend-fontmanager-tabs" class="gk_hack"></div>';
$html .= '<div id="nextend-fontmanager-panel" class="gk_hack pane-sliders">';
$html .= '<h3>' . NextendText::_('FONTMANAGER_Font_manager') . '</h3>';
ob_start();
//echo '<form method="post" name="nextend-fontmanager" id="nextend-fontmanager" action="" onsubmit="return false;">';
$form->render('fontmanager');
//echo '</form>';
$html .= ob_get_clean();
$html .= '</div>';
$html .= '<p id="nextend-fontmanager-preview" style="background-color: #d0d0d0;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>';
$html .= '<div class="fontcolorpickerinput"><div><input id="nextend-fontmanager-backgroundcolor" value="#d0d0d0" name="nextend-fontmanager-backgroundcolor" /></div></div>';
$html .= '<div id="nextend-fontmanager-cleartab" style="float:right;">' . NextendText::_('FONTMANAGER_Clear_this_tab') . '</div>';
$html .= '</fieldset>';
$html .= '</div>';
$html .= '</div>';
$html .= '</div>';
$js->addLibraryJs('dojo', '
new NextendFontmanager({
node: "' . $id . '"
});
');
return $html;
}
示例11: fetchElement
function fetchElement()
{
global $smartslidercontroller, $ss2sliderafterform;
$this->_value = htmlspecialchars($this->_form->get($this->_name, $this->_default), ENT_QUOTES);
$this->_form->set($this->_name, $this->_value);
$html = '<div style="display:none;">' . parent::fetchElement() . '</div>';
$slider = null;
$params = new NextendData();
if (nextendIsJoomla()) {
nextendimportsmartslider2('nextend.smartslider.joomla.slider');
$module = new stdClass();
$module->id = 0;
$params->loadArray(array('slider' => intval($_GET['sliderid'])));
$slider = new NextendSliderJoomla($module, $params, dirname(__FILE__), true);
} else {
if (nextendIsWordpress()) {
nextendimportsmartslider2('nextend.smartslider.wordpress.slider');
$slider = new NextendSliderWordpress(intval($_GET['sliderid']), $params, dirname(__FILE__), true);
} else {
if (nextendIsMagento()) {
nextendimportsmartslider2('nextend.smartslider.magento.slider');
$slider = new NextendSliderMagento(intval($_GET['sliderid']), $params, dirname(__FILE__), true);
}
}
}
ob_start();
echo "<div id='smartslider-adjust-height' style='overflow:auto; margin: 5px; padding: 5px;'>";
$slider->render();
echo "</div>";
echo "<div id='smart-slider-layer-dummy' class='smart-slider-layer'></div>";
echo '<div class="smartslider-slide-advanced-layers" style="min-width: 1600px;"></div>';
$ss2sliderafterform = ob_get_clean();
$css = NextendCss::getInstance();
$css->addCssLibraryFile('jqueryui/jquery.ui.resizable.css');
$css->addCssFile(NEXTEND_SMART_SLIDER2_ASSETS . 'admin/css/layer.css');
$js = NextendJavascript::getInstance();
$js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.core.min.js');
$js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.widget.min.js');
$js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.mouse.min.js');
$js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.resizable.min.js');
$js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.draggable.min.js');
$js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.sortable.min.js');
$js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.droppable.min.js');
$js->addLibraryJsFile('jquery', NEXTENDLIBRARYASSETS . 'js' . DIRECTORY_SEPARATOR . 'base64.js');
$js->addLibraryJsFile('jquery', NEXTENDLIBRARYASSETS . 'js' . DIRECTORY_SEPARATOR . 'sortable.js');
$js->addLibraryJsFile('jquery', NEXTEND_SMART_SLIDER2_ASSETS . 'admin' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'console.js');
$js->addLibraryJsFile('jquery', NEXTEND_SMART_SLIDER2_ASSETS . 'admin' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'slide.js');
$js->addLibraryJsFile('jquery', NEXTEND_SMART_SLIDER2_ASSETS . 'admin' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'slide.layer.js');
$js->addLibraryJsFile('jquery', NEXTEND_SMART_SLIDER2_ASSETS . 'admin' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'slide.item.js');
$js->addLibraryJsFile('jquery', NEXTEND_SMART_SLIDER2_ASSETS . 'admin' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'slide.layout.js');
$js->addLibraryJs('jquery', "\r\n njQuery(document).ready(function(){\r\n var el = \$('#smartslider-adjust-height');\r\n el.height(el[0].scrollHeight+10);\r\n \$(window).trigger('resize');\r\n });\r\n ndojo.addOnLoad(function(){\r\n SmartSliderAdminSlide('" . $slider->getId() . "','" . $slider->_activeSlide . "','" . $this->_id . "', '" . $smartslidercontroller->route('controller=layouts&action=create') . "');\r\n });\r\n ");
if (NextendSmartSliderSettings::get('slideeditoralert', 1)) {
$js->addLibraryJs('jquery', "\r\n njQuery(window).on('beforeunload', function() {\r\n if (njQuery.now()-window.nextendtime > 60000 && !window.nextendsave) { // 1 min\r\n return '" . NextendText::_('Your_slide_settings_has_not_been_submitted_yet') . "';\r\n } else {\r\n return;\r\n }\r\n });\r\n ");
}
return $html;
}
示例12: generateOptions
function generateOptions(&$xml)
{
$this->_values = array();
$html = '';
foreach ($xml->option as $option) {
$v = NextendXmlGetAttribute($option, 'value');
$this->_values[] = $v;
$html .= '<div class="nextend-radio-option' . $this->isSelected($v) . '">' . NextendText::_((string) $option) . '</div>';
}
return $html;
}
示例13: onNextendSliderGeneratorList
function onNextendSliderGeneratorList(&$group, &$list, $showall = false)
{
if ($showall || smartsliderIsFull()) {
$group[self::$_group] = 'Twitter';
if (!isset($list[self::$_group])) {
$list[self::$_group] = array();
}
$configured = is_string(NextendSmartSliderStorage::get(self::$_group));
$list[self::$_group][self::$_group . '_timeline'] = array(NextendText::_('Timeline'), $this->getPath() . 'twittertimeline' . DIRECTORY_SEPARATOR, $configured, true, true);
}
}
示例14: getValues
function getValues()
{
return array('html' => '<div class="myfirstclass">
' . NextendText::_('My_HTML_element') . '
</div>', 'css' => '.myfirstclass {
height: 30px;
line-height: 30px;
background: royalblue;
color: white;
text-align: center;
}', 'onmouseclick' => '', 'onmouseenter' => '', 'onmouseleave' => '');
}
示例15: decorateTitle
function decorateTitle()
{
echo "<div class='nextend-tab'>";
if ($this->_hidetitle != 1) {
echo "<h3>" . NextendText::_(NextendXmlGetAttribute($this->_xml, 'label')) . "</h3>";
}
?>
<div style="position: absolute; right: 130px; top: 0;">
<div class="smartslider-advanced-layers smartslider-greybar">
<div class="smartslider-toolbar-simple smartslider-toolbar-options smartslider-button-grey first">
<div><?php
echo NextendText::_('Simple_mode');
?>
</div>
</div><div class="smartslider-toolbar-advanced smartslider-toolbar-options smartslider-button-grey last">
<div><?php
echo NextendText::_('Advanced_mode');
?>
</div>
</div>
</div>
<div class="smartslider-device-switch smartslider-greybar smartslider-toolbar-options-4">
<div class="smartslider-toolbar-device-all smartslider-toolbar-options smartslider-button-grey first">
<div><?php
echo NextendText::_('All');
?>
</div>
</div><div class="smartslider-toolbar-desktop smartslider-toolbar-options smartslider-button-grey">
<div><?php
echo NextendText::_('Desktop');
?>
</div>
</div><div class="smartslider-toolbar-tablet smartslider-toolbar-options smartslider-button-grey">
<div><?php
echo NextendText::_('Tablet');
?>
</div>
</div><div class="smartslider-toolbar-phone smartslider-toolbar-options smartslider-button-grey last">
<div><?php
echo NextendText::_('Mobile');
?>
</div>
</div>
</div>
</div>
<div class="smartslider-toolbar-play"><?php
echo NextendText::_('PLAY');
?>
</div>
<div class="smartslider-slide-console"></div>
<?php
}