collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 377
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Welcome to SimplePortal.net! You can download SimplePortal from the Downloads Area!

Author Topic: Block for registration form  (Read 13110 times)

0 Members and 1 Guest are viewing this topic.

Offline Afro

  • Semi Newbie
  • *
  • Posts: 37
    • The African Forum
  • SMF Version: 2.0.11
  • SP Version: 2.3.2
Block for registration form
« on: September 26, 2010, 08:40:15 PM »
Can we get a block that can display th registration form ?

USERNAME :
EMAIL
PASSWORD
VERIFY PASS

ANTI SPAM PUZZLE ......... ESPECIALLY the one built in inside smf security system ?

Offline deansmar

  • Full Member
  • ***
  • Posts: 122
  • Gender: Male
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #1 on: September 27, 2010, 12:45:06 AM »
sorry but i dint really understand why you would like a Block for the registration form, when it can already be called through its Action anywere in the forum..

index.php?action=register

if that's not what your after, why not copy the code for the registration into a custom Block.... that's what their there for..!!
as a foot note:
i went from a SMF 1.1.11 to SMF2 RC3 with out any problems what so ever, first of all de-install all Mods, converted to RC3, then installed SP2.3.2, then installed the required Mods.

Offline Afro

  • Semi Newbie
  • *
  • Posts: 37
    • The African Forum
  • SMF Version: 2.0.11
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #2 on: September 27, 2010, 04:45:25 AM »
Thanks for your response.
Of course i know it can be called into action from anywhere but i need the code for the registration.
Code that will provide the fields i listed above if added to a custom block.
Do you have the piece of code ?

Offline deansmar

  • Full Member
  • ***
  • Posts: 122
  • Gender: Male
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #3 on: September 27, 2010, 05:01:43 AM »
if i remember rightly you should be able to find it in \Sources\Register.php

this should really be asked at the SMF site... as its not really provided by SP
as a foot note:
i went from a SMF 1.1.11 to SMF2 RC3 with out any problems what so ever, first of all de-install all Mods, converted to RC3, then installed SP2.3.2, then installed the required Mods.

Offline Afro

  • Semi Newbie
  • *
  • Posts: 37
    • The African Forum
  • SMF Version: 2.0.11
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #4 on: September 27, 2010, 05:23:45 AM »
Lol. Sure t is in the Source/Register.php. It is picking out the right code block i am talking about.

I will go ask at SM.org but if you find anything please let me know.

Offline Afro

  • Semi Newbie
  • *
  • Posts: 37
    • The African Forum
  • SMF Version: 2.0.11
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #5 on: September 27, 2010, 11:27:24 AM »
Nice tip xvp. I will work on that now. Since i need to strip every other links except the registration related ones.
The problem though will be that the box will remain even after registration.

I want the box to disappear after the user registers.
« Last Edit: September 27, 2010, 11:30:05 AM by Afro »

Offline Afro

  • Semi Newbie
  • *
  • Posts: 37
    • The African Forum
  • SMF Version: 2.0.11
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #6 on: September 27, 2010, 11:36:53 AM »
Code: [Select]
<form action="http://www.afrowall.com/index.php?action=register2" method="post" accept-charset="UTF-8" name="registration" id="registration" onsubmit="return verifyAgree();">
<div class="cat_bar">
<h3 class="catbg">Registration Form</h3>
</div>
<div class="title_bar">
<h4 class="titlebg">Required Information</h4>
</div>
<div class="windowbg2">
<span class="topslice"><span></span></span>
<fieldset class="content">
<dl class="register_form">
<dt><strong><label for="smf_autov_username">Username:</label></strong></dt>
<dd>
<input type="text" name="user" id="smf_autov_username" size="30" tabindex="1" maxlength="25" value="" class="input_text" />
<span id="smf_autov_username_div" style="display: none;">
<a id="smf_autov_username_link" href="#">
<img id="smf_autov_username_img" src="http://www.afrowall.com/Themes/Glassy20Rc3/images/icons/field_check.gif" alt="*" />
</a>
</span>
</dd>
<dt><strong><label for="smf_autov_reserve1">Your Email Address:</label></strong></dt>
<dd>
<input type="text" name="email" id="smf_autov_reserve1" size="30" tabindex="2" value="" class="input_text" />
</dd>
<dt><strong><label for="allow_email">Allow users to email me:</label></strong></dt>
<dd>
<input type="checkbox" name="allow_email" id="allow_email" tabindex="3" class="input_check" />
</dd>
</dl>
<dl class="register_form" id="password1_group">
<dt><strong><label for="smf_autov_pwmain">Choose password:</label></strong></dt>
<dd>
<input type="password" name="passwrd1" id="smf_autov_pwmain" size="30" tabindex="4" class="input_password" />
<span id="smf_autov_pwmain_div" style="display: none;">
<img id="smf_autov_pwmain_img" src="http://www.afrowall.com/Themes/Glassy20Rc3/images/icons/field_invalid.gif" alt="*" />
</span>
</dd>
</dl>
<dl class="register_form" id="password2_group">
<dt><strong><label for="smf_autov_pwverify">Verify password:</label></strong></dt>
<dd>
<input type="password" name="passwrd2" id="smf_autov_pwverify" size="30" tabindex="5" class="input_password" />
<span id="smf_autov_pwverify_div" style="display: none;">
<img id="smf_autov_pwverify_img" src="http://www.afrowall.com/Themes/Glassy20Rc3/images/icons/field_valid.gif" alt="*" />
</span>
</dd>
</dl>
</fieldset>
<span class="botslice"><span></span></span>
</div>
<div class="title_bar">
<h4 class="titlebg">Verification</h4>
</div>
<div class="windowbg2">
<span class="topslice"><span></span></span>
<fieldset class="content centertext">

