Ajax Registration Feedback

Started by Hambil, March 19, 2007, 06:55:27 PM

Previous topic - Next topic

SoftDux

Does anyone use this on SMF 1.1.2, with the default theme? When I try and install it, I get the following error:

Quote
Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./Sources/ManageRegistration.php    Test successful
2.    Execute Modification    ./index.php    Test successful
3.    Execute Modification    ./Themes/default/Register.template.php    Test failed
4.    Execute Modification    ./Themes/default/languages/Login.english.php    Test successful
5.    Execute Code    AjaxRegFed_Install.php    
6.    Extract File    ./Sources/AjaxRegFed.php    
7.    Extract File    ./Themes/default/AjaxRegFed.js    
8.    Extract File    ./Themes/default/AjaxRegFed.template.php    
9.    Extract File    ./Themes/default/languages/AjaxRegFed.english.php

From previous experience, I don't like installing anything if there's an error.
  • cPanel :: Fantastico :: RVSkin :: WHM :: ModernBill
  • Reseller Hosting :: SSL Certificates :: Domain Registrations :: Affiliate Program
  • Blog Hosting :: CMS Hosting :: Forum Hosting :: E-Commerce Hosting
SoftDux- The Leaders in Software
Use the coupon: smf-06 to get 20% off our packages

TrueSatan

The errors in package installations occur because other mods have already altered the code the current mod seeks to alter. Please refer to:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531

...to manually install a mod following such errors and to:

http://server.daniel15.com/smf/package.php

...for details of what needs to be done to add any particular mod.

This mod does work properly in the default theme on SMF 1.1.2 as attested by the enormous number of members who have downloaded and used it without issues of any kind.

Ryan

Mod seems to be working fine, although i checked my php log and it seems whenever the register page is being viewed this gets logged as an error.
[28-Jun-2007 14:19:42] PHP Fatal error:  Call to undefined function getmxrr() in C:\hd3\www\forum\Sources\AjaxRegFed.php on line 49

So might wanna fix that one.
Thanks for great mod

John S

doesn't work after i installed SEO4SMF?!

dbrown

Please do not PM me with support questions.  You will get better and faster responses by contacting someone who has a clue. Thank you.

BryanS

Quote from: MojPortal on June 17, 2007, 10:40:01 AM
In error log I see this

hxxp:www.mojportal.com.hr/forum/index.php?action=ajaxreg_checkpasswrd1&xml=true&passwrd1=USER_PASSWORD&username=USERNAME [nonactive]
2: implode() [<a href='function.implode'>function.implode</a>]: Bad arguments.
Datoteka: /home/mojporta/public_html/forum/Sources/Subs-Auth.php
Linija: 639

I'm getting the exact same error.  I'm running Tiny Portal so I don't know if this might be causing a problem but I can't figure out how to fix this. :(


Kalandor

Well there is something.. it's not exactly a bug, but I think it's a miss. When user tries to select one of the restricted usernames it still says that the username is available. I whink this should be fixed

Alpay

Quote from: BryanS on August 19, 2007, 10:09:14 PM
Quote from: MojPortal on June 17, 2007, 10:40:01 AM
In error log I see this

http://www.mojportal.com.hr/forum/index.php?action=ajaxreg_checkpasswrd1&amp;xml=true&amp;passwrd1=USER_PASSWORD&amp;username=USERNAME
2: implode() [<a href='function.implode'>function.implode</a>]: Bad arguments.
Datoteka: /home/mojporta/public_html/forum/Sources/Subs-Auth.php
Linija: 639

I'm getting the exact same error.  I'm running Tiny Portal so I don't know if this might be causing a problem but I can't figure out how to fix this. :(

up =)

rsw686

#89
Two things I noticed. One I have fixed, the other doesn't really bother me, but I thought I would put it out there.

1) The "Enable AJAX Registration Feedback" check box has not affect. The ajax registration feedback is always enabled. I looked through the code and nothing utilizes the value. This could be easily fixed in the AjaxRegFed.php file. I opted to just remove it from the registration settings page as I don't care about disabling it.

2) The username check does not check for reserved names. This one I did fix. Heres the updated function for AjaxRegFed.php

EDIT: Removed the code as my latest post has an updated version.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

rsw686

Hmm there are more things not checked for. The user name isn't checked for invalid characters and the email isn't checked to see if it is already registered. I have corrected this.

AjaxRegFed.php

