11
script_fu
Re: Is there a User Registration Template somewhere?

Thank you again for that awesome info for the avatars!

Um I must be blind on the disclaimer part. I dont see anything in the code that lets you adjust the box...



include_once XOOPS_ROOT_PATH."/class/xoopslists.php";
include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";

// initialize form vars
$uname = isset($HTTP_POST_VARS['uname']) ? $myts->makeTboxData4PreviewInForm($HTTP_POST_VARS['uname']) : "";
$email = isset($HTTP_POST_VARS['email']) ? $myts->makeTboxData4PreviewInForm($HTTP_POST_VARS['email']) : "";
$user_viewemail = isset($HTTP_POST_VARS['user_viewemail']) ? $HTTP_POST_VARS['user_viewemail'] : "";
$url = isset($HTTP_POST_VARS['url']) ? $myts->makeTboxData4PreviewInForm($HTTP_POST_VARS['url']) : "";
$timezone_offset = isset($HTTP_POST_VARS['timezone_offset']) ? $HTTP_POST_VARS['timezone_offset'] : "";
//$user_avatar = isset($HTTP_POST_VARS['user_avatar']) ? $HTTP_POST_VARS['user_avatar'] : "blank.gif";

$email_tray = new XoopsFormElementTray(_US_EMAIL, "<br />");
$email_text = new XoopsFormText("", "email", 25, 60, $email);
$email_option = new XoopsFormCheckBox("", "user_viewemail", $user_viewemail);
$email_option->addOption(1, _US_ALLOWVIEWEMAIL);
$email_tray->addElement($email_text);
$email_tray->addElement($email_option);

//$avatar_select = new XoopsFormSelect("", "user_avatar", $user_avatar);
//$avatar_array =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/");
//$avatar_select->addOptionArray($avatar_array);
//$a_dirlist =& XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH."/images/avatar/");
//$a_dir_labels = array();
//$a_count = 0;
//$a_dir_link = "<a href=\"javascript:openWithSelfMain('".XOOPS_URL."/misc.php?action=showpopups&type=avatars&start=".$a_count."','avatars',600,400);\">XOOPS</a>";
//$a_count = $a_count + count($avatar_array);
//$a_dir_labels[] = new XoopsFormLabel("", $a_dir_link);
//foreach ($a_dirlist as $a_dir) {
// if ( $a_dir == "users" ) {
// continue;
// }
// $avatars_array =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/".$a_dir."/", $a_dir."/");
// $avatar_select->addOptionArray($avatars_array);
// $a_dir_link = "<a href=\"javascript:openWithSelfMain('".XOOPS_URL."/misc.php?action=showpopups&type=avatars&subdir=".$a_dir."&start=".$a_count."','avatars',600,400);\">".$a_dir."</a>";
// $a_dir_labels[] = new XoopsFormLabel("", $a_dir_link);
// $a_count = $a_count + count($avatars_array);
//}
//$avatar_select->setExtra("onchange='showImgSelected(\"avatar\", \"user_avatar\", \"images/avatar\", \"\", \"".XOOPS_URL."\")'");
//$avatar_label = new XoopsFormLabel("", "<img src='images/avatar/blank.gif' name='avatar' id='avatar' alt='' />");
//$avatar_tray = new XoopsFormElementTray(_US_AVATAR, "&nbsp;");
//$avatar_tray->addElement($avatar_select);
//$avatar_tray->addElement($avatar_label);
//foreach ($a_dir_labels as $a_dir_label) {
// $avatar_tray->addElement($a_dir_label);
//}

$reg_form = new XoopsThemeForm(_US_USERREG, "userinfo", "register.php");
$reg_form->addElement(new XoopsFormText(_US_NICKNAME, "uname", 26, 25, $uname), true);
$reg_form->addElement($email_tray);
$reg_form->addElement(new XoopsFormText(_US_WEBSITE, "url", 25, 255, $url));
$tzselected = ($timezone_offset != "") ? $timezone_offset : $xoopsConfig['default_TZ'];
//$reg_form->addElement(new XoopsFormSelectTimezone(_US_TIMEZONE, "timezone_offset", $tzselected));
//$reg_form->addElement($avatar_tray);
$reg_form->addElement(new XoopsFormPassword(_US_PASSWORD, "pass", 10, 20), true);
$reg_form->addElement(new XoopsFormPassword(_US_VERIFYPASS, "vpass", 10, 20), true);
$reg_form->addElement(new XoopsFormRadioYN(_US_MAILOK, 'user_mailok', 1));

__________________________________________________

if ($xoopsConfigUser['reg_dispdsclmr'] != 0 && $xoopsConfigUser['reg_disclaimer'] != '') {
$disc_tray = new XoopsFormElementTray(_US_DISCLAIMER, '<br />');
$disc_text = new XoopsFormTextarea('', 'disclaimer', $xoopsConfigUser['reg_disclaimer'], 8);
$disc_text->setExtra('readonly="readonly"');
$disc_tray->addElement($disc_text);
___________________________________________________

$agree_chk = new XoopsFormCheckBox('', 'agree_disc', 0);
$agree_chk->addOption(1, _US_IAGREE);
$disc_tray->addElement($agree_chk);
$reg_form->addElement($disc_tray);
}
$reg_form->addElement(new XoopsFormHidden("op", "newuser"));
$reg_form->addElement(new XoopsFormButton("", "submit", _US_SUBMIT, "submit"));
$reg_form->setRequired($email_text);
?>

I dont see anyplace to adjust the width?

Thanks again for your time

12
script_fu
Re: Is there a User Registration Template somewhere?

I stiil haven't been able to solve this problem... Ive tryied all day long to figure this out...
Anyone?

13
chapi
Re: Is there a User Registration Template somewhere?
  • 2003/12/7 13:54

  • chapi

  • Theme Designer

  • Posts: 611

  • Since: 2002/1/22


This line is the important part for the textbox!

Quote:

$disc_text = new XoopsFormTextarea('', 'disclaimer', $xoopsConfigUser['reg_disclaimer'], 8);


The "8" is for the rows. You can add a new parameter which will control the columns. Standard is "50" as defined in class/xoopsform/formtextarea.php

After adding the cols, this line has to look similar to this.

Quote:

$disc_text = new XoopsFormTextarea('', 'disclaimer', $xoopsConfigUser['reg_disclaimer'], 8, 150);

14
script_fu
Re: Is there a User Registration Template somewhere?

Thank you chapi and all who posted to solve some of my problems. Great information people that can now be found in a search!

Login

Who's Online

191 user(s) are online (109 user(s) are browsing Support Forums)


Members: 0


Guests: 191


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits