├── images ├── general.png ├── menu_icon.png ├── information.png ├── fb_like_button.png ├── fb_like_box_count.png ├── fb_like_standard.png ├── fb_like_button_count.png ├── linkedin_like_button_none.png ├── twitter_like_button_none.png ├── twitter_like_button_right.png ├── linkedin_like_button_right.png ├── google_like_button_tall_bubble.png ├── linkedin_like_button_vertical.png ├── twitter_like_button_vertical.png ├── google_like_button_standard_none.png ├── google_like_button_standard_bubble.png └── google_like_button_standard_inline.png ├── languages ├── pwal.mo ├── pwal.po └── pwal.pot ├── tinymce ├── langs │ ├── en_dlg.js │ └── langs.php ├── paywithalike.png └── editor_plugin.js ├── pwal-uninstall.php ├── .gitignore ├── css ├── front.css └── pay-with-a-like-admin.css ├── js ├── pay-with-a-like-admin-statistics.js ├── pay-with-a-like-admin.js ├── jquery.flot.pie.min.js ├── excanvas.min.js ├── jquery.flot.pie.js └── jquery.flot.min.js ├── lib └── facebook-php-sdk │ └── facebook.php ├── changelog.txt ├── README.md └── includes └── class_wd_help_tooltips.php /images/general.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/images/general.png -------------------------------------------------------------------------------- /languages/pwal.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/languages/pwal.mo -------------------------------------------------------------------------------- /tinymce/langs/en_dlg.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n("en.paywithalike", { 2 | title: "Pay With a Like" 3 | }); -------------------------------------------------------------------------------- /images/menu_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/images/menu_icon.png -------------------------------------------------------------------------------- /images/information.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/images/information.png -------------------------------------------------------------------------------- /images/fb_like_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/images/fb_like_button.png -------------------------------------------------------------------------------- /tinymce/paywithalike.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/tinymce/paywithalike.png -------------------------------------------------------------------------------- /images/fb_like_box_count.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/images/fb_like_box_count.png -------------------------------------------------------------------------------- /images/fb_like_standard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/images/fb_like_standard.png -------------------------------------------------------------------------------- /images/fb_like_button_count.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/images/fb_like_button_count.png -------------------------------------------------------------------------------- /images/linkedin_like_button_none.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/images/linkedin_like_button_none.png -------------------------------------------------------------------------------- /images/twitter_like_button_none.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/images/twitter_like_button_none.png -------------------------------------------------------------------------------- /images/twitter_like_button_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/images/twitter_like_button_right.png -------------------------------------------------------------------------------- /images/linkedin_like_button_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/images/linkedin_like_button_right.png -------------------------------------------------------------------------------- /images/google_like_button_tall_bubble.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/images/google_like_button_tall_bubble.png -------------------------------------------------------------------------------- /images/linkedin_like_button_vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/images/linkedin_like_button_vertical.png -------------------------------------------------------------------------------- /images/twitter_like_button_vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/images/twitter_like_button_vertical.png -------------------------------------------------------------------------------- /images/google_like_button_standard_none.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/images/google_like_button_standard_none.png -------------------------------------------------------------------------------- /images/google_like_button_standard_bubble.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/images/google_like_button_standard_bubble.png -------------------------------------------------------------------------------- /images/google_like_button_standard_inline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/pay-with-a-like/master/images/google_like_button_standard_inline.png -------------------------------------------------------------------------------- /pwal-uninstall.php: -------------------------------------------------------------------------------- 1 | query("DELETE FROM " . $wpdb->postmeta . " WHERE meta_key='pwal_method' OR meta_key='pwal_enable' OR meta_key='pwal_excerpt' " ); 11 | } -------------------------------------------------------------------------------- /tinymce/langs/langs.php: -------------------------------------------------------------------------------- 1 | ' + contents + '').css( { 99 | position: 'absolute', 100 | display: 'none', 101 | top: y + 5, 102 | left: x + 5, 103 | border: '1px solid #fdd', 104 | padding: '2px', 105 | 'background-color': '#fee', 106 | opacity: 0.80 107 | }).appendTo("body").fadeIn(200); 108 | } 109 | -------------------------------------------------------------------------------- /lib/facebook-php-sdk/facebook.php: -------------------------------------------------------------------------------- 1 | initSharedSession(); 54 | } 55 | } 56 | 57 | protected static $kSupportedKeys = 58 | array('state', 'code', 'access_token', 'user_id'); 59 | 60 | protected function initSharedSession() { 61 | $cookie_name = $this->getSharedSessionCookieName(); 62 | if (isset($_COOKIE[$cookie_name])) { 63 | $data = $this->parseSignedRequest($_COOKIE[$cookie_name]); 64 | if ($data && !empty($data['domain']) && 65 | self::isAllowedDomain($this->getHttpHost(), $data['domain'])) { 66 | // good case 67 | $this->sharedSessionID = $data['id']; 68 | return; 69 | } 70 | // ignoring potentially unreachable data 71 | } 72 | // evil/corrupt/missing case 73 | $base_domain = $this->getBaseDomain(); 74 | $this->sharedSessionID = md5(uniqid(mt_rand(), true)); 75 | $cookie_value = $this->makeSignedRequest( 76 | array( 77 | 'domain' => $base_domain, 78 | 'id' => $this->sharedSessionID, 79 | ) 80 | ); 81 | $_COOKIE[$cookie_name] = $cookie_value; 82 | if (!headers_sent()) { 83 | $expire = time() + self::FBSS_COOKIE_EXPIRE; 84 | setcookie($cookie_name, $cookie_value, $expire, '/', '.'.$base_domain); 85 | } else { 86 | // @codeCoverageIgnoreStart 87 | self::errorLog( 88 | 'Shared session ID cookie could not be set! You must ensure you '. 89 | 'create the Facebook instance before headers have been sent. This '. 90 | 'will cause authentication issues after the first request.' 91 | ); 92 | // @codeCoverageIgnoreEnd 93 | } 94 | } 95 | 96 | /** 97 | * Provides the implementations of the inherited abstract 98 | * methods. The implementation uses PHP sessions to maintain 99 | * a store for authorization codes, user ids, CSRF states, and 100 | * access tokens. 101 | */ 102 | protected function setPersistentData($key, $value) { 103 | if (!in_array($key, self::$kSupportedKeys)) { 104 | self::errorLog('Unsupported key passed to setPersistentData.'); 105 | return; 106 | } 107 | 108 | $session_var_name = $this->constructSessionVariableName($key); 109 | $_SESSION[$session_var_name] = $value; 110 | } 111 | 112 | protected function getPersistentData($key, $default = false) { 113 | if (!in_array($key, self::$kSupportedKeys)) { 114 | self::errorLog('Unsupported key passed to getPersistentData.'); 115 | return $default; 116 | } 117 | 118 | $session_var_name = $this->constructSessionVariableName($key); 119 | return isset($_SESSION[$session_var_name]) ? 120 | $_SESSION[$session_var_name] : $default; 121 | } 122 | 123 | protected function clearPersistentData($key) { 124 | if (!in_array($key, self::$kSupportedKeys)) { 125 | self::errorLog('Unsupported key passed to clearPersistentData.'); 126 | return; 127 | } 128 | 129 | $session_var_name = $this->constructSessionVariableName($key); 130 | unset($_SESSION[$session_var_name]); 131 | } 132 | 133 | protected function clearAllPersistentData() { 134 | foreach (self::$kSupportedKeys as $key) { 135 | $this->clearPersistentData($key); 136 | } 137 | if ($this->sharedSessionID) { 138 | $this->deleteSharedSessionCookie(); 139 | } 140 | } 141 | 142 | protected function deleteSharedSessionCookie() { 143 | $cookie_name = $this->getSharedSessionCookieName(); 144 | unset($_COOKIE[$cookie_name]); 145 | $base_domain = $this->getBaseDomain(); 146 | setcookie($cookie_name, '', 1, '/', '.'.$base_domain); 147 | } 148 | 149 | protected function getSharedSessionCookieName() { 150 | return self::FBSS_COOKIE_NAME . '_' . $this->getAppId(); 151 | } 152 | 153 | protected function constructSessionVariableName($key) { 154 | $parts = array('fb', $this->getAppId(), $key); 155 | if ($this->sharedSessionID) { 156 | array_unshift($parts, $this->sharedSessionID); 157 | } 158 | return implode('_', $parts); 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /css/pay-with-a-like-admin.css: -------------------------------------------------------------------------------- 1 | div#affdashgraph-wrapper { 2 | margin-top: 10px; 3 | background: #FFFFFF; 4 | padding: 15px; 5 | width: 96%; 6 | } 7 | 8 | div#affdashgraph-wrapper div#affdashgraph { 9 | width: 100%; 10 | padding: 0px; 11 | margin-top: 20px; 12 | min-height: 350px; 13 | background-color: #fff; 14 | margin-bottom: 20px; 15 | } 16 | 17 | #poststuff.pwal-settings input[type="text"] { 18 | width: 90%; 19 | } 20 | 21 | #poststuff.pwal-settings ul#pwal-use-buttons, 22 | #poststuff.pwal-settings ul#pwal-load-scripts { 23 | margin: 0; 24 | padding: 0; 25 | list-style: none; 26 | } 27 | 28 | #poststuff.pwal-settings ul#pwal-use-buttons li, 29 | #poststuff.pwal-settings ul#pwal-load-scripts li { 30 | margin: 0 10px 0 0; 31 | padding: 0; 32 | list-style: none; 33 | float: left; 34 | } 35 | 36 | #poststuff.pwal-settings ul#pwal-use-buttons li label, 37 | #poststuff.pwal-settings ul#pwal-load-scripts li label { 38 | margin-left: 5px; 39 | } 40 | 41 | 42 | #poststuff.pwal-settings ul.pwal-facebook-stlye-options { 43 | width: 100%; 44 | } 45 | 46 | #poststuff.pwal-settings ul.pwal-facebook-stlye-options li { 47 | float:left; 48 | height: 120px; 49 | margin-right: 30px; 50 | } 51 | 52 | #poststuff.pwal-settings ul.pwal-twitter-stlye-options li { 53 | float:left; 54 | height: 120px; 55 | margin-right: 30px; 56 | } 57 | 58 | #poststuff.pwal-settings textarea#pwal_twitter_message { 59 | width: 70%; 60 | height: 150px; 61 | } 62 | 63 | #poststuff.pwal-settings ul.pwal-linkedin-stlye-options li { 64 | float:left; 65 | height: 120px; 66 | margin-right: 30px; 67 | } 68 | 69 | #poststuff.pwal-settings ul.pwal-google-stlye-options li { 70 | float:left; 71 | height: 120px; 72 | margin-right: 30px; 73 | } 74 | 75 | 76 | ul#pwal-social-buttons { 77 | list-style-type: none; 78 | /* margin: 0 auto; */ 79 | padding: 0; 80 | width: 400px; 81 | } 82 | 83 | ul#pwal-social-buttons li.pwal-social-button { 84 | border: 1px solid #666666; 85 | cursor: move; 86 | height: 65px; 87 | margin: 0 3px 3px; 88 | padding: 0.4em; 89 | } 90 | 91 | ul#pwal-social-buttons li.pwal-social-button span.pwal-social-button-title { 92 | float: left; 93 | width: 125px; 94 | } 95 | 96 | ul#pwal-social-buttons li.pwal-social-button span.pwal-social-button-image { 97 | float: left; 98 | width: 100px; 99 | } 100 | 101 | ul#pwal-social-buttons li.pwal-social-button span#pwal-social-button-image-facebook { 102 | background: url("../images/fb_like_box_count.png") no-repeat scroll 50% 0 rgba(0, 0, 0, 0); 103 | height: 65px; 104 | text-indent: -999em; 105 | } 106 | 107 | ul#pwal-social-buttons li.pwal-social-button span#pwal-social-button-image-google { 108 | background: url("../images/google_like_button_tall_bubble.png") no-repeat scroll 50% 0 rgba(0, 0, 0, 0); 109 | height: 65px; 110 | text-indent: -999em; 111 | } 112 | 113 | ul#pwal-social-buttons li.pwal-social-button span#pwal-social-button-image-linkedin { 114 | background: url("../images/linkedin_like_button_vertical.png") no-repeat scroll 50% 0 rgba(0, 0, 0, 0); 115 | height: 65px; 116 | text-indent: -999em; 117 | } 118 | 119 | ul#pwal-social-buttons li span#pwal-social-button-image-twitter { 120 | background: url("../images/twitter_like_button_vertical.png") no-repeat scroll 50% 0 rgba(0, 0, 0, 0); 121 | height: 65px; 122 | text-indent: -999em; 123 | } 124 | 125 | 126 | 127 | 128 | ul#pwal-social-buttons li.pwal-social-button span.pwal-social-button-section { 129 | margin: 0 10px; 130 | } 131 | 132 | ul#pwal-post-types { 133 | margin: 0; 134 | padding: 0; 135 | list-style: none; 136 | } 137 | 138 | ul#pwal-post-types span.pwal-post-type-label { 139 | font-size: 1.1em; 140 | 141 | } 142 | ul#pwal-post-types li { 143 | margin: 0; 144 | padding: 0; 145 | list-style: none; 146 | } 147 | 148 | ul#pwal-post-types li ul { 149 | margin: 0 0 10px 10px; 150 | padding: 0; 151 | list-style: none; 152 | } 153 | 154 | 155 | #pwal_metabox { 156 | 157 | } 158 | 159 | #pwal_metabox.postbox select, 160 | #pwal_metabox.postbox input[type="text"] { 161 | width: 90%; 162 | } 163 | 164 | #pwal_metabox.postbox textarea { 165 | width: 90%; 166 | height: 50px; 167 | } 168 | 169 | table#pwal-facebook-fan-page-listing { 170 | width: 100%; 171 | } 172 | 173 | 174 | table#pwal-facebook-fan-page-listing th.column-pwal-facebook-page-action { 175 | width: 2%; 176 | } 177 | 178 | table#pwal-facebook-fan-page-listing th.column-pwal-facebook-page-info { 179 | text-align: left; 180 | width: 98%; 181 | } 182 | 183 | table#pwal-facebook-fan-page-listing td { 184 | padding: 0; 185 | } 186 | 187 | 188 | table#pwal-facebook-fan-page-listing td.column-pwal-facebook-page-info div.pwal-fan-page-image { 189 | float: left; 190 | margin: 0px 10px 10px 10px; 191 | } 192 | 193 | table#pwal-facebook-fan-page-listing td.column-pwal-facebook-page-info div.pwal-fan-page-name { 194 | font-size: 1.1em; 195 | font-weight: bold; 196 | } 197 | 198 | table#pwal-facebook-fan-page-listing td.column-pwal-facebook-page-info div.pwal-fan-page-url, 199 | table#pwal-facebook-fan-page-listing td.column-pwal-facebook-page-info div.pwal-fan-page-id { 200 | font-size: 0.9em; 201 | font-weight: normal; 202 | 203 | } 204 | 205 | table#pwal-facebook-fan-page-listing td.column-pwal-facebook-page-info div.pwal-fan-page-url .pwal-label, 206 | table#pwal-facebook-fan-page-listing td.column-pwal-facebook-page-info div.pwal-fan-page-id .pwal-label { 207 | font-weight: bold; 208 | } 209 | 210 | table#pwal-facebook-fan-page-listing input[type="text"] { 211 | width: 90%; 212 | margin-left: 10px; 213 | } 214 | 215 | .pwal_wrap .pwal-settings button.pwal-facebook-fan-page-new { 216 | display:none; 217 | } 218 | 219 | .pwal_wrap .pwal-settings ul#pwal_method_options { 220 | margin: 0 60px 0 0; 221 | } 222 | 223 | .pwal_wrap .pwal-settings ul#pwal_method_options li { 224 | margin: 10px 0; 225 | } 226 | 227 | .pwal_wrap .pwal-settings table#pwal-statistics-summary, 228 | .pwal_wrap .pwal-settings table#pwal-statistics-toppages, 229 | .pwal_wrap .pwal-settings table#pwal-statistics-ip-addesses { 230 | width: 100%; 231 | padding: 5px; 232 | } 233 | 234 | .pwal_wrap .pwal-settings table#pwal-statistics-summary thead th, 235 | .pwal_wrap .pwal-settings table#pwal-statistics-toppages thead th, 236 | .pwal_wrap .pwal-settings table#pwal-statistics-ip-addesses { 237 | background-color: #F1F1F1; 238 | border-bottom: #000000; 239 | } 240 | 241 | 242 | .pwal_wrap .pwal-settings table#pwal-statistics-toppages th.column-title, 243 | .pwal_wrap .pwal-settings table#pwal-statistics-summary th.column-title, 244 | .pwal_wrap .pwal-settings table#pwal-statistics-ip-addesses th.column-title { 245 | width: 90%; 246 | } 247 | .pwal_wrap .pwal-settings table#pwal-statistics-toppages th.column-count, 248 | .pwal_wrap .pwal-settings table#pwal-statistics-toppages td.column-count, 249 | .pwal_wrap .pwal-settings table#pwal-statistics-summary th.column-count, 250 | .pwal_wrap .pwal-settings table#pwal-statistics-summary td.column-count, 251 | .pwal_wrap .pwal-settings table#pwal-statistics-ip-addesses th.column-count, 252 | .pwal_wrap .pwal-settings table#pwal-statistics-ip-addesses td.column-count { 253 | width: 10%; 254 | text-align: center; 255 | } -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | v2.0.2 2 | - Fix: remove redundant code 3 | - Fix: update FB API calls 4 | - Fix: improved error checks and flow logic in code 5 | - Fix: incorrect text domain in language files 6 | - Fix: FB like button is not showing 7 | - Fix: Fix js error in Editor mce popup for WP 4.8 8 | - Fix: Fix js error - pwal_data is undefined 9 | 10 | V2.0.1.5: 2015-04-21 11 | - Fixes possible WordPress XSS bug. 12 | 13 | V2.0.1.4: 2014-07-23 14 | - Fixed sql for random page liking 15 | 16 | V2.0.1.3: 2014-05-26 17 | - Added logic to support storing likes into usermeta table for WordPress authenticated users. Thanks @Dave for the suggestion. 18 | 19 | V2.0.1.2: 2014-05-22 20 | - Correct conflict between Pay With a Like and Affiliate graphs. Both use the same plot JavaScript. 21 | 22 | V2.0.1.1: 2014-05-22 23 | - Reworked and combined logic to test if buttons need to be displayed. Prior versions parts where within different logic. 24 | - Added many more debug output message. Mainly helpful for support team when member reporting issues. 25 | - Added new shortcode parameter 'post_url' to pass an alternate URL to be used for the like. Default is the current permalink. This is handy when using the shortcode from a theme template or widget where the URL is not derived from the post loop. 26 | - Corrected issue where the default settings were not being set at the individual post during processing. 27 | 28 | V2.0.1: 2014-05-12 29 | - Added logic to support 'URL to like' for individual post. This allows a custom URL other than the default post URL. 30 | - Added logic to store shortcode hidden content via transient. This is when the button handler tries to load the hidden content via AJAX it has something to display. 31 | - Corrected reported issue to the bot logic. Thanks @Chris. 32 | - Corrected reported issue where site-wide like was not correctly working when using shortcode. 33 | - Modified button handler AJAX logic to allow empty hidden content to be used. 34 | - Modified/Added filter 'pwal_display_buttons' to allow override of processing flag to show/hide PWAL buttons. Added third filter argument to pass content_id. Filter now used for normal excerpt as well as shortcodes. 35 | 36 | V2.0.0.9: 2014-05-06 37 | - Corrected loading of Facebook PHP SDK. Seems other plugins are loading other classes named Facebook which consuses PWAL. Made Facebook class unique to PWAL. 38 | 39 | V2.0.0.8: 2014-04-22 40 | - Corrected reported issue of an extra closing div left orphaned under google plus button section. 41 | - Added logic to use the theme content_width global if defined for the default width of the buttons container. 42 | 43 | V2.0.0.7: 2014-04-22 44 | - Reworked the buttons container structure from unordered list to just divs wrapped in an outer container. This was to make the Facebook comment popup easier to display without scrollbars. 45 | - 46 | V2.0.0.6: 2014-04-17 47 | - Removed Fascebook PHP SDK references as these were only used for testing. All Facebook functionality is made via JavaScript 48 | 49 | V2.0.0.5: 2014-03-25 50 | - Changes to resolve issue with nested shortcodes rendering after like button action. 51 | 52 | V2.0.0.4: 2014-03-11 53 | - More changes to try and resolve multiple Facebook elements loading independant libraries and parsing content. 54 | 55 | V2.0.0.3: 2014-03-11 56 | - Corrected reported issue where the like URL on Twitter was not properly set. 57 | - Refactor some of the related Facebook JavaScript code to get around an issue where other plugins are also loading the Facebook all.js file Asynchronously. 58 | 59 | V2.0.0.2: 2014-03-06 60 | - Refine logic for determining when to show buttons. 61 | - Removed unused Facebook PHP SDK library 62 | - Added filter 'pwal_display_buttons' in content function to allow override of settings. 63 | 64 | V2.0.0.1: 2014-03-04 65 | - Corrected output of DEBUG messages. 66 | - Corrected a report of undefined variable. 67 | 68 | V2.0: 2014-03-04 69 | - Refresh Settings UI. Now has own menu section 70 | - Added deeper support for Facebook API and FQL to check for previous likes. 71 | - Added support for Facebook fan page support. Now if a visitor has liked some defined Facebook page, you can grant them automatic access to your hidden content. 72 | - Many options added to support social button style and layout. 73 | - Added option to set/select language used for buttons if not in the default site lanauge. 74 | - Added support for loading hidden content via AJAX. Should help for WPE and caching plugin issues. 75 | - Added customization options to the post metabox to override defaults. 76 | - Added cool new charts to show statistics for social buttons uages. 77 | - Added cool new chat for single post showing social button usages. 78 | - Added Top 10 Liked statistics table showing most liked posts. 79 | - Added Top 10 IP Addressses statistics table 80 | - Added support for real shortcode via WordPress do_shortcode(). See customization page. No more need to call custom template functions. 81 | 82 | 83 | V1.1.6: 84 | - Loading external JS file to support https. 85 | 86 | V1.1.5: 2013-07-26 87 | - Fixed issue with Facebook API change. 88 | - Added logic to determine if Facebook like was from other like button and not PWAL. Will be ignored. 89 | - Added better support for multi post home and archive pages when using 'URL to be like' setting. 90 | - Added some CSS for list item margins/paddings on PWAL buttons to have more consistent layout. 91 | - Moved all inline JavaScript to external file. Less repeating code as well as IDs. 92 | - Added new global setting to allow wait on Facebook comment popup before reloading page. 93 | - Added URL parameter PWAL_DEBUG to allow debug via JS console log of click actions without setting final cookie. 94 | - Cleanup some of the settings label to make the option details clearer. 95 | 96 | V1.1.4: 2013-05-29 97 | - Added filter 'pwal_is_authorized' to allow external override 98 | 99 | V1.1.3: 100 | - Added CSS to hide Facebook Like Comment form on click 101 | - Added standard WPMU DEV Dashboard update include 102 | 103 | V1.1.2: 104 | - wpmudev_wpal_html function to protect any html code added 105 | - Translation base file is now presented as pwal.pot 106 | - New hooks added 107 | 108 | V1.1.1: 109 | - Added admin warning if plugin is being used in localhost 110 | - Added admin warning if WPLANG is wrong 111 | - Changed priority of the_content filter as 8 112 | - Broken tags in Automatic mode are now automatically repaired 113 | - Possibility to have a custom css file outside the plugin directory added 114 | - css and javascript files are now loaded when necessary 115 | - Fix for xx_XX-YY type locales 116 | - Google popup is now hidden by css as default 117 | 118 | V1.1.0: 119 | - Support for unlimited protected content on a single page 120 | - Basic statistics added 121 | - Possibility to have a custom css file outside the plugin directory added 122 | - wpmudev_wpal function to be used for custom post type templates added 123 | - Deprecated message for PHP5.3 fixed 124 | - Embedded scripts are moved to the footer for W3C and better performance and problems with some themes 125 | - Improvement of UI in post editor and settings page 126 | - Fixed setcookie issue when zero or empty value is entered 127 | 128 | V1.0.0: 129 | - Initial release 130 | 131 | -------------------------------------------------------------------------------- /js/pay-with-a-like-admin.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function() { 2 | 3 | // On the Settings panel for the 'Social Buttons' tab we want to uncheck the load script checkbox if/when a user unchecks the 'use button'. So 4 | // for example if a user unchecks the user Facebook we will automatically uncheck and disable the load facebook button. 5 | jQuery('ul#pwal-use-buttons input.pwal-use-button').click(function () { 6 | var button_id_type = jQuery(this).attr('id').replace('pwal-use-button-', ''); 7 | if (jQuery(this).prop('checked')) { 8 | jQuery('ul#pwal-load-scripts input#pwal-load-script-'+button_id_type).removeAttr("disabled");; 9 | } else { 10 | // $("#captureAudio").prop('checked', false); 11 | jQuery('ul#pwal-load-scripts input#pwal-load-script-'+button_id_type).attr("disabled", true); 12 | jQuery('ul#pwal-load-scripts input#pwal-load-script-'+button_id_type).prop('checked', false); 13 | } 14 | }); 15 | 16 | 17 | if (jQuery('form#pwal-settings-form-pay-with-a-like-buttons ul#pwal-social-buttons').length) { 18 | jQuery( 'form#pwal-settings-form-pay-with-a-like-buttons ul#pwal-social-buttons' ).sortable(); 19 | jQuery( 'form#pwal-settings-form-pay-with-a-like-buttons ul#pwal-social-buttons' ).disableSelection(); 20 | 21 | /* We capture the configure form submit. We want to store the sort order or items and store into a hidden form field to save as user meta */ 22 | jQuery('form#pwal-settings-form-pay-with-a-like-buttons').submit(function() { 23 | 24 | var pwal_social__buttons_sort = ''; 25 | jQuery('form#pwal-settings-form-pay-with-a-like-buttons input.pwal-use-button').each(function() { 26 | 27 | var item_id = jQuery(this).attr('id').replace('pwal-use-button-', ''); 28 | //console.log('item_id['+item_id+']'); 29 | if (pwal_social__buttons_sort.length) { 30 | pwal_social__buttons_sort = pwal_social__buttons_sort+","; 31 | } 32 | pwal_social__buttons_sort = pwal_social__buttons_sort+item_id; 33 | }); 34 | 35 | if (pwal_social__buttons_sort.length) { 36 | jQuery('form#pwal-settings-form-pay-with-a-like-buttons input#pwal-social-button-sort').val(pwal_social__buttons_sort); 37 | } 38 | }); 39 | } 40 | 41 | 42 | jQuery("select#pwal_facebook_auth_polling").change(function() { 43 | if ( jQuery('select#pwal_facebook_auth_polling').val() == "yes" ) { jQuery("tr#pwal_facebook_auth_polling_interval_section").show(); } 44 | else { jQuery("tr#pwal_facebook_auth_polling_interval_section").hide(); } 45 | }); 46 | 47 | jQuery("select#pwal_random").change(function() { 48 | if ( jQuery('select#pwal_random').val() == "true" ) { jQuery("#url_to_like_section").hide(); } 49 | else { jQuery("#url_to_like_section").show(); } 50 | }); 51 | 52 | jQuery("select#pwal_method").change(function() { 53 | if ( jQuery('select#pwal_method').val() == "automatic" ) { jQuery("#excerpt_length").show(); } 54 | else { jQuery("#excerpt_length").hide(); } 55 | }); 56 | 57 | 58 | jQuery("select#pwal_authorized").change(function() { 59 | if ( jQuery('select#pwal_authorized').val() == "true" ) { jQuery("#pwal_level_section").show(); } 60 | else { jQuery("#pwal_level_section").hide(); } 61 | }); 62 | 63 | 64 | 65 | // Manages the Facebook Fan page Add row button 66 | jQuery('button#pwal-facebook-fan-page-add').click(function(event) { 67 | event.preventDefault(); 68 | jQuery('table#pwal-facebook-fan-page-listing tbody>tr:last') 69 | .clone(true) 70 | .insertAfter('table#pwal-facebook-fan-page-listing tbody>tr:last').find('input').each(function() { 71 | jQuery(this).val(''); 72 | }); 73 | }); 74 | 75 | // Manages the Facebook Fan page Remove row button 76 | jQuery('a.pwal-facebook-fan-page-remove').click(function(event) { 77 | event.preventDefault(); 78 | var page_id = jQuery(this).attr('id').replace('pwal-facebook-fan-page-remove-', ''); 79 | //console.log('page_id['+page_id+']'); 80 | if (jQuery('table#pwal-facebook-fan-page-listing tbody tr#row-pwal-facebook-page-action-'+page_id).length) { 81 | jQuery('table#pwal-facebook-fan-page-listing tbody tr#row-pwal-facebook-page-action-'+page_id).remove(); 82 | } 83 | }); 84 | 85 | // On the Global tab sows the Post Types checkboxed and metabox checkboxes. If the post type is not checked or unchecked 86 | // then the show metabox will be unchecked and disabled. 87 | // jQuery('ul#pwal-post-types input.pwal-post-type-item').click(function(event) { 88 | // //event.preventDefault(); 89 | // var post_type = jQuery(this).attr('id').replace('pwal-post-type-', ''); 90 | // if (jQuery(this).is(':checked')) { 91 | // jQuery('ul#pwal-post-types input#pwal-show-meta-'+post_type).attr('disabled', false); 92 | // } else { 93 | // jQuery('ul#pwal-post-types input#pwal-show-meta-'+post_type).attr('checked', false); 94 | // jQuery('ul#pwal-post-types input#pwal-show-meta-'+post_type).attr('disabled', 'disabled'); 95 | // } 96 | // }); 97 | 98 | // On the Social Buttons checkboxes. If the user button is unchecked the load checkbox will be unchecked and disabled. 99 | jQuery('ul#pwal-social-buttons input.pwal-use-button').click(function(event) { 100 | //event.preventDefault(); 101 | var social_button = jQuery(this).attr('id').replace('pwal-use-button-', ''); 102 | //console.log('social_button['+social_button+']'); 103 | if (jQuery(this).is(':checked')) { 104 | jQuery('ul#pwal-social-buttons input#pwal-load-button-'+social_button).attr('disabled', false); 105 | } else { 106 | jQuery('ul#pwal-social-buttons input#pwal-load-button-'+social_button).attr('checked', false); 107 | jQuery('ul#pwal-social-buttons input#pwal-load-button-'+social_button).attr('disabled', 'disabled'); 108 | } 109 | }); 110 | 111 | 112 | pwal_metabox_check(); 113 | 114 | // The following are used on the post editor form metabox shown form PWAL 115 | if (jQuery('#pwal_metabox select#pwal_enable').length) { 116 | jQuery("#pwal_metabox select#pwal_enable").change(function() { 117 | pwal_metabox_check(); 118 | }); 119 | } 120 | if (jQuery('#pwal_metabox select#pwal_method').length) { 121 | jQuery("#pwal_metabox select#pwal_method").change(function() { 122 | pwal_metabox_check(); 123 | }); 124 | } 125 | }); 126 | 127 | function pwal_metabox_check() { 128 | var pwal_enabled = jQuery('#pwal_metabox select#pwal_enable').val(); 129 | if ((pwal_enabled == 'disable') || (pwal_enabled == 'global_disable')) { 130 | 131 | jQuery('#pwal_metabox p#section_pwal_method').hide(); 132 | jQuery('#pwal_metabox p#section_pwal_reload').hide(); 133 | jQuery('#pwal_metabox p#section_pwal_excerpt').hide(); 134 | jQuery('#pwal_metabox p#section_pwal_description').hide(); 135 | jQuery('#pwal_metabox p#section_pwal_container_width').hide(); 136 | jQuery('#pwal_metabox p#section_pwal_url_to_like').hide(); 137 | 138 | jQuery('#content_paywithalike').hide(); 139 | 140 | } else if ((pwal_enabled == 'enable') || (pwal_enabled == 'global_enable')) { 141 | 142 | jQuery('#pwal_metabox p#section_pwal_method').show(); 143 | jQuery('#pwal_metabox p#section_pwal_reload').show(); 144 | jQuery('#pwal_metabox p#section_pwal_excerpt').show(); 145 | jQuery('#pwal_metabox p#section_pwal_description').show(); 146 | jQuery('#pwal_metabox p#section_pwal_container_width').show(); 147 | jQuery('#pwal_metabox p#section_pwal_url_to_like').show(); 148 | 149 | 150 | var pwal_method = jQuery('#pwal_metabox select#pwal_method').val(); 151 | if ((pwal_method == 'automatic') || (pwal_method == 'global_automatic')) { 152 | jQuery('#pwal_metabox p#section_pwal_excerpt').show(); 153 | 154 | } else { 155 | jQuery('#pwal_metabox p#section_pwal_excerpt').hide(); 156 | } 157 | 158 | // Hide the TinyMCE button. 159 | if ((pwal_method == 'tool') || (pwal_method == 'global_tool')) { 160 | jQuery('#content_paywithalike').show(); 161 | jQuery('#pwal_metabox p#section_pwal_description').hide(); 162 | } else { 163 | jQuery('#content_paywithalike').hide(); 164 | jQuery('#pwal_metabox p#section_pwal_description').show(); 165 | } 166 | } 167 | } 168 | -------------------------------------------------------------------------------- /js/jquery.flot.pie.min.js: -------------------------------------------------------------------------------- 1 | (function(b){function c(D){var h=null;var L=null;var n=null;var B=null;var p=null;var M=0;var F=true;var o=10;var w=0.95;var A=0;var d=false;var z=false;var j=[];D.hooks.processOptions.push(g);D.hooks.bindEvents.push(e);function g(O,N){if(N.series.pie.show){N.grid.show=false;if(N.series.pie.label.show=="auto"){if(N.legend.show){N.series.pie.label.show=false}else{N.series.pie.label.show=true}}if(N.series.pie.radius=="auto"){if(N.series.pie.label.show){N.series.pie.radius=3/4}else{N.series.pie.radius=1}}if(N.series.pie.tilt>1){N.series.pie.tilt=1}if(N.series.pie.tilt<0){N.series.pie.tilt=0}O.hooks.processDatapoints.push(E);O.hooks.drawOverlay.push(H);O.hooks.draw.push(r)}}function e(P,N){var O=P.getOptions();if(O.series.pie.show&&O.grid.hoverable){N.unbind("mousemove").mousemove(t)}if(O.series.pie.show&&O.grid.clickable){N.unbind("click").click(l)}}function G(O){var P="";function N(S,T){if(!T){T=0}for(var R=0;Rh.width-n){B=h.width-n}}}function v(O){for(var N=0;N0){R.push({data:[[1,P]],color:N,label:a.series.pie.combine.label,angle:(P*(Math.PI*2))/M,percent:(P/M*100)})}return R}function r(S,Q){if(!L){return}ctx=Q;I();var T=S.getData();var P=0;while(F&&P0){n*=w}P+=1;N();if(a.series.pie.tilt<=0.8){O()}R()}if(P>=o){N();L.prepend('
Could not draw pie with labels contained inside canvas
')}if(S.setSeries&&S.insertLegend){S.setSeries(T);S.insertLegend()}function N(){ctx.clearRect(0,0,h.width,h.height);L.children().filter(".pieLabel, .pieLabelBackground").remove()}function O(){var Z=5;var Y=15;var W=10;var X=0.02;if(a.series.pie.radius>1){var U=a.series.pie.radius}else{var U=n*a.series.pie.radius}if(U>=(h.width/2)-Z||U*a.series.pie.tilt>=(h.height/2)-Y||U<=W){return}ctx.save();ctx.translate(Z,Y);ctx.globalAlpha=X;ctx.fillStyle="#000";ctx.translate(B,p);ctx.scale(1,a.series.pie.tilt);for(var V=1;V<=W;V++){ctx.beginPath();ctx.arc(0,0,U,0,Math.PI*2,false);ctx.fill();U-=V}ctx.restore()}function R(){startAngle=Math.PI*a.series.pie.startAngle;if(a.series.pie.radius>1){var U=a.series.pie.radius}else{var U=n*a.series.pie.radius}ctx.save();ctx.translate(B,p);ctx.scale(1,a.series.pie.tilt);ctx.save();var Y=startAngle;for(var W=0;W1e-9){ctx.moveTo(0,0)}else{if(b.browser.msie){ab-=0.0001}}ctx.arc(0,0,U,Y,Y+ab,false);ctx.closePath();Y+=ab;if(aa){ctx.fill()}else{ctx.stroke()}}function V(){var ac=startAngle;if(a.series.pie.label.radius>1){var Z=a.series.pie.label.radius}else{var Z=n*a.series.pie.label.radius}for(var ab=0;ab=a.series.pie.label.threshold*100){aa(T[ab],ac,ab)}ac+=T[ab].angle}function aa(ap,ai,ag){if(ap.data[0][1]==0){return}var ar=a.legend.labelFormatter,aq,ae=a.series.pie.label.formatter;if(ar){aq=ar(ap.label,ap)}else{aq=ap.label}if(ae){aq=ae(aq,ap)}var aj=((ai+ap.angle)+ai)/2;var ao=B+Math.round(Math.cos(aj)*Z);var am=p+Math.round(Math.sin(aj)*Z)*a.series.pie.tilt;var af=''+aq+"";L.append(af);var an=L.children("#pieLabel"+ag);var ad=(am-an.height()/2);var ah=(ao-an.width()/2);an.css("top",ad);an.css("left",ah);if(0-ad>0||0-ah>0||h.height-(ad+an.height())<0||h.width-(ah+an.width())<0){F=true}if(a.series.pie.label.background.opacity!=0){var ak=a.series.pie.label.background.color;if(ak==null){ak=ap.color}var al="top:"+ad+"px;left:"+ah+"px;";b('
').insertBefore(an).css("opacity",a.series.pie.label.background.opacity)}}}}}function J(N){if(a.series.pie.innerRadius>0){N.save();innerRadius=a.series.pie.innerRadius>1?a.series.pie.innerRadius:n*a.series.pie.innerRadius;N.globalCompositeOperation="destination-out";N.beginPath();N.fillStyle=a.series.pie.stroke.color;N.arc(0,0,innerRadius,0,Math.PI*2,false);N.fill();N.closePath();N.restore();N.save();N.beginPath();N.strokeStyle=a.series.pie.stroke.color;N.arc(0,0,innerRadius,0,Math.PI*2,false);N.stroke();N.closePath();N.restore()}}function s(Q,R){for(var S=false,P=-1,N=Q.length,O=N-1;++P1?O.series.pie.radius:n*O.series.pie.radius;for(var Q=0;Q1?P.series.pie.radius:n*P.series.pie.radius;R.save();R.translate(B,p);R.scale(1,P.series.pie.tilt);for(i=0;i1e-9){R.moveTo(0,0)}R.arc(0,0,N,S.startAngle,S.startAngle+S.angle,false);R.closePath();R.fill()}}}var a={series:{pie:{show:false,radius:"auto",innerRadius:0,startAngle:3/2,tilt:1,offset:{top:0,left:"auto"},stroke:{color:"#FFF",width:1},label:{show:"auto",formatter:function(d,e){return'
'+d+"
"+Math.round(e.percent)+"%
"},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:0.5}}}};b.plot.plugins.push({init:c,options:a,name:"pie",version:"1.0"})})(jQuery); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Pay with a Like 2 | 3 | **INACTIVE NOTICE: This plugin is unsupported by WPMUDEV, we've published it here for those technical types who might want to fork and maintain it for their needs.** 4 | 5 | ## Translations 6 | 7 | Translation files can be found at https://github.com/wpmudev/translations 8 | 9 | ## Pay with a Like lets your visitors exchange a Like, +1, Tweet or share for access to articles, videos, ebooks, coupons – pretty much anything you can dream up. 10 | 11 | 12 | 13 | ![Offer users special rewards for sharing your content.](https://premium.wpmudev.org/wp-content/uploads/2012/05/Front-end-735x470.jpg) 14 | 15 | Offer users special rewards for sharing your content. 16 | 17 | ### Social Share Wall 18 | 19 | It's like a paywall, except you get users to share your website instead of asking for cash. Create a social media buzz that increases sales, builds your client base and boosts search engine rankings. Reward users that share your site. 20 | 21 | ### A Creative Marketing Solution 22 | 23 | Pay with a Like even covers custom post types for creative flexible marketing. Give fans a free music download when they promote your tour schedule or embed a coupon on a [MarketPress](http://premium.wpmudev.org/project/e-commerce/) product page that reveals when the product is shared. 24 | 25 | ![Toggle button style to best fit your site layout.](https://premium.wpmudev.org/wp-content/uploads/2012/05/pay-button-735x470.jpg) 26 | 27 | Toggle button style to best fit your site layout. 28 | 29 | ### Integrate with Any Site 30 | 31 | Works beautifully with any theme and provides a guide for custom CSS to create a perfect fit. Toggle share buttons, pick the best  layout, arrange the order and set a container width that makes your like buttons pop. 32 | 33 | ## Usage 34 | 35 | For help with installing plugins please see our** [Plugin installation guide](https://premium.wpmudev.org/wpmu-manual/installing-regular-plugins-on-wpmu/). ** This plugin can be installed on a per site basis or **Network Activated** but currently does not offer any network wide settings (Each site within the network still controls its own settings). So now you have the plugin and you are raring to go eh! Lets crack on and get it **Activated**. When you first activate it there will be a notice in the top area of the plugins admin: 36 | 37 | ![image](https://premium.wpmudev.org/wp-content/uploads/2012/05/Pay-With-A-Like-Activate-Message.jpg) 38 | 39 | 40 | Its just a friendly reminder to get the plugin settings sorted first. :) Click on the **Settings** link there or go through: _Admin → Settings → Pay With A Like_ 41 | 42 | ### Global Settings 43 | 44 | This is where you get everything set up, some of the options here can be overridden on individual article pages albeit posts, pages, products, or other. 45 | 46 | ![image](https://premium.wpmudev.org/wp-content/uploads/2012/05/Pay-With-a-Like-Settings-General.jpg) 47 | 48 | **Activation For Posts:** 49 | 50 | _**Disabled For All Posts**_ – This will disable _Pay With A Like_ on all posts allowing for you to select which articles are protected on the article editor screen. In other words you can set how each post will work as you create or edit it. 51 | 52 | _**Enabled For All Posts**_ – By default all posts have _Pay With A Like_ enabled, depending on the criteria set in the following options it would mean every post will require a like. 53 | 54 | (If _Selection Tool_ is selected for the option to _Revealed Content Selection Method_ then only content protected with our shortcode will be protected) 55 | 56 | **Activation For Pages:** 57 | 58 | _**Disabled For All Pages**_ – This will disable _Pay With A Like_ on all pages allowing for you to select which articles are protected on the article editor screen in other words you can set how each page will work as you create or edit it. 59 | 60 | _**Enabled For All Pages**_ – By default all pages have _Pay With A Like_ enabled, depending on the criteria set in the following options it would mean every page will require a like. 61 | 62 |  (If _Selection Tool _is selected for the option to _Revealed Content Selection Method _then only content protected with our shortcode will be protected) 63 | 64 | **Activation For Custom Post Types:** 65 | 66 | _**Disabled For All Custom Post Types**_ – This will disable Pay With A Like on all Custom Post Types allowing for you to select which articles are protected on the article editor screen in other words you can set how each Custom Post Type will work as you create or edit it. 67 | 68 | _**Enabled For All Custom Post Types**_ – By default all Custom Post Types have Pay With A Like enabled, depending on the criteria set in the following options it would mean every Custom Post Types will require a like. 69 | 70 | (If _Selection Tool _is selected for the option to _Revealed Content Selection Method _then only content protected with our shortcode will be protected) 71 | 72 | **Revealed Content Selection Method:** 73 | 74 | _This is a rather important part and its crucial you understand what is happening here otherwise you might have issues in seeing why something does or does not work._ 75 | 76 | _**Automatic Excerpt From Content**_ **–** When this option is enabled you will see a box _Except Length (Words)_ This will default to 20 words, you can set that as you please. 77 | 78 | Keep in mind that if you have an article which is less than 20 words then it will not be protected by Pay With A Like and so it will be visible to all. (This does not count when protecting content through shortcodes) 79 | 80 | _**Manual Excerpt From Content**_ **–** If you want greater control over what is shown then this is the better option (unless you use the Selection Tool). Rather than potentially cutting off that vital word or sentence you can use the WordPress in built Excerpt on each article. 81 | 82 | 83 | 84 | ![image](https://premium.wpmudev.org/wp-content/uploads/2012/05/Pay-With-A-Like-Custom-Excerpt.jpg) 85 | 86 | **Use Selection Tool** – With this is selected content will not be protected automatically. The Selection Tool refers to our shortcode button. All content within that shortcode will be protected. 87 | 88 | You will be able to use a custom description which will display above the social networking buttons. 89 | 90 | **Accessibility Settings** 91 | 92 | ![image](https://premium.wpmudev.org/wp-content/uploads/2012/05/Pay-With-a-Like-Settings-Accessibility.jpg) 93 | 94 | 95 | **Enable On The Home Page –** When set to yes all items on the home page will also be protected based on the your global or specific article settings. 96 | 97 | **Enable For Multiple Post Pages** – Enables the plugin for pages (except the home page) which contain content for more than one post/page, e.g. archive, category pages. Some themes use excerpts here so enabling our plugin for these pages may cause strange output. 98 | 99 | **Admin Sees Full Content** – Sometimes you just want to test if content is protected or not. Of course being an admin you would see content by default. This setting will turn that off, so you see what everyone else will see. Default is **Yes** so admins can see all the content unless this is changed. 100 | 101 | **Authorized Users See Content** – This will allow you to give access to users so they can see the content which is protected by our _Paying With A Like_. This one is handy when you want your registered users to have access by default but still have regular users share your site in order to get that special access. 102 | 103 | Another potential use is when you want your staff to have access but still require your members and readers to _Pay With A Like_. 104 | 105 | **User Level Where Authorization Starts** – This will only become available if _Authorized Users See Content_ is set to _yes_. 106 | 107 | You will be able to select which level gets access. 108 | 109 | **Note:** The selected level and all above will get access. 110 | 111 | **Search Bots See Full Content** – If you are wanting search engines to index your protected content you can mark this to Yes. Keep in mind that means your content can potentially be seen publicly through search engines. 112 | 113 | **Cookie Validity Time (Hours)** – Restrict the access time allowed once they like your article. Setting this to zero '**0**' will result in the session ending upon the browser being closed thus forcing them to like again if they want further access later when their visit your site next. 114 | 115 | **Social Button Settings** 116 | 117 | ![image](https://premium.wpmudev.org/wp-content/uploads/2012/05/Pay-With-a-Like-Settings-Social-Button-Settings.jpg) 118 | 119 | **Buttons To Use** – You might not want all the social networks we offer in this plugin so we built in a nifty little feature where you can disable the ones you don't like. Just uncheck them. 120 | 121 | **Load Scripts For** – Occasionally you might find issues when running other plugins or themes with social networking abilities. This is often because they include conflicting javascript. For this reason we built in the option so you can easily disable the javascript for a specific social network. 122 | 123 | **Description Above The Buttons** – Set your default message here to appear above all of the social networking buttons. This can be overridden when using shortcodes to protect content. 124 | 125 | **Site Wide Like** – If you wish for all content throughout your whole site to be revealed upon Paying With A Like on one single article then set this to _Yes_. 126 | 127 | **URL To Be Liked** – By default when articles are liked throughout your site the page they are being liked from will be used to link back to. In some instances you might like to have all backlinks being sent to a specific page on your site, well you can set that link here. Just enter the url. 128 | 129 | **Like Random Page** – When an article is liked, you can send those backlinks to random pages through your website. 130 | 131 | Easy peasy eh! 132 | 133 | ### In the Editor 134 | 135 | The _Pay With A Like_ plugin will work with all Post Types. This includes Posts and Pages in addition to our MarketPress, Directory, Q&A and all other Custom Post Types. Once the settings are done that is pretty much it for blanket cover of your articles so now lets make a new post and take a look at the editor. You will notice two new additional items here, a button and a _Pay With A Like_ area. So for this example it was just a post: Admin --> Posts --> Add New 136 | 137 | ![image](https://premium.wpmudev.org/wp-content/uploads/2012/05/Pay-With-A-Like-Shortcode-Button.jpg) 138 | 139 | When using the selection tool aka shortcode it will generate the following for you: _[pwal id="5206505" description="Custom Description"][/pwal]_ The PWAL ID is uniquely set by the plugin. Click on the button and it will ask you for a description, this is the text which will show above all the social networking buttons. (This will mean the option you set within your settings area will not be relevant here) **Pay With A Like Meta Box** On post pages you will have a new option, if you don't see it then pull down the screen options and ensure it is selected. 140 | 141 | ![image](https://premium.wpmudev.org/wp-content/uploads/2012/05/Pay-With-A-Like-Screen-Options.jpg) 142 | 143 | 144 | **Enabled:** 145 | 146 | **Follow Global Settings –** This will force the article to follow the options you setup within the settings panel earlier. 147 | 148 | **Always Enabled** – This forces _Pay With A Like_ within the article. (Overriding the global settings) 149 | 150 | **Always Disabled** – This will disable _Pay With A Like_ on within the article. (Overriding the global settings) 151 | 152 | **Method:** The Method is how your content is protected, you can choose to use the global options set earlier or do something custom. 153 | 154 | **Follow Global Settings** – Select this option if you wish to use the global options you created in the settings panel 155 | 156 | **Automatic Excerpt** – When selected you will be given an option to enter how many words to show for the excerpt. (Overriding the global settings) This will take the first X amount of words and then display them for the article requiring a Like to see the content. 157 | 158 | 159 | 160 | ![image](https://premium.wpmudev.org/wp-content/uploads/2012/05/Pay-With-A-Like-Meta-Box-Automatic-Excerpt.jpg) 161 | 162 | 163 | **Manual Excerpt** – This will take the manual excerpt entered in the WordPress excerpt box. (Overriding the global settings) 164 | 165 | 166 | 167 | ![image](https://premium.wpmudev.org/wp-content/uploads/2012/05/Pay-With-A-Like-Custom-Excerpt.jpg) 168 | 169 | 170 | **Selection Tool** – With this option you will be able to use the shortcode button to cover specific items within the article body. (Overriding the global settings) 171 | 172 | Here is how it looks from the admin: 173 | 174 | 175 | 176 | ![image](https://premium.wpmudev.org/wp-content/uploads/2012/05/Pay-With-A-Like-Shortcode-Example.jpg) 177 | 178 | 179 | And then on the front end: 180 | 181 | 182 | ![image](https://premium.wpmudev.org/wp-content/uploads/2012/05/Pay-With-A-Like-Protected-Shortcode1.jpg) 183 | 184 | 185 | Notice the custom description is set there? :) 186 | 187 | And thats all there is to it, all that awesome power under the hood with an easy to use and straight forward interface. Simples! : 188 | -------------------------------------------------------------------------------- /includes/class_wd_help_tooltips.php: -------------------------------------------------------------------------------- 1 | 7 | * if (!class_exists('WpmuDev_HelpTooltips')) require_once YOUR_PLUGIN_BASE_DIR . '/lib/external/class_wd_help_tooltips.php'; 8 | * $tips = new WpmuDev_HelpTooltips(); 9 | * $tips->set_icon_url("URL_TO_YOUR_ICON"); 10 | * echo $tips->add_tip("Tip 1 text here"); 11 | * // ... 12 | * echo $tips->add_tip("Tip 2 text here"); 13 | * 14 | * This is a basic usage scenario. 15 | * 16 | * Alternative usage example: 17 | * 18 | * if (!class_exists('WpmuDev_HelpTooltips')) require_once YOUR_PLUGIN_BASE_DIR . '/lib/external/class_wd_help_tooltips.php'; 19 | * $tips = new WpmuDev_HelpTooltips(); 20 | * $tips->set_icon_url("URL_TO_YOUR_ICON"); 21 | * $tips->bind_tip('My tip text here', '.icon32:first ~h2'); 22 | * // Note that you don't echo anything in this usage example - the tip will be 23 | * // added automatically next to the supplied selector (second argument) 24 | * 25 | * This scenario may be useful for e.g. adding our tips to UI elements created by WP or other plugins. 26 | * You can freely alternate between add_tip() and bind_tip() methods, 27 | * just remember to echo add_tip() and *not* echo bind_tip(). 28 | * 29 | * Another alternative usage example, setting tips for multiple pages in one place: 30 | * 31 | * if (!class_exists('WpmuDev_HelpTooltips')) require_once YOUR_PLUGIN_BASE_DIR . '/lib/external/class_wd_help_tooltips.php'; 32 | * // Tips added to $tips1 object will only show on Social Marketing add/edit advert page 33 | * $tips1 = new WpmuDev_HelpTooltips(); 34 | * $tips1->set_icon_url("URL_TO_YOUR_ICON"); 35 | * $tips1->set_screen_id("social_marketing_ad"); 36 | * $tips1->bind_tip('My tip 1 text here', '.icon32:first ~h2'); 37 | * // ... 38 | * // Tips added to $tips2 object will only show on Social Marketing getting started page 39 | * $tips2 = new WpmuDev_HelpTooltips(); 40 | * $tips2->set_icon_url("URL_TO_YOUR_ICON"); 41 | * $tips2->set_screen_id("social_marketing_ad_page_wdsm-get_started"); 42 | * $tips2->bind_tip('My tip 2 text here', '.icon32:first ~h2'); 43 | * 44 | * Using add_tip() method will do nothing in this last scenario, as it doesn't make sense in that context. 45 | * This scenario may be useful for adding tooltips to all pages in one central location. 46 | * E.g. for adding tooltips in a plugin add-on. 47 | */ 48 | 49 | class WpmuDev_HelpTooltips { 50 | 51 | /** 52 | * Holds an array of inline tips: used as dependency inclusion switch. 53 | */ 54 | private $_inline_tips = array(); 55 | 56 | /** 57 | * Holds an array of bound tips: used as dependency inclusion switch and bound tips buffer. 58 | */ 59 | private $_bound_tips = array(); 60 | 61 | /** 62 | * Holds an array of bound tips selectors: used as bound tips selectors buffer. 63 | */ 64 | private $_bound_selectors = array(); 65 | 66 | /** 67 | * Full URL to help icon, which is used as tip anchor 68 | * and as notice background image. 69 | */ 70 | private $_icon_url; 71 | 72 | /** 73 | * Flag that determines do we want to use notices 74 | * (tips expanded on click). 75 | * Defaults to true. 76 | */ 77 | private $_use_notice = true; 78 | 79 | /** 80 | * Limits tip output to a screen (page). 81 | * Optional. 82 | * Works best with bind_tip() method. 83 | */ 84 | private $_screen_id = false; 85 | 86 | /** 87 | * Bind to footer hooks when instantiated. 88 | */ 89 | public function __construct () { 90 | global $wp_version; 91 | $version = preg_replace('/-.*$/', '', $wp_version); 92 | 93 | if (version_compare($version, '3.3', '>=')) { 94 | add_action('admin_footer', array($this, 'add_bound_tips'), 999); 95 | add_action('admin_print_footer_scripts', array($this, 'initialize')); 96 | } 97 | } 98 | 99 | /** 100 | * Sets icon URL. 101 | * @param string $icon_url Full URL to help anchor icon 102 | */ 103 | public function set_icon_url ($icon_url) { 104 | $this->_icon_url = $icon_url; 105 | } 106 | 107 | /** 108 | * Set show notices (tips expanded on click) flag. 109 | * @param bool $use_notice True to use notices (default), false otherwise. 110 | */ 111 | public function set_use_notice ($use_notice=true) { 112 | $this->_use_notice = $use_notice; 113 | } 114 | 115 | /** 116 | * Set screen limiting flag. 117 | * @param $screen_id Screen ID that tips in this object apply to. 118 | */ 119 | public function set_screen_id ($screen_id) { 120 | $this->_screen_id = $screen_id; 121 | } 122 | 123 | /** 124 | * Returns inline tip markup. 125 | * Scenario: for echoing inline tips next to elements on the page. 126 | * Usage example: 127 | * 128 | * echo $tips->add_tip('My tip text here'); 129 | * 130 | * @param string $tip Tip text 131 | * @return string Inline tip markup 132 | */ 133 | public function add_tip ($tip) { 134 | if (!$this->_check_screen()) return false; 135 | $this->_inline_tips[] = $tip; 136 | return $this->_get_tip_markup($tip); 137 | } 138 | 139 | /** 140 | * Binds a tip to selector. 141 | * This is different from inline tips, as you don't have to output them yourself. 142 | * Scenario: for adding help tips next to elements determined by the selector on page load time. 143 | * Usage example: 144 | * 145 | * $tips->bind_tip('My tip text here', '.icon32:first ~h2'); 146 | * 147 | * @param string $tip Tip text 148 | * @param string $selector jQuery selector of the element that tip is related to. 149 | */ 150 | public function bind_tip ($tip, $bind_to_selector) { 151 | $tip_id = 'wpmudev-help-tip-for-' . md5($bind_to_selector); 152 | $this->_bound_tips[$tip_id] = $tip; 153 | $this->_bound_selectors[$tip_id] = $bind_to_selector; 154 | } 155 | 156 | /** 157 | * Bounded tips injection handler. 158 | * Will queue up the bounded tips. 159 | */ 160 | function add_bound_tips () { 161 | if (!$this->_check_screen()) return false; 162 | if (!$this->_bound_tips) return false; 163 | 164 | foreach ($this->_bound_tips as $id => $tip) { 165 | echo $this->_get_tip_markup($tip, 'id="' . $id . '" style=display:none'); 166 | } 167 | } 168 | 169 | /** 170 | * Dependency injection handler. 171 | * Will only add dependencies if there are actual tooltips to show. 172 | */ 173 | function initialize () { 174 | if (!$this->_check_screen()) return false; 175 | if (!$this->_inline_tips && !$this->_bound_tips) return false; 176 | 177 | $this->_print_styles(); 178 | $this->_print_scripts(); 179 | } 180 | 181 | /** 182 | * Screen limitation check. 183 | * @return bool True if we're good to go, false if we're on a wrong screen. 184 | */ 185 | private function _check_screen () { 186 | if (!$this->_screen_id) return true; // No screen dependency 187 | 188 | $screen = get_current_screen(); 189 | if (!is_object($screen)) return false; // Actually older then 3.3 190 | if ($this->_screen_id != @$screen->id) return false; // Not for this screen 191 | 192 | return true; 193 | } 194 | 195 | private function _get_tip_markup ($tip, $arg='') { 196 | return "{$tip}"; 197 | } 198 | 199 | /** 200 | * Private helper method that prints style dependencies. 201 | */ 202 | private function _print_styles () { 203 | // Have we already done this? 204 | if (!defined('WPMUDEV_TOOLTIPS_CSS_ADDED')) define('WPMUDEV_TOOLTIPS_CSS_ADDED', true); 205 | else return false; 206 | 207 | ?> 208 | 273 | _bound_selectors); 286 | 287 | ?> 288 | 459 | 1){j--}if(6*j<1){return i+(Z-i)*6*j}else{if(2*j<1){return Z}else{if(3*j<2){return i+(Z-i)*(2/3-j)*6}else{return i}}}}function Y(Z){var AE,p=1;Z=String(Z);if(Z.charAt(0)=="#"){AE=Z}else{if(/^rgb/.test(Z)){var m=g(Z);var AE="#",AF;for(var j=0;j<3;j++){if(m[j].indexOf("%")!=-1){AF=Math.floor(C(m[j])*255)}else{AF=Number(m[j])}AE+=I[N(AF,0,255)]}p=m[3]}else{if(/^hsl/.test(Z)){var m=g(Z);AE=c(m);p=m[3]}else{AE=B[Z]||Z}}}return{color:AE,alpha:p}}var L={style:"normal",variant:"normal",weight:"normal",size:10,family:"sans-serif"};var f={};function X(Z){if(f[Z]){return f[Z]}var m=document.createElement("div");var j=m.style;try{j.font=Z}catch(i){}return f[Z]={style:j.fontStyle||L.style,variant:j.fontVariant||L.variant,weight:j.fontWeight||L.weight,size:j.fontSize||L.size,family:j.fontFamily||L.family}}function P(j,i){var Z={};for(var AF in j){Z[AF]=j[AF]}var AE=parseFloat(i.currentStyle.fontSize),m=parseFloat(j.size);if(typeof j.size=="number"){Z.size=j.size}else{if(j.size.indexOf("px")!=-1){Z.size=m}else{if(j.size.indexOf("em")!=-1){Z.size=AE*m}else{if(j.size.indexOf("%")!=-1){Z.size=(AE/100)*m}else{if(j.size.indexOf("pt")!=-1){Z.size=m/0.75}else{Z.size=AE}}}}}Z.size*=0.981;return Z}function AA(Z){return Z.style+" "+Z.variant+" "+Z.weight+" "+Z.size+"px "+Z.family}function t(Z){switch(Z){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function W(i){this.m_=V();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=D*1;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=i;var Z=i.ownerDocument.createElement("div");Z.style.width=i.clientWidth+"px";Z.style.height=i.clientHeight+"px";Z.style.overflow="hidden";Z.style.position="absolute";i.appendChild(Z);this.element_=Z;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1}var M=W.prototype;M.clearRect=function(){if(this.textMeasureEl_){this.textMeasureEl_.removeNode(true);this.textMeasureEl_=null}this.element_.innerHTML=""};M.beginPath=function(){this.currentPath_=[]};M.moveTo=function(i,Z){var j=this.getCoords_(i,Z);this.currentPath_.push({type:"moveTo",x:j.x,y:j.y});this.currentX_=j.x;this.currentY_=j.y};M.lineTo=function(i,Z){var j=this.getCoords_(i,Z);this.currentPath_.push({type:"lineTo",x:j.x,y:j.y});this.currentX_=j.x;this.currentY_=j.y};M.bezierCurveTo=function(j,i,AI,AH,AG,AE){var Z=this.getCoords_(AG,AE);var AF=this.getCoords_(j,i);var m=this.getCoords_(AI,AH);e(this,AF,m,Z)};function e(Z,m,j,i){Z.currentPath_.push({type:"bezierCurveTo",cp1x:m.x,cp1y:m.y,cp2x:j.x,cp2y:j.y,x:i.x,y:i.y});Z.currentX_=i.x;Z.currentY_=i.y}M.quadraticCurveTo=function(AG,j,i,Z){var AF=this.getCoords_(AG,j);var AE=this.getCoords_(i,Z);var AH={x:this.currentX_+2/3*(AF.x-this.currentX_),y:this.currentY_+2/3*(AF.y-this.currentY_)};var m={x:AH.x+(AE.x-this.currentX_)/3,y:AH.y+(AE.y-this.currentY_)/3};e(this,AH,m,AE)};M.arc=function(AJ,AH,AI,AE,i,j){AI*=D;var AN=j?"at":"wa";var AK=AJ+U(AE)*AI-F;var AM=AH+J(AE)*AI-F;var Z=AJ+U(i)*AI-F;var AL=AH+J(i)*AI-F;if(AK==Z&&!j){AK+=0.125}var m=this.getCoords_(AJ,AH);var AG=this.getCoords_(AK,AM);var AF=this.getCoords_(Z,AL);this.currentPath_.push({type:AN,x:m.x,y:m.y,radius:AI,xStart:AG.x,yStart:AG.y,xEnd:AF.x,yEnd:AF.y})};M.rect=function(j,i,Z,m){this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath()};M.strokeRect=function(j,i,Z,m){var p=this.currentPath_;this.beginPath();this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath();this.stroke();this.currentPath_=p};M.fillRect=function(j,i,Z,m){var p=this.currentPath_;this.beginPath();this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath();this.fill();this.currentPath_=p};M.createLinearGradient=function(i,m,Z,j){var p=new v("gradient");p.x0_=i;p.y0_=m;p.x1_=Z;p.y1_=j;return p};M.createRadialGradient=function(m,AE,j,i,p,Z){var AF=new v("gradientradial");AF.x0_=m;AF.y0_=AE;AF.r0_=j;AF.x1_=i;AF.y1_=p;AF.r1_=Z;return AF};M.drawImage=function(AO,j){var AH,AF,AJ,AV,AM,AK,AQ,AX;var AI=AO.runtimeStyle.width;var AN=AO.runtimeStyle.height;AO.runtimeStyle.width="auto";AO.runtimeStyle.height="auto";var AG=AO.width;var AT=AO.height;AO.runtimeStyle.width=AI;AO.runtimeStyle.height=AN;if(arguments.length==3){AH=arguments[1];AF=arguments[2];AM=AK=0;AQ=AJ=AG;AX=AV=AT}else{if(arguments.length==5){AH=arguments[1];AF=arguments[2];AJ=arguments[3];AV=arguments[4];AM=AK=0;AQ=AG;AX=AT}else{if(arguments.length==9){AM=arguments[1];AK=arguments[2];AQ=arguments[3];AX=arguments[4];AH=arguments[5];AF=arguments[6];AJ=arguments[7];AV=arguments[8]}else{throw Error("Invalid number of arguments")}}}var AW=this.getCoords_(AH,AF);var m=AQ/2;var i=AX/2;var AU=[];var Z=10;var AE=10;AU.push(" ','","");this.element_.insertAdjacentHTML("BeforeEnd",AU.join(""))};M.stroke=function(AM){var m=10;var AN=10;var AE=5000;var AG={x:null,y:null};var AL={x:null,y:null};for(var AH=0;AHAL.x){AL.x=Z.x}if(AG.y==null||Z.yAL.y){AL.y=Z.y}}}AK.push(' ">');if(!AM){R(this,AK)}else{a(this,AK,AG,AL)}AK.push("");this.element_.insertAdjacentHTML("beforeEnd",AK.join(""))}};function R(j,AE){var i=Y(j.strokeStyle);var m=i.color;var p=i.alpha*j.globalAlpha;var Z=j.lineScale_*j.lineWidth;if(Z<1){p*=Z}AE.push("')}function a(AO,AG,Ah,AP){var AH=AO.fillStyle;var AY=AO.arcScaleX_;var AX=AO.arcScaleY_;var Z=AP.x-Ah.x;var m=AP.y-Ah.y;if(AH instanceof v){var AL=0;var Ac={x:0,y:0};var AU=0;var AK=1;if(AH.type_=="gradient"){var AJ=AH.x0_/AY;var j=AH.y0_/AX;var AI=AH.x1_/AY;var Aj=AH.y1_/AX;var Ag=AO.getCoords_(AJ,j);var Af=AO.getCoords_(AI,Aj);var AE=Af.x-Ag.x;var p=Af.y-Ag.y;AL=Math.atan2(AE,p)*180/Math.PI;if(AL<0){AL+=360}if(AL<0.000001){AL=0}}else{var Ag=AO.getCoords_(AH.x0_,AH.y0_);Ac={x:(Ag.x-Ah.x)/Z,y:(Ag.y-Ah.y)/m};Z/=AY*D;m/=AX*D;var Aa=z.max(Z,m);AU=2*AH.r0_/Aa;AK=2*AH.r1_/Aa-AU}var AS=AH.colors_;AS.sort(function(Ak,i){return Ak.offset-i.offset});var AN=AS.length;var AR=AS[0].color;var AQ=AS[AN-1].color;var AW=AS[0].alpha*AO.globalAlpha;var AV=AS[AN-1].alpha*AO.globalAlpha;var Ab=[];for(var Ae=0;Ae')}else{if(AH instanceof u){if(Z&&m){var AF=-Ah.x;var AZ=-Ah.y;AG.push("')}}else{var Ai=Y(AO.fillStyle);var AT=Ai.color;var Ad=Ai.alpha*AO.globalAlpha;AG.push('')}}}M.fill=function(){this.stroke(true)};M.closePath=function(){this.currentPath_.push({type:"close"})};M.getCoords_=function(j,i){var Z=this.m_;return{x:D*(j*Z[0][0]+i*Z[1][0]+Z[2][0])-F,y:D*(j*Z[0][1]+i*Z[1][1]+Z[2][1])-F}};M.save=function(){var Z={};Q(this,Z);this.aStack_.push(Z);this.mStack_.push(this.m_);this.m_=d(V(),this.m_)};M.restore=function(){if(this.aStack_.length){Q(this.aStack_.pop(),this);this.m_=this.mStack_.pop()}};function H(Z){return isFinite(Z[0][0])&&isFinite(Z[0][1])&&isFinite(Z[1][0])&&isFinite(Z[1][1])&&isFinite(Z[2][0])&&isFinite(Z[2][1])}function y(i,Z,j){if(!H(Z)){return }i.m_=Z;if(j){var p=Z[0][0]*Z[1][1]-Z[0][1]*Z[1][0];i.lineScale_=k(b(p))}}M.translate=function(j,i){var Z=[[1,0,0],[0,1,0],[j,i,1]];y(this,d(Z,this.m_),false)};M.rotate=function(i){var m=U(i);var j=J(i);var Z=[[m,j,0],[-j,m,0],[0,0,1]];y(this,d(Z,this.m_),false)};M.scale=function(j,i){this.arcScaleX_*=j;this.arcScaleY_*=i;var Z=[[j,0,0],[0,i,0],[0,0,1]];y(this,d(Z,this.m_),true)};M.transform=function(p,m,AF,AE,i,Z){var j=[[p,m,0],[AF,AE,0],[i,Z,1]];y(this,d(j,this.m_),true)};M.setTransform=function(AE,p,AG,AF,j,i){var Z=[[AE,p,0],[AG,AF,0],[j,i,1]];y(this,Z,true)};M.drawText_=function(AK,AI,AH,AN,AG){var AM=this.m_,AQ=1000,i=0,AP=AQ,AF={x:0,y:0},AE=[];var Z=P(X(this.font),this.element_);var j=AA(Z);var AR=this.element_.currentStyle;var p=this.textAlign.toLowerCase();switch(p){case"left":case"center":case"right":break;case"end":p=AR.direction=="ltr"?"right":"left";break;case"start":p=AR.direction=="rtl"?"right":"left";break;default:p="left"}switch(this.textBaseline){case"hanging":case"top":AF.y=Z.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":AF.y=-Z.size/2.25;break}switch(p){case"right":i=AQ;AP=0.05;break;case"center":i=AP=AQ/2;break}var AO=this.getCoords_(AI+AF.x,AH+AF.y);AE.push('');if(AG){R(this,AE)}else{a(this,AE,{x:-i,y:0},{x:AP,y:Z.size})}var AL=AM[0][0].toFixed(3)+","+AM[1][0].toFixed(3)+","+AM[0][1].toFixed(3)+","+AM[1][1].toFixed(3)+",0,0";var AJ=K(AO.x/D)+","+K(AO.y/D);AE.push('','','');this.element_.insertAdjacentHTML("beforeEnd",AE.join(""))};M.fillText=function(j,Z,m,i){this.drawText_(j,Z,m,i,false)};M.strokeText=function(j,Z,m,i){this.drawText_(j,Z,m,i,true)};M.measureText=function(j){if(!this.textMeasureEl_){var Z='';this.element_.insertAdjacentHTML("beforeEnd",Z);this.textMeasureEl_=this.element_.lastChild}var i=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(i.createTextNode(j));return{width:this.textMeasureEl_.offsetWidth}};M.clip=function(){};M.arcTo=function(){};M.createPattern=function(i,Z){return new u(i,Z)};function v(Z){this.type_=Z;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[]}v.prototype.addColorStop=function(i,Z){Z=Y(Z);this.colors_.push({offset:i,color:Z.color,alpha:Z.alpha})};function u(i,Z){q(i);switch(Z){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=Z;break;default:n("SYNTAX_ERR")}this.src_=i.src;this.width_=i.width;this.height_=i.height}function n(Z){throw new o(Z)}function q(Z){if(!Z||Z.nodeType!=1||Z.tagName!="IMG"){n("TYPE_MISMATCH_ERR")}if(Z.readyState!="complete"){n("INVALID_STATE_ERR")}}function o(Z){this.code=this[Z];this.message=Z+": DOM Exception "+this.code}var x=o.prototype=new Error;x.INDEX_SIZE_ERR=1;x.DOMSTRING_SIZE_ERR=2;x.HIERARCHY_REQUEST_ERR=3;x.WRONG_DOCUMENT_ERR=4;x.INVALID_CHARACTER_ERR=5;x.NO_DATA_ALLOWED_ERR=6;x.NO_MODIFICATION_ALLOWED_ERR=7;x.NOT_FOUND_ERR=8;x.NOT_SUPPORTED_ERR=9;x.INUSE_ATTRIBUTE_ERR=10;x.INVALID_STATE_ERR=11;x.SYNTAX_ERR=12;x.INVALID_MODIFICATION_ERR=13;x.NAMESPACE_ERR=14;x.INVALID_ACCESS_ERR=15;x.VALIDATION_ERR=16;x.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=E;CanvasRenderingContext2D=W;CanvasGradient=v;CanvasPattern=u;DOMException=o})()}; -------------------------------------------------------------------------------- /js/jquery.flot.pie.js: -------------------------------------------------------------------------------- 1 | /* 2 | Flot plugin for rendering pie charts. The plugin assumes the data is 3 | coming is as a single data value for each series, and each of those 4 | values is a positive value or zero (negative numbers don't make 5 | any sense and will cause strange effects). The data values do 6 | NOT need to be passed in as percentage values because it 7 | internally calculates the total and percentages. 8 | 9 | * Created by Brian Medendorp, June 2009 10 | * Updated November 2009 with contributions from: btburnett3, Anthony Aragues and Xavi Ivars 11 | 12 | * Changes: 13 | 2009-10-22: lineJoin set to round 14 | 2009-10-23: IE full circle fix, donut 15 | 2009-11-11: Added basic hover from btburnett3 - does not work in IE, and center is off in Chrome and Opera 16 | 2009-11-17: Added IE hover capability submitted by Anthony Aragues 17 | 2009-11-18: Added bug fix submitted by Xavi Ivars (issues with arrays when other JS libraries are included as well) 18 | 19 | 20 | Available options are: 21 | series: { 22 | pie: { 23 | show: true/false 24 | radius: 0-1 for percentage of fullsize, or a specified pixel length, or 'auto' 25 | innerRadius: 0-1 for percentage of fullsize or a specified pixel length, for creating a donut effect 26 | startAngle: 0-2 factor of PI used for starting angle (in radians) i.e 3/2 starts at the top, 0 and 2 have the same result 27 | tilt: 0-1 for percentage to tilt the pie, where 1 is no tilt, and 0 is completely flat (nothing will show) 28 | offset: { 29 | top: integer value to move the pie up or down 30 | left: integer value to move the pie left or right, or 'auto' 31 | }, 32 | stroke: { 33 | color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#FFF') 34 | width: integer pixel width of the stroke 35 | }, 36 | label: { 37 | show: true/false, or 'auto' 38 | formatter: a user-defined function that modifies the text/style of the label text 39 | radius: 0-1 for percentage of fullsize, or a specified pixel length 40 | background: { 41 | color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#000') 42 | opacity: 0-1 43 | }, 44 | threshold: 0-1 for the percentage value at which to hide labels (if they're too small) 45 | }, 46 | combine: { 47 | threshold: 0-1 for the percentage value at which to combine slices (if they're too small) 48 | color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#CCC'), if null, the plugin will automatically use the color of the first slice to be combined 49 | label: any text value of what the combined slice should be labeled 50 | } 51 | highlight: { 52 | opacity: 0-1 53 | } 54 | } 55 | } 56 | 57 | More detail and specific examples can be found in the included HTML file. 58 | 59 | */ 60 | 61 | (function ($) 62 | { 63 | function init(plot) // this is the "body" of the plugin 64 | { 65 | var canvas = null; 66 | var target = null; 67 | var maxRadius = null; 68 | var centerLeft = null; 69 | var centerTop = null; 70 | var total = 0; 71 | var redraw = true; 72 | var redrawAttempts = 10; 73 | var shrink = 0.95; 74 | var legendWidth = 0; 75 | var processed = false; 76 | var raw = false; 77 | 78 | // interactive variables 79 | var highlights = []; 80 | 81 | // add hook to determine if pie plugin in enabled, and then perform necessary operations 82 | plot.hooks.processOptions.push(checkPieEnabled); 83 | plot.hooks.bindEvents.push(bindEvents); 84 | 85 | // check to see if the pie plugin is enabled 86 | function checkPieEnabled(plot, options) 87 | { 88 | if (options.series.pie.show) 89 | { 90 | //disable grid 91 | options.grid.show = false; 92 | 93 | // set labels.show 94 | if (options.series.pie.label.show=='auto') 95 | if (options.legend.show) 96 | options.series.pie.label.show = false; 97 | else 98 | options.series.pie.label.show = true; 99 | 100 | // set radius 101 | if (options.series.pie.radius=='auto') 102 | if (options.series.pie.label.show) 103 | options.series.pie.radius = 3/4; 104 | else 105 | options.series.pie.radius = 1; 106 | 107 | // ensure sane tilt 108 | if (options.series.pie.tilt>1) 109 | options.series.pie.tilt=1; 110 | if (options.series.pie.tilt<0) 111 | options.series.pie.tilt=0; 112 | 113 | // add processData hook to do transformations on the data 114 | plot.hooks.processDatapoints.push(processDatapoints); 115 | plot.hooks.drawOverlay.push(drawOverlay); 116 | 117 | // add draw hook 118 | plot.hooks.draw.push(draw); 119 | } 120 | } 121 | 122 | // bind hoverable events 123 | function bindEvents(plot, eventHolder) 124 | { 125 | var options = plot.getOptions(); 126 | 127 | if (options.series.pie.show && options.grid.hoverable) 128 | eventHolder.unbind('mousemove').mousemove(onMouseMove); 129 | 130 | if (options.series.pie.show && options.grid.clickable) 131 | eventHolder.unbind('click').click(onClick); 132 | } 133 | 134 | 135 | // debugging function that prints out an object 136 | function alertObject(obj) 137 | { 138 | var msg = ''; 139 | function traverse(obj, depth) 140 | { 141 | if (!depth) 142 | depth = 0; 143 | for (var i = 0; i < obj.length; ++i) 144 | { 145 | for (var j=0; jcanvas.width-maxRadius) 207 | centerLeft = canvas.width-maxRadius; 208 | } 209 | 210 | function fixData(data) 211 | { 212 | for (var i = 0; i < data.length; ++i) 213 | { 214 | if (typeof(data[i].data)=='number') 215 | data[i].data = [[1,data[i].data]]; 216 | else if (typeof(data[i].data)=='undefined' || typeof(data[i].data[0])=='undefined') 217 | { 218 | if (typeof(data[i].data)!='undefined' && typeof(data[i].data.label)!='undefined') 219 | data[i].label = data[i].data.label; // fix weirdness coming from flot 220 | data[i].data = [[1,0]]; 221 | 222 | } 223 | } 224 | return data; 225 | } 226 | 227 | function combine(data) 228 | { 229 | data = fixData(data); 230 | calcTotal(data); 231 | var combined = 0; 232 | var numCombined = 0; 233 | var color = options.series.pie.combine.color; 234 | 235 | var newdata = []; 236 | for (var i = 0; i < data.length; ++i) 237 | { 238 | // make sure its a number 239 | data[i].data[0][1] = parseFloat(data[i].data[0][1]); 240 | if (!data[i].data[0][1]) 241 | data[i].data[0][1] = 0; 242 | 243 | if (data[i].data[0][1]/total<=options.series.pie.combine.threshold) 244 | { 245 | combined += data[i].data[0][1]; 246 | numCombined++; 247 | if (!color) 248 | color = data[i].color; 249 | } 250 | else 251 | { 252 | newdata.push({ 253 | data: [[1,data[i].data[0][1]]], 254 | color: data[i].color, 255 | label: data[i].label, 256 | angle: (data[i].data[0][1]*(Math.PI*2))/total, 257 | percent: (data[i].data[0][1]/total*100) 258 | }); 259 | } 260 | } 261 | if (numCombined>0) 262 | newdata.push({ 263 | data: [[1,combined]], 264 | color: color, 265 | label: options.series.pie.combine.label, 266 | angle: (combined*(Math.PI*2))/total, 267 | percent: (combined/total*100) 268 | }); 269 | return newdata; 270 | } 271 | 272 | function draw(plot, newCtx) 273 | { 274 | if (!target) return; // if no series were passed 275 | ctx = newCtx; 276 | 277 | setupPie(); 278 | var slices = plot.getData(); 279 | 280 | var attempts = 0; 281 | while (redraw && attempts0) 285 | maxRadius *= shrink; 286 | attempts += 1; 287 | clear(); 288 | if (options.series.pie.tilt<=0.8) 289 | drawShadow(); 290 | drawPie(); 291 | } 292 | if (attempts >= redrawAttempts) { 293 | clear(); 294 | target.prepend('
Could not draw pie with labels contained inside canvas
'); 295 | } 296 | 297 | if ( plot.setSeries && plot.insertLegend ) 298 | { 299 | plot.setSeries(slices); 300 | plot.insertLegend(); 301 | } 302 | 303 | // we're actually done at this point, just defining internal functions at this point 304 | 305 | function clear() 306 | { 307 | ctx.clearRect(0,0,canvas.width,canvas.height); 308 | target.children().filter('.pieLabel, .pieLabelBackground').remove(); 309 | } 310 | 311 | function drawShadow() 312 | { 313 | var shadowLeft = 5; 314 | var shadowTop = 15; 315 | var edge = 10; 316 | var alpha = 0.02; 317 | 318 | // set radius 319 | if (options.series.pie.radius>1) 320 | var radius = options.series.pie.radius; 321 | else 322 | var radius = maxRadius * options.series.pie.radius; 323 | 324 | if (radius>=(canvas.width/2)-shadowLeft || radius*options.series.pie.tilt>=(canvas.height/2)-shadowTop || radius<=edge) 325 | return; // shadow would be outside canvas, so don't draw it 326 | 327 | ctx.save(); 328 | ctx.translate(shadowLeft,shadowTop); 329 | ctx.globalAlpha = alpha; 330 | ctx.fillStyle = '#000'; 331 | 332 | // center and rotate to starting position 333 | ctx.translate(centerLeft,centerTop); 334 | ctx.scale(1, options.series.pie.tilt); 335 | 336 | //radius -= edge; 337 | for (var i=1; i<=edge; i++) 338 | { 339 | ctx.beginPath(); 340 | ctx.arc(0,0,radius,0,Math.PI*2,false); 341 | ctx.fill(); 342 | radius -= i; 343 | } 344 | 345 | ctx.restore(); 346 | } 347 | 348 | function drawPie() 349 | { 350 | startAngle = Math.PI*options.series.pie.startAngle; 351 | 352 | // set radius 353 | if (options.series.pie.radius>1) 354 | var radius = options.series.pie.radius; 355 | else 356 | var radius = maxRadius * options.series.pie.radius; 357 | 358 | // center and rotate to starting position 359 | ctx.save(); 360 | ctx.translate(centerLeft,centerTop); 361 | ctx.scale(1, options.series.pie.tilt); 362 | //ctx.rotate(startAngle); // start at top; -- This doesn't work properly in Opera 363 | 364 | // draw slices 365 | ctx.save(); 366 | var currentAngle = startAngle; 367 | for (var i = 0; i < slices.length; ++i) 368 | { 369 | slices[i].startAngle = currentAngle; 370 | drawSlice(slices[i].angle, slices[i].color, true); 371 | } 372 | ctx.restore(); 373 | 374 | // draw slice outlines 375 | ctx.save(); 376 | ctx.lineWidth = options.series.pie.stroke.width; 377 | currentAngle = startAngle; 378 | for (var i = 0; i < slices.length; ++i) 379 | drawSlice(slices[i].angle, options.series.pie.stroke.color, false); 380 | ctx.restore(); 381 | 382 | // draw donut hole 383 | drawDonutHole(ctx); 384 | 385 | // draw labels 386 | if (options.series.pie.label.show) 387 | drawLabels(); 388 | 389 | // restore to original state 390 | ctx.restore(); 391 | 392 | function drawSlice(angle, color, fill) 393 | { 394 | if (angle<=0) 395 | return; 396 | 397 | if (fill) 398 | ctx.fillStyle = color; 399 | else 400 | { 401 | ctx.strokeStyle = color; 402 | ctx.lineJoin = 'round'; 403 | } 404 | 405 | ctx.beginPath(); 406 | if (Math.abs(angle - Math.PI*2) > 0.000000001) 407 | ctx.moveTo(0,0); // Center of the pie 408 | else if ($.browser.msie) 409 | angle -= 0.0001; 410 | //ctx.arc(0,0,radius,0,angle,false); // This doesn't work properly in Opera 411 | ctx.arc(0,0,radius,currentAngle,currentAngle+angle,false); 412 | ctx.closePath(); 413 | //ctx.rotate(angle); // This doesn't work properly in Opera 414 | currentAngle += angle; 415 | 416 | if (fill) 417 | ctx.fill(); 418 | else 419 | ctx.stroke(); 420 | } 421 | 422 | function drawLabels() 423 | { 424 | var currentAngle = startAngle; 425 | 426 | // set radius 427 | if (options.series.pie.label.radius>1) 428 | var radius = options.series.pie.label.radius; 429 | else 430 | var radius = maxRadius * options.series.pie.label.radius; 431 | 432 | for (var i = 0; i < slices.length; ++i) 433 | { 434 | if (slices[i].percent >= options.series.pie.label.threshold*100) 435 | drawLabel(slices[i], currentAngle, i); 436 | currentAngle += slices[i].angle; 437 | } 438 | 439 | function drawLabel(slice, startAngle, index) 440 | { 441 | if (slice.data[0][1]==0) 442 | return; 443 | 444 | // format label text 445 | var lf = options.legend.labelFormatter, text, plf = options.series.pie.label.formatter; 446 | if (lf) 447 | text = lf(slice.label, slice); 448 | else 449 | text = slice.label; 450 | if (plf) 451 | text = plf(text, slice); 452 | 453 | var halfAngle = ((startAngle+slice.angle) + startAngle)/2; 454 | var x = centerLeft + Math.round(Math.cos(halfAngle) * radius); 455 | var y = centerTop + Math.round(Math.sin(halfAngle) * radius) * options.series.pie.tilt; 456 | 457 | var html = '' + text + ""; 458 | target.append(html); 459 | var label = target.children('#pieLabel'+index); 460 | var labelTop = (y - label.height()/2); 461 | var labelLeft = (x - label.width()/2); 462 | label.css('top', labelTop); 463 | label.css('left', labelLeft); 464 | 465 | // check to make sure that the label is not outside the canvas 466 | if (0-labelTop>0 || 0-labelLeft>0 || canvas.height-(labelTop+label.height())<0 || canvas.width-(labelLeft+label.width())<0) 467 | redraw = true; 468 | 469 | if (options.series.pie.label.background.opacity != 0) { 470 | // put in the transparent background separately to avoid blended labels and label boxes 471 | var c = options.series.pie.label.background.color; 472 | if (c == null) { 473 | c = slice.color; 474 | } 475 | var pos = 'top:'+labelTop+'px;left:'+labelLeft+'px;'; 476 | $('
').insertBefore(label).css('opacity', options.series.pie.label.background.opacity); 477 | } 478 | } // end individual label function 479 | } // end drawLabels function 480 | } // end drawPie function 481 | } // end draw function 482 | 483 | // Placed here because it needs to be accessed from multiple locations 484 | function drawDonutHole(layer) 485 | { 486 | // draw donut hole 487 | if(options.series.pie.innerRadius > 0) 488 | { 489 | // subtract the center 490 | layer.save(); 491 | innerRadius = options.series.pie.innerRadius > 1 ? options.series.pie.innerRadius : maxRadius * options.series.pie.innerRadius; 492 | layer.globalCompositeOperation = 'destination-out'; // this does not work with excanvas, but it will fall back to using the stroke color 493 | layer.beginPath(); 494 | layer.fillStyle = options.series.pie.stroke.color; 495 | layer.arc(0,0,innerRadius,0,Math.PI*2,false); 496 | layer.fill(); 497 | layer.closePath(); 498 | layer.restore(); 499 | 500 | // add inner stroke 501 | layer.save(); 502 | layer.beginPath(); 503 | layer.strokeStyle = options.series.pie.stroke.color; 504 | layer.arc(0,0,innerRadius,0,Math.PI*2,false); 505 | layer.stroke(); 506 | layer.closePath(); 507 | layer.restore(); 508 | // TODO: add extra shadow inside hole (with a mask) if the pie is tilted. 509 | } 510 | } 511 | 512 | //-- Additional Interactive related functions -- 513 | 514 | function isPointInPoly(poly, pt) 515 | { 516 | for(var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i) 517 | ((poly[i][1] <= pt[1] && pt[1] < poly[j][1]) || (poly[j][1] <= pt[1] && pt[1]< poly[i][1])) 518 | && (pt[0] < (poly[j][0] - poly[i][0]) * (pt[1] - poly[i][1]) / (poly[j][1] - poly[i][1]) + poly[i][0]) 519 | && (c = !c); 520 | return c; 521 | } 522 | 523 | function findNearbySlice(mouseX, mouseY) 524 | { 525 | var slices = plot.getData(), 526 | options = plot.getOptions(), 527 | radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius; 528 | 529 | for (var i = 0; i < slices.length; ++i) 530 | { 531 | var s = slices[i]; 532 | 533 | if(s.pie.show) 534 | { 535 | ctx.save(); 536 | ctx.beginPath(); 537 | ctx.moveTo(0,0); // Center of the pie 538 | //ctx.scale(1, options.series.pie.tilt); // this actually seems to break everything when here. 539 | ctx.arc(0,0,radius,s.startAngle,s.startAngle+s.angle,false); 540 | ctx.closePath(); 541 | x = mouseX-centerLeft; 542 | y = mouseY-centerTop; 543 | if(ctx.isPointInPath) 544 | { 545 | if (ctx.isPointInPath(mouseX-centerLeft, mouseY-centerTop)) 546 | { 547 | //alert('found slice!'); 548 | ctx.restore(); 549 | return {datapoint: [s.percent, s.data], dataIndex: 0, series: s, seriesIndex: i}; 550 | } 551 | } 552 | else 553 | { 554 | // excanvas for IE doesn;t support isPointInPath, this is a workaround. 555 | p1X = (radius * Math.cos(s.startAngle)); 556 | p1Y = (radius * Math.sin(s.startAngle)); 557 | p2X = (radius * Math.cos(s.startAngle+(s.angle/4))); 558 | p2Y = (radius * Math.sin(s.startAngle+(s.angle/4))); 559 | p3X = (radius * Math.cos(s.startAngle+(s.angle/2))); 560 | p3Y = (radius * Math.sin(s.startAngle+(s.angle/2))); 561 | p4X = (radius * Math.cos(s.startAngle+(s.angle/1.5))); 562 | p4Y = (radius * Math.sin(s.startAngle+(s.angle/1.5))); 563 | p5X = (radius * Math.cos(s.startAngle+s.angle)); 564 | p5Y = (radius * Math.sin(s.startAngle+s.angle)); 565 | arrPoly = [[0,0],[p1X,p1Y],[p2X,p2Y],[p3X,p3Y],[p4X,p4Y],[p5X,p5Y]]; 566 | arrPoint = [x,y]; 567 | // TODO: perhaps do some mathmatical trickery here with the Y-coordinate to compensate for pie tilt? 568 | if(isPointInPoly(arrPoly, arrPoint)) 569 | { 570 | ctx.restore(); 571 | return {datapoint: [s.percent, s.data], dataIndex: 0, series: s, seriesIndex: i}; 572 | } 573 | } 574 | ctx.restore(); 575 | } 576 | } 577 | 578 | return null; 579 | } 580 | 581 | function onMouseMove(e) 582 | { 583 | triggerClickHoverEvent('plothover', e); 584 | } 585 | 586 | function onClick(e) 587 | { 588 | triggerClickHoverEvent('plotclick', e); 589 | } 590 | 591 | // trigger click or hover event (they send the same parameters so we share their code) 592 | function triggerClickHoverEvent(eventname, e) 593 | { 594 | var offset = plot.offset(), 595 | canvasX = parseInt(e.pageX - offset.left), 596 | canvasY = parseInt(e.pageY - offset.top), 597 | item = findNearbySlice(canvasX, canvasY); 598 | 599 | if (options.grid.autoHighlight) 600 | { 601 | // clear auto-highlights 602 | for (var i = 0; i < highlights.length; ++i) 603 | { 604 | var h = highlights[i]; 605 | if (h.auto == eventname && !(item && h.series == item.series)) 606 | unhighlight(h.series); 607 | } 608 | } 609 | 610 | // highlight the slice 611 | if (item) 612 | highlight(item.series, eventname); 613 | 614 | // trigger any hover bind events 615 | var pos = { pageX: e.pageX, pageY: e.pageY }; 616 | target.trigger(eventname, [ pos, item ]); 617 | } 618 | 619 | function highlight(s, auto) 620 | { 621 | if (typeof s == "number") 622 | s = series[s]; 623 | 624 | var i = indexOfHighlight(s); 625 | if (i == -1) 626 | { 627 | highlights.push({ series: s, auto: auto }); 628 | plot.triggerRedrawOverlay(); 629 | } 630 | else if (!auto) 631 | highlights[i].auto = false; 632 | } 633 | 634 | function unhighlight(s) 635 | { 636 | if (s == null) 637 | { 638 | highlights = []; 639 | plot.triggerRedrawOverlay(); 640 | } 641 | 642 | if (typeof s == "number") 643 | s = series[s]; 644 | 645 | var i = indexOfHighlight(s); 646 | if (i != -1) 647 | { 648 | highlights.splice(i, 1); 649 | plot.triggerRedrawOverlay(); 650 | } 651 | } 652 | 653 | function indexOfHighlight(s) 654 | { 655 | for (var i = 0; i < highlights.length; ++i) 656 | { 657 | var h = highlights[i]; 658 | if (h.series == s) 659 | return i; 660 | } 661 | return -1; 662 | } 663 | 664 | function drawOverlay(plot, octx) 665 | { 666 | //alert(options.series.pie.radius); 667 | var options = plot.getOptions(); 668 | //alert(options.series.pie.radius); 669 | 670 | var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius; 671 | 672 | octx.save(); 673 | octx.translate(centerLeft, centerTop); 674 | octx.scale(1, options.series.pie.tilt); 675 | 676 | for (i = 0; i < highlights.length; ++i) 677 | drawHighlight(highlights[i].series); 678 | 679 | drawDonutHole(octx); 680 | 681 | octx.restore(); 682 | 683 | function drawHighlight(series) 684 | { 685 | if (series.angle < 0) return; 686 | 687 | //octx.fillStyle = parseColor(options.series.pie.highlight.color).scale(null, null, null, options.series.pie.highlight.opacity).toString(); 688 | octx.fillStyle = "rgba(255, 255, 255, "+options.series.pie.highlight.opacity+")"; // this is temporary until we have access to parseColor 689 | 690 | octx.beginPath(); 691 | if (Math.abs(series.angle - Math.PI*2) > 0.000000001) 692 | octx.moveTo(0,0); // Center of the pie 693 | octx.arc(0,0,radius,series.startAngle,series.startAngle+series.angle,false); 694 | octx.closePath(); 695 | octx.fill(); 696 | } 697 | 698 | } 699 | 700 | } // end init (plugin body) 701 | 702 | // define pie specific options and their default values 703 | var options = { 704 | series: { 705 | pie: { 706 | show: false, 707 | radius: 'auto', // actual radius of the visible pie (based on full calculated radius if <=1, or hard pixel value) 708 | innerRadius:0, /* for donut */ 709 | startAngle: 3/2, 710 | tilt: 1, 711 | offset: { 712 | top: 0, 713 | left: 'auto' 714 | }, 715 | stroke: { 716 | color: '#FFF', 717 | width: 1 718 | }, 719 | label: { 720 | show: 'auto', 721 | formatter: function(label, slice){ 722 | return '
'+label+'
'+Math.round(slice.percent)+'%
'; 723 | }, // formatter function 724 | radius: 1, // radius at which to place the labels (based on full calculated radius if <=1, or hard pixel value) 725 | background: { 726 | color: null, 727 | opacity: 0 728 | }, 729 | threshold: 0 // percentage at which to hide the label (i.e. the slice is too narrow) 730 | }, 731 | combine: { 732 | threshold: -1, // percentage at which to combine little slices into one larger slice 733 | color: null, // color to give the new slice (auto-generated if null) 734 | label: 'Other' // label to give the new slice 735 | }, 736 | highlight: { 737 | //color: '#FFF', // will add this functionality once parseColor is available 738 | opacity: 0.5 739 | } 740 | } 741 | } 742 | }; 743 | 744 | $.plot.plugins.push({ 745 | init: init, 746 | options: options, 747 | name: "pie", 748 | version: "1.0" 749 | }); 750 | })(jQuery); 751 | -------------------------------------------------------------------------------- /languages/pwal.po: -------------------------------------------------------------------------------- 1 | # Translation of the WordPress plugin Pay With a Like 2.0.1.3 by WPMU DEV. 2 | # Copyright (C) 2014 WPMU DEV 3 | # This file is distributed under the same license as the Pay With a Like package. 4 | # FIRST AUTHOR , 2014. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: Pay With a Like 2.0.1.3\n" 9 | "Report-Msgid-Bugs-To: http://wordpress.org/tag/pay-with-a-like\n" 10 | "POT-Creation-Date: 2014-05-27 07:20-0500\n" 11 | "PO-Revision-Date: 2014-05-27 08:22-0500\n" 12 | "Last-Translator: Paul Menard \n" 13 | "Language-Team: \n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "X-Poedit-Language: English\n" 18 | 19 | #: includes/class_wd_help_tooltips.php:296 20 | msgid "Help" 21 | msgstr "" 22 | 23 | #: lib/pwal_admin_panels.php:8 24 | msgid "Where to show Pay With a Like Buttons" 25 | msgstr "" 26 | 27 | #: lib/pwal_admin_panels.php:10 28 | msgid "Pay With a Like allows protecting posts or parts of posts until the visitor clicks the action button to show the protected content. These settings provide a quick way to set Pay With a Like for your posts and pages. They can be overridden on a per post basis using the post editor metabox." 29 | msgstr "" 30 | 31 | #: lib/pwal_admin_panels.php:12 32 | msgid "Enabled for All - When checked will include all of the selected posts when displaying the Pay With a Like buttons. If unchecked you can still enable individual posts via the Pay With a Like metabox shown on the post editor screen." 33 | msgstr "" 34 | 35 | #: lib/pwal_admin_panels.php:13 36 | msgid "Show Metabox - When checked will display Pay With a Like metabox on the post editor screen." 37 | msgstr "" 38 | 39 | #: lib/pwal_admin_panels.php:17 40 | msgid "Activation for post types" 41 | msgstr "" 42 | 43 | #: lib/pwal_admin_panels.php:45 44 | msgid "Enable for all" 45 | msgstr "" 46 | 47 | #: lib/pwal_admin_panels.php:49 48 | msgid "Show Metabox" 49 | msgstr "" 50 | 51 | #: lib/pwal_admin_panels.php:69 52 | msgid "Default settings for Pay With a Like content protection" 53 | msgstr "" 54 | 55 | #: lib/pwal_admin_panels.php:71 56 | msgid "This section lets you define the default content handling for all post types. You will be able to override these settings on individual posts via the editor screen if you have checked Show Metabox above for that post type." 57 | msgstr "" 58 | 59 | #: lib/pwal_admin_panels.php:74 60 | msgid "Revealed content selection method" 61 | msgstr "" 62 | 63 | #: lib/pwal_admin_panels.php:77 64 | msgid "Automatic Excerpt - This option will create an automatic excertp from the content to show users. You can control the excerpt length." 65 | msgstr "" 66 | 67 | #: lib/pwal_admin_panels.php:78 68 | msgid "Manual Excerpt - This option tells the plugin to use the excerpt field from the post. Note the post type must support the Excerpt field. Some post types like Pages do not. This option will default to automatic if the post types do not support the Excerpt field." 69 | msgstr "" 70 | 71 | #: lib/pwal_admin_panels.php:79 72 | msgid "Select Excerpt - This option allows you to manually select text within your post content for the hidden content. Using this tool you will see the button on the Visual editor toolbar. The hidden content can be anywhere within your content. You are not limited to the beginning or end of the content like with excerpts." 73 | msgstr "" 74 | 75 | #: lib/pwal_admin_panels.php:85 76 | #: pay-with-a-like.php:2078 77 | msgid "Excerpt length (words)" 78 | msgstr "" 79 | 80 | #: lib/pwal_admin_panels.php:87 81 | msgid "Number of words of the post content that will be displayed publicly. Only effective if Automatic excerpt is selected. And if the post content length is longer than the set number of words." 82 | msgstr "" 83 | 84 | #: lib/pwal_admin_panels.php:93 85 | msgid "Description above the buttons" 86 | msgstr "" 87 | 88 | #: lib/pwal_admin_panels.php:95 89 | msgid "You may want to write something here that will encourage the visitor to click a button. You may customize this message on the individual post editor metabox." 90 | msgstr "" 91 | 92 | #: lib/pwal_admin_panels.php:101 93 | msgid "Reload Content on Like" 94 | msgstr "" 95 | 96 | #: lib/pwal_admin_panels.php:104 97 | msgid "When a user clicks the Pay With a Like buttons the content the hidden content can be revealed by full page refresh or AJAX load. For AJAX the Pay With a Like button will be removed and replaced with the new content. Note this option is still experimental and depending on the complexity of the content being shown may not work. You will be able to change this setting at the individual content level." 98 | msgstr "" 99 | 100 | #: lib/pwal_admin_panels.php:107 101 | msgid "Page refresh" 102 | msgstr "" 103 | 104 | #: lib/pwal_admin_panels.php:108 105 | #: pay-with-a-like.php:2114 106 | msgid "AJAX" 107 | msgstr "" 108 | 109 | #: lib/pwal_admin_panels.php:122 110 | msgid "Buttons Container Settings" 111 | msgstr "" 112 | 113 | #: lib/pwal_admin_panels.php:124 114 | msgid "This section give you some control over the container box wrapped around the social buttons." 115 | msgstr "" 116 | 117 | #: lib/pwal_admin_panels.php:127 118 | msgid "Width" 119 | msgstr "" 120 | 121 | #: lib/pwal_admin_panels.php:129 122 | msgid "By default the Pay With a Like button container is added below or within the post content. The width defaults to the theme content_width variable if defined. If not it is set to 100%. If for some reason the width does not work well for your theme you can specify the alternate container width here. You may also override this on the individual posts." 123 | msgstr "" 124 | 125 | #: lib/pwal_admin_panels.php:170 126 | msgid "Buttons Visibility Settings" 127 | msgstr "" 128 | 129 | #: lib/pwal_admin_panels.php:174 130 | msgid "Enable on the home page" 131 | msgstr "" 132 | 133 | #: lib/pwal_admin_panels.php:176 134 | msgid "Enables the plugin for the home page. If you are displaying latest posts or some similar category archive enabling this will show the buttons on each post. If this option is not enabled the full content will be shown. If you are instead showing a static page you will control the buttons via that page form. Some themes use excerpts here so enabling plugin for these pages may cause strange output." 135 | msgstr "" 136 | 137 | #: lib/pwal_admin_panels.php:178 138 | #: lib/pwal_admin_panels.php:189 139 | msgid "Yes, show buttons" 140 | msgstr "" 141 | 142 | #: lib/pwal_admin_panels.php:179 143 | #: lib/pwal_admin_panels.php:190 144 | msgid "No, show full content" 145 | msgstr "" 146 | 147 | #: lib/pwal_admin_panels.php:185 148 | msgid "Enable for multiple post pages" 149 | msgstr "" 150 | 151 | #: lib/pwal_admin_panels.php:187 152 | msgid "Enables the plugin for pages (except the home page) which contain content for more that one post/page, e.g. archive, category pages. Some themes use excerpts here so enabling plugin for these pages may cause strange output. " 153 | msgstr "" 154 | 155 | #: lib/pwal_admin_panels.php:196 156 | msgid "Admin sees full content" 157 | msgstr "" 158 | 159 | #: lib/pwal_admin_panels.php:198 160 | msgid "You may want to select No for test purposes." 161 | msgstr "" 162 | 163 | #: lib/pwal_admin_panels.php:200 164 | #: lib/pwal_admin_panels.php:211 165 | #: lib/pwal_admin_panels.php:253 166 | #: lib/pwal_admin_panels.php:273 167 | #: lib/pwal_admin_panels.php:291 168 | #: lib/pwal_admin_panels.php:303 169 | #: lib/pwal_admin_panels.php:509 170 | #: lib/pwal_admin_panels.php:595 171 | msgid "Yes" 172 | msgstr "" 173 | 174 | #: lib/pwal_admin_panels.php:201 175 | #: lib/pwal_admin_panels.php:212 176 | #: lib/pwal_admin_panels.php:254 177 | #: lib/pwal_admin_panels.php:274 178 | #: lib/pwal_admin_panels.php:292 179 | #: lib/pwal_admin_panels.php:304 180 | #: lib/pwal_admin_panels.php:508 181 | #: lib/pwal_admin_panels.php:594 182 | msgid "No" 183 | msgstr "" 184 | 185 | #: lib/pwal_admin_panels.php:207 186 | msgid "Authorized users see full content" 187 | msgstr "" 188 | 189 | #: lib/pwal_admin_panels.php:209 190 | msgid "If Yes, authorized users will see the full content without the need to like a content. Authorization level will be revealed after you select yes. Admin setting is independent of this one." 191 | msgstr "" 192 | 193 | #: lib/pwal_admin_panels.php:218 194 | msgid "User level where authorization starts" 195 | msgstr "" 196 | 197 | #: lib/pwal_admin_panels.php:220 198 | msgid "If the above field is selected as yes, users having a higher level than this selection will see the full content." 199 | msgstr "" 200 | 201 | #: lib/pwal_admin_panels.php:249 202 | msgid "Search bots see full content" 203 | msgstr "" 204 | 205 | #: lib/pwal_admin_panels.php:251 206 | msgid "You may want to enable this for SEO purposes. Warning: Your full content may be visible in search engine results." 207 | msgstr "" 208 | 209 | #: lib/pwal_admin_panels.php:261 210 | msgid "Cookie validity time (hours)" 211 | msgstr "" 212 | 213 | #: lib/pwal_admin_panels.php:263 214 | msgid "Validity time of the cookie which lets visitor to be exempt from the protection after he/she liked. Tip: If you want the cookie to expire at the end of the session (when the browser is closed), enter zero here." 215 | msgstr "" 216 | 217 | #: lib/pwal_admin_panels.php:269 218 | msgid "Use usermeta to store WordPress user likes" 219 | msgstr "" 220 | 221 | #: lib/pwal_admin_panels.php:271 222 | msgid "WordPress authenticated users can also store their like(s) as part of the user meta information. This does not expire like a cookie and will be there no if the browser cookies are cleared or if the user uses a different browser." 223 | msgstr "" 224 | 225 | #: lib/pwal_admin_panels.php:283 226 | msgid "Sitewide and Random Likes" 227 | msgstr "" 228 | 229 | #: lib/pwal_admin_panels.php:287 230 | msgid "Sitewide Like" 231 | msgstr "" 232 | 233 | #: lib/pwal_admin_panels.php:289 234 | msgid "If selected yes, when visitor likes a single content, all protected content on the website will be revealed to him/her." 235 | msgstr "" 236 | 237 | #: lib/pwal_admin_panels.php:299 238 | msgid "Like Random Page" 239 | msgstr "" 240 | 241 | #: lib/pwal_admin_panels.php:301 242 | msgid "If selected yes, a random published page or post on your website will be selected to be liked. This disables \"URL to be liked\" setting." 243 | msgstr "" 244 | 245 | #: lib/pwal_admin_panels.php:310 246 | msgid "URL to be liked" 247 | msgstr "" 248 | 249 | #. translators: Here, %s is the home page url. 250 | #: lib/pwal_admin_panels.php:314 251 | #, php-format 252 | msgid "You can enter a single URL to be liked, e.g. your home page, %s. This can be any URL external to your site like your Facebook page. If left empty, the URL for the post will be used. You can also override the URL to be liked on each post." 253 | msgstr "" 254 | 255 | #: lib/pwal_admin_panels.php:329 256 | msgid "Social Buttons to display" 257 | msgstr "" 258 | 259 | #: lib/pwal_admin_panels.php:334 260 | msgid "Buttons to use" 261 | msgstr "" 262 | 263 | #: lib/pwal_admin_panels.php:336 264 | msgid "Once you have set a button as Visible and save this page, you will see a new tab specific to the button. On that tab you will be able to customize the style of the button. Drag the buttons into the order you want them displayed on the post. " 265 | msgstr "" 266 | 267 | #: lib/pwal_admin_panels.php:398 268 | msgid "Visible" 269 | msgstr "" 270 | 271 | #: lib/pwal_admin_panels.php:404 272 | msgid "Load JS" 273 | msgstr "" 274 | 275 | #: lib/pwal_admin_panels.php:412 276 | msgid "Visible - If checked means the social button will be displayed within the Pay With a Like box on the post" 277 | msgstr "" 278 | 279 | #: lib/pwal_admin_panels.php:413 280 | msgid "Load JS - If checked means the plugin will load the needed JavaScript libraries from the social network in order to display the button. If you have other plugins which already use these scripts it mean there are potential issues because the JavaScript libraries will be loaded more than once. In that case uncheck related checkbox. If you are unsure and not having any issues, keep this settings checked." 281 | msgstr "" 282 | 283 | #: lib/pwal_admin_panels.php:449 284 | msgid "Facebook Like button Display options" 285 | msgstr "" 286 | 287 | #: lib/pwal_admin_panels.php:454 288 | #: lib/pwal_admin_panels.php:720 289 | #: lib/pwal_admin_panels.php:773 290 | #: lib/pwal_admin_panels.php:851 291 | msgid "Button Style" 292 | msgstr "" 293 | 294 | #: lib/pwal_admin_panels.php:459 295 | #: lib/pwal_admin_panels.php:726 296 | #: lib/pwal_admin_panels.php:778 297 | #: lib/pwal_admin_panels.php:856 298 | msgid "Vertical" 299 | msgstr "" 300 | 301 | #: lib/pwal_admin_panels.php:465 302 | #: lib/pwal_admin_panels.php:730 303 | #: lib/pwal_admin_panels.php:782 304 | #: lib/pwal_admin_panels.php:861 305 | msgid "Horizontal" 306 | msgstr "" 307 | 308 | #: lib/pwal_admin_panels.php:471 309 | #: lib/pwal_admin_panels.php:735 310 | #: lib/pwal_admin_panels.php:788 311 | #: lib/pwal_admin_panels.php:868 312 | msgid "No Count" 313 | msgstr "" 314 | 315 | #: lib/pwal_admin_panels.php:495 316 | msgid "Verb to display" 317 | msgstr "" 318 | 319 | #: lib/pwal_admin_panels.php:498 320 | msgid "Like" 321 | msgstr "" 322 | 323 | #: lib/pwal_admin_panels.php:499 324 | msgid "Recommend" 325 | msgstr "" 326 | 327 | #: lib/pwal_admin_panels.php:504 328 | msgid "Include Share button" 329 | msgstr "" 330 | 331 | #: lib/pwal_admin_panels.php:506 332 | msgid "User still needs to use Like button to unlock hidden content." 333 | msgstr "" 334 | 335 | #: lib/pwal_admin_panels.php:525 336 | msgid "Facebook Comment popup" 337 | msgstr "" 338 | 339 | #: lib/pwal_admin_panels.php:527 340 | msgid "If enabled, when the user clicks the like button Facebook will display a popup comment form. The PWAL process will wait until the user submits the form before reloading the page to show full content. If not enabled the form will submit after clicking the Facebook like button." 341 | msgstr "" 342 | 343 | #: lib/pwal_admin_panels.php:528 344 | msgid "Wait for optional Facebook Comment popup on Facebook Like (Check for yes)" 345 | msgstr "" 346 | 347 | #: lib/pwal_admin_panels.php:535 348 | #: lib/pwal_admin_panels.php:540 349 | #: lib/pwal_admin_panels.php:744 350 | #: lib/pwal_admin_panels.php:749 351 | #: lib/pwal_admin_panels.php:824 352 | #: lib/pwal_admin_panels.php:829 353 | #: lib/pwal_admin_panels.php:878 354 | #: lib/pwal_admin_panels.php:883 355 | msgid "Button Language" 356 | msgstr "" 357 | 358 | #: lib/pwal_admin_panels.php:537 359 | msgid "In most cases the language your website is displayed in is acceptable as the language for the social buttons. But in some rare cases the social network API does not support your language. Here you can specify the alternate language to use instead of your default website language" 360 | msgstr "" 361 | 362 | #: lib/pwal_admin_panels.php:544 363 | #, php-format 364 | msgid "If left blank the default language as defined in your wp-config.php (%s) will be used. Please refer to the Facebook accepted %s codes." 365 | msgstr "" 366 | 367 | #: lib/pwal_admin_panels.php:544 368 | #: lib/pwal_admin_panels.php:753 369 | #: lib/pwal_admin_panels.php:833 370 | #: lib/pwal_admin_panels.php:887 371 | msgid "Languages" 372 | msgstr "" 373 | 374 | #: lib/pwal_admin_panels.php:552 375 | msgid "Facebook App Setup" 376 | msgstr "" 377 | 378 | #: lib/pwal_admin_panels.php:554 379 | msgid "You can setup a Facebook App to allow deeper integration with the Facebook API. A Facebook App is required for options like check if a user has liked a page on Facebook." 380 | msgstr "" 381 | 382 | #: lib/pwal_admin_panels.php:558 383 | msgid "Facebook App API Key" 384 | msgstr "" 385 | 386 | #: lib/pwal_admin_panels.php:564 387 | #, php-format 388 | msgid "Register this site as an application on Facebook's app registration page." 389 | msgstr "" 390 | 391 | #: lib/pwal_admin_panels.php:565 392 | msgid "Click the Create New App button. This will show a popup form where you will in the details of the App for your website." 393 | msgstr "" 394 | 395 | #: lib/pwal_admin_panels.php:566 396 | msgid "The site URL should be" 397 | msgstr "" 398 | 399 | #: lib/pwal_admin_panels.php:567 400 | msgid "Once you have registered your site as an application, you will be provided with a App ID and a App secret." 401 | msgstr "" 402 | 403 | #: lib/pwal_admin_panels.php:568 404 | msgid "Copy and paste them to the fields on the left" 405 | msgstr "" 406 | 407 | #: lib/pwal_admin_panels.php:573 408 | msgid "Facebook App API Secret" 409 | msgstr "" 410 | 411 | #: lib/pwal_admin_panels.php:585 412 | msgid "Facebook Authorization Polling" 413 | msgstr "" 414 | 415 | #: lib/pwal_admin_panels.php:587 416 | msgid "When a user arrives to your site the plugin checks if they are already logged into their Facebook account. If the user is not already logged in you can set the plugin to keep checking on a frequency interval define below. Or you can choose to only check once on the initial page load." 417 | msgstr "" 418 | 419 | #: lib/pwal_admin_panels.php:591 420 | msgid "Enable Polling" 421 | msgstr "" 422 | 423 | #: lib/pwal_admin_panels.php:600 424 | msgid "Polling Frequency (seconds)" 425 | msgstr "" 426 | 427 | #: lib/pwal_admin_panels.php:618 428 | msgid "Facebook Fan Pages" 429 | msgstr "" 430 | 431 | #: lib/pwal_admin_panels.php:621 432 | msgid "In addition to granting access when a user likes posts from this website, you can also grant access to users who may have liked your Facebook pages. Enter the Facebook page URL in the field below. Note at the moment these are treated globally. If the user viewing your website has previously liked any of the Facebook pages they are given full access to all Pay With a Like hidden content. This may change in the future." 433 | msgstr "" 434 | 435 | #: lib/pwal_admin_panels.php:630 436 | msgid "Facebook Page Info" 437 | msgstr "" 438 | 439 | #: lib/pwal_admin_panels.php:641 440 | msgid "Enter Facebook page URL" 441 | msgstr "" 442 | 443 | #: lib/pwal_admin_panels.php:649 444 | msgid "or" 445 | msgstr "" 446 | 447 | #: lib/pwal_admin_panels.php:654 448 | msgid "e.g." 449 | msgstr "" 450 | 451 | #: lib/pwal_admin_panels.php:665 452 | msgid "X" 453 | msgstr "" 454 | 455 | #: lib/pwal_admin_panels.php:676 456 | msgid "URL:" 457 | msgstr "" 458 | 459 | #: lib/pwal_admin_panels.php:681 460 | msgid "Page ID:" 461 | msgstr "" 462 | 463 | #: lib/pwal_admin_panels.php:698 464 | msgid "+" 465 | msgstr "" 466 | 467 | #: lib/pwal_admin_panels.php:701 468 | msgid "The Facebook API Key and API Secret are required to use Facebook Fan Pages integration." 469 | msgstr "" 470 | 471 | #: lib/pwal_admin_panels.php:715 472 | msgid "LinkedIn Like button Display options" 473 | msgstr "" 474 | 475 | #: lib/pwal_admin_panels.php:746 476 | #: lib/pwal_admin_panels.php:826 477 | #: lib/pwal_admin_panels.php:880 478 | msgid "In most cases the language your website is display in is acceptable as the language for the social buttons. But on some rare cases the social network API does not support your language. Here you can specificy the alternate language to use it not your default website language." 479 | msgstr "" 480 | 481 | #: lib/pwal_admin_panels.php:753 482 | #, php-format 483 | msgid "If left blank the default language as defined in your wp-config.php (%s) will be used. Please refer to the LinkedIn accepted %s codes." 484 | msgstr "" 485 | 486 | #: lib/pwal_admin_panels.php:768 487 | msgid "Twitter Like button Display options" 488 | msgstr "" 489 | 490 | #: lib/pwal_admin_panels.php:805 491 | msgid "Tweet Message" 492 | msgstr "" 493 | 494 | #: lib/pwal_admin_panels.php:807 495 | msgid "Do not include the post URL here. The post URL is automatically added by Twitter." 496 | msgstr "" 497 | 498 | #: lib/pwal_admin_panels.php:810 499 | msgid "You can use replaceable parameters in the tweet message. These will be replaced with the real content when the button is rendered." 500 | msgstr "" 501 | 502 | #: lib/pwal_admin_panels.php:811 503 | msgid "You can also setup a filter 'pwal_twitter_message' which will allow you to filter the message dynamically." 504 | msgstr "" 505 | 506 | #: lib/pwal_admin_panels.php:813 507 | msgid "To represent the post title" 508 | msgstr "" 509 | 510 | #: lib/pwal_admin_panels.php:814 511 | msgid "To represent the site title" 512 | msgstr "" 513 | 514 | #: lib/pwal_admin_panels.php:815 515 | msgid "To represent the site tagline" 516 | msgstr "" 517 | 518 | #: lib/pwal_admin_panels.php:833 519 | #, php-format 520 | msgid "If left blank the default language as defined in your wp-config.php (%s) will be used. Please refer to the Twitter accepted %s codes." 521 | msgstr "" 522 | 523 | #: lib/pwal_admin_panels.php:846 524 | msgid "Google +1 Like button Display options" 525 | msgstr "" 526 | 527 | #: lib/pwal_admin_panels.php:887 528 | #, php-format 529 | msgid "If left blank the default language as defined in your wp-config.php (%s) will be used. Please refer to the Google +1 accepted %s codes." 530 | msgstr "" 531 | 532 | #: lib/pwal_admin_panels.php:901 533 | msgid "Like Statistics" 534 | msgstr "" 535 | 536 | #: lib/pwal_admin_panels.php:951 537 | msgid "Total likes" 538 | msgstr "" 539 | 540 | #: lib/pwal_admin_panels.php:957 541 | msgid "likes" 542 | msgstr "" 543 | 544 | #: lib/pwal_admin_panels.php:972 545 | msgid "Most liked posts" 546 | msgstr "" 547 | 548 | #: lib/pwal_admin_panels.php:991 549 | #: lib/pwal_admin_panels.php:1028 550 | msgid "Clear Statistics" 551 | msgstr "" 552 | 553 | #: lib/pwal_admin_panels.php:991 554 | #: lib/pwal_admin_panels.php:1028 555 | msgid "Clicking this button deletes statistics saved on the server" 556 | msgstr "" 557 | 558 | #: lib/pwal_admin_panels.php:996 559 | #: lib/pwal_admin_panels.php:1039 560 | msgid "Export Statistics" 561 | msgstr "" 562 | 563 | #: lib/pwal_admin_panels.php:996 564 | #: lib/pwal_admin_panels.php:1039 565 | msgid "If you click this button a CSV file including statistics will be saved on your PC" 566 | msgstr "" 567 | 568 | #: lib/pwal_admin_panels.php:1016 569 | msgid "Like Statistics Actions" 570 | msgstr "" 571 | 572 | #: lib/pwal_admin_panels.php:1046 573 | msgid "Are you sure to clear statistics?" 574 | msgstr "" 575 | 576 | #: lib/pwal_admin_panels.php:1065 577 | msgid "Like Statistics Chart" 578 | msgstr "" 579 | 580 | #: lib/pwal_admin_panels.php:1120 581 | msgid "Like Statistics Summary" 582 | msgstr "" 583 | 584 | #: lib/pwal_admin_panels.php:1142 585 | msgid "Social" 586 | msgstr "" 587 | 588 | #: lib/pwal_admin_panels.php:1143 589 | #: lib/pwal_admin_panels.php:1261 590 | #: lib/pwal_admin_panels.php:1360 591 | msgid "Count" 592 | msgstr "" 593 | 594 | #: lib/pwal_admin_panels.php:1167 595 | #: lib/pwal_admin_panels.php:1280 596 | #: lib/pwal_admin_panels.php:1379 597 | msgid "Total" 598 | msgstr "" 599 | 600 | #: lib/pwal_admin_panels.php:1174 601 | #: lib/pwal_admin_panels.php:1287 602 | #: lib/pwal_admin_panels.php:1386 603 | msgid "No Like Statistics to report." 604 | msgstr "" 605 | 606 | #: lib/pwal_admin_panels.php:1216 607 | msgid "Top 10 Posts" 608 | msgstr "" 609 | 610 | #: lib/pwal_admin_panels.php:1260 611 | msgid "Title" 612 | msgstr "" 613 | 614 | #: lib/pwal_admin_panels.php:1332 615 | msgid "Top 10 IP Addresses" 616 | msgstr "" 617 | 618 | #: lib/pwal_admin_panels.php:1359 619 | msgid "IP Address" 620 | msgstr "" 621 | 622 | #: lib/pwal_admin_panels.php:1399 623 | msgid "Using Pay With a Like as a shortcode." 624 | msgstr "" 625 | 626 | #: lib/pwal_admin_panels.php:1401 627 | msgid "You can use Pay With a Like as a normal shortcode in WordPress. You just need to call the WordPress function do_shortcode() with the correct PWAL shortcode." 628 | msgstr "" 629 | 630 | #: lib/pwal_admin_panels.php:1403 631 | msgid "Below are the accpted shortcode parameters" 632 | msgstr "" 633 | 634 | #: lib/pwal_admin_panels.php:1405 635 | msgid "This is the unque global number for the Pay With a Like element. You can make this a very large number like 987654321 to ensure it does not match an existing post ID." 636 | msgstr "" 637 | 638 | #: lib/pwal_admin_panels.php:1406 639 | msgid "This is the description shown above the Pay With a Like Buttons. If not provided the main Pay With a Like settings are used." 640 | msgstr "" 641 | 642 | #: lib/pwal_admin_panels.php:1407 643 | msgid "Controls how the hidden content is revealed. Possible values are refresh or ajax. If not provided the main Pay With a Like settings are used." 644 | msgstr "" 645 | 646 | #: lib/pwal_admin_panels.php:1408 647 | msgid "Controls the width of the buttons container. Should be a normal value like you would user for CSS. For example 500px, 30%, etc. If not provided the main Pay With a Like settings are used." 648 | msgstr "" 649 | 650 | #: lib/pwal_admin_panels.php:1409 651 | msgid "Controls if the shotcode process is to add paragraph tags around the hidden content. Default is yes." 652 | msgstr "" 653 | 654 | #: lib/pwal_admin_panels.php:1412 655 | msgid "In the example below note we are using a shortcode format [pwal]Hidden content goes here[/pwal]." 656 | msgstr "" 657 | 658 | #: lib/pwal_admin_panels.php:1422 659 | msgid "Handling Pay With a Like via Template Function (legacy)" 660 | msgstr "" 661 | 662 | #: lib/pwal_admin_panels.php:1424 663 | msgid "While the wpmudev_pwal_html() function is still supported it is consider depricated. You should use the shortcode method described above" 664 | msgstr "" 665 | 666 | #: lib/pwal_admin_panels.php:1425 667 | msgid "For protecting html codes that you cannot add to post content, there is a template function wpmudev_pwal_html. This function replaces all such codes with like buttons and reveal them when payment is done. Add the following codes to the page template where you want the html codes to be displayed and modify as required. Also you need to use the bottom action function." 668 | msgstr "" 669 | 670 | #: lib/pwal_admin_panels.php:1488 671 | msgid "Customizing the CSS" 672 | msgstr "" 673 | 674 | #: lib/pwal_admin_panels.php:1494 675 | #, php-format 676 | msgid "If you want to apply your own styles copy contents of front.css to your theme css file and add this code inside functions.php of your theme:add_theme_support( \"pay_with_a_like_style\" ) OR copy and rename the default css file %s as %s and edit this latter file. Then, your edited styles will not be affected from plugin updates." 677 | msgstr "" 678 | 679 | #: pay-with-a-like.php:271 680 | #: pay-with-a-like.php:3126 681 | msgid "Facebook" 682 | msgstr "" 683 | 684 | #: pay-with-a-like.php:272 685 | msgid "Linkedin" 686 | msgstr "" 687 | 688 | #: pay-with-a-like.php:273 689 | #: pay-with-a-like.php:3128 690 | msgid "Twitter" 691 | msgstr "" 692 | 693 | #: pay-with-a-like.php:274 694 | msgid "Google+1" 695 | msgstr "" 696 | 697 | #: pay-with-a-like.php:284 698 | msgid "To see the full content, share this page by clicking one of the buttons below" 699 | msgstr "" 700 | 701 | #: pay-with-a-like.php:356 702 | #: pay-with-a-like.php:2275 703 | #: pay-with-a-like.php:2276 704 | msgid "Settings" 705 | msgstr "" 706 | 707 | #: pay-with-a-like.php:1645 708 | msgid "Something went wrong. Please refresh the page and try again. (nonce)" 709 | msgstr "" 710 | 711 | #: pay-with-a-like.php:1654 712 | msgid "Something went wrong. Please refresh the page and try again. (pwal_info_items)" 713 | msgstr "" 714 | 715 | #: pay-with-a-like.php:1675 716 | msgid "Something went wrong. Please refresh the page and try again. (post_id)" 717 | msgstr "" 718 | 719 | #: pay-with-a-like.php:1683 720 | msgid "Something went wrong. Please refresh the page and try again. (content_id)" 721 | msgstr "" 722 | 723 | #. #-#-#-#-# pay-with-a-like.pot (Pay With a Like 2.0.1.3) #-#-#-#-# 724 | #. Plugin Name of the plugin/theme 725 | #: pay-with-a-like.php:1972 726 | #: pay-with-a-like.php:2266 727 | #: pay-with-a-like.php:2267 728 | #: pay-with-a-like.php:3367 729 | msgid "Pay With a Like" 730 | msgstr "" 731 | 732 | #: pay-with-a-like.php:2013 733 | msgid "Show Like Statistics" 734 | msgstr "" 735 | 736 | #: pay-with-a-like.php:2020 737 | #: pay-with-a-like.php:2023 738 | #: pay-with-a-like.php:2046 739 | #: pay-with-a-like.php:2049 740 | #: pay-with-a-like.php:2109 741 | #: pay-with-a-like.php:2111 742 | msgid "Default:" 743 | msgstr "" 744 | 745 | #: pay-with-a-like.php:2020 746 | #: pay-with-a-like.php:2029 747 | msgid "Enabled" 748 | msgstr "" 749 | 750 | #: pay-with-a-like.php:2023 751 | #: pay-with-a-like.php:2030 752 | msgid "Disabled" 753 | msgstr "" 754 | 755 | #: pay-with-a-like.php:2033 756 | msgid "Enabled?" 757 | msgstr "" 758 | 759 | #: pay-with-a-like.php:2049 760 | msgid "Automatic" 761 | msgstr "" 762 | 763 | #: pay-with-a-like.php:2054 764 | msgid "Automatic excerpt" 765 | msgstr "" 766 | 767 | #: pay-with-a-like.php:2055 768 | msgid "Manual excerpt" 769 | msgstr "" 770 | 771 | #: pay-with-a-like.php:2056 772 | msgid "Use selection tool" 773 | msgstr "" 774 | 775 | #: pay-with-a-like.php:2062 776 | msgid "Excerpt Method" 777 | msgstr "" 778 | 779 | #: pay-with-a-like.php:2080 780 | #: pay-with-a-like.php:2093 781 | msgid "Default" 782 | msgstr "" 783 | 784 | #: pay-with-a-like.php:2091 785 | msgid "Button Container Width" 786 | msgstr "" 787 | 788 | #: pay-with-a-like.php:2098 789 | msgid "Alt. URL to Like" 790 | msgstr "" 791 | 792 | #: pay-with-a-like.php:2100 793 | msgid "If blank current post URL is used" 794 | msgstr "" 795 | 796 | #: pay-with-a-like.php:2115 797 | msgid "Refresh" 798 | msgstr "" 799 | 800 | #: pay-with-a-like.php:2120 801 | msgid "Reload Content" 802 | msgstr "" 803 | 804 | #: pay-with-a-like.php:2134 805 | #: pay-with-a-like.php:3378 806 | msgid "Description" 807 | msgstr "" 808 | 809 | #: pay-with-a-like.php:2136 810 | msgid "If blank global setting is used" 811 | msgstr "" 812 | 813 | #: pay-with-a-like.php:2294 814 | #: pay-with-a-like.php:2295 815 | #: pay-with-a-like.php:3125 816 | msgid "Social Buttons" 817 | msgstr "" 818 | 819 | #: pay-with-a-like.php:2303 820 | #: pay-with-a-like.php:2304 821 | msgid "Statistics" 822 | msgstr "" 823 | 824 | #: pay-with-a-like.php:2312 825 | #: pay-with-a-like.php:2313 826 | msgid "Customization" 827 | msgstr "" 828 | 829 | #: pay-with-a-like.php:2983 830 | msgid "[Pay With a Like] Settings saved" 831 | msgstr "" 832 | 833 | #: pay-with-a-like.php:2990 834 | msgid "[Pay With a Like] You are not authorised to do this." 835 | msgstr "" 836 | 837 | #: pay-with-a-like.php:2999 838 | msgid "[Pay With a Like] You didn't select any buttons. Plugin will not function as expected." 839 | msgstr "" 840 | 841 | #: pay-with-a-like.php:3024 842 | msgid "[Pay With a Like] As Social Networking scripts cannot access your local pages, plugin will not function properly in localhost." 843 | msgstr "" 844 | 845 | #: pay-with-a-like.php:3029 846 | msgid "[Pay With a Like] Your WPLANG setting in wp-config.php is wrong. Facebook button will not work." 847 | msgstr "" 848 | 849 | #: pay-with-a-like.php:3069 850 | msgid "You do not have sufficient permissions to access this page." 851 | msgstr "" 852 | 853 | #: pay-with-a-like.php:3088 854 | msgid "Pay With a Like Settings" 855 | msgstr "" 856 | 857 | #: pay-with-a-like.php:3099 858 | #: pay-with-a-like.php:3187 859 | msgid "Save Changes" 860 | msgstr "" 861 | 862 | #: pay-with-a-like.php:3127 863 | msgid "LinkedIn" 864 | msgstr "" 865 | 866 | #: pay-with-a-like.php:3129 867 | msgid "Google" 868 | msgstr "" 869 | 870 | #: pay-with-a-like.php:3136 871 | msgid "Pay With a Like Social Buttons" 872 | msgstr "" 873 | 874 | #: pay-with-a-like.php:3197 875 | msgid "Pay With a Like Statistics" 876 | msgstr "" 877 | 878 | #: pay-with-a-like.php:3224 879 | msgid "Pay With a Like Customization" 880 | msgstr "" 881 | 882 | #: pay-with-a-like.php:3247 883 | msgid "Statistics could not be deleted" 884 | msgstr "" 885 | 886 | #: pay-with-a-like.php:3255 887 | #: pay-with-a-like.php:3273 888 | msgid "Nothing to download!" 889 | msgstr "" 890 | 891 | #: pay-with-a-like.php:3374 892 | msgid "Please enter a value!" 893 | msgstr "" 894 | 895 | #: pay-with-a-like.php:3382 896 | msgid "Description for this selection." 897 | msgstr "" 898 | 899 | #: pay-with-a-like.php:3390 900 | msgid "Cancel" 901 | msgstr "" 902 | 903 | #: pay-with-a-like.php:3394 904 | msgid "Insert" 905 | msgstr "" 906 | 907 | #. Plugin URI of the plugin/theme 908 | msgid "http://premium.wpmudev.org/project/pay-with-a-like" 909 | msgstr "" 910 | 911 | #. Description of the plugin/theme 912 | msgid "Allows protecting posts/pages until visitor likes the page or parts of the page with Facebook, Linkedin, Twitter or Google +1." 913 | msgstr "" 914 | 915 | #. Author of the plugin/theme 916 | msgid "WPMU DEV" 917 | msgstr "" 918 | 919 | #. Author URI of the plugin/theme 920 | msgid "http://premium.wpmudev.org/" 921 | msgstr "" 922 | 923 | -------------------------------------------------------------------------------- /languages/pwal.pot: -------------------------------------------------------------------------------- 1 | # Translation of the WordPress plugin Pay With a Like 2.0.1.3 by WPMU DEV. 2 | # Copyright (C) 2014 WPMU DEV 3 | # This file is distributed under the same license as the Pay With a Like package. 4 | # FIRST AUTHOR , 2014. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: Pay With a Like 2.0.1.3\n" 10 | "Report-Msgid-Bugs-To: http://wordpress.org/tag/pay-with-a-like\n" 11 | "POT-Creation-Date: 2014-05-27 07:20-0500\n" 12 | "PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=utf-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #: includes/class_wd_help_tooltips.php:296 20 | msgid "Help" 21 | msgstr "" 22 | 23 | #: lib/pwal_admin_panels.php:8 24 | msgid "Where to show Pay With a Like Buttons" 25 | msgstr "" 26 | 27 | #: lib/pwal_admin_panels.php:10 28 | msgid "" 29 | "Pay With a Like allows protecting posts or parts of posts until the visitor " 30 | "clicks the action button to show the protected content. These settings " 31 | "provide a quick way to set Pay With a Like for your posts and pages. They " 32 | "can be overridden on a per post basis using the post editor metabox." 33 | msgstr "" 34 | 35 | #: lib/pwal_admin_panels.php:12 36 | msgid "" 37 | "Enabled for All - When checked will include all of the " 38 | "selected posts when displaying the Pay With a Like buttons. If unchecked you " 39 | "can still enable individual posts via the Pay With a Like metabox shown on " 40 | "the post editor screen." 41 | msgstr "" 42 | 43 | #: lib/pwal_admin_panels.php:13 44 | msgid "" 45 | "Show Metabox - When checked will display Pay With a Like " 46 | "metabox on the post editor screen." 47 | msgstr "" 48 | 49 | #: lib/pwal_admin_panels.php:17 50 | msgid "Activation for post types" 51 | msgstr "" 52 | 53 | #: lib/pwal_admin_panels.php:45 54 | msgid "Enable for all" 55 | msgstr "" 56 | 57 | #: lib/pwal_admin_panels.php:49 58 | msgid "Show Metabox" 59 | msgstr "" 60 | 61 | #: lib/pwal_admin_panels.php:69 62 | msgid "Default settings for Pay With a Like content protection" 63 | msgstr "" 64 | 65 | #: lib/pwal_admin_panels.php:71 66 | msgid "" 67 | "This section lets you define the default content handling for all post " 68 | "types. You will be able to override these settings on individual posts via " 69 | "the editor screen if you have checked Show Metabox above for that post type." 70 | msgstr "" 71 | 72 | #: lib/pwal_admin_panels.php:74 73 | msgid "Revealed content selection method" 74 | msgstr "" 75 | 76 | #: lib/pwal_admin_panels.php:77 77 | msgid "" 78 | "Automatic Excerpt - This option will create an automatic " 79 | "excertp from the content to show users. You can control the excerpt length." 80 | msgstr "" 81 | 82 | #: lib/pwal_admin_panels.php:78 83 | msgid "" 84 | "Manual Excerpt - This option tells the plugin to use the " 85 | "excerpt field from the post. Note the post type must support the Excerpt " 86 | "field. Some post types like Pages do not. This option will default to " 87 | "automatic if the post types do not support the Excerpt field." 88 | msgstr "" 89 | 90 | #: lib/pwal_admin_panels.php:79 91 | msgid "" 92 | "Select Excerpt - This option allows you to manually select " 93 | "text within your post content for the hidden content. Using " 94 | "this tool you will see the button on the Visual editor toolbar. The hidden " 95 | "content can be anywhere within your content. You are not limited to the " 96 | "beginning or end of the content like with excerpts." 97 | msgstr "" 98 | 99 | #: lib/pwal_admin_panels.php:85 pay-with-a-like.php:2078 100 | msgid "Excerpt length (words)" 101 | msgstr "" 102 | 103 | #: lib/pwal_admin_panels.php:87 104 | msgid "" 105 | "Number of words of the post content that will be displayed publicly. Only " 106 | "effective if Automatic excerpt is selected. And if the post content length " 107 | "is longer than the set number of words." 108 | msgstr "" 109 | 110 | #: lib/pwal_admin_panels.php:93 111 | msgid "Description above the buttons" 112 | msgstr "" 113 | 114 | #: lib/pwal_admin_panels.php:95 115 | msgid "" 116 | "You may want to write something here that will encourage the visitor to " 117 | "click a button. You may customize this message on the individual post editor " 118 | "metabox." 119 | msgstr "" 120 | 121 | #: lib/pwal_admin_panels.php:101 122 | msgid "Reload Content on Like" 123 | msgstr "" 124 | 125 | #: lib/pwal_admin_panels.php:104 126 | msgid "" 127 | "When a user clicks the Pay With a Like buttons the content the hidden " 128 | "content can be revealed by full page refresh or AJAX load. For AJAX the Pay " 129 | "With a Like button will be removed and replaced with the new content. Note " 130 | "this option is still experimental and depending on the complexity of the " 131 | "content being shown may not work. You will be able to change this setting at " 132 | "the individual content level." 133 | msgstr "" 134 | 135 | #: lib/pwal_admin_panels.php:107 136 | msgid "Page refresh" 137 | msgstr "" 138 | 139 | #: lib/pwal_admin_panels.php:108 pay-with-a-like.php:2114 140 | msgid "AJAX" 141 | msgstr "" 142 | 143 | #: lib/pwal_admin_panels.php:122 144 | msgid "Buttons Container Settings" 145 | msgstr "" 146 | 147 | #: lib/pwal_admin_panels.php:124 148 | msgid "" 149 | "This section give you some control over the container box wrapped around the " 150 | "social buttons." 151 | msgstr "" 152 | 153 | #: lib/pwal_admin_panels.php:127 154 | msgid "Width" 155 | msgstr "" 156 | 157 | #: lib/pwal_admin_panels.php:129 158 | msgid "" 159 | "By default the Pay With a Like button container is added below or within the " 160 | "post content. The width defaults to the theme content_width variable if " 161 | "defined. If not it is set to 100%. If for some reason the width does not " 162 | "work well for your theme you can specify the alternate container width here. " 163 | "You may also override this on the individual posts." 164 | msgstr "" 165 | 166 | #: lib/pwal_admin_panels.php:170 167 | msgid "Buttons Visibility Settings" 168 | msgstr "" 169 | 170 | #: lib/pwal_admin_panels.php:174 171 | msgid "Enable on the home page" 172 | msgstr "" 173 | 174 | #: lib/pwal_admin_panels.php:176 175 | msgid "" 176 | "Enables the plugin for the home page. If you are displaying latest posts or " 177 | "some similar category archive enabling this will show the buttons on each " 178 | "post. If this option is not enabled the full content will be shown. If you " 179 | "are instead showing a static page you will control the buttons via that page " 180 | "form. Some themes use excerpts here so enabling plugin for these pages may " 181 | "cause strange output." 182 | msgstr "" 183 | 184 | #: lib/pwal_admin_panels.php:178 lib/pwal_admin_panels.php:189 185 | msgid "Yes, show buttons" 186 | msgstr "" 187 | 188 | #: lib/pwal_admin_panels.php:179 lib/pwal_admin_panels.php:190 189 | msgid "No, show full content" 190 | msgstr "" 191 | 192 | #: lib/pwal_admin_panels.php:185 193 | msgid "Enable for multiple post pages" 194 | msgstr "" 195 | 196 | #: lib/pwal_admin_panels.php:187 197 | msgid "" 198 | "Enables the plugin for pages (except the home page) which contain content " 199 | "for more that one post/page, e.g. archive, category pages. Some themes use " 200 | "excerpts here so enabling plugin for these pages may cause strange output. " 201 | msgstr "" 202 | 203 | #: lib/pwal_admin_panels.php:196 204 | msgid "Admin sees full content" 205 | msgstr "" 206 | 207 | #: lib/pwal_admin_panels.php:198 208 | msgid "You may want to select No for test purposes." 209 | msgstr "" 210 | 211 | #: lib/pwal_admin_panels.php:200 lib/pwal_admin_panels.php:211 212 | #: lib/pwal_admin_panels.php:253 lib/pwal_admin_panels.php:273 213 | #: lib/pwal_admin_panels.php:291 lib/pwal_admin_panels.php:303 214 | #: lib/pwal_admin_panels.php:509 lib/pwal_admin_panels.php:595 215 | msgid "Yes" 216 | msgstr "" 217 | 218 | #: lib/pwal_admin_panels.php:201 lib/pwal_admin_panels.php:212 219 | #: lib/pwal_admin_panels.php:254 lib/pwal_admin_panels.php:274 220 | #: lib/pwal_admin_panels.php:292 lib/pwal_admin_panels.php:304 221 | #: lib/pwal_admin_panels.php:508 lib/pwal_admin_panels.php:594 222 | msgid "No" 223 | msgstr "" 224 | 225 | #: lib/pwal_admin_panels.php:207 226 | msgid "Authorized users see full content" 227 | msgstr "" 228 | 229 | #: lib/pwal_admin_panels.php:209 230 | msgid "" 231 | "If Yes, authorized users will see the full content without the need to like " 232 | "a content. Authorization level will be revealed after you select yes. Admin " 233 | "setting is independent of this one." 234 | msgstr "" 235 | 236 | #: lib/pwal_admin_panels.php:218 237 | msgid "User level where authorization starts" 238 | msgstr "" 239 | 240 | #: lib/pwal_admin_panels.php:220 241 | msgid "" 242 | "If the above field is selected as yes, users having a higher level than this " 243 | "selection will see the full content." 244 | msgstr "" 245 | 246 | #: lib/pwal_admin_panels.php:249 247 | msgid "Search bots see full content" 248 | msgstr "" 249 | 250 | #: lib/pwal_admin_panels.php:251 251 | msgid "" 252 | "You may want to enable this for SEO purposes. Warning: Your full content may " 253 | "be visible in search engine results." 254 | msgstr "" 255 | 256 | #: lib/pwal_admin_panels.php:261 257 | msgid "Cookie validity time (hours)" 258 | msgstr "" 259 | 260 | #: lib/pwal_admin_panels.php:263 261 | msgid "" 262 | "Validity time of the cookie which lets visitor to be exempt from the " 263 | "protection after he/she liked. Tip: If you want the cookie to expire at the " 264 | "end of the session (when the browser is closed), enter zero here." 265 | msgstr "" 266 | 267 | #: lib/pwal_admin_panels.php:269 268 | msgid "Use usermeta to store WordPress user likes" 269 | msgstr "" 270 | 271 | #: lib/pwal_admin_panels.php:271 272 | msgid "" 273 | "WordPress authenticated users can also store their like(s) as part of the " 274 | "user meta information. This does not expire like a cookie and will be there " 275 | "no if the browser cookies are cleared or if the user uses a different " 276 | "browser." 277 | msgstr "" 278 | 279 | #: lib/pwal_admin_panels.php:283 280 | msgid "Sitewide and Random Likes" 281 | msgstr "" 282 | 283 | #: lib/pwal_admin_panels.php:287 284 | msgid "Sitewide Like" 285 | msgstr "" 286 | 287 | #: lib/pwal_admin_panels.php:289 288 | msgid "" 289 | "If selected yes, when visitor likes a single content, all protected content " 290 | "on the website will be revealed to him/her." 291 | msgstr "" 292 | 293 | #: lib/pwal_admin_panels.php:299 294 | msgid "Like Random Page" 295 | msgstr "" 296 | 297 | #: lib/pwal_admin_panels.php:301 298 | msgid "" 299 | "If selected yes, a random published page or post on your website will be " 300 | "selected to be liked. This disables \"URL to be liked\" setting." 301 | msgstr "" 302 | 303 | #: lib/pwal_admin_panels.php:310 304 | msgid "URL to be liked" 305 | msgstr "" 306 | 307 | #. translators: Here, %s is the home page url. 308 | #: lib/pwal_admin_panels.php:314 309 | #, php-format 310 | msgid "" 311 | "You can enter a single URL to be liked, e.g. your home page, %s. This can be " 312 | "any URL external to your site like your Facebook page. If left empty, the " 313 | "URL for the post will be used. You can also override the URL to be liked on " 314 | "each post." 315 | msgstr "" 316 | 317 | #: lib/pwal_admin_panels.php:329 318 | msgid "Social Buttons to display" 319 | msgstr "" 320 | 321 | #: lib/pwal_admin_panels.php:334 322 | msgid "Buttons to use" 323 | msgstr "" 324 | 325 | #: lib/pwal_admin_panels.php:336 326 | msgid "" 327 | "Once you have set a button as Visible and save this page, you will see a new " 328 | "tab specific to the button. On that tab you will be able to customize the " 329 | "style of the button. Drag the buttons into the order you want them displayed " 330 | "on the post. " 331 | msgstr "" 332 | 333 | #: lib/pwal_admin_panels.php:398 334 | msgid "Visible" 335 | msgstr "" 336 | 337 | #: lib/pwal_admin_panels.php:404 338 | msgid "Load JS" 339 | msgstr "" 340 | 341 | #: lib/pwal_admin_panels.php:412 342 | msgid "" 343 | "Visible - If checked means the social button will be " 344 | "displayed within the Pay With a Like box on the post" 345 | msgstr "" 346 | 347 | #: lib/pwal_admin_panels.php:413 348 | msgid "" 349 | "Load JS - If checked means the plugin will load the needed " 350 | "JavaScript libraries from the social network in order to display the button. " 351 | "If you have other plugins which already use these scripts it mean there are " 352 | "potential issues because the JavaScript libraries will be loaded more than " 353 | "once. In that case uncheck related checkbox. If you are unsure and not " 354 | "having any issues, keep this settings checked." 355 | msgstr "" 356 | 357 | #: lib/pwal_admin_panels.php:449 358 | msgid "Facebook Like button Display options" 359 | msgstr "" 360 | 361 | #: lib/pwal_admin_panels.php:454 lib/pwal_admin_panels.php:720 362 | #: lib/pwal_admin_panels.php:773 lib/pwal_admin_panels.php:851 363 | msgid "Button Style" 364 | msgstr "" 365 | 366 | #: lib/pwal_admin_panels.php:459 lib/pwal_admin_panels.php:726 367 | #: lib/pwal_admin_panels.php:778 lib/pwal_admin_panels.php:856 368 | msgid "Vertical" 369 | msgstr "" 370 | 371 | #: lib/pwal_admin_panels.php:465 lib/pwal_admin_panels.php:730 372 | #: lib/pwal_admin_panels.php:782 lib/pwal_admin_panels.php:861 373 | msgid "Horizontal" 374 | msgstr "" 375 | 376 | #: lib/pwal_admin_panels.php:471 lib/pwal_admin_panels.php:735 377 | #: lib/pwal_admin_panels.php:788 lib/pwal_admin_panels.php:868 378 | msgid "No Count" 379 | msgstr "" 380 | 381 | #: lib/pwal_admin_panels.php:495 382 | msgid "Verb to display" 383 | msgstr "" 384 | 385 | #: lib/pwal_admin_panels.php:498 386 | msgid "Like" 387 | msgstr "" 388 | 389 | #: lib/pwal_admin_panels.php:499 390 | msgid "Recommend" 391 | msgstr "" 392 | 393 | #: lib/pwal_admin_panels.php:504 394 | msgid "Include Share button" 395 | msgstr "" 396 | 397 | #: lib/pwal_admin_panels.php:506 398 | msgid "User still needs to use Like button to unlock hidden content." 399 | msgstr "" 400 | 401 | #: lib/pwal_admin_panels.php:525 402 | msgid "Facebook Comment popup" 403 | msgstr "" 404 | 405 | #: lib/pwal_admin_panels.php:527 406 | msgid "" 407 | "If enabled, when the user clicks the like button Facebook will display a " 408 | "popup comment form. The PWAL process will wait until the user submits the " 409 | "form before reloading the page to show full content. If not enabled the form " 410 | "will submit after clicking the Facebook like button." 411 | msgstr "" 412 | 413 | #: lib/pwal_admin_panels.php:528 414 | msgid "" 415 | "Wait for optional Facebook Comment popup on Facebook Like (Check for yes)" 416 | msgstr "" 417 | 418 | #: lib/pwal_admin_panels.php:535 lib/pwal_admin_panels.php:540 419 | #: lib/pwal_admin_panels.php:744 lib/pwal_admin_panels.php:749 420 | #: lib/pwal_admin_panels.php:824 lib/pwal_admin_panels.php:829 421 | #: lib/pwal_admin_panels.php:878 lib/pwal_admin_panels.php:883 422 | msgid "Button Language" 423 | msgstr "" 424 | 425 | #: lib/pwal_admin_panels.php:537 426 | msgid "" 427 | "In most cases the language your website is displayed in is acceptable as the " 428 | "language for the social buttons. But in some rare cases the social network " 429 | "API does not support your language. Here you can specify the alternate " 430 | "language to use instead of your default website language" 431 | msgstr "" 432 | 433 | #: lib/pwal_admin_panels.php:544 434 | #, php-format 435 | msgid "" 436 | "If left blank the default language as defined in your wp-config.php (" 437 | "%s) will be used. Please refer to the Facebook accepted %s codes." 438 | msgstr "" 439 | 440 | #: lib/pwal_admin_panels.php:544 lib/pwal_admin_panels.php:753 441 | #: lib/pwal_admin_panels.php:833 lib/pwal_admin_panels.php:887 442 | msgid "Languages" 443 | msgstr "" 444 | 445 | #: lib/pwal_admin_panels.php:552 446 | msgid "Facebook App Setup" 447 | msgstr "" 448 | 449 | #: lib/pwal_admin_panels.php:554 450 | msgid "" 451 | "You can setup a Facebook App to allow deeper integration with the Facebook " 452 | "API. A Facebook App is required for options like check if a user has liked a " 453 | "page on Facebook." 454 | msgstr "" 455 | 456 | #: lib/pwal_admin_panels.php:558 457 | msgid "Facebook App API Key" 458 | msgstr "" 459 | 460 | #: lib/pwal_admin_panels.php:564 461 | #, php-format 462 | msgid "" 463 | "Register this site as an application on Facebook's app registration page." 465 | msgstr "" 466 | 467 | #: lib/pwal_admin_panels.php:565 468 | msgid "" 469 | "Click the Create New App button. This will show a popup form where you will " 470 | "in the details of the App for your website." 471 | msgstr "" 472 | 473 | #: lib/pwal_admin_panels.php:566 474 | msgid "The site URL should be" 475 | msgstr "" 476 | 477 | #: lib/pwal_admin_panels.php:567 478 | msgid "" 479 | "Once you have registered your site as an application, you will be provided " 480 | "with a App ID and a App secret." 481 | msgstr "" 482 | 483 | #: lib/pwal_admin_panels.php:568 484 | msgid "Copy and paste them to the fields on the left" 485 | msgstr "" 486 | 487 | #: lib/pwal_admin_panels.php:573 488 | msgid "Facebook App API Secret" 489 | msgstr "" 490 | 491 | #: lib/pwal_admin_panels.php:585 492 | msgid "Facebook Authorization Polling" 493 | msgstr "" 494 | 495 | #: lib/pwal_admin_panels.php:587 496 | msgid "" 497 | "When a user arrives to your site the plugin checks if they are already " 498 | "logged into their Facebook account. If the user is not already logged in you " 499 | "can set the plugin to keep checking on a frequency interval define below. Or " 500 | "you can choose to only check once on the initial page load." 501 | msgstr "" 502 | 503 | #: lib/pwal_admin_panels.php:591 504 | msgid "Enable Polling" 505 | msgstr "" 506 | 507 | #: lib/pwal_admin_panels.php:600 508 | msgid "Polling Frequency (seconds)" 509 | msgstr "" 510 | 511 | #: lib/pwal_admin_panels.php:618 512 | msgid "Facebook Fan Pages" 513 | msgstr "" 514 | 515 | #: lib/pwal_admin_panels.php:621 516 | msgid "" 517 | "In addition to granting access when a user likes posts from this website, " 518 | "you can also grant access to users who may have liked your Facebook pages. " 519 | "Enter the Facebook page URL in the field below. Note at the moment these are " 520 | "treated globally. If the user viewing your website has previously liked any " 521 | "of the Facebook pages they are given full access to all Pay With a Like " 522 | "hidden content. This may change in the future." 523 | msgstr "" 524 | 525 | #: lib/pwal_admin_panels.php:630 526 | msgid "Facebook Page Info" 527 | msgstr "" 528 | 529 | #: lib/pwal_admin_panels.php:641 530 | msgid "Enter Facebook page URL" 531 | msgstr "" 532 | 533 | #: lib/pwal_admin_panels.php:649 534 | msgid "or" 535 | msgstr "" 536 | 537 | #: lib/pwal_admin_panels.php:654 538 | msgid "e.g." 539 | msgstr "" 540 | 541 | #: lib/pwal_admin_panels.php:665 542 | msgid "X" 543 | msgstr "" 544 | 545 | #: lib/pwal_admin_panels.php:676 546 | msgid "URL:" 547 | msgstr "" 548 | 549 | #: lib/pwal_admin_panels.php:681 550 | msgid "Page ID:" 551 | msgstr "" 552 | 553 | #: lib/pwal_admin_panels.php:698 554 | msgid "+" 555 | msgstr "" 556 | 557 | #: lib/pwal_admin_panels.php:701 558 | msgid "" 559 | "The Facebook API Key and API Secret are required to use Facebook Fan " 560 | "Pages integration." 561 | msgstr "" 562 | 563 | #: lib/pwal_admin_panels.php:715 564 | msgid "LinkedIn Like button Display options" 565 | msgstr "" 566 | 567 | #: lib/pwal_admin_panels.php:746 lib/pwal_admin_panels.php:826 568 | #: lib/pwal_admin_panels.php:880 569 | msgid "" 570 | "In most cases the language your website is display in is acceptable as the " 571 | "language for the social buttons. But on some rare cases the social network " 572 | "API does not support your language. Here you can specificy the alternate " 573 | "language to use it not your default website language." 574 | msgstr "" 575 | 576 | #: lib/pwal_admin_panels.php:753 577 | #, php-format 578 | msgid "" 579 | "If left blank the default language as defined in your wp-config.php (" 580 | "%s) will be used. Please refer to the LinkedIn accepted %s codes." 581 | msgstr "" 582 | 583 | #: lib/pwal_admin_panels.php:768 584 | msgid "Twitter Like button Display options" 585 | msgstr "" 586 | 587 | #: lib/pwal_admin_panels.php:805 588 | msgid "Tweet Message" 589 | msgstr "" 590 | 591 | #: lib/pwal_admin_panels.php:807 592 | msgid "" 593 | "Do not include the post URL here. The post URL is automatically added by " 594 | "Twitter." 595 | msgstr "" 596 | 597 | #: lib/pwal_admin_panels.php:810 598 | msgid "" 599 | "You can use replaceable parameters in the tweet message. These will be " 600 | "replaced with the real content when the button is rendered." 601 | msgstr "" 602 | 603 | #: lib/pwal_admin_panels.php:811 604 | msgid "" 605 | "You can also setup a filter 'pwal_twitter_message' which will allow you to " 606 | "filter the message dynamically." 607 | msgstr "" 608 | 609 | #: lib/pwal_admin_panels.php:813 610 | msgid "To represent the post title" 611 | msgstr "" 612 | 613 | #: lib/pwal_admin_panels.php:814 614 | msgid "To represent the site title" 615 | msgstr "" 616 | 617 | #: lib/pwal_admin_panels.php:815 618 | msgid "To represent the site tagline" 619 | msgstr "" 620 | 621 | #: lib/pwal_admin_panels.php:833 622 | #, php-format 623 | msgid "" 624 | "If left blank the default language as defined in your wp-config.php (" 625 | "%s) will be used. Please refer to the Twitter accepted %s codes." 626 | msgstr "" 627 | 628 | #: lib/pwal_admin_panels.php:846 629 | msgid "Google +1 Like button Display options" 630 | msgstr "" 631 | 632 | #: lib/pwal_admin_panels.php:887 633 | #, php-format 634 | msgid "" 635 | "If left blank the default language as defined in your wp-config.php (" 636 | "%s) will be used. Please refer to the Google +1 accepted %s codes." 637 | msgstr "" 638 | 639 | #: lib/pwal_admin_panels.php:901 640 | msgid "Like Statistics" 641 | msgstr "" 642 | 643 | #: lib/pwal_admin_panels.php:951 644 | msgid "Total likes" 645 | msgstr "" 646 | 647 | #: lib/pwal_admin_panels.php:957 648 | msgid "likes" 649 | msgstr "" 650 | 651 | #: lib/pwal_admin_panels.php:972 652 | msgid "Most liked posts" 653 | msgstr "" 654 | 655 | #: lib/pwal_admin_panels.php:991 lib/pwal_admin_panels.php:1028 656 | msgid "Clear Statistics" 657 | msgstr "" 658 | 659 | #: lib/pwal_admin_panels.php:991 lib/pwal_admin_panels.php:1028 660 | msgid "Clicking this button deletes statistics saved on the server" 661 | msgstr "" 662 | 663 | #: lib/pwal_admin_panels.php:996 lib/pwal_admin_panels.php:1039 664 | msgid "Export Statistics" 665 | msgstr "" 666 | 667 | #: lib/pwal_admin_panels.php:996 lib/pwal_admin_panels.php:1039 668 | msgid "" 669 | "If you click this button a CSV file including statistics will be saved on " 670 | "your PC" 671 | msgstr "" 672 | 673 | #: lib/pwal_admin_panels.php:1016 674 | msgid "Like Statistics Actions" 675 | msgstr "" 676 | 677 | #: lib/pwal_admin_panels.php:1046 678 | msgid "Are you sure to clear statistics?" 679 | msgstr "" 680 | 681 | #: lib/pwal_admin_panels.php:1065 682 | msgid "Like Statistics Chart" 683 | msgstr "" 684 | 685 | #: lib/pwal_admin_panels.php:1120 686 | msgid "Like Statistics Summary" 687 | msgstr "" 688 | 689 | #: lib/pwal_admin_panels.php:1142 690 | msgid "Social" 691 | msgstr "" 692 | 693 | #: lib/pwal_admin_panels.php:1143 lib/pwal_admin_panels.php:1261 694 | #: lib/pwal_admin_panels.php:1360 695 | msgid "Count" 696 | msgstr "" 697 | 698 | #: lib/pwal_admin_panels.php:1167 lib/pwal_admin_panels.php:1280 699 | #: lib/pwal_admin_panels.php:1379 700 | msgid "Total" 701 | msgstr "" 702 | 703 | #: lib/pwal_admin_panels.php:1174 lib/pwal_admin_panels.php:1287 704 | #: lib/pwal_admin_panels.php:1386 705 | msgid "No Like Statistics to report." 706 | msgstr "" 707 | 708 | #: lib/pwal_admin_panels.php:1216 709 | msgid "Top 10 Posts" 710 | msgstr "" 711 | 712 | #: lib/pwal_admin_panels.php:1260 713 | msgid "Title" 714 | msgstr "" 715 | 716 | #: lib/pwal_admin_panels.php:1332 717 | msgid "Top 10 IP Addresses" 718 | msgstr "" 719 | 720 | #: lib/pwal_admin_panels.php:1359 721 | msgid "IP Address" 722 | msgstr "" 723 | 724 | #: lib/pwal_admin_panels.php:1399 725 | msgid "Using Pay With a Like as a shortcode." 726 | msgstr "" 727 | 728 | #: lib/pwal_admin_panels.php:1401 729 | msgid "" 730 | "You can use Pay With a Like as a normal shortcode in WordPress. You just " 731 | "need to call the WordPress function do_shortcode() with the correct PWAL " 732 | "shortcode." 733 | msgstr "" 734 | 735 | #: lib/pwal_admin_panels.php:1403 736 | msgid "Below are the accpted shortcode parameters" 737 | msgstr "" 738 | 739 | #: lib/pwal_admin_panels.php:1405 740 | msgid "" 741 | "This is the unque global number for the Pay With a Like element. You can " 742 | "make this a very large number like 987654321 to ensure it does not match an " 743 | "existing post ID." 744 | msgstr "" 745 | 746 | #: lib/pwal_admin_panels.php:1406 747 | msgid "" 748 | "This is the description shown above the Pay With a Like Buttons. If not " 749 | "provided the main Pay With a Like settings are used." 750 | msgstr "" 751 | 752 | #: lib/pwal_admin_panels.php:1407 753 | msgid "" 754 | "Controls how the hidden content is revealed. Possible values are " 755 | "refresh or ajax. If not provided the main " 756 | "Pay With a Like settings are used." 757 | msgstr "" 758 | 759 | #: lib/pwal_admin_panels.php:1408 760 | msgid "" 761 | "Controls the width of the buttons container. Should be a normal value like " 762 | "you would user for CSS. For example 500px, 30%, etc. If not provided the " 763 | "main Pay With a Like settings are used." 764 | msgstr "" 765 | 766 | #: lib/pwal_admin_panels.php:1409 767 | msgid "" 768 | "Controls if the shotcode process is to add paragraph tags around the hidden " 769 | "content. Default is yes." 770 | msgstr "" 771 | 772 | #: lib/pwal_admin_panels.php:1412 773 | msgid "" 774 | "In the example below note we are using a shortcode format [pwal]" 775 | "Hidden content goes here[/pwal]." 776 | msgstr "" 777 | 778 | #: lib/pwal_admin_panels.php:1422 779 | msgid "Handling Pay With a Like via Template Function (legacy)" 780 | msgstr "" 781 | 782 | #: lib/pwal_admin_panels.php:1424 783 | msgid "" 784 | "While the wpmudev_pwal_html() function is still supported it is consider " 785 | "depricated. You should use the shortcode method described above" 786 | msgstr "" 787 | 788 | #: lib/pwal_admin_panels.php:1425 789 | msgid "" 790 | "For protecting html codes that you cannot add to post content, there is a " 791 | "template function wpmudev_pwal_html. This function replaces all such " 792 | "codes with like buttons and reveal them when payment is done. Add the " 793 | "following codes to the page template where you want the html codes to be " 794 | "displayed and modify as required. Also you need to use the bottom action " 795 | "function." 796 | msgstr "" 797 | 798 | #: lib/pwal_admin_panels.php:1488 799 | msgid "Customizing the CSS" 800 | msgstr "" 801 | 802 | #: lib/pwal_admin_panels.php:1494 803 | #, php-format 804 | msgid "" 805 | "If you want to apply your own styles copy contents of front.css to your " 806 | "theme css file and add this code inside functions.php of your theme:" 807 | "add_theme_support( \"pay_with_a_like_style\" ) OR copy and " 808 | "rename the default css file %s as %s and edit this latter " 809 | "file. Then, your edited styles will not be affected from plugin updates." 810 | msgstr "" 811 | 812 | #: pay-with-a-like.php:271 pay-with-a-like.php:3126 813 | msgid "Facebook" 814 | msgstr "" 815 | 816 | #: pay-with-a-like.php:272 817 | msgid "Linkedin" 818 | msgstr "" 819 | 820 | #: pay-with-a-like.php:273 pay-with-a-like.php:3128 821 | msgid "Twitter" 822 | msgstr "" 823 | 824 | #: pay-with-a-like.php:274 825 | msgid "Google+1" 826 | msgstr "" 827 | 828 | #: pay-with-a-like.php:284 829 | msgid "" 830 | "To see the full content, share this page by clicking one of the buttons below" 831 | msgstr "" 832 | 833 | #: pay-with-a-like.php:356 pay-with-a-like.php:2275 pay-with-a-like.php:2276 834 | msgid "Settings" 835 | msgstr "" 836 | 837 | #: pay-with-a-like.php:1645 838 | msgid "Something went wrong. Please refresh the page and try again. (nonce)" 839 | msgstr "" 840 | 841 | #: pay-with-a-like.php:1654 842 | msgid "" 843 | "Something went wrong. Please refresh the page and try again. " 844 | "(pwal_info_items)" 845 | msgstr "" 846 | 847 | #: pay-with-a-like.php:1675 848 | msgid "Something went wrong. Please refresh the page and try again. (post_id)" 849 | msgstr "" 850 | 851 | #: pay-with-a-like.php:1683 852 | msgid "" 853 | "Something went wrong. Please refresh the page and try again. (content_id)" 854 | msgstr "" 855 | 856 | #. #-#-#-#-# pay-with-a-like.pot (Pay With a Like 2.0.1.3) #-#-#-#-# 857 | #. Plugin Name of the plugin/theme 858 | #: pay-with-a-like.php:1972 pay-with-a-like.php:2266 pay-with-a-like.php:2267 859 | #: pay-with-a-like.php:3367 860 | msgid "Pay With a Like" 861 | msgstr "" 862 | 863 | #: pay-with-a-like.php:2013 864 | msgid "Show Like Statistics" 865 | msgstr "" 866 | 867 | #: pay-with-a-like.php:2020 pay-with-a-like.php:2023 pay-with-a-like.php:2046 868 | #: pay-with-a-like.php:2049 pay-with-a-like.php:2109 pay-with-a-like.php:2111 869 | msgid "Default:" 870 | msgstr "" 871 | 872 | #: pay-with-a-like.php:2020 pay-with-a-like.php:2029 873 | msgid "Enabled" 874 | msgstr "" 875 | 876 | #: pay-with-a-like.php:2023 pay-with-a-like.php:2030 877 | msgid "Disabled" 878 | msgstr "" 879 | 880 | #: pay-with-a-like.php:2033 881 | msgid "Enabled?" 882 | msgstr "" 883 | 884 | #: pay-with-a-like.php:2049 885 | msgid "Automatic" 886 | msgstr "" 887 | 888 | #: pay-with-a-like.php:2054 889 | msgid "Automatic excerpt" 890 | msgstr "" 891 | 892 | #: pay-with-a-like.php:2055 893 | msgid "Manual excerpt" 894 | msgstr "" 895 | 896 | #: pay-with-a-like.php:2056 897 | msgid "Use selection tool" 898 | msgstr "" 899 | 900 | #: pay-with-a-like.php:2062 901 | msgid "Excerpt Method" 902 | msgstr "" 903 | 904 | #: pay-with-a-like.php:2080 pay-with-a-like.php:2093 905 | msgid "Default" 906 | msgstr "" 907 | 908 | #: pay-with-a-like.php:2091 909 | msgid "Button Container Width" 910 | msgstr "" 911 | 912 | #: pay-with-a-like.php:2098 913 | msgid "Alt. URL to Like" 914 | msgstr "" 915 | 916 | #: pay-with-a-like.php:2100 917 | msgid "If blank current post URL is used" 918 | msgstr "" 919 | 920 | #: pay-with-a-like.php:2115 921 | msgid "Refresh" 922 | msgstr "" 923 | 924 | #: pay-with-a-like.php:2120 925 | msgid "Reload Content" 926 | msgstr "" 927 | 928 | #: pay-with-a-like.php:2134 pay-with-a-like.php:3378 929 | msgid "Description" 930 | msgstr "" 931 | 932 | #: pay-with-a-like.php:2136 933 | msgid "If blank global setting is used" 934 | msgstr "" 935 | 936 | #: pay-with-a-like.php:2294 pay-with-a-like.php:2295 pay-with-a-like.php:3125 937 | msgid "Social Buttons" 938 | msgstr "" 939 | 940 | #: pay-with-a-like.php:2303 pay-with-a-like.php:2304 941 | msgid "Statistics" 942 | msgstr "" 943 | 944 | #: pay-with-a-like.php:2312 pay-with-a-like.php:2313 945 | msgid "Customization" 946 | msgstr "" 947 | 948 | #: pay-with-a-like.php:2983 949 | msgid "[Pay With a Like] Settings saved" 950 | msgstr "" 951 | 952 | #: pay-with-a-like.php:2990 953 | msgid "[Pay With a Like] You are not authorised to do this." 954 | msgstr "" 955 | 956 | #: pay-with-a-like.php:2999 957 | msgid "" 958 | "[Pay With a Like] You didn't select any buttons. Plugin will not " 959 | "function as expected." 960 | msgstr "" 961 | 962 | #: pay-with-a-like.php:3024 963 | msgid "" 964 | "[Pay With a Like] As Social Networking scripts cannot access your " 965 | "local pages, plugin will not function properly in localhost." 966 | msgstr "" 967 | 968 | #: pay-with-a-like.php:3029 969 | msgid "" 970 | "[Pay With a Like] Your WPLANG setting in wp-config.php is wrong. " 971 | "Facebook button will not work." 972 | msgstr "" 973 | 974 | #: pay-with-a-like.php:3069 975 | msgid "You do not have sufficient permissions to access this page." 976 | msgstr "" 977 | 978 | #: pay-with-a-like.php:3088 979 | msgid "Pay With a Like Settings" 980 | msgstr "" 981 | 982 | #: pay-with-a-like.php:3099 pay-with-a-like.php:3187 983 | msgid "Save Changes" 984 | msgstr "" 985 | 986 | #: pay-with-a-like.php:3127 987 | msgid "LinkedIn" 988 | msgstr "" 989 | 990 | #: pay-with-a-like.php:3129 991 | msgid "Google" 992 | msgstr "" 993 | 994 | #: pay-with-a-like.php:3136 995 | msgid "Pay With a Like Social Buttons" 996 | msgstr "" 997 | 998 | #: pay-with-a-like.php:3197 999 | msgid "Pay With a Like Statistics" 1000 | msgstr "" 1001 | 1002 | #: pay-with-a-like.php:3224 1003 | msgid "Pay With a Like Customization" 1004 | msgstr "" 1005 | 1006 | #: pay-with-a-like.php:3247 1007 | msgid "Statistics could not be deleted" 1008 | msgstr "" 1009 | 1010 | #: pay-with-a-like.php:3255 pay-with-a-like.php:3273 1011 | msgid "Nothing to download!" 1012 | msgstr "" 1013 | 1014 | #: pay-with-a-like.php:3374 1015 | msgid "Please enter a value!" 1016 | msgstr "" 1017 | 1018 | #: pay-with-a-like.php:3382 1019 | msgid "Description for this selection." 1020 | msgstr "" 1021 | 1022 | #: pay-with-a-like.php:3390 1023 | msgid "Cancel" 1024 | msgstr "" 1025 | 1026 | #: pay-with-a-like.php:3394 1027 | msgid "Insert" 1028 | msgstr "" 1029 | 1030 | #. Plugin URI of the plugin/theme 1031 | msgid "http://premium.wpmudev.org/project/pay-with-a-like" 1032 | msgstr "" 1033 | 1034 | #. Description of the plugin/theme 1035 | msgid "" 1036 | "Allows protecting posts/pages until visitor likes the page or parts of the " 1037 | "page with Facebook, Linkedin, Twitter or Google +1." 1038 | msgstr "" 1039 | 1040 | #. Author of the plugin/theme 1041 | msgid "WPMU DEV" 1042 | msgstr "" 1043 | 1044 | #. Author URI of the plugin/theme 1045 | msgid "http://premium.wpmudev.org/" 1046 | msgstr "" 1047 | -------------------------------------------------------------------------------- /js/jquery.flot.min.js: -------------------------------------------------------------------------------- 1 | /* Javascript plotting library for jQuery, v. 0.7. 2 | * 3 | * Released under the MIT license by IOLA, December 2007. 4 | * 5 | */ 6 | (function(b){b.color={};b.color.make=function(d,e,g,f){var c={};c.r=d||0;c.g=e||0;c.b=g||0;c.a=f!=null?f:1;c.add=function(h,j){for(var k=0;k=1){return"rgb("+[c.r,c.g,c.b].join(",")+")"}else{return"rgba("+[c.r,c.g,c.b,c.a].join(",")+")"}};c.normalize=function(){function h(k,j,l){return jl?l:j)}c.r=h(0,parseInt(c.r),255);c.g=h(0,parseInt(c.g),255);c.b=h(0,parseInt(c.b),255);c.a=h(0,c.a,1);return c};c.clone=function(){return b.color.make(c.r,c.b,c.g,c.a)};return c.normalize()};b.color.extract=function(d,e){var c;do{c=d.css(e).toLowerCase();if(c!=""&&c!="transparent"){break}d=d.parent()}while(!b.nodeName(d.get(0),"body"));if(c=="rgba(0, 0, 0, 0)"){c="transparent"}return b.color.parse(c)};b.color.parse=function(c){var d,f=b.color.make;if(d=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c)){return f(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10))}if(d=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(c)){return f(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10),parseFloat(d[4]))}if(d=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c)){return f(parseFloat(d[1])*2.55,parseFloat(d[2])*2.55,parseFloat(d[3])*2.55)}if(d=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(c)){return f(parseFloat(d[1])*2.55,parseFloat(d[2])*2.55,parseFloat(d[3])*2.55,parseFloat(d[4]))}if(d=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c)){return f(parseInt(d[1],16),parseInt(d[2],16),parseInt(d[3],16))}if(d=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c)){return f(parseInt(d[1]+d[1],16),parseInt(d[2]+d[2],16),parseInt(d[3]+d[3],16))}var e=b.trim(c).toLowerCase();if(e=="transparent"){return f(255,255,255,0)}else{d=a[e]||[0,0,0];return f(d[0],d[1],d[2])}};var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);(function(c){function b(av,ai,J,af){var Q=[],O={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:true,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:0.85},xaxis:{show:null,position:"bottom",mode:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null,monthNames:null,timeformat:null,twelveHourClock:false},yaxis:{autoscaleMargin:0.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:false,radius:3,lineWidth:2,fill:true,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:false,fillColor:null,steps:false},bars:{show:false,lineWidth:2,barWidth:1,fill:true,fillColor:null,align:"left",horizontal:false},shadowSize:3},grid:{show:true,aboveData:false,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:false,hoverable:false,autoHighlight:true,mouseActiveRadius:10},hooks:{}},az=null,ad=null,y=null,H=null,A=null,p=[],aw=[],q={left:0,right:0,top:0,bottom:0},G=0,I=0,h=0,w=0,ak={processOptions:[],processRawData:[],processDatapoints:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},aq=this;aq.setData=aj;aq.setupGrid=t;aq.draw=W;aq.getPlaceholder=function(){return av};aq.getCanvas=function(){return az};aq.getPlotOffset=function(){return q};aq.width=function(){return h};aq.height=function(){return w};aq.offset=function(){var aB=y.offset();aB.left+=q.left;aB.top+=q.top;return aB};aq.getData=function(){return Q};aq.getAxes=function(){var aC={},aB;c.each(p.concat(aw),function(aD,aE){if(aE){aC[aE.direction+(aE.n!=1?aE.n:"")+"axis"]=aE}});return aC};aq.getXAxes=function(){return p};aq.getYAxes=function(){return aw};aq.c2p=C;aq.p2c=ar;aq.getOptions=function(){return O};aq.highlight=x;aq.unhighlight=T;aq.triggerRedrawOverlay=f;aq.pointOffset=function(aB){return{left:parseInt(p[aA(aB,"x")-1].p2c(+aB.x)+q.left),top:parseInt(aw[aA(aB,"y")-1].p2c(+aB.y)+q.top)}};aq.shutdown=ag;aq.resize=function(){B();g(az);g(ad)};aq.hooks=ak;F(aq);Z(J);X();aj(ai);t();W();ah();function an(aD,aB){aB=[aq].concat(aB);for(var aC=0;aC=O.colors.length){aG=0;++aF}}var aH=0,aN;for(aG=0;aGa3.datamax&&a1!=aB){a3.datamax=a1}}c.each(m(),function(a1,a2){a2.datamin=aO;a2.datamax=aI;a2.used=false});for(aU=0;aU0&&aT[aR-aP]!=null&&aT[aR-aP]!=aT[aR]&&aT[aR-aP+1]!=aT[aR+1]){for(aN=0;aNaM){aM=a0}}if(aX.y){if(a0aV){aV=a0}}}}if(aJ.bars.show){var aY=aJ.bars.align=="left"?0:-aJ.bars.barWidth/2;if(aJ.bars.horizontal){aQ+=aY;aV+=aY+aJ.bars.barWidth}else{aK+=aY;aM+=aY+aJ.bars.barWidth}}aF(aJ.xaxis,aK,aM);aF(aJ.yaxis,aQ,aV)}c.each(m(),function(a1,a2){if(a2.datamin==aO){a2.datamin=null}if(a2.datamax==aI){a2.datamax=null}})}function j(aB,aC){var aD=document.createElement("canvas");aD.className=aC;aD.width=G;aD.height=I;if(!aB){c(aD).css({position:"absolute",left:0,top:0})}c(aD).appendTo(av);if(!aD.getContext){aD=window.G_vmlCanvasManager.initElement(aD)}aD.getContext("2d").save();return aD}function B(){G=av.width();I=av.height();if(G<=0||I<=0){throw"Invalid dimensions for plot, width = "+G+", height = "+I}}function g(aC){if(aC.width!=G){aC.width=G}if(aC.height!=I){aC.height=I}var aB=aC.getContext("2d");aB.restore();aB.save()}function X(){var aC,aB=av.children("canvas.base"),aD=av.children("canvas.overlay");if(aB.length==0||aD==0){av.html("");av.css({padding:0});if(av.css("position")=="static"){av.css("position","relative")}B();az=j(true,"base");ad=j(false,"overlay");aC=false}else{az=aB.get(0);ad=aD.get(0);aC=true}H=az.getContext("2d");A=ad.getContext("2d");y=c([ad,az]);if(aC){av.data("plot").shutdown();aq.resize();A.clearRect(0,0,G,I);y.unbind();av.children().not([az,ad]).remove()}av.data("plot",aq)}function ah(){if(O.grid.hoverable){y.mousemove(aa);y.mouseleave(l)}if(O.grid.clickable){y.click(R)}an(ak.bindEvents,[y])}function ag(){if(M){clearTimeout(M)}y.unbind("mousemove",aa);y.unbind("mouseleave",l);y.unbind("click",R);an(ak.shutdown,[y])}function r(aG){function aC(aH){return aH}var aF,aB,aD=aG.options.transform||aC,aE=aG.options.inverseTransform;if(aG.direction=="x"){aF=aG.scale=h/Math.abs(aD(aG.max)-aD(aG.min));aB=Math.min(aD(aG.max),aD(aG.min))}else{aF=aG.scale=w/Math.abs(aD(aG.max)-aD(aG.min));aF=-aF;aB=Math.max(aD(aG.max),aD(aG.min))}if(aD==aC){aG.p2c=function(aH){return(aH-aB)*aF}}else{aG.p2c=function(aH){return(aD(aH)-aB)*aF}}if(!aE){aG.c2p=function(aH){return aB+aH/aF}}else{aG.c2p=function(aH){return aE(aB+aH/aF)}}}function L(aD){var aB=aD.options,aF,aJ=aD.ticks||[],aI=[],aE,aK=aB.labelWidth,aG=aB.labelHeight,aC;function aH(aM,aL){return c('
'+aM.join("")+"
").appendTo(av)}if(aD.direction=="x"){if(aK==null){aK=Math.floor(G/(aJ.length>0?aJ.length:1))}if(aG==null){aI=[];for(aF=0;aF'+aE+"")}}if(aI.length>0){aI.push('
');aC=aH(aI,"width:10000px;");aG=aC.height();aC.remove()}}}else{if(aK==null||aG==null){for(aF=0;aF'+aE+"")}}if(aI.length>0){aC=aH(aI,"");if(aK==null){aK=aC.children().width()}if(aG==null){aG=aC.find("div.tickLabel").height()}aC.remove()}}}if(aK==null){aK=0}if(aG==null){aG=0}aD.labelWidth=aK;aD.labelHeight=aG}function au(aD){var aC=aD.labelWidth,aL=aD.labelHeight,aH=aD.options.position,aF=aD.options.tickLength,aG=O.grid.axisMargin,aJ=O.grid.labelMargin,aK=aD.direction=="x"?p:aw,aE;var aB=c.grep(aK,function(aN){return aN&&aN.options.position==aH&&aN.reserveSpace});if(c.inArray(aD,aB)==aB.length-1){aG=0}if(aF==null){aF="full"}var aI=c.grep(aK,function(aN){return aN&&aN.reserveSpace});var aM=c.inArray(aD,aI)==0;if(!aM&&aF=="full"){aF=5}if(!isNaN(+aF)){aJ+=+aF}if(aD.direction=="x"){aL+=aJ;if(aH=="bottom"){q.bottom+=aL+aG;aD.box={top:I-q.bottom,height:aL}}else{aD.box={top:q.top+aG,height:aL};q.top+=aL+aG}}else{aC+=aJ;if(aH=="left"){aD.box={left:q.left+aG,width:aC};q.left+=aC+aG}else{q.right+=aC+aG;aD.box={left:G-q.right,width:aC}}}aD.position=aH;aD.tickLength=aF;aD.box.padding=aJ;aD.innermost=aM}function U(aB){if(aB.direction=="x"){aB.box.left=q.left;aB.box.width=h}else{aB.box.top=q.top;aB.box.height=w}}function t(){var aC,aE=m();c.each(aE,function(aF,aG){aG.show=aG.options.show;if(aG.show==null){aG.show=aG.used}aG.reserveSpace=aG.show||aG.options.reserveSpace;n(aG)});allocatedAxes=c.grep(aE,function(aF){return aF.reserveSpace});q.left=q.right=q.top=q.bottom=0;if(O.grid.show){c.each(allocatedAxes,function(aF,aG){S(aG);P(aG);ap(aG,aG.ticks);L(aG)});for(aC=allocatedAxes.length-1;aC>=0;--aC){au(allocatedAxes[aC])}var aD=O.grid.minBorderMargin;if(aD==null){aD=0;for(aC=0;aC=0){aD=0}}if(aF.max==null){aB+=aH*aG;if(aB>0&&aE.datamax!=null&&aE.datamax<=0){aB=0}}}}aE.min=aD;aE.max=aB}function S(aG){var aM=aG.options;var aH;if(typeof aM.ticks=="number"&&aM.ticks>0){aH=aM.ticks}else{aH=0.3*Math.sqrt(aG.direction=="x"?G:I)}var aT=(aG.max-aG.min)/aH,aO,aB,aN,aR,aS,aQ,aI;if(aM.mode=="time"){var aJ={second:1000,minute:60*1000,hour:60*60*1000,day:24*60*60*1000,month:30*24*60*60*1000,year:365.2425*24*60*60*1000};var aK=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[0.25,"month"],[0.5,"month"],[1,"month"],[2,"month"],[3,"month"],[6,"month"],[1,"year"]];var aC=0;if(aM.minTickSize!=null){if(typeof aM.tickSize=="number"){aC=aM.tickSize}else{aC=aM.minTickSize[0]*aJ[aM.minTickSize[1]]}}for(var aS=0;aS=aC){break}}aO=aK[aS][0];aN=aK[aS][1];if(aN=="year"){aQ=Math.pow(10,Math.floor(Math.log(aT/aJ.year)/Math.LN10));aI=(aT/aJ.year)/aQ;if(aI<1.5){aO=1}else{if(aI<3){aO=2}else{if(aI<7.5){aO=5}else{aO=10}}}aO*=aQ}aG.tickSize=aM.tickSize||[aO,aN];aB=function(aX){var a2=[],a0=aX.tickSize[0],a3=aX.tickSize[1],a1=new Date(aX.min);var aW=a0*aJ[a3];if(a3=="second"){a1.setUTCSeconds(a(a1.getUTCSeconds(),a0))}if(a3=="minute"){a1.setUTCMinutes(a(a1.getUTCMinutes(),a0))}if(a3=="hour"){a1.setUTCHours(a(a1.getUTCHours(),a0))}if(a3=="month"){a1.setUTCMonth(a(a1.getUTCMonth(),a0))}if(a3=="year"){a1.setUTCFullYear(a(a1.getUTCFullYear(),a0))}a1.setUTCMilliseconds(0);if(aW>=aJ.minute){a1.setUTCSeconds(0)}if(aW>=aJ.hour){a1.setUTCMinutes(0)}if(aW>=aJ.day){a1.setUTCHours(0)}if(aW>=aJ.day*4){a1.setUTCDate(1)}if(aW>=aJ.year){a1.setUTCMonth(0)}var a5=0,a4=Number.NaN,aY;do{aY=a4;a4=a1.getTime();a2.push(a4);if(a3=="month"){if(a0<1){a1.setUTCDate(1);var aV=a1.getTime();a1.setUTCMonth(a1.getUTCMonth()+1);var aZ=a1.getTime();a1.setTime(a4+a5*aJ.hour+(aZ-aV)*a0);a5=a1.getUTCHours();a1.setUTCHours(0)}else{a1.setUTCMonth(a1.getUTCMonth()+a0)}}else{if(a3=="year"){a1.setUTCFullYear(a1.getUTCFullYear()+a0)}else{a1.setTime(a4+aW)}}}while(a4aU){aP=aU}aQ=Math.pow(10,-aP);aI=aT/aQ;if(aI<1.5){aO=1}else{if(aI<3){aO=2;if(aI>2.25&&(aU==null||aP+1<=aU)){aO=2.5;++aP}}else{if(aI<7.5){aO=5}else{aO=10}}}aO*=aQ;if(aM.minTickSize!=null&&aO0){if(aM.min==null){aG.min=Math.min(aG.min,aL[0])}if(aM.max==null&&aL.length>1){aG.max=Math.max(aG.max,aL[aL.length-1])}}aB=function(aX){var aY=[],aV,aW;for(aW=0;aW1&&/\..*0$/.test((aD[1]-aD[0]).toFixed(aE)))){aG.tickDecimals=aE}}}}aG.tickGenerator=aB;if(c.isFunction(aM.tickFormatter)){aG.tickFormatter=function(aV,aW){return""+aM.tickFormatter(aV,aW)}}else{aG.tickFormatter=aR}}function P(aF){var aH=aF.options.ticks,aG=[];if(aH==null||(typeof aH=="number"&&aH>0)){aG=aF.tickGenerator(aF)}else{if(aH){if(c.isFunction(aH)){aG=aH({min:aF.min,max:aF.max})}else{aG=aH}}}var aE,aB;aF.ticks=[];for(aE=0;aE1){aC=aD[1]}}else{aB=+aD}if(aC==null){aC=aF.tickFormatter(aB,aF)}if(!isNaN(aB)){aF.ticks.push({v:aB,label:aC})}}}function ap(aB,aC){if(aB.options.autoscaleMargin&&aC.length>0){if(aB.options.min==null){aB.min=Math.min(aB.min,aC[0].v)}if(aB.options.max==null&&aC.length>1){aB.max=Math.max(aB.max,aC[aC.length-1].v)}}}function W(){H.clearRect(0,0,G,I);var aC=O.grid;if(aC.show&&aC.backgroundColor){N()}if(aC.show&&!aC.aboveData){ac()}for(var aB=0;aBaG){var aC=aH;aH=aG;aG=aC}return{from:aH,to:aG,axis:aE}}function N(){H.save();H.translate(q.left,q.top);H.fillStyle=am(O.grid.backgroundColor,w,0,"rgba(255, 255, 255, 0)");H.fillRect(0,0,h,w);H.restore()}function ac(){var aF;H.save();H.translate(q.left,q.top);var aH=O.grid.markings;if(aH){if(c.isFunction(aH)){var aK=aq.getAxes();aK.xmin=aK.xaxis.min;aK.xmax=aK.xaxis.max;aK.ymin=aK.yaxis.min;aK.ymax=aK.yaxis.max;aH=aH(aK)}for(aF=0;aFaC.axis.max||aI.toaI.axis.max){continue}aC.from=Math.max(aC.from,aC.axis.min);aC.to=Math.min(aC.to,aC.axis.max);aI.from=Math.max(aI.from,aI.axis.min);aI.to=Math.min(aI.to,aI.axis.max);if(aC.from==aC.to&&aI.from==aI.to){continue}aC.from=aC.axis.p2c(aC.from);aC.to=aC.axis.p2c(aC.to);aI.from=aI.axis.p2c(aI.from);aI.to=aI.axis.p2c(aI.to);if(aC.from==aC.to||aI.from==aI.to){H.beginPath();H.strokeStyle=aD.color||O.grid.markingsColor;H.lineWidth=aD.lineWidth||O.grid.markingsLineWidth;H.moveTo(aC.from,aI.from);H.lineTo(aC.to,aI.to);H.stroke()}else{H.fillStyle=aD.color||O.grid.markingsColor;H.fillRect(aC.from,aI.to,aC.to-aC.from,aI.from-aI.to)}}}var aK=m(),aM=O.grid.borderWidth;for(var aE=0;aEaB.max||(aQ=="full"&&aM>0&&(aO==aB.min||aO==aB.max))){continue}if(aB.direction=="x"){aN=aB.p2c(aO);aJ=aQ=="full"?-w:aQ;if(aB.position=="top"){aJ=-aJ}}else{aL=aB.p2c(aO);aP=aQ=="full"?-h:aQ;if(aB.position=="left"){aP=-aP}}if(H.lineWidth==1){if(aB.direction=="x"){aN=Math.floor(aN)+0.5}else{aL=Math.floor(aL)+0.5}}H.moveTo(aN,aL);H.lineTo(aN+aP,aL+aJ)}H.stroke()}if(aM){H.lineWidth=aM;H.strokeStyle=O.grid.borderColor;H.strokeRect(-aM/2,-aM/2,h+aM,w+aM)}H.restore()}function k(){av.find(".tickLabels").remove();var aG=['
'];var aJ=m();for(var aD=0;aD');for(var aE=0;aEaC.max){continue}var aK={},aI;if(aC.direction=="x"){aI="center";aK.left=Math.round(q.left+aC.p2c(aH.v)-aC.labelWidth/2);if(aC.position=="bottom"){aK.top=aF.top+aF.padding}else{aK.bottom=I-(aF.top+aF.height-aF.padding)}}else{aK.top=Math.round(q.top+aC.p2c(aH.v)-aC.labelHeight/2);if(aC.position=="left"){aK.right=G-(aF.left+aF.width-aF.padding);aI="right"}else{aK.left=aF.left+aF.padding;aI="left"}}aK.width=aC.labelWidth;var aB=["position:absolute","text-align:"+aI];for(var aL in aK){aB.push(aL+":"+aK[aL]+"px")}aG.push('
'+aH.label+"
")}aG.push("
")}aG.push("");av.append(aG.join(""))}function d(aB){if(aB.lines.show){at(aB)}if(aB.bars.show){e(aB)}if(aB.points.show){ao(aB)}}function at(aE){function aD(aP,aQ,aI,aU,aT){var aV=aP.points,aJ=aP.pointsize,aN=null,aM=null;H.beginPath();for(var aO=aJ;aO=aR&&aS>aT.max){if(aR>aT.max){continue}aL=(aT.max-aS)/(aR-aS)*(aK-aL)+aL;aS=aT.max}else{if(aR>=aS&&aR>aT.max){if(aS>aT.max){continue}aK=(aT.max-aS)/(aR-aS)*(aK-aL)+aL;aR=aT.max}}if(aL<=aK&&aL=aK&&aL>aU.max){if(aK>aU.max){continue}aS=(aU.max-aL)/(aK-aL)*(aR-aS)+aS;aL=aU.max}else{if(aK>=aL&&aK>aU.max){if(aL>aU.max){continue}aR=(aU.max-aL)/(aK-aL)*(aR-aS)+aS;aK=aU.max}}if(aL!=aN||aS!=aM){H.moveTo(aU.p2c(aL)+aQ,aT.p2c(aS)+aI)}aN=aK;aM=aR;H.lineTo(aU.p2c(aK)+aQ,aT.p2c(aR)+aI)}H.stroke()}function aF(aI,aQ,aP){var aW=aI.points,aV=aI.pointsize,aN=Math.min(Math.max(0,aP.min),aP.max),aX=0,aU,aT=false,aM=1,aL=0,aR=0;while(true){if(aV>0&&aX>aW.length+aV){break}aX+=aV;var aZ=aW[aX-aV],aK=aW[aX-aV+aM],aY=aW[aX],aJ=aW[aX+aM];if(aT){if(aV>0&&aZ!=null&&aY==null){aR=aX;aV=-aV;aM=2;continue}if(aV<0&&aX==aL+aV){H.fill();aT=false;aV=-aV;aM=1;aX=aL=aR+aV;continue}}if(aZ==null||aY==null){continue}if(aZ<=aY&&aZ=aY&&aZ>aQ.max){if(aY>aQ.max){continue}aK=(aQ.max-aZ)/(aY-aZ)*(aJ-aK)+aK;aZ=aQ.max}else{if(aY>=aZ&&aY>aQ.max){if(aZ>aQ.max){continue}aJ=(aQ.max-aZ)/(aY-aZ)*(aJ-aK)+aK;aY=aQ.max}}if(!aT){H.beginPath();H.moveTo(aQ.p2c(aZ),aP.p2c(aN));aT=true}if(aK>=aP.max&&aJ>=aP.max){H.lineTo(aQ.p2c(aZ),aP.p2c(aP.max));H.lineTo(aQ.p2c(aY),aP.p2c(aP.max));continue}else{if(aK<=aP.min&&aJ<=aP.min){H.lineTo(aQ.p2c(aZ),aP.p2c(aP.min));H.lineTo(aQ.p2c(aY),aP.p2c(aP.min));continue}}var aO=aZ,aS=aY;if(aK<=aJ&&aK=aP.min){aZ=(aP.min-aK)/(aJ-aK)*(aY-aZ)+aZ;aK=aP.min}else{if(aJ<=aK&&aJ=aP.min){aY=(aP.min-aK)/(aJ-aK)*(aY-aZ)+aZ;aJ=aP.min}}if(aK>=aJ&&aK>aP.max&&aJ<=aP.max){aZ=(aP.max-aK)/(aJ-aK)*(aY-aZ)+aZ;aK=aP.max}else{if(aJ>=aK&&aJ>aP.max&&aK<=aP.max){aY=(aP.max-aK)/(aJ-aK)*(aY-aZ)+aZ;aJ=aP.max}}if(aZ!=aO){H.lineTo(aQ.p2c(aO),aP.p2c(aK))}H.lineTo(aQ.p2c(aZ),aP.p2c(aK));H.lineTo(aQ.p2c(aY),aP.p2c(aJ));if(aY!=aS){H.lineTo(aQ.p2c(aY),aP.p2c(aJ));H.lineTo(aQ.p2c(aS),aP.p2c(aJ))}}}H.save();H.translate(q.left,q.top);H.lineJoin="round";var aG=aE.lines.lineWidth,aB=aE.shadowSize;if(aG>0&&aB>0){H.lineWidth=aB;H.strokeStyle="rgba(0,0,0,0.1)";var aH=Math.PI/18;aD(aE.datapoints,Math.sin(aH)*(aG/2+aB/2),Math.cos(aH)*(aG/2+aB/2),aE.xaxis,aE.yaxis);H.lineWidth=aB/2;aD(aE.datapoints,Math.sin(aH)*(aG/2+aB/4),Math.cos(aH)*(aG/2+aB/4),aE.xaxis,aE.yaxis)}H.lineWidth=aG;H.strokeStyle=aE.color;var aC=ae(aE.lines,aE.color,0,w);if(aC){H.fillStyle=aC;aF(aE.datapoints,aE.xaxis,aE.yaxis)}if(aG>0){aD(aE.datapoints,0,0,aE.xaxis,aE.yaxis)}H.restore()}function ao(aE){function aH(aN,aM,aU,aK,aS,aT,aQ,aJ){var aR=aN.points,aI=aN.pointsize;for(var aL=0;aLaT.max||aOaQ.max){continue}H.beginPath();aP=aT.p2c(aP);aO=aQ.p2c(aO)+aK;if(aJ=="circle"){H.arc(aP,aO,aM,0,aS?Math.PI:Math.PI*2,false)}else{aJ(H,aP,aO,aM,aS)}H.closePath();if(aU){H.fillStyle=aU;H.fill()}H.stroke()}}H.save();H.translate(q.left,q.top);var aG=aE.points.lineWidth,aC=aE.shadowSize,aB=aE.points.radius,aF=aE.points.symbol;if(aG>0&&aC>0){var aD=aC/2;H.lineWidth=aD;H.strokeStyle="rgba(0,0,0,0.1)";aH(aE.datapoints,aB,null,aD+aD/2,true,aE.xaxis,aE.yaxis,aF);H.strokeStyle="rgba(0,0,0,0.2)";aH(aE.datapoints,aB,null,aD/2,true,aE.xaxis,aE.yaxis,aF)}H.lineWidth=aG;H.strokeStyle=aE.color;aH(aE.datapoints,aB,ae(aE.points,aE.color),0,false,aE.xaxis,aE.yaxis,aF);H.restore()}function E(aN,aM,aV,aI,aQ,aF,aD,aL,aK,aU,aR,aC){var aE,aT,aJ,aP,aG,aB,aO,aH,aS;if(aR){aH=aB=aO=true;aG=false;aE=aV;aT=aN;aP=aM+aI;aJ=aM+aQ;if(aTaL.max||aPaK.max){return}if(aEaL.max){aT=aL.max;aB=false}if(aJaK.max){aP=aK.max;aO=false}aE=aL.p2c(aE);aJ=aK.p2c(aJ);aT=aL.p2c(aT);aP=aK.p2c(aP);if(aD){aU.beginPath();aU.moveTo(aE,aJ);aU.lineTo(aE,aP);aU.lineTo(aT,aP);aU.lineTo(aT,aJ);aU.fillStyle=aD(aJ,aP);aU.fill()}if(aC>0&&(aG||aB||aO||aH)){aU.beginPath();aU.moveTo(aE,aJ+aF);if(aG){aU.lineTo(aE,aP+aF)}else{aU.moveTo(aE,aP+aF)}if(aO){aU.lineTo(aT,aP+aF)}else{aU.moveTo(aT,aP+aF)}if(aB){aU.lineTo(aT,aJ+aF)}else{aU.moveTo(aT,aJ+aF)}if(aH){aU.lineTo(aE,aJ+aF)}else{aU.moveTo(aE,aJ+aF)}aU.stroke()}}function e(aD){function aC(aJ,aI,aL,aG,aK,aN,aM){var aO=aJ.points,aF=aJ.pointsize;for(var aH=0;aH")}aH.push("");aF=true}if(aN){aJ=aN(aJ,aM)}aH.push('
'+aJ+"")}if(aF){aH.push("")}if(aH.length==0){return}var aL=''+aH.join("")+"
";if(O.legend.container!=null){c(O.legend.container).html(aL)}else{var aI="",aC=O.legend.position,aD=O.legend.margin;if(aD[0]==null){aD=[aD,aD]}if(aC.charAt(0)=="n"){aI+="top:"+(aD[1]+q.top)+"px;"}else{if(aC.charAt(0)=="s"){aI+="bottom:"+(aD[1]+q.bottom)+"px;"}}if(aC.charAt(1)=="e"){aI+="right:"+(aD[0]+q.right)+"px;"}else{if(aC.charAt(1)=="w"){aI+="left:"+(aD[0]+q.left)+"px;"}}var aK=c('
'+aL.replace('style="','style="position:absolute;'+aI+";")+"
").appendTo(av);if(O.legend.backgroundOpacity!=0){var aG=O.legend.backgroundColor;if(aG==null){aG=O.grid.backgroundColor;if(aG&&typeof aG=="string"){aG=c.color.parse(aG)}else{aG=c.color.extract(aK,"background-color")}aG.a=1;aG=aG.toString()}var aB=aK.children();c('
').prependTo(aK).css("opacity",O.legend.backgroundOpacity)}}}var ab=[],M=null;function K(aI,aG,aD){var aO=O.grid.mouseActiveRadius,a0=aO*aO+1,aY=null,aR=false,aW,aU;for(aW=Q.length-1;aW>=0;--aW){if(!aD(Q[aW])){continue}var aP=Q[aW],aH=aP.xaxis,aF=aP.yaxis,aV=aP.datapoints.points,aT=aP.datapoints.pointsize,aQ=aH.c2p(aI),aN=aF.c2p(aG),aC=aO/aH.scale,aB=aO/aF.scale;if(aH.options.inverseTransform){aC=Number.MAX_VALUE}if(aF.options.inverseTransform){aB=Number.MAX_VALUE}if(aP.lines.show||aP.points.show){for(aU=0;aUaC||aK-aQ<-aC||aJ-aN>aB||aJ-aN<-aB){continue}var aM=Math.abs(aH.p2c(aK)-aI),aL=Math.abs(aF.p2c(aJ)-aG),aS=aM*aM+aL*aL;if(aS=Math.min(aZ,aK)&&aN>=aJ+aE&&aN<=aJ+aX):(aQ>=aK+aE&&aQ<=aK+aX&&aN>=Math.min(aZ,aJ)&&aN<=Math.max(aZ,aJ))){aY=[aW,aU/aT]}}}}if(aY){aW=aY[0];aU=aY[1];aT=Q[aW].datapoints.pointsize;return{datapoint:Q[aW].datapoints.points.slice(aU*aT,(aU+1)*aT),dataIndex:aU,series:Q[aW],seriesIndex:aW}}return null}function aa(aB){if(O.grid.hoverable){u("plothover",aB,function(aC){return aC.hoverable!=false})}}function l(aB){if(O.grid.hoverable){u("plothover",aB,function(aC){return false})}}function R(aB){u("plotclick",aB,function(aC){return aC.clickable!=false})}function u(aC,aB,aD){var aE=y.offset(),aH=aB.pageX-aE.left-q.left,aF=aB.pageY-aE.top-q.top,aJ=C({left:aH,top:aF});aJ.pageX=aB.pageX;aJ.pageY=aB.pageY;var aK=K(aH,aF,aD);if(aK){aK.pageX=parseInt(aK.series.xaxis.p2c(aK.datapoint[0])+aE.left+q.left);aK.pageY=parseInt(aK.series.yaxis.p2c(aK.datapoint[1])+aE.top+q.top)}if(O.grid.autoHighlight){for(var aG=0;aGaH.max||aIaG.max){return}var aF=aE.points.radius+aE.points.lineWidth/2;A.lineWidth=aF;A.strokeStyle=c.color.parse(aE.color).scale("a",0.5).toString();var aB=1.5*aF,aC=aH.p2c(aC),aI=aG.p2c(aI);A.beginPath();if(aE.points.symbol=="circle"){A.arc(aC,aI,aB,0,2*Math.PI,false)}else{aE.points.symbol(A,aC,aI,aB,false)}A.closePath();A.stroke()}function v(aE,aB){A.lineWidth=aE.bars.lineWidth;A.strokeStyle=c.color.parse(aE.color).scale("a",0.5).toString();var aD=c.color.parse(aE.color).scale("a",0.5).toString();var aC=aE.bars.align=="left"?0:-aE.bars.barWidth/2;E(aB[0],aB[1],aB[2]||0,aC,aC+aE.bars.barWidth,0,function(){return aD},aE.xaxis,aE.yaxis,A,aE.bars.horizontal,aE.bars.lineWidth)}function am(aJ,aB,aH,aC){if(typeof aJ=="string"){return aJ}else{var aI=H.createLinearGradient(0,aH,0,aB);for(var aE=0,aD=aJ.colors.length;aE12){n=n-12}else{if(n==0){n=12}}}for(var g=0;g