function CheckUsername()
{
global $context, $txt, $modSettings, $db_prefix, $sourcedir;

// Needed for isReservedName()
require_once($sourcedir . '/Subs-Members.php');

$context['ajaxreg']['field'] = 'usercheck';

// Is the username already taken?
$request = db_query("
SELECT ID_MEMBER
FROM {$db_prefix}members
WHERE memberName = '$_REQUEST[username]'
LIMIT 1", __FILE__, __LINE__);

if (mysql_num_rows($request) != 0)
{
$context['ajaxreg']['status'] = false;
$context['ajaxreg']['message'] = $txt['ajaxreg_username_taken'];
}
// Does it contain a reserved name?
elseif (isReservedName($_REQUEST['username'], 0, true, false))
{
$context['ajaxreg']['status'] = false;
$context['ajaxreg']['message'] = $txt['ajaxreg_username_reserved'];
}
// Only these characters are permitted.
elseif (preg_match('~[<>&"\'=\\\]~', $_REQUEST['username']) != 0 || $_REQUEST['username'] == '_' || $_REQUEST['username'] == '|' || strpos($_REQUEST['username'], '[code') !== false || strpos($_REQUEST['username'], '[/code') !== false)
{
$context['ajaxreg']['status'] = false;
$context['ajaxreg']['message'] = $txt['ajaxreg_username_invalid'];
}
else
{
$context['ajaxreg']['status'] = true;
$context['ajaxreg']['message'] = $txt['ajaxreg_username_available'];
}
mysql_free_result($request);

// Determine CSS based on status.
$context['ajaxreg']['css'] = $context['ajaxreg']['status'] ? $modSettings['ajaxregSuccessCSS'] : $modSettings['ajaxregFailureCSS'];

$context['sub_template'] = 'xml';
loadTemplate('AjaxRegFed');
}

function CheckEmail()
{
global $context, $txt, $modSettings, $db_prefix;

$valid = false;

$context['ajaxreg']['field'] = 'emailcheck';

// Tests for a valid email address and optionally tests for valid MX records, too.
if(eregi("^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $_REQUEST['email']))
{
list($username, $domain) = split("@", $_REQUEST['email']);
$valid = getmxrr($domain, $mxrecords);
}

if ($valid == false)
{
$context['ajaxreg']['status'] = false;
$context['ajaxreg']['message'] = $txt['ajaxreg_email_invalid'];
}
else
{
// Is the email already registered
$request = db_query("
SELECT ID_MEMBER
FROM {$db_prefix}members
WHERE emailAddress = '$_REQUEST[email]'
LIMIT 1", __FILE__, __LINE__);

// No results if unique.
if (mysql_num_rows($request) != 0)
{
$context['ajaxreg']['status'] = false;
$context['ajaxreg']['message'] = $txt['ajaxreg_email_registered'];
}
else
{
$context['ajaxreg']['status'] = true;
$context['ajaxreg']['message'] = $txt['ajaxreg_email_verified'];
}
mysql_free_result($request);
}

// Determine CSS based on status.
$context['ajaxreg']['css'] = $context['ajaxreg']['status'] ? $modSettings['ajaxregSuccessCSS'] : $modSettings['ajaxregFailureCSS'];

$context['sub_template'] = 'xml';
loadTemplate('AjaxRegFed');
}


AjaxRegFed.english.php

$txt['ajaxreg_username_available'] = 'Username available';
$txt['ajaxreg_username_taken'] = 'Username is taken';
$txt['ajaxreg_username_reserved'] = 'Username is reserved';
$txt['ajaxreg_username_invalid'] = 'Username is invalid';
$txt['ajaxreg_email_verified'] = 'Email verified';
$txt['ajaxreg_email_registered'] = 'Email is already registered';
$txt['ajaxreg_email_invalid'] = 'Email is invalid';
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

locomotion182

hey do you think this will work with 1.1.4?

L'AltroWeb

#92
Hi!
Good mod  ;)
I have successfully installed your mod with smf 1.1.4 (babylon theme) with no error, all work fine except enable or disable option
http://custom.simplemachines.org/mods/index.php?action=download;mod=725;id=29164;image
if i enable or disable never change (isn't very important) :)
PS for w3c:
use onchange instead of onChange
<div id="usercheck"> instead of <div id="usercheck" name="usercheck">
<div id="emailcheck"> instead of <div id="emailcheck" name="emailcheck">
<div id="passwrd1check"> instead of <div id="passwrd1check" name="passwrd1check">
<div id="passwrd2check"> instead of <div id="passwrd2check" name="passwrd2check">
And all is validate and working fine  ;)
-
PS i have found a small bug only with Iexplore7.
If i use (for italian language) this code:
$txt['ajaxreg_password_short'] = 'La Password è troppo corta';
Internet explore dont work fine

instead if i use:
$txt['ajaxreg_password_short'] = 'La Password e troppo corta';
All work fine also with Internet Explorer  ::)

goldenboy48


BryanS

Quote from: BryanS on August 19, 2007, 10:09:14 PM
Quote from: MojPortal on June 17, 2007, 10:40:01 AM
In error log I see this

hxxp:www.mojportal.com.hr/forum/index.php?action=ajaxreg_checkpasswrd1&amp;xml=true&amp;passwrd1=USER_PASSWORD&amp;username=USERNAME [nonactive]
2: implode() [<a href='function.implode'>function.implode</a>]: Bad arguments.
Datoteka: /home/mojporta/public_html/forum/Sources/Subs-Auth.php
Linija: 639

I'm getting the exact same error.  I'm running Tiny Portal so I don't know if this might be causing a problem but I can't figure out how to fix this. :(

Anyone?

This mod is working well for me other than this message appearing in my error log. 

I'm using the following mods with it:

1.     Gender On Registration      1.0      
2.    ShowTopics    1.1    
3.    MySpace Field    2.4    
4.    Ignore user    1.3    
5.    Select Admin for Notifications    1.1    
6.    Profil Moderator Managment    1.0.0    
7.    TinyPortal    0.983    
8.    SMF Ajax Registration Feedback    1.0.0    
9.    Moderator Activity Report for SMF1.1.2    1.2    
10.    SMF 1.0.11 / 1.1.3 Update    1.1    
11.    FlashChat Integration    1.0    
12.    SMF 1.0.12 / 1.1.4 / 2.0 b1.1 Update    1.0    
13.    RSS Feed Icon    1.1    
14.    Auto Embed Video Clips    1.3    
15.    Easy Edit Meta Data    1.0    
16.    Enhanced Calendar    1.1    
17.    Fix Message Empty Error For Embed Video Mods    1.0    

moviespot

Thanks and regards

Fallen Angel

#96
Just installed it on my SMF v 1.1.1.4 with Dilber MC theme, and it works like a charm..

Here is the danish translation to; AjaxRegFed.danish-utf8.php

<?php// Version: 1.0.0; Ajax Registration Mod// General$txt['ajaxreg_username_taken'] = 'Brugernavn er taget';$txt['ajaxreg_username_available'] = 'Brugernavn er ledigt';$txt['ajaxreg_invalid_email'] = 'Invalid email';$txt['ajaxreg_email_verified'] = 'Email godkendt';$txt['ajaxreg_password_short'] = 'Kodeord er for kort';$txt['ajaxreg_password_chars'] = 'Kodeord er for svag';$txt['ajaxreg_password_valid'] = 'Kodeord er accepteret';$txt['ajaxreg_password_nomatch'] = 'Kodeordet matcher ikke';$txt['ajaxreg_password_match'] = 'Kodeord matcher';$txt['ajaxreg_password_restricted_words'] = 'Kodeord indeholder ikke godkendt ord';?>


And the danish translation to Login.danish-utf8.php

// Ajax Registration Feedback
$txt['ajaxreg_enabled_label'] = 'Slå AJAX Registrering Feedback Til';
$txt['ajaxreg_successCSS_label'] = 'Stil til brug for succesfuld feedback';
$txt['ajaxreg_failureCSS_label'] = 'Stil til brug for fejlet feedback';

Cristan

Quote from: BryanS on December 07, 2007, 02:48:32 PM
I'm getting the exact same error.  I'm running Tiny Portal so I don't know if this might be causing a problem but I can't figure out how to fix this. :(

Same here. I also get the implode() error quite often, but I also run TinyPortal..

TEOC2

Works fine on my SMF1.1.4 & TinyPortal v0.9.8 install.

BryanS

well, I "solved" my problem.  I looked at the exact error I was getting and it was caused by the system checking to see if the user's password met the medium password strength.  I changed the registration requirements so passwords need only be of low level security and I don't get the error anymore

Advertisement: