minihaku is a module for XOOPS 2.0.x
In this document, you'll learn how to customize the designing of "registering user" and "editing user".
- install minihaku
- add a line into mainfile.php (refer README)
- You can redesign/remove form elements by editing minihaku_edituser.html or minihaku_register.html
If you want to remove elements of "email" or "password confirmation", create include/config.php like this.
<?php
$auto_belong_groups = array( XOOPS_GROUP_USERS ) ; // default (2)
$allow_blank_email = true ;
$allow_blank_vpass = true ;
?>
GIJOE wrotes:<br />が間に挟まるのが嫌で、あえてこの順番にした、という手抜きな経緯があったりします'stop_reasons' => array_merge( $stop_reason_extras , $stop_reasons ) ,
'stop_reasons' => array_merge( $stop_reason_extras , $stop_reasons ) ,
if( ! empty( $_POST['do_register'] )){
if($_POST['familyname']==''){
$stop_reason_extras[] = "姓は入力必須項目です。<br />";
}
}
if( ! empty( $_POST['do_register'] ) && empty( $stop_reason_extras ) && ! ( $stop_reason = userCheck( $allowed_requests['uname'] , $email4check , $allowed_requests['pass'] , $allowed_requests['vpass'] ) ) ) {
if( ! empty( $_POST['do_register'] ))$stop_reason = userCheck( $allowed_requests['uname'] , $email4check , $allowed_requests['pass'] , $allowed_requests['vpass'] );
if( ! empty( $_POST['do_register'] ) && empty( $stop_reason_extras ) && empty( $stop_reason ) ) {
'stop_reasons' => array_merge( $stop_reason_extras , $stop_reasons ) ,
'stop_reasons' => array_merge( $stop_reasons , $stop_reason_extras ) ,
<ul>
<{foreach from=$stop_reasons item="reason"}>
<li><strong style='color:#ff0000; font-weight:bold;'><{$reason}></strong></li>
<{/foreach}>
</ul>
jidaikobo wrotes:
die するんだったら config.php で完結するのかなーと思うんですが、せっかくなので、XOOPS の表示にあわせられないかなといじってみたんですが、
<span style='color:#ff0000; font-weight:bold;'>
<{foreach from=$stop_reasons item="reason"}>
<{$reason}><br />
<{/foreach}>
</span>
jidaikobo wrotes:
僕のコメント投稿の BB code 表示も直してくださったんですね。ありがとうございました。あれ? とおもったんですが、放置してしまいました
ちなみに文例なので、修正の必要があるかどうか分らないんですが、ミニ白扇の使い方 (4)でも、false 表記になっています。いちおうお伝えまで。
すり抜け方そのものは結構泥臭いですよ〜
// request maintenances
$stop_reason_extra_fields = '';
if( ! empty( $_POST['do_register'] )){
if($_POST['code_a']==''){
$stop_reason_extra_fields .= "コードAは入力必須項目です。<br />";
}
if($_POST['code_b']==''){
$stop_reason_extra_fields .= "コードBは入力必須項目です。<br />";
}
}
if( ! empty( $_POST['do_register'] ) && ! ( $stop_reason = userCheck( $allowed_requests['uname'] , $email4check , $allowed_requests['pass'] , $allowed_requests['vpass'] ) ) && $stop_reason_extra_fields=='' ) {
include XOOPS_ROOT_PATH.'/header.php' ;
+ $stop_reason .= $stop_reason_extra_fields;
$xoopsOption['template_main'] = 'minihaku_register.html' ;
+ if (!$stop_reason_extra_fields == ''){
+ $errors[] = $stop_reason_extra_fields;
+ }
if (count($errors) > 0) {