Index: trunk/extensions/SemanticSignup/SemanticSignup.php |
— | — | @@ -0,0 +1,86 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Initialization file for the Semantic Signup extension. |
| 6 | + * |
| 7 | + * Documentation: http://www.mediawiki.org/wiki/Extension:SemanticSignup |
| 8 | + * Support http://www.mediawiki.org/wiki/Extension_talk:SemanticSignup |
| 9 | + * Source code: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SemanticSignup |
| 10 | + * |
| 11 | + * @file SemanticSignup.php |
| 12 | + * @ingroup SemanticSignup |
| 13 | + * |
| 14 | + * @licence GNU GPL v3+ |
| 15 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 16 | + */ |
| 17 | + |
| 18 | +/** |
| 19 | + * This documenation group collects source code files belonging to SemanticSignup. |
| 20 | + * |
| 21 | + * @defgroup SemanticSignup SemanticSignup |
| 22 | + */ |
| 23 | + |
| 24 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 25 | + die( 'Not an entry point.' ); |
| 26 | +} |
| 27 | + |
| 28 | +if ( version_compare( $wgVersion, '1.16', '<' ) ) { |
| 29 | + die( '<b>Error:</b> Semantic Signup requires MediaWiki 1.16 or above.' ); |
| 30 | +} |
| 31 | + |
| 32 | +// Show a warning if Semantic MediaWiki is not loaded. |
| 33 | +if ( ! defined( 'SMW_VERSION' ) ) { |
| 34 | + die( '<b>Error:</b> You need to have <a href="http://semantic-mediawiki.org/wiki/Semantic_MediaWiki">Semantic MediaWiki</a> installed in order to use Semantic Watchlist.' ); |
| 35 | +} |
| 36 | + |
| 37 | +if ( version_compare( SMW_VERSION, '1.6 alpha', '<' ) ) { |
| 38 | + die( '<b>Error:</b> Semantic Signup requires Semantic MediaWiki 1.6 or above.' ); |
| 39 | +} |
| 40 | + |
| 41 | +define( 'SemanticSignup_VERSION', '0.3 alpha' ); |
| 42 | + |
| 43 | +$wgExtensionCredits[defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'specialpage'][] = array( |
| 44 | + 'path' => __FILE__, |
| 45 | + 'name' => 'SemanticSignup', |
| 46 | + 'version' => SemanticSignup_VERSION, |
| 47 | + 'author' => array( |
| 48 | + 'Serg Kutny', |
| 49 | + '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]', |
| 50 | + ), |
| 51 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Watchlist', |
| 52 | + 'descriptionmsg' => 'ses-desc' |
| 53 | +); |
| 54 | + |
| 55 | +$wgExtensionMessagesFiles['SemanticSignup'] = dirname( __FILE__ ) . '/SemanticSignup.i18n.php'; |
| 56 | +$wgExtensionAliasesFiles['SemanticSignup'] = dirname( __FILE__ ) . '/SemanticSignup.i18n.aliases.php'; |
| 57 | + |
| 58 | +$wgAutoloadClasses['SemanticSignup'] = dirname( __FILE__ ) . '/includes/SES_Special.php'; |
| 59 | +$wgAutoloadClasses['SES_UserAccountDataChecker'] = dirname( __FILE__ ) . '/includes/SES_Special.php'; |
| 60 | + |
| 61 | +$wgAutoloadClasses['SES_DataChecker'] = dirname( __FILE__ ) . '/includes/SES_Utils.php'; |
| 62 | + |
| 63 | +$wgAutoloadClasses['SES_SignupFields'] = dirname( __FILE__ ) . '/includes/SES_SignupFields.php'; |
| 64 | +$wgAutoloadClasses['CreateUserFieldsTemplate'] = dirname( __FILE__ ) . '/includes/SES_SignupFields.php'; |
| 65 | + |
| 66 | +$wgSpecialPages['SemanticSignup'] = 'SemanticSignup'; |
| 67 | + |
| 68 | +if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { |
| 69 | + $wgHooks['ParserFirstCallInit'][] = 'SES_SignupFields::setup'; |
| 70 | +} else { |
| 71 | + $wgExtensionFunctions[] = 'SES_SignupFields::setup'; |
| 72 | +} |
| 73 | + |
| 74 | +function sesCreateUserRedirect($template) |
| 75 | +{ |
| 76 | + $semantic_signup_title = SemanticSignup::getTitleFor('SemanticSignup'); |
| 77 | + $url = $semantic_signup_title->escapeFullURL(); |
| 78 | + |
| 79 | + global $wgOut; |
| 80 | + $wgOut->redirect($url); |
| 81 | + |
| 82 | + return false; |
| 83 | +} |
| 84 | + |
| 85 | +$wgHooks['UserCreateForm'][] = 'sesCreateUserRedirect'; |
| 86 | + |
| 87 | +require_once 'SemanticSignup.settings.php'; |
Property changes on: trunk/extensions/SemanticSignup/SemanticSignup.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 88 | + native |
Index: trunk/extensions/SemanticSignup/includes/SES_Aliases.php |
— | — | @@ -1,10 +0,0 @@ |
2 | | -<?php |
3 | | -/* |
4 | | - * Created on 7 Jan 2008 by Serhii Kutnii |
5 | | - */ |
6 | | - |
7 | | - $aliases = array(); |
8 | | - |
9 | | - $aliases['en'] = array( |
10 | | - 'Semantic Signup' => array('Semantic Signup') |
11 | | - ); |
Index: trunk/extensions/SemanticSignup/includes/SES_CreateUserHook.php |
— | — | @@ -1,17 +0,0 @@ |
2 | | -<?php |
3 | | -/* |
4 | | - * Created on 13 Jan 2009 by Serhii Kutnii |
5 | | - */ |
6 | | - |
7 | | -function sesCreateUserRedirect($template) |
8 | | -{ |
9 | | - $semantic_signup_title = SemanticSignup::getTitleFor('SemanticSignup'); |
10 | | - $url = $semantic_signup_title->escapeFullURL(); |
11 | | - |
12 | | - global $wgOut; |
13 | | - $wgOut->redirect($url); |
14 | | - |
15 | | - return false; |
16 | | -} |
17 | | - |
18 | | -$wgHooks['UserCreateForm'][] = 'sesCreateUserRedirect'; |
Index: trunk/extensions/SemanticSignup/includes/SES_Main.php |
— | — | @@ -1,45 +0,0 @@ |
2 | | -<?php |
3 | | -/* |
4 | | - * Created on 6 Jan 2009 by Serhii Kutnii |
5 | | - */ |
6 | | - |
7 | | -$local_dir = dirname(__FILE__).'/'; |
8 | | - |
9 | | -//Including all the SemanticSignup classes |
10 | | -require_once($local_dir.'SES_Utils.php'); |
11 | | -require_once($local_dir.'SES_SignupFields.php'); |
12 | | -require_once($local_dir.'SES_Special.php'); |
13 | | -require_once($local_dir.'SES_CreateUserHook.php'); |
14 | | - |
15 | | -$wgAutoloadClasses['SemanticSignup'] = |
16 | | -$wgAutoloadClasses['SES_UserAccountDataChecker'] = $local_dir.'SES_Special.php'; |
17 | | - |
18 | | -$wgAutoloadClasses['SES_DataChecker'] = $local_dir.'SES_Utils.php'; |
19 | | - |
20 | | -$wgAutoloadClasses['SES_SignupFields'] = |
21 | | -$wgAutoloadClasses['CreateUserFieldsTemplate'] = $local_dir.'SES_SignupFields.php'; |
22 | | - |
23 | | -$wgExtensionCredits['specialpage'][] = array( |
24 | | - 'name' => 'SemanticSignup', |
25 | | - 'author' => 'Serg Kutny', |
26 | | - 'url' => '', |
27 | | - 'description' => 'A MediaWiki extension built on top of Semantic Forms allowing to populate a user page with semantic data at signup time ', |
28 | | - 'descriptionmsg' => 'ses-desc', |
29 | | - 'version' => '0.0.0', |
30 | | -); |
31 | | - |
32 | | -$wgExtensionMessagesFiles['SemanticSignup'] = $local_dir.'SES_Messages.php'; |
33 | | -$wgExtensionAliasesFiles['SemanticSignup'] = $local_dir.'SES_Aliases.php'; |
34 | | -$wgSpecialPages['SemanticSignup'] = 'SemanticSignup'; |
35 | | - |
36 | | -/* |
37 | | - * I need real name to be required on user signup for my purposes |
38 | | - * so I make this feature configurable |
39 | | - */ |
40 | | -$sesRealNameRequired = false; |
41 | | -$sesSignupFormName = ''; |
42 | | -$sesSignupBotName = ''; |
43 | | - |
44 | | - |
45 | | - |
46 | | - |
Index: trunk/extensions/SemanticSignup/includes/SES_Messages.php |
— | — | @@ -1,20 +0,0 @@ |
2 | | -<?php |
3 | | -/* |
4 | | - * Created on 7 Jan 2008 by Serhii Kutnii |
5 | | - * |
6 | | - */ |
7 | | - |
8 | | - $messages = array(); |
9 | | - |
10 | | - $messages['en'] = array( |
11 | | - 'semanticsignup' => 'Semantic Signup', |
12 | | - 'nousername' => 'Username has not been specified', |
13 | | - 'nopwdmatch' => 'Password and password confirmation don\'t match', |
14 | | - 'norealname' => 'Real name is required but has not been specified', |
15 | | - 'userexists' => 'User already exists', |
16 | | - 'invaliduname' => 'Username specified is not allowed', |
17 | | - 'emailfailed' => 'Confirmation email sending failed', |
18 | | - 'createforbidden' => 'Current user is not allowed to create accounts', |
19 | | - 'throttlehit' => 'New user accounts number maximum per day has been exceeded for this IP', |
20 | | - 'ses_userexists' => 'User already exists' |
21 | | - ); |
\ No newline at end of file |
Index: trunk/extensions/SemanticSignup/includes/SES_SignupFields.php |
— | — | @@ -191,10 +191,3 @@ |
192 | 192 | return true; |
193 | 193 | } |
194 | 194 | } |
195 | | - |
196 | | -if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { |
197 | | - $wgHooks['ParserFirstCallInit'][] = 'SES_SignupFields::setup'; |
198 | | -} else { |
199 | | - $wgExtensionFunctions[] = 'SES_SignupFields::setup'; |
200 | | -} |
201 | | - |
Index: trunk/extensions/SemanticSignup/SemanticSignup.i18n.aliases.php |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Created on 7 Jan 2008 by Serhii Kutnii |
| 6 | + */ |
| 7 | + |
| 8 | +$aliases = array(); |
| 9 | + |
| 10 | +$aliases['en'] = array( |
| 11 | + 'Semantic Signup' => array('Semantic Signup') |
| 12 | +); |
Property changes on: trunk/extensions/SemanticSignup/SemanticSignup.i18n.aliases.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Index: trunk/extensions/SemanticSignup/SemanticSignup.i18n.php |
— | — | @@ -0,0 +1,21 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Created on 7 Jan 2008 by Serhii Kutnii |
| 6 | + */ |
| 7 | + |
| 8 | +$messages = array(); |
| 9 | + |
| 10 | +$messages['en'] = array( |
| 11 | + 'semanticsignup' => 'Semantic Signup', |
| 12 | + 'ses-desc' => 'A MediaWiki extension built on top of Semantic Forms allowing to populate a user page with semantic data at signup time', |
| 13 | + 'nousername' => 'Username has not been specified', |
| 14 | + 'nopwdmatch' => 'Password and password confirmation don\'t match', |
| 15 | + 'norealname' => 'Real name is required but has not been specified', |
| 16 | + 'userexists' => 'User already exists', |
| 17 | + 'invaliduname' => 'Username specified is not allowed', |
| 18 | + 'emailfailed' => 'Confirmation email sending failed', |
| 19 | + 'createforbidden' => 'Current user is not allowed to create accounts', |
| 20 | + 'throttlehit' => 'New user accounts number maximum per day has been exceeded for this IP', |
| 21 | + 'ses_userexists' => 'User already exists' |
| 22 | +); |
\ No newline at end of file |
Property changes on: trunk/extensions/SemanticSignup/SemanticSignup.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 23 | + native |
Index: trunk/extensions/SemanticSignup/SemanticSignup.settings.php |
— | — | @@ -0,0 +1,9 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/* |
| 5 | + * I need real name to be required on user signup for my purposes |
| 6 | + * so I make this feature configurable |
| 7 | + */ |
| 8 | +$sesRealNameRequired = false; |
| 9 | +$sesSignupFormName = ''; |
| 10 | +$sesSignupBotName = ''; |
\ No newline at end of file |
Property changes on: trunk/extensions/SemanticSignup/SemanticSignup.settings.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 11 | + native |