"; if (!empty($options['grav_x'])) $x = $options['grav_x']; else $x = 80; if (!empty($options['grav_y'])) $y = $options['grav_y']; else $y = 80; if (!empty($options['email']) && $options['grav_on'] == 1) echo ""; if (@$options['grav_on'] == 2) echo ""; echo @$options['text']; echo "
"; echo "
"; echo "
"; for ($i = 0; $i < count($arr_am_titles); $i++) { $tag_id = str_replace(' ','',strtolower($arr_am_titles[$i])); /*if ($i == 0 && @$options['vanityurl_on']) echo ""; else if ($i == 8 && @$options[$tag_id . '_on']) echo ""; else if ($i == 12 && @$options[$tag_id . '_on']) echo ""; else*/ if (@$options[$tag_id . '_on']) echo ""; } if (!empty($options['email']) && $options['email_on']) { $arr_email = explode('@', strtolower($options['email'])); /* ?> "; $label = ""; echo encode_mailto($options['email'],$label); } echo "
"; if (@$options['counter_on']) echo "
"; if (@$options['promote_on'] && 1 == 2) echo "
Wordpress plugins
"; echo "
"; echo $after_widget; } function encode_mailto($mail, $label, $subject = "", $body = "") { $chars = preg_split("//", $mail, -1, PREG_SPLIT_NO_EMPTY); $new_mail = "".$label.""; return $new_mail; } // Widget options function control_aboutme() { global $arr_am_titles, $arr_am_urls; $options = get_option("widget_aboutme"); if (!is_array($options)) { $options = array( 'title' => 'About Me' ); } if (@$_POST['sent'] == 'Y') { $options['title'] = strip_tags(stripslashes($_POST['aboutme-title'])); //$options['text'] = strip_tags(stripslashes($_POST['aboutme-text']),'


'); $options['text'] = stripslashes($_POST['aboutme-text']); $options['email'] = strip_tags(stripslashes(strtolower($_POST['aboutme-email']))); $options['promote_on'] = @$_POST["aboutme-promote_on"]; $options['frame_on'] = @$_POST["aboutme-frame_on"]; $options['alignright_on'] = @$_POST["aboutme-alignright_on"]; $options['email_on'] = @$_POST["aboutme-email_on"]; $options['grav_on'] = @$_POST["aboutme-grav_on"]; $options['grav_x'] = @$_POST["aboutme-grav_x"]; $options['grav_y'] = @$_POST["aboutme-grav_y"]; $options['counter_on'] = @$_POST["aboutme-counter_on"]; $options['vanityurl_on'] = @$_POST["aboutme-vanityurl_on"]; for ($i = 0; $i < count($arr_am_titles); $i++) { $tag_id = str_replace(' ','',strtolower($arr_am_titles[$i])); $options[$tag_id] = $_POST["aboutme-" . $tag_id]; $options[$tag_id . "_on"] = @$_POST["aboutme-" . $tag_id . "_on"]; } if (!empty($_FILES['wp_custom_attachment']['name'])) { // Setup the array of supported file types. In this case, it's just PDF. $supported_types = array('image/jpeg', 'image/png', 'image/gif'); // Get the file type of the upload $arr_file_type = wp_check_filetype(basename($_FILES['wp_custom_attachment']['name'])); $uploaded_type = $arr_file_type['type']; // Check if the type is supported. If not, throw an error. if (in_array($uploaded_type, $supported_types)) { // Use the WordPress API to upload the file $upload = wp_upload_bits($_FILES['wp_custom_attachment']['name'], null, file_get_contents($_FILES['wp_custom_attachment']['tmp_name'])); if (isset($upload['error']) && $upload['error'] != 0) { echo "

There was an error uploading your file. The error is: " . $upload['error'] . "

"; } else { //echo "
"; print_r($upload); echo "
"; if (file_exists($options['image'])) @unlink($options['image']); if (file_exists(str_replace('-avat', '', $options['image']))) @unlink(str_replace('-avat', '', $options['image'])); $thumb = @image_resize($upload['file'], 80, 80, true, 'avat'); if (is_object($thumb)) { echo "

There was an error resize the image

"; $options['image'] = $upload['file']; $options['image_url'] = content_url() . str_replace(WP_CONTENT_DIR, '', $upload['file']); } else if (!file_exists($thumb)) echo "

There was an error resize the image

"; else { $options['image'] = $thumb; $options['image_url'] = content_url() . str_replace(WP_CONTENT_DIR, '', $options['image']); } //echo "
"; print_r($thumb); echo "
"; } // end if/else } else { echo "

The file type that you've uploaded is not an image

"; } } update_option("widget_aboutme", $options); } ?>
*/ ?> " . __('About Me 3000', '') . ""; ?>

Please leave comment...

Help us to improve our plugin. Your feedback will be appreciated. Feel free to post your comment

" . __('Settings', 'settings_h4') . ""; ?>
/>
*/ ?>

/>
x
/>
*/ ?> />
/>
Upload Image
(will be resized to 80x80px)

"; echo 'image'; ?>
Image/Gravatar: > Show nothing
> Show Gravatar
> Show uploaded image
'aboutme-text')); ?>

(YourID)
/>
(YourID)
/>
()
(YourID)
/>

To configure this widget go to (Settings/About Me 3000) or click /wp-admin/options-general.php?page=About-Me'>here

'; echo ('About Me 3000 Plugin notice: Structure of the Social links changed. Please check your links on the settings page'); echo "

"; echo "

Dismiss this notice

"; } } function aboutme3000_init() { if ( isset($_GET['aboutme3000_nag_ignore']) && '0' == $_GET['aboutme3000_nag_ignore'] ) { $user_id = get_current_user_id(); add_user_meta($user_id, 'aboutme3000_nag_ignore', 'true', true); if (wp_get_referer()) { /* Redirects user to where they were before */ wp_safe_redirect(wp_get_referer()); } else { /* This will never happen, I can almost gurantee it, but we should still have it just in case*/ wp_safe_redirect(home_url()); } } } add_action('plugins_loaded', 'init_aboutme3000'); add_action('admin_menu', 'aboutme3000_admin_actions'); add_action('admin_head', 'aboutme3000_remove_media_controls'); add_action('admin_notices', 'aboutme3000_show_message'); add_action('admin_init', 'aboutme3000_init'); ?>