Login and K2

May 2014 Joomla Template
GK User
Sat Jan 03, 2015 10:02 am
Hi! :)
I really need your help with login and registration forms.
1. ) I do not want to give visitors the opportunity to register on my website. All I need - to give the ability to post K2 material on the site to those users whom I myself will build in the backend joomla.
2. ) I would like users to be able to publish material in k2. Is it possible?
3. ) And one more question :) about safety . There is a need to install a CAPTCHA form login? :dry:
User avatar
Senior Boarder

teitbite
Sat Jan 03, 2015 10:20 am
Hi

3. Recaptcha is already build in joomla, You just need to enable it in plugins and configure.
2. This can be done by adding a new menu option "Create K2 item" to menu visible only to registered.
1. I think all You need to do is to remove "create an account" from /html/mod_login/default.php
User avatar
Moderator

GK User
Sat Jan 03, 2015 11:55 am
Thanks for the quick reply :)
It seems everything is clear ...
Happy New Year :)
User avatar
Senior Boarder

GK User
Sat Jan 03, 2015 1:30 pm
1. I think all You need to do is to remove "create an account" from /html/mod_login/default.php[/quote]

:dry: i can not find any "create an account" in default.php...
default.php:
Code: Select all
<?php

   // no direct access
   defined('_JEXEC') or die;
   
   JHtml::_('behavior.keepalive');

?>
<?php if ($type == 'logout') : ?>

<form action="index.php" method="post" id="login-form">
      <div class="logout-button">
            <?php if ($params->get('greeting')) : ?>
            <div class="login-greeting">
                  <?php if($params->get('name') == 0) : {
               echo JText::sprintf('MOD_LOGIN_HINAME', $user->get('name'));
            } else : {
               echo JText::sprintf('MOD_LOGIN_HINAME', $user->get('username'));
            } endif; ?>
            </div>
            <?php endif; ?>
            <input type="submit" name="Submit" class="button" value="<?php echo JText::_('JLOGOUT'); ?>" />
      </div>
      <input type="hidden" name="option" value="com_users" />
      <input type="hidden" name="task" value="user.logout" />
      <input type="hidden" name="return" value="<?php echo $return; ?>" />
      <?php echo JHtml::_('form.token'); ?>
</form>
<?php else : ?>
<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" id="login-form" >
      <fieldset class="userdata">
            <p id="form-login-username">
                  <label for="modlgn-username"><?php echo JText::_('MOD_LOGIN_VALUE_USERNAME') ?></label>
                  <input id="modlgn-username" type="text" name="username" class="inputbox"  size="24" />
            </p>
            <p id="form-login-password">
                  <label for="modlgn-passwd"><?php echo JText::_('JGLOBAL_PASSWORD') ?></label>
                  <input id="modlgn-passwd" type="password" name="password" class="inputbox" size="24"  />
            </p>
            <?php if (JPluginHelper::isEnabled('system', 'remember')) : ?>
            <div id="form-login-remember">
                  <input id="modlgn-remember" type="checkbox" name="remember" class="inputbox" value="yes"/>
                  <label for="modlgn-remember"><?php echo JText::_('MOD_LOGIN_REMEMBER_ME') ?></label>
            </div>
            <?php endif; ?>
            <div id="form-login-buttons">
                  <input type="submit" name="Submit" class="button" value="<?php echo JText::_('JLOGIN') ?>" />
            </div>
            <input type="hidden" name="option" value="com_users" />
            <input type="hidden" name="task" value="user.login" />
            <input type="hidden" name="return" value="<?php echo $return; ?>" />
            <?php echo JHtml::_('form.token'); ?>
            <gavern:fblogin> <span id="fb-auth"><small>fb icon</small><?php echo JText::_('TPL_GK_LANG_FB_LOGIN_TEXT'); ?></span> </gavern:fblogin>
      </fieldset>
      <ul>
            <li> <a href="<?php echo JRoute::_('index.php?option=com_users&view=reset'); ?>"> <?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_PASSWORD'); ?></a> </li>
            <li> <a href="<?php echo JRoute::_('index.php?option=com_users&view=remind'); ?>"> <?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_USERNAME'); ?></a> </li>
      </ul>
      <div class="posttext"> <?php echo $params->get('posttext'); ?> </div>
</form>
<?php endif; ?>


Please help, I'm really confused with the "Log In form ..."
You can look for FTP? :roll:
User avatar
Senior Boarder

teitbite
Sun Jan 04, 2015 12:16 pm
Hi

Sorry it's in /layout/block/tools/login.php

Code: Select all
                                        <?php if($userID == 0) : ?>
                                        <a class="button" href="<?php echo $this->API->URLbase(); ?>index.php?option=com_users&amp;view=registration"><?php echo JText::_('TPL_GK_LANG_REGISTER_POPUP'); ?></a>
                                        <?php endif; ?>
User avatar
Moderator

GK User
Sun Jan 04, 2015 12:53 pm
Thank you, problem solved)
User avatar
Senior Boarder


cron