弹出登录Joomla Rockettheme

时间:2013-07-19 12:05:52

标签: php joomla

我知道这不是一个正确的问题,但我不知道去哪里,火箭论坛不会接受客人:| 我已经按照教程了解如何添加弹出登录,一切正常,除非我单击登录按钮,然后没有任何反应,它只在URL上显示“#”,login.php包含以下语法代码:href = “#” 我可能错过了一些东西,但我不知道是什么?

code login.php

    <?php
defined('JPATH_BASE') or die();
gantry_import('core.gantryfeature');
class GantryFeatureLogin extends GantryFeature {
    var $_feature_name = 'login';
    function render($position="") {
        ob_start();
        $user =& JFactory::getUser();
        ?>
        <div class="rt-block">
            <div class="rt-popupmodule-button">
            <?php if ($user->guest) : ?>
                <a href="#" class="buttontext button" rel="rokbox[355 385][module=rt-popuplogin]">
                    <span class="desc"><?php echo $this->get('text'); ?></span>
                </a>
            <?php else : ?>
                <a href="#" class="buttontext button" rel="rokbox[355 385][module=rt-popuplogin]">
                    <span class="desc"><?php echo $this->get('logouttext'); ?> <?php echo JText::sprintf($user->get('username')); ?></span>
                </a>
            <?php endif; ?>
            </div>
        </div>
        <?php
        return ob_get_clean();
    }
}

<?php

文档:http://gantry-framework.org/documentation/joomla/tutorials/creating_popup_login.md

2 个答案:

答案 0 :(得分:1)

您需要先安装Rockettheme Rokbox插件。

http://www.rockettheme.com/extensions-downloads/free/1005-rokbox

如果已安装,请确保已发布。

答案 1 :(得分:1)

我知道这是一个老问题,但问题仍然存在,因为许多RocketTheme模板都包含一个带有旧语法的登录按钮。这里的代码与上面相同,但链接的新RokBox 2语法(<a href="#" class="readon buttontext" rel="rokbox[385 160][module=rt-popuplogin]">

RokBox兼容性设置可能会让您的网站受到性能影响。

<?php
defined('JPATH_BASE') or die();
gantry_import('core.gantryfeature');
class GantryFeatureLogin extends GantryFeature {
    var $_feature_name = 'login';
    function render($position="") {
        ob_start();
        $user =& JFactory::getUser();
        ?>
        <div class="rt-block">
            <div class="rt-popupmodule-button">
            <?php if ($user->guest) : ?>
                <a href="#" class="buttontext button" data-rokbox data-rokbox-element="#rt-popuplogin" data-rokbox-size="385 160">
                    <span class="desc"><?php echo $this->get('text'); ?></span>
                </a>
            <?php else : ?>
                <a href="#" class="buttontext button" data-rokbox data-rokbox-element="#rt-popuplogin" data-rokbox-size="385 160">
                    <span class="desc"><?php echo $this->get('logouttext'); ?> <?php echo JText::sprintf($user->get('username')); ?></span>
                </a>
            <?php endif; ?>
            </div>
        </div>
        <?php
        return ob_get_clean();
    }
}