function mngl_request_friend( mingle_url, user_id, friend_id, friend_requested_text ) { mngl_replace_id_with_loading_indicator('friend_request_button-' + friend_id); jQuery.ajax( { type: "POST", url: mingle_url, data: "controller=friends&action=friend_request&user_id=" + user_id + "&friend_id=" + friend_id, success: function(html) { jQuery("#friend_request_button-" + friend_id ).replaceWith( friend_requested_text ); } }); } function mngl_escape(message) { // escape problematic characters -- don't escape utf8 chars return message.replace(/&/g,'%26').replace(/=/g,'%3D').replace(/ /g, '%20').replace(/\?/g, '%3F'); } function mngl_post_to_board( mingle_url, owner_id, author_id, message, controller ) { var mnglparams = jQuery('#mngl-board-post-button').attr('mnglparams'); mngl_replace_id_with_loading_indicator('mngl-board-post-button'); if(mnglparams==undefined) { mnglparams = ''; } jQuery.ajax( { type: "POST", url: mingle_url, data: "controller=" + controller + "&action=post&owner_id=" + owner_id + "&author_id=" + author_id + "&message=" + mngl_escape(message) + mnglparams, success: function(html) { jQuery('.mngl-board').replaceWith('
'+html+'
'); mngl_load_growables(); } }); } function mngl_clear_status(user_id) { mngl_replace_id_with_loading_indicator('mngl-clear-status-button'); jQuery.ajax( { type: "POST", url: '