Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • soaresa Friend
    #134758

    Hi There,
    I have a language module for portuguese in J1.5, but some parts of your modules don’t get translated, i.e: JA-NEWS the word MORE, JA-HIGHSLIDE the words MOVE and CLOSE. Can somebody tell me why? Do I have to translate it manually? If yes, where?

    Another question: how do I prevent people to register to my site, I just want to have them to logon, but not to register by themselves.

    Thanks.

    questbg Friend
    #276937

    Hi There

    <em>@soaresa 87842 wrote:</em><blockquote>
    Another question: how do I prevent people to register to my site, I just want to have them to logon, but not to register by themselves.
    </blockquote>

    Hi There

    I can certainly help you with this one. The easiest way is to just remove the ‘Register’ option and leave ‘Log In’.

    For this, you will need to edit this file:

    /templates/ja_telline_ii/html/mod_login/default.php

    Comment out, or delete, everything from line 68 to line 173:

    <li>
    <a href="<?php echo JRoute::_("index.php?option=com_user&task=register");?>" onclick="return hs.htmlExpand(this, {contentId: 'id_highslide_signup_1',outlineType:'rounded-white',width:330,height:360,outlineWhileAnimating:true} )" >
    <?php echo JText::_('REGISTER');?>
    </a>
    <!--LOFIN FORM content-->
    <script type="text/javascript" src="<?php echo JURI::base();?>media/system/js/validate.js"></script>
    <div class="highslide-html-content" id="id_highslide_signup_1">
    <div class="highslide-header">
    <ul>
    <li class="highslide-move">
    <a href="#" onclick="return false">Move</a>
    </li>
    <li class="highslide-close">
    <a href="#" onclick="return hs.close(this)">Close</a>
    </li>
    </ul>
    </div>
    <div class="highslide-body">
    <script type="text/javascript">
    <!--
    window.addEvent('load',function(){
    document.formvalidator.setHandler('passverify', function (value) { return ($('password').value == value); } );
    });
    // -->
    </script>

    <?php
    if(isset($this->message)){
    $this->display('message');
    }
    ?>

    <form action="<?php echo JRoute::_( 'index.php?option=com_user' ); ?>" method="post" id="josForm" name="josForm" class="form-validate">

    <div class="componentheading">
    <?php echo JText::_( 'Registration' ); ?>
    </div>

    <table cellpadding="0" cellspacing="0" border="0" width="100%" class="contentpane">
    <tr>
    <td width="30%" height="40">
    <label id="namemsg" for="name">
    <?php echo JText::_( 'Name' ); ?>:
    </label>
    </td>
    <td>
    <input type="text" name="name" id="name" size="40" value="" class="inputbox required" maxlength="50" /> *
    </td>
    </tr>
    <tr>
    <td height="40">
    <label id="usernamemsg" for="username">
    <?php echo JText::_( 'Username' ); ?>:
    </label>
    </td>
    <td>
    <input type="text" id="username" name="username" size="40" value="" class="inputbox required validate-username" maxlength="25" /> *
    </td>
    </tr>
    <tr>
    <td height="40">
    <label id="emailmsg" for="email">
    <?php echo JText::_( 'Email' ); ?>:
    </label>
    </td>
    <td>
    <input type="text" id="email" name="email" size="40" value="" class="inputbox required validate-email" maxlength="100" /> *
    </td>
    </tr>
    <tr>
    <td height="40">
    <label id="pwmsg" for="password">
    <?php echo JText::_( 'Password' ); ?>:
    </label>
    </td>
    <td>
    <input class="inputbox required validate-password" type="password" id="password" name="password" size="40" value="" /> *
    </td>
    </tr>
    <tr>
    <td height="40">
    <label id="pw2msg" for="password2">
    <?php echo JText::_( 'Verify Password' ); ?>:
    </label>
    </td>
    <td>
    <input class="inputbox required validate-passverify" type="password" id="password2" name="password2" size="40" value="" /> *
    </td>
    </tr>
    <tr>
    <td colspan="2" height="40">
    <?php echo JText::_( 'REGISTER_REQUIRED' ); ?>
    </td>
    </tr>
    </table>
    <button class="button validate" type="submit"><?php echo JText::_('Register'); ?></button>
    <input type="hidden" name="task" value="register_save" />
    <input type="hidden" name="id" value="0" />
    <input type="hidden" name="gid" value="0" />
    <?php echo JHTML::_( 'form.token' ); ?>
    </form>

    </div>
    </div>
    </li>
    <!--LOFIN FORM content-->

    Don’t forget to take a backup of the php file before modifying any code!

    As for the translation, I know this has been answered before somewhere in the Telline II forum, but I can’t seem to find it.

    If I find it, I’ll post back here.

    Good Luck
    Chris

    soaresa Friend
    #277040

    Hi Chris, thanks for your answer, but I deleted what you’ve told me to do so and here’s what I get: <blockquote>Parse error: parse error, unexpected T_ENDIF in /home/content/a/p/o/apostolado/html/ab/templates/ja_teline_ii/html/mod_login/default.php on line 1</blockquote>

    Below is how my file default.php looks like after the purge.

    <?php // no direct access

    defined(‘_JEXEC’) or die(‘Restricted access’); ?>

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

    <?php if ($params->get(‘greeting’)) : ?>

    <li><?php echo JText::sprintf( ‘HINAME’, $user->get(‘name’) ); ?>

    <?php endif; ?>

    <a href=”<?php echo JRoute::_(“index.php?option=com_user&task=logout&return=”.base64_encode(‘index.php’));?>” ><?php echo JText::_( ‘BUTTON_LOGOUT’); ?></a></li>

    <?php else : ?>

    <li>

    <a href=”<?php echo JRoute::_(“index.php?option=com_user&task=login&”.JUtility::getToken().”=1″);?>” onclick=”return hs.htmlExpand(this, { contentId:’id_highslide_login’, outlineType : ’rounded-white’, outlineWhileAnimating : true, width : 325} )” class=”highslide”>

    <?php echo JText::_(‘LOGIN’);?>

    </a>

    <!–LOFIN FORM content–>

    <div class=”highslide-html-content” id=”id_highslide_login”>

    <div class=”highslide-header”>

    <ul>

    <li class=”highslide-move”>

    <a href=”#” onclick=”return false”>Move</a>

    </li>

    <li class=”highslide-close”>

    <a href=”#” onclick=”return hs.close(this)”>Close</a>

    </li>

    </ul>

    </div>

    <div class=”highslide-body”>

    <div id=”ja-login”>

    <?php if(JPluginHelper::isEnabled(‘authentication’, ‘openid’)) : ?>

    <?php JHTML::_(‘script’, ‘openid.js’); ?>

    <?php endif; ?>

    <form action=”<?php echo JRoute::_( ‘index.php’, true, $params->get(‘usesecure’)); ?>” method=”post” name=”login” id=”login” >

    <?php echo $params->get(‘pretext’); ?>

    <label for=”mod_login_username” class=”ja-login-user”>

    <span><?php echo JText::_(‘Username’) ?></span>

    <input name=”username” id=”mod_login_username” type=”text” class=”inputbox” alt=”username” size=”10″ />

    </label>

    <label for=”mod_login_password” class=”ja-login-password”>

    <span><?php echo JText::_(‘Password’) ?></span>

    <input type=”password” id=”mod_login_password” name=”passwd” class=”inputbox” size=”10″ alt=”password” />

    </label>

    <label for=”mod_login_remember”>

    <input type=”hidden” name=”remember” id=”mod_login_remember” class=”inputbox” value=”yes” alt=”Remember Me” />

    </label>

    <input type=”submit” name=”Submit” class=”button” value=”<?php echo JText::_(‘BUTTON_LOGIN’) ?>” />

    <div class=”ja-login-links”>

    <a href=”<?php echo JRoute::_( ‘index.php?option=com_user&view=reset’ ); ?>”>

    <?php echo JText::_(‘FORGOT_YOUR_PASSWORD’); ?></a>

    <a href=”<?php echo JRoute::_( ‘index.php?option=com_user&view=remind’ ); ?>”>

    <?php echo JText::_(‘FORGOT_YOUR_USERNAME’); ?></a>

    </div>

    <?php echo $params->get(‘posttext’); ?>

    <input type=”hidden” name=”option” value=”com_user” />

    <input type=”hidden” name=”task” value=”login” />

    <input type=”hidden” name=”return” value=”<?php echo $return; ?>” />

    <?php echo JHTML::_( ‘form.token’ ); ?>

    </form>

    </div>

    </div>

    </div>

    </li>

    <?php

    $option = JRequest::getCmd(‘option’);

    $task = JRequest::getCmd(‘task’);

    if($option!=’com_user’ && $task != ‘register’) { ?>

    <?php endif; ?>

    questbg Friend
    #277042

    Hi. Very strange.

    I will attach my modified PHP file which removed ‘Register’ and leaves only ‘Log In’.

    Please try and let me know the results!

    Thanks
    Chris


    1. default.php_.zip
    soaresa Friend
    #277044

    Great, did work fine.
    Thanks for your help.

    Please let me know when you find something about the translation, ok?

    Thanks, again.:D

    questbg Friend
    #277052

    Glad it worked!!

    Some information on translation of ‘Read More’ here:
    http://www.joomlart.com/forums/topic/read-more-buttonlink/

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

This topic contains 6 replies, has 2 voices, and was last updated by  questbg 16 years, 1 month ago.

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