Попросили изменить дизайн AlphaRegistration, попробовала тупо перенести все в новый шаблон. Вышло следующее... Код (PHP): // no direct access defined('_JEXEC') or die('Restricted access'); if ($this->arg_params->get( 'displaytermslink')) { $url = 'index.php?option=com_content'; $url .= '&view=article&id='.$this->arg_params->get( 'idpageterms').'&tmpl=component'; $status = 'width=540,height=460,menubar=yes,scrollbars=yes,resizable=yes'; $text = JText::_('ARG_READ_TERMS_OF_USE'); $attribsr['title'] = JText::_( 'ARG_READ_TERMS_OF_USE' ); $attribsr['onclick'] = "window.open(this.href,'win2','".$status."'); return false;"; $linktoterms = JHTML::_('link', JRoute::_($url), $text, $attribsr); } else $linktoterms = ""; if ( $this->post=='' ) $this->post=array(); if ( @$this->post['referraluser']=='' && $this->referreid!='' ) @$this->post['referraluser']=$this->referreid; ?> <script type="text/javascript"> function checktermsbox() { if (document.josFormARG.terms.checked == true ) { document.josFormARG.submitter.disabled = false; } else { document.josFormARG.submitter.disabled = true; } } </script> <?php include_once (JPATH_COMPONENT.DS.'assets'.DS.'modules'.DS.'headermodule1.php'); if ( $this->arg_params->get( 'displayheaderstep', 1 ) ) { ?> <table cellpadding="0" cellspacing="0" border="0" width="100%" class="contentpane<?php echo $this->arg_params->get( 'pageclass_sfx' ); ?>"> <tr> <td> <?php $folderstep1 = 'components/com_alpharegistration/assets/images'; $filenamestep1 = 'stepbystep1.png'; // import if file exists $fileroute1 =(JPATH_COMPONENT.DS.'assets'.DS.'images'.DS.''.$this->lang.''.DS.''.$filenamestep1.''); if (file_exists($fileroute1)) { echo JHTML::image(JRoute::_("$folderstep1/".$this->lang."/$filenamestep1"), JText::_( 'ARG_GET_INVOLVED' ) ); } else { echo JHTML::image(JRoute::_("$folderstep1/en-gb/$filenamestep1"), JText::_( 'ARG_GET_INVOLVED' ) ); if ( $this->arg_params->get( 'enabledMessagesLang' ) ) { echo "<dl id=\"system-message\"><dt class=\"error\"></dt><dd class=\"error message fade\"><ul><li><strong>ERROR:</strong><br/>The Specific Language Image $fileroute1 does not exist.<br/>Now we use the English Picture as Standard<br />Info: active Language: ".$this->lang."<br />Please make a own picture in a Sub Folder in com_alpharegistration/assets/images called ".$this->lang." and name the file: $filenamestep1</li></ul></dd></dl>"; } } ?> </td> </tr> </table> <?php } ?> <?php if(isset($this->message)){ $this->display('message'); } ?> <form action="<?php echo JRoute::_( 'index.php' );?>" method="post" id="josFormARG" name="josFormARG" > <?php if ( $this->arg_params->get( 'show_page_title', 1 ) ) { ?> <div class="componentheading<?php echo $this->arg_params->get( 'pageclass_sfx' ); ?>"> <?php if ( $this->params->get('page_title') ) { echo $this->escape($this->params->get('page_title')); } else echo JText::_( 'ARG_REGISTRATION' ); ?> </div> <?php } ?> <table class="contentpane" cellspacing="20px" > <tr valign="baseline"> <td bgcolor="#BAEC98"> <?php $buttondisabled = ""; if ( $this->arg_params->get( 'displaytermsofuse', 1 ) ) { if ( !$this->arg_params->get( 'displaytermslink', 0 ) || !$this->arg_params->get( 'idpageterms') ) { ?> <div class="notes_box"> <label for="termsofuse"> <div class="bold_box"><?php echo JText::_( 'ARG_AGREE_TO_TERMS_ATTENTION' ); ?></div> <div><?php echo JText::_( 'ARG_TERMS_OF_USE_TEXT' ); ?></div> </label> <?php } else { ?> <?php echo $linktoterms ; ?> <?php } ?> <label class="terms" for="terms"><input class="terms" type="checkbox" name="terms" value="terms" onclick="checktermsbox();"/> <?php echo JText::_( 'ARG_AGREE_TO_TERMS' ); ?> </label> </div> </td> </tr> </table> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="50%"> <fieldset> <legend class="text_green"><strong><?php echo JText::_( 'Username' ); ?>:</strong></legend> <table width="100%" cellpadding="4" cellspacing="0"> <tr> <td><?php echo JText::_( 'Username_trans' ); ?> <span style='color:#555'>(<a href='#' style='cursor:help;color:#555' title="<?php echo JText::_( 'HELP_REG' ); ?>">?</a>)</span></td> </tr> <tr> <td><input type="text" id="username" name="username" size="50" value="<?php if ( @$this->post['username'] ) echo @$this->post['username'] ; ?>" maxlength="32" autocomplete="off" onpaste="alert('<?php echo JText::_( 'ARG_SORRY_THIS_FUNCTIONALITY_IS_DISABLED' ); ?>');return false;"/> <span id="statusUSR"></span></td> </tr> </table> </fieldset> <br /> <fieldset> <legend class="text_green"><strong><?php echo JText::_( 'Password' ); ?>:</strong></legend> <table width='100%' cellpadding='4' cellspacing='0'> <tr> <td width="300px" nowrap='nowrap' class='text'><?php echo JText::_( 'Verify_Password_1' ); ?> <span style='color:#555'>(<a href='#' style='cursor:help;color:#555' title="<?php echo JText::_( 'HELP_REG' ); ?>">?</a>)</span></td> <td class='text'><?php echo JText::_( 'Verify_Password_2' ); ?> <span style='color:#555'>(<a href='#' style='cursor:help;color:#555' title="<?php echo JText::_( 'HELP_REG' ); ?>">?</a>)</span></td> </tr> <tr> <td width="300px"><input type="password" id="password" name="password" size="25" maxlength="32" value="<?php if ( @$this->post['password'] ) echo @$this->post['password'] ; ?>" /> <span id="statusPASSWORD"></span> </td> <td><input type="password" id="password2" name="password2" size="25" maxlength="32" value="<?php if ( @$this->post['password2'] ) echo @$this->post['password2'] ; ?>" autocomplete="off" onpaste="alert('<?php echo JText::_( 'ARG_SORRY_THIS_FUNCTIONALITY_IS_DISABLED' ); ?>');return false;"/> <span id="statusPASSWORD2"></span> </td> </tr> </table> </fieldset> <br /> <fieldset> <legend class="text_green"><strong><?php echo JText::_( 'Email' ); ?>:</strong></legend> <table width='100%' cellpadding='4' cellspacing='0'> <tr> <td width="300px" nowrap='nowrap' class='text'><?php echo JText::_( 'Email_1' ); ?> <span style='color:#555'>(<a href='#' style='cursor:help;color:#555' title="<?php echo JText::_( 'HELP_REG' ); ?>">?</a>)</span></td> <td class='text'><?php echo JText::_( 'Email_2' ); ?> <span style='color:#555'>(<a href='#' style='cursor:help;color:#555' title="<?php echo JText::_( 'HELP_REG' ); ?>">?</a>)</span></td> </tr> <tr> <td width="300px"><input type="text" id="email" name="email" size="25" value="<?php if ( @$this->post['email'] ) echo @$this->post['email'] ; ?>" maxlength="100" /> <span id="statusEMAIL"></span> </td> <td><input type="text" id="email2" name="email2" size="25" value="<?php if ( @$this->post['email2'] ) echo @$this->post['email2'] ; ?>" maxlength="100" autocomplete="off" onpaste="alert('<?php echo JText::_( 'ARG_SORRY_THIS_FUNCTIONALITY_IS_DISABLED' ); ?>');return false;"/> <span id="statusEMAIL2"></span></span> </td> </tr> </table> </fieldset> <br /> <fieldset> <legend class="text_green"><strong><?php echo JText::_( 'TUR_HOBBY_M' ); ?>:</strong></legend> <table width='100%' cellpadding='4' cellspacing='0'> <tr> <td width='1%' nowrap='nowrap' class='text'><?php echo JText::_( 'TUR_HOBBY' ); ?> <span style='color:#555'>(<a href='#' style='cursor:help;color:#555' title="<?php echo JText::_( 'HELP_REG' ); ?>">?</a>)</span></td> </tr> <tr> <td><TEXTAREA style="width:100%;" name="turinfo"></TEXTAREA></td> </tr> </table> </fieldset> <br/> <fieldset> <legend class="text_green"><strong><?php echo JText::_( 'Code patch' ); ?>:</strong></legend> <table width="100%" cellpadding='4' cellspacing='0'> <tr> <td width="180px" valign="top"> <?php echo JText::_( 'Not empty code' ); ?><div class="darkgreen"> <label for="captcha" class="little_green"> <?php echo JText::_( 'Enter text shown below' ); ?>: </label> </div> <input type="text" name="captcha" size="25" id="captcha" /> </td> <td><img src="<?php JURI::base() ?>libraries/kcaptcha/index.php?<?php echo session_name(); ?>=<?php echo session_id(); ?>" alt="Captcha" style="vertical-align:-25px;" class="captcha_img" /></td> </tr> </table> </fieldset> </td> </tr> </table> <table border="0" width="100%"> <?php if ( !$this->arg_params->get( 'emailAsUsername', 0 )) { ?> <?php } ?> <?php if ( $this->arg_params->get( 'forceToCheckEmail', 0 ) ) : ?> <?php endif; ?> <?php if ( $this->arg_params->get( 'displaybirthdateAUP', 0 ) ) : ?> <?php endif; ?> <?php if ( $this->arg_params->get( 'displaybirthdateAUP', 0 ) ) : ?> <?php endif; ?> <?php $buttondisabled = ' disabled="disabled"'; } if ( $this->arg_params->get( 'userecaptcha', 1 ) ) : ?> <?php endif; ?> <tr valign="baseline"> <td align="center"> <button id="submitter" type="submit" class="button<?php echo $this->arg_params->get( 'pageclass_sfx' ); ?>"<?php echo $buttondisabled; ?>> <?php echo JText::_('Register'); ?> </button> </td> </tr> </table> <input type="hidden" name="option" value="com_alpharegistration" /> <input type="hidden" name="task" value="register_save" /> <input type="hidden" name="id" value="0" /> <input type="hidden" name="gid" value="0" /> <?php if ( !$this->arg_params->get( 'forceToCheckEmail', 0 ) ) { ?> <input type="hidden" name="email2" value="" /> <?php } ?> <?php if ( $this->arg_params->get( 'emailAsUsername')) { ?> <input type="hidden" name="username" value="" /> <?php } ?> <?php echo JHTML::_( 'form.token' ); ?> </form> <?php // include now for the step1 page the footer modulespositions include_once (JPATH_COMPONENT.DS.'assets'.DS.'modules'.DS.'footermodule1.php'); ?> У меня закрадываются сомнения, что все ступорит неродная каптча. Все вроде работает, проверяется занятость имя пользователя, пароль, адрес. Но в конечном счете, когда нажимаешь регистрацию, страница перегружается и ничего не происходит. Новый пользователь в админке не появляется. В чем загвоздка?
Вот,если нужно то, стандартный шаблон Код (PHP): <?php /** * @version 2.0.12 alpharegistration $ * @package alpharegistration * @copyright Copyright © 2009-2010 - Bernard Gilly - All rights reserved. * @license GNU/GPL * @author Bernard Gilly * @author mail contact@alphaplug.com * @website www.alphaplug.com */ // no direct access defined('_JEXEC') or die('Restricted access'); if ($this->arg_params->get( 'displaytermslink')) { $url = 'index.php?option=com_content'; $url .= '&view=article&id='.$this->arg_params->get( 'idpageterms').'&tmpl=component'; $status = 'width=540,height=460,menubar=yes,scrollbars=yes,resizable=yes'; $text = JText::_('ARG_READ_TERMS_OF_USE'); $attribsr['title'] = JText::_( 'ARG_READ_TERMS_OF_USE' ); $attribsr['onclick'] = "window.open(this.href,'win2','".$status."'); return false;"; $linktoterms = JHTML::_('link', JRoute::_($url), $text, $attribsr); } else $linktoterms = ""; if ( $this->post=='' ) $this->post=array(); if ( @$this->post['referraluser']=='' && $this->referreid!='' ) @$this->post['referraluser']=$this->referreid; ?> <script type="text/javascript"> function checktermsbox() { if (document.josFormARG.terms.checked == true ) { document.josFormARG.submitter.disabled = false; } else { document.josFormARG.submitter.disabled = true; } } </script> <?php include_once (JPATH_COMPONENT.DS.'assets'.DS.'modules'.DS.'headermodule1.php'); if ( $this->arg_params->get( 'displayheaderstep', 1 ) ) { ?> <table cellpadding="0" cellspacing="0" border="0" width="100%" class="contentpane<?php echo $this->arg_params->get( 'pageclass_sfx' ); ?>"> <tr> <td> <?php $folderstep1 = 'components/com_alpharegistration/assets/images'; $filenamestep1 = 'stepbystep1.png'; // import if file exists $fileroute1 =(JPATH_COMPONENT.DS.'assets'.DS.'images'.DS.''.$this->lang.''.DS.''.$filenamestep1.''); if (file_exists($fileroute1)) { echo JHTML::image(JRoute::_("$folderstep1/".$this->lang."/$filenamestep1"), JText::_( 'ARG_GET_INVOLVED' ) ); } else { echo JHTML::image(JRoute::_("$folderstep1/en-gb/$filenamestep1"), JText::_( 'ARG_GET_INVOLVED' ) ); if ( $this->arg_params->get( 'enabledMessagesLang' ) ) { echo "<dl id=\"system-message\"><dt class=\"error\"></dt><dd class=\"error message fade\"><ul><li><strong>ERROR:</strong><br/>The Specific Language Image $fileroute1 does not exist.<br/>Now we use the English Picture as Standard<br />Info: active Language: ".$this->lang."<br />Please make a own picture in a Sub Folder in com_alpharegistration/assets/images called ".$this->lang." and name the file: $filenamestep1</li></ul></dd></dl>"; } } ?> </td> </tr> </table> <?php } ?> <?php if(isset($this->message)){ $this->display('message'); } ?> <form action="<?php echo JRoute::_( 'index.php' );?>" method="post" id="josFormARG" name="josFormARG" > <?php if ( $this->arg_params->get( 'show_page_title', 1 ) ) { ?> <div class="componentheading<?php echo $this->arg_params->get( 'pageclass_sfx' ); ?>"> <?php if ( $this->params->get('page_title') ) { echo $this->escape($this->params->get('page_title')); } else echo JText::_( 'ARG_REGISTRATION' ); ?> </div> <?php } ?> <table class="contentpane" cellpadding="4"> <tr valign="baseline"> <td colspan="2"> <?php echo JText::_( 'REGISTER_REQUIRED' ); ?> </td> </tr> </table> <fieldset class="input"> <table border="0" width="100%"> <tr valign="baseline"> <td width="180"> <label for="name"><?php echo JText::_( 'Name' ); ?>:</label> </td> <td> <input type="text" name="name" id="name" size="30" value="<?php if ( @$this->post['name'] ) echo @$this->post['name'] ; ?>" maxlength="50" class="inputbox1<?php echo $this->arg_params->get( 'pageclass_sfx' ); ?>"/> </td> <td align="center" width="20" valign="baseline"> * </td> <td align="center" width="105" valign="baseline"> <span id="statusNAME"></span> </td> </tr> <?php if ( !$this->arg_params->get( 'emailAsUsername', 0 )) { ?> <tr valign="baseline"> <td width="180"> <label for="username"><?php echo JText::_( 'Username' ); ?>: </label> </td> <td> <input type="text" id="username" name="username" size="30" value="<?php if ( @$this->post['username'] ) echo @$this->post['username'] ; ?>" maxlength="25" class="inputbox1<?php echo $this->arg_params->get( 'pageclass_sfx' ); ?>" autocomplete="off" onpaste="alert('<?php echo JText::_( 'ARG_SORRY_THIS_FUNCTIONALITY_IS_DISABLED' ); ?>');return false;"/> </td> <td align="center" width="20" valign="baseline"> * </td> <td align="center" width="105" valign="baseline"> <span id="statusUSR"></span> </td> </tr> <?php } ?> <tr valign="baseline"> <td width="180"> <label for="email"><?php echo JText::_( 'Email' ); ?>: </label> </td> <td> <input type="text" id="email" name="email" size="30" value="<?php if ( @$this->post['email'] ) echo @$this->post['email'] ; ?>" maxlength="100" class="inputbox1<?php echo $this->arg_params->get( 'pageclass_sfx' ); ?>"/> </td> <td align="center" width="20" valign="baseline"> * </td> <td align="center" width="105" valign="baseline"> <span id="statusEMAIL"></span> </td> </tr> <?php if ( $this->arg_params->get( 'forceToCheckEmail', 0 ) ) : ?> <tr valign="baseline"> <td width="180"> <label for="email2"> <?php echo JText::_( 'ARG_VERIFY_EMAIL' ); ?>: </label> </td> <td> <input type="text" id="email2" name="email2" size="30" value="<?php if ( @$this->post['email2'] ) echo @$this->post['email2'] ; ?>" maxlength="100" class="inputbox1<?php echo $this->arg_params->get( 'pageclass_sfx' ); ?>" autocomplete="off" onpaste="alert('<?php echo JText::_( 'ARG_SORRY_THIS_FUNCTIONALITY_IS_DISABLED' ); ?>');return false;"/> </td> <td align="center" width="20" valign="baseline"> * </td> <td align="center" width="105" valign="baseline"> <span id="statusEMAIL2"></span> </td> </tr> <?php endif; ?> <?php if ( $this->arg_params->get( 'displaybirthdateAUP', 0 ) ) : ?> <tr valign="baseline"> <td width="180"> <?php echo JText::_( 'ARG_BIRTHDATE' ); ?>: </td> <td> <?php echo JHTML::_('calendar', @$this->post['birthdate'], 'birthdate', 'birthdate', '%Y-%m-%d', array('size'=>'10', 'maxlength'=>'10', 'id'=>'inputbox1', 'class'=>'inputbox')); ?> <?php if ( $this->arg_params->get( 'displaybirthdateAUP' )=='2' ) echo '*'; ?> <span class="date_format"> <?php echo JText::_( 'ARG_BIRTHDATE_FORMAT' ); ?> </span> </td> <td></td> <td></td> </tr> <?php endif; ?> <?php if ( $this->arg_params->get( 'displaybirthdateAUP', 0 ) ) : ?> <tr valign="baseline"> <td width="180"> <?php echo JText::_( 'ARG_GENDER' ); ?>: </td> <td colspan="3"> <label> <input name="gender" type="radio" value="1" checked /> <?php echo JText::_( 'ARG_MALE' ); ?> </label> <label> <input type="radio" name="gender" value="2" /> <?php echo JText::_( 'ARG_FEMALE' ); ?> </label> </td> </tr> <?php endif; ?> <tr valign="baseline"> <td width="180"> <label for="password"> <?php echo JText::_( 'Password' ); ?>: </label> </td> <td> <?php if ( $this->arg_params->get('show_passwordstrength') ) { ?> <?php } ?> <input type="password" id="password" name="password" size="30" value="<?php if ( @$this->post['password'] ) echo @$this->post['password'] ; ?>" class="inputbox1<?php echo $this->arg_params->get( 'pageclass_sfx' ); ?>"/> </td> <td align="center" width="20" valign="baseline"> * </td> <td align="center" width="105" valign="baseline"> <?php if ( !$this->arg_params->get('show_passwordstrength') ) { ?> <?php } ?> <span id="statusPASSWORD"></span> </td> </tr> <tr valign="baseline"> <td width="180"> <label for="password2"> <?php echo JText::_( 'Verify_Password' ); ?>: </label> </td> <td> <input type="password" id="password2" name="password2" size="30" value="<?php if ( @$this->post['password2'] ) echo @$this->post['password2'] ; ?>" class="inputbox1<?php echo $this->arg_params->get( 'pageclass_sfx' ); ?>" autocomplete="off" onpaste="alert('<?php echo JText::_( 'ARG_SORRY_THIS_FUNCTIONALITY_IS_DISABLED' ); ?>');return false;"/> </td> <td align="center" width="20" valign="baseline"> * </td> <td align="center" width="105" valign="baseline"> <span id="statusPASSWORD2"></span> </td> </tr> <?php $buttondisabled = ""; if ( $this->arg_params->get( 'displaytermsofuse', 1 ) ) { if ( !$this->arg_params->get( 'displaytermslink', 0 ) || !$this->arg_params->get( 'idpageterms') ) { ?> <tr> <td rowspan="3" width="180" valign="top"> <label for="termsofuse"> <?php echo JText::_( 'ARG_TERMS' ); ?>: </label> </td> <td> <textarea class="inputbox1" name="termsofuse" cols="40" rows="4" readonly="readonly" > <?php echo JText::_( 'ARG_TERMS_OF_USE_TEXT' ); ?> </textarea> </td> <td> </td> <td> </td> </tr> <?php } else { ?> <tr> <td colspan="3" valign="baseline"> <?php echo $linktoterms ; ?> </td> </tr> <tr> <?php } ?> <td valign="baseline"> <input class="terms" type="checkbox" name="terms" value="terms" onclick="checktermsbox();"/> <label class="terms" for="terms"><?php echo JText::_( 'ARG_AGREE_TO_TERMS' ); ?></label> </td> <td> </td> <td> </td> </tr> <?php $buttondisabled = ' disabled="disabled"'; } if ( $this->arg_params->get( 'userecaptcha', 1 ) ) : ?> <tr valign="baseline"> <td colspan="4"> <?php if ( $this->arg_params->get( 'recaptchaajax ', 0 ) ) { echo '<div id="recaptcha_div"></div>'; } else { // prevent recaptchalib already loaded if ( !function_exists('_recaptcha_qsencode') ) { require_once (JPATH_SITE.DS.'components'.DS.'com_alpharegistration'.DS.'assets'.DS.'recaptcha'.DS.'recaptchalib.php'); } // Get a key from http://recaptcha.net/api/getkey $publickey = $this->arg_params->get( 'pubkey' ); // the response from reCAPTCHA $resp = null; // the error code from reCAPTCHA, if any $error = null; echo recaptcha_get_html($publickey, $error); } ?> </td> </tr> <?php endif; ?> <tr valign="baseline"> <td colspan="4" align="center"> <button id="submitter" type="submit" class="button<?php echo $this->arg_params->get( 'pageclass_sfx' ); ?>" style="margin-left:6px;" <?php echo $buttondisabled; ?>><?php echo JText::_('Register'); ?></button> </td> </tr> </table> </fieldset> <input type="hidden" name="option" value="com_alpharegistration" /> <input type="hidden" name="task" value="register_save" /> <input type="hidden" name="id" value="0" /> <input type="hidden" name="gid" value="0" /> <?php if ( !$this->arg_params->get( 'forceToCheckEmail', 0 ) ) { ?> <input type="hidden" name="email2" value="" /> <?php } ?> <?php if ( $this->arg_params->get( 'emailAsUsername')) { ?> <input type="hidden" name="username" value="" /> <?php } ?> <?php echo JHTML::_( 'form.token' ); ?> </form> <?php // include now for the step1 page the footer modulespositions include_once (JPATH_COMPONENT.DS.'assets'.DS.'modules'.DS.'footermodule1.php'); ?>
Та же проблема. Пишут что надо проверить наличие след. строк в index.php шаблона: <link rel="stylesheet" href="<?php echo $tmpTools->baseurl(); ?>templates/system/css/system.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $tmpTools->baseurl(); ?>templates/system/css/general.css" type="text/css" /> <jdoc:include type="message"/> все присутствует, но не пашет!