test
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • djsaders Friend
    #206080

    How do i get the Google Authentication field to display on the site offline page, as i cannot login to test the site if i enable this?

    Saguaros Moderator
    #569444

    Hi @djsaders,

    This is a new feature Joomla added from version 3.2, I will report to the team to update this in offline page.

    In the meantime, you can try with this tweak:
    – Go to file: ROOT/templates/ja_playmag/offline.php
    – After this block:


    <div id="form-login-password" class="form-group" >
    <label class="control-label" for="passwd"><?php echo JText::_('JGLOBAL_PASSWORD') ?></label>
    <input class="control-input" type="password" name="password" class="inputbox" size="18" alt="<?php echo JText::_('JGLOBAL_PASSWORD') ?>" id="passwd"/>
    </div>

    Add this new block:


    <?php if (count($twofactormethods) > 1) : ?>
    <div id="form-secretkey" class="form-group" >
    <label class="control-label" for="secretkey"><?php echo JText::_('JGLOBAL_SECRETKEY') ?></label>
    <input class="control-input" type="text" name="secretkey" size="18" alt="<?php echo JText::_('JGLOBAL_SECRETKEY') ?>" id="secretkey" />
    </div>
    <?php endif; ?>

    – Back to the beginning of this file, add 2 more code lines as below:


    defined('_JEXEC') or die;
    $app = JFactory::getApplication();
    require_once JPATH_ADMINISTRATOR . '/components/com_users/helpers/users.php';
    $twofactormethods = UsersHelper::getTwoFactorMethods();
    ?>

    Hope this helps!

    Saguaros Moderator
    #734533

    Hi @djsaders,

    This is a new feature Joomla added from version 3.2, I will report to the team to update this in offline page.

    In the meantime, you can try with this tweak:
    – Go to file: ROOT/templates/ja_playmag/offline.php
    – After this block:


    <div id="form-login-password" class="form-group" >
    <label class="control-label" for="passwd"><?php echo JText::_('JGLOBAL_PASSWORD') ?></label>
    <input class="control-input" type="password" name="password" class="inputbox" size="18" alt="<?php echo JText::_('JGLOBAL_PASSWORD') ?>" id="passwd"/>
    </div>

    Add this new block:


    <?php if (count($twofactormethods) > 1) : ?>
    <div id="form-secretkey" class="form-group" >
    <label class="control-label" for="secretkey"><?php echo JText::_('JGLOBAL_SECRETKEY') ?></label>
    <input class="control-input" type="text" name="secretkey" size="18" alt="<?php echo JText::_('JGLOBAL_SECRETKEY') ?>" id="secretkey" />
    </div>
    <?php endif; ?>

    – Back to the beginning of this file, add 2 more code lines as below:


    defined('_JEXEC') or die;
    $app = JFactory::getApplication();
    require_once JPATH_ADMINISTRATOR . '/components/com_users/helpers/users.php';
    $twofactormethods = UsersHelper::getTwoFactorMethods();
    ?>

    Hope this helps!

    djsaders Friend
    #569560

    Also need to modify offline.css

    find:
    #frame {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #222;
    box-shadow: 0 0 5px #000;
    margin: 150px auto;
    padding: 40px 30px 20px;
    position: relative;
    width: 585px;
    }

    and change to:
    #frame {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #222;
    box-shadow: 0 0 5px #000;
    margin: 150px auto;
    padding: 40px 30px 50px;
    position: relative;
    width: 585px;
    }

    All this is doing is increasing the bottom padding on the box from 20px to 50px

    djsaders Friend
    #734649

    Also need to modify offline.css

    find:
    #frame {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #222;
    box-shadow: 0 0 5px #000;
    margin: 150px auto;
    padding: 40px 30px 20px;
    position: relative;
    width: 585px;
    }

    and change to:
    #frame {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #222;
    box-shadow: 0 0 5px #000;
    margin: 150px auto;
    padding: 40px 30px 50px;
    position: relative;
    width: 585px;
    }

    All this is doing is increasing the bottom padding on the box from 20px to 50px

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 2 voices, and was last updated by  djsaders 9 years, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum