本文整理汇总了PHP中JHtml::stylesheet方法的典型用法代码示例。如果您正苦于以下问题:PHP JHtml::stylesheet方法的具体用法?PHP JHtml::stylesheet怎么用?PHP JHtml::stylesheet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JHtml
的用法示例。
在下文中一共展示了JHtml::stylesheet方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getInput
protected function getInput()
{
$this->params = $this->element->attributes();
JHtml::stylesheet('nnframework/style.min.css', false, true);
$title = $this->get('label');
$description = $this->get('description');
$class = $this->get('class');
$showclose = $this->get('showclose', 0);
$start = $this->get('start', 0);
$end = $this->get('end', 0);
$html = array();
if ($start || !$end) {
$html[] = '</div>';
if (strpos($class, 'alert') !== false) {
$html[] = '<div class="alert ' . $class . '">';
} else {
$html[] = '<div class="well well-small ' . $class . '">';
}
if ($showclose && JFactory::getUser()->authorise('core.admin')) {
$html[] = '<button type="button" class="close nn_remove_assignment">×</button>';
}
if ($title) {
$html[] = '<h4>' . $this->prepareText($title) . '</h4>';
}
if ($description) {
$html[] = '<div>' . $this->prepareText($description) . '</div>';
}
$html[] = '<div><div>';
}
if (!$start && !$end) {
$html[] = '</div>';
}
return '</div>' . implode('', $html);
}
示例2: onContentAfterDisplay
/**
* Displays the comments area
*
* @param string $context The context of the content being passed to the plugin
* @param object &$row The article object
* @param object &$params The article params
* @param integer $page The 'page' number
*
* @return mixed html string containing code for the comment if in com_content.article else boolean false
*
*/
public function onContentAfterDisplay($context, &$row, &$params, $page = 0)
{
$parts = explode(".", $context);
$plgCatid = $this->params->def('catid');
// Check is run com_content
if ($parts[0] != 'com_content') {
return false;
}
// Check category of the plugin in the allowable category array of the plugin
if ($plgCatid[0] != 'all' && !in_array($row->catid, $plgCatid)) {
return false;
}
// Add media file
JHtml::_('jquery.framework');
JHtml::script(JUri::base() . 'media/pkg_mjcommentsystem/plg_content_mjformcomment/js/plg_mjformcomment.js', false, true);
JHtml::stylesheet(JUri::base() . 'media/pkg_mjcommentsystem/plg_content_mjformcomment/css/plg_mjformcomment.css', false, true, false);
// Add the language file of the component
$lang = JFactory::getLanguage();
$basePath = JPATH_SITE . '/components/com_mjcomments';
$lang->load('com_mjcomments', $basePath, null, true);
// Assign value to the layout variables
$content_id = $row->id;
$formReturn = 'index.php?option=com_mjcomments&task=comment.send&format=json';
// Get the comment form
$this->setCommentForm();
// Get the comment list
$this->setCommentList($content_id);
// Name of the variables that will be used in the layout
$data = array('view' => $context, 'form' => $this->form, 'formReturn' => $formReturn, 'content_id' => $content_id, 'comments' => $this->comments);
return JLayoutHelper::render('default', compact('data'), __DIR__ . '/layouts');
}
示例3: display
/**
* Display the view
*/
function display()
{
//DEVNOTE: set document title
$document =& JFactory::getDocument();
$document->setTitle(JText::_('NEW_DABATASE_CONNECTION'));
JHtml::script('dbConfigForm.js', 'media/com_dbconnect/js/');
JHtml::stylesheet('izi.css', 'media/com_dbconnect/css/');
if (@$this->pdoError != '') {
//máme chybu
$this->setLayout('error');
$this->assignRef('error', $this->pdoError);
} else {
if ($_POST['step'] == 2 && isset($_POST['db_table'])) {
//máme vybranou tabulku, musíme vybrat primární klíč
$this->setLayout('selectprimarykey');
$unidbModel = $this->getModel('unidb', 'unidbModel');
$this->assignRef('columns', $unidbModel->getColumns($_POST['db_table']));
} elseif ($_POST['step'] == 1 && isset($_POST['db_username']) && isset($_POST['db_password'])) {
//máme nastavené připojení k DB, musíme vybrat tabulku
$this->setLayout('selecttable');
$unidbModel = $this->getModel('unidb', 'unidbModel');
$this->assignRef('tables', $unidbModel->getTables());
} else {
//musíme vybrat nastavení serveru atp.
$this->setLayout('setdatabase');
$this->assignRef('dbTypes', $this->get('DBTypes'));
}
}
parent::display();
}
示例4: getInput
protected function getInput()
{
$this->params = $this->element->attributes();
JHtml::stylesheet('nnframework/style.min.css', false, true);
require_once __DIR__ . '/toggler.php';
$toggler = new nnFieldToggler();
$this->value = (int) $this->value;
$label = $this->get('label');
$param_name = $this->get('name');
$noshow = $this->get('noshow', 0);
$showclose = $this->get('showclose', 0);
$html = array();
if ($label) {
$label = nnText::html_entity_decoder(JText::_($label));
$html[] = '</div>';
if (!$noshow) {
$html[] = $toggler->getInput(array('div' => 1, 'param' => 'show_assignments|' . $param_name, 'value' => '1|1,2'));
}
$class = 'well well-small nn_well';
if ($this->value === 1) {
$class .= ' alert-success';
} else {
if ($this->value === 2) {
$class .= ' alert-error';
}
}
$html[] = '<div class="' . $class . '">';
if ($showclose && JFactory::getUser()->authorise('core.admin')) {
$html[] = '<button type="button" class="close nn_remove_assignment">×</button>';
}
$html[] = '<div class="control-group">';
$html[] = '<div class="control-label">';
$html[] = '<label><h4 class="nn_assignmentselection-header">' . $label . '</h4></label>';
$html[] = '</div>';
$html[] = '<div class="controls">';
$html[] = '<fieldset id="' . $this->id . '" class="radio btn-group">';
$onclick = ' onclick="nnScripts.setToggleTitleClass(this, 0)"';
$html[] = '<input type="radio" id="' . $this->id . '0" name="' . $this->name . '" value="0"' . (!$this->value ? ' checked="checked"' : '') . $onclick . '/>';
$html[] = '<label class="nn_btn-ignore" for="' . $this->id . '0">' . JText::_('NN_IGNORE') . '</label>';
$onclick = ' onclick="nnScripts.setToggleTitleClass(this, 1)"';
$html[] = '<input type="radio" id="' . $this->id . '1" name="' . $this->name . '" value="1"' . ($this->value === 1 ? ' checked="checked"' : '') . $onclick . '/>';
$html[] = '<label class="nn_btn-include" for="' . $this->id . '1">' . JText::_('NN_INCLUDE') . '</label>';
$onclick = ' onclick="nnScripts.setToggleTitleClass(this, 2)"';
$onclick .= ' onload="nnScripts.setToggleTitleClass(this, ' . $this->value . ', 7)"';
$html[] = '<input type="radio" id="' . $this->id . '2" name="' . $this->name . '" value="2"' . ($this->value === 2 ? ' checked="checked"' : '') . $onclick . '/>';
$html[] = '<label class="nn_btn-exclude" for="' . $this->id . '2">' . JText::_('NN_EXCLUDE') . '</label>';
$html[] = '</fieldset>';
$html[] = '</div>';
$html[] = '</div>';
$html[] = '<div class="clearfix"> </div>';
$html[] = $toggler->getInput(array('div' => 1, 'param' => $param_name, 'value' => '1,2'));
$html[] = '<div><div>';
} else {
if (!$noshow) {
$html[] = $toggler->getInput(array('div' => 1));
}
$html[] = $toggler->getInput(array('div' => 1));
}
return '</div>' . implode('', $html);
}
示例5: frameYTShortcode
function frameYTShortcode($atts = null, $content = null)
{
$atts = ytshortcode_atts(array('style' => 'default', 'align' => 'left', 'class' => ''), $atts, 'yt_frame');
JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/frame/css/frame.css", 'text/css');
JHtml::script("plugins/system/ytshortcodes/shortcodes/frame/js/frame.js");
return '<span class="yt-frame yt-frame-align-' . $atts['align'] . ' yt-frame-style-' . $atts['style'] . '"><span class="yt-frame-inner">' . parse_shortcode(str_replace(array("<br/>", "<br>", "<br />"), " ", $content)) . '</span></span><div class="clear clearfix"></div>';
}
示例6: columnsYTShortcode
function columnsYTShortcode($atts, $content = null)
{
extract(ytshortcode_atts(array("grid" => 'no'), $atts));
$show_grid = $grid == 'yes' ? 'show-grid' : '';
JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/columns/css/columns.css");
return '<div class="yt-clearfix yt-show-grid ' . $show_grid . ' ">' . parse_shortcode(str_replace(array("<br/>", "<br>", "<br />"), " ", $content)) . '</div>';
}
示例7: render
/**
* Display the button
*
* @return array A two element array of ( imageName, textToInsert )
*/
function render($name)
{
$button = new JObject();
if (JFactory::getApplication()->isSite() && !$this->params->enable_frontend) {
return $button;
}
JHtml::stylesheet('nnframework/style.min.css', false, true);
$this->params->tag = preg_replace('#[^a-z0-9-_]#s', '', $this->params->tag);
if ($this->params->button_use_custom_code && $this->params->button_custom_code) {
$text = trim($this->params->button_custom_code);
$text = str_replace(array("\r", "\n"), array('', '</p>\\n<p>'), trim($text)) . '</p>';
$text = preg_replace('#^(.*?)</p>#', '\\1', $text);
} else {
$text = '{' . $this->params->tag . ' ' . JText::_('TT_TITLE') . '::' . JText::_('TT_TEXT') . '}' . JText::_('TT_LINK') . '{/' . $this->params->tag . '}';
}
$text = str_replace('\\\\n', '\\n', addslashes($text));
$text = str_replace('{', '{\'+\'', $text);
$js = "\n\t\t\tfunction insertTooltips(editor) {\n\t\t\t\tjInsertEditorText('" . $text . "', editor);\n\t\t\t}\n\t\t";
JFactory::getDocument()->addScriptDeclaration($js);
$class = 'nonumber icon-tooltips';
$text_ini = strtoupper(str_replace(' ', '_', $this->params->button_text));
$text = JText::_($text_ini);
if ($text == $text_ini) {
$text = JText::_($this->params->button_text);
}
$button->modal = false;
$button->class = 'btn';
$button->link = '#';
$button->onclick = 'insertTooltips(\'' . $name . '\');return false;';
$button->text = trim($text);
$button->name = $class;
return $button;
}
示例8: display
/**
* Display the view
*/
public function display($tpl = null)
{
// Joomla 2.5
if (version_compare(JVERSION, '3.0', 'lt')) {
jimport('joomla.environment.request');
JHtml::stylesheet('com_icagenda/template.j25.css', false, true);
JHtml::stylesheet('com_icagenda/icagenda-back.j25.css', false, true);
}
$this->params = JComponentHelper::getParams('com_icagenda');
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->events = $this->get('Events');
$this->dates = $this->get('Dates');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
// We don't need toolbar in the modal window.
if ($this->getLayout() !== 'modal') {
$this->addToolbar();
if (version_compare(JVERSION, '3.0', 'ge')) {
$this->sidebar = JHtmlSidebar::render();
}
}
parent::display($tpl);
}
示例9: getLabel
protected function getLabel()
{
JHtml::stylesheet('nnframework/style.min.css', false, true);
$this->params = $this->element->attributes();
$label = $this->prepareText($this->get('label'));
$description = (trim($this->value) != '') ? trim($this->value) : $this->get('description');
$description = $this->prepareText($description);
$div = '';
if (!$label && !$description)
{
return '';
}
if (!$label)
{
return '<label class="nn_label">' . $description . '</label>';
}
if (!$description)
{
return '<label class="nn_label">' . $label . '</label>';
}
$description = $this->prepareText($this->get('description'));
return '<label class="hasTip" title="' . $label . '::' . str_replace('"', '"', $description) . '">'
. $label . '</label>';
}
示例10: sectionYTShortcode
function sectionYTShortcode($atts = null, $content = null)
{
$atts = ytshortcode_atts(array('background' => '#ffffff', 'image' => '', 'repeat' => 'repeat', 'parallax' => 'yes', 'speed' => '10', 'max_width' => '960', 'margin' => '0px 0px 0px 0px', 'padding' => '30px 0px 30px 0px', 'border' => 'none', 'color' => '#333333', 'text_align' => 'inharit', 'text_shadow' => 'none', 'url_youtube' => '', 'url_webm' => '', 'url_vimeo' => '', 'font_size' => '12px', 'class' => ''), $atts, 'section');
$id_section = uniqid('sec_') . rand() . time();
$id_video = uniqid('svb_sec_') . rand() . time();
$background = $atts['image'] ? sprintf('%s %s url(\'%s\') repeat %s', $atts['background'], '50% 0', yt_image_media($atts['image']), $atts['parallax'] === 'yes' ? 'fixed' : 'scroll') : $atts['background'];
if ($atts['image'] && $atts['parallax'] === 'yes') {
$atts['class'] .= ' yt-section-parallax';
}
if ($atts['url_youtube']) {
$atts['class'] .= ' yt-panel-clickable';
}
JHtml::_('jquery.framework');
if ($atts['image'] && $atts['parallax'] === 'yes' or $atts['url_youtube']) {
JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/section/js/section.js");
}
JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/section/js/modernizr.video.js");
JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/section/js/swfobject.js");
JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/section/js/video_background.js");
JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/section/css/section.css", 'text/css');
$atts['text_align'] = $atts['text_align'] != 'inherit' ? 'text-align:' . $atts['text_align'] . ';' : '';
$atts['text_shadow'] = $atts['text_shadow'] ? ' -webkit-text-shadow:' . $atts['text_shadow'] . ';-moz-text-shadow:' . $atts['text_shadow'] . ';text-shadow:' . $atts['text_shadow'] . ';' : '';
if ($atts['url_youtube'] != '') {
return '<div class="yt-section-forcefullwidth"><div id="' . $id_section . '" class="yt-section-wrapper" data-id="' . $id_section . '"><div class="yt-section ' . trim($atts['class']) . ' " data-speed="' . $atts['speed'] . '" style="background:' . $background . ';margin:' . $atts['margin'] . ';padding:' . $atts['padding'] . ';border-top:' . $atts['border'] . ';border-bottom:' . $atts['border'] . '"><div class="yt-section-content yt-content-wrap" style="max-width:' . $atts['max_width'] . 'px; ' . $atts['text_align'] . ' color:' . $atts['color'] . ';' . $atts['text_shadow'] . ' font-size:' . $atts['font_size'] . '">' . parse_shortcode(str_replace(array("<br/>", "<br />", "<p></p>"), " ", $content)) . '</div><div class="yt-section-overlay"></div><div class="yt-section-video" id="' . $id_video . '" data-id="' . $id_video . '" data-loop="true" data-muted="true" data-autoplay="true" data-ratio="1.77" data-overlay="" data-swfpath="" data-youtube="' . $atts['url_youtube'] . '"><div id="video_background_video_1" style="z-index: 0; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; overflow: hidden;"></div></div></div></div></div>';
} else {
if ($atts['url_webm'] != '') {
return '<div class="yt-section-forcefullwidth"><div id="' . $id_section . '" class="yt-section-wrapper" data-id="' . $id_section . '"><div class="yt-section ' . trim($atts['class']) . ' " data-speed="' . $atts['speed'] . '" style="background:' . $background . ';margin:' . $atts['margin'] . ';padding:' . $atts['padding'] . ';border-top:' . $atts['border'] . ';border-bottom:' . $atts['border'] . '"><div class="yt-section-content yt-content-wrap" style="max-width:' . $atts['max_width'] . 'px; ' . $atts['text_align'] . ' color:' . $atts['color'] . ';' . $atts['text_shadow'] . ' font-size:' . $atts['font_size'] . '">' . parse_shortcode(str_replace(array("<br/>", "<br />"), " ", $content)) . '</div><div class="yt-section-overlay"></div><div class="yt-section-video" id="' . $id_video . '" data-id="' . $id_video . '" data-loop="true" data-muted="true" data-autoplay="true" data-ratio="1.77" data-overlay="" data-swfpath="" data-webm="' . $atts['url_webm'] . '"><div id="video_background_video_1" style="z-index: 0; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; overflow: hidden;"><video autoplay="" loop="" onended="this.play()"><source src="' . $atts['url_webm'] . '" type="video/webm"></video></div></div></div></div></div>';
} else {
return '<div class="yt-section ' . trim($atts['class']) . ' " data-speed="' . $atts['speed'] . '" style="background:' . $background . ';margin:' . $atts['margin'] . ';padding:' . $atts['padding'] . ';border-top:' . $atts['border'] . ';border-bottom:' . $atts['border'] . '"><div class="yt-section-content yt-content-wrap" style="max-width:' . $atts['max_width'] . 'px; ' . $atts['text_align'] . ' color:' . $atts['color'] . ';' . $atts['text_shadow'] . ' font-size:' . $atts['font_size'] . '">' . parse_shortcode(str_replace(array("<br/>", "<br />", "<p></p>"), " ", $content)) . '</div></div>';
}
}
}
示例11: render
/**
* Display the button
*
* @return array A two element array of ( imageName, textToInsert )
*/
function render($name)
{
$button = new JObject();
if (JFactory::getApplication()->isSite() && !$this->params->enable_frontend) {
return $button;
}
require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php';
nnFrameworkFunctions::loadLanguage('plg_editors-xtd_articlesanywhere');
JHtml::_('behavior.modal');
JHtml::stylesheet('nnframework/style.min.css', false, true);
$class = 'nonumber icon-articlesanywhere';
$link = 'index.php?nn_qp=1' . '&folder=plugins.editors-xtd.articlesanywhere' . '&file=articlesanywhere.inc.php' . '&name=' . $name;
$text_ini = strtoupper(str_replace(' ', '_', $this->params->button_text));
$text = JText::_($text_ini);
if ($text == $text_ini) {
$text = JText::_($this->params->button_text);
}
$button->modal = true;
$button->class = 'btn';
$button->link = $link;
$button->text = trim($text);
$button->name = $class;
$button->options = "{handler: 'iframe', size: {x:window.getSize().x-100, y: window.getSize().y-100}}";
return $button;
}
示例12: masonryYTShortcode
function masonryYTShortcode($atts = null, $content = null)
{
$atts = ytshortcode_atts(array('id_masonry' => '', 'gutter' => null, 'rtl' => 'no'), $atts, 'yt_masonry');
global $intense_masonry_gutter;
$intense_masonry_gutter = $atts['gutter'];
if (empty($intense_masonry_gutter)) {
$intense_masonry_gutter = '0';
}
if (empty($id_masonry)) {
$id_masonry = rand();
}
// intense_add_script( 'packery' );
JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/masonry/js/masonry.js");
JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/masonry/css/masonry.css", 'text/css');
$init_script = '<script>
function intenseInitMasonry() {
var $ = jQuery;
var $container = $(".intense.masonry");
$container.packery({
itemSelector: ".item",
gutter: 0,
isOriginLeft: ' . ($atts['rtl'] == "no" ? 'false' : 'true') . '
});
return $container;
}
jQuery(function($){ $(window).load(function() {
setTimeout(intenseInitMasonry, 250);
intenseInitMasonry();
}); });</script>';
return $init_script . '<div id="' . $id_masonry . '" class="intense masonry' . (!empty($class) ? ' ' . $class : '') . '" style="position: relative;">' . parse_shortcode(str_replace(array("<br/>", "<br />"), " ", $content)) . '</div><div class="clearfix"></div>';
}
示例13: BoxYTShortcode
function BoxYTShortcode($atts = null, $content = null)
{
$atts = ytshortcode_atts(array('style' => 'default', 'title' => 'Box Title', 'title_color' => '#FFFFFF', 'box_color' => '#333333', 'color' => null, 'radius' => '', 'class' => ''), $atts, 'box');
// Initioal Variables
$id = uniqid('yt_box_') . rand() . time();
$radius = '';
$css = '';
// Color Manage
if ($atts['color'] !== null) {
$atts['box_color'] = $atts['color'];
}
// Radius Manage
if ($atts['radius']) {
$radius = $atts['radius'] != '0' ? 'border-radius:' . $atts['radius'] . 'px;' : '';
}
// Get Css in $css variable
$css .= '#' . $id . '{' . $radius . 'border-color:' . $atts['box_color'] . ';} #' . $id . ' .yt-box-title { background-color:' . $atts['box_color'] . ';color:' . $atts['title_color'] . ';}';
// Add CSS in head
$doc = JFactory::getDocument();
$doc->addStyleDeclaration($css);
JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/box/css/box.css");
// Output HTML
$return = '<div id="' . $id . '" class="yt-clearfix yt-box yt-box-style-' . $atts['style'] . '">
<div class="yt-box-title">' . $atts['title'] . '
</div>
<div class="yt-box-content yt-clearfix">' . parse_shortcode(str_replace(array("<br/>", "<br>", "<br />", "<p>", "</p>"), " ", $content)) . '</div>
</div>';
return $return;
}
示例14: _getInput
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
protected function _getInput()
{
$db =& JFactory::getDBO();
$doc =& JFactory::getDocument();
// Load the javascript and css
JHtml::_('behavior.framework');
JHtml::script('modal.js');
JHtml::stylesheet('modal.css');
// Attach modal behavior to document
$document = JFactory::getDocument();
$document->addScriptDeclaration("\r\n\t\twindow.addEvent('domready', function() {\r\n\t\t\tvar div = new Element('div').setStyle('display', 'none').injectBefore(document.id('menu-types'));\r\n\t\t\tdocument.id('menu-types').injectInside(div);\r\n\t\t\tSqueezeBox.initialize();\r\n\t\t\tSqueezeBox.assign(\$\$('input.modal'), {\r\n\t\t\t\tparse: 'rel'\r\n\t\t\t});\r\n\t\t});");
// Get the title of the linked chart
$db->setQuery('SELECT name' . ' FROM #__contact_details' . ' WHERE id = ' . (int) $this->value);
$title = $db->loadResult();
if ($error = $db->getErrorMsg()) {
JError::raiseWarning(500, $error);
}
if (empty($title)) {
$title = JText::_('Contact_Select_a_Contact');
}
$doc->addScriptDeclaration("function jSelectChart_" . $this->inputId . "(id, name, object) {\r\n\t\t\tdocument.id('" . $this->inputId . "_id').value = id;\r\n\t\t\tdocument.id('" . $this->inputId . "_name').value = name;\r\n\t\t\tSqueezeBox.close();\r\n\t\t}");
$link = 'index.php?option=com_contact&view=contacts&layout=modal&tmpl=component&function=jSelectChart_' . $this->inputId;
JHTML::_('behavior.modal', 'a.modal');
$html = "\n" . '<div class="fltlft"><input type="text" id="' . $this->inputId . '_name" value="' . htmlspecialchars($title, ENT_QUOTES, 'UTF-8') . '" disabled="disabled" /></div>';
$html .= '<div class="button2-left"><div class="blank"><a class="modal" title="' . JText::_('Contact_Change_Contact') . '" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 450}}">' . JText::_('Contact_Change_Contact_button') . '</a></div></div>' . "\n";
$html .= "\n" . '<input type="hidden" id="' . $this->inputId . '_id" name="' . $this->inputName . '" value="' . (int) $this->value . '" />';
return $html;
}
示例15: fancy_textYTShortcode
function fancy_textYTShortcode($atts, $content = null)
{
$atts = ytshortcode_atts(array('type' => '1', 'tags' => 'Hello, Text', 'class' => '', 'color' => '', 'size' => ''), $atts, 'fancy_text');
// Inistial Variables
$id = uniqid("ytft_") . rand() . time();
$tags = array();
$tag = '';
// class manage
$classes = array('yt-fancy-text', 'yt-fteffect' . $atts['type'], trim($atts['class']));
// Fancy Text interchangeable tag spliting
if ($atts['tags']) {
$tags = explode(',', $atts['tags']);
foreach ($tags as $word) {
$tag .= '<b>' . $word . '</b>';
}
$tag = str_replace('<b>' . $tags['0'] . '</b>', '<b class="is-visible">' . $tags['0'] . '</b>', $tag);
}
// Manage class for different type of Fancy Text
if ($atts['type'] == 1 or $atts['type'] == 2 or $atts['type'] == 4 or $atts['type'] == 5) {
$classes[] = 'yt-ft-letters';
}
// Add css file in head
JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/fancy_text/css/fancy_text.css", 'text/css', "screen");
// Add javascript file in head
JHtml::_('jquery.framework');
JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/fancy_text/js/fancy_text.js");
// HTML Ourput
$return = "\r\n <span id='" . $id . "' class='" . yt_acssc($classes) . "' style='color:" . $atts['color'] . "; font-size:" . $atts['size'] . "px;'>\r\n <span class='yt-ft-wrap'>\r\n " . $tag . "\r\n </span>\r\n </span>";
return $return;
}