News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Join Reason

Started by live627, December 20, 2009, 10:49:47 AM

Previous topic - Next topic

lovearat

Quote from: Gargoyle on January 20, 2010, 09:26:09 PM
Quote from: lovearat on January 19, 2010, 01:54:48 PM
Quote from: lovearat on January 14, 2010, 08:39:09 AM
Quote from: live627 on December 20, 2009, 10:49:47 AM
This mod adds a field on the registration page asking the visitor how he found the site. In addition, if all registrants must be approved by the site administrator, a section is added to the list of members awaiting approval with their join reason.

All registrants are required to be approved before joining my forum. To me asking the visitor how they found the forum amd asking for a join reason are two different questions. And , while it would be nice to know how they found the forum, i.e. searched for, word of mouth, etc. All I really want to know is why they wish to join my forum. Is there a way to make it ask  for a join reason in both areas? Thanks  :)

Could someone please help me out with this? Thanks  :)

What "both" areas?? This is for registration.. Where else do you register?

I'm sorry, I didn't explain what I meant very well.  :)  What I meant is, on the registation page, it only ask the registraint how they found the forum.  It does not ask them what their reason for joining is.  Then the page that lists "awaiting approval" it  shows their answer to "how did you find the forum?' as their answer to " why do you want to join this forum?"  I'm wanting to know why they want to join,ie, because they want to share pictures of their rat terrier,etc. I am using SMF 1.1.11
<span style="font-size: 12px; color: red;">Do Not Pm Me For Support. Please use the appropriate board</span>

live627

If you want to change the text from How did you find us to Why do you want to join, the language file is easily editable.

   <file name="$languagedir/index.english.php" error="skip">
      <operation>
         <search position="end" />
         <add><![CDATA[
$txt['join_reason'] = 'How did you find us?';]]></add>
      </operation>
   </file>

lovearat

Quote from: live627 on January 21, 2010, 09:20:56 AM
If you want to change the text from How did you find us to Why do you want to join, the language file is easily editable.

   <file name="$languagedir/index.english.php" error="skip">
      <operation>
         <search position="end" />
         <add><![CDATA[
$txt['join_reason'] = 'How did you find us?';]]></add>
      </operation>
   </file>

Thank you!  :)
<span style="font-size: 12px; color: red;">Do Not Pm Me For Support. Please use the appropriate board</span>

Chas Large

Hi. I had Version 1.2 installed on my site until today. It was proving very useful BUT I had to manually register a member and then this error occurred:

"The database value you're trying to insert does not exist: join_reason Function: registerMember"

This was also recorded in the error log along with:

"8: Undefined index: join_reason
File: /xxxxxx/xxxxxx/f/fiftyplusforum.co.uk/user/xxxxxx/forum/Sources/Subs-Members.php
Line: 725"

I tried several times with refreshes etc but could not manually register the member.

I uninstalled the mod and was then able to manually register a new member. I also have the Language pack for this mod installed.

Is this fixable? I really like this mod and would hate to loose it.


Secondly, I have seen the following error in my log quite a lot for Guests:

"http://www.fiftyplusforum.co.uk/forum/index.php?action=register2
8: Undefined index: join_reason
Apply Filter: Only show the errors from this file
File: /xxxxx/xxxxxxx/f/fiftyplusforum.co.uk/user/xxxxxx/forum/Sources/Register.php
Line: 369 "

Most of the IP addresses point to non UK locations so I'm assuming they're spammer trying to register but an explanation would be nice if possible.

Regards

CHas
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

live627

Version 1.2.1 addresses the first issue. Both branches are affected, and since admins are unable to rgister a member, this version is highly recommended.

For the second issue, try this:

In $sourcedir/Registation.php

Code (Find) Select

// You can't register if it's disabled.
if (!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 3)
fatal_lang_error('registration_disabled', false);


Code (Add After) Select

   // You can't register without a reason...
   if (empty($_POST['join_reason']) || trim($_POST['join_reason']) == '')
      fatal_error('Please let us know how you found us.', false);

Chas Large

