diff --git a/config/public/wp-content/plugins/feedburner-email-widget/readme.txt b/config/public/wp-content/plugins/feedburner-email-widget/readme.txt new file mode 100644 index 000000000..814b03634 --- /dev/null +++ b/config/public/wp-content/plugins/feedburner-email-widget/readme.txt @@ -0,0 +1,101 @@ +=== Feedburner Email Widget === +Contributors: WyriHaximus +Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=webmaster%40wyrihaximus%2enet&item_name=Donation%20to%20wyrihaximus%2enet¤cy_code=EUR&bn=PP%2dDonationsBF&charset=UTF%2d8 +Tags: widget, feed, feedburner, subscription, email +Requires at least: 2.9.0 +Tested up to: 3.5.1 +Stable tag: 1.1.9 + +Allows you to add a Feedburner Email Subscription widget to one of your sidebars. + +== Description == + +Allows you to add a Feedburner Email Subscription widget to one of your sidebars. + +== Installation == + +This section describes how to install the plugin and get it working. + +1. Upload `feedburner-email-widget` to the `/wp-content/plugins/` directory +1. Activate the plugin through the 'Plugins' menu in WordPress +1. Add the widget to a sidebar and fill out atleast the Feedburner feed URL field + +== Frequently Asked Questions == + += The admin widget is very unclear is this going to change? = + +In 1.2 a new admin widget will make it easier to managed your sidebar widget. With a wizzard you can simply select the right options for your blog. Keep an eye on http://blog.wyrihaximus.net/tag/wordpress/ for upcoming details. + +== Screenshots == + +1. Frontend +2. Backend +3. Styling +4. Analytics + +== Changelog == + += 1.1.9 = +* Updated screenshots +* Updated tested up to tag +* Micro mini minor code tweaks +* Added docblocks to all functions + += 1.1.8 = +* Made the "Styling Options" and "Analytic Options" clickable, it was causing some confusion +* Showing pointer above section links in the widget admin + += 1.1.7 = +* New way of determing url querie variables + += 1.1.6 = +* Expanded blog feed detection + += 1.1.5 = +* Removed a double filter call on the widget title. + += 1.1.4 = +* Fixed a bug introduced by 1.1.3 where the widget header doesn't render as it should. +* Added some punctuation to readme.txt + += 1.1.3 = +* Added "Input placeholder text" config option. +* You can now add shortcodes, for more information please see this post: http://blog.wyrihaximus.net/2011/09/shortcode-in-feedburner-email-widget-1-1-3-for-wordpress/ + += 1.1.2 = +* Fixed a undefined index werking. +* Added a Flattr widget. +* Removed Joel as contributer since he stopped getting in touch and help me with this addon. By this message I still want to make sure everyone is aware that he helped on certain bits of this widget. + += 1.1.1 = +* Added id attributes for email input box and subscribe button so it can be style with the CSS settings. + += 1.1.0 = +* Added support for Google Analytics. +* Hiding CSS and Analytics settings by default in the widget admin for a cleaner look. +* Added more comments in the source. + += 1.0.5 = +* Included Joels styling changes. +* Added some basic comments on how the plugin works will add more in 1.0.6. +* Added a link in the widget control for the styling options to my wiki for documentation. + += 1.0.4 = +* Typo regarding the popup. + += 1.0.3 = +* Versioning madness. +* Did a minor code cleanup. + += 1.0.2 = +* Fixed an issue where people got the popup window and send to the subscribe page. + += 1.0.1 = +* Fixed readme.txt. + += 1.0.0 = +* First public release. + +== Upgrade Notice == + +None yet diff --git a/config/public/wp-content/plugins/feedburner-email-widget/screenshot-1.png b/config/public/wp-content/plugins/feedburner-email-widget/screenshot-1.png new file mode 100644 index 000000000..6dd5ad68d Binary files /dev/null and b/config/public/wp-content/plugins/feedburner-email-widget/screenshot-1.png differ diff --git a/config/public/wp-content/plugins/feedburner-email-widget/screenshot-2.png b/config/public/wp-content/plugins/feedburner-email-widget/screenshot-2.png new file mode 100644 index 000000000..d3f1e7e35 Binary files /dev/null and b/config/public/wp-content/plugins/feedburner-email-widget/screenshot-2.png differ diff --git a/config/public/wp-content/plugins/feedburner-email-widget/screenshot-3.png b/config/public/wp-content/plugins/feedburner-email-widget/screenshot-3.png new file mode 100644 index 000000000..c7c197205 Binary files /dev/null and b/config/public/wp-content/plugins/feedburner-email-widget/screenshot-3.png differ diff --git a/config/public/wp-content/plugins/feedburner-email-widget/screenshot-4.png b/config/public/wp-content/plugins/feedburner-email-widget/screenshot-4.png new file mode 100644 index 000000000..0ea923883 Binary files /dev/null and b/config/public/wp-content/plugins/feedburner-email-widget/screenshot-4.png differ diff --git a/config/public/wp-content/plugins/feedburner-email-widget/widget-feedburner-email.php b/config/public/wp-content/plugins/feedburner-email-widget/widget-feedburner-email.php new file mode 100644 index 000000000..abd95407b --- /dev/null +++ b/config/public/wp-content/plugins/feedburner-email-widget/widget-feedburner-email.php @@ -0,0 +1,293 @@ + 'FeedburnerEmailWidget', + 'description' => 'Allows you to add a Feedburner Email Subscription widget to one of your sidebars.', + ); + $this->WP_Widget('FeedburnerEmailWidget', 'Feedburner Email Widget', $widget_ops); + } + + /** + * Build the admin widget manipulation form + * + * @param array $instance + */ + function form($instance) { + $instance = wp_parse_args((array) $instance, array( + 'title' => '', + 'uri' => '', + 'above_email' => '', + 'below_email' => '', + 'email_text_input' => '', + 'subscribe_btn' => '', + 'show_link' => '', + 'form_id' => '', + 'css_style_code' => '', + 'analytics_cat' => '', + 'analytics_act' => '', + 'analytics_lab' => '', + 'analytics_val' => '', + ) + ); + $title = esc_attr($instance['title']); + $uri = esc_attr($instance['uri']); + $above_email = esc_attr($instance['above_email']); + $below_email = esc_attr($instance['below_email']); + $email_text_input = esc_attr($instance['email_text_input']); + $subscribe_btn = esc_attr($instance['subscribe_btn']); + $show_link = esc_attr($instance['show_link']); + $form_id = esc_attr($instance['form_id']); + $css_style_code = esc_attr($instance['css_style_code']); + $analytics_cat = esc_attr($instance['analytics_cat']); + $analytics_act = esc_attr($instance['analytics_act']); + $analytics_lab = esc_attr($instance['analytics_lab']); + $analytics_val = esc_attr($instance['analytics_val']); +?> + - Basic Options
+
+

+

+

+

+

+

+

+
+ + Styling Options
+ + + Analytic Options
+ +
+ + +
+ + +generate($args, $instance); + } + + /** + * Generate the widget + * + * @param array $args Arguments + * @param array $instance + * @return string Generated HTML + */ + function generate($args, $instance) { + extract($args, EXTR_SKIP); + $html = $before_widget; + // Grab the settings from $instance and full them with default values if we can't find any + $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']); + $uri = empty($instance['uri']) ? false : $instance['uri']; + $above_email = empty($instance['above_email']) ? false : $instance['above_email']; + $below_email = empty($instance['below_email']) ? false : $instance['below_email']; + $subscribe_btn = empty($instance['subscribe_btn']) ? 'Subscribe' : $instance['subscribe_btn']; + $email_text_input = empty($instance['email_text_input']) ? '' : $instance['email_text_input']; + $show_link = (isset($instance['show_link']) && $instance['show_link']) ? true : false; + $form_id = empty($instance['form_id']) ? 'feedburner_email_widget_sbef' : $instance['form_id']; + $css_style_code = empty($instance['css_style_code']) ? false : $instance['css_style_code']; + $analytics_cat = empty($instance['analytics_cat']) ? false : $instance['analytics_cat']; + $analytics_act = empty($instance['analytics_act']) ? false : $instance['analytics_act']; + $analytics_lab = empty($instance['analytics_lab']) ? false : $instance['analytics_lab']; + $analytics_val = empty($instance['analytics_val']) ? false : $instance['analytics_val']; + + // Cut out the part we need + $uri = parse_url($uri); + if ($uri['host'] == 'feedburner.google.com' && !empty($uri['query'])) { + $uri = $uri['query']; + parse_str($uri, $queryParams); + } else if ($uri['host'] == 'feeds.feedburner.com' && !empty($uri['path'])) { + $uri = substr($uri['path'], 1, (strlen($uri['path']) -1)); + $queryParams = array( + 'uri' => $uri, + ); + $uri = 'uri=' . $uri; + } else if (!isset($uri['host']) && isset($uri['path'])) { + $queryParams = array( + 'uri' => $uri['path'], + ); + $uri = 'uri=' . $uri['path']; + } else { + $uri = false; + $queryParams = array(); + } + + if ($uri && count($queryParams) > 0) { + + if (!isset($queryParams['loc'])) { + $queryParams['loc'] ='en_US'; + } + + if (!empty($title)) { + if(!isset($before_title)) { + $before_title = ''; + } + if(!isset($after_title)) { + $after_title = ''; + } + $html .= $before_title . trim($title) . $after_title; + } + // Get Style if any + if ($css_style_code) { + $html .=''; + } + // Putting onSubmit code together + $onsubmit = array(); + // Default feedburner window + $onsubmit[] = 'window.open(\'http://feedburner.google.com/fb/a/mailverify?' . $uri . '\', \'popupwindow\', \'scrollbars=yes,width=550,height=520\');'; + // Google Analytics support + if ($analytics_cat && $analytics_act) { + $analytics_array = array(); + $analytics_array[] = '\'' . $analytics_cat . '\''; + $analytics_array[] = '\'' . $analytics_act . '\''; + if ($analytics_lab) { + $analytics_array[] = '\'' . $analytics_lab . '\''; + } + if ($analytics_val) { + $analytics_array[] = $analytics_val; + } + $onsubmit[] = 'if(!(typeof(pageTracker) == \'undefined\')){pageTracker._trackEvent(' . implode(',', $analytics_array) . ');}else{if(!(typeof(_gaq) == \'undefined\')){_gaq.push([' . implode(',', $analytics_array) . ']);}}'; + } + $onsubmit[] = 'return true;'; + // Open Form + $html .= '
'; + if ($above_email) { + $html .= ''; + } + $html .= ' $queryParam) { + $html .= ''; + } + if ($below_email) { + $html .= ''; + } + $html .= ''; + if ($show_link) { + $html .= ''; + } + $html .= '
'; + } + $html .= $after_widget; + // Send the widget to the browser + return $html; + } + +} + +// Tell WordPress about our widget +add_action('widgets_init', create_function('', 'return register_widget(\'FeedburnerEmailWidget\');')); + +/** + * + * @param array $atts Widget attributes + * @return string Generated HTML for the widget + */ +function feedburner_email_widget_shortcode_func($atts) { + return FeedburnerEmailWidget::generate(array(), shortcode_atts(array( + 'title' => ' ', + 'uri' => false, + 'above_email' => false, + 'below_email' => false, + 'subscribe_btn' => 'Subscribe', + 'show_link' => false, + 'form_id' => 'feedburner_email_widget_sbef', + 'css_style_code' => false, + 'analytics_cat' => false, + 'analytics_act' => false, + 'analytics_lab' => false, + 'analytics_val' => false, + ), $atts)); +} +// Add shortcode +add_shortcode('feedburner_email_widget', 'feedburner_email_widget_shortcode_func'); \ No newline at end of file