Index: trunk/extensions/SocialProfile/UserRelationship/UserRelationship.js |
— | — | @@ -8,6 +8,8 @@ |
9 | 9 | sajax_request_type = 'POST'; |
10 | 10 | sajax_do_call( 'wfRelationshipRequestResponse', [ response, id ], function( request ) { |
11 | 11 | document.getElementById( 'request_action_' + id ).innerHTML = request.responseText; |
12 | | - YAHOO.widget.Effects.Appear( 'request_action_' + id, { duration:2.0 } ); |
| 12 | + jQuery( '#request_action_' + id ).fadeIn( 2000 ); |
| 13 | + document.getElementById( 'request_action_' + id ).style.display = 'block'; |
| 14 | + document.getElementById( 'request_action_' + id ).style.visibility = 'visible'; |
13 | 15 | } ); |
14 | 16 | } |
\ No newline at end of file |
Index: trunk/extensions/SocialProfile/SocialProfile.php |
— | — | @@ -3,13 +3,14 @@ |
4 | 4 | * Protect against register_globals vulnerabilities. |
5 | 5 | * This line must be present before any global variable is referenced. |
6 | 6 | */ |
7 | | -if ( !defined( 'MEDIAWIKI' ) ) |
| 7 | +if ( !defined( 'MEDIAWIKI' ) ) { |
8 | 8 | die(); |
| 9 | +} |
9 | 10 | |
10 | 11 | /** |
11 | 12 | * This is the *main* (but certainly not the only) loader file for SocialProfile extension. |
12 | 13 | * |
13 | | - * For more info about SocialProfile, please see the README file that was included with SocialProfile. |
| 14 | + * For more info about SocialProfile, please see http://www.mediawiki.org/wiki/Extension:SocialProfile. |
14 | 15 | */ |
15 | 16 | $dir = dirname( __FILE__ ) . '/'; |
16 | 17 | |
— | — | @@ -93,7 +94,7 @@ |
94 | 95 | 'path' => __FILE__, |
95 | 96 | 'name' => 'SocialProfile', |
96 | 97 | 'author' => array( 'Aaron Wright', 'David Pean', 'Jack Phoenix' ), |
97 | | - 'version' => '1.4', |
| 98 | + 'version' => '1.5', |
98 | 99 | 'url' => 'http://www.mediawiki.org/wiki/Extension:SocialProfile', |
99 | 100 | 'description' => 'A set of Social Tools for MediaWiki', |
100 | 101 | ); |
— | — | @@ -190,7 +191,6 @@ |
191 | 192 | $wgUserRelationshipScripts = "$wgScriptPath/extensions/SocialProfile/UserRelationship"; |
192 | 193 | |
193 | 194 | // Loader files |
194 | | -require_once( "$IP/extensions/SocialProfile/YUI/YUI.php" ); // YUI stand-alone library |
195 | 195 | require_once( "{$wgUserProfileDirectory}/UserProfile.php" ); // Profile page configuration loader file |
196 | 196 | require_once( "$IP/extensions/SocialProfile/UserGifts/Gifts.php" ); // UserGifts (user-to-user gifting functionality) loader file |
197 | 197 | require_once( "$IP/extensions/SocialProfile/SystemGifts/SystemGifts.php" ); // SystemGifts (awards functionality) loader file |
— | — | @@ -216,4 +216,49 @@ |
217 | 217 | $wgExtNewTables[] = array( 'user_system_messages', "$dir/UserSystemMessages/user_system_messages.sql" ); |
218 | 218 | } |
219 | 219 | return true; |
220 | | -} |
\ No newline at end of file |
| 220 | +} |
| 221 | + |
| 222 | +/* |
| 223 | +// For Renameuser extension |
| 224 | +$wgHooks['RenameUserSQL'][] = 'efSystemGiftsOnUserRename'; |
| 225 | +$wgHooks['RenameUserSQL'][] = 'efUserBoardOnUserRename'; |
| 226 | +$wgHooks['RenameUserSQL'][] = 'efUserGiftsOnUserRename'; |
| 227 | +$wgHooks['RenameUserSQL'][] = 'efUserRelationshipOnUserRename'; |
| 228 | +$wgHooks['RenameUserSQL'][] = 'efUserStatsOnUserRename'; |
| 229 | +$wgHooks['RenameUserSQL'][] = 'efUserSystemMessagesOnUserRename'; |
| 230 | + |
| 231 | +function efSystemGiftsOnUserRename( $renameUserSQL ) { |
| 232 | + $renameUserSQL->tables['user_system_gift'] = array( 'sg_user_name', 'sg_user_id' ); |
| 233 | + return true; |
| 234 | +} |
| 235 | + |
| 236 | +function efUserBoardOnUserRename( $renameUserSQL ) { |
| 237 | + $renameUserSQL->tables['user_board'] = array( 'ub_user_name_from', 'ub_user_id_from' ); |
| 238 | + return true; |
| 239 | +} |
| 240 | + |
| 241 | +function efUserGiftsOnUserRename( $renameUserSQL ) { |
| 242 | + $renameUserSQL->tables['user_gift'] = array( 'ug_user_name_to', 'ug_user_id_to' ); |
| 243 | + $renameUserSQL->tables['gift'] = array( 'gift_creator_user_name', 'gift_creator_user_id' ); |
| 244 | + return true; |
| 245 | +} |
| 246 | + |
| 247 | +function efUserRelationshipOnUserRename( $renameUserSQL ) { |
| 248 | + // <fixme> This sucks and only updates half of the rows...wtf? |
| 249 | + $renameUserSQL->tables['user_relationship'] = array( 'r_user_name_relation', 'r_user_id_relation' ); |
| 250 | + $renameUserSQL->tables['user_relationship'] = array( 'r_user_name', 'r_user_id' ); |
| 251 | + // </fixme> |
| 252 | + $renameUserSQL->tables['user_relationship_request'] = array( 'ur_user_name_from', 'ur_user_id_from' ); |
| 253 | + return true; |
| 254 | +} |
| 255 | + |
| 256 | +function efUserStatsOnUserRename( $renameUserSQL ) { |
| 257 | + $renameUserSQL->tables['user_stats'] = array( 'stats_user_name', 'stats_user_id' ); |
| 258 | + return true; |
| 259 | +} |
| 260 | + |
| 261 | +function efUserSystemMessagesOnUserRename( $renameUserSQL ) { |
| 262 | + $renameUserSQL->tables['user_system_messages'] = array( 'um_user_name', 'um_user_id' ); |
| 263 | + return true; |
| 264 | +} |
| 265 | +*/ |
\ No newline at end of file |
Index: trunk/extensions/SocialProfile/UserBoard/BoardBlast.js |
— | — | @@ -1,27 +1,27 @@ |
2 | 2 | function toggle_user( user_id ) { |
3 | | - if( YAHOO.util.Dom.hasClass( 'user-' + user_id, 'blast-friend-selected' ) ) { |
4 | | - YAHOO.util.Dom.replaceClass( 'user-' + user_id, 'blast-friend-selected', 'blast-friend-unselected' ); |
5 | | - } else if( YAHOO.util.Dom.hasClass( 'user-' + user_id, 'blast-friend-unselected' ) ) { |
6 | | - YAHOO.util.Dom.replaceClass( 'user-' + user_id, 'blast-friend-unselected', 'blast-friend-selected' ); |
| 3 | + if( jQuery( '#user-' + user_id ).hasClass( 'blast-friend-selected' ) ) { |
| 4 | + jQuery( '#user-' + user_id ).removeClass( 'blast-friend-selected' ).addClass( 'blast-friend-unselected' ); |
| 5 | + } else if( jQuery( '#user-' + user_id ).hasClass( 'blast-friend-unselected' ) ) { |
| 6 | + jQuery( '#user-' + user_id ).removeClass( 'blast-friend-unselected' ).addClass( 'blast-friend-selected' ); |
7 | 7 | } |
8 | 8 | |
9 | | - if( YAHOO.util.Dom.hasClass( 'user-' + user_id, 'blast-foe-selected' ) ) { |
10 | | - YAHOO.util.Dom.replaceClass( 'user-' + user_id, 'blast-foe-selected', 'blast-foe-unselected' ); |
11 | | - } else if( YAHOO.util.Dom.hasClass( 'user-' + user_id, 'blast-foe-unselected' ) ) { |
12 | | - YAHOO.util.Dom.replaceClass( 'user-' + user_id, 'blast-foe-selected', 'blast-foe-unselected' ); |
| 9 | + if( jQuery( '#user-' + user_id ).hasClass( 'blast-foe-selected' ) ) { |
| 10 | + jQuery( '#user-' + user_id ).removeClass( 'blast-foe-selected' ).addClass( 'blast-foe-unselected' ); |
| 11 | + } else if( jQuery( '#user-' + user_id ).hasClass( 'blast-foe-unselected' ) ) { |
| 12 | + jQuery( '#user-' + user_id ).removeClass( 'blast-foe-unselected' ).addClass( 'blast-foe-selected' ); |
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
16 | 16 | function toggle_type( method, on, off ) { |
17 | | - list = YAHOO.util.Dom.getElementsByClassName( ( ( method == 1 ) ? off : on ), 'div', 'blast-friends-list' ); |
| 17 | + list = jQuery( '#blast-friends-list div.' + ( ( method == 1 ) ? off : on ) ); |
18 | 18 | |
19 | 19 | for( x = 0; x <= list.length - 1; x++ ) { |
20 | 20 | el = list[x]; |
21 | | - if( YAHOO.util.Dom.hasClass( el, on ) || YAHOO.util.Dom.hasClass( el, off ) ) { |
| 21 | + if( jQuery( el ).hasClass( on ) || jQuery( el ).hasClass( off ) ) { |
22 | 22 | if( method == 1 ) { |
23 | | - YAHOO.util.Dom.replaceClass( el, off, on ); |
| 23 | + jQuery( el ).removeClass( off ).addClass( on ); |
24 | 24 | } else { |
25 | | - YAHOO.util.Dom.replaceClass( el, on, off ); |
| 25 | + jQuery( el ).removeClass( on ).addClass( off ); |
26 | 26 | } |
27 | 27 | } |
28 | 28 | } |
— | — | @@ -54,7 +54,7 @@ |
55 | 55 | selected = 0; |
56 | 56 | user_ids_to = ''; |
57 | 57 | |
58 | | - list = YAHOO.util.Dom.getElementsByClassName( 'blast-friend-selected', 'div', 'blast-friends-list' ); |
| 58 | + list = jQuery( '#blast-friends-list div.blast-friend-selected' ); |
59 | 59 | for( x = 0; x <= list.length - 1; x++ ) { |
60 | 60 | el = list[x]; |
61 | 61 | selected++; |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | user_ids_to += ( ( user_ids_to ) ? ',' : '' ) + user_id; |
64 | 64 | } |
65 | 65 | |
66 | | - list = YAHOO.util.Dom.getElementsByClassName( 'blast-foe-selected', 'div', 'blast-friends-list' ); |
| 66 | + list = jQuery( '#blast-friends-list div.blast-foe-selected' ); |
67 | 67 | for( x = 0; x <= list.length - 1; x++ ) { |
68 | 68 | el = list[x]; |
69 | 69 | selected++; |
— | — | @@ -76,16 +76,16 @@ |
77 | 77 | return 0; |
78 | 78 | } |
79 | 79 | |
80 | | - if( !document.getElementById('message').value ) { |
| 80 | + if( !document.getElementById( 'message' ).value ) { |
81 | 81 | alert( 'Please enter a message' ); |
82 | 82 | submitted = 0; |
83 | 83 | return 0; |
84 | 84 | } |
85 | 85 | |
86 | | - document.getElementById('ids').value = user_ids_to; |
| 86 | + document.getElementById( 'ids' ).value = user_ids_to; |
87 | 87 | |
88 | 88 | document.blast.message.style.color = '#ccc'; |
89 | 89 | document.blast.message.readOnly = true; |
90 | | - document.getElementById('blast-friends-list').innerHTML = 'Sending messages...'; |
| 90 | + document.getElementById( 'blast-friends-list' ).innerHTML = 'Sending messages...'; |
91 | 91 | document.blast.submit(); |
92 | 92 | } |
Index: trunk/extensions/SocialProfile/UserGifts/UserGifts.js |
— | — | @@ -3,21 +3,21 @@ |
4 | 4 | function selectGift( id ) { |
5 | 5 | // Un-select previously selected gift |
6 | 6 | if( selected_gift ) { |
7 | | - YAHOO.util.Dom.removeClass( 'give_gift_' + selected_gift, 'g-give-all-selected' ); |
| 7 | + jQuery( '#give_gift_' + selected_gift ).removeClass( 'g-give-all-selected' ); |
8 | 8 | } |
9 | 9 | |
10 | 10 | // Select new gift |
11 | | - YAHOO.util.Dom.addClass( 'give_gift_' + id, 'g-give-all-selected' ); |
| 11 | + jQuery( '#give_gift_' + id ).addClass( 'g-give-all-selected' ); |
12 | 12 | |
13 | 13 | selected_gift = id; |
14 | 14 | } |
15 | 15 | |
16 | 16 | function highlightGift( id ) { |
17 | | - YAHOO.util.Dom.addClass( 'give_gift_' + id, 'g-give-all-highlight' ); |
| 17 | + jQuery( '#give_gift_' + id ).addClass( 'g-give-all-highlight' ); |
18 | 18 | } |
19 | 19 | |
20 | 20 | function unHighlightGift( id ) { |
21 | | - YAHOO.util.Dom.removeClass( 'give_gift_' + id, 'g-give-all-highlight' ); |
| 21 | + jQuery( '#give_gift_' + id ).removeClass( 'g-give-all-highlight' ); |
22 | 22 | } |
23 | 23 | |
24 | 24 | function sendGift() { |