#65
Quote from: live627 on January 30, 2010, 03:27:53 PM
Version 1.2.1 addresses the first issue. Both branches are affected, and since admins are unable to rgister a member, this version is highly recommended.

For the second issue, try this:

In $sourcedir/Registation.php

Code (Find) Select

// You can't register if it's disabled.
if (!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 3)
fatal_lang_error('registration_disabled', false);


Code (Add After) Select

   // You can't register without a reason...
   if (empty($_POST['join_reason']) || trim($_POST['join_reason']) == '')
      fatal_error('Please let us know how you found us.', false);

Thanks Live.
As I had already uninstalled 1.2, I went to install 1.2.1 but found that in my packages that it showed 1.2 was still installed. Trying to uninstall showed an error on every file, so I just deleted the files in the packages list, then installed 1.2.1 manually as attempting to install via the packages failed with errors. Manual install worked OK. There was no evidence that 1.2 had ever been there though.

However, I am now getting this error message:

The email template "admin_register_activate" could not be found.

When attempting to manually register a new member via the Admin > Members > Registration > Register New Member option, so either something else is wrong with my forum or 1.2.1 did not fix the problem.


[EDITED] - The problem was with the EMailTemplates.english_british.php file, the template text was missing. Copying it over from the EMailTemplates.english.php file cured the problem, so all is well now.

For translation purposes, I copied the text for ManageMembers.english.php and index.english.php into the ManageMember.english_british.php and index.english_british.php files respectively and that allowed using the English British Language option. I don't use the UTF-8 format. Hope this helps.

I also added the second lot of code in the register.php file to fix the second error.
[EDIT2]
This did cure the issue with the error messages appearing in the Log File.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

EL34xyz

#66
Howdy,
SMF forum is 1.1.11
I did have join reason 1.2 installed and it worked fine regarding the issue listed below.
I uninstalled 1.2 and installed 1.2.1 this morning

I get this error in the log after a member registers.
Quote8: Undefined index: join_reason
File: D:\hshome\xxxxxx\xxx.com\Forum\Sources\ManageMembers.php
Line: 688

When I go to the admin manage members page to review the member, the join reason does not display.
I looked at the database for this member.
The join reason text is present in the members record at the tail end of the database record

The only mod I made to your install files was that I changed the text to this
$txt['join_reason'] = 'Reason for joining this forum';]]>
I changed the text in all four spots in the english.xml file before installing the mod

Thanks for any help on this.

live627

Quote from: live627 on January 30, 2010, 03:27:53 PM
In $sourcedir/Registation.php

Code (Find) Select

// You can't register if it's disabled.
if (!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 3)
fatal_lang_error('registration_disabled', false);


Code (Add After) Select

   // You can't register without a reason...
   if (empty($_POST['join_reason']) || trim($_POST['join_reason']) == '')
      fatal_error('Please let us know how you found us.', false);


EL34xyz

#68
Hi, yes I saw that in the post above.
I did that and still had the issue.

I believe your mod and another mad may have clashed
What I had to do was uninstall the 3 other mods I had.
Then upload stock copies of the 1.1.11 SMF files.

Then I applied your mod and it worked just fine.

I am now going to apply the others mods one at a time and see if all goes well.

EDIT: I installed the two other mods and this time everything played nice together.
I did not have to add the code section you posted and it works fine now.
Thanks, I like this mod

EL34xyz

Hey Live627,
Got a probelm with Join_reason again.
The spammers and hackers seem to be able to bypass the mod.

I had two known spammers awaiting membership this morning.
Both had blank join reasons.
I looked at the database records for these two and they were blank.

The registration Button does not become active until you type a reason, but these guys have a way around that?
Here's s screen shot showing the two spammers

Rafferty

#70
Running Forum 1.1.11 with TP

I Just uninstalled ver 1.2 and on installing 1.2.1 receiving the following:

