本文整理汇总了PHP中JModuleHelper::getLayoutPath方法的典型用法代码示例。如果您正苦于以下问题:PHP JModuleHelper::getLayoutPath方法的具体用法?PHP JModuleHelper::getLayoutPath怎么用?PHP JModuleHelper::getLayoutPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JModuleHelper
的用法示例。
在下文中一共展示了JModuleHelper::getLayoutPath方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
public function display() {
static $cssadded = false;
require_once (KUNENA_PATH_LIB . DS . 'kunena.link.class.php');
require_once (KUNENA_PATH_LIB . DS . 'kunena.image.class.php');
require_once (KUNENA_PATH_LIB . DS . 'kunena.timeformat.class.php');
require_once (KUNENA_PATH_FUNCS . DS . 'latestx.php');
require_once (JPATH_ADMINISTRATOR . '/components/com_kunena/libraries/html/parser.php');
$this->kunena_config = KunenaFactory::getConfig ();
$this->myprofile = KunenaFactory::getUser ();
// load Kunena main language file so we can leverage langaueg strings from it
KunenaFactory::loadLanguage();
// Initialize session
$session = KunenaFactory::getSession ();
$session->updateAllowedForums();
$this->latestdo = null;
if ($this->params->get ( 'choosemodel' ) != 'latest') {
$this->latestdo = $this->params->get ( 'choosemodel' );
}
$this->ktemplate = KunenaFactory::getTemplate();
$this->klistpost = modKunenaLatestHelper::getKunenaLatestList ( $this->params );
$this->topic_ordering = modKunenaLatestHelper::getTopicsOrdering($this->myprofile, $this->kunena_config);
require (JModuleHelper::getLayoutPath ( 'mod_kunenalatest' ));
}
示例2: render
function render()
{
// create instances of basic Joomla! classes
$document = JFactory::getDocument();
if (in_array('plus.google.com', $headData_keys)) {
$link_founded = true;
}
if ($this->config['cookie_conset'] == 0) {
$type = '<script type="text/javascript">';
} else {
$type = '<script type="text/plain" class="cc-onconsent-social">';
}
if ($this->config['gplus_badge_style'] == 'standard_badge') {
// async script mode
$content = $type . 'window.___gcfg = {lang: \'' . $this->config['gplus_lang_code'] . '\'};
(function() {
var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;
po.src = \'https://apis.google.com/js/platform.js\';
var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);
})();</script>';
}
// if gplus script file doesn't exists in document head section
if ($this->config['gplus_user'] != '' && $this->config['gplus_badge_style'] == 'standard_badge') {
echo $content;
}
// select proper layout to load
if ($this->config['gplus_badge_style'] == 'standard_badge') {
require JModuleHelper::getLayoutPath('mod_social_gk5', 'gplusBadge');
} else {
require JModuleHelper::getLayoutPath('mod_social_gk5', 'gplusIcon');
}
}
示例3: renderItem
function renderItem(&$item, &$params, &$access)
{
global $mainframe;
$user =& JFactory::getUser();
$item->text = $item->introtext;
$item->groups = '';
$item->readmore = trim($item->fulltext) != '';
$item->metadesc = '';
$item->metakey = '';
$item->created = '';
$item->modified = '';
if ($params->get('readmore') || $params->get('link_titles')) {
if ($params->get('intro_only')) {
// Check to see if the user has access to view the full article
if ($item->access <= $user->get('aid', 0)) {
$itemparams = new JParameter($item->attribs);
$readmoretxt = $itemparams->get('readmore', JText::_('Read more text'));
$item->linkOn = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug, $item->sectionid));
$item->linkText = $readmoretxt;
} else {
$item->linkOn = JRoute::_('index.php?option=com_user&view=login');
$item->linkText = JText::_('Login To Read More');
}
}
}
if (!$params->get('image')) {
$item->text = preg_replace('/<img[^>]*>/', '', $item->text);
}
$results = $mainframe->triggerEvent('onAfterDisplayTitle', array(&$item, &$params, 1));
$item->afterDisplayTitle = trim(implode("\n", $results));
$results = $mainframe->triggerEvent('onBeforeDisplayContent', array(&$item, &$params, 1));
$item->beforeDisplayContent = trim(implode("\n", $results));
require JModuleHelper::getLayoutPath('mod_newsflash', '_item');
}
示例4: button
public static function button($button)
{
ob_start();
require JModuleHelper::getLayoutPath('mod_imageshow_quickicon', 'default_button');
$html = ob_get_clean();
return $html;
}
示例5: get_image
function get_image($num)
{
// used variables
$url = false;
$output = '';
// select the proper image function
if ($this->mode == 'com_content') {
// load necessary com_content View class
if (!class_exists('NSP_GK5_com_content_View')) {
require_once JModuleHelper::getLayoutPath('mod_news_pro_gk5', 'com_content/view');
}
// generate the com_content image URL only
$url = NSP_GK5_com_content_View::image($this->parent->config, $this->parent->content[$num], true, true);
} else {
if ($this->mode == 'com_k2') {
// load necessary k2 View class
if (!class_exists('NSP_GK5_com_k2_View')) {
require_once JModuleHelper::getLayoutPath('mod_news_pro_gk5', 'com_k2/view');
}
// generate the K2 image URL only
$url = NSP_GK5_com_k2_View::image($this->parent->config, $this->parent->content[$num], true, true);
}
}
// check if the URL exists
if ($url === FALSE) {
return false;
} else {
// if URL isn't blank - return it!
if ($url != '') {
return $url;
} else {
return false;
}
}
}
示例6: doExecute
/**
* Entry point for CLI script
*
* @return void
*
* @since 3.0
*/
public function doExecute()
{
$response = new stdClass();
$response->needsOtp = 'false';
$response->form = "";
// Session check
if (JSession::checkToken('POST')) {
$db = JFactory::getDbo();
// Check if TFA is enabled. If not, just return false
$query = $db->getQuery(true)->select('COUNT(*)')->from('#__extensions')->where('enabled=' . $db->q(1))->where('folder=' . $db->q('twofactorauth'));
$db->setQuery($query);
$tfaCount = $db->loadResult();
if ($tfaCount > 0) {
$username = JRequest::getVar('u', '', 'POST', 'username');
$query = $db->getQuery(true)->select('id, password, otpKey')->from('#__users')->where('username=' . $db->q($username));
$db->setQuery($query);
$result = $db->loadObject();
if ($result && $result->otpKey != '') {
//jimport('sourcecoast.utilities');
//SCStringUtilities::loadLanguage('mod_sclogin');
JFactory::getLanguage()->load('mod_sclogin');
//$password = JRequest::getString('p', '', 'POST', JREQUEST_ALLOWRAW);
//if (JUserHelper::verifyPassword($password, $result->password, $result->id))
//{
$response->needsOtp = 'true';
ob_start();
require JModuleHelper::getLayoutPath('mod_sclogin', 'otp');
$response->form = ob_get_clean();
//}
}
}
}
echo json_encode($response);
exit;
}
示例7: __construct
public function __construct($params)
{
static $cssadded = false;
require_once KUNENA_PATH_LIB . DS . 'kunena.link.class.php';
require_once KUNENA_PATH_LIB . DS . 'kunena.image.class.php';
require_once KUNENA_PATH_LIB . DS . 'kunena.timeformat.class.php';
require_once KUNENA_PATH_FUNCS . DS . 'latestx.php';
require_once JPATH_ADMINISTRATOR . '/components/com_kunena/libraries/html/parser.php';
$this->kunena_config = KunenaFactory::getConfig();
$this->myprofile = KunenaFactory::getUser();
// load Kunena main language file so we can leverage langaueg strings from it
KunenaFactory::loadLanguage();
// Initialize session
$session = KunenaFactory::getSession();
$session->updateAllowedForums();
$this->document = JFactory::getDocument();
$kloadcss = $params->get('kunena_load_css');
if ($cssadded == false && $kloadcss) {
$this->document->addStyleSheet(JURI::root() . 'modules/mod_kunenalatest/tmpl/css/kunenalatest.css');
$cssadded = true;
}
$this->latestdo = null;
if ($params->get('choosemodel') != 'latest') {
$this->latestdo = $params->get('choosemodel');
}
$this->params = $params;
$this->ktemplate = KunenaFactory::getTemplate();
$this->klistpost = modKunenaLatestHelper::getKunenaLatestList($params);
$this->topic_ordering = modKunenaLatestHelper::getTopicsOrdering($this->myprofile, $this->kunena_config);
require JModuleHelper::getLayoutPath('mod_kunenalatest');
}
示例8: renderItem
function renderItem(&$item, &$params, &$access)
{
global $mainframe;
$user =& JFactory::getUser();
$item->text = $item->introtext;
$item->groups = '';
$item->readmore = trim($item->fulltext) != '';
$item->metadesc = '';
$item->metakey = '';
$item->access = '';
$item->created = '';
$item->modified = '';
if ($params->get('readmore') || $params->get('link_titles')) {
if ($params->get('intro_only')) {
// Check to see if the user has access to view the full article
if ($item->access <= $user->get('aid', 0)) {
$linkOn = ContentHelperRoute::getArticleRoute($item->slug, $item->catslug);
} else {
$linkOn = JRoute::_('index.php?option=com_user&task=register');
}
}
$item->linkOn = $linkOn;
}
$results = $mainframe->triggerEvent('onAfterDisplayTitle', array(&$item, &$params, 1));
$item->afterDisplayTitle = trim(implode("\n", $results));
$results = $mainframe->triggerEvent('onBeforeDisplayContent', array(&$item, &$params, 1));
$item->beforeDisplayContent = trim(implode("\n", $results));
require JModuleHelper::getLayoutPath('mod_yoo_drawer', '_item');
}
示例9: display
function display()
{
$this->stats = $this->getStats();
require JModuleHelper::getLayoutPath('mod_kunenastats');
$this->document = JFactory::getDocument();
$this->document->addStyleSheet(JURI::root() . 'modules/mod_kunenastats/tmpl/css/kunenastats.css');
}
示例10: sendMail
/**
* Send email whith user data from form
*
* @param array $params An object containing the module parameters
*
* @access public
*/
public static function sendMail($params)
{
$sender = $params->get('sender');
$recipient = $params->get('recipient');
$subject = $params->get('subject');
// Getting the site name
$sitename = JFactory::getApplication()->get('sitename');
// Getting user form data-------------------------------------------------
$name = JFilterInput::getInstance()->clean(JRequest::getVar('name'));
$phone = JFilterInput::getInstance()->clean(JRequest::getVar('phone'));
$email = JFilterInput::getInstance()->clean(JRequest::getVar('email'));
$message = JFilterInput::getInstance()->clean(JRequest::getVar('message'));
// Set the massage body vars
$nameLabel = JText::_('MOD_JCALLBACK_FORM_NAME_LABEL_VALUE');
$phoneLabel = JText::_('MOD_JCALLBACK_FORM_PHONE_LABEL_VALUE');
$emailLabel = JText::_('MOD_JCALLBACK_FORM_EMAIL_LABEL_VALUE');
$messageLabel = JText::_('MOD_JCALLBACK_FORM_MESSAGE_LABEL_VALUE');
$emailLabel = $email ? "<b>{$emailLabel}:</b> {$email}" : "";
$messageLabel = $message ? "<b>{$messageLabel}:</b> {$message}" : "";
// Get the JMail ogject
$mailer = JFactory::getMailer();
// Set JMail object params------------------------------------------------
$mailer->setSubject($subject);
$params->get('useSiteMailfrom') ? $mailer->setSender(JFactory::getConfig()->get('mailfrom')) : $mailer->setSender($sender);
$mailer->addRecipient($recipient);
// Get the mail message body
require JModuleHelper::getLayoutPath('mod_jcallback', 'default_email_message');
$mailer->isHTML(true);
$mailer->Encoding = 'base64';
$mailer->setBody($body);
$mailer->Send();
// The mail sending errors will be shown in the Joomla Warning Message from JMail object..
}
示例11: _display
protected function _display()
{
$this->type = $this->params->get('type', 'general');
$this->items = (int) $this->params->get('items', 5);
$this->stats_link = $this->_getStatsLink(JText::_('MOD_KUNENASTATS_LINK'), JText::_('MOD_KUNENASTATS_LINK'));
$this->stats = $this->getStats();
require JModuleHelper::getLayoutPath('mod_kunenastats');
}
示例12: submitAction
public function submitAction()
{
$recipientEmail = $this->params->get('email', '');
$post = JRequest::get('post');
$post["username"] = $post["name"];
$subject = $post["src_title"];
$body = $this->renderpart(JModuleHelper::getLayoutPath(self::$moduleName, 'email'), $post, true);
JUTility::sendMail($post["email"], $post["name"], $recipientEmail, $subject, $body, true);
print "ok";
jexit();
}
示例13: renderEmphasis
function renderEmphasis(&$review)
{
$Pro_Item = modEmphasisNewsHelper::GetItemId($review);
$link = JRoute::_("index.php?option=com_u_re&controller=projects&Itemid=" . $Pro_Item . "&task=view&id=" . $review->id);
if (file_exists('images/project/' . $review->id . '/preview.jpg')) {
$review->image = "images/project/" . $review->id . "/preview.jpg";
} else {
$review->image = "images/noimage.jpg";
}
require JModuleHelper::getLayoutPath('mod_jea_newsfp', '_emphasis');
}
示例14: _display
protected function _display()
{
$this->ksearch_button = $this->params->get('ksearch_button', '');
$this->ksearch_button_pos = $this->params->get('ksearch_button_pos', 'right');
$this->ksearch_button_txt = $this->params->get('ksearch_button_txt', JText::_('Search'));
$this->ksearch_width = intval($this->params->get('ksearch_width', 20));
$this->ksearch_maxlength = $this->ksearch_width > 20 ? $this->ksearch_width : 20;
$this->ksearch_txt = $this->params->get('ksearch_txt', JText::_('Search...'));
$this->ksearch_moduleclass_sfx = $this->params->get('moduleclass_sfx', '');
$this->url = KunenaRoute::_('index.php?option=com_kunena');
require JModuleHelper::getLayoutPath('mod_kunenasearch');
}
示例15: display
function display()
{
$this->list = KunenaMenuHelper::getList($this->parameters);
$this->app = JFactory::getApplication();
$this->menu = $this->app->getMenu();
$this->active = $this->menu->getActive();
$this->active_id = isset($this->active) ? $this->active->id : $this->menu->getDefault()->id;
$this->path = isset($this->active) ? $this->active->tree : array();
$this->showAll = $this->parameters->get('showAllChildren');
$this->class_sfx = htmlspecialchars($this->parameters->get('class_sfx'));
if (count($this->list)) {
require JModuleHelper::getLayoutPath('mod_kunenamenu', $this->parameters->get('layout', 'default'));
}
}