当前位置: 首页>>代码示例>>PHP>>正文


PHP acymailing_loadMootools函数代码示例

本文整理汇总了PHP中acymailing_loadMootools函数的典型用法代码示例。如果您正苦于以下问题:PHP acymailing_loadMootools函数的具体用法?PHP acymailing_loadMootools怎么用?PHP acymailing_loadMootools使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了acymailing_loadMootools函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display

 function display($dummy1 = false, $dummy2 = false)
 {
     $moduleId = JRequest::getInt('formid');
     if (empty($moduleId)) {
         return;
     }
     if (JRequest::getInt('interval') > 0) {
         setcookie('acymailingSubscriptionState', true, time() + JRequest::getInt('interval'), '/');
     }
     $db = JFactory::getDBO();
     $db->setQuery('SELECT * FROM #__modules WHERE id = ' . intval($moduleId) . ' AND `module` LIKE \'%acymailing%\' LIMIT 1');
     $module = $db->loadObject();
     if (empty($module)) {
         echo 'No module found';
         exit;
     }
     $module->user = substr($module->module, 0, 4) == 'mod_' ? 0 : 1;
     $module->name = $module->user ? $module->title : substr($module->module, 4);
     $module->style = null;
     $module->module = preg_replace('/[^A-Z0-9_\\.-]/i', '', $module->module);
     $params = array();
     if (JRequest::getInt('autofocus', 0)) {
         acymailing_loadMootools();
         $js = "\n\t\t\t\twindow = addEvent('load', function(){\n\t\t\t\t\tthis.focus();\n\t\t\t\t\tvar moduleInputs = document.getElementsByTagName('input');\n\t\t\t\t\tif(moduleInputs){\n\t\t\t\t\t\tvar i = 0;\n\t\t\t\t\t\twhile(moduleInputs[i].disabled == true){\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(moduleInputs[i]) moduleInputs[i].focus();\n\t\t\t\t\t}\n\t\t\t\t});";
         $doc = JFactory::getDocument();
         $doc->addScriptDeclaration($js);
     }
     echo JModuleHelper::renderModule($module, $params);
 }
开发者ID:DanyCan,项目名称:wisten.github.io,代码行数:29,代码来源:sub.php

示例2: fetchButton

 function fetchButton($type = 'Pophelp', $namekey = '', $id = 'pophelp')
 {
     acymailing_loadMootools();
     $doc = JFactory::getDocument();
     $config =& acymailing_config();
     $level = $config->get('level');
     $url = ACYMAILING_HELPURL . $namekey . '&level=' . $level;
     $iFrame = "'<iframe frameborder=\"0\" src=\\'{$url}\\' width=\\'100%\\' height=\\'100%\\' scrolling=\\'auto\\'></iframe>'";
     $js = "var openHelp = true; function displayDoc(){var box=\$('iframedoc'); if(openHelp){box.innerHTML = " . $iFrame . ";box.style.display = 'block';box.style.height = '0';}";
     $js .= "try{\n\t\t\t\t\tvar fx = box.effects({duration: 1500, transition:\n\t\t\t\t\tFx.Transitions.Quart.easeOut});\n\t\t\t\t\tif(openHelp){\n\t\t\t\t\t\tfx.start({'height': 400});\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfx.start({'height': 0}).chain(function() {\n\t\t\t\t\t\t\tbox.innerHTML='';\n\t\t\t\t\t\t\tbox.setStyle('display','none');\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}catch(err){\n\t\t\t\t\tbox.style.height = '400px';\n\t\t\t\t\tvar myVerticalSlide = new Fx.Slide('iframedoc');\n \t\t\t\t\tif(openHelp){\n \t\t\t\t\t\tmyVerticalSlide.hide().slideIn();\n\t\t\t\t\t}else{\n\t\t\t\t\t\tmyVerticalSlide.slideOut().chain(function() {\n\t\t\t\t\t\tbox.innerHTML='';\n\t\t\t\t\t\tbox.setStyle('display','none');\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} openHelp = !openHelp; return false;}";
     $doc->addScriptDeclaration($js);
     if (JRequest::getCmd('tmpl') == 'component' || !ACYMAILING_J30) {
         return '<a href="' . $url . '" target="_blank" onclick="return displayDoc();" class="toolbar"><span class="icon-32-help" title="' . JText::_('ACY_HELP', true) . '"></span>' . JText::_('ACY_HELP') . '</a>';
     }
     return '<button class="btn btn-small" onclick="return displayDoc();"><i class="icon-help"></i> ' . JText::_('ACY_HELP') . '</button>';
 }
开发者ID:unrealprojects,项目名称:journal,代码行数:16,代码来源:pophelp.php

示例3: explode

$nameCaption = $params->get('nametext', JText::_('NAMECAPTION'));
$emailCaption = $params->get('emailtext', JText::_('EMAILCAPTION'));
$displayOutside = $params->get('displayfields', 0);
$displayInline = $params->get('displaymode', 'vertical') == 'vertical' ? false : true;
$displayedFields = $params->get('customfields', 'name,email');
$fieldsToDisplay = explode(',', $displayedFields);
$extraFields = array();
$fieldsize = $params->get('fieldsize', '80%');
if (is_numeric($fieldsize)) {
    $fieldsize .= 'px';
}
if (!in_array('email', $fieldsToDisplay) && empty($connectedUser->id)) {
    $fieldsToDisplay[] = 'email';
}
if ($params->get('effect') == 'mootools-slide' || $params->get('redirectmode', 0) == '3') {
    acymailing_loadMootools($params->get('effect') == 'mootools-slide');
}
if ($params->get('effect') == 'mootools-slide') {
    $mootoolsButton = $params->get('mootoolsbutton', '');
    if (empty($mootoolsButton)) {
        $mootoolsButton = JText::_('SUBSCRIBE');
    }
    $js = 'if (window.jQuery) {
			jQuery(document).ready(function(){
				jQuery("#acymailing_fulldiv_' . $formName . '").hide();
 				jQuery("#acymailing_togglemodule_' . $formName . '").click(function(){
					jQuery("#acymailing_fulldiv_' . $formName . '").slideToggle("fast");
					jQuery("#acymailing_togglemodule_' . $formName . '").toggleClass("acyactive");
				});
			});
		} else{
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:31,代码来源:mod_acymailing.php

示例4: displayPreview

 function displayPreview($idArea, $tempid, $newslettersubject = '')
 {
     acymailing_loadMootools();
     if (isset($_SERVER["REQUEST_URI"])) {
         $requestUri = $_SERVER["REQUEST_URI"];
     } else {
         $requestUri = $_SERVER['PHP_SELF'];
         if (!empty($_SERVER['QUERY_STRING'])) {
             $requestUri = rtrim($requestUri, '/') . '?' . $_SERVER['QUERY_STRING'];
         }
     }
     $currentURL = ((!empty($_SERVER['HTTPS']) and strtolower($_SERVER['HTTPS']) == "on") || $_SERVER['SERVER_PORT'] == 443 ? 'https://' : 'http://') . $_SERVER["HTTP_HOST"] . $requestUri;
     $js = "var iframecreated = false;\r\n\t\t\t\tfunction acydisplayPreview(){\r\n\t\t\t\t\tvar d = document, area = d.getElementById('{$idArea}');\r\n\t\t\t\t\tif(!area) return;\r\n\t\t\t\t\tif(iframecreated) return;\r\n\t\t\t\t\tiframecreated = true;\r\n\t\t\t\t\tvar content = area.innerHTML;\r\n\t\t\t\t\tvar myiframe = d.createElement(\"iframe\");\r\n\t\t\t\t\tmyiframe.id = 'iframepreview';\r\n\t\t\t\t\tmyiframe.style.width = '100%';\r\n\t\t\t\t\tmyiframe.style.borderWidth = '0px';\r\n\t\t\t\t\tmyiframe.allowtransparency = \"true\";\r\n\t\t\t\t\tmyiframe.frameBorder = '0';\r\n\t\t\t\t\tarea.innerHTML = '';\r\n\t\t\t\t\tarea.appendChild(myiframe);\r\n\t\t\t\t\tmyiframe.onload = function(){\r\n\t\t\t\t\t\tvar iframeloaded = false;\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tif(myiframe.contentDocument != null && initIframePreview(myiframe,content) && replaceAnchors(myiframe)){\r\n\t\t\t\t\t\t\t\tiframeloaded = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}catch(err){\r\n\t\t\t\t\t\t\tiframeloaded = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(!iframeloaded){\r\n\t\t\t\t\t\t\tarea.innerHTML = content;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmyiframe.src = '';\r\n\r\n\t\t\t\t}\r\n\t\t\t\tfunction resetIframeSize(myiframe){\r\n\r\n\r\n\t\t\t\t\tvar innerDoc = (myiframe.contentDocument) ? myiframe.contentDocument : myiframe.contentWindow.document;\r\n\t\t\t\t\tvar objToResize = (myiframe.style) ? myiframe.style : myiframe;\r\n\t\t\t\t\tif(objToResize.width != '100%') return;\r\n\t\t\t\t\tvar newHeight = innerDoc.body.scrollHeight;\r\n\t\t\t\t\tif(!objToResize.height || parseInt(objToResize.height,10)+10 < newHeight || parseInt(objToResize.height,10)-10 > newHeight) objToResize.height = newHeight+'px';\r\n\t\t\t\t\tsetTimeout(function(){resetIframeSize(myiframe);},1000);\r\n\t\t\t\t}\r\n\t\t\t\tfunction replaceAnchors(myiframe){\r\n\t\t\t\t\tvar myiframedoc = myiframe.contentWindow.document;\r\n\t\t\t\t\tvar myiframebody = myiframedoc.body;\r\n\t\t\t\t\tvar el = myiframe;\r\n\t\t\t\t\tvar myiframeOffset = el.offsetTop;\r\n\t\t\t\t\twhile ( ( el = el.offsetParent ) != null )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmyiframeOffset += el.offsetTop;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar elements = myiframebody.getElementsByTagName(\"a\");\r\n\t\t\t\t\tfor( var i = elements.length - 1; i >= 0; i--){\r\n\t\t\t\t\t\tvar aref = elements[i].getAttribute('href');\r\n\t\t\t\t\t\tif(!aref) continue;\r\n\t\t\t\t\t\tif(aref.indexOf(\"#\") != 0 && aref.indexOf(\"" . addslashes($currentURL) . "#\") != 0) continue;\r\n\r\n\t\t\t\t\t\tif(elements[i].onclick && elements[i].onclick != \"\") continue;\r\n\r\n\t\t\t\t\t\tvar adest = aref.substring(aref.indexOf(\"#\")+1);\r\n\t\t\t\t\t\tif( adest.length < 1 ) continue;\r\n\r\n\t\t\t\t\t\telements[i].dest = adest;\r\n\t\t\t\t\t\telements[i].onclick = function(){\r\n\t\t\t\t\t\t\telem = myiframedoc.getElementById(this.dest);\r\n\t\t\t\t\t\t\tif(!elem){\r\n\t\t\t\t\t\t\t\telems = myiframedoc.getElementsByName(this.dest);\r\n\t\t\t\t\t\t\t\tif(!elems || !elems[0]) return false;\r\n\t\t\t\t\t\t\t\telem = elems[0];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif( !elem ) return false;\r\n\r\n\t\t\t\t\t\t\tvar el = elem;\r\n\t\t\t\t\t\t\tvar elemOffset = el.offsetTop;\r\n\t\t\t\t\t\t\twhile ( ( el = el.offsetParent ) != null )\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\telemOffset += el.offsetTop;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\twindow.scrollTo(0,elemOffset+myiframeOffset-15);\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tfunction initIframePreview(myiframe,content){\r\n\t\t\t\t\tvar d = document;\r\n\r\n\t\t\t\t\tvar heads = myiframe.contentWindow.document.getElementsByTagName(\"head\");\r\n\t\t\t\t\tif(heads.length == 0){\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar head = heads[0];\r\n\r\n\t\t\t\t\tvar myiframebodys = myiframe.contentWindow.document.getElementsByTagName('body');\r\n\t\t\t\t\tif(myiframebodys.length == 0){\r\n\t\t\t\t\t\tvar myiframebody = d.createElement(\"body\");\r\n\t\t\t\t\t\tmyiframe.appendChild(myiframebody);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar myiframebody = myiframebodys[0];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(!myiframebody) return false;\r\n\t\t\t\t\tmyiframebody.style.margin = '0px';\r\n\t\t\t\t\tmyiframebody.style.padding = '0px';\r\n\t\t\t\t\tmyiframebody.innerHTML = content;\r\n\r\n\t\t\t\t\tvar title1 = d.createElement(\"title\");\r\n\t\t\t\t\ttitle1.innerHTML = '" . addslashes($newslettersubject) . "';\r\n\r\n\r\n\t\t\t\t\tvar base1 = d.createElement(\"base\");\r\n\t\t\t\t\tbase1.target = \"_blank\";\r\n\r\n\t\t\t\t\thead.appendChild(base1);\r\n\r\n\t\t\t\t\tvar existingTitle = head.getElementsByTagName(\"title\");\r\n\t\t\t\t\tif(existingTitle.length == 0){\r\n\t\t\t\t\t\thead.appendChild(title1);\r\n\t\t\t\t\t}\r\n\t\t\t\t";
     if (!empty($tempid)) {
         $js .= "var link1 = d.createElement(\"link\");\r\n\t\t\t\t\tlink1.type = \"text/css\";\r\n\t\t\t\t\tlink1.rel = \"stylesheet\";\r\n\t\t\t\t\tlink1.href =  '" . (rtrim(JURI::root(), '/') . '/') . "media/com_acymailing/templates/css/template_" . $tempid . ".css?v=" . @filemtime(ACYMAILING_MEDIA . 'templates' . DS . 'css' . DS . 'template_' . $tempid . '.css') . "';\r\n\t\t\t\t\thead.appendChild(link1);\r\n\t\t\t\t";
     }
     $js .= "var style1 = d.createElement(\"style\");\r\n\t\t\t\tstyle1.type = \"text/css\";\r\n\t\t\t\tstyle1.id = \"overflowstyle\";\r\n\t\t\t\ttry{style1.innerHTML = 'html,body,iframe{overflow-y:hidden} ';}catch(err){style1.styleSheet.cssText = 'html,body,iframe{overflow-y:hidden} ';}\r\n\t\t\t\t";
     if ($this->archiveSection) {
         $js .= "try{style1.innerHTML += ' .hideonline{display:none;} ';}catch(err){style1.styleSheet.cssText += ' .hideonline{display:none;} ';}";
     }
     $js .= "\r\n\t\t\t\thead.appendChild(style1);\r\n\t\t\t\tresetIframeSize(myiframe);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\twindow.addEvent('domready', function(){acydisplayPreview();} );";
     $doc = JFactory::getDocument();
     $doc->addScriptDeclaration($js);
     $resize = "function previewResize(newWidth,newHeight){\r\n\t\t\tif(document.getElementById('iframepreview')){\r\n\t\t\t\tvar myiframe = document.getElementById('iframepreview');\r\n\t\t\t}else{\r\n\t\t\t\tvar myiframe = document.getElementById('newsletter_preview_area');\r\n\t\t\t}\r\n\t\t\tmyiframe.style.width = newWidth;\r\n\t\t\tif(newHeight == '100%'){\r\n\t\t\t\tresetIframeSize(myiframe);\r\n\t\t\t}else{\r\n\t\t\t\tmyiframe.style.height = newHeight;\r\n\t\t\t\tmyiframe.contentWindow.document.getElementById('overflowstyle').media = \"print\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tfunction previewSizeClick(elem){\r\n\t\t\tvar ids = new Array('preview320','preview480','preview768','previewmax');\r\n\t\t\tfor(var i=0;i<ids.length;i++){\r\n\t\t\t\tdocument.getElementById(ids[i]).className = 'previewsize '+ids[i];\r\n\t\t\t}\r\n\t\t\telem.className += 'enabled';\r\n\t\t}";
     $doc->addScriptDeclaration($resize);
     $switchPict = "function switchPict(){\r\n\t\t\tvar myiframe = document.getElementById('iframepreview');\r\n\t\t\tvar myiframebody = myiframe.contentWindow.document.getElementsByTagName('body')[0];\r\n\t\t\tif(document.getElementById('previewpict').className == 'previewsize previewpictenabled'){\r\n\t\t\t\tremove = true;\r\n\t\t\t\tdocument.getElementById('previewpict').className = 'previewsize previewpict';\r\n\t\t\t}else{\r\n\t\t\t\tremove = false;\r\n\t\t\t\tdocument.getElementById('previewpict').className = 'previewsize previewpictenabled';\r\n\t\t\t}\r\n\t\t\tvar elements = myiframebody.getElementsByTagName(\"img\");\r\n\t\t\tfor( var i = elements.length - 1; i >= 0; i-- ) {\r\n\t\t\t\tif(remove){\r\n\t\t\t\t\telements[i].src_temp = elements[i].src;\r\n\t\t\t\t\telements[i].src = 'pictureremoved';\r\n\t\t\t\t}else{\r\n\t\t\t\t\telements[i].src = elements[i].src_temp;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(myiframe.style.width == '100%'){\r\n\t\t\t\tresetIframeSize(myiframe);\r\n\t\t\t}\r\n\t\t}";
     $doc->addScriptDeclaration($switchPict);
 }
开发者ID:sam-akopyan,项目名称:hamradio,代码行数:28,代码来源:template.php

示例5: form

    function form()
    {
        acymailing_loadMootools();
        $app = JFactory::getApplication();
        $mailid = acymailing_getCID('mailid');
        if (empty($mailid)) {
            $mailid = JRequest::getString('mailid');
        }
        $mailClass = acymailing_get('class.mail');
        $mail = $mailClass->get($mailid);
        if (empty($mail)) {
            $config =& acymailing_config();
            $mail = new stdClass();
            $mail->created = time();
            $mail->fromname = $config->get('from_name');
            $mail->fromemail = $config->get('from_email');
            $mail->replyname = $config->get('reply_name');
            $mail->replyemail = $config->get('reply_email');
            $mail->subject = '';
            $mail->type = JRequest::getString('type');
            $mail->published = 1;
            $mail->visible = 0;
            $mail->html = 1;
            $mail->body = '';
            $mail->altbody = '';
            $mail->tempid = 0;
            $mail->alias = '';
        }
        $values = new stdClass();
        $values->maxupload = acymailing_bytes(ini_get('upload_max_filesize')) > acymailing_bytes(ini_get('post_max_size')) ? ini_get('post_max_size') : ini_get('upload_max_filesize');
        $toggleClass = acymailing_get('helper.toggle');
        JHTML::_('behavior.modal', 'a.modal');
        $acyToolbar = acymailing::get('helper.toolbar');
        $acyToolbar->custom('', JText::_('ACY_TEMPLATES'), 'template', false, 'displayTemplates(); return false;');
        $acyToolbar->custom('', JText::_('TAGS'), 'tag', false, 'try{IeCursorFix();}catch(e){}; displayTags(); return false;');
        $acyToolbar->divider();
        $acyToolbar->custom('test', JText::_('SEND_TEST'), 'send', false);
        $acyToolbar->custom('apply', JText::_('ACY_APPLY'), 'apply', false);
        $acyToolbar->setTitle(JText::_('ACY_EDIT'));
        $acyToolbar->topfixed = false;
        $acyToolbar->display();
        $editor = acymailing_get('helper.editor');
        $editor->setTemplate($mail->tempid);
        $editor->name = 'editor_body';
        $editor->content = $mail->body;
        $js = "function updateAcyEditor(htmlvalue){";
        $js .= 'if(htmlvalue == \'0\'){window.document.getElementById("htmlfieldset").style.display = \'none\'}else{window.document.getElementById("htmlfieldset").style.display = \'block\'}';
        $js .= '}';
        $script = '
		var attachmentNb = 1;
		function addFileLoader(){
			if(attachmentNb > 9) return;
			window.document.getElementById("attachmentsdiv"+attachmentNb).style.display = "";
			attachmentNb++;
		}';
        if (!ACYMAILING_J16) {
            $script .= 'function submitbutton(pressbutton){
						if (pressbutton == \'cancel\') {
							submitform( pressbutton );
							return;
						}';
        } else {
            $script .= 'Joomla.submitbutton = function(pressbutton) {
						if (pressbutton == \'cancel\') {
							Joomla.submitform(pressbutton,document.adminForm);
							return;
						}';
        }
        $script .= 'if(window.document.getElementById("subject").value.length < 2){alert(\'' . JText::_('ENTER_SUBJECT', true) . '\'); return false;}';
        $script .= $editor->jsCode();
        if (!ACYMAILING_J16) {
            $script .= 'submitform( pressbutton );} ';
        } else {
            $script .= 'Joomla.submitform(pressbutton,document.adminForm);}; ';
        }
        $script .= "function insertTag(tag){\n\t\ttry{\n\t\t\tif(window.parent.tinymce){ parentTinymce = window.parent.tinymce; window.parent.tinymce = false; }\n\t\t\tjInsertEditorText(tag,'editor_body');\n\t\t\tif(typeof parentTinymce !== 'undefined'){ window.parent.tinymce = parentTinymce; }\n\t\t\tdocument.getElementById('iframetag').style.display = 'none';\n\t\t\tdisplayTags();\n\t\t\treturn true;\n\t\t}catch(err){alert('Your editor does not enable AcyMailing to automatically insert the tag, please copy/paste it manually in your Newsletter'); return false;}}";
        $typeMail = 'news';
        if (strpos($mail->alias, 'notification') !== false) {
            $typeMail = 'notification';
        }
        $iFrame = "'<iframe src=\\'index.php?option=com_acymailing&ctrl=tag&task=tag&type=" . $typeMail . "&tmpl=component\\' width=\\'100%\\' height=\\'100%\\' scrolling=\\'auto\\'></iframe>'";
        $script .= "var openTag = true;\n\t\t\t\t\tfunction displayTags(){var box=\$('iframetag'); if(openTag){box.innerHTML = " . $iFrame . "; box.setStyle('display','block');}\n\t\t\t\t\ttry{\n\t\t\t\t\t\tvar fx = box.effects({duration: 1500, transition: Fx.Transitions.Quart.easeOut});\n\t\t\t\t\t\tif(openTag){fx.start({'height': 300});}else{fx.start({'height': 0}).chain(function() {box.innerHTML = '';box.setStyle('display','none');})};\n\t\t\t\t\t}catch(err){\n\t\t\t\t\t\tbox.style.height = '300px';\n\t\t\t\t\t\tvar myVerticalSlide = new Fx.Slide('iframetag');\n\t\t\t\t\t\tif(openTag){\n\t\t\t\t\t\t\tmyVerticalSlide.slideIn();\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tmyVerticalSlide.slideOut().chain(function() {\n\t\t\t\t\t\t\t\tbox.innerHTML='';\n\t\t\t\t\t\t\t\tbox.setStyle('display','none');\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\topenTag = !openTag;}";
        $iFrame = "'<iframe src=\\'index.php?option=com_acymailing&ctrl=template&task=theme&tmpl=component\\' width=\\'100%\\' height=\\'100%\\' scrolling=\\'auto\\'></iframe>'";
        $script .= "var openTemplate = true;\n\t\t\t\t\tfunction displayTemplates(){var box=\$('iframetemplate'); if(openTemplate){box.innerHTML = " . $iFrame . "; box.setStyle('display','block');}\n\t\t\t\t\ttry{\n\t\t\t\t\t\tvar fx = box.effects({duration: 1500, transition: Fx.Transitions.Quart.easeOut});\n\t\t\t\t\t\tif(openTemplate){fx.start({'height': 300});}else{fx.start({'height': 0}).chain(function() {box.innerHTML = '';box.setStyle('display','none');})};\n\t\t\t\t\t}catch(err){\n\t\t\t\t\t\tbox.style.height = '300px';\n\t\t\t\t\t\tvar myVerticalSlide = new Fx.Slide('iframetemplate');\n\t\t\t\t\t\tif(openTemplate){\n\t\t\t\t\t\t\tmyVerticalSlide.slideIn();\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tmyVerticalSlide.slideOut().chain(function() {\n\t\t\t\t\t\t\t\tbox.innerHTML='';\n\t\t\t\t\t\t\t\tbox.setStyle('display','none');\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\topenTemplate = !openTemplate;}";
        $script .= "function changeTemplate(newhtml,newtext,newsubject,stylesheet,fromname,fromemail,replyname,replyemail,tempid){\n\t\t\tif(newhtml.length>2){" . $editor->setContent('newhtml') . "}\n\t\t\tvar vartextarea =\$('altbody'); if(newtext.length>2) vartextarea.innerHTML = newtext;\n\t\t\tdocument.getElementById('tempid').value = tempid;\n\t\t\tif(fromname.length>1){document.getElementById('fromname').value = fromname;}\n\t\t\tif(fromemail.length>1){document.getElementById('fromemail').value = fromemail;}\n\t\t\tif(replyname.length>1){document.getElementById('replyname').value = replyname;}\n\t\t\tif(replyemail.length>1){document.getElementById('replyemail').value = replyemail;}\n\t\t\tif(newsubject.length>1){document.getElementById('subject').value = newsubject;}\n\t\t\t" . $editor->setEditorStylesheet('tempid') . "\n\t\t\tdocument.getElementById('iframetemplate').style.display = 'none'; displayTemplates();\n\t\t}\n\t\t";
        $doc = JFactory::getDocument();
        $doc->addScriptDeclaration($js . $script);
        $this->assignRef('toggleClass', $toggleClass);
        $this->assignRef('editor', $editor);
        $this->assignRef('values', $values);
        $this->assignRef('mail', $mail);
        $tabs = acymailing_get('helper.acytabs');
        $tabs->setOptions(array('useCookie' => true));
        $this->assignRef('tabs', $tabs);
        $this->assign('app', $app);
    }
开发者ID:madcsaba,项目名称:li-de,代码行数:96,代码来源:view.html.php

示例6: form

    function form()
    {
        acymailing_loadMootools();
        $mailid = acymailing_getCID('mailid');
        if (empty($mailid)) {
            $mailid = JRequest::getString('mailid');
        }
        $mailClass = acymailing_get('class.mail');
        $mail = $mailClass->get($mailid);
        if (empty($mail)) {
            $config =& acymailing_config();
            $mail->created = time();
            $mail->fromname = $config->get('from_name');
            $mail->fromemail = $config->get('from_email');
            $mail->replyname = $config->get('reply_name');
            $mail->replyemail = $config->get('reply_email');
            $mail->subject = '';
            $mail->type = JRequest::getString('type');
            $mail->published = 1;
            $mail->visible = 0;
            $mail->html = 1;
            $mail->body = '';
            $mail->altbody = '';
            $mail->tempid = 0;
        }
        $values = new stdClass();
        $values->maxupload = acymailing_bytes(ini_get('upload_max_filesize')) > acymailing_bytes(ini_get('post_max_size')) ? ini_get('post_max_size') : ini_get('upload_max_filesize');
        $toggleClass = acymailing_get('helper.toggle');
        $editor = acymailing_get('helper.editor');
        $editor->name = 'editor_body';
        $editor->content = $mail->body;
        $js = "function updateAcyEditor(htmlvalue){";
        $js .= 'if(htmlvalue == \'0\'){window.document.getElementById("htmlfieldset").style.display = \'none\'}else{window.document.getElementById("htmlfieldset").style.display = \'block\'}';
        $js .= '}';
        $js .= 'window.addEvent(\'load\', function(){ updateAcyEditor(' . $mail->html . '); });';
        $script = 'function addFileLoader(){
		var divfile=window.document.getElementById("loadfile");
		var input = document.createElement(\'input\');
		input.type = \'file\';
		input.size = \'30\';
		input.name = \'attachments[]\';
		divfile.appendChild(document.createElement(\'br\'));
		divfile.appendChild(input);}
		';
        if (!ACYMAILING_J16) {
            $script .= 'function submitbutton(pressbutton){
						if (pressbutton == \'cancel\') {
							submitform( pressbutton );
							return;
						}';
        } else {
            $script .= 'Joomla.submitbutton = function(pressbutton) {
						if (pressbutton == \'cancel\') {
							Joomla.submitform(pressbutton,document.adminForm);
							return;
						}';
        }
        $script .= 'if(window.document.getElementById("subject").value.length < 2){alert(\'' . JText::_('ENTER_SUBJECT', true) . '\'); return false;}';
        $script .= $editor->jsCode();
        if (!ACYMAILING_J16) {
            $script .= 'submitform( pressbutton );} ';
        } else {
            $script .= 'Joomla.submitform(pressbutton,document.adminForm);}; ';
        }
        $script .= "function insertTag(tag){ try{jInsertEditorText(tag,'editor_body'); document.getElementById('iframetag').style.display = 'none'; displayTags(); return true;} catch(err){alert('Your editor does not enable AcyMailing to automatically insert the tag, please copy/paste it manually in your Newsletter'); return false;}}";
        $iFrame = "'<iframe src=\\'index.php?option=com_acymailing&ctrl=tag&task=tag&type=news&tmpl=component\\' width=\\'100%\\' height=\\'100%\\' scrolling=\\'auto\\'></iframe>'";
        $script .= "var openTag = true;\r\n\t\t\t\t\tfunction displayTags(){var box=\$('iframetag'); if(openTag){box.innerHTML = " . $iFrame . "; box.setStyle('display','block');}\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tvar fx = box.effects({duration: 1500, transition: Fx.Transitions.Quart.easeOut});\r\n\t\t\t\t\t\tif(openTag){fx.start({'height': 300});}else{fx.start({'height': 0}).chain(function() {box.innerHTML = '';box.setStyle('display','none');})};\r\n\t\t\t\t\t}catch(err){\r\n\t\t\t\t\t\tbox.style.height = '300px';\r\n\t\t\t\t\t\tvar myVerticalSlide = new Fx.Slide('iframetag');\r\n\t\t\t\t\t\tif(openTag){\r\n\t\t\t\t\t\t\tmyVerticalSlide.slideIn();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tmyVerticalSlide.slideOut().chain(function() {\r\n\t\t\t\t\t\t\t\tbox.innerHTML='';\r\n\t\t\t\t\t\t\t\tbox.setStyle('display','none');\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\topenTag = !openTag;}";
        $iFrame = "'<iframe src=\\'index.php?option=com_acymailing&ctrl=template&task=theme&tmpl=component\\' width=\\'100%\\' height=\\'100%\\' scrolling=\\'auto\\'></iframe>'";
        $script .= "var openTemplate = true;\r\n\t\t\t\t\tfunction displayTemplates(){var box=\$('iframetemplate'); if(openTemplate){box.innerHTML = " . $iFrame . "; box.setStyle('display','block');}\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tvar fx = box.effects({duration: 1500, transition: Fx.Transitions.Quart.easeOut});\r\n\t\t\t\t\t\tif(openTemplate){fx.start({'height': 300});}else{fx.start({'height': 0}).chain(function() {box.innerHTML = '';box.setStyle('display','none');})};\r\n\t\t\t\t\t}catch(err){\r\n\t\t\t\t\t\tbox.style.height = '300px';\r\n\t\t\t\t\t\tvar myVerticalSlide = new Fx.Slide('iframetemplate');\r\n\t\t\t\t\t\tif(openTemplate){\r\n\t\t\t\t\t\t\tmyVerticalSlide.slideIn();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tmyVerticalSlide.slideOut().chain(function() {\r\n\t\t\t\t\t\t\t\tbox.innerHTML='';\r\n\t\t\t\t\t\t\t\tbox.setStyle('display','none');\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\topenTemplate = !openTemplate;}";
        $script .= "function changeTemplate(newhtml,newtext,newsubject,stylesheet,fromname,fromemail,replyname,replyemail,tempid){\r\n\t\t\tif(newhtml.length>2){" . $editor->setContent('newhtml') . "}\r\n\t\t\tvar vartextarea =\$('altbody'); if(newtext.length>2) vartextarea.innerHTML = newtext;\r\n\t\t\tdocument.getElementById('tempid').value = tempid;\r\n\t\t\tif(fromname.length>1){document.getElementById('fromname').value = fromname;}\r\n\t\t\tif(fromemail.length>1){document.getElementById('fromemail').value = fromemail;}\r\n\t\t\tif(replyname.length>1){document.getElementById('replyname').value = replyname;}\r\n\t\t\tif(replyemail.length>1){document.getElementById('replyemail').value = replyemail;}\r\n\t\t\tif(newsubject.length>1){document.getElementById('subject').value = newsubject;}\r\n\t\t\tdocument.getElementById('iframetemplate').style.display = 'none'; displayTemplates();\r\n\t\t}\r\n\t\t";
        $doc = JFactory::getDocument();
        $doc->addScriptDeclaration($js . $script);
        $this->assignRef('toggleClass', $toggleClass);
        $this->assignRef('editor', $editor);
        $this->assignRef('values', $values);
        $this->assignRef('mail', $mail);
        $tabs = acymailing_get('helper.acytabs');
        $tabs->setOptions(array('useCookie' => true));
        $this->assignRef('tabs', $tabs);
    }
开发者ID:alesconti,项目名称:FF_2015,代码行数:80,代码来源:view.html.php

示例7: explode

$nameCaption = $params->get('nametext', JText::_('NAMECAPTION'));
$emailCaption = $params->get('emailtext', JText::_('EMAILCAPTION'));
$displayOutside = $params->get('displayfields', 0);
$displayInline = $params->get('displaymode', 'vertical') == 'vertical' ? false : true;
$displayedFields = $params->get('customfields', 'name,email');
$fieldsToDisplay = explode(',', $displayedFields);
$extraFields = array();
$fieldsize = $params->get('fieldsize');
if (is_numeric($fieldsize)) {
    $fieldsize .= 'px';
}
if (!in_array('email', $fieldsToDisplay)) {
    $fieldsToDisplay[] = 'email';
}
if ($params->get('effect') == 'mootools-slide' || $params->get('redirectmode', 0) == '3') {
    acymailing_loadMootools();
}
if ($params->get('effect') == 'mootools-slide') {
    $mootoolsButton = $params->get('mootoolsbutton', '');
    if (empty($mootoolsButton)) {
        $mootoolsButton = JText::_('SUBSCRIBE');
    }
    $js = "<!--\r\n\t\t\twindow.addEvent('domready', function(){\r\n\t\t\t\tvar mySlide = new Fx.Slide('acymailing_fulldiv_{$formName}');\r\n\t\t\t\tmySlide.hide();\r\n\t\t\t\ttry{\r\n\t\t\t\t\tvar acytogglemodule = document.id('acymailing_togglemodule_{$formName}');\r\n\t\t\t\t}catch(err){\r\n\t\t\t\t\tvar acytogglemodule = \$('acymailing_togglemodule_{$formName}');\r\n\t\t\t\t}\r\n\r\n\t\t\t\tacytogglemodule.addEvent('click', function(e){\r\n\t\t\t\t\tif(mySlide.wrapper.offsetHeight == 0){\r\n\t\t\t\t\t\tacytogglemodule.className = 'acymailing_togglemodule acyactive';\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tacytogglemodule.className = 'acymailing_togglemodule';\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmySlide.toggle();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tvar evt = new Event(e);\r\n\t\t\t\t\t\tevt.stop();\r\n\t\t\t\t\t} catch(err) {\r\n\t\t\t\t\t\te.stop();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\t//-->";
    if ($params->get('includejs', 'header') == 'header') {
        $doc->addScriptDeclaration($js);
    } else {
        echo "<script type=\"text/javascript\">\r\n\t\t\t\t{$js}\r\n\t\t\t\t</script>";
    }
}
if ($params->get('overlay', 0)) {
    JHTML::_('behavior.tooltip');
开发者ID:alesconti,项目名称:FF_2015,代码行数:31,代码来源:mod_acymailing.php

示例8: printnewsletter

 function printnewsletter()
 {
     $mailid = acymailing_getCID('mailid');
     $mailerHelper = acymailing_get('helper.mailer');
     $mail = $mailerHelper->load($mailid);
     $user = JFactory::getUser();
     $userClass = acymailing_get('class.subscriber');
     $receiver = $userClass->get($user->email);
     JPluginHelper::importPlugin('acymailing');
     $dispatcher = JDispatcher::getInstance();
     $mail->sendHTML = true;
     $dispatcher->trigger('acymailing_replaceusertags', array(&$mail, &$receiver, false));
     echo $mail->body;
     acymailing_loadMootools();
     $js = "window.addEvent('domready', function() {setTimeout(function(){window.print()},1000);window.focus();});";
     $doc = JFactory::getDocument();
     $doc->addScriptDeclaration("\n<!--\n" . $js . "\n//-->\n");
 }
开发者ID:alesconti,项目名称:FF_2015,代码行数:18,代码来源:newsletter.php


注:本文中的acymailing_loadMootools函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。