QuoteDatabase Error
Duplicate column name 'join_reason'
File: /home/www/*****.com/forum/Packages/temp/install11.php
Line: 17
Don't Follow me I got No Idea what I'm Doing

live627

Quote from: EL34xyz on February 03, 2010, 07:20:03 AM
Hey Live627,
Got a probelm with Join_reason again.
The spammers and hackers seem to be able to bypass the mod.

I had two known spammers awaiting membership this morning.
Both had blank join reasons.
I looked at the database records for these two and they were blank.

The registration Button does not become active until you type a reason, but these guys have a way around that?
Here's s screen shot showing the two spammers

I think the code above fixes that problem.

Quote from: live627 on January 30, 2010, 03:27:53 PM
In $sourcedir/Registation.php

Code (Find) Select

// You can't register if it's disabled.
if (!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 3)
fatal_lang_error('registration_disabled', false);


Code (Add After) Select

   // You can't register without a reason...
   if (empty($_POST['join_reason']) || trim($_POST['join_reason']) == '')
      fatal_error('Please let us know how you found us.', false);


EL34xyz

Thanks Live, I added the code to Register.php and I will let you know if that does the trick.

BTW, it's Register.php, not Registration.php, just in case someone gets confused.

live627

Quote from: Rafferty on February 03, 2010, 07:44:20 AM
Running Forum 1.1.11 with TP

I Just uninstalled ver 1.2 and on installing 1.2.1 receiving the following:

QuoteDatabase Error
Duplicate column name 'join_reason'
File: /home/www/*****.com/forum/Packages/temp/install11.php
Line: 17

The code for finding the database column does not work correctly unless it is at the end of the table. Version 1.2.2 fixes that.

Also, 1.2.2 makes the field required


b0dyr0ck2006

This would be even better if we could see a list of members and the answer to how they found the site without having to approve each new member. I wish to allow the members to sign up automatically, but also see how they found us.


Is this easy to implement into the code?


Thanks for a good mod though.
Why don't you check out my site: www.swapsiesuk.co.uk

Why Shop when you can Swap?!

Chas Large

Quote from: b0dyr0ck2006 on February 07, 2010, 05:55:52 PM
This would be even better if we could see a list of members and the answer to how they found the site without having to approve each new member. I wish to allow the members to sign up automatically, but also see how they found us.


Is this easy to implement into the code?


Thanks for a good mod though.
I've built a mod to add the Join Reason column to the Admin Members list. This mod is only for SMF 2.0 RC-2 as that's what I use. It has been submitted to SMF but as yet is unapproved. I have tested it on TWO forums and it works with no problems. Please use at your own risk.
Chas
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Arantor

Just as a heads-up mods that depend on other mods were not allowed when I was in the Cust. team, though it was something that was being discussed with a view to changing policy.

EL34xyz

I noticed that some mods interfere with other mods when uninstalling

Say one mod looks for this - (xxx)
Then it installs this -  (xxx, yyy)

Another mod looks for this - (xxx)
Then it tries to install this - (www, xxx)
Mod #2 cannot find (xxx) because it has been changed to (www, xxx)

Or mod #2 only looks for this - xxx,)
It finds that and changes it to this - www, xxx)
Now mod#1 will not uninstall because it cannot find (xxx)

One mod has changes the line of code so that another mod cannot find that line.
Sometimes a line has been changed by another mod and then mod #1 above can no longer find the code it installed.
Mod#1 will no longer uninstall unless you go in and do it by hand manually.

I ran into this with a mod recently

Arantor

Yup, that's an unfortunate side effect of the package manager - there is no way around it.

Chas Large

Quote from: EL34xyz on February 08, 2010, 07:34:47 AM
I noticed that some mods interfere with other mods when uninstalling
...

This is true and I think it is a global problem. There are lots of mods that work out of the box but if someone else's mod is installed it can interfere. SMF do a great job checking all the submitted mods but I think it's for individual functionality and possible damage to original SMF code not that it will interfere with another mod. The combinations are too many to consider.

My mod relies on the Join Reason mod as it takes it's data from that mod's input. If the join reason mod is not installed my mod will just give an empty column and an unreferenced title. I tested that. I didn't change anything that the join reason mod changed.

I'm happy if the originator of the Join Reason mod takes my code and adds it in to his but I produced it as I wanted it on my site and saw the need was requested here too.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Advertisement: