51
rickh
Re:[Registerform] make 'allow others to view e-mail' default YES
  • 2004/10/22 21:59

  • rickh

  • Just popping in

  • Posts: 94

  • Since: 2004/4/9 6


well, I just found a sollution 5 minutes ago I changed:

$email_option = new XoopsFormCheckBox("", "user_viewemail", $user_viewemail);

to:

$email_option = new XoopsFormCheckBox("", "user_viewemail", 1);

and it works!! Sometimes things are so simple Maybe will your sollution also work, but i've not tried it yet. Going to try it now



52
rickh
Re:[Registerform] make 'allow others to view e-mail' default YES
  • 2004/10/22 21:34

  • rickh

  • Just popping in

  • Posts: 94

  • Since: 2004/4/9 6


and another *kick*

I've tried a lot of thing, but i think my knowledge of php is insufficient to solve it myself When I open /include/registerform.php there are a few lines:

$email_tray = new XoopsFormElementTray(_US_EMAIL"<br />");
$email_text = new XoopsFormText("""email"2560$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);


But I dont know what to edit. Just commenting some thing out and adding a XoopsFormHidden with user_viewemail and the right value results in a blank page.
Somewhere I have to place 'checked', but where....



53
rickh
delete timezone from registrationform, but default GMT+1
  • 2004/10/22 11:35

  • rickh

  • Just popping in

  • Posts: 94

  • Since: 2004/4/9 6


I want to delete the timezone pulldown menu from the registrationform. I know you can simply do this by commenting it out from /include/registerform.php. But when I do that the timezone of newly registred users automatically goes to GMT and I want it at the default GMT +1 (as set up in XOOPS setting).

How can I do this?



54
rickh
Re:[pass protected registration] adding password field
  • 2004/10/21 23:05

  • rickh

  • Just popping in

  • Posts: 94

  • Since: 2004/4/9 6


Thanks!! That worked I've placed it after case 'newuser' and include header.php.



55
rickh
Re:[pass protected registration] adding password field
  • 2004/10/21 22:32

  • rickh

  • Just popping in

  • Posts: 94

  • Since: 2004/4/9 6


well, i've deleted $code already from function Usercheck. Or is it necesarry to add it to that function?

And the code doesn't have to be stored in the database. It's just to check right code (12345). Extremely simple. It's just a temporary sollution.



56
rickh
Re:[pass protected registration] adding password field
  • 2004/10/21 22:03

  • rickh

  • Just popping in

  • Posts: 94

  • Since: 2004/4/9 6


Quote:

tklee wrote:
There are two solutions (one hack, one module) already out there -- maybe you wanna use them instead of developing a new one.

One is called Registraion Codes (a module + some hack); the other is called Registration Keys (a core hack well integrated into the admin). I wrote a quick (and subjective) comparison between them.

Here's the whole thread.

thanks for the links Didn't know there was already such a module. But when I use the registration codes module, the registerform remains blank

Quote:
Are you adding the $code parameter to the call of userCheck()?

well... i'm just trial and error-ing.. Maybe u can tell me what's the right way to do this? It seems that the $code parameter wont be send to register.php, because when i do "echo $code" it returns nothing.



57
rickh
[pass protected registration] adding password field
  • 2004/10/21 20:12

  • rickh

  • Just popping in

  • Posts: 94

  • Since: 2004/4/9 6


Hello, I want the registration process making password protected. Only people who know the password can complete the registration.

First i've added an extra field in /include/registerform.php:

$reg_form->addElement(new XoopsFormText(Code"code"2625), true);


And then i've added a line in register.php (after 'function userCheck')

if ($code != 12345) { die("wrong code");  }


I've also added the variable '$code' in the function userCheck. So it look like this:

function userCheck($uname$email$pass$vpass$code)
{
    
    
//added by me
    
if ($code != 12345) { die("wrong code");  }
    
//added by me

    
global $xoopsConfigUser;
    
$xoopsDB =& Database::getInstance();
    
$myts =& MyTextSanitizer::getInstance();


But it wont work Anyone got an idea??



58
rickh
Re:[articles module] sort by date
  • 2004/10/21 15:22

  • rickh

  • Just popping in

  • Posts: 94

  • Since: 2004/4/9 6


I also want the date posted be shown in the articles index. Anyone knows how to do this? It's more complicated then my first problem I guess.....



59
rickh
Re:[articles module] sort by date
  • 2004/10/21 14:57

  • rickh

  • Just popping in

  • Posts: 94

  • Since: 2004/4/9 6


i've already found it In index.php at the end of the page (don't know linenumber exactly) just replace the SQL query 'ORDER BY art_weight' with 'ORDER BY art_posted_datetime'.



60
rickh
[articles module] sort by date
  • 2004/10/21 14:22

  • rickh

  • Just popping in

  • Posts: 94

  • Since: 2004/4/9 6


I'm using the 'articles' modules, which I think is the best articles module for my purposes . The only thing I want to be changed is that articles are showed by date posted.

Anyone knows how to do this?




TopTop
« 1 ... 3 4 5 (6) 7 8 9 »



Login

Who's Online

220 user(s) are online (150 user(s) are browsing Support Forums)


Members: 0


Guests: 220


more...

Donat-O-Meter

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

Latest GitHub Commits