<div id="verification_control_0" class="verification_control">
<div class="smalltext">
4+4=[Put Answer Below And Register]:<br />
<input type="text" name="register_vv[q][10]" size="30" value=""  tabindex="6" class="input_text" />
</div>
</div>
</fieldset>
<span class="botslice"><span></span></span>
</div>
<div id="confirm_buttons">
<input type="submit" name="regSubmit" value="Register" tabindex="7" class="button_submit" />
</div>
<input type="hidden" name="step" value="2" />
</form>


The html code above gets the registration form as i wanted. Note that all other links are removed except the required registration input boxes.

All that remains is how to make the box disappear after registration.

Offline Afro

  • Semi Newbie
  • *
  • Posts: 37
    • The African Forum
  • SMF Version: 2.0.11
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #7 on: September 27, 2010, 12:42:06 PM »
Sorry, a common error occurred.

When user registers, it say "you are not allowed to view this section "

the reason is that i enabled only the GUESTS to see the block.
« Last Edit: September 27, 2010, 01:10:32 PM by Afro »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #8 on: September 27, 2010, 04:22:36 PM »
You have taken that block away, so we cannot see what it is missing.
 
I went the other direction -- started from SMF's function Register and started removing stuff until it no longer broke the page to put it into a block.
 
I quickly created some lousy, hacked-up code based on Register.php. It's awful, but it seems to work.
I've attached it.
 
To use it, you would put the following in a php block:
Code: [Select]
global $sourcedir;
include_once ($sourcedir . '/Subs-ab.php');
ab_registerblock();
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Afro

  • Semi Newbie
  • *
  • Posts: 37
    • The African Forum
  • SMF Version: 2.0.11
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #9 on: September 27, 2010, 05:37:34 PM »
Good job
« Last Edit: September 29, 2010, 06:03:53 PM by Afro »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #10 on: September 29, 2010, 08:09:23 AM »
You put it in the Sources directory, so that it will be there when the include_once ($sourcedir . '/Subs-ab.php'); step goes looking for it.
 
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline frantic

  • Semi Newbie
  • *
  • Posts: 23
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #11 on: September 29, 2010, 03:02:58 PM »
Hey angelina, i tried the code and put the new source file in my test sites source directory.  When i make the php block, all i get is Register new members link in the portal box the is just a home page redirect.  This block is a fantastic idea by the way.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #12 on: September 29, 2010, 03:11:08 PM »
Log out and try it again.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline frantic

  • Semi Newbie
  • *
  • Posts: 23
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #13 on: September 29, 2010, 03:26:26 PM »
Ok the block displays the whole registration agreement with a bar at the bottom that has "i accept the terms" takes up the whole page to get that agreement in their.  Take a look .

Test Site:  www.theps3forums.com

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #14 on: September 29, 2010, 03:39:42 PM »
Yes.  If you require new registrants to first read the agreement, that is exactly what will happen.
So this solution works well at afrowall (where that agreement is not used), but maybe not so well for you.
 
You could certainly take my awful hacked-up code and hack it up some more. You would modify the "register" replacement to work with a new form that has the "i agree" checkbox on the form with all the other things. And then, of course, you'd have to write a new template for the new form, based on the current template in Register.template.php.
 
You can do that, of course.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline frantic

  • Semi Newbie
  • *
  • Posts: 23
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #15 on: September 29, 2010, 03:45:56 PM »
Yes.  If you require new registrants to first read the agreement, that is exactly what will happen.
So this solution works well at afrowall (where that agreement is not used), but maybe not so well for you.
 
You could certainly take my awful hacked-up code and hack it up some more. You would modify the "register" replacement to work with a new form that has the "i agree" checkbox on the form with all the other things. And then, of course, you'd have to write a new template for the new form, based on the current template in Register.template.php.
 
You can do that, of course.

I was afraid you were going to say that.  Thanks Angelina, i'll give it a shot.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #16 on: September 29, 2010, 04:10:13 PM »
In any case, I would recommend trying out new stuff in a test forum instead of on your "real" forum. It's pretty easy to install a second forum and set up a second database name (or at least a new tablename prefix)
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Afro

  • Semi Newbie
  • *
  • Posts: 37
    • The African Forum
  • SMF Version: 2.0.11
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #17 on: September 29, 2010, 05:50:14 PM »
seems to be working but i am getting some unusual errors in my logs.
I will give it sometime and see if they are related.
Thanks for the work Angelina

Offline Afro

  • Semi Newbie
  • *
  • Posts: 37
    • The African Forum
  • SMF Version: 2.0.11
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #18 on: September 29, 2010, 06:00:28 PM »
Ok, error is

Quote
8: Undefined index: permissions
File: /home/xxxxxxx/public_html/Sources/Security.php
Line: 837

and

Quote
2: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument
File: /home/XXXXXXX/public_html/Sources/Security.php


edit
i think the error occurs after deleting the test account i created to test how it works..


meanwhile, it created a registration link 'Register New Members' on my pages.
It shows for only the admin. it goes off if i log in as normal member.
« Last Edit: September 29, 2010, 06:26:29 PM by Afro »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Block for registration form
« Reply #19 on: September 30, 2010, 09:07:07 AM »
You should set that block to show up only for guests.
 
You don't want already-registered members to be forced to see it.
 
But the admin will see it anyway, because the admin sees everything.
So I made it show different contents for anyone who is able to use the admin registration feature.
 
You are free to change this behavior, of course.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?