]> git.za3k.com Git - za3k_blog.git/commitdiff
Add twitter crossposter
authorZachary Vance <vanceza@gmail.com>
Sun, 11 Oct 2015 18:50:15 +0000 (11:50 -0700)
committerZachary Vance <vanceza@gmail.com>
Sun, 11 Oct 2015 18:50:15 +0000 (11:50 -0700)
154 files changed:
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/NextScripts_SNAP.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/Next_Scripts_Logo2.1-HOR-100px.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ajax-loader-med.gif [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ajax-loader-sm.gif [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ap-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ap16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/arrow_l_green_c1.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/bg-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/bg16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/da-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/da16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/di-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/di16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/dl-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/dl16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fb-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fb16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fb2wops.jpg [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fb2wops.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fbPostTypesDiff6.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ff-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ff16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fl-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fl16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fp-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fp16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/gp-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/gp16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/gpPostTypesDiff6.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ip-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ip16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/kt-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/kt16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/application_form.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/blogcom.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/blogger.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/delicious.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/facebook.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/googleplus.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/linkedin.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/pinterest.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/tumblr.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/twitter.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/li-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/li16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/lj-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/lj16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/pk-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/pk16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/pn-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/pn16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/rd-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/rd16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/sc-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/sc16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/snap-icon12.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/st-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/st16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/su-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/su16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tpz-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tpz16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tr-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tr16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tw-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tw16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vb-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vb16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vk-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vk16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vkPostTypesDiff6.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/wl-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/wl16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/wp-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/wp16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/xi-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/xi16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/yt-bg.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/yt16.png [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/ap.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/ap.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/OAuth.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/cacert.pem [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/htmlNumTable.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/liOAuth.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/plurkOAuth.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/scOAuth.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/tmhOAuth.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/tmhUtilities.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/trOAuth.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/xmlrpc-client.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/bg.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/bg.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/da.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/da.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/di.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/di.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/dl.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/dl.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/fb.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/fb.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/fl.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/fl.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/fp.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/fp.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/gp.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/gp.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/ip.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/ip.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/kt.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/kt.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/li.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/li.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/lj.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/lj.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/pk.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/pk.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/pn.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/pn.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/rd.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/rd.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/sc.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/sc.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/st.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/st.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/su.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/su.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/tr.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/tr.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/tw.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/tw.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/vb.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/vb.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/vk.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/vk.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/wp.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/wp.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/xi.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/xi.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/yt.api.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/yt.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/nxs_functions_adv.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/nxs_snap_class.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/js/js.js [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-es_ES.mo [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-es_ES.po [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-pt_BR.mo [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-pt_BR.po [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-ru_RU.mo [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-ru_RU.po [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-tr_TR.mo [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-tr_TR.po [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/nxs_functions.php [new file with mode: 0644]
wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/readme.txt [new file with mode: 0644]

diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/NextScripts_SNAP.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/NextScripts_SNAP.php
new file mode 100644 (file)
index 0000000..e0e0e0b
--- /dev/null
@@ -0,0 +1,561 @@
+<?php\r
+/*\r
+Plugin Name: NextScripts: Social Networks Auto-Poster\r
+Plugin URI: http://www.nextscripts.com/social-networks-auto-poster-for-wordpress\r
+Description: This plugin automatically publishes posts from your blog to multiple accounts on Facebook, Twitter, and Google+ profiles and/or pages.\r
+Author: Next Scripts\r
+Version: 3.4.25\r
+Author URI: http://www.nextscripts.com\r
+Text Domain: nxs_snap\r
+Copyright 2012-2015  Next Scripts, Inc\r
+*/\r
+define( 'NextScripts_SNAP_Version' , '3.4.25' );\r
+\r
+$nxs_mLimit = ini_get('memory_limit'); if (strpos($nxs_mLimit, 'G')) {$nxs_mLimit = (int)$nxs_mLimit * 1024;} else {$nxs_mLimit = (int)$nxs_mLimit;}\r
+  if ($nxs_mLimit>0 && $nxs_mLimit<64) { add_filter('plugin_action_links','ns_add_nomem_link', 10, 2 );\r
+if (!function_exists("ns_add_nomem_link")) { function ns_add_nomem_link($links, $file) { global $nxs_mLimit; static $this_plugin; if (!$this_plugin) $this_plugin = plugin_basename(__FILE__);\r
+  if ($file == $this_plugin){ $settings_link = '<b style="color:red;">Not Enough Memory allowed for PHP.</b> <br/> You have '.$nxs_mLimit.' MB. You need at least 64MB'; array_unshift($links, $settings_link);} return $links;}}\r
+} else {    \r
+require_once "nxs_functions.php"; require_once "inc/nxs_functions_adv.php"; require_once "inc/nxs_snap_class.php"; \r
+//## Include All Available Networks            \r
+//error_reporting(E_ALL); ini_set('display_errors', '1');\r
+global $nxs_snapAvNts, $nxs_snapThisPageUrl, $nxs_snapSetPgURL, $nxs_plurl, $nxs_plpath, $nxs_isWPMU, $nxs_tpWMPU, $nxs_skipSSLCheck;\r
+\r
+$nxs_snapSetPgURL = nxs_get_admin_url().'options-general.php?page=NextScripts_SNAP.php'; $nxs_snapThisPageUrl = $nxs_snapSetPgURL; $nxs_plurl = plugin_dir_url(__FILE__); $nxs_plpath = plugin_dir_path(__FILE__); \r
+$nxs_isWPMU = defined('MULTISITE') && MULTISITE==true; \r
+\r
+if (class_exists("NS_SNAutoPoster")) { nxs_checkAddLogTable(); $plgn_NS_SNAutoPoster = new NS_SNAutoPoster(); }\r
+do_action('nxs_doSomeMore');\r
+if (!isset($nxs_snapAvNts) || !is_array($nxs_snapAvNts)) $nxs_snapAvNts = array(); $nxs_snapAPINts = array(); foreach (glob($nxs_plpath.'inc-cl/*.php') as $filename){  require_once $filename; } \r
+do_action('nxs_doSomeMoreSecond');\r
+//## Tests\r
+if (isset($_GET['page']) && $_GET['page']=='NextScripts_SNAP.php' && isset($_GET['do']) && $_GET['do']=='test'){ \r
+  error_reporting(E_ALL); ini_set('error_reporting', E_ALL); ini_set('display_errors', 1); if (function_exists('gzdeflate')) echo "Y"; else echo "N";  echo "Testting... cURL<br/>";\r
+  nxs_cURLTest("http://www.nextscripts.com/", "HTTPS to NXS", "Social Networks");\r
+  nxs_cURLTest("http://www.google.com/intl/en/contact/", "HTTP to Google", "Mountain View, CA");\r
+  nxs_cURLTest("https://www.google.com/intl/en/contact/", "HTTPS to Google", "Mountain View, CA");\r
+  nxs_cURLTest("https://www.facebook.com/", "HTTPS to Facebook", 'id="facebook"');\r
+  nxs_cURLTest("https://graph.facebook.com/", "HTTPS to API (Graph) Facebook", 'get');  \r
+  nxs_cURLTest("https://www.linkedin.com/nhome/", "HTTPS to LinkedIn", 'rel="canonical" href="https://www.linkedin.com/');\r
+  nxs_cURLTest("https://twitter.com/", "HTTPS to Twitter", '<link rel="canonical" href="https://twitter.com');\r
+  nxs_cURLTest("https://www.pinterest.com/", "HTTPS to Pinterest", 'content="Pinterest"');\r
+  nxs_cURLTest("http://www.livejournal.com/", "HTTP to LiveJournal", '1999 LiveJournal');  \r
+  die('Done');\r
+}\r
+if (isset($_GET['page']) && $_GET['page']=='NextScripts_SNAP.php' && isset($_GET['do']) && $_GET['do']=='crtest'){ \r
+    if (isset($_GET['redo']) && $_GET['redo']=='1'){ delete_option("NXS_cronCheck");  ?><script type="text/javascript">window.location = "<?php echo $nxs_snapSetPgURL; ?>&do=crtest"</script><?php }    \r
+    $cr = get_option('NXS_cronCheck'); if (!empty($cr) && is_array($cr)) { $checks = $cr['cronChecks']; $numChecks = count($checks); echo '<div style="font-family:\'Open Sans\',sans-serif;font-size: 15px;">';\r
+      if ( ($cr['cronCheckStartTime']+900)>(time())) echo "<b>Cron Check is in Progress.....</b> will be finished in ".($cr['cronCheckStartTime']+900-time()).' seconds. Please <input type="button" value="Reload" onClick="location.reload()"> this page to see more results.... <br/><br/>'; else { echo "Cron Check Results:<br/>";\r
+        echo '<span style="color:#761616">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;==== Cron was executed <b>'.$numChecks.'</b> times in 15 minutes ===</span>';\r
+        if ($numChecks>15 || $numChecks<2) echo '<b style="color:#FF0000"><br/><br/>Your WP Cron is not healthy</b><br/><br/><span style="color:#761616">'.(($numChecks>15)?('WP Cron should NOT be executed more then once per minute.'):('WP Cron should be executed at least once in 5-10 minutes.')).'  Some functionality (like auto-reposting) will be disabled.</span><br/><br/><span style="color:#005858; font-weight:bold;">Why this is important?</span><br/><span style="color:#005858">Please see this post: <a href="http://www.nextscripts.com/blog/troubles-wp-cron-existing-posts-auto-reposter/" target="_blank">Troubles with WP Cron and existing posts auto-reposter</a></span><br/><br/><span style="color:#005858; font-weight:bold;">Solution</span><br/><span style="color:#005858">Please see the instructions for the correct WP Cron setup: <a href="http://www.nextscripts.com/tutorials/wp-cron-scheduling-tasks-in-wordpress/" target="_blank">WP-Cron: Scheduling Tasks in WordPress</a></span>'; else  echo '<b style="color:#0000FF"><br/><br/>Your WP Cron is OK</b>';\r
+      }\r
+     ?> <br/><br/><span style="color:#000058; font-weight:normal;">Technical Info:</span> <?php prr($cr);  ?>&nbsp;&nbsp;====&nbsp;<a href="<?php echo $nxs_snapThisPageUrl; ?>&do=crtest&redo=1">Re-do Cron Check</a> (it will take 15 minutes to complete)<?php\r
+    } else echo 'Check is not started yet... Please <input type="button" value="Reload" onClick="location.reload()"> this page in couple minutes.';\r
+     echo '</div>';\r
+    die();\r
+}\r
+//## Delete Account\r
+if (!function_exists("ns_delNT_ajax")) { function ns_delNT_ajax(){ check_ajax_referer('nxsSsPageWPN'); $indx = (int)$_POST['id']; \r
+  global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+  unset($options[$_POST['nt']][$indx]); if (is_array($options)) { update_option('NS_SNAutoPoster', $options); $plgn_NS_SNAutoPoster->nxs_options = $options; }\r
+}}\r
+if (!function_exists("nsAuthFBSv_ajax")) { function nsAuthFBSv_ajax() { check_ajax_referer('nsFB');  $pgID = $_POST['pgID']; $fbs = array();\r
+  global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;   \r
+  foreach ($options['fb'] as $two) { if ($two['fbPgID']==$pgID) $two['wfa']=time(); $fbs[] = $two; } $options['fb'] = $fbs; if (is_array($options)) { update_option('NS_SNAutoPoster', $options); $plgn_NS_SNAutoPoster->nxs_options = $options; }\r
+}}  \r
+if (!function_exists("nsGetBoards_ajax")) { \r
+  function nsGetBoards_ajax() { global $nxs_gCookiesArr; check_ajax_referer('nxsSsPageWPN'); global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+  if (get_magic_quotes_gpc() || $_POST['nxs_mqTest']=="\'") { $_POST['u'] = stripslashes($_POST['u']);  $_POST['p'] = stripslashes($_POST['p']);} $_POST['p'] = trim($_POST['p']); $u = trim($_POST['u']);  \r
+   $loginError = doConnectToPinterest($_POST['u'],  substr($_POST['p'], 0, 5)=='g9c1a'?nsx_doDecode(substr($_POST['p'], 5)):$_POST['p'] );  if ($loginError!==false) {echo $loginError; return "BAD USER/PASS";} \r
+   $gPNBoards = doGetBoardsFromPinterest();  $options['pn'][$_POST['ii']]['pnBoardsList'] = base64_encode($gPNBoards);\r
+   $options['pn'][$_POST['ii']]['pnSvC'] = serialize($nxs_gCookiesArr); if (is_array($options)) update_option('NS_SNAutoPoster', $options); echo $gPNBoards; die();\r
+  }\r
+}     \r
+\r
+if (!function_exists("nxs_getBrdsOrCats_ajax")) { \r
+  function nxs_getBrdsOrCats_ajax() { global $nxs_gCookiesArr; check_ajax_referer('nxsSsPageWPN'); global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+    if (get_magic_quotes_gpc() || $_POST['nxs_mqTest']=="\'") { $_POST['u'] = stripslashes($_POST['u']);  $_POST['p'] = stripslashes($_POST['p']);} $_POST['p'] = trim($_POST['p']); $u = trim($_POST['u']);  \r
+  \r
+    if ( $_POST['ty']=='pn') { $loginError = doConnectToPinterest($_POST['u'],  substr($_POST['p'], 0, 5)=='g9c1a'?nsx_doDecode(substr($_POST['p'], 5)):$_POST['p'] );  if ($loginError!==false) {echo $loginError; return "BAD USER/PASS";} \r
+      $gPNBoards = doGetBoardsFromPinterest();  $options['pn'][$_POST['ii']]['pnBoardsList'] = base64_encode($gPNBoards);\r
+      $options['pn'][$_POST['ii']]['pnSvC'] = serialize($nxs_gCookiesArr); if (is_array($options)) update_option('NS_SNAutoPoster', $options); echo $gPNBoards; die();\r
+    }\r
+    if ( $_POST['ty']=='rd') { $loginError = doConnectToRD($_POST['u'],  substr($_POST['p'], 0, 5)=='g9c1a'?nsx_doDecode(substr($_POST['p'], 5)):$_POST['p'] ); if (!is_array($loginError)) { echo $loginError; return "BAD USER/PASS";} \r
+      $gBoards = doGetSubredditsFromRD(); $options['rd'][$_POST['ii']]['rdSubRedditsList'] = base64_encode($gBoards);\r
+      if (is_array($options)) update_option('NS_SNAutoPoster', $options); echo $gBoards; die();\r
+    }\r
+     \r
+  }\r
+} \r
+\r
+\r
+if (!function_exists("nxs_delPostSettings_ajax")) { function nxs_delPostSettings_ajax(){ check_ajax_referer('nxsSsPageWPN'); global $nxs_snapAvNts; $pid = (int)$_POST['pid'];\r
+  foreach ($nxs_snapAvNts as $avNt) delete_post_meta($pid, 'snap'.strtoupper($avNt['code']));  delete_post_meta($pid, 'snap_isAutoPosted'); delete_post_meta($pid, 'snap_MYURL');\r
+  echo "OK"; die();\r
+}}\r
+\r
+if (!function_exists("nsGetGPCats_ajax")) { \r
+  function nsGetGPCats_ajax() { global $nxs_gCookiesArr; check_ajax_referer('nxsSsPageWPN'); global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+  if (get_magic_quotes_gpc() || $_POST['nxs_mqTest']=="\'") { $_POST['u'] = stripslashes($_POST['u']);  $_POST['p'] = stripslashes($_POST['p']);} $_POST['p'] = trim($_POST['p']); $u = trim($_POST['u']);  \r
+   $loginError = doConnectToGooglePlus2($_POST['u'],  substr($_POST['p'], 0, 5)=='g9c1a'?nsx_doDecode(substr($_POST['p'], 5)):$_POST['p'] ); if ($loginError!==false) {echo $loginError; return "BAD USER/PASS";} \r
+   $gGPCCats = doGetCCatsFromGooglePlus($_POST['c']);  $options['gp'][$_POST['ii']]['gpCCatsList'] = base64_encode($gGPCCats);\r
+   if (is_array($options)) update_option('NS_SNAutoPoster', $options); echo $gGPCCats; die();\r
+  }\r
+}     \r
+if (!function_exists("nsGetWLBoards_ajax")) { \r
+  function nsGetWLBoards_ajax() { global $nxs_gCookiesArr; check_ajax_referer('nxsSsPageWPN'); global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+  if (get_magic_quotes_gpc() || $_POST['nxs_mqTest']=="\'") { $_POST['u'] = stripslashes($_POST['u']);  $_POST['p'] = stripslashes($_POST['p']);} $_POST['p'] = trim($_POST['p']); $u = trim($_POST['u']);  \r
+   $loginError = doConnectToWaNeLo($_POST['u'],  substr($_POST['p'], 0, 5)=='g9c1a'?nsx_doDecode(substr($_POST['p'], 5)):$_POST['p'] );  if ($loginError!==false) {echo $loginError; return "BAD USER/PASS";} \r
+   $gWLBoards = doGetBoardsFromWaNeLo();  $options['wl'][$_POST['ii']]['wlBoardsList'] = base64_encode($gWLBoards);\r
+   $options['wl'][$_POST['ii']]['wlSvC'] = serialize($nxs_gCookiesArr); if (is_array($options)) update_option('NS_SNAutoPoster', $options); echo $gWLBoards; die();\r
+  }\r
+}     \r
+//## Set all posts to Include/exclude from/to Auto-Reposting\r
+if (!function_exists("nxs_SetRpstAll_ajax")) { \r
+ function nxs_SetRpstAll_ajax() { check_ajax_referer('nxsSsPageWPN'); global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;//  prr($options[$_POST['t']][$_POST['ii']]);   \r
+   if ($_POST['ed']=='X' || $_POST['ed']=='L') { // prr($options[$_POST['t']][$_POST['ii']]); prr($options); die();\r
+     if ($_POST['ed']=='X') { $options[$_POST['t']][$_POST['ii']]['rpstLastPostID'] = ''; \r
+       $options[$_POST['t']][$_POST['ii']]['rpstLastShTime'] = ''; $options[$_POST['t']][$_POST['ii']]['rpstLastPostTime'] = '';  $options[$_POST['t']][$_POST['ii']]['rpstNxTime'] = ''; \r
+     } elseif ($_POST['ed']=='L' && trim($_POST['lpid'])!='' && (int)$_POST['lpid'] > 0) { \r
+         $post = get_post($_POST['lpid']);\r
+         $options[$_POST['t']][$_POST['ii']]['rpstLastPostTime'] = $post->post_date;\r
+         $options[$_POST['t']][$_POST['ii']]['rpstLastPostID'] = trim($_POST['lpid']);     \r
+     }\r
+     if (is_array($options)) { update_option('NS_SNAutoPoster', $options); $plgn_NS_SNAutoPoster->nxs_options = $options; } //  echo "|".$_POST['t'].$_POST['ii']."|"; prr($options[$_POST['t']][$_POST['ii']]);\r
+   } else { \r
+    if (!empty($options['nxsCPTSeld'])) $tpArray = maybe_unserialize($options['nxsCPTSeld']); if (!is_array($tpArray)) $tpArray = array('post'); else $tpArray[] = 'post'; \r
+    foreach ($tpArray  as $tp) if (!empty($tp)) { \r
+    $args = array( 'post_type' => $tp, 'post_status' => 'publish', 'numberposts' => 30, 'offset'=> 0, 'fields'=>'ids' ); $posts = get_posts( $args ); \r
+    while (count($posts)>0){\r
+      foreach ($posts as $postID){ $pMeta = maybe_unserialize(get_post_meta($postID, 'snap'.strtoupper($_POST['t']), true)); \r
+        if (!isset($pMeta) || !is_array($pMeta)) $pMeta = array();  if (!isset($pMeta[$_POST['ii']]) || !is_array($pMeta[$_POST['ii']])) $pMeta[$_POST['ii']] = array(); \r
+        if ($_POST['ed']!='2') $pMeta[$_POST['ii']]['rpstPostIncl'] = $_POST['ed']=='0'?'0':'nxsi'.$_POST['ii'].$_POST['t'];  else {           \r
+            $doPost = true; $exclCats = maybe_unserialize($options['exclCats']); $postCats = wp_get_post_categories($postID);\r
+            foreach ($postCats as $pCat) { if ( (is_array($exclCats)) && in_array($pCat, $exclCats)) $doPost = false; else {$doPost = true; break;}}\r
+            $optMt = $options[$_POST['t']][$_POST['ii']];\r
+            if ( $optMt['catSel']=='1' && trim($optMt['catSelEd'])!='' ) { $inclCats = explode(',',$optMt['catSelEd']); foreach ($postCats as $pCat) { if (!in_array($pCat, $inclCats)) $doPost = false; else {$doPost = true; break;}} }\r
+            $pMeta[$_POST['ii']]['rpstPostIncl'] = $doPost?'nxsi'.$_POST['ii'].$_POST['t']:'0'; \r
+        } delete_post_meta($postID, 'snap'.strtoupper($_POST['t'])); add_post_meta($postID, 'snap'.strtoupper($_POST['t']), serialize($pMeta));        \r
+      } $args['offset'] = $args['offset']+30;  $posts = get_posts( $args );\r
+    } \r
+    }\r
+  } echo "OK"; die(); \r
+}}  \r
+if (!function_exists("nxs_clLgo_ajax")) { function nxs_clLgo_ajax() { check_ajax_referer('nxsSsPageWPN'); global $wpdb;\r
+  //update_option('NS_SNAutoPosterLog', ''); \r
+  $wpdb->query( 'DELETE FROM '.$wpdb->prefix . 'nxs_log' ); echo "OK";\r
+}} \r
+if (!function_exists("nxs_rfLgo_ajax")) { function nxs_rfLgo_ajax() { check_ajax_referer('nxsSsPageWPN');  echo "Y:";\r
+  //$log = get_option('NS_SNAutoPosterLog'); $logInfo = maybe_unserialize(get_option('NS_SNAutoPosterLog')); \r
+  $logInfo = nxs_getnxsLog();\r
+  if (is_array($logInfo))foreach (array_reverse($logInfo) as $logline) { \r
+            if ($logline['type']=='E') $actSt = "color:#FF0000;"; elseif ($logline['type']=='M') $actSt = "color:#585858;"; elseif ($logline['type']=='BG') $actSt = "color:#008000; font-weight:bold;";\r
+              elseif ($logline['type']=='I') $actSt = "color:#0000FF;"; elseif ($logline['type']=='W') $actSt = "color:#DB7224;"; elseif ($logline['type']=='A') $actSt = "color:#580058;";\r
+              elseif ($logline['type']=='BI') $actSt = "color:#0000FF; font-weight:bold;"; elseif ($logline['type']=='GR') $actSt = "color:#008080;"; \r
+              elseif ($logline['type']=='S') $actSt = "color:#005800; font-weight:bold;"; else $actSt = "color:#585858;";              \r
+            if ($logline['type']=='E') $msgSt = "color:#FF0000;"; elseif ($logline['type']=='BG') $msgSt = "color:#008000; font-weight:bold;"; else $msgSt = "color:#585858;";                            \r
+            if ($logline['nt']!='') $ntInfo = ' ['.$logline['nt'].'] '; else $ntInfo = '';           \r
+            echo '<snap style="color:#008000">['.$logline['date'].']</snap> - <snap style="'.$actSt.'">['.$logline['act'].']</snap>'.$ntInfo.'-  <snap style="'.$msgSt.'">'.$logline['msg'].'</snap> '.$logline['extInfo'].'<br/>'; \r
+  }\r
+\r
+\r
+}} \r
+\r
+\r
+//## Initialize the admin panel if the plugin has been activated\r
+if (!function_exists("nxs_AddSUASettings")) { function nxs_AddSUASettings() {  global $plgn_NS_SNAutoPoster, $nxs_plurl; // if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;       \r
+  add_menu_page('Social Networks Auto Poster', 'Social Networks Auto Poster', 'manage_options', basename(__FILE__), array(&$plgn_NS_SNAutoPoster, 'showSNAP_WPMU_OptionsPage'), $nxs_plurl.'img/snap-icon12.png');  }}\r
+//## Initialize the admin panel if the plugin has been activated\r
+if (!function_exists("NS_SNAutoPoster_ap")) { function NS_SNAutoPoster_ap() { global $plgn_NS_SNAutoPoster, $nxs_plurl; // if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;       \r
+   if (function_exists('add_options_page')) { add_options_page('Social Networks Auto Poster', \r
+     '<span style="font-weight:bold; color:#2ecc2e;">{SNAP} </span>Social Networks Auto Poster', 'manage_options', basename(__FILE__), array(&$plgn_NS_SNAutoPoster, 'showSNAutoPosterOptionsPage'));          \r
+}}}\r
+if (!function_exists("NS_SNAutoPoster_apx")) { function NS_SNAutoPoster_apx() { global $plgn_NS_SNAutoPoster, $nxs_plurl;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;       \r
+   if (function_exists('add_options_page')) { add_options_page('Social Networks Auto Poster', \r
+     '<span style="font-weight:bold; color:#2ecc2e">{SNAP} </span>Social Networks Auto Poster ', 'manage_options', basename(__FILE__), array(&$plgn_NS_SNAutoPoster, 'showSNAutoPosterOptionsPagex'));     \r
+}}}\r
+//## Main Function to Post \r
+if (!function_exists("nxs_snapLogPublishTo")) { function nxs_snapLogPublishTo( $new_status, $old_status, $post ) { clean_post_cache( $post->ID );\r
+  if ( $old_status!='publish' && $old_status!='trash' && $new_status == 'publish' ) { nxs_addToLogN('BG', "*** ID: {$post->ID}, Type: {$post->post_type}", '', ' Status Changed: '."{$old_status}_to_{$new_status}".'. Autopost requested.'); \r
+    nxs_snapPublishTo($post);\r
+  }\r
+}}\r
+if (!function_exists("nxs_snapPublishTo")) { function nxs_snapPublishTo($postArr, $type='', $aj=false) {  global $plgn_NS_SNAutoPoster, $nxs_snapAvNts, $blog_id, $nxs_tpWMPU;  //  echo " | nxs_doSMAS2 | "; prr($postArr);\r
+  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+  if (!empty($_POST['nxs_snapPostOptions'])) { $NXS_POSTX = $_POST['nxs_snapPostOptions'];  $NXS_POST = array(); $NXS_POST = NXS_parseQueryStr($NXS_POSTX); } else $NXS_POST = $_POST;\r
+  if(is_object($postArr)) $postID = $postArr->ID; else { $postID = $postArr; $postArr = get_post($postID);  } $isPost = isset($NXS_POST["snapEdIT"]);  $post = get_post($postID);   \r
+  if ($post->post_status != 'publish') { sleep(5);  $post = get_post($postID); $postArr = $post;\r
+    if ($post->post_status != 'publish') {  nxs_addToLogN('I', 'Cancelled', '', 'Autopost Cancelled - Post is not "Published" Right now - Post ID:('.$postID.') - Current Post status -'.$post->post_status ); return; }\r
+  }  \r
+  //nxs_addToLogN('BG', 'Post Status Changed', '', '-=## Autopost requested.'.($blog_id>1?'BlogID:'.$blog_id:'').' PostID:('.$postID.') Post Type: '.$post->post_type.' ##=-'); \r
+   //$args=array('public'=>true, '_builtin'=>false);  $output = 'names';  $operator = 'and';  $post_types = array(); ## Removed because some post types are not available from WP Cron\r
+  // if (function_exists('get_post_types')) { $post_types=get_post_types($args, $output, $operator);  ## Removed because some post types are not available from WP Cron\r
+  if ( isset($options['nxsCPTSeld']) && $options['nxsCPTSeld']!='') $nxsCPTSeld = unserialize($options['nxsCPTSeld']);  else $nxsCPTSeld = array(); \r
+  // if ($post->post_type == 'post' || ($options['useForPages']=='1' && $post->post_type == 'page') || (in_array($post->post_type, $post_types) && in_array($post->post_type, $nxsCPTSeld))) {  ## Removed because some post types are not available from WP Cron\r
+  $post_types = array();\r
+  if ($post->post_type == 'post' || ($options['useForPages']=='1' && $post->post_type == 'page') || (in_array($post->post_type, $nxsCPTSeld))) { \r
+    if ($isPost && $options['skipSecurity']!='1' && !current_user_can("make_snap_posts") && !current_user_can("manage_options")) { nxs_addToLogN('I', 'Skipped', '', 'Current user can\'t autopost - Post ID:('.$postID.')' ); return; }\r
+    $postUser = $postArr->post_author; \r
+    if ($options['skipSecurity']!='1' && !user_can( $postUser, "make_snap_posts" ) && !user_can( $postUser, "manage_options")){ nxs_addToLogN('I', 'Skipped', '', '', 'User ID '.$postUser.' can\'t autopost (see <a target="_blank" href="http://www.nextscripts.com/support-faq/#a17">FAQ #1.7</a>)  - Post ID:('.$postID.')' ); return; } \r
+    if ($isPost) $plgn_NS_SNAutoPoster->NS_SNAP_SavePostMetaTags($postID); \r
+    if (function_exists('nxs_doSMAS2')) { nxs_doSMAS2($postArr, $type, $aj); return; } else {\r
+    $options = $plgn_NS_SNAutoPoster->nxs_options;  $ltype=strtolower($type);\r
+    if ($nxs_tpWMPU=='S') { switch_to_blog(1); $plgn_NS_SNAutoPoster = new NS_SNAutoPoster(); $options = $plgn_NS_SNAutoPoster->nxs_options; restore_current_blog(); }\r
+    if (!isset($options['nxsHTDP']) || $options['nxsHTDP']=='S') { if(isset($NXS_POST["snapEdIT"]) && $NXS_POST["snapEdIT"]=='1') { $publtype='S'; $delay = rand(2,10); } else $publtype='A'; } else $publtype = 'I';\r
+    nxs_addToLogN('BG', 'Start =- ', '', '------=========#### NEW AUTO-POST REQUEST '.($blog_id>1?'BlogID:'.$blog_id:'').' PostID:('.$postID.') '.($publtype=='S'?'Scheduled +'.$delay:($publtype=='A'?'Automated':'Immediate')).' ####=========------');\r
+  \r
+    $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted=='1') { nxs_addToLogN('W', 'Skipped', '', 'Already Autoposted - Post ID:('.$postID.')' ); return; }  \r
+    $snap_isEdIT = get_post_meta($postID, 'snapEdIT', true); if ($snap_isEdIT!='1') { $doPost = true; $exclCats = maybe_unserialize($options['exclCats']); $postCats = wp_get_post_categories($postID);\r
+       foreach ($postCats as $pCat) { if ( (is_array($exclCats)) && in_array($pCat, $exclCats)) $doPost = false; else {$doPost = true; break;}}\r
+       if (!$doPost) { nxs_addToLogN('I', 'Skipped', '', 'Automated Post - Category Excluded - Post ID:('.$postID.')' ); return; }\r
+    }          \r
+    foreach ($nxs_snapAvNts as $avNt) { \r
+      if (isset($options[$avNt['lcode']]) && count($options[$avNt['lcode']])>0 ){ $clName = 'nxs_snapClass'.$avNt['code']; \r
+        if ($isPost && isset($NXS_POST[$avNt['lcode']])) $po = $NXS_POST[$avNt['lcode']]; else { $po =  get_post_meta($postID, 'snap'.$avNt['code'], true); $po =  maybe_unserialize($po);}       \r
+        if (isset($po) && is_array($po)) $isPostMeta = true; else { $isPostMeta = false; $po = $options[$avNt['lcode']]; }\r
+        delete_post_meta($postID, 'snap_isAutoPosted'); add_post_meta($postID, 'snap_isAutoPosted', '1');\r
+        $optMt = $options[$avNt['lcode']][0]; if ($isPostMeta) { $ntClInst = new $clName(); $optMt = $ntClInst->adjMetaOpt($optMt, $po[0]); }               \r
+        if ($snap_isEdIT!='1') { $doPost = true; \r
+            if ( $optMt['catSel']=='1' && trim($optMt['catSelEd'])!='' ) { $inclCats = explode(',',$optMt['catSelEd']); \r
+              foreach ($postCats as $pCat) { if (!in_array($pCat, $inclCats)) $doPost = false; else {$doPost = true; break;}} \r
+              if (!$doPost) { nxs_addToLogN('I', 'Skipped', $avNt['name'].' ('.$optMt['nName'].')', '[Automated Post]  - Individual Category Excluded - Post ID:('.$postID.')' ); continue; }\r
+            }\r
+            //## Get tags\r
+            if (!empty($optMt['tagsSel'])) { $inclTags = explode(',',strtolower($optMt['tagsSel'])); $postTags = wp_get_post_tags( $postID, array( 'fields' => 'slugs' ) ); $postCust = array();\r
+              //## Get all custom post types\r
+              foreach ($inclTags as $iTag){ \r
+                if (strpos($iTag,'|')!==false){ $dd=explode('|',$itag); if (empty($postCust[$dd[0]])) $postCust[$dd[0]]=wp_get_object_terms($postID,$dd[0],array('fields'=>'slugs')); \r
+                  if (!in_array(strtolower($dd[1]), $postCust[$dd[0]])) $doPost = false; else {$doPost = true; break;}\r
+                } else if (!in_array(strtolower($iTag), $postTags)) $doPost = false; else {$doPost = true; break;}              \r
+              }\r
+              if (!$doPost) { nxs_addToLogN('I', 'Skipped', $avNt['name'].' ('.$optMt['nName'].')', '[Automated Post]  - Tag Excluded - Post ID:('.$postID.') - Included Tags: '.$optMt['tagsSel'].' | Post Tags: '.print_r($postTags, true)." | ".print_r($postCust, true) ); continue; }\r
+            }\r
+        }        \r
+        if ($optMt['do'.$avNt['code']]=='1') { $optMt['ii'] = 0;  \r
+            if ($publtype=='A' && ($optMt['nMin']>0 || $optMt['nHrs']>0 || $optMt['nTime']!='')) $publtype='S';        \r
+            if ($publtype=='S') { if (isset($optMt['nHrs']) && isset($optMt['nMin']) && ($optMt['nHrs']>0 || $optMt['nMin']>0) ) { $delay = $optMt['nMin']*60+$optMt['nHrs']*3600;\r
+                nxs_addToLogN('I', 'Delayed', $avNt['name'].' ('.$optMt['nName'].')', 'Post has been delayed for '.$delay.' Seconds ('.($optMt['nHrs']>0?$optMt['nHrs'].' Hours':'')." ".($optMt['nMin']>0?$optMt['nMin'].' Minutes':'').')' );\r
+              } else $delay = rand(2,10); $optMt['timeToRun'] = time()+$delay; \r
+              if ($options['ver']>300.330) { $shName = '_nxs_snap_sh_'.$avNt['code'].'0_'.$optMt['timeToRun']; delete_post_meta($postID, $shName); add_post_meta($postID, $shName, $optMt); $args = array($postID, $shName); }\r
+                else $args = array($postID, $optMt);  \r
+              wp_schedule_single_event($optMt['timeToRun'],'ns_doPublishTo'.$avNt['code'], $args); \r
+                nxs_addToLogN('BI', 'Scheduled', $avNt['name'].' ('.$optMt['nName'].') for '.$optMt['timeToRun']."(".date_i18n('Y-m-d H:i:s', $optMt['timeToRun'] + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS )).")", ' PostID:('.$postID.')' );\r
+            } else { $fname = 'nxs_doPublishTo'.$avNt['code']; $fname($postID, $optMt); }\r
+        } else { nxs_addToLogN('GR', 'Skipped', $avNt['name'].' ('.$optMt['nName'].')', '-=[Unchecked Account]=- - PostID:'.$postID.'' ); }\r
+      }                   \r
+    } } } else { nxs_addToLogN('I', 'Skipped', '', 'Excluded Post Type: '.$post->post_type.' (Post ID: '.$postID.')| NOT IN ('.print_r($nxsCPTSeld, true).')| ALL ('.print_r($post_types, true).')' ); return; }\r
+   if ($isS) restore_current_blog(); \r
+}} \r
+\r
+//## Add settings link to plugins list\r
+if (!function_exists("ns_add_settings_link")) { function ns_add_settings_link($links, $file) {\r
+    static $this_plugin;\r
+    if (!$this_plugin) $this_plugin = plugin_basename(__FILE__);\r
+    if ($file == $this_plugin){\r
+        $settings_link = '<a href="options-general.php?page=NextScripts_SNAP.php">'.__("Settings", "default").'</a>';\r
+        array_unshift($links, $settings_link);\r
+    }\r
+    return $links;\r
+}}\r
+//## Actions and filters    \r
+if (!function_exists("nxs_adminInitFunc")) { function nxs_adminInitFunc(){ global $plgn_NS_SNAutoPoster, $nxs_snapThisPageUrl, $pagenow, $nxs_isWPMU; \r
+  $nxs_snapThisPageUrl = nxs_get_admin_url().($pagenow=='admin.php'?'network/':'').$pagenow.'?page=NextScripts_SNAP.php'; \r
+  if (function_exists('nxs_getInitUCheck') && (isset($plgn_NS_SNAutoPoster))) { $options = $plgn_NS_SNAutoPoster->nxs_options; if (is_array($options) && count($options)>1) nxs_getInitUCheck($options);  } \r
+  //## Javascript to Admin Panel        \r
+  if (( ($pagenow=='options-general.php'||$pagenow=='admin.php') && isset($_GET['page']) && ( $_GET['page']=='NextScripts_SNAP.php' || stripos($_GET['page'], 'nxssnap')==0)) ||$pagenow=='post.php'||$pagenow=='post-new.php'){\r
+    if ( isset($_GET['post_type']) && $_GET['post_type']=='page' && isset($options['useForPages']) && $options['useForPages']!=1 ) {} \r
+      else { add_filter( 'tiny_mce_before_init', 'nxs_tiny_mce_before_init' ); add_action('admin_head', 'jsPostToSNAP'); add_action('admin_head', 'nxs_jsPostToSNAP2'); }\r
+  }\r
+  if (function_exists('nxsDoLic_ajax')) { add_action('wp_ajax_nxsDoLic', 'nxsDoLic_ajax');  } \r
+}}\r
+if (!function_exists("nxs_adminInitFunc2")) { function nxs_adminInitFunc2(){ global $plgn_NS_SNAutoPoster, $nxs_snapThisPageUrl, $pagenow;   $nxs_snapThisPageUrl = nxs_get_admin_url().($pagenow=='admin.php'?'network/':'').$pagenow.'?page=NextScripts_SNAP.php';  //## Add MEtaBox to Post Edit Page\r
+  if (current_user_can("see_snap_box") || current_user_can("manage_options")) { add_action('add_meta_boxes', array($plgn_NS_SNAutoPoster, 'NS_SNAP_addCustomBoxes'));        \r
+    if (!($pagenow=='options-general.php' && !empty($_GET['page']) && $_GET['page']=='NextScripts_SNAP.php')) add_action( 'admin_bar_menu', 'nxs_toolbar_link_to_mypage', 999 );\r
+  }\r
+}}\r
+\r
+function nxs_saveSiteSets_ajax(){ check_ajax_referer('nxssnap'); \r
+   if ($_POST['sid']=='A'){  global $wpdb; $allBlogs = $wpdb->get_results("SELECT blog_id FROM wp_blogs where blog_id > 1");\r
+     foreach( $allBlogs as $aBlog ) { switch_to_blog($aBlog->blog_id); \r
+       $options =  get_option('NS_SNAutoPoster'); $options['suaMode'] = $_POST['sset']; update_option('NS_SNAutoPoster', $options);\r
+     }       \r
+   } else { switch_to_blog($_POST['sid']); \r
+     $options = get_option('NS_SNAutoPoster'); $options['suaMode'] = $_POST['sset']; if( is_super_admin() && $_POST['sid']=='1' && $options['suaMode']!='O') $options['suaMode'] = 'O'; update_option('NS_SNAutoPoster', $options); \r
+   }\r
+   echo "OK"; die();\r
+}\r
+\r
+//## OG:Tags\r
+function nxs_start_ob(){ if (!is_admin()) ob_start( 'nxs_ogtgCallback' );}\r
+function nxs_end_flush_ob(){ if (!is_admin()) @ob_end_flush();}\r
+function nxs_ogtgCallback($content){ global $post, $plgn_NS_SNAutoPoster;  \r
+  if (stripos($content, 'og:title')!==false) $ogOut = "\r\n"; else {\r
+    if (!isset($plgn_NS_SNAutoPoster)) $options = get_option('NS_SNAutoPoster'); else $options = $plgn_NS_SNAutoPoster->nxs_options;    $ogimgs = array();  \r
+    if (!empty($post) && !is_object($post) && int($post)>0) $post = get_post($post); if (empty($options['advFindOGImg'])) $options['advFindOGImg'] = 0;       \r
+    $title = preg_match( '/<title>(.*)<\/title>/', $content, $title_matches );  \r
+    if ($title !== false && count( $title_matches) == 2 ) $ogT ='<meta property="og:title" content="' . $title_matches[1] . '" />'."\r\n"; else {\r
+      if (is_home() || is_front_page() )  $ogT = get_bloginfo( 'name' ); else $ogT = get_the_title();\r
+      $ogT =  '<meta property="og:title" content="' . esc_attr( apply_filters( 'nxsog_title', $ogT ) ) . '" />'."\r\n";          \r
+    }    \r
+    $prcRes = preg_match( '/<meta name="description" content="(.*)"/', $content, $description_matches );    \r
+    if ( $prcRes !== false && count( $description_matches ) == 2 ) $ogD = '<meta property="og:description" content="' . $description_matches[1] . '" />'."\r\n"; {\r
+      if (!empty($post) && is_object($post) && is_singular()) {\r
+        if(has_excerpt($post->ID))$ogD=strip_tags(nxs_snapCleanHTML(get_the_excerpt($post->ID)));else $ogD= str_replace("  ", ' ', str_replace("\r\n", ' ', trim(substr(strip_tags(nxs_snapCleanHTML(strip_shortcodes($post->post_content))), 0, 200))));\r
+      } else $ogD = get_bloginfo('description');  $ogD = preg_replace('/\r\n|\r|\n/m','',$ogD); \r
+      $ogD = '<meta property="og:description" content="'.esc_attr( apply_filters( 'nxsog_desc', $ogD ) ).'" />'."\r\n";          \r
+    }    \r
+    $ogSN = '<meta property="og:site_name" content="'.get_bloginfo('name').'" />'."\r\n";\r
+    $ogLoc = strtolower(esc_attr(get_locale())); if (strlen($ogLoc)==2) $ogLoc .= "_".strtoupper($ogLoc);\r
+    $ogLoc = '<meta property="og:locale" content="'.$ogLoc.'" />'."\r\n"; $iss = is_home();  \r
+    $ogType = is_singular()?'article':'website'; if(empty($vidsFromPost)) $ogType = '<meta property="og:type" content="'.esc_attr(apply_filters('nxsog_type', $ogType)).'" />'."\r\n";                  \r
+        \r
+    if (is_home() || is_front_page()) $ogUrl = get_bloginfo( 'url' ); else $ogUrl = 'http' . (is_ssl() ? 's' : '') . "://".$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\r
+    $ogUrl = '<meta property="og:url" content="'.esc_url( apply_filters( 'nxsog_url', $ogUrl ) ) . '" />' . "\r\n";\r
+  \r
+    if (!is_home()) { /*\r
+      $vidsFromPost = nsFindVidsInPost($post); if ($vidsFromPost !== false && is_singular()) {  echo '<meta property="og:video" content="http://www.youtube.com/v/'.$vidsFromPost[0].'" />'."\n";  \r
+      echo '<meta property="og:video:type" content="application/x-shockwave-flash" />'."\n";\r
+      echo '<meta property="og:video:width" content="480" />'."\n";\r
+      echo '<meta property="og:video:height" content="360" />'."\n";\r
+      echo '<meta property="og:image" content="http://i2.ytimg.com/vi/'.$vidsFromPost[0].'/mqdefault.jpg" />'."\n";\r
+      echo '<meta property="og:type" content="video" />'."\n"; \r
+    } */    \r
+      if (is_object($post)) { $imgURL = nxs_getPostImage($post->ID, 'full', $options['ogImgDef']); if (!empty($imgURL)) $ogimgs[] = $imgURL;\r
+        $imgsFromPost = nsFindImgsInPost($post, (int)$options['advFindOGImg']==1);           \r
+        if ($imgsFromPost !== false && is_singular() && is_array($ogimgs) && is_array($imgsFromPost))  $ogimgs = array_merge($ogimgs, $imgsFromPost);       \r
+      }\r
+    }       \r
+    //## Add default image to the endof the array\r
+    if ( count($ogimgs)<1 && isset($options['ogImgDef']) && $options['ogImgDef']!='') $ogimgs[] = $options['ogImgDef']; \r
+    //## Output og:image tags\r
+    $ogImgsOut = ''; if (!empty($ogimgs) && is_array($ogimgs)) foreach ($ogimgs as $ogimage)  $ogImgsOut .= '<meta property="og:image" content="'.esc_url(apply_filters('ns_ogimage', $ogimage)).'" />'."\r\n"; \r
+    $ogOut  = "\r\n".$ogSN.$ogT.$ogD.$ogType.$ogUrl.$ogLoc.$ogImgsOut;\r
+  } $content = str_ireplace('<!-- ## NXSOGTAGS ## -->', $ogOut, $content); \r
+  return $content;\r
+}\r
+function nxs_addOGTagsPreHolder() { echo "<!-- ## NXS/OG ## --><!-- ## NXSOGTAGS ## --><!-- ## NXS/OG ## -->\n\r";}\r
+\r
+if (!function_exists("nxssnap_enqueue_scripts")) { function nxssnap_enqueue_scripts(){ \r
+  wp_enqueue_script( 'nxssnap-scripts', plugin_dir_url( __FILE__ ) . 'js/js.js', array( 'jquery' ),  NextScripts_SNAP_Version);\r
+  wp_localize_script( 'nxssnap-scripts', 'MyAjax', array( 'ajaxurl' => nxs_get_admin_url( 'admin-ajax.php' ), 'nxsnapWPnonce' => wp_create_nonce( 'nxsnapWPnonce' ),));\r
+}} \r
+\r
+function nxs_noR(&$item, &$key){ $item = is_string($item)?(str_replace("\r","\n",str_replace("\n\r","\n",str_replace("\r\n","\n",$item)))):$item; }\r
+\r
+if (!function_exists("nxs_getExpSettings_ajax")) { function nxs_getExpSettings_ajax() { /* check_ajax_referer('nsDN'); */  $filename = preg_replace('/[^a-z0-9\-\_\.]/i','',$_POST['filename']);\r
+ header("Cache-Control: "); header("Content-type: text/plain"); header('Content-Disposition: attachment; filename="'.$filename.'"');\r
+ global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+ //array_walk_recursive($options, 'nxs_addslashes');\r
+ array_walk_recursive($options,"nxs_noR");  $ser = serialize($options); echo $ser;  die();\r
+}}\r
+\r
+function cron_add_nxsreposter( $schedules ) { $schedules['nxsreposter'] = array( 'interval' => 90, 'display' => __( 'NXS Reposter' )); return $schedules;} // Do this every 90 seconds\r
+\r
+function nxs_showNewPostForm($options, $air = true) { global $nxs_snapAvNts, $nxs_plurl; ?> \r
+  <div id="nxsNewSNPost" style="width: 880px;">\r
+  \r
+    <div><h2>New Post to the Configured Social Networks</h2></div>\r
+    <div class="nxsNPRow"><label class="nxsNPLabel">Title (Will be used where possible):</label><br/><input id="nxsNPTitle" type="text" size="80"></div>\r
+    <div class="nxsNPRow"><label class="nxsNPLabel">Message:</label><br/><textarea id="nxsNPText" name="textarea" cols="90" rows="8"></textarea></div>\r
+    \r
+    <div class="nxsNPRow"><label class="nxsNPLabel">Post Type:</label><br/><input type="radio" name="nxsNPType"  id="nxsNPTypeT" value="T" checked="checked" /><label class="nxsNPRowSm">Text Post</label><br/>\r
+    \r
+    <br/><input type="radio" name="nxsNPType"  id="nxsNPTypeL" value="A"><label class="nxsNPRowSm">Link Post</label>\r
+      <div class="nxsNPRowSm"><label class="nxsNPLabel">URL (Will be attached where possible, text post will be made where not):</label><br/><input id="nxsNPLink" onfocus="jQuery('#nxsNPTypeL').attr('checked', 'checked')" type="text" size="80" /></div>\r
+    <br/><input type="radio" name="nxsNPType" id="nxsNPTypeI" value="I"><label class="nxsNPRowSm">Image Post</label>\r
+      <div class="nxsNPRowSm"><label class="nxsNPLabel">Image URL (Will be used where possible, text post will be made where not):</label><br/><input id="nxsNPImg" onfocus="jQuery('#nxsNPTypeI').attr('checked', 'checked')" type="text" size="80" /></div>\r
+    </div>\r
+    <div class="nxsNPRow">\r
+      <div class="nxsNPLeft" style="display: inline-block;">\r
+      \r
+      <div id="nxsNPLoaderPost" style="display: none";> <img  src="<?php echo $nxs_plurl; ?>img/ajax-loader-med.gif" /> Posting...., it could take some time...  </div>\r
+      \r
+      <div class="submitX"><input style="font-weight: bold; width: 70px;" type="button" onclick="nxs_doNP();" value="Post">\r
+      <?php if ($air) { ?>&nbsp;&nbsp;&nbsp;&nbsp;<input id="nxsNPCloseBt" style="width: 70px;" class="bClose" type="button" value="Cancel"> <?php } ?>\r
+      </div> \r
+      \r
+      <div id="nxsNPResult">&nbsp;</div>\r
+      </div>\r
+      <div class="nxsNPRight">\r
+     \r
+    <div class="nxsNPRow">\r
+    <div style="float: right; font-size: 12px;" >\r
+      <a href="#" onclick="jQuery('.nxsNPDoChb').attr('checked','checked'); return false;"><?php  _e('Check All', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>&nbsp;<a href="#" onclick="jQuery('.nxsNPDoChb').removeAttr('checked'); return false;"><?php _e('Uncheck All', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>\r
+    </div>\r
+    <label class="nxsNPLabel">Networks:</label><br/> \r
+    <div class="nxsNPRow" style="font-size: 12px;">\r
+    <?php \r
+      foreach ($nxs_snapAvNts as $avNt) { $clName = 'nxs_snapClass'.$avNt['code']; $ntClInst = new $clName();\r
+        if ( isset($options[$avNt['lcode']]) && count($options[$avNt['lcode']])>0) { ?>  \r
+              \r
+              <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $avNt['lcode']; ?>16.png);"><?php echo $avNt['name']; ?><br/>\r
+              <?php $ntOpts = $options[$avNt['lcode']]; foreach ($ntOpts as $indx=>$pbo){ ?>\r
+              <input class="nxsNPDoChb" value="<?php echo $avNt['lcode']; ?>--<?php echo $indx; ?>" name="nxsNPNts" type="checkbox" <?php if ((int)$pbo['do'.$avNt['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> /> \r
+                      \r
+             <?php echo $avNt['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></br>\r
+              \r
+              <?php  }  ?>\r
+              </div>  <?php  \r
+        } } ?> \r
+      </div>\r
+   \r
+  </div>   \r
+  </div>\r
+  </div> \r
+  </div> \r
+  \r
+  <?php    \r
+}\r
+function nxs_doNewNPPost($options){ global $nxs_snapAvNts, $nxs_plurl; $postResults = '';\r
+    if (!empty($_POST['mNts']) && is_array($_POST['mNts'])) { nxs_addToLogN('S', '-=== New Form Post requested ===-', 'Form', count($_POST['mNts']).' Networks', print_r($_POST['mNts'], true));\r
+      $message = array('title'=>'', 'text'=>'', 'siteName'=>'', 'url'=>'', 'imageURL'=>'', 'videoURL'=>'', 'tags'=>'', 'urlDescr'=>'', 'urlTitle'=>'');  \r
+      if (get_magic_quotes_gpc() || $_POST['nxs_mqTest']=="\'") { $_POST['mText'] = stripslashes($_POST['mText']); $_POST['mTitle'] = stripslashes($_POST['mTitle']); }\r
+      $message['pText'] = $_POST['mText'];   $message['pTitle'] = $_POST['mTitle'];\r
+      //## Get URL info\r
+      if (!empty($_POST['mLink']) && substr($_POST['mLink'], 0, 4)=='http') { $message['url'] = $_POST['mLink'];            \r
+        $flds = array('id'=>$message['url'], 'scrape'=>'true');      $response =  wp_remote_post('https://graph.facebook.com/v2.3/', array('body' => $flds)); \r
+        if (is_wp_error($response)) $badOut['Error'] = print_r($response, true)." - ERROR"; else { $response = json_decode($response['body'], true);  \r
+          if (!empty($response['description'])) $message['urlDescr'] = $response['description'];  if (!empty($response['title'])) $message['urlTitle'] =  $response['title'];\r
+          if (!empty($response['site_name'])) $message['siteName'] = $response['site_name'];\r
+          if (!empty($response['image'][0]['url'])) $message['imageURL'] = $response['image'][0]['url'];\r
+        }\r
+      }\r
+      if (!empty($_POST['mImg']) && substr($_POST['mImg'], 0, 4)=='http') $message['imageURL'] = $_POST['mImg']; \r
+          \r
+      foreach ($_POST['mNts'] as $ntC){ $ntA = explode('--',$ntC); $ntOpts = $options[$ntA[0]][$ntA[1]]; \r
+        if (!empty($ntOpts) && is_array($ntOpts)) { $logNT = $ntA[0];  $clName = 'nxs_class_SNAP_'.strtoupper($logNT);                  \r
+          $logNT = '<span style="color:#800000">'.strtoupper($logNT).'</span> - '.$ntOpts['nName'];      \r
+          $ntOpts['postType'] = $_POST['mType']; $ntToPost = new $clName(); $ret = $ntToPost->doPostToNT($ntOpts, $message);      \r
+          if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+             nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), ''); $postResults .= $logNT ." - Error (Please see log)<br/>";\r
+          } else {  // ## All Good - log it.            \r
+             if (!empty($ret['postURL'])) $extInfo = '<a href="'.$ret['postURL'].'" target="_blank">Post Link</a>'; \r
+             nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); $postResults .= $logNT ." - OK - ".$extInfo."<br/>"; \r
+          }\r
+        }\r
+    } echo "Done. Results:<br/> ".$postResults; }\r
+}\r
+\r
+if (!function_exists("nxs_snapAjax")) { function nxs_snapAjax() { check_ajax_referer('nxsSsPageWPN'); global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+  if ($_POST['nxsact']=='getNTset') { $ii = $_POST['ii']; $nt = $_POST['nt']; $ntl = strtolower($nt); $pbo = $options[$ntl][$ii];  $pbo['ntInfo']['lcode'] = $ntl; $clName = 'nxs_snapClass'.$nt; $ntObj = new $clName();  \r
+     $ntObj->showNTSettings($ii, $pbo);  \r
+  }\r
+  if ($_POST['nxsact']=='getNewPostDlg') nxs_showNewPostForm($options);\r
+  if ($_POST['nxsact']=='doNewPost') nxs_doNewNPPost($options);\r
+  if ($_POST['nxsact']=='nxsCptCheckGP') nxs_CptCheckGP($options);\r
+  die();\r
+}}\r
+\r
+function nxs_admin_footer() {global $nxs_plurl; ?> <div style="display: none;" id="nxs_popupDiv"><span class="nxspButton bClose"><span>X</span></span> \r
+   <div id="nxsNPLoader" style="text-align: center; width: 100%; height: 80px; padding-top: 60px;";> <img  src="<?php echo $nxs_plurl; ?>img/ajax-loader-med.gif" /> </div> \r
+   <div id="nxs_popupDivCont" style="right: 10px; top:10px; font-size: 16px; font-weight: lighter;"> </div></div> <?php \r
+}\r
+function nxs_admin_header() { wp_nonce_field( 'nxsSsPageWPN', 'nxsSsPageWPN_wpnonce' ); }\r
+function nxs_popupCSS() {?><style type="text/css">\r
+  .nxspButton:hover { background-color: #1E1E1E;}\r
+  .nxspButton { background-color: #2B91AF; color: #FFFFFF; cursor: pointer; display: inline-block; text-align: center; text-decoration: none; border-radius: 6px 6px 6px 6px; box-shadow: none; font: bold 131% sans-serif; padding: 0 6px 2px; position: absolute; right: -7px; top: -7px;}\r
+  #nxs_spPopup, #nxs_popupDiv, #showLicForm{ min-height: 250px; z-index:999991; background-color: #FFFFFF; border-radius: 5px 5px 5px 5px;  box-shadow: 0 0 3px 2px #999999; color: #111111; display: none;  min-width: 850px; padding: 25px;}\r
+  #nxsNewSNPost .nxsNPLabel {position: relative;}\r
+  #nxsNewSNPost .nxsNPRow {position: relative; padding: 8px;}\r
+  #nxsNewSNPost input {position: relative; font-size: 16px;}\r
+  .nsx_iconedTitle {font-size: 17px; font-weight: bold; margin-bottom: 15px; padding-left: 20px; background-repeat: no-repeat; }\r
+  .nxsNPRowSm, .nxsNPRow .nsx_iconedTitle {font-size: 12px; }\r
+  .nxsNPLeft, .nxsNPRight {position: relative; float: left;}\r
+  .nxsNPLeft {width: 40%;} .nxsNPRight {width: 60%;}\r
+  \r
+  \r
+</style><?php\r
+}\r
+\r
+add_action('admin_head', 'nxs_popupCSS');\r
+add_action('in_admin_footer', 'nxs_admin_footer');\r
+add_action('in_admin_header', 'nxs_admin_header');\r
\r
+//## Actions and filters    \r
+//add_action( 'transition_post_status', 'nxs_snapLogPublishTo', 10, 3 );\r
+\r
+add_filter('cron_schedules', 'cron_add_nxsreposter');  \r
+add_action('nxs_hourly_event', 'nxs_do_this_hourly'); //## Adds Hourly Event  \r
+add_action('nxs_querypost_event', 'nxs_do_post_from_query'); //## Query and Re-Poster  \r
+add_action('wp', 'nxs_activation'); \r
+add_action('shutdown', 'nxs_psCron', 25); \r
+\r
+add_filter('get_avatar','ns_get_avatar', 10, 5 );\r
+  \r
+if (isset($plgn_NS_SNAutoPoster)) { //## Actions\r
+  //## Add the admin menu    \r
+  if ($nxs_skipSSLCheck===true){ add_filter('https_ssl_verify', '__return_false'); add_filter('https_local_ssl_verify', '__return_false'); }  \r
+  if ($nxs_isWPMU) { add_action('network_admin_menu', 'nxs_AddSUASettings'); global $blog_id; } $suOptions = array(); \r
+  $suOptions = $plgn_NS_SNAutoPoster->nxs_options; if ($nxs_isWPMU) { $ntOptions = $plgn_NS_SNAutoPoster->nxs_ntoptions; if (!isset($suOptions['suaMode'])) $suOptions['suaMode'] = ''; }  \r
+  $isPMB = $nxs_isWPMU && function_exists('nxs_doSMAS1') && $blog_id==1;\r
+  $isO = !$nxs_isWPMU || ($nxs_isWPMU && ($suOptions['isMU']||$suOptions['isMUx']) && ($suOptions['suaMode']=='O' || ($suOptions['suaMode']=='' && $ntOptions['nxsSUType']=='O')));\r
+  $isS = !$nxs_isWPMU || ($nxs_isWPMU && ($suOptions['isMU']||$suOptions['isMUx']) && ($suOptions['suaMode']=='S' || ($suOptions['suaMode']=='' && $ntOptions['nxsSUType']=='S')));\r
+  if ($nxs_isWPMU) { if ($isO) $nxs_tpWMPU = 'O'; elseif ($isS) $nxs_tpWMPU = 'S';} // prr($nxs_tpWMPU); prr($suOptions);\r
+  \r
+  if (function_exists('nxs_doSMAS3')) nxs_doSMAS3($isS, $isO);\r
+  if (!$isO && !$isS && !$isPMB && !function_exists('showSNAP_WPMU_OptionsPageExt')) add_action('admin_menu', 'NS_SNAutoPoster_apx');    \r
+\r
+  add_action('admin_init', 'nxs_adminInitFunc');  \r
+  add_action( 'admin_enqueue_scripts', 'nxssnap_enqueue_scripts' ); \r
+  \r
+  add_action('wp_ajax_nxs_snap_aj', 'nxs_snapAjax');\r
+  \r
+  add_action('wp_ajax_nxs_clLgo', 'nxs_clLgo_ajax');\r
+  add_action('wp_ajax_nxs_rfLgo', 'nxs_rfLgo_ajax');\r
+  add_action('wp_ajax_nxs_prxTest', 'nxs_prxTest_ajax');\r
+  add_action('wp_ajax_nxs_prxGet', 'nxs_prxGet_ajax');\r
+  add_action('wp_ajax_nxs_getExpSettings', 'nxs_getExpSettings_ajax');\r
+  add_action('wp_ajax_nxs_hideTip', 'nxs_hideTip_ajax');\r
+  \r
+                       \r
+  if ($isO || $isS) {    \r
+    add_action( 'transition_post_status', 'nxs_snapLogPublishTo', 10, 3 );\r
+  \r
+    foreach ($nxs_snapAvNts as $avNt) { add_action('ns_doPublishTo'.$avNt['code'], 'nxs_doPublishTo'.$avNt['code'], 1, 2); }\r
+    foreach ($nxs_snapAvNts as $avNt) { add_action('wp_ajax_rePostTo'.$avNt['code'], 'nxs_rePostTo'.$avNt['code'].'_ajax'); }\r
+    \r
+    //## Add AJAX Calls for Test and Repost    \r
+    \r
+    add_action('wp_ajax_nxs_getBrdsOrCats' , 'nxs_getBrdsOrCats_ajax');\r
+    add_action('wp_ajax_getBoards' , 'nsGetBoards_ajax');\r
+    add_action('wp_ajax_getGPCats' , 'nsGetGPCats_ajax');\r
+    add_action('wp_ajax_getWLBoards' , 'nsGetWLBoards_ajax');\r
+    add_action('wp_ajax_SetRpstAll' , 'nxs_SetRpstAll_ajax');\r
+    add_action('wp_ajax_nxs_delPostSettings' , 'nxs_delPostSettings_ajax');    \r
+    add_action('wp_ajax_nsDN', 'ns_delNT_ajax');    \r
+  }\r
+  \r
+  if ($isO) {    \r
+    add_action('admin_menu', 'NS_SNAutoPoster_ap');    \r
+    add_action('admin_init', 'nxs_adminInitFunc2');        \r
+    //## Initialize options on plugin activation\r
+    $myrelpath = preg_replace( '/.*wp-content.plugins./', '', __FILE__ ); \r
+    add_action("activate_".$myrelpath,  array(&$plgn_NS_SNAutoPoster, 'init'));    \r
+    \r
+    //## Add/Change meta on Save\r
+    add_action('edit_post', array($plgn_NS_SNAutoPoster, 'NS_SNAP_SavePostMetaTags'));\r
+    add_action('publish_post', array($plgn_NS_SNAutoPoster, 'NS_SNAP_SavePostMetaTags'));\r
+    add_action('save_post', array($plgn_NS_SNAutoPoster, 'NS_SNAP_SavePostMetaTags'));\r
+  //  add_action('edit_page_form', array($plgn_NS_SNAutoPoster, 'NS_SNAP_SavePostMetaTags'));         \r
+    \r
+    add_action('wp_ajax_nsAuthFBSv', 'nsAuthFBSv_ajax');\r
+    //## Custom Post Types and OG tags\r
+    add_filter('plugin_action_links','ns_add_settings_link', 10, 2 );\r
+\r
+    //## Scedulled Publish Calls    \r
+    if (!empty($suOptions['nsOpenGraph']) && (int)$suOptions['nsOpenGraph'] == 1) {    \r
+      add_action( 'init', 'nxs_start_ob', 0 );\r
+      add_action('wp_head', 'nxs_addOGTagsPreHolder', 150);  \r
+      add_action('shutdown', 'nxs_end_flush_ob', 1000);   \r
+    }    \r
+  }    \r
+  if ($nxs_isWPMU){      \r
+      if (function_exists('nxssnapmu_columns_head')) add_filter('wpmu_blogs_columns', 'nxssnapmu_columns_head');\r
+      if (function_exists('nxssnapmu_columns_content')) add_action('manage_blogs_custom_column', 'nxssnapmu_columns_content', 10, 2);\r
+      if (function_exists('nxssnapmu_columns_content')) add_action('manage_sites_custom_column', 'nxssnapmu_columns_content', 10, 2);    \r
+      if (function_exists('nxs_add_style')) add_action( 'admin_footer', 'nxs_add_style' );  \r
+      if (function_exists('nxs_saveSiteSets_ajax')) add_action('wp_ajax_nxs_saveSiteSets', 'nxs_saveSiteSets_ajax');\r
+  }\r
+ }\r
+}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/Next_Scripts_Logo2.1-HOR-100px.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/Next_Scripts_Logo2.1-HOR-100px.png
new file mode 100644 (file)
index 0000000..4cbf94f
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/Next_Scripts_Logo2.1-HOR-100px.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ajax-loader-med.gif b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ajax-loader-med.gif
new file mode 100644 (file)
index 0000000..9c1830d
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ajax-loader-med.gif differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ajax-loader-sm.gif b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ajax-loader-sm.gif
new file mode 100644 (file)
index 0000000..2801947
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ajax-loader-sm.gif differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ap-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ap-bg.png
new file mode 100644 (file)
index 0000000..e7c6b61
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ap-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ap16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ap16.png
new file mode 100644 (file)
index 0000000..36752e6
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ap16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/arrow_l_green_c1.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/arrow_l_green_c1.png
new file mode 100644 (file)
index 0000000..6b6bbb3
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/arrow_l_green_c1.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/bg-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/bg-bg.png
new file mode 100644 (file)
index 0000000..d8ab34f
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/bg-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/bg16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/bg16.png
new file mode 100644 (file)
index 0000000..40172ce
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/bg16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/da-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/da-bg.png
new file mode 100644 (file)
index 0000000..d856cdd
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/da-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/da16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/da16.png
new file mode 100644 (file)
index 0000000..76b4311
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/da16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/di-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/di-bg.png
new file mode 100644 (file)
index 0000000..bc93525
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/di-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/di16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/di16.png
new file mode 100644 (file)
index 0000000..f879366
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/di16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/dl-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/dl-bg.png
new file mode 100644 (file)
index 0000000..818ca86
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/dl-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/dl16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/dl16.png
new file mode 100644 (file)
index 0000000..e4ebb98
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/dl16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fb-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fb-bg.png
new file mode 100644 (file)
index 0000000..729b561
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fb-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fb16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fb16.png
new file mode 100644 (file)
index 0000000..f0faf29
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fb16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fb2wops.jpg b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fb2wops.jpg
new file mode 100644 (file)
index 0000000..2a2e6e4
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fb2wops.jpg differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fb2wops.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fb2wops.png
new file mode 100644 (file)
index 0000000..058673e
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fb2wops.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fbPostTypesDiff6.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fbPostTypesDiff6.png
new file mode 100644 (file)
index 0000000..5adfd18
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fbPostTypesDiff6.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ff-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ff-bg.png
new file mode 100644 (file)
index 0000000..974b543
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ff-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ff16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ff16.png
new file mode 100644 (file)
index 0000000..f0c4ac7
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ff16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fl-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fl-bg.png
new file mode 100644 (file)
index 0000000..3e37e5e
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fl-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fl16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fl16.png
new file mode 100644 (file)
index 0000000..2ffe161
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fl16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fp-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fp-bg.png
new file mode 100644 (file)
index 0000000..fe99c08
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fp-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fp16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fp16.png
new file mode 100644 (file)
index 0000000..63bce7b
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/fp16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/gp-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/gp-bg.png
new file mode 100644 (file)
index 0000000..92b4619
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/gp-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/gp16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/gp16.png
new file mode 100644 (file)
index 0000000..95bfab9
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/gp16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/gpPostTypesDiff6.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/gpPostTypesDiff6.png
new file mode 100644 (file)
index 0000000..3cc54f1
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/gpPostTypesDiff6.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ip-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ip-bg.png
new file mode 100644 (file)
index 0000000..d5e0e45
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ip-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ip16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ip16.png
new file mode 100644 (file)
index 0000000..aec6b93
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/ip16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/kt-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/kt-bg.png
new file mode 100644 (file)
index 0000000..47adffc
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/kt-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/kt16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/kt16.png
new file mode 100644 (file)
index 0000000..fdb9c6c
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/kt16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/application_form.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/application_form.png
new file mode 100644 (file)
index 0000000..cbeff70
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/application_form.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/blogcom.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/blogcom.png
new file mode 100644 (file)
index 0000000..de40fce
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/blogcom.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/blogger.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/blogger.png
new file mode 100644 (file)
index 0000000..e7a01a2
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/blogger.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/delicious.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/delicious.png
new file mode 100644 (file)
index 0000000..e4ebb98
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/delicious.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/facebook.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/facebook.png
new file mode 100644 (file)
index 0000000..f6437cd
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/facebook.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/googleplus.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/googleplus.png
new file mode 100644 (file)
index 0000000..c5c9a9f
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/googleplus.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/linkedin.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/linkedin.png
new file mode 100644 (file)
index 0000000..69f7db4
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/linkedin.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/pinterest.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/pinterest.png
new file mode 100644 (file)
index 0000000..376b180
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/pinterest.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/tumblr.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/tumblr.png
new file mode 100644 (file)
index 0000000..60ada38
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/tumblr.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/twitter.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/twitter.png
new file mode 100644 (file)
index 0000000..c014be9
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/led/twitter.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/li-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/li-bg.png
new file mode 100644 (file)
index 0000000..c2025f0
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/li-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/li16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/li16.png
new file mode 100644 (file)
index 0000000..20353ba
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/li16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/lj-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/lj-bg.png
new file mode 100644 (file)
index 0000000..36932df
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/lj-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/lj16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/lj16.png
new file mode 100644 (file)
index 0000000..ca68059
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/lj16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/pk-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/pk-bg.png
new file mode 100644 (file)
index 0000000..a0d7f23
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/pk-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/pk16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/pk16.png
new file mode 100644 (file)
index 0000000..d19b0ab
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/pk16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/pn-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/pn-bg.png
new file mode 100644 (file)
index 0000000..80f78a6
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/pn-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/pn16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/pn16.png
new file mode 100644 (file)
index 0000000..42c9b06
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/pn16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/rd-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/rd-bg.png
new file mode 100644 (file)
index 0000000..f330189
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/rd-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/rd16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/rd16.png
new file mode 100644 (file)
index 0000000..bedd08a
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/rd16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/sc-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/sc-bg.png
new file mode 100644 (file)
index 0000000..9449bd5
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/sc-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/sc16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/sc16.png
new file mode 100644 (file)
index 0000000..37dc0a1
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/sc16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/snap-icon12.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/snap-icon12.png
new file mode 100644 (file)
index 0000000..011bf50
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/snap-icon12.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/st-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/st-bg.png
new file mode 100644 (file)
index 0000000..8fd6582
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/st-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/st16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/st16.png
new file mode 100644 (file)
index 0000000..94b863b
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/st16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/su-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/su-bg.png
new file mode 100644 (file)
index 0000000..fb39c68
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/su-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/su16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/su16.png
new file mode 100644 (file)
index 0000000..c232c7f
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/su16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tpz-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tpz-bg.png
new file mode 100644 (file)
index 0000000..e33acac
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tpz-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tpz16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tpz16.png
new file mode 100644 (file)
index 0000000..37e3c8b
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tpz16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tr-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tr-bg.png
new file mode 100644 (file)
index 0000000..61a6063
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tr-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tr16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tr16.png
new file mode 100644 (file)
index 0000000..1536a14
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tr16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tw-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tw-bg.png
new file mode 100644 (file)
index 0000000..56c88c2
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tw-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tw16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tw16.png
new file mode 100644 (file)
index 0000000..0628570
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/tw16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vb-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vb-bg.png
new file mode 100644 (file)
index 0000000..e01f385
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vb-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vb16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vb16.png
new file mode 100644 (file)
index 0000000..48cebb4
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vb16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vk-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vk-bg.png
new file mode 100644 (file)
index 0000000..4a385d8
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vk-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vk16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vk16.png
new file mode 100644 (file)
index 0000000..8decd15
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vk16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vkPostTypesDiff6.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vkPostTypesDiff6.png
new file mode 100644 (file)
index 0000000..f999fcd
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/vkPostTypesDiff6.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/wl-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/wl-bg.png
new file mode 100644 (file)
index 0000000..007942e
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/wl-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/wl16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/wl16.png
new file mode 100644 (file)
index 0000000..6630bd2
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/wl16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/wp-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/wp-bg.png
new file mode 100644 (file)
index 0000000..c5f9747
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/wp-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/wp16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/wp16.png
new file mode 100644 (file)
index 0000000..5a285c8
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/wp16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/xi-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/xi-bg.png
new file mode 100644 (file)
index 0000000..7d190ad
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/xi-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/xi16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/xi16.png
new file mode 100644 (file)
index 0000000..151124d
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/xi16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/yt-bg.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/yt-bg.png
new file mode 100644 (file)
index 0000000..14af8f7
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/yt-bg.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/yt16.png b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/yt16.png
new file mode 100644 (file)
index 0000000..7e1d961
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/img/yt16.png differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/ap.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/ap.api.php
new file mode 100644 (file)
index 0000000..cf855c5
--- /dev/null
@@ -0,0 +1,91 @@
+<?php    \r
+//## NextScripts App.net Connection Class\r
+\r
+/* \r
+1. Options\r
+\r
+nName - Nickname of the account [Optional] (Presentation purposes only - No affect on functionality)\r
+rdUName - Reddit User Name\r
+rdPass - Reddit User Passord\r
+rdSubReddit - Name of the Sub-Reddit\r
+postType - A or T - "Attached link" or "Text"\r
+\r
+rdTitleFormat\r
+rdTextFormat\r
+\r
+2. Post Info\r
+\r
+url\r
+title - [up to 300 characters long] - title of the submission\r
+text\r
+\r
+*/\r
+$nxs_snapAPINts[] = array('code'=>'AP', 'lcode'=>'ap', 'name'=>'app.net');\r
+\r
+if (!class_exists("nxs_class_SNAP_AP")) { class nxs_class_SNAP_AP {\r
+    \r
+    var $ntCode = 'AP';\r
+    var $ntLCode = 'ap';\r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array(); // return false;\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }\r
+    function createFile($imgURL, $auth) { $data = array();       \r
+      $remImgURL = urldecode($imgURL); $urlParced = pathinfo($remImgURL); $remImgURLFilename = $urlParced['basename']; \r
+      $imgData = wp_remote_get($remImgURL); if (is_wp_error($imgData)) { $badOut['Error'] = print_r($imgData, true)." - ERROR"; return $badOut; }          \r
+      $imgData = $imgData['body'];\r
+      $tmp=array_search('uri', @array_flip(stream_get_meta_data($GLOBALS[mt_rand()]=tmpfile())));  \r
+      if (!is_writable($tmp)) return "Your temporary folder or file (file - ".$tmp.") is not witable. Can't upload image to App.Net";\r
+      rename($tmp, $tmp.='.png'); register_shutdown_function(create_function('', "unlink('{$tmp}');"));       \r
+      file_put_contents($tmp, $imgData); if (!$tmp) return 'You must specify a path to a file'; if (!file_exists($tmp)) return 'File path specified does not exist';\r
+      if (!is_readable($tmp)) return 'File path specified is not readable';\r
+      if (!array_key_exists('name', $data)) $data['name'] = basename($tmp);\r
+      if (array_key_exists('mime-type', $data)) { $mimeType = $data['mime-type']; unset($data['mime-type']);} else $mimeType = null;\r
+      if (!array_key_exists('kind', $data)) { $test = @getimagesize($tmp); \r
+        if ($test && array_key_exists('mime', $test)) { $data['kind'] = 'image'; if (!$mimeType) $mimeType = $test['mime']; } else $data['kind'] = 'other';\r
+      }\r
+      if (!$mimeType && function_exists('finfo_open') ) { $finfo = finfo_open(FILEINFO_MIME_TYPE); $mimeType = finfo_file($finfo, $tmp); finfo_close($finfo); }\r
+      if (!$mimeType) return 'Unable to determine mime type of file, try specifying it explicitly';  $data['type'] = "com.nextscripts.photos";\r
+      $data['content'] = "@$tmp;type=$mimeType";\r
+      $url = "https://alpha-api.app.net/stream/0/files?access_token=".$auth; \r
+\r
+      $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r
+      global $nxs_skipSSLCheck; if ($nxs_skipSSLCheck===true) curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\r
+      curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $response = curl_exec($ch); $errmsg = curl_error($ch); curl_close($ch); //prr($response);\r
+      if ($errmsg!='') return $errmsg; else $response = json_decode($response, true);\r
+      if (!is_array($response) || !isset($response['meta']) || $response['meta']['code']!='200' || $response['data']['file_token']=='') return print_r($response, true);\r
+      return array('id'=>$response['data']['id'], 'file_token'=>$response['data']['file_token'], 'url'=>$response['data']['url']);\r
+    }\r
+\r
+    function doPostToNT($options, $message){ global $nxs_urlLen; $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>'');\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['apAppAuthToken']) || trim($options['apAppAuthToken'])=='') { $badOut['Error'] = 'Not Authorized'; return $badOut; }      \r
+      if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      //## Format Post\r
+      if (!empty($message['pText'])) $text = $message['pText']; else $text = nxs_doFormatMsg($options['apTextFormat'], $message); $text = nsTrnc($text, 256); \r
+      //## Make Post            \r
+      if (isset($message['imageURL'])) $img = trim(nxs_getImgfrOpt($message['imageURL'], $options['imgSize'])); else $img = '';  \r
+      if ($options['attchImg']!=false && $img!='') $remoteImg = $this->createFile($img, $options['apAppAuthToken']); $ann = array();       \r
+      if (is_array($remoteImg)) {\r
+         $ann[] = array("type"=>"net.app.core.oembed", "value"=> array("+net.app.core.file"=>array("file_id" => $remoteImg['id'], "file_token" => $remoteImg['file_token'], "format"=> "oembed"))); \r
+      }\r
+      $url = "https://alpha-api.app.net/stream/0/posts?include_post_annotations=1&access_token=".$options['apAppAuthToken'];            \r
+      $flds = array('text' => $text, 'annotations' => $ann); $flds = json_encode($flds); $hdrsArr = array('Content-Type' => 'application/json');\r
+      $response = wp_remote_post( $url, array( 'method' => 'POST', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr, 'body' => $flds));   \r
+      if (is_wp_error($response)) {  $badOut['Error'] = print_r($response, true)." - ERROR"; return $badOut; } \r
+      $response = json_decode($response['body'], true); //prr($response); die();      \r
+      //## Check Result\r
+      if (!is_array($response) || !isset($response['meta']) || $response['meta']['code']!='200' || $response['data']['canonical_url']=='') { $badOut['Error'] = print_r($response, true)." - ERROR"; return $badOut; }       \r
+      $apNewPostURL = $response['data']['canonical_url']; $apNewPostID = $response['data']['id'];  \r
+      if ($apNewPostID!='') {         \r
+         return array('postID'=>$apNewPostID, 'isPosted'=>1, 'postURL'=>$apNewPostURL, 'pDate'=>date('Y-m-d H:i:s'));          \r
+      } else { $badOut['Error'] .= print_r($tmhOAuth->response['response'], true)." MSG:".print_r($msg, true); \r
+        return $badOut;\r
+      }\r
+      return $badOut;\r
+    }  \r
+    \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/ap.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/ap.php
new file mode 100644 (file)
index 0000000..35a57ee
--- /dev/null
@@ -0,0 +1,258 @@
+<?php    \r
+//## NextScripts App.net Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'AP', 'lcode'=>'ap', 'name'=>'App.net');\r
+\r
+if (!class_exists("nxs_snapClassAP")) { class nxs_snapClassAP { var $ntInfo = array('code'=>'AP', 'lcode'=>'ap', 'name'=>'App.Net', 'defNName'=>'', 'tstReq' => true);\r
+  //#### Show Common Settings\r
+  function showGenNTSettings($ntOpts){  global $nxs_plurl, $nxs_snapSetPgURL, $nxs_gOptions;  $ntInfo = $this->ntInfo;\r
+    if ( isset($_GET['code']) && $_GET['code']!='' && (isset($_GET['state']) && stripos($_GET['state'], 'ap-')!==false) ){  $at = $_GET['code'];  $to = explode('-', $_GET['state']); $_GET['acc'] = $to[1];\r
+     echo "-= This is normal technical authorization info that will dissapear (Unless you get some errors) =- <br/><br/><br/>";\r
+     $fbo = $ntOpts[$_GET['acc']]; $wprg = array(); $response = wp_remote_get('https://graph.facebook.com/nextscripts', $wprg);\r
+     echo $nxs_snapSetPgURL.'&auth=ap&acc='.$_GET['acc']."||"; if(stripos($nxs_snapSetPgURL, 'page=NextScripts_SNAP.php')===false) { $newURL = explode('?', $nxs_snapSetPgURL); $nxs_snapSetPgURL = $newURL[0]; }\r
+     if( is_wp_error( $response) && isset($response->errors['http_request_failed']) && stripos($response->errors['http_request_failed'][0], 'SSL')!==false ) {  prr($response->errors); $wprg['sslverify'] = false; }\r
+     if (isset($fbo['appID'])){ echo "-="; prr($fbo);\r
+       $wprg['body'] = array('client_id'=>$fbo['appID'], 'client_secret'=>$fbo['appSec'], 'grant_type'=>'authorization_code', 'redirect_uri'=>$nxs_snapSetPgURL, 'state'=>'ap-'.$_GET['acc'], 'code'=>$at); prr($wprg);  \r
+       $response = wp_remote_post('https://account.app.net/oauth/access_token', $wprg); \r
+       if ( (is_object($response) && (isset($response->errors))) || (is_array($response) && stripos($response['body'],'"error":')!==false )) { prr($response); die(); }  \r
+       $params = json_decode($response['body'], true);  $fbo['apAppAuthToken'] = $params['access_token']; if ($params['user_id']>0) { $fbo['appAppUserID'] = $params['user_id']; $fbo['appAppUserName'] = $params['username'];  }\r
+       if ($params['user_id']>0) { if (function_exists('get_option')) $nxs_gOptions = get_option('NS_SNAutoPoster'); if(!empty($nxs_gOptions)) { \r
+         $nxs_gOptions['ap'][$_GET['acc']] = $fbo;  nxs_settings_save($nxs_gOptions); } ?><script type="text/javascript">window.location = "<?php echo $nxs_snapSetPgURL; ?>"</script>      \r
+       <?php } die(); }\r
+    }  \r
+  ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = 'App.Net'; \r
+          if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['appAppUserID']) && $pbo['appAppUserID']>1)?'1':'';\r
+        ?>\r
+            <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            \r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> /> \r
+            \r
+            <?php } ?>\r
+            \r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?>\r
+          <a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;          \r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($options){ $opts = array('nName'=>'', 'doAP'=>'1', 'apUName'=>'', 'apPageID'=>'', 'apCommID'=>'', 'postType'=>'A', 'apPass'=>''); $opts['ntInfo']= array('lcode'=>'ap'); $this->showNTSettings($options, $opts, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl, $nxs_snapSetPgURL; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['attchImg'])) $options['attchImg'] = '';     \r
+    if (!isset($options['appID'])) $options['appID'] = ''; if (!isset($options['appSec'])) $options['appSec'] = '';  ?>    \r
+            <div id="doAP<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">     \r
+            <input type="hidden" value="0" id="apDoS<?php echo $ntU.$ii; ?>" />\r
+            <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/ap16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/setup-installation/app-net-social-networks-auto-poster-wordpress/"><?php $nType="App.Net"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="ap[<?php echo $ii; ?>][nName]" id="apnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel('ap', $ii, $options['qTLng']); ?>\r
+            <br/>\r
+                <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+            \r
+            <div style="width:100%;"><strong>App.Net Client ID:</strong> </div><input name="ap[<?php echo $ii; ?>][appID]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['appID'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+            <div style="width:100%;"><strong>App.Net Client Secret:</strong> </div><input name="ap[<?php echo $ii; ?>][appSec]"  style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['appSec'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>                \r
+              <br/>  \r
+                      \r
+            <div id="altFormat" style="margin-left: 0px;">\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="apTextFormat<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apTextFormat<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)\r
+              </div>\r
+              \r
+              <textarea cols="150" rows="3" id="ap<?php echo $ii; ?>SNAPformat" name="ap[<?php echo $ii; ?>][apTextFormat]" style="width:51%;max-width: 650px;" onfocus="jQuery('#ap<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apAPMsgFrmt<?php echo $ii; ?>');"><?php if ($isNew) _e("New post (%TITLE%) has been published on %SITENAME% - %URL%", 'social-networks-auto-poster-facebook-twitter-g'); else _e(apply_filters('format_to_edit', htmlentities($options['apTextFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea>\r
+              \r
+              <?php nxs_doShowHint("apTextFormat".$ii); ?>\r
+            </div>\r
+            \r
+    <p style="margin: 0px;"><input value="1"  id="apAPAttch" type="checkbox" name="ap[<?php echo $ii; ?>][attchImg]"  <?php if ((int)$options['attchImg'] == 1) echo "checked"; ?> /> <strong><?php _e('Attach Image to App.net Post', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong></p>\r
+            <br/><br/>\r
+            <?php  if($options['appID']=='') { ?>\r
+            <b><?php _e('Authorize Your App.Net Account', 'social-networks-auto-poster-facebook-twitter-g'); ?></b> <?php _e('Please click "Update Settings" to be able to Authorize your account.', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+            <?php } else { if(isset($options['appAppUserID']) && $options['appAppUserID']>0) { ?>\r
+            <?php _e('Your App.Net Account has been authorized.', 'social-networks-auto-poster-facebook-twitter-g'); ?> User ID: <?php _e(apply_filters('format_to_edit', htmlentities($options['appAppUserID'].' - '.$options['appAppUserName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>.\r
+            <?php _e('You can', 'social-networks-auto-poster-facebook-twitter-g'); ?> Re- <?php } ?>            \r
+            <a href="https://account.app.net/oauth/authenticate?client_id=<?php echo trim($options['appID']);?>&response_type=code&redirect_uri=<?php echo trim(urlencode($nxs_snapSetPgURL).'&state=ap-'.$ii.'&scope=stream+write_post+follow+messages+update_profile+files');?>">Authorize Your App.Net Account</a> \r
+            <?php if (!isset($options['appAppUserID']) || $options['appAppUserID']<1) { ?> <div class="blnkg">&lt;=== <?php _e('Authorize your account', 'social-networks-auto-poster-facebook-twitter-g'); ?> ===</div> \r
+            <br/><br/><i> <?php _e('If you get App.Net message:', 'social-networks-auto-poster-facebook-twitter-g'); ?> <b>"Error. An error occurred. Please try again later."</b> or <b>"Error 191"</b>  <?php _e('please make sure that domain name in your App.Net App matches your website domain exactly. Please note that www. and non www. versions are different domains.', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> <?php }?>\r
+            <?php } ?>\r
+            <br/>\r
+            \r
+            \r
+            <?php if ($isNew) { ?> <input type="hidden" name="ap[<?php echo $ii; ?>][apDoAP]" value="1" id="apDoNewAP<?php echo $ii; ?>" /> <?php } ?>\r
+            <?php if (isset($options['appAppUserID']) && $options['appAppUserID']>0) { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('AP', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>              <?php } \r
+            ?>\r
+    \r
+     </div>\r
+      <?php /* ######################## Tools Tab ####################### */ ?>\r
+    <?php if (!$isNew) { ?><div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">    \r
+    <?php nxs_showCatTagsCTFilters($nt, $ii, $options);\r
+          nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);\r
+          nxs_showRepostSettings($nt, $ii, $options); ?>      \r
+    </div> <?php } ?>       <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div>\r
+            \r
+            \r
+            </div><?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = $this->ntInfo['code'];\r
+    foreach ($post as $ii => $pval){ \r
+      if (isset($pval['appID']) && $pval['appID']!=''){ if (!isset($options[$ii])) $options[$ii] = array();\r
+        if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);  \r
+        \r
+        if (isset($pval['appID']))   $options[$ii]['appID'] = trim($pval['appID']);\r
+        \r
+        if (isset($pval['appSec']))   $options[$ii]['appSec'] = trim($pval['appSec']);\r
+        if (isset($pval['apSubReddit']))    $options[$ii]['apSubReddit'] = trim($pval['apSubReddit']);          \r
+        \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';                     \r
+            \r
+        if (isset($pval['attchImg'])) $options[$ii]['attchImg'] = $pval['attchImg']; else $options[$ii]['attchImg'] = 0;                \r
+        if (isset($pval['apTextFormat'])) $options[$ii]['apTextFormat'] = trim($pval['apTextFormat']);        \r
+        if (isset($pval['apDoAP']))      $options[$ii]['doAP'] = $pval['apDoAP']; else $options[$ii]['doAP'] = 0; \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }  \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID;  $nt = 'ap'; $ntU = 'AP'; \r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapAP', true));  \r
+        if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii])) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]);  if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = '';\r
+        $doAP = $ntOpt['doAP'] && (is_array($pMeta) || $ntOpt['catSel']!='1');    $imgToUse = $ntOpt['imgToUse']; \r
+        $isAvailAP =  $ntOpt['appID']!='' && $ntOpt['appSec']!='';   $apMsgFormat = htmlentities($ntOpt['apTextFormat'], ENT_COMPAT, "UTF-8");             \r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2">\r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvailAP) { ?><input class="nxsGrpDoChb" value="1" id="doAP<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="ap[<?php echo $ii; ?>][doAP]" <?php if ((int)$doAP == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="ap[<?php echo $ii; ?>][doAP]" value="<?php echo $doAP;?>"> <?php } ?> <?php } ?>\r
+      \r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/ap16.png);">App.Net - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvailAP) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToAP_repostButton" id="rePostToAP_button" value="<?php _e('Repost to App.Net', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php  } ?>\r
+                    \r
+                    <?php  if (is_array($pMeta) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) { \r
+                        \r
+                        ?> <span id="pstdAP<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+                      <a style="font-size: 10px;" href="<?php echo $pMeta[$ii]['postURL']; ?>" target="_blank"><?php $nType="App.Net"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>                \r
+                \r
+                <?php if (!$isAvailAP) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your App.Net Account to AutoPost to App.Net</b></td></tr>\r
+                <?php }  else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>ap" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> /> \r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+                </td></tr> <?php } ?>\r
+                \r
+     \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top;  padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th><td>                \r
+                \r
+                <textarea cols="150" rows="1" id="ap<?php echo $ii; ?>SNAPformat" name="ap[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#ap<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apAPMsgFrmt<?php echo $ii; ?>');"><?php echo $apMsgFormat ?></textarea>\r
+                \r
+                </td></tr>\r
+                <tr><th scope="row" style="text-align:right; width:150px; vertical-align:top; padding-top: 5px; padding-right:10px;">\r
+                 <input value="0"  type="hidden" name="ap[<?php echo $ii; ?>][attchImg]"/>\r
+                 <input value="1" type="checkbox" name="ap[<?php echo $ii; ?>][attchImg]"  <?php if ((int)$ntOpt['attchImg'] == 1) echo "checked"; ?> /> </th><td><strong>Attach Image to App.net Post</strong></td> </tr>      \r
+                 <?php /* ## Select Image & URL ## */ nxs_showImgToUseDlg($nt, $ii, $imgToUse);  ?>\r
+               \r
+                   \r
+                             \r
+       <?php } \r
+\r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = ''; \r
+    if (isset($pMeta['SNAPformat'])) $optMt['apTextFormat'] = $pMeta['SNAPformat'];   \r
+    if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];  if (isset($pMeta['urlToUse'])) $optMt['urlToUse'] = $pMeta['urlToUse'];  \r
+    if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+    if (isset($pMeta['attchImg'])) $optMt['attchImg'] = $pMeta['attchImg'] == 1?1:0; else { if (isset($pMeta['attchImg'])) $optMt['attchImg'] = 0; } \r
+    if (isset($pMeta['doAP'])) $optMt['doAP'] = $pMeta['doAP'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doAP'] = 0; } \r
+    if (isset($pMeta['SNAPincludeAP']) && $pMeta['SNAPincludeAP'] == '1' ) $optMt['doAP'] = 1;  \r
+    return $optMt;\r
+  }  \r
+}}\r
+if (!function_exists("nxs_rePostToAP_ajax")) {\r
+  function nxs_rePostToAP_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+    foreach ($options['ap'] as $ii=>$two) if ($ii==$_POST['nid']) {   $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['apPageID'].$two['apUName']==$_POST['nid']) {  \r
+      $appo =  get_post_meta($postID, 'snapAP', true); $appo =  maybe_unserialize($appo);// prr($appo);\r
+      if (is_array($appo) && isset($appo[$ii]) && is_array($appo[$ii])){ $ntClInst = new nxs_snapClassAP(); $two = $ntClInst->adjMetaOpt($two, $appo[$ii]); } \r
+      $result = nxs_doPublishToAP($postID, $two); if ($result == 200) die("Successfully sent your post to App.Net."); else die($result);        \r
+    }    \r
+  }\r
+}  \r
+if (!function_exists("nxs_doPublishToAP")) { //## Post to AP. // V3 - imgToUse - Done, class_SNAP_AP - Done, New Format - Done\r
+  function nxs_doPublishToAP($postID, $options){ $ntCd = 'AP'; $ntCdL = 'ap'; $ntNm = 'App.Net'; if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+      $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));   \r
+      if (empty($options['imgToUse'])) $options['imgToUse'] = ''; if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+      $logNT = '<span style="color:#800000">App.Net</span> - '.$options['nName'];      \r
+      $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+      if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {  \r
+           nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$uqID); return;\r
+        }\r
+      }       \r
+      $message = array('message'=>'', 'link'=>'', 'imageURL'=>'', 'videoURL'=>''); \r
+      \r
+      if ($postID=='0') { echo "Testing ... <br/><br/>"; $message['description'] = 'Test Post, Description';  $message['title'] = 'Test Post - Title';  $message['url'] = home_url();    \r
+      } else { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));  $post = get_post($postID); if(!$post) return; \r
+        $apAttchImg = $options['attchImg']; $options['apTextFormat'] = nsFormatMessage($options['apTextFormat'], $postID, $addParams);\r
+        $extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?$post->post_title:''); \r
+        if ($options['attchImg']=='1') { if (trim($options['imgToUse'])!='') $imgURL = $options['imgToUse']; else $imgURL = nxs_getPostImage($postID); \r
+         if (preg_match("/noImg.\.png/i", $imgURL)) $imgURL = '';  if(trim($imgURL)=='') $options['attchImg'] = 0; \r
+        }        \r
+        $message = array('imageURL'=>$imgURL);\r
+      }            \r
+      //## Actual Post\r
+      $ntToPost = new nxs_class_SNAP_AP(); $ret = $ntToPost->doPostToNT($options, $message);\r
+      //## Process Results\r
+      if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+         if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+      } else {  // ## All Good - log it.\r
+        if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+          else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'postURL'=>$ret['postURL'], 'pDate'=>date('Y-m-d H:i:s'))); \r
+          $extInfo .= ' | <a href="'.$ret['postURL'].'" target="_blank">Post Link</a>'; nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+      }\r
+      //## Return Result\r
+      if ($ret['isPosted']=='1') return 200; else return print_r($ret, true);      \r
+      \r
+  } \r
+}  \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/OAuth.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/OAuth.php
new file mode 100644 (file)
index 0000000..902cfa1
--- /dev/null
@@ -0,0 +1,874 @@
+<?php\r
+// vim: foldmethod=marker\r
+\r
+/* Generic exception class\r
+ */\r
+class nsx_trOAuthException extends Exception {\r
+  // pass\r
+}\r
+\r
+class nsx_trOAuthConsumer {\r
+  public $key;\r
+  public $secret;\r
+\r
+  function __construct($key, $secret, $callback_url=NULL) {\r
+    $this->key = $key;\r
+    $this->secret = $secret;\r
+    $this->callback_url = $callback_url;\r
+  }\r
+\r
+  function __toString() {\r
+    return "OAuthConsumer[key=$this->key,secret=$this->secret]";\r
+  }\r
+}\r
+\r
+class nsx_trOAuthToken {\r
+  // access tokens and request tokens\r
+  public $key;\r
+  public $secret;\r
+\r
+  /**\r
+   * key = the token\r
+   * secret = the token secret\r
+   */\r
+  function __construct($key, $secret) {\r
+    $this->key = $key;\r
+    $this->secret = $secret;\r
+  }\r
+\r
+  /**\r
+   * generates the basic string serialization of a token that a server\r
+   * would respond to request_token and access_token calls with\r
+   */\r
+  function to_string() {\r
+    return "oauth_token=" .\r
+           nsx_trOAuthUtil::urlencode_rfc3986($this->key) .\r
+           "&oauth_token_secret=" .\r
+           nsx_trOAuthUtil::urlencode_rfc3986($this->secret);\r
+  }\r
+\r
+  function __toString() {\r
+    return $this->to_string();\r
+  }\r
+}\r
+\r
+/**\r
+ * A class for implementing a Signature Method\r
+ * See section 9 ("Signing Requests") in the spec\r
+ */\r
+abstract class nsx_trOAuthSignatureMethod {\r
+  /**\r
+   * Needs to return the name of the Signature Method (ie HMAC-SHA1)\r
+   * @return string\r
+   */\r
+  abstract public function get_name();\r
+\r
+  /**\r
+   * Build up the signature\r
+   * NOTE: The output of this function MUST NOT be urlencoded.\r
+   * the encoding is handled in OAuthRequest when the final\r
+   * request is serialized\r
+   * @param OAuthRequest $request\r
+   * @param OAuthConsumer $consumer\r
+   * @param OAuthToken $token\r
+   * @return string\r
+   */\r
+  abstract public function build_signature($request, $consumer, $token);\r
+\r
+  /**\r
+   * Verifies that a given signature is correct\r
+   * @param OAuthRequest $request\r
+   * @param OAuthConsumer $consumer\r
+   * @param OAuthToken $token\r
+   * @param string $signature\r
+   * @return bool\r
+   */\r
+  public function check_signature($request, $consumer, $token, $signature) {\r
+    $built = $this->build_signature($request, $consumer, $token);\r
+    return $built == $signature;\r
+  }\r
+}\r
+\r
+/**\r
+ * The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104] \r
+ * where the Signature Base String is the text and the key is the concatenated values (each first \r
+ * encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&' \r
+ * character (ASCII code 38) even if empty.\r
+ *   - Chapter 9.2 ("HMAC-SHA1")\r
+ */\r
+class nsx_trOAuthSignatureMethod_HMAC_SHA1 extends nsx_trOAuthSignatureMethod {\r
+  function get_name() {\r
+    return "HMAC-SHA1";\r
+  }\r
+\r
+  public function build_signature($request, $consumer, $token) {\r
+    $base_string = $request->get_signature_base_string();\r
+    $request->base_string = $base_string;\r
+\r
+    $key_parts = array(\r
+      $consumer->secret,\r
+      ($token) ? $token->secret : ""\r
+    );\r
+\r
+    $key_parts = nsx_trOAuthUtil::urlencode_rfc3986($key_parts);\r
+    $key = implode('&', $key_parts);\r
+\r
+    return base64_encode(hash_hmac('sha1', $base_string, $key, true));\r
+  }\r
+}\r
+\r
+/**\r
+ * The PLAINTEXT method does not provide any security protection and SHOULD only be used \r
+ * over a secure channel such as HTTPS. It does not use the Signature Base String.\r
+ *   - Chapter 9.4 ("PLAINTEXT")\r
+ */\r
+class nsx_trOAuthSignatureMethod_PLAINTEXT extends nsx_trOAuthSignatureMethod {\r
+  public function get_name() {\r
+    return "PLAINTEXT";\r
+  }\r
+\r
+  /**\r
+   * oauth_signature is set to the concatenated encoded values of the Consumer Secret and \r
+   * Token Secret, separated by a '&' character (ASCII code 38), even if either secret is \r
+   * empty. The result MUST be encoded again.\r
+   *   - Chapter 9.4.1 ("Generating Signatures")\r
+   *\r
+   * Please note that the second encoding MUST NOT happen in the SignatureMethod, as\r
+   * OAuthRequest handles this!\r
+   */\r
+  public function build_signature($request, $consumer, $token) {\r
+    $key_parts = array(\r
+      $consumer->secret,\r
+      ($token) ? $token->secret : ""\r
+    );\r
+\r
+    $key_parts = nsx_trOAuthUtil::urlencode_rfc3986($key_parts);\r
+    $key = implode('&', $key_parts);\r
+    $request->base_string = $key;\r
+\r
+    return $key;\r
+  }\r
+}\r
+\r
+/**\r
+ * The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in \r
+ * [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for \r
+ * EMSA-PKCS1-v1_5. It is assumed that the Consumer has provided its RSA public key in a \r
+ * verified way to the Service Provider, in a manner which is beyond the scope of this \r
+ * specification.\r
+ *   - Chapter 9.3 ("RSA-SHA1")\r
+ */\r
+abstract class nsx_trOAuthSignatureMethod_RSA_SHA1 extends nsx_trOAuthSignatureMethod {\r
+  public function get_name() {\r
+    return "RSA-SHA1";\r
+  }\r
+\r
+  // Up to the SP to implement this lookup of keys. Possible ideas are:\r
+  // (1) do a lookup in a table of trusted certs keyed off of consumer\r
+  // (2) fetch via http using a url provided by the requester\r
+  // (3) some sort of specific discovery code based on request\r
+  //\r
+  // Either way should return a string representation of the certificate\r
+  protected abstract function fetch_public_cert(&$request);\r
+\r
+  // Up to the SP to implement this lookup of keys. Possible ideas are:\r
+  // (1) do a lookup in a table of trusted certs keyed off of consumer\r
+  //\r
+  // Either way should return a string representation of the certificate\r
+  protected abstract function fetch_private_cert(&$request);\r
+\r
+  public function build_signature($request, $consumer, $token) {\r
+    $base_string = $request->get_signature_base_string();\r
+    $request->base_string = $base_string;\r
+\r
+    // Fetch the private key cert based on the request\r
+    $cert = $this->fetch_private_cert($request);\r
+\r
+    // Pull the private key ID from the certificate\r
+    $privatekeyid = openssl_get_privatekey($cert);\r
+\r
+    // Sign using the key\r
+    $ok = openssl_sign($base_string, $signature, $privatekeyid);\r
+\r
+    // Release the key resource\r
+    openssl_free_key($privatekeyid);\r
+\r
+    return base64_encode($signature);\r
+  }\r
+\r
+  public function check_signature($request, $consumer, $token, $signature) {\r
+    $decoded_sig = base64_decode($signature);\r
+\r
+    $base_string = $request->get_signature_base_string();\r
+\r
+    // Fetch the public key cert based on the request\r
+    $cert = $this->fetch_public_cert($request);\r
+\r
+    // Pull the public key ID from the certificate\r
+    $publickeyid = openssl_get_publickey($cert);\r
+\r
+    // Check the computed signature against the one passed in the query\r
+    $ok = openssl_verify($base_string, $decoded_sig, $publickeyid);\r
+\r
+    // Release the key resource\r
+    openssl_free_key($publickeyid);\r
+\r
+    return $ok == 1;\r
+  }\r
+}\r
+\r
+class nsx_trOAuthRequest {\r
+  private $parameters;\r
+  private $http_method;\r
+  private $http_url;\r
+  // for debug purposes\r
+  public $base_string;\r
+  public static $version = '1.0';\r
+  public static $POST_INPUT = 'php://input';\r
+\r
+  function __construct($http_method, $http_url, $parameters=NULL) {\r
+    @$parameters or $parameters = array();\r
+    $parameters = array_merge( nsx_trOAuthUtil::parse_parameters(parse_url($http_url, PHP_URL_QUERY)), $parameters);\r
+    $this->parameters = $parameters;\r
+    $this->http_method = $http_method;\r
+    $this->http_url = $http_url;\r
+  }\r
+\r
+\r
+  /**\r
+   * attempt to build up a request from what was passed to the server\r
+   */\r
+  public static function from_request($http_method=NULL, $http_url=NULL, $parameters=NULL) {\r
+    $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on")\r
+              ? 'http'\r
+              : 'https';\r
+    @$http_url or $http_url = $scheme .\r
+                              '://' . $_SERVER['HTTP_HOST'] .\r
+                              ':' .\r
+                              $_SERVER['SERVER_PORT'] .\r
+                              $_SERVER['REQUEST_URI'];\r
+    @$http_method or $http_method = $_SERVER['REQUEST_METHOD'];\r
+\r
+    // We weren't handed any parameters, so let's find the ones relevant to\r
+    // this request.\r
+    // If you run XML-RPC or similar you should use this to provide your own\r
+    // parsed parameter-list\r
+    if (!$parameters) {\r
+      // Find request headers\r
+      $request_headers = nsx_trOAuthUtil::get_headers();\r
+\r
+      // Parse the query-string to find GET parameters\r
+      $parameters = nsx_trOAuthUtil::parse_parameters($_SERVER['QUERY_STRING']);\r
+\r
+      // It's a POST request of the proper content-type, so parse POST\r
+      // parameters and add those overriding any duplicates from GET\r
+      if ($http_method == "POST"\r
+          && @strstr($request_headers["Content-Type"],\r
+                     "application/x-www-form-urlencoded")\r
+          ) {\r
+        $post_data = nsx_trOAuthUtil::parse_parameters(\r
+          file_get_contents(self::$POST_INPUT)\r
+        );\r
+        $parameters = array_merge($parameters, $post_data);\r
+      }\r
+\r
+      // We have a Authorization-header with OAuth data. Parse the header\r
+      // and add those overriding any duplicates from GET or POST\r
+      if (@substr($request_headers['Authorization'], 0, 6) == "OAuth ") {\r
+        $header_parameters = nsx_trOAuthUtil::split_header(\r
+          $request_headers['Authorization']\r
+        );\r
+        $parameters = array_merge($parameters, $header_parameters);\r
+      }\r
+\r
+    }\r
+\r
+    return new nsx_trOAuthRequest($http_method, $http_url, $parameters);\r
+  }\r
+\r
+  /**\r
+   * pretty much a helper function to set up the request\r
+   */\r
+  public static function from_consumer_and_token($consumer, $token, $http_method, $http_url, $parameters=NULL) {\r
+    @$parameters or $parameters = array();\r
+    $defaults = array("oauth_version" => nsx_trOAuthRequest::$version,\r
+                      "oauth_nonce" => nsx_trOAuthRequest::generate_nonce(),\r
+                      "oauth_timestamp" => nsx_trOAuthRequest::generate_timestamp(),\r
+                      "oauth_consumer_key" => $consumer->key);\r
+    if ($token)\r
+      $defaults['oauth_token'] = $token->key;\r
+\r
+    $parameters = array_merge($defaults, $parameters);\r
+\r
+    return new nsx_trOAuthRequest($http_method, $http_url, $parameters);\r
+  }\r
+\r
+  public function set_parameter($name, $value, $allow_duplicates = true) {\r
+    if ($allow_duplicates && isset($this->parameters[$name])) {\r
+      // We have already added parameter(s) with this name, so add to the list\r
+      if (is_scalar($this->parameters[$name])) {\r
+        // This is the first duplicate, so transform scalar (string)\r
+        // into an array so we can add the duplicates\r
+        $this->parameters[$name] = array($this->parameters[$name]);\r
+      }\r
+\r
+      $this->parameters[$name][] = $value;\r
+    } else {\r
+      $this->parameters[$name] = $value;\r
+    }\r
+  }\r
+\r
+  public function get_parameter($name) {\r
+    return isset($this->parameters[$name]) ? $this->parameters[$name] : null;\r
+  }\r
+\r
+  public function get_parameters() {\r
+    return $this->parameters;\r
+  }\r
+\r
+  public function unset_parameter($name) {\r
+    unset($this->parameters[$name]);\r
+  }\r
+\r
+  /**\r
+   * The request parameters, sorted and concatenated into a normalized string.\r
+   * @return string\r
+   */\r
+  public function get_signable_parameters() {\r
+    // Grab all parameters\r
+    $params = $this->parameters;\r
+\r
+    // Remove oauth_signature if present\r
+    // Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.")\r
+    if (isset($params['oauth_signature'])) {\r
+      unset($params['oauth_signature']);\r
+    }\r
+\r
+    return nsx_trOAuthUtil::build_http_query($params);\r
+  }\r
+\r
+  /**\r
+   * Returns the base string of this request\r
+   *\r
+   * The base string defined as the method, the url\r
+   * and the parameters (normalized), each urlencoded\r
+   * and the concated with &.\r
+   */\r
+  public function get_signature_base_string() {\r
+    $parts = array(\r
+      $this->get_normalized_http_method(),\r
+      $this->get_normalized_http_url(),\r
+      $this->get_signable_parameters()\r
+    );\r
+\r
+    $parts = nsx_trOAuthUtil::urlencode_rfc3986($parts);\r
+\r
+    return implode('&', $parts);\r
+  }\r
+\r
+  /**\r
+   * just uppercases the http method\r
+   */\r
+  public function get_normalized_http_method() {\r
+    return strtoupper($this->http_method);\r
+  }\r
+\r
+  /**\r
+   * parses the url and rebuilds it to be\r
+   * scheme://host/path\r
+   */\r
+  public function get_normalized_http_url() {\r
+    $parts = parse_url($this->http_url);\r
+\r
+    $port = @$parts['port'];\r
+    $scheme = $parts['scheme'];\r
+    $host = $parts['host'];\r
+    $path = @$parts['path'];\r
+\r
+    $port or $port = ($scheme == 'https') ? '443' : '80';\r
+\r
+    if (($scheme == 'https' && $port != '443')\r
+        || ($scheme == 'http' && $port != '80')) {\r
+      $host = "$host:$port";\r
+    }\r
+    return "$scheme://$host$path";\r
+  }\r
+\r
+  /**\r
+   * builds a url usable for a GET request\r
+   */\r
+  public function to_url() {\r
+    $post_data = $this->to_postdata();\r
+    $out = $this->get_normalized_http_url();\r
+    if ($post_data) {\r
+      $out .= '?'.$post_data;\r
+    }\r
+    return $out;\r
+  }\r
+\r
+  /**\r
+   * builds the data one would send in a POST request\r
+   */\r
+  public function to_postdata() {\r
+    return nsx_trOAuthUtil::build_http_query($this->parameters);\r
+  }\r
+\r
+  /**\r
+   * builds the Authorization: header\r
+   */\r
+  public function to_header($realm=null) {\r
+    $first = true;\r
+       if($realm) {\r
+      $out = 'Authorization: OAuth realm="' . nsx_trOAuthUtil::urlencode_rfc3986($realm) . '"';\r
+      $first = false;\r
+    } else\r
+      $out = 'Authorization: OAuth';\r
+\r
+    $total = array();\r
+    foreach ($this->parameters as $k => $v) {\r
+      if (substr($k, 0, 5) != "oauth") continue;\r
+      if (is_array($v)) {\r
+        throw new nsx_trOAuthException('Arrays not supported in headers');\r
+      }\r
+      $out .= ($first) ? ' ' : ',';\r
+      $out .= nsx_trOAuthUtil::urlencode_rfc3986($k) .\r
+              '="' .\r
+              nsx_trOAuthUtil::urlencode_rfc3986($v) .\r
+              '"';\r
+      $first = false;\r
+    }\r
+    return $out;\r
+  }\r
+\r
+  public function __toString() {\r
+    return $this->to_url();\r
+  }\r
+\r
+\r
+  public function sign_request($signature_method, $consumer, $token) {\r
+    $this->set_parameter(\r
+      "oauth_signature_method",\r
+      $signature_method->get_name(),\r
+      false\r
+    );\r
+    $signature = $this->build_signature($signature_method, $consumer, $token);\r
+    $this->set_parameter("oauth_signature", $signature, false);\r
+  }\r
+\r
+  public function build_signature($signature_method, $consumer, $token) {\r
+    $signature = $signature_method->build_signature($this, $consumer, $token);\r
+    return $signature;\r
+  }\r
+\r
+  /**\r
+   * util function: current timestamp\r
+   */\r
+  private static function generate_timestamp() {\r
+    return time();\r
+  }\r
+\r
+  /**\r
+   * util function: current nonce\r
+   */\r
+  private static function generate_nonce() {\r
+    $mt = microtime();\r
+    $rand = mt_rand();\r
+\r
+    return md5($mt . $rand); // md5s look nicer than numbers\r
+  }\r
+}\r
+\r
+class nsx_trOAuthServer {\r
+  protected $timestamp_threshold = 300; // in seconds, five minutes\r
+  protected $version = '1.0';             // hi blaine\r
+  protected $signature_methods = array();\r
+\r
+  protected $data_store;\r
+\r
+  function __construct($data_store) {\r
+    $this->data_store = $data_store;\r
+  }\r
+\r
+  public function add_signature_method($signature_method) {\r
+    $this->signature_methods[$signature_method->get_name()] =\r
+      $signature_method;\r
+  }\r
+\r
+  // high level functions\r
+\r
+  /**\r
+   * process a request_token request\r
+   * returns the request token on success\r
+   */\r
+  public function fetch_request_token(&$request) {\r
+    $this->get_version($request);\r
+\r
+    $consumer = $this->get_consumer($request);\r
+\r
+    // no token required for the initial token request\r
+    $token = NULL;\r
+\r
+    $this->check_signature($request, $consumer, $token);\r
+\r
+    // Rev A change\r
+    $callback = $request->get_parameter('oauth_callback');\r
+    $new_token = $this->data_store->new_request_token($consumer, $callback);\r
+\r
+    return $new_token;\r
+  }\r
+\r
+  /**\r
+   * process an access_token request\r
+   * returns the access token on success\r
+   */\r
+  public function fetch_access_token(&$request) {\r
+    $this->get_version($request);\r
+\r
+    $consumer = $this->get_consumer($request);\r
+\r
+    // requires authorized request token\r
+    $token = $this->get_token($request, $consumer, "request");\r
+\r
+    $this->check_signature($request, $consumer, $token);\r
+\r
+    // Rev A change\r
+    $verifier = $request->get_parameter('oauth_verifier');\r
+    $new_token = $this->data_store->new_access_token($token, $consumer, $verifier);\r
+\r
+    return $new_token;\r
+  }\r
+\r
+  /**\r
+   * verify an api call, checks all the parameters\r
+   */\r
+  public function verify_request(&$request) {\r
+    $this->get_version($request);\r
+    $consumer = $this->get_consumer($request);\r
+    $token = $this->get_token($request, $consumer, "access");\r
+    $this->check_signature($request, $consumer, $token);\r
+    return array($consumer, $token);\r
+  }\r
+\r
+  // Internals from here\r
+  /**\r
+   * version 1\r
+   */\r
+  private function get_version(&$request) {\r
+    $version = $request->get_parameter("oauth_version");\r
+    if (!$version) {\r
+      // Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present. \r
+      // Chapter 7.0 ("Accessing Protected Ressources")\r
+      $version = '1.0';\r
+    }\r
+    if ($version !== $this->version) {\r
+      throw new nsx_trOAuthException("OAuth version '$version' not supported");\r
+    }\r
+    return $version;\r
+  }\r
+\r
+  /**\r
+   * figure out the signature with some defaults\r
+   */\r
+  private function get_signature_method(&$request) {\r
+    $signature_method =\r
+        @$request->get_parameter("oauth_signature_method");\r
+\r
+    if (!$signature_method) {\r
+      // According to chapter 7 ("Accessing Protected Ressources") the signature-method\r
+      // parameter is required, and we can't just fallback to PLAINTEXT\r
+      throw new nsx_trOAuthException('No signature method parameter. This parameter is required');\r
+    }\r
+\r
+    if (!in_array($signature_method,\r
+                  array_keys($this->signature_methods))) {\r
+      throw new nsx_trOAuthException(\r
+        "Signature method '$signature_method' not supported " .\r
+        "try one of the following: " .\r
+        implode(", ", array_keys($this->signature_methods))\r
+      );\r
+    }\r
+    return $this->signature_methods[$signature_method];\r
+  }\r
+\r
+  /**\r
+   * try to find the consumer for the provided request's consumer key\r
+   */\r
+  private function get_consumer(&$request) {\r
+    $consumer_key = @$request->get_parameter("oauth_consumer_key");\r
+    if (!$consumer_key) {\r
+      throw new nsx_trOAuthException("Invalid consumer key");\r
+    }\r
+\r
+    $consumer = $this->data_store->lookup_consumer($consumer_key);\r
+    if (!$consumer) {\r
+      throw new nsx_trOAuthException("Invalid consumer");\r
+    }\r
+\r
+    return $consumer;\r
+  }\r
+\r
+  /**\r
+   * try to find the token for the provided request's token key\r
+   */\r
+  private function get_token(&$request, $consumer, $token_type="access") {\r
+    $token_field = @$request->get_parameter('oauth_token');\r
+    $token = $this->data_store->lookup_token(\r
+      $consumer, $token_type, $token_field\r
+    );\r
+    if (!$token) {\r
+      throw new nsx_trOAuthException("Invalid $token_type token: $token_field");\r
+    }\r
+    return $token;\r
+  }\r
+\r
+  /**\r
+   * all-in-one function to check the signature on a request\r
+   * should guess the signature method appropriately\r
+   */\r
+  private function check_signature(&$request, $consumer, $token) {\r
+    // this should probably be in a different method\r
+    $timestamp = @$request->get_parameter('oauth_timestamp');\r
+    $nonce = @$request->get_parameter('oauth_nonce');\r
+\r
+    $this->check_timestamp($timestamp);\r
+    $this->check_nonce($consumer, $token, $nonce, $timestamp);\r
+\r
+    $signature_method = $this->get_signature_method($request);\r
+\r
+    $signature = $request->get_parameter('oauth_signature');\r
+    $valid_sig = $signature_method->check_signature(\r
+      $request,\r
+      $consumer,\r
+      $token,\r
+      $signature\r
+    );\r
+\r
+    if (!$valid_sig) {\r
+      throw new nsx_trOAuthException("Invalid signature");\r
+    }\r
+  }\r
+\r
+  /**\r
+   * check that the timestamp is new enough\r
+   */\r
+  private function check_timestamp($timestamp) {\r
+    if( ! $timestamp )\r
+      throw new nsx_trOAuthException(\r
+        'Missing timestamp parameter. The parameter is required'\r
+      );\r
+    \r
+    // verify that timestamp is recentish\r
+    $now = time();\r
+    if (abs($now - $timestamp) > $this->timestamp_threshold) {\r
+      throw new nsx_trOAuthException(\r
+        "Expired timestamp, yours $timestamp, ours $now"\r
+      );\r
+    }\r
+  }\r
+\r
+  /**\r
+   * check that the nonce is not repeated\r
+   */\r
+  private function check_nonce($consumer, $token, $nonce, $timestamp) {\r
+    if( ! $nonce )\r
+      throw new nsx_trOAuthException(\r
+        'Missing nonce parameter. The parameter is required'\r
+      );\r
+\r
+    // verify that the nonce is uniqueish\r
+    $found = $this->data_store->lookup_nonce(\r
+      $consumer,\r
+      $token,\r
+      $nonce,\r
+      $timestamp\r
+    );\r
+    if ($found) {\r
+      throw new nsx_trOAuthException("Nonce already used: $nonce");\r
+    }\r
+  }\r
+\r
+}\r
+\r
+class nsx_trOAuthDataStore {\r
+  function lookup_consumer($consumer_key) {\r
+    // implement me\r
+  }\r
+\r
+  function lookup_token($consumer, $token_type, $token) {\r
+    // implement me\r
+  }\r
+\r
+  function lookup_nonce($consumer, $token, $nonce, $timestamp) {\r
+    // implement me\r
+  }\r
+\r
+  function new_request_token($consumer, $callback = null) {\r
+    // return a new token attached to this consumer\r
+  }\r
+\r
+  function new_access_token($token, $consumer, $verifier = null) {\r
+    // return a new access token attached to this consumer\r
+    // for the user associated with this token if the request token\r
+    // is authorized\r
+    // should also invalidate the request token\r
+  }\r
+\r
+}\r
+\r
+class nsx_trOAuthUtil {\r
+  public static function urlencode_rfc3986($input) {\r
+  if (is_array($input)) {\r
+    return array_map(array('nsx_trOAuthUtil', 'urlencode_rfc3986'), $input);\r
+  } else if (is_scalar($input)) {\r
+    return str_replace(\r
+      '+',\r
+      ' ',\r
+      str_replace('%7E', '~', rawurlencode($input))\r
+    );\r
+  } else {\r
+    return '';\r
+  }\r
+}\r
+\r
+\r
+  // This decode function isn't taking into consideration the above\r
+  // modifications to the encoding process. However, this method doesn't\r
+  // seem to be used anywhere so leaving it as is.\r
+  public static function urldecode_rfc3986($string) {\r
+    return urldecode($string);\r
+  }\r
+\r
+  // Utility function for turning the Authorization: header into\r
+  // parameters, has to do some unescaping\r
+  // Can filter out any non-oauth parameters if needed (default behaviour)\r
+  public static function split_header($header, $only_allow_oauth_parameters = true) {\r
+    $pattern = '/(([-_a-z]*)=("([^"]*)"|([^,]*)),?)/';\r
+    $offset = 0;\r
+    $params = array();\r
+    while (preg_match($pattern, $header, $matches, PREG_OFFSET_CAPTURE, $offset) > 0) {\r
+      $match = $matches[0];\r
+      $header_name = $matches[2][0];\r
+      $header_content = (isset($matches[5])) ? $matches[5][0] : $matches[4][0];\r
+      if (preg_match('/^oauth_/', $header_name) || !$only_allow_oauth_parameters) {\r
+        $params[$header_name] = nsx_trOAuthUtil::urldecode_rfc3986($header_content);\r
+      }\r
+      $offset = $match[1] + strlen($match[0]);\r
+    }\r
+\r
+    if (isset($params['realm'])) {\r
+      unset($params['realm']);\r
+    }\r
+\r
+    return $params;\r
+  }\r
+\r
+  // helper to try to sort out headers for people who aren't running apache\r
+  public static function get_headers() {\r
+    if (function_exists('apache_request_headers')) {\r
+      // we need this to get the actual Authorization: header\r
+      // because apache tends to tell us it doesn't exist\r
+      $headers = apache_request_headers();\r
+\r
+      // sanitize the output of apache_request_headers because\r
+      // we always want the keys to be Cased-Like-This and arh()\r
+      // returns the headers in the same case as they are in the\r
+      // request\r
+      $out = array();\r
+      foreach( $headers AS $key => $value ) {\r
+        $key = str_replace(\r
+            " ",\r
+            "-",\r
+            ucwords(strtolower(str_replace("-", " ", $key)))\r
+          );\r
+        $out[$key] = $value;\r
+      }\r
+    } else {\r
+      // otherwise we don't have apache and are just going to have to hope\r
+      // that $_SERVER actually contains what we need\r
+      $out = array();\r
+      if( isset($_SERVER['CONTENT_TYPE']) )\r
+        $out['Content-Type'] = $_SERVER['CONTENT_TYPE'];\r
+      if( isset($_ENV['CONTENT_TYPE']) )\r
+        $out['Content-Type'] = $_ENV['CONTENT_TYPE'];\r
+\r
+      foreach ($_SERVER as $key => $value) {\r
+        if (substr($key, 0, 5) == "HTTP_") {\r
+          // this is chaos, basically it is just there to capitalize the first\r
+          // letter of every word that is not an initial HTTP and strip HTTP\r
+          // code from przemek\r
+          $key = str_replace(\r
+            " ",\r
+            "-",\r
+            ucwords(strtolower(str_replace("_", " ", substr($key, 5))))\r
+          );\r
+          $out[$key] = $value;\r
+        }\r
+      }\r
+    }\r
+    return $out;\r
+  }\r
+\r
+  // This function takes a input like a=b&a=c&d=e and returns the parsed\r
+  // parameters like this\r
+  // array('a' => array('b','c'), 'd' => 'e')\r
+  public static function parse_parameters( $input ) {\r
+    if (!isset($input) || !$input) return array();\r
+\r
+    $pairs = explode('&', $input);\r
+\r
+    $parsed_parameters = array();\r
+    foreach ($pairs as $pair) {\r
+      $split = explode('=', $pair, 2);\r
+      $parameter = nsx_trOAuthUtil::urldecode_rfc3986($split[0]);\r
+      $value = isset($split[1]) ? nsx_trOAuthUtil::urldecode_rfc3986($split[1]) : '';\r
+\r
+      if (isset($parsed_parameters[$parameter])) {\r
+        // We have already recieved parameter(s) with this name, so add to the list\r
+        // of parameters with this name\r
+\r
+        if (is_scalar($parsed_parameters[$parameter])) {\r
+          // This is the first duplicate, so transform scalar (string) into an array\r
+          // so we can add the duplicates\r
+          $parsed_parameters[$parameter] = array($parsed_parameters[$parameter]);\r
+        }\r
+\r
+        $parsed_parameters[$parameter][] = $value;\r
+      } else {\r
+        $parsed_parameters[$parameter] = $value;\r
+      }\r
+    }\r
+    return $parsed_parameters;\r
+  }\r
+\r
+  public static function build_http_query($params) {\r
+    if (!$params) return '';\r
+\r
+    // Urlencode both keys and values\r
+    $keys = nsx_trOAuthUtil::urlencode_rfc3986(array_keys($params));\r
+    $values = nsx_trOAuthUtil::urlencode_rfc3986(array_values($params));\r
+    $params = array_combine($keys, $values);\r
+\r
+    // Parameters are sorted by name, using lexicographical byte value ordering.\r
+    // Ref: Spec: 9.1.1 (1)\r
+    uksort($params, 'strcmp');\r
+\r
+    $pairs = array();\r
+    foreach ($params as $parameter => $value) {\r
+      if (is_array($value)) {\r
+        // If two or more parameters share the same name, they are sorted by their value\r
+        // Ref: Spec: 9.1.1 (1)\r
+        natsort($value);\r
+        foreach ($value as $duplicate_value) {\r
+          $pairs[] = $parameter . '=' . $duplicate_value;\r
+        }\r
+      } else {\r
+        $pairs[] = $parameter . '=' . $value;\r
+      }\r
+    }\r
+    // For each parameter, the name is separated from the corresponding value by an '=' character (ASCII code 61)\r
+    // Each name-value pair is separated by an '&' character (ASCII code 38)\r
+    return implode('&', $pairs);\r
+  }\r
+}\r
+\r
+?>\r
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/cacert.pem b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/cacert.pem
new file mode 100644 (file)
index 0000000..f889211
--- /dev/null
@@ -0,0 +1,3376 @@
+##
+## ca-bundle.crt -- Bundle of CA Root Certificates
+##
+## Certificate data from Mozilla as of: Thu Nov  3 19:04:19 2011
+##
+## This is a bundle of X.509 certificates of public Certificate Authorities
+## (CA). These were automatically extracted from Mozilla's root certificates
+## file (certdata.txt).  This file can be found in the mozilla source tree:
+## http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1
+##
+## It contains the certificates in PEM format and therefore
+## can be directly used with curl / libcurl / php_curl, or with
+## an Apache+mod_ssl webserver for SSL client authentication.
+## Just configure this file as the SSLCACertificateFile.
+##
+
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Netscape security libraries.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 1994-2000
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+# @(#) $RCSfile: certdata.txt,v $ $Revision: 1.80 $ $Date: 2011/11/03 15:11:58 $
+
+GTE CyberTrust Global Root
+==========================
+-----BEGIN CERTIFICATE-----
+MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYDVQQKEw9HVEUg
+Q29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNvbHV0aW9ucywgSW5jLjEjMCEG
+A1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJvb3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEz
+MjM1OTAwWjB1MQswCQYDVQQGEwJVUzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQL
+Ex5HVEUgQ3liZXJUcnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0
+IEdsb2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrHiM3dFw4u
+sJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTSr41tiGeA5u2ylc9yMcql
+HHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X404Wqk2kmhXBIgD8SFcd5tB8FLztimQID
+AQABMA0GCSqGSIb3DQEBBAUAA4GBAG3rGwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMW
+M4ETCJ57NE7fQMh017l93PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OF
+NMQkpw0PlZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/
+-----END CERTIFICATE-----
+
+Thawte Server CA
+================
+-----BEGIN CERTIFICATE-----
+MIIDEzCCAnygAwIBAgIBATANB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MA0GCSqGSIb3DQEBBQUAA4GBAFjOKer89961
+zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y7qj/WsjTVbJmcVfewCHrPSqnI0kB
+BIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee95
+70+sB3c4
+-----END CERTIFICATE-----
+
+Digital Signature Trust Co. Global CA 1
+=======================================
+-----BEGIN CERTIFICATE-----
+MIIDKTCCApKgAwIBAgIENnAVljANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJVUzEkMCIGA1UE
+ChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQLEwhEU1RDQSBFMTAeFw05ODEy
+MTAxODEwMjNaFw0xODEyMTAxODQwMjNaMEYxCzAJBgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFs
+IFNpZ25hdHVyZSBUcnVzdCBDby4xETAPBgNVBAsTCERTVENBIEUxMIGdMA0GCSqGSIb3DQEBAQUA
+A4GLADCBhwKBgQCgbIGpzzQeJN3+hijM3oMv+V7UQtLodGBmE5gGHKlREmlvMVW5SXIACH7TpWJE
+NySZj9mDSI+ZbZUTu0M7LklOiDfBu1h//uG9+LthzfNHwJmm8fOR6Hh8AMthyUQncWlVSn5JTe2i
+o74CTADKAqjuAQIxZA9SLRN0dja1erQtcQIBA6OCASQwggEgMBEGCWCGSAGG+EIBAQQEAwIABzBo
+BgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0
+dXJlIFRydXN0IENvLjERMA8GA1UECxMIRFNUQ0EgRTExDTALBgNVBAMTBENSTDEwKwYDVR0QBCQw
+IoAPMTk5ODEyMTAxODEwMjNagQ8yMDE4MTIxMDE4MTAyM1owCwYDVR0PBAQDAgEGMB8GA1UdIwQY
+MBaAFGp5fpFpRhgTCgJ3pVlbYJglDqL4MB0GA1UdDgQWBBRqeX6RaUYYEwoCd6VZW2CYJQ6i+DAM
+BgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GB
+ACIS2Hod3IEGtgllsofIH160L+nEHvI8wbsEkBFKg05+k7lNQseSJqBcNJo4cvj9axY+IO6CizEq
+kzaFI4iKPANo08kJD038bKTaKHKTDomAsH3+gG9lbRgzl4vCa4nuYD3Im+9/KzJic5PLPON74nZ4
+RbyhkwS7hp86W0N6w4pl
+-----END CERTIFICATE-----
+
+Digital Signature Trust Co. Global CA 3
+=======================================
+-----BEGIN CERTIFICATE-----
+MIIDKTCCApKgAwIBAgIENm7TzjANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJVUzEkMCIGA1UE
+ChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQLEwhEU1RDQSBFMjAeFw05ODEy
+MDkxOTE3MjZaFw0xODEyMDkxOTQ3MjZaMEYxCzAJBgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFs
+IFNpZ25hdHVyZSBUcnVzdCBDby4xETAPBgNVBAsTCERTVENBIEUyMIGdMA0GCSqGSIb3DQEBAQUA
+A4GLADCBhwKBgQC/k48Xku8zExjrEH9OFr//Bo8qhbxe+SSmJIi2A7fBw18DW9Fvrn5C6mYjuGOD
+VvsoLeE4i7TuqAHhzhy2iCoiRoX7n6dwqUcUP87eZfCocfdPJmyMvMa1795JJ/9IKn3oTQPMx7JS
+xhcxEzu1TdvIxPbDDyQq2gyd55FbgM2UnQIBA6OCASQwggEgMBEGCWCGSAGG+EIBAQQEAwIABzBo
+BgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0
+dXJlIFRydXN0IENvLjERMA8GA1UECxMIRFNUQ0EgRTIxDTALBgNVBAMTBENSTDEwKwYDVR0QBCQw
+IoAPMTk5ODEyMDkxOTE3MjZagQ8yMDE4MTIwOTE5MTcyNlowCwYDVR0PBAQDAgEGMB8GA1UdIwQY
+MBaAFB6CTShlgDzJQW6sNS5ay97u+DlbMB0GA1UdDgQWBBQegk0oZYA8yUFurDUuWsve7vg5WzAM
+BgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GB
+AEeNg61i8tuwnkUiBbmi1gMOOHLnnvx75pO2mqWilMg0HZHRxdf0CiUPPXiBng+xZ8SQTGPdXqfi
+up/1902lMXucKS1M/mQ+7LZT/uqb7YLbdHVLB3luHtgZg3Pe9T7Qtd7nS2h9Qy4qIOF+oHhEngj1
+mPnHfxsb1gYgAlihw6ID
+-----END CERTIFICATE-----
+
+Verisign Class 3 Public Primary Certification Authority
+=======================================================
+-----BEGIN CERTIFICATE-----
+MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMx
+FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5
+IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVow
+XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz
+IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA
+A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94
+f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol
+hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBAgUAA4GBALtMEivPLCYA
+TxQT3ab7/AoRhIzzKBxnki98tsX63/Dolbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59Ah
+WM1pF+NEHJwZRDmJXNycAA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2Omuf
+Tqj/ZA1k
+-----END CERTIFICATE-----
+
+Verisign Class 3 Public Primary Certification Authority - G2
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVT
+MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy
+eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln
+biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz
+dCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVT
+MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy
+eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln
+biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz
+dCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCO
+FoUgRm1HP9SFIIThbbP4pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71
+lSk8UOg013gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwIDAQAB
+MA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSkU01UbSuvDV1Ai2TT
+1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7iF6YM40AIOw7n60RzKprxaZLvcRTD
+Oaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpYoJ2daZH9
+-----END CERTIFICATE-----
+
+Verisign Class 4 Public Primary Certification Authority - G2
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAmsCEDKIjprS9esTR/h/xCA3JfgwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVT
+MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgNCBQdWJsaWMgUHJpbWFy
+eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln
+biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz
+dCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVT
+MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgNCBQdWJsaWMgUHJpbWFy
+eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln
+biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz
+dCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC68OTP+cSuhVS5B1f5j8V/aBH4
+xBewRNz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NTAzBgNVBAsTLFZhbGlDZXJ0IENs
+YXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZh
+bGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAw
+MjIzM1oXDTE5MDYyNjAwMjIzM1owgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0
+d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMg
+UG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0
+LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUA
+A4GNADCBiQKBgQDjmFGWHOjVsQaBalfDcnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td
+3zZxFJmP3MKS8edgkpfs2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89H
+BFx1cQqYJJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliEZwgs
+3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJn0WuPIqpsHEzXcjF
+V9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/APhmcGcwTTYJBtYze4D1gCCAPRX5r
+on+jjBXu
+-----END CERTIFICATE-----
+
+Verisign Class 3 Public Primary Certification Authority - G3
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
+UzEXMBUGA1UEChMOVmVy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
+j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
+/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0
+xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa
+t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
+-----END CERTIFICATE-----
+
+Verisign Class 4 Public Primary Certification Authority - G3
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
+UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
+cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
+IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
+dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv
+cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkg
+Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBAK3LpRFpxlmr8Y+1GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaS
+tBO3IFsJ+mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0GbdU6LM
+8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLmNxdLMEYH5IBtptiW
+Lugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XYufTsgsbSPZUd5cBPhMnZo0QoBmrX
+Razwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA
+j/ola09b5KROJ1WrIhVZPMq1CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXtt
+mhwwjIDLk5Mqg6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm
+fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c2NU8Qh0XwRJd
+RTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/bLvSHgCwIe34QWKCudiyxLtG
+UPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg==
+-----END CERTIFICATE-----
+
+Entrust.net Secure Server CA
+============================
+-----BEGIN CERTIFICATE-----
+MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMCVVMxFDASBgNV
+BAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5uZXQvQ1BTIGluY29ycC4gYnkg
+cmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRl
+ZDE6MDgGA1UEAxMxRW50cnVzdC5uZXQgU2VjdXJlIFNlcnZlciBDZXJ0aW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AQYwHwYDVR0jBBgwFoAU8BdiE1U9s/8KAGv7UISX8+1i0Bow
+HQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAaMAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EA
+BAwwChsEVjQuMAMCBJAwDQYJKoZIhvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyN
+Ewr75Ji174z4xRAN95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9
+n9cd2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI=
+-----END CERTIFICATE-----
+
+Entrust.net Premium 2048 Secure Server CA
+=========================================
+-----BEGIN CERTIFICATE-----
+MIIEXDCCA0SgAwIBAgIEOGO5ZjANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u
+ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp
+bWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV
+BAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx
+NzUwNTFaFw0xOTEyMjQxODIwNTFaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3
+d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTEl
+MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5u
+ZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+MIIBCgKCA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dwyah617jzV/OeBHRnDJELqYzmp
+-----END CERTIFICATE-----
+
+Equifax Secure Global eBusiness CA
+==================================
+-----BEGIN CERTIFICATE-----
+MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT
+RXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBTZWN1cmUgR2xvYmFsIGVCdXNp
+bmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIwMDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMx
+HDAaBgNVBAoTE0VxdWlmYXggU2VjdXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEds
+b2JhbCBlQnVzaW5lc3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRV
+PEnCUdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc58O/gGzN
+qfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/o5brhTMhHD4ePmBudpxn
+hcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAHMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0j
+BBgwFoAUvqigdHJQa0S3ySPY+6j/s1draGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hs
+MA0GCSqGSIb3DQEBBAUAA4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okEN
+I7SS+RkAZ70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv8qIY
+NMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV
+-----END CERTIFICATE-----
+
+Equifax Secure eBusiness CA 1
+=============================
+-----BEGIN CERTIFICATE-----
+MIICgjCCAeugAwIBA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KoZIhvcNAQEFBQADggEBACxt
+ZBsfzQ3duQH6lmM0MkhHma6X7f1yFqZzR1r0693p9db7RcwpiURdv0Y5PejuvE1Uhh4dbOMXJ0Ph
+iVYrqW9yTkkz43J8KiOavD7/KCrto/8cI7pDVwlnTUtiBi34/2ydYB7YHEt9tTEv2dB8Xfjea4MY
+eDdXL+gzB2ffHsdrKpV2ro9Xo/D0UrSpUwjP4E/TelOL/bscVjby/rK25Xa71SJlpz/+0WatC7xr
+mYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOAWiFeIc9TVPC6b4nbqKqVz4vj
+ccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk=
+-----END CERTIFICATE-----
+
+AddTrust External Root
+======================
+-----BEGIN CERTIFICATE-----
+MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
+QWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYD
+VQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEw
+NDgzOFowbzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRU
+cnVzdCBFeHRlcm5hbCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0Eg
+Um9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvtH7xsD821
++iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9uMq/NzgtHj6RQa1wVsfw
+Tz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzXmk6vBbOmcZSccbNQYArHE504B4YCqOmo
+aSYYkKtMsE8jqzpPhNjfzp/haW+710LXa0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy
+2xSoRcRdKn23tNbE7qzNE0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv7
+7+ldU9U0WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYDVR0P
+BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0Jvf6xCZU7wO94CTL
+VBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEmMCQGA1UECxMdQWRk
+VHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsxIjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENB
+IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZl
+j7DYd7usQWxHYINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
+6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvCNr4TDea9Y355
+e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEXc4g/VhsxOBi0cQ+azcgOno4u
+G+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5amnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
+-----END CERTIFICATE-----
+
+AddTrust Public Services Root
+=============================
+-----BEGIN CERTIFICATE-----
+MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
+QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSAwHgYDVQQDExdBZGRU
+cnVzdCBQdWJsaWMgQ0EgUm9vdD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ao
+GEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh4SINhwBk/ox9
+Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQmXiLsks3/QppEIW1cxeMiHV9H
+EufOX1362KqxMy3ZdvJOOjMMK7MtkAY=
+-----END CERTIFICATE-----
+
+AddTrust Qualified Certificates Root
+====================================
+-----BEGIN CERTIFICATE-----
+MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
+QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSMwIQYDVQQDExpBZGRU
+cnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcx
+CzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQ
+IE5ldHdvcmsxIzAhBgNVBAMTGkFkZFRydXN0IFF1YWxpZmllZCBDQSBSb290MIIBIjANBgkqhkiG
+9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5B6a/twJWoekn0e+EV+vhDTbYjx5eLfpMLXsDBwqxBb/4Oxx
+64r1EW7tTw2R0hIYLUkVAcKkIhPHEWT/IhKauY5cLwjPcWqzZwFZ8V1G87B4pfYOQnrjfxvM0PC3
+KP0q6p6zsLkEqv32x7SxuCqg+1jxGaBvcCV+PmlKfw8i2O+tCBGaKZnhqkRFmhJePp1tUvznoD1o
+L/BLcHwTOK28FSXx1s6rosAx1i+f4P8UWfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffTQO2kBhLEO+GR
+wVY18BTcZTYJbqukB8c10cIDMzZbdSZtQvESa0NvS3GU+jQd7RNuyoB/mC9suWXY6QIDAQABo4HU
+MIHRMB0GA1UdDgQWBBQ5lYtii1zJ1IC6WA+XPxUIQ8yYpzALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/
+BAUwAwEB/zCBkQYDVR0jBIGJMIGGgBQ5lYtii1zJ1IC6WA+XPxUIQ8yYp6FrpGkwZzELMAkGA1UE
+BhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRUcnVzdCBUVFAgTmV0d29y
+azEjMCEGA1UEAxMaQWRkVHJ1c3QgUXVhbGlmaWVkIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQAD
+ggEBABmrder4i2VhlRO6aQTvhsoToMeqT2QbPxj2qC0sVY8FtzDqQmodwCVRLae/DLPt7wh/bDxG
+GuoYQ992zPlmhpwsaPXpF/gxsxjE1kh9I0xowX67ARRvxdlu3rsEQmr49lx95dr6h+sNNVJn0J6X
+dgWTP5XHAeZpVTh/EGGZyeNfpso+gmNIquIISD6q8rKFYqa0p9m9N5xotS1WfbC3P6CxB9bpT9ze
+RXEwMn8bLgn5v1Kh7sKAPgZcLlVAwRv1cEWw3F369nJad9Jjzc9YiQBCYz95OdBEsIJuQRno3eDB
+iFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5noxqE=
+-----END CERTIFICATE-----
+
+Entrust Root Certification Authority
+====================================
+-----BEGIN CERTIFICATE-----
+MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV
+BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw
+b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG
+A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0
+MloXDTI2MTEyNzIwNTM0MlowgbAxCzAJBgNVBAYTAl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j9tx4TuaYT1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpg
+Y+RdM4kX2TGq2tbzGDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiP
+pm8m1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJVOCiNUW7d
+FGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH6aLcr34YEoP9VhdBLtUp
+gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm
+X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS
+-----END CERTIFICATE-----
+
+America Online Root Certification Authority 1
+=============================================
+-----BEGIN CERTIFICATE-----
+MIIDpDCCAoygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT
+QW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBPbmxpbmUgUm9vdCBDZXJ0aWZp
+Y2F0aW9uIEF1dGhvcml0eSAxMB4XDTAyMDUyODA2MDAwMFoXDTM3MTExOTIwNDMwMFowYzELMAkG
+A1UEBhMCVVMxHDAaBgNVBAoTE0FtZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2Eg
+T25saW5lIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMTCCASIwDQYJKoZIhvcNAQEBBQAD
+ggEPADCCAQoCggEBAKgv6KRpBgNHw+kqmP8ZonCaxlCyfqXfaE0bfA+2l2h9LaaLl+lkhsmj76CG
+v2BlnEtUiMJIxUo5vxTjWVXlGbR0yLQFOVwWpeKVBeASrlmLojNoWBym1BW32J/X3HGrfpq/m44z
+DyL9Hy7nBzbvYjnF3cu6JRQj3gzGPTzOggjmZj7aUTsWOqMFf6Dch9Wc/HKpoH145LcxVR5lu9Rh
+sCFg7RAycsWSJR74kEoYeEfffjA3PlAb2xzTa5qGUwew76wGePiEmf4hjUyAtgyC9mZweRrTT6PP
+8c9GsEsPPt2IYriMqQkoO3rHl+Ee5fSfwMCuJKDIodkP1nsmgmkyPacCAwEAAaNjMGEwDwYDVR0T
+AQH/BAUwAwEB/zAdBgNVHQ4EFgQUAK3Zo/Z59m50qX8zPYEX10zPM94wHwYDVR0jBBgwFoAUAK3Z
+o/Z59m50qX8zPYEX10zPM94wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBBQUAA4IBAQB8itEf
+GDeC4Liwo+1WlchiYZwFos3CYiZhzRAW18y0ZTTQEYqtqKkFZu90821fnZmv9ov761KyBZiibyrF
+VL0lvV+uyIbqRizBs73B6UlwGBaXCBOMIOAbLjpHyx7kADCVW/RFo8AasAFOq73AI25jP4BKxQft
+3OJvx8Fi8eNy1gTIdGcL+oiroQHIb/AUr9KZzVGTfu0uOMe9zkZQPXLjeSWdm4grECDdpbgyn43g
+Kd8hdIaC2y+CMMbHNYaz+ZZfRtsMRf3zUMNvxsNIrUam4SdHCh0Om7bCd39j8uB9Gr784N/Xx6ds
+sPmuujz9dLQR6FgNgLzTqIA6me11zEZ7
+-----END CERTIFICATE-----
+
+America Online Root Certification Authority 2
+=============================================
+-----BEGIN CERTIFICATE-----
+MIIFpDCCA4ygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT
+QW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBPbmxpbmUgUm9vdCBDZXJ0aWZp
+Y2F0aW9uIEF1dGhvcml0eSAyMB4XDTAyMDUyODA2MDAwMFoXDTM3MDkyOTE0MDgwMFowYzELMAkG
+A1UEBhMCVVMxHDAaBgNVBAoTE0FtZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2Eg
+T25saW5lIFJvb3QgQ2VydGlma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QUAA4IBDwAwggEKAoIBAQCvV95WHm6h2mCxlCfL
+F9sHP4CFT8icttD0b0/Pmdjh28JIXDqsOTPHH2qLJj0rNfVIsZHBAk4ElpF7sDPwsRROEW+1QK8b
+RaVK7362rPKgH1g/EkZgPI2h4H3PVz4zHvtH8aoVlwdVZqW1LS7YgFmypw23RuwhY/81q6UCzyr0
+TP579ZRdhE2o8mCP2w4lPJ9zcc+U30rq299yOIzzlr3xF7zSujtFWsan9sYXiwGd/BmoKoMWuDpI
+/k4+oKsGGelT84ATB+0tvz8KPFUgOSwsAGl0lUq8ILKpeeUYiZGo3BxN77t+Nwtd/jmliFKMAGzs
+GHxBvfaLdXe6YJ2E5/4tAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEG
+MB0GA1UdDgQWBBQVOIMPPyw/cDMezUb+B4wg4NfDtzANBgkqhkiG9w0BAQUFAAOCAQEAX/FBfXxc
+CLkr4NWSR/pnXKUTwwMhmytMiUbPWU3J/qVAtmPN3XEolWcRzCSs00Rsca4BIGsDoo8Ytyk6feUW
+YFN4PMCvFYP3j1IzJL1kk5fui/fbGKhtcbP3LBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pz
+zkWKsKZJ/0x9nXGIxHYdkFsd7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBu
+YQa7FkKMcPcw++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt
+398znM/jra6O1I7mT1GvFpLgXPYHDw==
+-----END CERTIFICATE-----
+
+TC TrustCenter, Germany, Class 2 CA
+===================================
+-----BEGIN CERTIFICATE-----
+MIIDXDCCAsWgAwIBAgICA+owDQYJKoZIhvcNAQEEBQAwgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQI
+EwdIYW1idXJnMRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3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Ty9IT4rcuO81rUBcJaD61JlfutuC23bkpgHl9j6Pw
+pCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDlizeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1H
+RR3B7Hzs/Sk=
+-----END CERTIFICATE-----
+
+Comodo Trusted Services root
+============================
+-----BEGIN CERTIFICATE-----
+MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS
+R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg
+TGltaXRlZDElMCMGA1UEAwwcVHJ1c3RlZCBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczAeFw0wNDAxMDEw
+MDAwMDBaFw0yODEyMzEyMzU5NTlaMH8xCzAJBgNVBAYTAkdCMRswGQYDVQQIDBJHcmVhdGVyIE1h
+bmNoZXN0ZXIxEDAOBgNVBAcMB1NhbGZvcmQxGjAYBgNVBAoMEUNvbW9kbyBDQSBMaW1pdGVkMSUw
+IwYDVQQDDBxUcnVzdGVkIENlcnRpZmljYXRlIFNlcnZpY2VzMIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEA33FvNlhTWvI2VFeAxHQIIO0Yfyod5jWaHiWsnOWWfnJSoBVC21ndZHoa0Lh7
+3TkVvFVIxO06AOoxEbrycXQaZ7jPM8yoMa+j49d/vzMtTGo87IvDktJTdyR0nAducPy9C1t2ul/y
+/9c3S0pgePfw+spwtOpZqqPOSC+pw7ILfhdyFgymBwwbOM/JYrc/oJOlh0Hyt3BAd9i+FHzjqMB6
+juljatEPmsbS9Is6FARW1O24zG71++IsWL1/T2sr92AkWCTOJu80kTrV44HQsvAEAtdbtz6SrGsS
+ivnkBbA7kUlcsutT6vifR4buv5XAwAaf0lteERv0xwQ1KdJVXOTt6wIDAQABo4HJMIHGMB0GA1Ud
+DgQWBBTFe1i97dolad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ggIFxjANBgkqhkiG9w0BAQUFAAOCAgEAT62gLEz6wPJv92ZV
+qyM07ucp2sNbtrCD2dDQ4iH782CnO11gUyeim/YIIirnv6By5ZwkajGxkHon24QRiSemd1o417+s
+hvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd+LJ2w/w4E6oM3kJpK27z
+POuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2
+Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadNt54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp
+8kokUvd0/bpO5qgdAm6xDYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBC
+bjPsMZ57k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6szHXu
+g/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p
+vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr
+qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto=
+-----END CERTIFICATE-----
+
+Security Communication Root CA
+==============================
+-----BEGIN CERTIFICATE-----
+MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
+U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
+HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
+U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb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c3MyIENBMB4XDTAxMDQwNjA3Mjk0MFoXDTIxMDQw
+NjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh
+IENsYXNzMiBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3
+/Ei9vX+ALTU74W+oZ6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybT
+dXnt5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s3TmVToMG
+f+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2EjvOr7nQKV0ba5cTppCD8P
+tOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu8nYybieDwnPz3BjotJPqdURrBGAgcVeH
+nfO+oJAjPYok4doh28MCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITT
+XjwwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt
+0jSv9zilzqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/3DEI
+cbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvDFNr450kkkdAdavph
+Oe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6Tk6ezAyNlNzZRZxe7EJQY670XcSx
+EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH
+llpwrN9M
+-----END CERTIFICATE-----
+
+Staat der Nederlanden Root CA
+=============================
+-----BEGIN CERTIFICATE-----
+MIIDujCCAqKgAwIBAgIEAJiWijANBgkq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AHryv4g+OGQ0SR+ys
+raP6LnD43m77VkIVni5c7yPeIbkFdicZD0/Ww5y0vpQZY/KmEQrrU0icvvIpOxboGqBMpsn0GFlo
+wHDyUwDAXlCCpVZvNvlK4ESGoE1O1kduSUrLZ9emxAW5jh70/P/N5zbgnAVssjMiFdC04MwXwLLA
+9P4yPykqlXvY8qdOD1R8oQ2AswkDwf9c3V6aPryuvEeKaq5xyh+xKrhfQgUL7EYw0XILyulWbfXv
+33i+Ybqypa4ETLyorGkVl73v67SMvzX41MPRKA5cOp9wGDMgd8SirwIDAQABo4GrMIGoMAsGA1Ud
+DwQEAwIBxjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRTMtGzz3/64PGgXYVOktKeRR20TzA9
+BgNVHR8ENjA0MDKgMKAuhixodHRwOi8vY3JsLnVzZXJ0cnVzdC5jb20vVVROLURBVEFDb3JwU0dD
+LmNybDAqBgNVHSUEIzAhBggrBgEFBQcDAQYKKwYBBAGCNwoDAwYJYIZIAYb4QgQBMA0GCSqGSIb3
+DQEBBQUAA4IBAQAnNZcAiosovcYzMB4p/OL31ZjUQLtgyr+rFywJNn9Q+kHcrpY6CiM+iVnJowft
+Gzet/Hy+UUla3joKVAgWRcKZsYfNjGjgaQPpxE6YsjuMFrMOoAyYUJuTqXAJyCyjj98C5OBxOvG0
+I3KgqgHf35g+FFCgMSa9KOlaMCZ1+XtgHI3zzVAmbQQnmt/VDUVHKWss5nbZqSl9Mt3JNjy9rjXx
+EZ4du5A/EkdOjtd+D2JzHVImOBwYSf0wdJrE5SIv2MCN7ZF6TACPcn9d2t0bi0Vr591pl6jFVkwP
+DPafepE39peC4N1xaf92P2BNPM/3mfnGV/TJVTl4uix5yaaIK/QI
+-----END CERTIFICATE-----
+
+UTN USERFirst Hardware Root CA
+==============================
+-----BEGIN CERTIFICATE-----
+MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UE
+Bh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oBggrBgEFBQcDAQYIKwYBBQUHAwUGCCsGAQUF
+BwMGBggrBgEFBQcDBzANBgkqhkiG9w0BAQUFAAOCAQEARxkP3nTGmZev/K0oXnWO6y1n7k57K9cM
+//bey1WiCuFMVGWTYGufEpytXoMs61quwOQt9ABjHbjAbPLPSbtNk28GpgoiskliCE7/yMgUsogW
+XecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gECJChicsZUN/KHAG8HQQZexB2
+lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kn
+iCrVWFCVH/A7HFe7fRQ5YiuayZSSKqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67
+nfhmqA==
+-----END CERTIFICATE-----
+
+Camerfirma Chambers of Commerce Root
+====================================
+-----BEGIN CERTIFICATE-----
+MIIEvTCCA6WgAwIBAgIBADANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe
+QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1i
+ZXJzaWduLm9yZzEiMCAGA1UEAxMZQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdDAeFw0wMzA5MzAx
+NjEzNDNaFw0zNzA5MzAxNjEzNDRaMH8xCzAJBgNVBAYTAkVVMScwJQYDVQQKEx5BQyBDYW1lcmZp
+cm1hIFNBIENJRiBBODI3NDMyODcxIzAhBgNVBAsTGmh0dHA6Ly93d3cuY2hhbWJlcnNpZ24ub3Jn
+MSIwIAYDVQQDExlDaGFtYmVycyBvZiBDb21tZXJjZSBSb290MIIBIDANBgkqhkiG9w0BAQEFAAOC
+AQ0AMIIBCAKCAQEAtzZV5aVdGDDg2olUkfzIx1L4L1DZ77F1c2VHfRtbunXF/KGIJPov7coISjlU
+xFF6tdpg6jg8gbLL8bvZkSM/SAFwd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lyYXMgZWxmb2dhZGFzYW5hayBmZWx0ZXRlbGUg
+YXogZWxvaXJ0IGVsbGVub3J6ZXNpIGVsamFyYXMgbWVndGV0ZWxlLiBBeiBlbGphcmFzIGxlaXJh
+c2EgbWVndGFsYWxoYXRvIGEgTmV0TG9jayBLZnQuIEludGVybmV0IGhvbmxhcGphbiBhIGh0dHBz
+Oi8vd3d3Lm5ldGxvY2submV0L2RvY3MgY2ltZW4gdmFneSBrZXJoZXRvIGF6IGVsbGVub3J6ZXNA
+bmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBPUlRBTlQhIFRoZSBpc3N1YW5jZSBhbmQgdGhl
+IHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGlzIHN1YmplY3QgdG8gdGhlIE5ldExvY2sgQ1BTIGF2
+YWlsYWJsZSBhdCBodHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBj
+cHNAbmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4GBAATbrowXr/gOkDFOzT4JwG06sPgzTEdM
+43WIEJessDgVkcYplswhwG08pXTP2IKlOcNl40JwuyKQ433bNXbhoLXan3BukxowOR0w2y7jfLKR
+stE3Kfq51hdcR0/jHTjrn9V7lagonhVK0dHQKwCXoOKSNitjrFgBazMpUIaD8QFI
+-----END CERTIFICATE-----
+
+NetLock Express (Class C) Root
+==============================
+-----BEGIN CERTIFICATE-----
+MIIFTzCCBLigAwIBAgIBaDANBgkqhkiG9w0BAQQFADCBmzELMAkGA1UEBhMCSFUxETAPBgNVBAcT
+CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV
+BAsTEVRhbnVzaXR2YW55a2lhZG9rMTQwMgYDVQQDEytOZXRMb2NrIEV4cHJlc3N6IChDbGFzcyBD
+KSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNTE0MDgxMVoXDT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6AzBhRckB4Y9wim
+PQoZ+YeAEW5p5JYXMP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKt
+I3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ
+HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI
+Ls9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b
+vZ8=
+-----END CERTIFICATE-----
+
+Starfield Class 2 CA
+====================
+-----BEGIN CERTIFICATE-----
+MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMc
+U3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIg
+Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBo
+MQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAG
+A1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqG
+SIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf8MOh2tTY
+bitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN+lq2cwQlZut3f+dZxkqZ
+JRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVm
+epsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSN
+F4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HF
+MIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0f
+hvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNo
+bm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24g
+QXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGs
+afPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM
+PUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl
+xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD
+KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3
+QBFGmh95DmK/D5fs4C8fF5Q=
+-----END CERTIFICATE-----
+
+StartCom Certification Authority
+================================
+-----BEGIN CERTIFICATE-----
+MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMN
+U3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmlu
+ZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0
+NjM2WhcNMzYwOTE3MTk0NjM2WjB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnR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JwIDAQAB
+o2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm
+8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF
+BQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr
+EbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt
+tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886
+UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
+CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
+-----END CERTIFICATE-----
+
+DigiCert High Assurance EV Root CA
+==================================
+-----BEGIN CERTIFICATE-----
+MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw
+KQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw
+MFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ
+MBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu
+Y2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t
+Mqbf5YE/yc0lS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1c3Rkc3Qu
+Y29tMGIGA1UdIARbMFkwVwYKYIZIAWUDAgEBATBJMEcGCCsGAQUFBwIBFjtodHRwOi8vd3d3LnRy
+dXN0ZHN0LmNvbS9jZXJ0aWZpY2F0ZXMvcG9saWN5L0FDRVMtaW5kZXguaHRtbDAdBgNVHQ4EFgQU
+CXIGThhDD+XWzMNqizF7eI+og7gwDQYJKoZIhvcNAQEFBQADggEBAKPYjtay284F5zLNAdMEA+V2
+5FYrnJmQ6AgwbN99Pe7lv7UkQIRJ4dEorsTCOlMwiPH1d25Ryvr/ma8kXxug/fKshMrfqfBfBC6t
+Fr8hlxCBPeP/h40y3JTlR4peahPJlJU90u7INJXQgNStMgiAVDzgvVJT11J8smk/f3rPanTK+gQq
+nExaBqXpIK1FZg9p8d2/6eMyi/rgwYZNcjwu2JN4Cir42NInPRmJX1p7ijvMDNpRrscL9yuwNwXs
+vFcj4jjSm2jzVhKIT0J8uDHEtdvkyCE06UgRNe76x5JXxZ805Mf29w4LTJxoeHtxMcfrHuBnQfO3
+oKfN5XozNmr6mis=
+-----END CERTIFICATE-----
+
+TURKTRUST Certificate Services Provider Root 1
+==============================================
+-----BEGIN CERTIFICATE-----
+MIID+zCCAuOgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBtzE/MD0GA1UEAww2VMOcUktUUlVTVCBF
+bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGDAJUUjEP
+MA0GA1UEBwwGQU5LQVJBMVYwVAYDVQQKDE0oYykgMjAwNSBUw5xSS1RSVVNUIEJpbGdpIMSwbGV0
+acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLjAeFw0wNTA1MTMx
+MDI3MTdaFw0xNTAzMjIxMDI3MTdaMIG3MT8wPQYDVQQDDDZUw5xSS1RSVVNUIEVsZWt0cm9uaWsg
+U2VydGlmaWthIEhpem1ldCBTYcSfbGF5xLFjxLFzxLExCzAJBgNVBAYMAlRSMQ8wDQYDVQQHDAZB
+TktBUkExVjBUBgNVBAoMTShjKSAyMDA1IFTDnFJLVFJVU1QgQmlsZ2kgxLBsZXRpxZ9pbSB2ZSBC
+aWxpxZ9pbSBHw7x2ZW5sacSfaSBIaXptZXRsZXJpIEEuxZ4uMIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEAylIF1mMD2Bxf3dJ7XfIMYGFbazt0K3gNfUW9InTojAPBxhEqPZW8qZSwu5GX
+yGl8hMW0kWxsE2qkVa2kheiVfrMArwDCBRj1cJ02i67L5BuBf5OI+2pVu32Fks66WJ/bMsW9Xe8i
+Si9BB35JYbOG7E6mQW6EvAPs9TscyB/C7qju6hJKjRTP8wrgUDn5CDX4EVmt5yLqS8oUBt5CurKZ
+8y1UiBAG6uEaPj1nH/vO+3yC6BFdSsG5FOpU2WabfIl9BJpiyelSPJ6c79L1JuTm5Rh8i27fbMx4
+W09ysstcP4wFjdFMjK2Sx+F4f2VsSQZQLJ4ywtdKxnWKWU51b0dewQIDAQABoxAwDjAMBgNVHRME
+BTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAV9VX/N5aAWSGk/KEVTCD21F/aAyT8z5Aa9CEKmu46
+sWrv7/hg0Uw2ZkUd82YCdAR7kjCo3gp2D++Vbr3JN+YaDayJSFvMgzbC9UZcWYJWtNX+I7TYVBxE
+q8Sn5RTOPEFhfEPmzcSBCYsk+1Ql1haolgxnB2+zUEfjHCQo3SqYpGH+2+oSN7wBGjSFvW5P55Fy
+B0SFHljKVETd96y5y4khctuPwGkplyqjrhgjlxxBKot8KsF8kOipKMDTkcatKIdAaLX/7KfS0zgY
+nNN9aV3wxqUeJBujR/xpB2jn5Jq07Q+hh4cCzofSSE7hvP/L8XKSRGQDJereW26fyfJOrN3H
+-----END CERTIFICATE-----
+
+TURKTRUST Certificate Services Provider Root 2
+==============================================
+-----BEGIN CERTIFICATE-----
+MIIEPDCCAySgA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M9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk
+vC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf
+KzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br
+NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj
+viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ
+-----END CERTIFICATE-----
+
+SwissSign Silver CA - G2
+========================
+-----BEGIN CERTIFICATE-----
+MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT
+BgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMB4X
+DTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0NlowRzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3
+aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG
+9w0BAQEFAAOCAg8AMIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644
+N0MvFz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7brYT7QbNHm
++/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieFnbAVlDLaYQ1HTWBCrpJH
+6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH6ATK72oxh9TAtvmUcXtnZLi2kUpCe2Uu
+MGoM9ZDulebyzYLs2aFK7PayS+VFheZteJMELpyCbTapxDFk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q7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu
+WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ
+DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub
+DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u
+-----END CERTIFICATE-----
+
+GeoTrust Primary Certification Authority
+========================================
+-----BEGIN CERTIFICATE-----
+MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQG
+EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMoR2VvVHJ1c3QgUHJpbWFyeSBD
+ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgx
+CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQ
+cmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+CgKCAQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9AWbK7hWN
+b6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjAZIVcFU2Ix7e64HXprQU9
+nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE07e9GceBrAqg1cmuXm2bgyxx5X9gaBGge
+RwLmnWDiNpcB3841kt++Z8dtd1k7j53WkBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGt
+tm/81w7a4DSwDRp35+MImO9Y+pyE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m9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMT
+FnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCs
+oPD7gFnUnMekz52hWXMJEEUMDSxuaPFsW0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ
+1CRfBsDMRJSUjQJib+ta3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGc
+q/gcfomk6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6Sk/K
+aAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94JNqR32HuHUETVPm4p
+afs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD
+VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XPr87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUF
+AAOCAQEAeRHAS7ORtvzw6WfUDW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeE
+uzLlQRHAd9mzYJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX
+xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2/qxAeeWsEG89
+jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/LHbTY5xZ3Y+m4Q6gLkH3LpVH
+z7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7jVaMaA==
+-----END CERTIFICATE-----
+
+VeriSign Class 3 Public Primary Certification Authority - G5
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBg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v6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc
+f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW
+-----END CERTIFICATE-----
+
+COMODO Certification Authority
+==============================
+-----BEGIN CERTIFICATE-----
+MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE
+BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG
+A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1
+dGhvcml0eTAeFw0wNjEyMDEwMDAwMDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEb
+MBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFD
+T01PRE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0aG9yaXR5
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3UcEbVASY06m/weaKXTuH
++7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI2GqGd0S7WWaXUF601CxwRM/aN5VCaTww
+xHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV
+4EajcNxo2f8ESIl33rXp+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA
+1KGzqSX+DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5OnKVI
+rLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW/zAOBgNVHQ8BAf8E
+BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6gPKA6hjhodHRwOi8vY3JsLmNvbW9k
+b2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9uQXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOC
+AQEAPpiem/Yb6dc5t3iuHXIYSdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CP
+OGEIqB6BCsAvIC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/
+RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4zJVSk/BwJVmc
+IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN
++8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ==
+-----END CERTIFICATE-----
+
+Network Solutions Certificate Authority
+=======================================
+-----BEGIN CERTIFICATE-----
+MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG
+EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr
+IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx
+MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu
+MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G
+CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx
+jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT
+aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT
+crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc
+/Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB
+AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP
+BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv
+bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA
+A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q
+4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/
+GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv
+wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD
+ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
+-----END CERTIFICATE-----
+
+WellsSecure Public Root Certificate Authority
+=============================================
+-----BEGIN CERTIFICATE-----
+MIIEvTCCA6WgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBhTELMAkGA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MAkGA1UEBhMCVVMxIDAeBgNVBAoMF1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRww
+GgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMg
+Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHmCAQEwDQYJKoZIhvcNAQEFBQADggEBALkVsUSRzCPI
+K0134/iaeycNzXK7mQDKfGYZUMbVmO2rvwNa5U3lHshPcZeG1eMd/ZDJPHV3V3p9+N701NX3leZ0
+bh08rnyd2wIDBSxxSyU+B+NemvVmFymIGjifz6pBA4SXa5M4esowRBskRDPQ5NHcKDj0E0M1NSlj
+qHyita04pO2t/caaH/+Xc/77szWnk4bGdpEA5qxRFsQnMlzbc9qlk1eOPm01JghZ1edE13YgY+es
+E2fDbbFwRnzVlhE9iW9dqKHrjQrawx0zbKPqZxmamX9LPYNRKh3KL4YMon4QLSvUFpULB6ouFJJJ
+tylv2G0xffX8oRAHh84vWdw+WNs=
+-----END CERTIFICATE-----
+
+COMODO ECC Certification Authority
+==================================
+-----BEGIN CERTIFICATE-----
+MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC
+R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE
+ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB
+dXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix
+GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
+Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0M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2aSVz2
+TqrMHLmh6yeJ8kbpO0px1R2OLc/mratjUMdUC24SyZA2xtgv2pGqaMVy/hcKshd+ebUyiHDKcMCW
+So7kVc0dJ5S/znIq7Fz5cyD+vfcuiWe4u0dzEvfRNWk68gq5rv9GQkaiv6GFGvm/5P9JhfejcIYy
+HF2fYPepraX/z9E0+X1bF8bc1g4oa8Ld8fUzaJ1O/Id8NhLWo4DoQw1VYZTqZDdH6nfK0LJYBcNd
+frGoRpAxVs5wKpayMLh35nnAvSk7/ZR3TL0gzUEl4C7HG7vupARB0l2tEmqKm0f7yd1GQOGdPDPQ
+tQIDAQABo3cwdTAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIBRjAVBgNVHSAEDjAMMAoGCCqB
+egF5AQEBMB0GA1UdDgQWBBSjBS8YYFDCiQrdKyFP/45OqDAxNjAfBgNVHSMEGDAWgBSjBS8YYFDC
+iQrdKyFP/45OqDAxNjANBgkqhkiG9w0BAQUFAAOCAQEABdwm2Pp3FURo/C9mOnTgXeQp/wYHE4RK
+q89toB9RlPhJy3Q2FLwV3duJL92PoF189RLrn544pEfMs5bZvpwlqwN+Mw+VgQ39FuCIvjfwbF3Q
+MZsyK10XZZOYYLxuj7GoPB7ZHPOpJkL5ZB3C55L29B5aqhlSXa/oovdgoPaN8In1buAKBQGVyYsg
+Crpa/JosPL3Dt8ldeCUFP1YUmwza+zpI/pdpXsoQhvdOlgQITeywvl3cO45Pwf2aNjSaTFR+FwNI
+lQgRHAdvhQh+XU3Endv7rs6y0bO4g2wdsrN58dhwmX7wEwLOXt1R0982gaEbeC9xs/FZTEYYKKuF
+0mBWWg==
+-----END CERTIFICATE-----
+
+Security Communication EV RootCA1
+=================================
+-----BEGIN CERTIFICATE-----
+MIIDfTCCAmWgAwIBAgIBADANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJKUDElMCMGA1UEChMc
+U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEqMCgGA1UECxMhU2Vj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aJ/D8g8rQjJsJhAoyrniIPtd490
+-----END CERTIFICATE-----
+
+OISTE WISeKey Global Root GA CA
+===============================
+-----BEGIN CERTIFICATE-----
+MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UE
+BhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHlyaWdodCAoYykgMjAwNTEiMCAG
+A1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBH
+bG9iYWwgUm9vdCBHQSBDQTAeFw0wNTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYD
+VQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIw
+IAYDVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5
+IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy0+zAJs9
+Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxRVVuuk+g3/ytr6dTqvirdqFEr12bDYVxg
+Asj1znJ7O7jyTmUIms2kahnBAbtzptf2w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbD
+d50kc3vkDIzh2TbhmYsFmQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ
+/yxViJGg4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t94B3R
+LoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw
+AwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQ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92Mi90
+Y19jbGFzc18zX2NhX0lJLmNybIaBn2xkYXA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBU
+cnVzdENlbnRlciUyMENsYXNzJTIwMyUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21i
+SCxPVT1yb290Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u
+TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEANmDkcPcGIEPZIxpC8vijsrlNirTzwppVMXzE
+O2eatN9NDoqTSheLG43KieHPOh6sHfGcMrSOWXaiQYUlN6AT0PV8TtXqluJucsG7Kv5sbviRmEb8
+yRtXW+rIGjs/sFGYPAfaLFkB2otE6OF0/ado3VS6g0bsyEa1+K+XwDsJHI/OcpY9M1ZwvJbL2NV9
+IJqDnxrcOfHFcqMRA/07QlIp2+gB95tejNaNhk4Z+rwcvsUhpYeeeC422wlxo3I0+GzjBgnyXlal
+092Y+tTmBvTwtiBjS+opvaqCZh77gaqnN60TGOaSw4HBM7uIHqHn4rS9MWwOUT1v+5ZWgOI2F9Hc
+5A==
+-----END CERTIFICATE-----
+
+TC TrustCenter Universal CA I
+=============================
+-----BEGIN CERTIFICATE-----
+MIID3TCCAsWgAwIBAgIOHaIAAQAC7LdggHiNtgYwDQYJKoZIhvcNAQEFBQAweTELMAkGA1UEBhMC
+REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNVBAsTG1RDIFRydXN0Q2VudGVy
+IFVuaXZlcnNhbCBDQTEmMCQGA1UEAxMdVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBIEkwHhcN
+MDYwMzIyMTU1NDI4WhcNMjUxMjMxMjI1OTU5WjB5MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMg
+VHJ1c3RDZW50ZXIgR21iSDEkMCIGA1UECxMbVEMgVHJ1c3RDZW50ZXIgVW5p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Buvl2ICO1J2B0
+1GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6YlPwZpVnPDimZI+ymBV3QGypzq
+KOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkPJXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdV
+xrsStZf0X4OFunHB2WyBEXYKCrC/gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEP
+NXubrjlpC2JgQCA2j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+r
+GNm65ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUBo2M3IUxE
+xJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS/jQ6fbjpKdx2qcgw+BRx
+gMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2zGp1iro2C6pSe3VkQw63d4k3jMdXH7Ojy
+sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD
+BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw=
+-----END CERTIFICATE-----
+
+T\xc3\x9c\x42\xC4\xB0TAK UEKAE K\xC3\xB6k Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1 - S\xC3\xBCr\xC3\xBCm 3
+=============================================================================================================================
+-----BEGIN CERTIFICATE-----
+MIIFFzCCA/+gAwIBAgIBETANBgkqhkiG9w0BAQUFADCCASsxCzAJBgNVBAYTAlRSMRgwFgYDVQQH
+DA9HZWJ6ZSAtIEtvY2FlbGkxRzBFBgNVBAoMPlTDvHJraXllIEJpbGltc2VsIHZlIFRla25vbG9q
+aWsgQXJhxZ90xLFybWEgS3VydW11IC0gVMOcQsSwVEFLMUgwRgYDVQQ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BQADggEPADCCAQoCggEBAKSO13TZKWTeXx+HgJHqTjnmGcZEC4DVC69TB4sSveZn8AKx
+ifZgisRbsELRwCGoy+Gb72RRtqfPFfV0gGgEkKBYouZ0plNTVUhjP5JW3SROjvi6K//zNIqeKNc0
+n6wv1g/xpC+9UrJJhW05NfBEMJNGJPO251P7vGGvqaMU+8IXF4Rs4HyI+MkcVyzwPX6UvCWThOia
+AJpFBUJXgPROztmuOfbIUxAMZTpHe2DC1vqRycZxbL2RhzyRhkmr8w+gbCZ2Xhysm3HljbybIR6c
+1jh+JIAVMYKWsUnTYjdbiAwKYjT+p0h+mbEwi5A3lRyoH6UsjfRVyNvdWQrCrXig9IsCAwEAAaNC
+MEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUOBTmyPCppAP0Tj4io1vy1uCtQHQwDgYDVR0P
+AQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQABZ6OMySU9E2NdFm/soT4JXJEVKirZgCFPBdy7
+pYmrEzMqnji3jG8CcmPHc3ceCQa6Oyh7pEfJYWsICCD8igWKH7y6xsL+z27sEzNxZy5p+qksP2bA
+EllNC1QCkoS72xLvg3BweMhT+t/Gxv/ciC8HwEmdMldg0/L2mSlf56oBzKwzqBwKu5HEA6BvtjT5
+htOzdlSY9EqBs1OdTUDs5XcTRa9bqh/YL0yCe/4qxFi7T/ye/QNlGioOw6UgFpRreaaiErS7GqQj
+el/wroQk5PMr+4okoyeYZdowdXb8GZHo2+ubPzK/QJcHJrrM85SFSnonk8+QQtS4Wxam58tAA915
+-----END CERTIFICATE-----
+
+EBG Elektronik Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1
+==========================================================================
+-----BEGIN CERTIFICATE-----
+MIIF5zCCA8+gAwIBAgIITK9zQhyOdAIwDQYJKoZIhvcNAQEFBQAwgYAxODA2BgNVBAMML0VCRyBF
+bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HE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WtcVG6kbghVW2
+G8kS1sHNzYDzAgE8yGnLRUhj2JTQ7IUOO04RZfSCjKY9ri4ilAnIXOo8gV0WKgOXFlUJ24pBgp5m
+mxE=
+-----END CERTIFICATE-----
+
+ApplicationCA - Japanese Government
+===================================
+-----BEGIN CERTIFICATE-----
+MIIDoDCCAoigAwIBAgIBMTANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJKUDEcMBoGA1UEChMT
+SmFwYW5lc2UgR292ZXJubWVudDEWMBQGA1UECxMNQXBwbGljYXRpb25DQTAeFw0wNzEyMTIxNTAw
+MDBaFw0xNzEyMTIxNTAwMDBaMEMxCzAJBgNVBAYTAkpQMRwwGgYDVQQKExNKYXBhbmVzZSBHb3Zl
+cm5tZW50MRYwFAYDVQQLEw1BcHBsaWNhdGlvbkNBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+CgKCAQEAp23gdE6Hj6UG3mii24aZS2QNcfAKBZuOquHMLtJqO8F6tJdhjYq+xpqcBrSGUeQ3DnR4
+fl+Kf5Sk10cI/VBaVuRorChzoHvpfxiSQE8tnfWuREhzNgaeZCw7NCPbXCbkcXmP1G55IrmTwcrN
+wVbtiGrXoDkhBFcsovW8R0FPXjQilbUfKW1eSvNNcr5BViCH/OlQR9cwFO5cjFW6WY2H/CPek9AE
+jP3vbb3QesmlOmpyM8ZKDQUXKi17safY1vC+9D/qDihtQWEjdnjDuGWk81quzMKq2edY3rZ+nYVu
+nyoKb58DKTCXKB28t89UKU5RMfkntigm/qJj5kEW8DOYRwIDAQABo4GeMIGbMB0GA1UdDgQWBBRU
+WssmP3HMlEYNllPqa0jQk/5CdTAOBgNVHQ8BAf8EBAMCAQYwWQYDVR0RBFIwUKROMEwxCzAJBgNV
+BAYTAkpQMRgwFgYDVQQKDA/ml6XmnKzlm73mlL/lupwxIzAhBgNVBAsMGuOCouODl+ODquOCseOD
+vOOCt+ODp+ODs0NBMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADlqRHZ3ODrs
+o2dGD/mLBqj7apAxzn7s2tGJfHrrLgy9mTLnsCTWw//1sogJhyzjVOGjprIIC8CFqMjSnHH2HZ9g
+/DgzE+Ge3Atf2hZQKXsvcJEPmbo0NI2VdMV+eKlmXb3KIXdCEKxmJj3ekav9FfBv7WxfEPjzFvYD
+io+nEhEMy/0/ecGc/WLuo89UDNErXxc+4z6/wCs+CZv+iKZ+tJIX/COUgb1up8WMwusRRdv4QcmW
+dupwX3kSa+SjB1oF7ydJzyGfikwJcGapJsErEU4z0g781mzSDjJkaP+tBXhfAx2o45CsJOAPQKdL
+rosot4LKGAfmt1t06SAZf7IbiVQ=
+-----END CERTIFICATE-----
+
+GeoTrust Primary Certification Authority - G3
+=============================================
+-----BEGIN CERTIFICATE-----
+MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UE
+BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA4IEdlb1RydXN0
+IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFy
+eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIz
+NTk1OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAo
+YykgMjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMT
+LUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz+uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5j
+K/BGvESyiaHAKAxJcCGVn2TAppMSAmUmhsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdE
+c5IiaacDiGydY8hS2pgn5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3C
+IShwiP/WJmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exALDmKu
+dlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZChuOl1UcCAwEAAaNC
+MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMR5yo6hTgMdHNxr
+2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IBAQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9
+cr5HqQ6XErhK8WTTOd8lNNTBzU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbE
+Ap7aDHdlDkQNkv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD
+AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUHSJsMC8tJP33s
+t/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2Gspki4cErx5z481+oghLrGREt
+-----END CERTIFICATE-----
+
+thawte Primary Root CA - G2
+===========================
+-----BEGIN CERTIFICATE-----
+MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDELMAkGA1UEBhMC
+VVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMpIDIwMDcgdGhhd3RlLCBJbmMu
+IC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3Qg
+Q0EgLSBHMjAeFw0wNzExMD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vzsUsZAReiDZuMdRAGmI0Nj81Aa6sY6A=
+-----END CERTIFICATE-----
+
+GeoTrust Primary Certification Authority - G2
+=============================================
+-----BEGIN CERTIFICATE-----
+MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDELMAkGA1UEBhMC
+VVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA3IEdlb1RydXN0IElu
+Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBD
+ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1
+OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg
+MjAwNyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMTLUdl
+b1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjB2MBAGByqGSM49AgEG
+BSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcLSo17VDs6bl8VAsBQps8lL33KSLjHUGMc
+KiEIfJo22Av+0SbFWDEwKCXzXV2juLaltJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYD
+VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+
+EVXVMAoGCCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGTqQ7m
+ndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBuczrD6ogRLQy7rQkgu2
+npaqBA+K
+-----END CERTIFICATE-----
+
+VeriSign Universal Root Certification Authority
+===============================================
+-----BEGIN CERTIFICATE-----
+MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE
+BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
+ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
+IHVzZSBvbmx5MTgwNgYDVQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9u
+IEF1dGhvcml0eTAeFw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJV
+UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
+cmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
+IG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNhbCBSb290IENlcnRpZmljYXRpb24gQXV0
+aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj
+1mCOkdeQmIN65lgZOIzF9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGP
+MiJhgsWHH26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+HLL72
+9fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN/BMReYTtXlT2NJ8I
+AfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPTrJ9VAMf2CGqUuV/c4DPxhGD5WycR
+tPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0G
+CCsGAQUFBwEMBGEwX6FdoFswWTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2O
+a8PPgGrUSBgsexkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud
+DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4sAPmLGd75JR3
+Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+seQxIcaBlVZaDrHC1LGmWazx
+Y8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTx
+P/jgdFcrGJ2BtMQo2pSXpXDrrB2+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+P
+wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4
+mJO37M2CYfE45k+XmCpajQ==
+-----END CERTIFICATE-----
+
+VeriSign Class 3 Public Primary Certification Authority - G4
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC
+VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3
+b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz
+ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj
+YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL
+MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU
+cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo
+b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5
+IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8
+Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz
+rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB
+/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw
+HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u
+Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD
+A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx
+AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA==
+-----END CERTIFICATE-----
+
+NetLock Arany (Class Gold) Főtanúsítvány
+============================================
+-----BEGIN CERTIFICATE-----
+MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8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j3hWVcRrs7EKACr81Ptcw2Kuxd/u+gkcm2k298gFTsxwhwDY77guwqYHhpNjbRxZyL
+abVAyJRld/JXIWY7zoVAtjNjGr95HvxcHdMdkxuLDF2FvZkwMhgJkVLpfKG6/2SSmuz+Ne6ML678
+IIbsSt4beDI3poHSna9aEhbKmVv8b20OxaAehsmR0FyYgl9jDIpaq9iVpszLita/ZEuOyoqysOkh
+Mp6qqIWYNIE5ITuoOlIyPfZrN4YGWhWY3PARZv40ILcD9EEQfTmEeZZyY7aWAuVrua0ZTbvGRNs2
+yyqcjg==
+-----END CERTIFICATE-----
+
+Hongkong Post Root CA 1
+=======================
+-----BEGIN CERTIFICATE-----
+MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoT
+DUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMB4XDTAzMDUx
+NTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25n
+IFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEF
+AAOCAQ8AMIIBCgKCAQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1
+ApzQjVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEnPzlTCeqr
+auh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjhZY4bXSNmO7ilMlHIhqqh
+qZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY
+V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV
+HRMBAf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tH1Pwk
+zQSulgUV1qzOMPPKC8W64iLgpq0i5ALudBF/TP94HTXa5gI06xgSYXcGCRZj6hitoocf8seACQl1
+ThCojz2GuHURwCRiipZ7SkXp7FnFvmuD5uHorLUwHv4FB4D54SMNUI8FmP8sX+g7tq3PgbUhh8oI
+KiMnMCArz+2UW6yyetLHKKGKC5tNSixthT8Jcjxn4tncB7rrZXtaAWPWkFtPF2Y9fwsZo5NjEFIq
+nxQWWOLcpfShFosOkYuByptZ+thrkQdlVV9SH686+5DdaaVbnG0OLLb6zqylfDJKZ0DcMDQj3dcE
+I2bw/FWAp/tmGYI1Z2JwOV5vx+qQQEQIHriy1tvuWacNGHk0vFQYXlPKNFHtRQrmjseCNj6nOGOp
+MCwXEGCSn1WHElkQwg9naRHMTh5+Spqtr0CodaxWkHS4oJyleW/c6RrIaQXpuvoDs3zk4E7Czp3o
+tkYNbn5XOmeUwssfnHdKZ05phkOTOPu220+DkdRgfks+KzgHVZhepA==
+-----END CERTIFICATE-----
+
+Verisign Class 3 Public Primary Certification Authority
+=======================================================
+-----BEGIN CERTIFICATE-----
+MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkGA1UEBhMCVVMx
+FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5
+IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVow
+XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz
+IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA
+A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94
+f56TuZoAqiN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+f+wFUoLAKA
+pxn1ntxVUwOXewdI/5n7N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm
+1HxdrtbCxkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1+rUC
+AwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTLD8bf
+QkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAbBgNVHREE
+FDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqGSIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0o
+lZMEyL/azXm4Q5DwpL7v8u8hmLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfX
+I/OMn74dseGkddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775
+tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c2Pm2G2JwCz02
+yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5tHMN1Rq41Bab2XD0h7lbwyYIi
+LXpUq3DDfSJlgnCW
+-----END CERTIFICATE-----
+
+E-Guven Kok Elektronik Sertifika Hizmet Saglayicisi
+===================================================
+-----BEGIN CERTIFICATE-----
+MIIDtjCCAp6gAwIBAgIQRJmNPMADJ72cdpW56tustTANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG
+EwJUUjEoMCYGA1UEChMfRWxla3Ryb25payBCaWxnaSBHdXZlbmxpZ2kgQS5TLjE8MDoGA1UEAxMz
+ZS1HdXZlbiBLb2sgRWxla3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhZ2xheWljaXNpMB4XDTA3
+MDEwNDExMzI0OFoXDTE3MD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j+1E
+bddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18
+YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r
+kpeDMdmztcpHWD9f
+-----END CERTIFICATE-----
+
+TC TrustCenter Universal CA III
+===============================
+-----BEGIN CERTIFICATE-----
+MIID4TCCAsmgAwIBAgIOYyUAAQACFI0zFQLkbPQwDQYJKoZIhvcNAQEFBQAwezELMAkGA1UEBhMC
+REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNVBAsTG1RDIFRydXN0Q2VudGVy
+IFVuaXZlcnNhbCBDQTEoMCYGA1UEAxMfVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBIElJSTAe
+Fw0wOTA5MDkwODE1MjdaFw0yOTEyMzEyMzU5NTlaMHsxCzAJBgNVBAYTAkRFMRwwGgYDVQQKExNU
+QyBUcnVzdENlbnRlciBHbWJIMSQwIgYDVQQLExtUQyBUcnVzdENlbnRlciBVbml2ZXJzYWwgQ0Ex
+KDAmBgNVBAMTH1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQSBJSUkwggEiMA0GCSqGSIb3DQEB
+AQUAA4IBDwAwggEKAoIBAQDC2pxisLlxErALyBpXsq6DFJmzNEubkKLF5+cvAqBNLaT6hdqbJYUt
+QCggbergvbFIgyIpRJ9Og+41URNzdNW88jBmlFPAQDYvDIRlzg9uwliT6CwLOunBjvvya8o84pxO
+juT5fdMnnxvVZ3iHLX8LR7PH6MlIfK8vzArZQe+f/prhsq75U7Xl6UafYOPfjdN/+5Z+s7Vy+Eut
+CHnNaYlAJ/Uqwa1D7KRTyGG299J5KmcYdkhtWyUB0SbFt1dpIxVbYYqt8Bst2a9c8SaQaanVDED1
+M4BDj5yjdipFtK+/fz6HP3bFzSreIMUWWMv5G/UPyw0RUmS40nZid4PxWJ//AgMBAAGjYzBhMB8G
+A1UdIwQYMBaAFFbn4VslQ4Dg9ozhcbyO5YAvxEjiMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/
+BAQDAgEGMB0GA1UdDgQWBBRW5+FbJUOA4PaM4XG8juWAL8RI4jANBgkqhkiG9w0BAQUFAAOCAQEA
+g8ev6n9NCjw5sWi+e22JLumzCecYV42FmhfzdkJQEw/HkG8zrcVJYCtsSVgZ1OK+t7+rSbyUyKu+
+KGwWaODIl0YgoGhnYIg5IFHYaAERzqf2EQf27OysGh+yZm5WZ2B6dF7AbZc2rrUNXWZzwCUyRdhK
+BgePxLcHsU0GDeGl6/R1yrqc0L2z0zIkTO5+4nYES0lT2PLpVDP85XEfPRRclkvxOvIAu2y0+pZV
+CIgJwcyRGSmwIC3/yzikQOEXvnlhgP8HA4ZMTnsGnxGGjYnuJ8Tb4rwZjgvDwxPHLQNjO9Po5KIq
+woIIlBZU8O8fJ5AluA0OKBtHd0e9HKgl8ZS0Zg==
+-----END CERTIFICATE-----
+
+Autoridad de Certificacion Firmaprofesional CIF A62634068
+=========================================================
+-----BEGIN CERTIFICATE-----
+MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMxQjBA
+BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2
+MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEyMzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIw
+QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB
+NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD
+Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5G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kgPH7UIBzg/YsfqikuFgba56awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8q
+hT/AQKM6WfxZSzwoJNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Cs
+g1lwLDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCTVyvehQP5
+aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGkLhObNA5me0mrZJfQRsN5
+nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJbUjWumDqtujWTI6cfSN01RpiyEGjkpTHC
+ClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZo
+Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z
+WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw==
+-----END CERTIFICATE-----
+
+Chambers of Commerce Root - 2008
+================================
+-----BEGIN CERTIFICATE-----
+MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYDVQQGEwJFVTFD
+MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv
+bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu
+QS4xKTAnBgNVBAMTIENoYW1iZXJzIG9mIENvbW1lcmNlIFJvb3QgLSAyMDA4MB4XDTA4MDgwMTEy
+Mjk1MFoXDTM4MDczMTEyMjk1MFowga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNl
+ZSBjdXJyZW50IGFkZHJ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7N14jHyAxfDZd0jQ
+-----END CERTIFICATE-----
+
+Global Chambersign Root - 2008
+==============================
+-----BEGIN CERTIFICATE-----
+MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYDVQQGEwJFVTFD
+MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv
+bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu
+QS4xJzAlBgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODAeFw0wODA4MDExMjMx
+NDBaFw0zODA3MzExMjMxNDBaMIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUg
+Y3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJ
+QTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMTHkdsb2JhbCBD
+aGFtYmVyc2lnbiBSb290IC0gMjAwODCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMDf
+VtPkOpt2RbQT2//BthmLN0EYlVJH6xedKYiONWwGMi5HYvNJBL99RDaxccy9Wglz1dmFRP+RVyXf
+XjaOcNFccUMd2drvXNL7G706tcuto8xEpw2uIRU/uXpbknXYpBI4iRmKt4DS4jJvVpyR1ogQC7N0
+ZJJ0YPP2zxhPYLIj0Mc7zmFLmY/CDNBAspjcDahOo7kKrmCgrUVSY7pmvWjg+b4aqIG7HkF4ddPB
+/gBVsIdU6CeQNR1MM62X/JcumIS/LMmjv9GYERTtY/jKmIhYF5ntRQOXfjyGHoiMvvKRhI9lNNgA
+TH23MRdaKXoKGCQwoze1eqkBfSbW+Q6OWfH9GzO1KTsXO0G2Id3UwD2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mOghp+G9PUIadJpwr2hsUF1Jz//7Dl3mLEfXgTpZALVza2Mg
+9jFFCDkO9HB+QHBaP9BrQql0PSgvAm11cpUJjUhjxsYjV5KTXjXBjfkK9yydYhz2rXzdpjEetrHH
+foUm+qRqtdpjMNHvkzeyZi99Bffnt0uYlDXA2TopwZ2yUDMdSqlapskD7+3056huirRXhOukP9Du
+qqqHW2Pok+JrqNS4cnhrG+055F3Lm6qH1U9OAP7Zap88MQ8oAgF9mOinsKJknnn4SPIVqczmyETr
+P3iZ8ntxPjzxmKfFGBI/5rsoM0LpRQp8bfKGeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVq
+c5iJWzouE4gev8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z
+09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B
+-----END CERTIFICATE-----
+
+Go Daddy Root Certificate Authority - G2
+========================================
+-----BEGIN CERTIFICATE-----
+MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
+B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoTEUdvRGFkZHkuY29tLCBJbmMu
+MTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5
+MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6
+b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8G
+A1UEAxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKDE6bFIEMBO4Tx5oVJnyfq
+9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD
++qK+ihVqf94Lw7YZFAXK6sOoBJQ7RnwyDfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutd
+fMh8+7ArU6SSYmlRJQVhGkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMl
+NAJWJwGRtDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEAAaNC
+MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFDqahQcQZyi27/a9
+BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmXWWcDYfF+OwYxdS2hII5PZYe096ac
+vNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r
+5N9ss4UXnT3ZJE95kTXWXwTrgIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYV
+N8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO
+LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1
+-----END CERTIFICATE-----
+
+Starfield Root Certificate Authority - G2
+=========================================
+-----BEGIN CERTIFICATE-----
+MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
+B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s
+b2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVsZCBSb290IENlcnRpZmljY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x3vLCWRFCztAgfd9fDL1mMpYjn0q7pBZ
+c2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0
+-----END CERTIFICATE-----
+
+Starfield Services Root Certificate Authority - G2
+==================================================
+-----BEGIN CERTIFICATE-----
+MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
+B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s
+b2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRl
+IEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNV
+BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxT
+dGFyZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2VydmljZXMg
+Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
+AQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20pOsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2
+h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm28xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4Pa
+hHQUw2eeBGg6345AWh1KTs9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLP
+LJGmpufehRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk6mFB
+rMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAwDwYDVR0TAQH/BAUw
+AwEB/zAOB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N0ZW1lIGltIGVsZWt0ci4gRGF0
+ZW52ZXJrZWhyIEdtYkgxGTAXBgNVBAsMEEEtVHJ1c3QtblF1YWwtMDMxGTAXBgNVBAMMEEEtVHJ1
+c3QtblF1YWwtMDMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtPWFuA/OQO8BBC4SA
+zewqo51ru27CQoT3URThoKgtUaNR8t4j8DRE/5TrzAUjlUC5B3ilJfYKvUWG6Nm9wASOhURh73+n
+yfrBJcyFLGM/BWBzSQXgYHiVEEvc+RFZznF/QJuKqiTfC0Li21a8StKlDJu3Qz7dg9MmEALP6iPE
+SU7l0+m0iKsMrmKS1GWH2WrX9IWf5DMiJaXlyDO6w8dB3F/GaswADm0yqLaHNgBid5seHzTLkDx4
+iHQF63n1k3Flyp3HaxgtPVxO59X4PzF9j4fsCiIvI+n+u33J4PTs63zEsMMtYrWacdaxaujs2e3V
+cuy+VwHOBVWf3tFgiBCzAgMBAAGjNjA0MA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0OBAoECERqlWdV
+eRFPMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAVdRU0VlIXLOThaq/Yy/kgM40
+ozRiPvbY7meIMQQDbwvUB/tOdQ/TLtPAF8fGKOwGDREkDg6lXb+MshOWcdzUzg4NCmgybLlBMRmr
+sQd7TZjTXLDR8KdCoLXEjq/+8T/0709GAHbrAvv5ndJAlseIOrifEXnzgGWovR/TeIGgUUw3tKZd
+JXDRZslo+S4RFGjxVJgIrCaSD96JntT6s3kr0qN51OyLrIdTaEJMUVF0HhsnLuP1Hyl0Te2v9+GS
+mYHovjrHF1D2t8b8m7CKa9aIA5GPBnc6hQLdmNVDeD/GMBWsm2vLV7eJUYs66MmEDNuxUCAKGkq6
+ahq97BvIxYSazQ==
+-----END CERTIFICATE-----
+
+TWCA Root Certification Authority
+=================================
+-----BEGIN CERTIFICATE-----
+MIIDezCCAmOgAwIBAgIBATANBgkqhk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KuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny
+Yh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw==
+-----END CERTIFICATE-----
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/htmlNumTable.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/htmlNumTable.php
new file mode 100644 (file)
index 0000000..f12acf5
--- /dev/null
@@ -0,0 +1,260 @@
+<?php\r
+\r
+$HTML401NamedToNumeric = array(\r
+    '&apos;'     => '&#39;',\r
+    '&nbsp;'     => '&#160;',  # no-break space = non-breaking space, U+00A0 ISOnum\r
+    '&iexcl;'    => '&#161;',  # inverted exclamation mark, U+00A1 ISOnum\r
+    '&cent;'     => '&#162;',  # cent sign, U+00A2 ISOnum\r
+    '&pound;'    => '&#163;',  # pound sign, U+00A3 ISOnum\r
+    '&curren;'   => '&#164;',  # currency sign, U+00A4 ISOnum\r
+    '&yen;'      => '&#165;',  # yen sign = yuan sign, U+00A5 ISOnum\r
+    '&brvbar;'   => '&#166;',  # broken bar = broken vertical bar, U+00A6 ISOnum\r
+    '&sect;'     => '&#167;',  # section sign, U+00A7 ISOnum\r
+    '&uml;'      => '&#168;',  # diaeresis = spacing diaeresis, U+00A8 ISOdia\r
+    '&copy;'     => '&#169;',  # copyright sign, U+00A9 ISOnum\r
+    '&ordf;'     => '&#170;',  # feminine ordinal indicator, U+00AA ISOnum\r
+    '&laquo;'    => '&#171;',  # left-pointing double angle quotation mark = left pointing guillemet, U+00AB ISOnum\r
+    '&not;'      => '&#172;',  # not sign, U+00AC ISOnum\r
+    '&shy;'      => '&#173;',  # soft hyphen = discretionary hyphen, U+00AD ISOnum\r
+    '&reg;'      => '&#174;',  # registered sign = registered trade mark sign, U+00AE ISOnum\r
+    '&macr;'     => '&#175;',  # macron = spacing macron = overline = APL overbar, U+00AF ISOdia\r
+    '&deg;'      => '&#176;',  # degree sign, U+00B0 ISOnum\r
+    '&plusmn;'   => '&#177;',  # plus-minus sign = plus-or-minus sign, U+00B1 ISOnum\r
+    '&sup2;'     => '&#178;',  # superscript two = superscript digit two = squared, U+00B2 ISOnum\r
+    '&sup3;'     => '&#179;',  # superscript three = superscript digit three = cubed, U+00B3 ISOnum\r
+    '&acute;'    => '&#180;',  # acute accent = spacing acute, U+00B4 ISOdia\r
+    '&micro;'    => '&#181;',  # micro sign, U+00B5 ISOnum\r
+    '&para;'     => '&#182;',  # pilcrow sign = paragraph sign, U+00B6 ISOnum\r
+    '&middot;'   => '&#183;',  # middle dot = Georgian comma = Greek middle dot, U+00B7 ISOnum\r
+    '&cedil;'    => '&#184;',  # cedilla = spacing cedilla, U+00B8 ISOdia\r
+    '&sup1;'     => '&#185;',  # superscript one = superscript digit one, U+00B9 ISOnum\r
+    '&ordm;'     => '&#186;',  # masculine ordinal indicator, U+00BA ISOnum\r
+    '&raquo;'    => '&#187;',  # right-pointing double angle quotation mark = right pointing guillemet, U+00BB ISOnum\r
+    '&frac14;'   => '&#188;',  # vulgar fraction one quarter = fraction one quarter, U+00BC ISOnum\r
+    '&frac12;'   => '&#189;',  # vulgar fraction one half = fraction one half, U+00BD ISOnum\r
+    '&frac34;'   => '&#190;',  # vulgar fraction three quarters = fraction three quarters, U+00BE ISOnum\r
+    '&iquest;'   => '&#191;',  # inverted question mark = turned question mark, U+00BF ISOnum\r
+    '&Agrave;'   => '&#192;',  # latin capital letter A with grave = latin capital letter A grave, U+00C0 ISOlat1\r
+    '&Aacute;'   => '&#193;',  # latin capital letter A with acute, U+00C1 ISOlat1\r
+    '&Acirc;'    => '&#194;',  # latin capital letter A with circumflex, U+00C2 ISOlat1\r
+    '&Atilde;'   => '&#195;',  # latin capital letter A with tilde, U+00C3 ISOlat1\r
+    '&Auml;'     => '&#196;',  # latin capital letter A with diaeresis, U+00C4 ISOlat1\r
+    '&Aring;'    => '&#197;',  # latin capital letter A with ring above = latin capital letter A ring, U+00C5 ISOlat1\r
+    '&AElig;'    => '&#198;',  # latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1\r
+    '&Ccedil;'   => '&#199;',  # latin capital letter C with cedilla, U+00C7 ISOlat1\r
+    '&Egrave;'   => '&#200;',  # latin capital letter E with grave, U+00C8 ISOlat1\r
+    '&Eacute;'   => '&#201;',  # latin capital letter E with acute, U+00C9 ISOlat1\r
+    '&Ecirc;'    => '&#202;',  # latin capital letter E with circumflex, U+00CA ISOlat1\r
+    '&Euml;'     => '&#203;',  # latin capital letter E with diaeresis, U+00CB ISOlat1\r
+    '&Igrave;'   => '&#204;',  # latin capital letter I with grave, U+00CC ISOlat1\r
+    '&Iacute;'   => '&#205;',  # latin capital letter I with acute, U+00CD ISOlat1\r
+    '&Icirc;'    => '&#206;',  # latin capital letter I with circumflex, U+00CE ISOlat1\r
+    '&Iuml;'     => '&#207;',  # latin capital letter I with diaeresis, U+00CF ISOlat1\r
+    '&ETH;'      => '&#208;',  # latin capital letter ETH, U+00D0 ISOlat1\r
+    '&Ntilde;'   => '&#209;',  # latin capital letter N with tilde, U+00D1 ISOlat1\r
+    '&Ograve;'   => '&#210;',  # latin capital letter O with grave, U+00D2 ISOlat1\r
+    '&Oacute;'   => '&#211;',  # latin capital letter O with acute, U+00D3 ISOlat1\r
+    '&Ocirc;'    => '&#212;',  # latin capital letter O with circumflex, U+00D4 ISOlat1\r
+    '&Otilde;'   => '&#213;',  # latin capital letter O with tilde, U+00D5 ISOlat1\r
+    '&Ouml;'     => '&#214;',  # latin capital letter O with diaeresis, U+00D6 ISOlat1\r
+    '&times;'    => '&#215;',  # multiplication sign, U+00D7 ISOnum\r
+    '&Oslash;'   => '&#216;',  # latin capital letter O with stroke = latin capital letter O slash, U+00D8 ISOlat1\r
+    '&Ugrave;'   => '&#217;',  # latin capital letter U with grave, U+00D9 ISOlat1\r
+    '&Uacute;'   => '&#218;',  # latin capital letter U with acute, U+00DA ISOlat1\r
+    '&Ucirc;'    => '&#219;',  # latin capital letter U with circumflex, U+00DB ISOlat1\r
+    '&Uuml;'     => '&#220;',  # latin capital letter U with diaeresis, U+00DC ISOlat1\r
+    '&Yacute;'   => '&#221;',  # latin capital letter Y with acute, U+00DD ISOlat1\r
+    '&THORN;'    => '&#222;',  # latin capital letter THORN, U+00DE ISOlat1\r
+    '&szlig;'    => '&#223;',  # latin small letter sharp s = ess-zed, U+00DF ISOlat1\r
+    '&agrave;'   => '&#224;',  # latin small letter a with grave = latin small letter a grave, U+00E0 ISOlat1\r
+    '&aacute;'   => '&#225;',  # latin small letter a with acute, U+00E1 ISOlat1\r
+    '&acirc;'    => '&#226;',  # latin small letter a with circumflex, U+00E2 ISOlat1\r
+    '&atilde;'   => '&#227;',  # latin small letter a with tilde, U+00E3 ISOlat1\r
+    '&auml;'     => '&#228;',  # latin small letter a with diaeresis, U+00E4 ISOlat1\r
+    '&aring;'    => '&#229;',  # latin small letter a with ring above = latin small letter a ring, U+00E5 ISOlat1\r
+    '&aelig;'    => '&#230;',  # latin small letter ae = latin small ligature ae, U+00E6 ISOlat1\r
+    '&ccedil;'   => '&#231;',  # latin small letter c with cedilla, U+00E7 ISOlat1\r
+    '&egrave;'   => '&#232;',  # latin small letter e with grave, U+00E8 ISOlat1\r
+    '&eacute;'   => '&#233;',  # latin small letter e with acute, U+00E9 ISOlat1\r
+    '&ecirc;'    => '&#234;',  # latin small letter e with circumflex, U+00EA ISOlat1\r
+    '&euml;'     => '&#235;',  # latin small letter e with diaeresis, U+00EB ISOlat1\r
+    '&igrave;'   => '&#236;',  # latin small letter i with grave, U+00EC ISOlat1\r
+    '&iacute;'   => '&#237;',  # latin small letter i with acute, U+00ED ISOlat1\r
+    '&icirc;'    => '&#238;',  # latin small letter i with circumflex, U+00EE ISOlat1\r
+    '&iuml;'     => '&#239;',  # latin small letter i with diaeresis, U+00EF ISOlat1\r
+    '&eth;'      => '&#240;',  # latin small letter eth, U+00F0 ISOlat1\r
+    '&ntilde;'   => '&#241;',  # latin small letter n with tilde, U+00F1 ISOlat1\r
+    '&ograve;'   => '&#242;',  # latin small letter o with grave, U+00F2 ISOlat1\r
+    '&oacute;'   => '&#243;',  # latin small letter o with acute, U+00F3 ISOlat1\r
+    '&ocirc;'    => '&#244;',  # latin small letter o with circumflex, U+00F4 ISOlat1\r
+    '&otilde;'   => '&#245;',  # latin small letter o with tilde, U+00F5 ISOlat1\r
+    '&ouml;'     => '&#246;',  # latin small letter o with diaeresis, U+00F6 ISOlat1\r
+    '&divide;'   => '&#247;',  # division sign, U+00F7 ISOnum\r
+    '&oslash;'   => '&#248;',  # latin small letter o with stroke, = latin small letter o slash, U+00F8 ISOlat1\r
+    '&ugrave;'   => '&#249;',  # latin small letter u with grave, U+00F9 ISOlat1\r
+    '&uacute;'   => '&#250;',  # latin small letter u with acute, U+00FA ISOlat1\r
+    '&ucirc;'    => '&#251;',  # latin small letter u with circumflex, U+00FB ISOlat1\r
+    '&uuml;'     => '&#252;',  # latin small letter u with diaeresis, U+00FC ISOlat1\r
+    '&yacute;'   => '&#253;',  # latin small letter y with acute, U+00FD ISOlat1\r
+    '&thorn;'    => '&#254;',  # latin small letter thorn, U+00FE ISOlat1\r
+    '&yuml;'     => '&#255;',  # latin small letter y with diaeresis, U+00FF ISOlat1\r
+    '&fnof;'     => '&#402;',  # latin small f with hook = function = florin, U+0192 ISOtech\r
+    '&Alpha;'    => '&#913;',  # greek capital letter alpha, U+0391\r
+    '&Beta;'     => '&#914;',  # greek capital letter beta, U+0392\r
+    '&Gamma;'    => '&#915;',  # greek capital letter gamma, U+0393 ISOgrk3\r
+    '&Delta;'    => '&#916;',  # greek capital letter delta, U+0394 ISOgrk3\r
+    '&Epsilon;'  => '&#917;',  # greek capital letter epsilon, U+0395\r
+    '&Zeta;'     => '&#918;',  # greek capital letter zeta, U+0396\r
+    '&Eta;'      => '&#919;',  # greek capital letter eta, U+0397\r
+    '&Theta;'    => '&#920;',  # greek capital letter theta, U+0398 ISOgrk3\r
+    '&Iota;'     => '&#921;',  # greek capital letter iota, U+0399\r
+    '&Kappa;'    => '&#922;',  # greek capital letter kappa, U+039A\r
+    '&Lambda;'   => '&#923;',  # greek capital letter lambda, U+039B ISOgrk3\r
+    '&Mu;'       => '&#924;',  # greek capital letter mu, U+039C\r
+    '&Nu;'       => '&#925;',  # greek capital letter nu, U+039D\r
+    '&Xi;'       => '&#926;',  # greek capital letter xi, U+039E ISOgrk3\r
+    '&Omicron;'  => '&#927;',  # greek capital letter omicron, U+039F\r
+    '&Pi;'       => '&#928;',  # greek capital letter pi, U+03A0 ISOgrk3\r
+    '&Rho;'      => '&#929;',  # greek capital letter rho, U+03A1\r
+    '&Sigma;'    => '&#931;',  # greek capital letter sigma, U+03A3 ISOgrk3\r
+    '&Tau;'      => '&#932;',  # greek capital letter tau, U+03A4\r
+    '&Upsilon;'  => '&#933;',  # greek capital letter upsilon, U+03A5 ISOgrk3\r
+    '&Phi;'      => '&#934;',  # greek capital letter phi, U+03A6 ISOgrk3\r
+    '&Chi;'      => '&#935;',  # greek capital letter chi, U+03A7\r
+    '&Psi;'      => '&#936;',  # greek capital letter psi, U+03A8 ISOgrk3\r
+    '&Omega;'    => '&#937;',  # greek capital letter omega, U+03A9 ISOgrk3\r
+    '&alpha;'    => '&#945;',  # greek small letter alpha, U+03B1 ISOgrk3\r
+    '&beta;'     => '&#946;',  # greek small letter beta, U+03B2 ISOgrk3\r
+    '&gamma;'    => '&#947;',  # greek small letter gamma, U+03B3 ISOgrk3\r
+    '&delta;'    => '&#948;',  # greek small letter delta, U+03B4 ISOgrk3\r
+    '&epsilon;'  => '&#949;',  # greek small letter epsilon, U+03B5 ISOgrk3\r
+    '&zeta;'     => '&#950;',  # greek small letter zeta, U+03B6 ISOgrk3\r
+    '&eta;'      => '&#951;',  # greek small letter eta, U+03B7 ISOgrk3\r
+    '&theta;'    => '&#952;',  # greek small letter theta, U+03B8 ISOgrk3\r
+    '&iota;'     => '&#953;',  # greek small letter iota, U+03B9 ISOgrk3\r
+    '&kappa;'    => '&#954;',  # greek small letter kappa, U+03BA ISOgrk3\r
+    '&lambda;'   => '&#955;',  # greek small letter lambda, U+03BB ISOgrk3\r
+    '&mu;'       => '&#956;',  # greek small letter mu, U+03BC ISOgrk3\r
+    '&nu;'       => '&#957;',  # greek small letter nu, U+03BD ISOgrk3\r
+    '&xi;'       => '&#958;',  # greek small letter xi, U+03BE ISOgrk3\r
+    '&omicron;'  => '&#959;',  # greek small letter omicron, U+03BF NEW\r
+    '&pi;'       => '&#960;',  # greek small letter pi, U+03C0 ISOgrk3\r
+    '&rho;'      => '&#961;',  # greek small letter rho, U+03C1 ISOgrk3\r
+    '&sigmaf;'   => '&#962;',  # greek small letter final sigma, U+03C2 ISOgrk3\r
+    '&sigma;'    => '&#963;',  # greek small letter sigma, U+03C3 ISOgrk3\r
+    '&tau;'      => '&#964;',  # greek small letter tau, U+03C4 ISOgrk3\r
+    '&upsilon;'  => '&#965;',  # greek small letter upsilon, U+03C5 ISOgrk3\r
+    '&phi;'      => '&#966;',  # greek small letter phi, U+03C6 ISOgrk3\r
+    '&chi;'      => '&#967;',  # greek small letter chi, U+03C7 ISOgrk3\r
+    '&psi;'      => '&#968;',  # greek small letter psi, U+03C8 ISOgrk3\r
+    '&omega;'    => '&#969;',  # greek small letter omega, U+03C9 ISOgrk3\r
+    '&thetasym;' => '&#977;',  # greek small letter theta symbol, U+03D1 NEW\r
+    '&upsih;'    => '&#978;',  # greek upsilon with hook symbol, U+03D2 NEW\r
+    '&piv;'      => '&#982;',  # greek pi symbol, U+03D6 ISOgrk3\r
+    '&bull;'     => '&#8226;', # bullet = black small circle, U+2022 ISOpub\r
+    '&hellip;'   => '&#8230;', # horizontal ellipsis = three dot leader, U+2026 ISOpub\r
+    '&prime;'    => '&#8242;', # prime = minutes = feet, U+2032 ISOtech\r
+    '&Prime;'    => '&#8243;', # double prime = seconds = inches, U+2033 ISOtech\r
+    '&oline;'    => '&#8254;', # overline = spacing overscore, U+203E NEW\r
+    '&frasl;'    => '&#8260;', # fraction slash, U+2044 NEW\r
+    '&weierp;'   => '&#8472;', # script capital P = power set = Weierstrass p, U+2118 ISOamso\r
+    '&image;'    => '&#8465;', # blackletter capital I = imaginary part, U+2111 ISOamso\r
+    '&real;'     => '&#8476;', # blackletter capital R = real part symbol, U+211C ISOamso\r
+    '&trade;'    => '&#8482;', # trade mark sign, U+2122 ISOnum\r
+    '&alefsym;'  => '&#8501;', # alef symbol = first transfinite cardinal, U+2135 NEW\r
+    '&larr;'     => '&#8592;', # leftwards arrow, U+2190 ISOnum\r
+    '&uarr;'     => '&#8593;', # upwards arrow, U+2191 ISOnum\r
+    '&rarr;'     => '&#8594;', # rightwards arrow, U+2192 ISOnum\r
+    '&darr;'     => '&#8595;', # downwards arrow, U+2193 ISOnum\r
+    '&harr;'     => '&#8596;', # left right arrow, U+2194 ISOamsa\r
+    '&crarr;'    => '&#8629;', # downwards arrow with corner leftwards = carriage return, U+21B5 NEW\r
+    '&lArr;'     => '&#8656;', # leftwards double arrow, U+21D0 ISOtech\r
+    '&uArr;'     => '&#8657;', # upwards double arrow, U+21D1 ISOamsa\r
+    '&rArr;'     => '&#8658;', # rightwards double arrow, U+21D2 ISOtech\r
+    '&dArr;'     => '&#8659;', # downwards double arrow, U+21D3 ISOamsa\r
+    '&hArr;'     => '&#8660;', # left right double arrow, U+21D4 ISOamsa\r
+    '&forall;'   => '&#8704;', # for all, U+2200 ISOtech\r
+    '&part;'     => '&#8706;', # partial differential, U+2202 ISOtech\r
+    '&exist;'    => '&#8707;', # there exists, U+2203 ISOtech\r
+    '&empty;'    => '&#8709;', # empty set = null set = diameter, U+2205 ISOamso\r
+    '&nabla;'    => '&#8711;', # nabla = backward difference, U+2207 ISOtech\r
+    '&isin;'     => '&#8712;', # element of, U+2208 ISOtech\r
+    '&notin;'    => '&#8713;', # not an element of, U+2209 ISOtech\r
+    '&ni;'       => '&#8715;', # contains as member, U+220B ISOtech\r
+    '&prod;'     => '&#8719;', # n-ary product = product sign, U+220F ISOamsb\r
+    '&sum;'      => '&#8721;', # n-ary sumation, U+2211 ISOamsb\r
+    '&minus;'    => '&#8722;', # minus sign, U+2212 ISOtech\r
+    '&lowast;'   => '&#8727;', # asterisk operator, U+2217 ISOtech\r
+    '&radic;'    => '&#8730;', # square root = radical sign, U+221A ISOtech\r
+    '&prop;'     => '&#8733;', # proportional to, U+221D ISOtech\r
+    '&infin;'    => '&#8734;', # infinity, U+221E ISOtech\r
+    '&ang;'      => '&#8736;', # angle, U+2220 ISOamso\r
+    '&and;'      => '&#8743;', # logical and = wedge, U+2227 ISOtech\r
+    '&or;'       => '&#8744;', # logical or = vee, U+2228 ISOtech\r
+    '&cap;'      => '&#8745;', # intersection = cap, U+2229 ISOtech\r
+    '&cup;'      => '&#8746;', # union = cup, U+222A ISOtech\r
+    '&int;'      => '&#8747;', # integral, U+222B ISOtech\r
+    '&there4;'   => '&#8756;', # therefore, U+2234 ISOtech\r
+    '&sim;'      => '&#8764;', # tilde operator = varies with = similar to, U+223C ISOtech\r
+    '&cong;'     => '&#8773;', # approximately equal to, U+2245 ISOtech\r
+    '&asymp;'    => '&#8776;', # almost equal to = asymptotic to, U+2248 ISOamsr\r
+    '&ne;'       => '&#8800;', # not equal to, U+2260 ISOtech\r
+    '&equiv;'    => '&#8801;', # identical to, U+2261 ISOtech\r
+    '&le;'       => '&#8804;', # less-than or equal to, U+2264 ISOtech\r
+    '&ge;'       => '&#8805;', # greater-than or equal to, U+2265 ISOtech\r
+    '&sub;'      => '&#8834;', # subset of, U+2282 ISOtech\r
+    '&sup;'      => '&#8835;', # superset of, U+2283 ISOtech\r
+    '&nsub;'     => '&#8836;', # not a subset of, U+2284 ISOamsn\r
+    '&sube;'     => '&#8838;', # subset of or equal to, U+2286 ISOtech\r
+    '&supe;'     => '&#8839;', # superset of or equal to, U+2287 ISOtech\r
+    '&oplus;'    => '&#8853;', # circled plus = direct sum, U+2295 ISOamsb\r
+    '&otimes;'   => '&#8855;', # circled times = vector product, U+2297 ISOamsb\r
+    '&perp;'     => '&#8869;', # up tack = orthogonal to = perpendicular, U+22A5 ISOtech\r
+    '&sdot;'     => '&#8901;', # dot operator, U+22C5 ISOamsb\r
+    '&lceil;'    => '&#8968;', # left ceiling = apl upstile, U+2308 ISOamsc\r
+    '&rceil;'    => '&#8969;', # right ceiling, U+2309 ISOamsc\r
+    '&lfloor;'   => '&#8970;', # left floor = apl downstile, U+230A ISOamsc\r
+    '&rfloor;'   => '&#8971;', # right floor, U+230B ISOamsc\r
+    '&lang;'     => '&#9001;', # left-pointing angle bracket = bra, U+2329 ISOtech\r
+    '&rang;'     => '&#9002;', # right-pointing angle bracket = ket, U+232A ISOtech\r
+    '&loz;'      => '&#9674;', # lozenge, U+25CA ISOpub\r
+    '&spades;'   => '&#9824;', # black spade suit, U+2660 ISOpub\r
+    '&clubs;'    => '&#9827;', # black club suit = shamrock, U+2663 ISOpub\r
+    '&hearts;'   => '&#9829;', # black heart suit = valentine, U+2665 ISOpub\r
+    '&diams;'    => '&#9830;', # black diamond suit, U+2666 ISOpub\r
+    '&quot;'     => '&#34;',   # quotation mark = APL quote, U+0022 ISOnum\r
+    '&amp;'      => '&#38;',   # ampersand, U+0026 ISOnum\r
+    '&lt;'       => '&#60;',   # less-than sign, U+003C ISOnum\r
+    '&gt;'       => '&#62;',   # greater-than sign, U+003E ISOnum\r
+    '&OElig;'    => '&#338;',  # latin capital ligature OE, U+0152 ISOlat2\r
+    '&oelig;'    => '&#339;',  # latin small ligature oe, U+0153 ISOlat2\r
+    '&Scaron;'   => '&#352;',  # latin capital letter S with caron, U+0160 ISOlat2\r
+    '&scaron;'   => '&#353;',  # latin small letter s with caron, U+0161 ISOlat2\r
+    '&Yuml;'     => '&#376;',  # latin capital letter Y with diaeresis, U+0178 ISOlat2\r
+    '&circ;'     => '&#710;',  # modifier letter circumflex accent, U+02C6 ISOpub\r
+    '&tilde;'    => '&#732;',  # small tilde, U+02DC ISOdia\r
+    '&ensp;'     => '&#8194;', # en space, U+2002 ISOpub\r
+    '&emsp;'     => '&#8195;', # em space, U+2003 ISOpub\r
+    '&thinsp;'   => '&#8201;', # thin space, U+2009 ISOpub\r
+    '&zwnj;'     => '&#8204;', # zero width non-joiner, U+200C NEW RFC 2070\r
+    '&zwj;'      => '&#8205;', # zero width joiner, U+200D NEW RFC 2070\r
+    '&lrm;'      => '&#8206;', # left-to-right mark, U+200E NEW RFC 2070\r
+    '&rlm;'      => '&#8207;', # right-to-left mark, U+200F NEW RFC 2070\r
+    '&ndash;'    => '&#8211;', # en dash, U+2013 ISOpub\r
+    '&mdash;'    => '&#8212;', # em dash, U+2014 ISOpub\r
+    '&lsquo;'    => '&#8216;', # left single quotation mark, U+2018 ISOnum\r
+    '&rsquo;'    => '&#8217;', # right single quotation mark, U+2019 ISOnum\r
+    '&sbquo;'    => '&#8218;', # single low-9 quotation mark, U+201A NEW\r
+    '&ldquo;'    => '&#8220;', # left double quotation mark, U+201C ISOnum\r
+    '&rdquo;'    => '&#8221;', # right double quotation mark, U+201D ISOnum\r
+    '&bdquo;'    => '&#8222;', # double low-9 quotation mark, U+201E NEW\r
+    '&dagger;'   => '&#8224;', # dagger, U+2020 ISOpub\r
+    '&Dagger;'   => '&#8225;', # double dagger, U+2021 ISOpub\r
+    '&permil;'   => '&#8240;', # per mille sign, U+2030 ISOtech\r
+    '&lsaquo;'   => '&#8249;', # single left-pointing angle quotation mark, U+2039 ISO proposed\r
+    '&rsaquo;'   => '&#8250;', # single right-pointing angle quotation mark, U+203A ISO proposed\r
+    '&euro;'     => '&#8364;', # euro sign, U+20AC NEW\r
+);\r
+\r
+\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/liOAuth.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/liOAuth.php
new file mode 100644 (file)
index 0000000..8db7683
--- /dev/null
@@ -0,0 +1,142 @@
+<?php\r
+require_once("OAuth.php");\r
+\r
+class nsx_LinkedIn {\r
+  public $base_url = "http://api.linkedin.com";\r
+  public $secure_base_url = "https://api.linkedin.com";\r
+  public $oauth_callback = "oob";\r
+  public $consumer;\r
+  public $request_token;\r
+  public $access_token;\r
+  public $oauth_verifier;\r
+  public $signature_method;\r
+  public $request_token_path;\r
+  public $access_token_path;\r
+  public $authorize_path;\r
+  public $debug = false;\r
+  public $http_code;\r
+  \r
+  function __construct($consumer_key, $consumer_secret, $oauth_callback = NULL) {\r
+    \r
+    if($oauth_callback) {\r
+      $this->oauth_callback = $oauth_callback;\r
+    }\r
+    \r
+    $this->consumer = new nsx_trOAuthConsumer($consumer_key, $consumer_secret, $this->oauth_callback);\r
+    $this->signature_method = new nsx_trOAuthSignatureMethod_HMAC_SHA1();\r
+    $this->request_token_path = $this->secure_base_url . "/uas/oauth/requestToken?scope=r_basicprofile+r_emailaddress+w_share";\r
+    $this->access_token_path = $this->secure_base_url . "/uas/oauth/accessToken";\r
+    $this->authorize_path = $this->secure_base_url . "/uas/oauth/authorize";\r
+    \r
+  }\r
+\r
+  function getRequestToken() {\r
+    $consumer = $this->consumer;\r
+    $request = nsx_trOAuthRequest::from_consumer_and_token($consumer, NULL, "GET", $this->request_token_path);\r
+    $request->set_parameter("oauth_callback", $this->oauth_callback);\r
+    $request->sign_request($this->signature_method, $consumer, NULL); // prr($request); die();\r
+    $headers = Array();\r
+    $url = $request->to_url(); // echo "^^^^^";  prr($url); \r
+    $response = $this->httpRequest($url, $headers, "GET"); //prr($response); \r
+    if ($response!='') $this->http_code = 200;    \r
+    parse_str($response, $response_params); //prr($response_params); echo "!!!!";\r
+    if (is_array($response_params) && !empty($response_params['oauth_problem'])) return print_r($response, true);\r
+    $this->request_token = new nsx_trOAuthConsumer($response_params['oauth_token'], $response_params['oauth_token_secret'], 1); return $this->request_token;\r
+  }\r
+\r
+  function generateAuthorizeUrl() {\r
+    $consumer = $this->consumer;\r
+    $request_token = $this->request_token;\r
+    return $this->authorize_path . "?oauth_token=" . $request_token->key;\r
+  }\r
+\r
+  function getAccessToken($oauth_verifier) {\r
+    $request = nsx_trOAuthRequest::from_consumer_and_token($this->consumer, $this->request_token, "GET", $this->access_token_path);\r
+    $request->set_parameter("oauth_verifier", $oauth_verifier);\r
+    $request->sign_request($this->signature_method, $this->consumer, $this->request_token);\r
+    $headers = Array();\r
+    $url = $request->to_url(); // echo "==========";\r
+    $response = $this->httpRequest($url, $headers, "GET"); //prr($request);\r
+    parse_str($response, $response_params); // prr($response_params);\r
+    if($debug) {\r
+      echo $response . "\n";\r
+    }\r
+    $this->access_token = new nsx_trOAuthConsumer($response_params['oauth_token'], $response_params['oauth_token_secret'], 1);\r
+  }\r
+  \r
+  function getProfile($resource = "~") {\r
+    $profile_url = $this->base_url . "/v1/people/" . $resource;\r
+    $request = nsx_trOAuthRequest::from_consumer_and_token($this->consumer, $this->access_token, "GET", $profile_url);\r
+    $request->sign_request($this->signature_method, $this->consumer, $this->access_token); // prr($request); prr($profile_url); die();\r
+    $auth_header = $request->to_header("https://api.linkedin.com"); # this is the realm\r
+    # This PHP library doesn't generate the header correctly when a realm is not specified.\r
+    # Make sure there is a space and not a comma after OAuth\r
+    // $auth_header = preg_replace("/Authorization\: OAuth\,/", "Authorization: OAuth ", $auth_header);\r
+    // # Make sure there is a space between OAuth attribute\r
+    // $auth_header = preg_replace('/\"\,/', '", ', $auth_header);\r
+    if ($debug) {\r
+      echo $auth_header;\r
+    }\r
+    // $response will now hold the XML document\r
+    $response = $this->httpRequest($profile_url, $auth_header, "GET");\r
+    return $response;\r
+  }\r
+\r
+  function postShare($msg, $title='', $url='', $imgURL='', $dsc='') { $status_url = $this->base_url . "/v1/people/~/shares";  \r
+    $dsc =  nxs_decodeEntitiesFull(strip_tags($dsc));  $msg = strip_tags(nxs_decodeEntitiesFull($msg));  $title =  nxs_decodeEntitiesFull(strip_tags($title));\r
+    $xml = '<?xml version="1.0" encoding="UTF-8"?><share><comment>'.htmlspecialchars($msg, ENT_NOQUOTES, "UTF-8").'</comment>'.\r
+    ($url!=''?'<content><title>'.htmlspecialchars($title, ENT_NOQUOTES, "UTF-8").'</title><submitted-url>'.$url.'</submitted-url>'.(!empty($imgURL)?'<submitted-image-url>'.$imgURL.'</submitted-image-url>':'').'<description>'.htmlspecialchars($dsc, ENT_NOQUOTES, "UTF-8").'</description></content>':'').\r
+    '<visibility><code>anyone</code></visibility></share>';\r
+    $request = nsx_trOAuthRequest::from_consumer_and_token($this->consumer, $this->access_token, "POST", $status_url);\r
+    $request->sign_request($this->signature_method, $this->consumer, $this->access_token);\r
+    $auth_header = $request->to_header("https://api.linkedin.com");\r
+    //if ($debug) echo $auth_header . "\n"; \r
+    $response = $this->httpRequest($status_url, $auth_header, "POST", $xml); \r
+    return $response;\r
+  }\r
+  \r
+    function setStatus($status) {\r
+    $status_url = $this->base_url . "/v1/people/~/current-status";\r
+    //echo "Setting status...\n";\r
+    $xml = "<current-status>" . htmlspecialchars($status, ENT_NOQUOTES, "UTF-8") . "</current-status>";\r
+    //echo $xml . "\n";\r
+    $request = nsx_trOAuthRequest::from_consumer_and_token($this->consumer, $this->access_token, "PUT", $status_url);\r
+    $request->sign_request($this->signature_method, $this->consumer, $this->access_token);\r
+    $auth_header = $request->to_header("https://api.linkedin.com");\r
+    if ($debug) {\r
+      echo $auth_header . "\n";\r
+    }\r
+    $response = $this->httpRequest($status_url, $auth_header, "PUT", $xml); // prr($response);\r
+    return $response;\r
+  }\r
+   \r
+  \r
+  function httpRequest($url, $auth_header, $method, $body = NULL) { // $this->debug = true; //if (!is_array($auth_header)) $auth_header = array($auth_header);\r
+    if (!is_array($auth_header)) $auth_header = array($auth_header); \r
+    if (!$method) $method = "GET"; $curl = curl_init();\r
+    curl_setopt($curl, CURLOPT_URL, $url);\r
+    curl_setopt($curl, CURLOPT_HEADER, 0);\r
+    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r
+    curl_setopt($curl, CURLOPT_HTTPHEADER, $auth_header); // Set the headers.\r
+\r
+    if ($body) { $auth_header[] = "Content-Type: text/xml;charset=utf-8";\r
+      curl_setopt($curl, CURLOPT_POST, 1);\r
+      curl_setopt($curl, CURLOPT_POSTFIELDS, $body);\r
+      curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);\r
+      curl_setopt($curl, CURLOPT_HTTPHEADER, $auth_header);   \r
+    }\r
+    global $nxs_skipSSLCheck; if ($nxs_skipSSLCheck===true) curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\r
+    $data = curl_exec($curl); $errmsg = curl_error($curl); //prr($data);// die();\r
+    \r
+    //## NextScripts Fix\r
+    if (curl_errno($curl) == 60 || stripos($errmsg, 'SSL')!==false) {  curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); $data = curl_exec($curl);}\r
+    if (curl_errno($curl) > 0) { $err = curl_errno($curl); $errmsg = curl_error($curl); prr($errmsg); prr($err);}    \r
+    //## /NextScripts Fix    \r
+    $header = curl_getinfo($curl); curl_close($curl);// prr($header);\r
+\r
+    if ($this->debug) echo $data . "\n";    \r
+        if (trim($data)=='' && ($header['http_code']=='201' || $header['http_code']=='200' || $header['http_code']=='202')) $data = '201';\r
+    return $data; \r
+  }\r
+\r
+}
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/plurkOAuth.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/plurkOAuth.php
new file mode 100644 (file)
index 0000000..5a5b475
--- /dev/null
@@ -0,0 +1,204 @@
+<?php\r
+\r
+define('PLURK_ACCESS_TOKEN_PATH', "/OAuth/access_token");\r
+define('PLURK_AUTHORIZE_PATH', "/OAuth/authorize");\r
+define('PLURK_REQUEST_TOKEN_PATH', "/OAuth/request_token");\r
+\r
+abstract class nxspk_SignatureMethod\r
+{\r
+    abstract public function signing_base($request, $consumer, $token);\r
+    abstract public function sign($request, $consumer, $token);\r
+    public function check($request, $consumer, $token, $signature) {\r
+    $built = $this->sign($request, $consumer, $token);\r
+    return $built == $signature;\r
+    }\r
+}\r
+\r
+class nxspk_SigMethod_HMAC_SHA1 extends nxspk_SignatureMethod {\r
+    public $name = 'HMAC-SHA1';\r
+    public function signing_base($request, $consumer_secret, $token) {\r
+      $sig = array(rawurlencode($request['method']), rawurlencode($request['normalized_url']), rawurlencode($request['normalized_parameters']));\r
+      $key = sprintf("%s&", rawurlencode($consumer_secret));\r
+      if (isset($token)) $key .= rawurlencode($token->secret);\r
+      $raw = implode('&', $sig);\r
+      return array ($key, $raw);\r
+    }\r
+    public function sign($request, $consumer_secret, $token) {\r
+      $key_raw = $this->signing_base($request, $consumer_secret, $token);// prr($key_raw);\r
+      $basestring = base64_encode (hash_hmac('sha1', $key_raw[1], $key_raw[0], true)); //echo $basestring;\r
+      return rawurlencode($basestring);\r
+    }\r
+    \r
+    public static function urlencode_rfc3986($input) {\r
+      if (is_array($input)) {\r
+        return array_map(array('nxspk_SigMethod_HMAC_SHA1', 'urlencode_rfc3986'), $input);\r
+      } else if (is_scalar($input)) {\r
+        return str_replace(\r
+          '+',\r
+          ' ',\r
+          str_replace('%7E', '~', rawurlencode($input))\r
+        );\r
+      } else {\r
+        return '';\r
+      }\r
+    }\r
+    public function get_normalized_http_url($url) {\r
+      $parts = parse_url($url);\r
+\r
+      $port = @$parts['port'];\r
+      $scheme = $parts['scheme'];\r
+      $host = $parts['host'];\r
+      $path = @$parts['path'];\r
+\r
+      $port or $port = ($scheme == 'https') ? '443' : '80';\r
+\r
+      if (($scheme == 'https' && $port != '443')|| ($scheme == 'http' && $port != '80')) {\r
+        $host = "$host:$port";\r
+      }\r
+      return "$scheme://$host$path";\r
+    }\r
+    public function get_signature_base_string($url, $params) {\r
+      $parts = array( 'GET', $this->get_normalized_http_url($url), $params); //prr($parts);\r
+      $parts = $this->urlencode_rfc3986($parts);\r
+      return implode('&', $parts);\r
+    }\r
+    \r
+    public function sign2($request, $consumer_secret, $token){\r
+      \r
+      $base_string = $this->get_signature_base_string($request['normalized_url'], $request['normalized_parameters']);\r
+      //$request->base_string = $base_string;\r
+      \r
+      //$key_parts = array( $consumer_secret);  if ($token) $key_parts[] = $token->secret;\r
+      $key_parts = array( $consumer_secret, ($token) ? $token : "");\r
+      \r
+      //$key_parts = array( $consumer_secret,  "");\r
+      \r
+      $key_parts = $this->urlencode_rfc3986($key_parts);\r
+      $key = implode('&', $key_parts); //prr($key); prr($base_string);\r
+      return rawurlencode(base64_encode(hash_hmac('sha1', $base_string, $key, true)));\r
+    }\r
+    \r
+    \r
+    public function check($request, $consumer_secret, $token, $signature) {\r
+      $built = $this->sign($request, $consumer_secret, $token);\r
+      return $built == $signature;\r
+    }\r
+}\r
+\r
+class wpPlurkOAuth{\r
+    public $baseURL = 'http://www.plurk.com';\r
+    public $http_code;\r
+    protected $version = '1.0';\r
+    protected $sign_method;\r
+    protected $request_token;\r
+    protected $access_token;\r
+    protected $access_secret;\r
+    protected $consumer_key; \r
+    protected $consumer_secret;    \r
+    \r
+    function __construct($consumer_key, $consumer_secret, $access_token = NULL, $access_secret = NULL) {      \r
+       $this->sign_method = new nxspk_SigMethod_HMAC_SHA1();      \r
+       $this->consumer_key = $consumer_key; $this->consumer_secret = $consumer_secret;\r
+       $this->access_token = $access_token; $this->access_secret = $access_secret;\r
+      // if (!empty($access_token) && !empty($access_secret))  $this->authorize($access_token, $access_secret);\r
+    }\r
+    \r
+    function get_normalized_parameters($params) { $items = array();\r
+      foreach ($params as $key => $value) {\r
+        if ($key == 'oauth_signature') continue;\r
+        if (is_array($value))  $mtems = array_merge($value, $items); else  $items[$key] = $value;\r
+      }\r
+      ksort($items);\r
+      $item_parts = array();\r
+      foreach ($items as $key => $value) {\r
+        $item_parts[] =\r
+        sprintf("%s=%s",rawurlencode($key),rawurlencode($value));\r
+      }\r
+      return implode('&', $item_parts);\r
+    }\r
+    function genRndString($length = 8) { $chars = '0123456789abcdefghijklmnopqrstuvwxyz';  $string = '';\r
+      for ($p = 0; $p < $length; $p++)  $string .= $chars[mt_rand(0, strlen($chars)-1)];\r
+      return $string;\r
+    }\r
+    function makeHTTPHeaders($ref, $post=false){ $hdrsArr = array(); \r
+      $hdrsArr['X-Requested-With']='XMLHttpRequest'; $hdrsArr['Connection']='keep-alive'; $hdrsArr['Referer']=$ref;\r
+      $hdrsArr['User-Agent']='Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.22 Safari/537.11';\r
+      if($post) $hdrsArr['Content-Type']='application/x-www-form-urlencoded'; \r
+      $hdrsArr['Accept']='application/json, text/javascript, */*; q=0.01'; \r
+      $hdrsArr['Accept-Encoding']='gzip,deflate,sdch'; $hdrsArr['Accept-Language']='en-US,en;q=0.8'; $hdrsArr['Accept-Charset']='ISO-8859-1,utf-8;q=0.7,*;q=0.3'; return $hdrsArr;\r
+    }\r
+    \r
+    function oAuthRespToArr($str){ $arr = explode('&', $str); $out = array();\r
+      foreach ($arr as $ar) { $strr = explode('=', $ar); $out[$strr[0]] = $strr[1];} return $out;\r
+    }\r
+    \r
+    function getReqToken($cbu){      \r
+      $args = array (\r
+        'oauth_consumer_key' => $this->consumer_key,\r
+        'oauth_timestamp' => time(),\r
+        'oauth_nonce' => $this->genRndString(),\r
+        'oauth_version' => $this->version,\r
+        'oauth_callback' => $cbu,\r
+        'oauth_signature_method' => 'HMAC-SHA1'\r
+        \r
+      );      \r
+      $req = array();  $req['method'] = 'GET';  \r
+      $req['normalized_url'] = $this->baseURL.PLURK_REQUEST_TOKEN_PATH; \r
+      $req['normalized_parameters'] = $this->get_normalized_parameters($args);\r
+      $args['oauth_signature'] = $this->sign_method->sign2($req, $this->consumer_secret, $token);      \r
+      $cbu = nxspk_SigMethod_HMAC_SHA1::urlencode_rfc3986($cbu);  \r
+      $url = $this->baseURL.PLURK_REQUEST_TOKEN_PATH.'?oauth_nonce='.$args['oauth_nonce'].'&oauth_timestamp='.$args['oauth_timestamp'].'&oauth_consumer_key='.$this->consumer_key.'&oauth_signature_method='.$args['oauth_signature_method'].'&oauth_version='.$args['oauth_version'].'&oauth_callback='.$cbu.'&oauth_signature='.$args['oauth_signature'];      \r
+      echo "<br/>REQ Token URL: ".$url."<br/>";\r
+      $hdrsArr = $this->makeHTTPHeaders($url); $ckArr = $nxs_vbCkArray;   \r
+      $response = wp_remote_get($url, array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr, 'cookies' => $ckArr));  \r
+      if (is_nxs_error($response)){ $badOut = print_r($response, true)." - Connection ERROR"; return $badOut; }\r
+      $this->http_code = $response['response']['code']; //  prr($response);\r
+      if (stripos($response['body'],'oauth_token_secret=')===false) echo 'Bad oAuth Login:'.$response['body']; else return $this->oAuthRespToArr($response['body']);\r
+    }\r
+    function getAccToken($verifier){\r
+      $args = array (\r
+        'oauth_token' => $this->access_token,\r
+        'oauth_token_secret' => $this->access_secret,\r
+        'oauth_timestamp' => time(),\r
+        'oauth_nonce' => $this->genRndString(),\r
+        'oauth_version' => $this->version,\r
+        'oauth_consumer_key' => $this->consumer_key,\r
+        'oauth_verifier' => $verifier,\r
+        'oauth_signature_method' => 'HMAC-SHA1'        \r
+      );      \r
+      $req = array();  $req['method'] = 'GET';  $req['normalized_url'] = $this->baseURL.PLURK_ACCESS_TOKEN_PATH; // echo "ARGS:"; prr($args); \r
+      $req['normalized_parameters'] = $this->get_normalized_parameters($args);\r
+      $args['oauth_signature'] = $this->sign_method->sign2($req, $this->consumer_secret, $this->access_secret); \r
+      $url = $this->baseURL.PLURK_ACCESS_TOKEN_PATH.'?oauth_nonce='.$args['oauth_nonce'].'&oauth_timestamp='.$args['oauth_timestamp'].'&oauth_token_secret='.$this->access_secret.'&oauth_signature_method='.$args['oauth_signature_method'].'&oauth_consumer_key='.$this->consumer_key.'&oauth_verifier='.$verifier.'&oauth_version='.$args['oauth_version'].'&oauth_token='.$this->access_token.'&oauth_signature='.$args['oauth_signature'];\r
+      echo "<br/>REQ Token URL: ".$url."<br/>";\r
+      $hdrsArr = $this->makeHTTPHeaders($url); $ckArr = $nxs_vbCkArray;   \r
+      $response = wp_remote_get($url, array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr, 'cookies' => $ckArr));  \r
+      if ( is_wp_error($response) ) return $response;\r
+      $this->http_code = $response['response']['code']; \r
+      if (stripos($response['body'],'oauth_token_secret=')===false) echo 'Bad oAuth Login:'.$response['body']; else return $this->oAuthRespToArr($response['body']);        \r
+    }\r
+    function makeReq($url, $params){\r
+      $args = array (\r
+        'oauth_token' => $this->access_token,\r
+        'oauth_token_secret' => $this->access_secret,\r
+        'oauth_consumer_key' => $this->consumer_key,        \r
+        'oauth_timestamp' => time(),\r
+        'oauth_nonce' => $this->genRndString(),\r
+        'oauth_version' => $this->version,        \r
+        'oauth_signature_method' => 'HMAC-SHA1'        \r
+      );      \r
+      if (is_array($params)) { $argsTS = array_merge($args, $params);} else $argsTS = $args;\r
+      $req = array();  $req['method'] = 'GET';  $req['normalized_url'] = $url; \r
+      $req['normalized_parameters'] = $this->get_normalized_parameters($argsTS);\r
+      $args['oauth_signature'] = $this->sign_method->sign2($req, $this->consumer_secret, $this->access_secret); \r
+      if (is_array($params)) { $params = nxspk_SigMethod_HMAC_SHA1::urlencode_rfc3986($params);   $args = array_merge($args, $params);} //prr($args);\r
+      $argsStr = ''; $argsT = array(); foreach ($args as $arN=>$arV){$argsT[] = $arN.'='.$arV;} $argsStr = implode('&', $argsT); $url .= '?'.$argsStr;\r
+      $hdrsArr = $this->makeHTTPHeaders($url);  $ckArr = '';  \r
+      $response = wp_remote_get($url, array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr, 'cookies' => $ckArr)); //  prr($response);\r
+      if ( is_wp_error($response) ) return $response;\r
+      $this->http_code = $response['response']['code']; \r
+      return json_decode($response['body'], true);   \r
+    }\r
+    \r
+}\r
+?>\r
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/scOAuth.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/scOAuth.php
new file mode 100644 (file)
index 0000000..b2b8769
--- /dev/null
@@ -0,0 +1,242 @@
+<?php\r
+\r
+abstract class nxssc_SignatureMethod\r
+{\r
+    abstract public function signing_base($request, $consumer, $token);\r
+    abstract public function sign($request, $consumer, $token);\r
+    public function check($request, $consumer, $token, $signature) {\r
+    $built = $this->sign($request, $consumer, $token);\r
+    return $built == $signature;\r
+    }\r
+}\r
+\r
+class nxssc_SigMethod_HMAC_SHA1 extends nxssc_SignatureMethod {\r
+    public $name = 'HMAC-SHA1';\r
+    public function signing_base($request, $consumer_secret, $token) {\r
+      $sig = array(rawurlencode($request['method']), rawurlencode($request['normalized_url']), rawurlencode($request['normalized_parameters']));\r
+      $key = sprintf("%s&", rawurlencode($consumer_secret));\r
+      if (isset($token)) $key .= rawurlencode($token->secret);\r
+      $raw = implode('&', $sig);\r
+      return array ($key, $raw);\r
+    }\r
+    public function sign($request, $consumer_secret, $token) {\r
+      $key_raw = $this->signing_base($request, $consumer_secret, $token);// prr($key_raw);\r
+      $basestring = base64_encode (hash_hmac('sha1', $key_raw[1], $key_raw[0], true)); //echo $basestring;\r
+      return rawurlencode($basestring);\r
+    }\r
+    \r
+    public static function urlencode_rfc3986($input) {\r
+      if (is_array($input)) {\r
+        return array_map(array('nxssc_SigMethod_HMAC_SHA1', 'urlencode_rfc3986'), $input);\r
+      } else if (is_scalar($input)) {\r
+        return str_replace(\r
+          '+',\r
+          ' ',\r
+          str_replace('%7E', '~', rawurlencode($input))\r
+        );\r
+      } else {\r
+        return '';\r
+      }\r
+    }\r
+    public function get_normalized_http_url($url) {\r
+      $parts = parse_url($url);\r
+\r
+      $port = @$parts['port'];\r
+      $scheme = $parts['scheme'];\r
+      $host = $parts['host'];\r
+      $path = @$parts['path'];\r
+\r
+      $port or $port = ($scheme == 'https') ? '443' : '80';\r
+\r
+      if (($scheme == 'https' && $port != '443')|| ($scheme == 'http' && $port != '80')) {\r
+        $host = "$host:$port";\r
+      }\r
+      return "$scheme://$host$path";\r
+    }\r
+    public function get_signature_base_string($url, $params, $method = 'GET') {\r
+      $parts = array( $method, $this->get_normalized_http_url($url), $params); //prr($parts);\r
+      $parts = $this->urlencode_rfc3986($parts);\r
+      return implode('&', $parts);\r
+    }\r
+    \r
+    public function sign2($request, $consumer_secret, $token){\r
+      \r
+      $base_string = $this->get_signature_base_string($request['normalized_url'], $request['normalized_parameters'],  $request['method']);\r
+      //$request->base_string = $base_string;\r
+      \r
+      //$key_parts = array( $consumer_secret);  if ($token) $key_parts[] = $token->secret;\r
+      $key_parts = array( $consumer_secret, ($token) ? $token : "");\r
+      \r
+      //$key_parts = array( $consumer_secret,  "");\r
+      \r
+      $key_parts = $this->urlencode_rfc3986($key_parts);\r
+      $key = implode('&', $key_parts); //prr($key); prr($base_string);\r
+      return rawurlencode(base64_encode(hash_hmac('sha1', $base_string, $key, true)));\r
+    }\r
+    \r
+    \r
+    public function check($request, $consumer_secret, $token, $signature) {\r
+      $built = $this->sign($request, $consumer_secret, $token);\r
+      return $built == $signature;\r
+    }\r
+}\r
+\r
+class wpScoopITOAuth{\r
+    public $baseURL = 'http://www.scoop.it';\r
+    public $request_token_path = '/oauth/request';\r
+    public $access_token_path = '/oauth/access';\r
+    public $http_code;\r
+    protected $version = '1.0';\r
+    protected $sign_method;\r
+    protected $request_token;\r
+    protected $access_token;\r
+    protected $access_secret;\r
+    protected $consumer_key; \r
+    protected $consumer_secret;    \r
+    \r
+    function __construct($consumer_key, $consumer_secret, $access_token = NULL, $access_secret = NULL) {      \r
+       $this->sign_method = new nxssc_SigMethod_HMAC_SHA1();      \r
+       $this->consumer_key = $consumer_key; $this->consumer_secret = $consumer_secret;\r
+       $this->access_token = $access_token; $this->access_secret = $access_secret;\r
+      // if (!empty($access_token) && !empty($access_secret))  $this->authorize($access_token, $access_secret);\r
+    }\r
+    \r
+    function get_normalized_parameters($params) { $items = array();\r
+      foreach ($params as $key => $value) {\r
+        if ($key == 'oauth_signature') continue;\r
+        if (is_array($value))  $mtems = array_merge($value, $items); else  $items[$key] = $value;\r
+      }\r
+      ksort($items);\r
+      $item_parts = array();\r
+      foreach ($items as $key => $value) {\r
+        $item_parts[] =\r
+        sprintf("%s=%s",rawurlencode($key),rawurlencode($value));\r
+      }\r
+      return implode('&', $item_parts);\r
+    }\r
+    function genRndString($length = 8) { $chars = '0123456789abcdefghijklmnopqrstuvwxyzz';  $string = '';\r
+      for ($p = 0; $p < $length; $p++)  $string .= $chars[mt_rand(0, strlen($chars)-1)];\r
+      return $string;\r
+    }\r
+    function makeHTTPHeaders($ref, $post=false){ $hdrsArr = array(); \r
+      $hdrsArr['X-Requested-With']='XMLHttpRequest'; $hdrsArr['Connection']='keep-alive'; $hdrsArr['Referer']=$ref;\r
+      $hdrsArr['User-Agent']='Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.22 Safari/537.11';\r
+      if($post) $hdrsArr['Content-Type']='application/x-www-form-urlencoded'; \r
+      $hdrsArr['Accept']='application/json, text/javascript, */*; q=0.01'; \r
+      $hdrsArr['Accept-Encoding']='gzip,deflate,sdch'; $hdrsArr['Accept-Language']='en-US,en;q=0.8'; $hdrsArr['Accept-Charset']='ISO-8859-1,utf-8;q=0.7,*;q=0.3'; return $hdrsArr;\r
+    }\r
+    \r
+    function oAuthRespToArr($str){ $arr = explode('&', $str); $out = array();\r
+      foreach ($arr as $ar) { $strr = explode('=', $ar); $out[$strr[0]] = $strr[1];} return $out;\r
+    }\r
+    \r
+    function getReqToken($cbu){      \r
+      $args = array (\r
+        'oauth_consumer_key' => $this->consumer_key,\r
+        'oauth_timestamp' => time(),\r
+        'oauth_nonce' => $this->genRndString(),\r
+        'oauth_version' => $this->version,\r
+        'oauth_callback' => $cbu,\r
+        'oauth_signature_method' => 'HMAC-SHA1'\r
+        \r
+      );      \r
+      $req = array();  $req['method'] = 'GET';  $token = '';\r
+      $req['normalized_url'] = $this->baseURL.$this->request_token_path; \r
+      $req['normalized_parameters'] = $this->get_normalized_parameters($args);\r
+      $args['oauth_signature'] = $this->sign_method->sign2($req, $this->consumer_secret, $token);      \r
+      $cbu = nxssc_SigMethod_HMAC_SHA1::urlencode_rfc3986($cbu);  \r
+      $url = $this->baseURL.$this->request_token_path.'?oauth_nonce='.$args['oauth_nonce'].'&oauth_timestamp='.$args['oauth_timestamp'].'&oauth_consumer_key='.$this->consumer_key.'&oauth_signature_method='.$args['oauth_signature_method'].'&oauth_version='.$args['oauth_version'].'&oauth_callback='.$cbu.'&oauth_signature='.$args['oauth_signature'];      \r
+      echo "<br/>REQ Token URL: ".$url."<br/>";\r
+      $hdrsArr = $this->makeHTTPHeaders($url); $ckArr = '';   \r
+      $response = wp_remote_get($url, array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr, 'cookies' => $ckArr));  \r
+      if ( is_wp_error($response) ) return print_r($response, true);\r
+      $this->http_code = $response['response']['code']; //  prr($response);\r
+      if (stripos($response['body'],'oauth_token_secret=')===false) echo 'Bad oAuth Login:'.$response['body']; else return $this->oAuthRespToArr($response['body']);\r
+    }\r
+    function getAccToken($verifier){\r
+      $args = array (\r
+        'oauth_token' => $this->access_token,\r
+        'oauth_token_secret' => $this->access_secret,\r
+        'oauth_timestamp' => time(),\r
+        'oauth_nonce' => $this->genRndString(),\r
+        'oauth_version' => $this->version,\r
+        'oauth_consumer_key' => $this->consumer_key,\r
+        'oauth_verifier' => $verifier,\r
+        'oauth_signature_method' => 'HMAC-SHA1'        \r
+      );      \r
+      $req = array();  $req['method'] = 'GET';  $req['normalized_url'] = $this->baseURL.$this->access_token_path; // echo "ARGS:"; prr($args); \r
+      $req['normalized_parameters'] = $this->get_normalized_parameters($args);\r
+      $args['oauth_signature'] = $this->sign_method->sign2($req, $this->consumer_secret, $this->access_secret); \r
+      $url = $this->baseURL.$this->access_token_path.'?oauth_nonce='.$args['oauth_nonce'].'&oauth_timestamp='.$args['oauth_timestamp'].'&oauth_token_secret='.$this->access_secret.'&oauth_signature_method='.$args['oauth_signature_method'].'&oauth_consumer_key='.$this->consumer_key.'&oauth_verifier='.$verifier.'&oauth_version='.$args['oauth_version'].'&oauth_token='.$this->access_token.'&oauth_signature='.$args['oauth_signature'];\r
+      echo "<br/>REQ Token URL: ".$url."<br/>";\r
+      $hdrsArr = $this->makeHTTPHeaders($url); $ckArr = '';   \r
+      $response = wp_remote_get($url, array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr, 'cookies' => $ckArr));  \r
+      if ( is_wp_error($response) ) return $response;\r
+      $this->http_code = $response['response']['code']; \r
+      if (stripos($response['body'],'oauth_token_secret=')===false) echo 'Bad oAuth Login:'.$response['body']; else return $this->oAuthRespToArr($response['body']);        \r
+    }\r
+    \r
+    public function to_header($params, $realm=null) { $first = true; prr($params);\r
+      if($realm) { $out = 'OAuth realm="' . nxssc_SigMethod_HMAC_SHA1::urlencode_rfc3986($realm) . '"'; $first = false; } else $out = 'OAuth'; $total = array();\r
+      foreach ($params as $k => $v) {\r
+        if (substr($k, 0, 5) != "oauth") continue; \r
+        $out .= ($first) ? ' ' : ', '."\r"; $out .= nxssc_SigMethod_HMAC_SHA1::urlencode_rfc3986($k) . '="' . nxssc_SigMethod_HMAC_SHA1::urlencode_rfc3986($v) . '"';\r
+        $first = false;\r
+      } prr($out); return $out;\r
+    }\r
+    \r
+    function makeReq($url, $params='', $type='GET'){\r
+      $args = array (\r
+        'oauth_token' => $this->access_token,\r
+        'oauth_consumer_key' => $this->consumer_key,        \r
+        'oauth_timestamp' => time(),        \r
+        'oauth_nonce' => $this->genRndString(),\r
+        'oauth_version' => $this->version,        \r
+        'oauth_signature_method' => 'HMAC-SHA1'        \r
+      );      \r
+      if (is_array($params)) { $argsTS = array_merge($args, $params);} else $argsTS = $args;\r
+      $req = array();  $req['method'] = $type;  $req['normalized_url'] = $url; \r
+      // if (!empty($argsTS['photo'])) unset($argsTS['photo']);\r
+      $req['normalized_parameters'] = $this->get_normalized_parameters($argsTS); // prr($req);\r
+      $args['oauth_signature'] = $this->sign_method->sign2($req, $this->consumer_secret, $this->access_secret); \r
+      if (is_array($params)) { if (isset($params['tag']) && is_array($params['tag']) ) { $tags = $params['tag']; unset($params['tag']); $argsAddStr = '';  foreach ($tags as $tg) $argsAddStr .= '&tag='.urlencode($tg); }\r
+          $params = nxssc_SigMethod_HMAC_SHA1::urlencode_rfc3986($params);   $args = array_merge($args, $params);\r
+      } $argsStr = ''; $argsT = array(); uksort($args, 'strcmp'); foreach ($args as $arN=>$arV){$argsT[] = $arN.'='.$arV;} $argsStr = implode('&', $argsT); \r
+      if ( $type=='GET') {  $url .= '?'.$argsStr;  $hdrsArr = $this->makeHTTPHeaders($url);  $ckArr = ''; // prr($url);\r
+          $response = wp_remote_get($url, array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr)); //prr($response);\r
+      } else { $hdrsArr = $this->makeHTTPHeaders($url, true); if (!empty($argsAddStr)) $argsStr .= $argsAddStr; //prr($url);  prr($hdrsArr); prr($argsStr);  prr($argsT);\r
+          $response = wp_remote_post($url, array( 'timeout' => 45, 'redirection' => 0, 'body'=>$argsStr,  'headers' => $hdrsArr)); //prr($argsStr); prr($argsT);   prr($response);\r
+      }\r
+      if ( is_wp_error($response) ) return $response;\r
+      $this->http_code = $response['response']['code']; $body = $response['body']; $body = maybe_unserialize($body); if (is_array($body)) return $body; else  return json_decode($body, true);   \r
+    }\r
+    \r
+    private function joinParameters($parameters){ $keys = array_keys($parameters); sort($keys, SORT_STRING); $keyValuePairs = array();\r
+        foreach ($keys as $k) array_push($keyValuePairs, rawurlencode($k) . "=" . rawurlencode($parameters[$k])); return implode("&", $keyValuePairs);\r
+    }\r
+    private function sign($url, &$parameters) { $string = implode("&", array( 'POST', rawurlencode($url), rawurlencode($this->joinParameters($parameters))));            \r
+        $parameters['oauth_signature'] = base64_encode(hash_hmac('sha1', $string, $this->consumer_secret.'&'.$this->access_secret, true));\r
+    }\r
+    private function httpRequest($url, $parameters) { $curl = curl_init();\r
+        curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($curl, CURLOPT_TIMEOUT, '25'); curl_setopt($curl, CURLOPT_URL, $url);\r
+        curl_setopt($curl, CURLOPT_POST, TRUE); curl_setopt($curl, CURLOPT_POSTFIELDS, $parameters);        \r
+        $response = curl_exec($curl); $headers = curl_getinfo($curl); $errmsg = curl_error($curl);  curl_close($curl);\r
+        if (!empty($errmsg)) return $errmsg; else  return $response;\r
+    }\r
+    \r
+    public function flUploadPhoto ($imgFile, $parameters) { $url = 'https://www.flickr.com/services/upload/'; $requestParams = ($parameters == NULL ? array() : $parameters);    $phid = '';    \r
+        $oauthParams = array (            \r
+            'oauth_nonce' => $this->genRndString(),\r
+            'oauth_timestamp' => time(),            \r
+            'oauth_token' => $this->access_token,\r
+            'oauth_consumer_key' => $this->consumer_key,\r
+            'oauth_signature_method' => 'HMAC-SHA1',\r
+            'oauth_version' => '1.0',\r
+        );\r
+        $requestParams = array_merge($requestParams, $oauthParams); $this->sign($url, $requestParams); $requestParams['photo'] = $imgFile; // prr($requestParams);                \r
+        $xml = $this->httpRequest($url, $requestParams); if (stripos($xml, '</photoid>')!==false && stripos($xml, 'stat="ok"')!==false) $phid = CutFromTo($xml, '<photoid>','</photoid>');\r
+        return empty($phid) ? "Problem: ".$xml."<pre>".print_r($requestParams, true)."</pre>" : $phid;\r
+    }\r
+    \r
+}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/tmhOAuth.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/tmhOAuth.php
new file mode 100644 (file)
index 0000000..56d4f18
--- /dev/null
@@ -0,0 +1,657 @@
+<?php\r
+/**\r
+ * tmhOAuth\r
+ *\r
+ * An OAuth 1.0A library written in PHP.\r
+ * The library supports file uploading using multipart/form as well as general\r
+ * REST requests. OAuth authentication is sent using the an Authorization Header.\r
+ *\r
+ * @author themattharris\r
+ * @version 0.61\r
+ *\r
+ * 16 January 2012\r
+ */\r
+class NXS_tmhOAuth {\r
+  const VERSION = 0.61;\r
+\r
+  /**\r
+   * Creates a new tmhOAuth object\r
+   *\r
+   * @param string $config, the configuration to use for this request\r
+   */\r
+  function __construct($config) {\r
+    $this->params = array();\r
+    $this->headers = array();\r
+    $this->auto_fixed_time = false;\r
+    $this->buffer = null;\r
+\r
+    // default configuration options\r
+    $this->config = array_merge(\r
+      array(\r
+        // leave 'user_agent' blank for default, otherwise set this to\r
+        // something that clearly identifies your app\r
+        'user_agent'                 => '',\r
+\r
+        'use_ssl'                    => true,\r
+        'host'                       => 'api.twitter.com',\r
+\r
+        'consumer_key'               => '',\r
+        'consumer_secret'            => '',\r
+        'user_token'                 => '',\r
+        'user_secret'                => '',\r
+        'force_nonce'                => false,\r
+        'nonce'                      => false, // used for checking signatures. leave as false for auto\r
+        'force_timestamp'            => false,\r
+        'timestamp'                  => false, // used for checking signatures. leave as false for auto\r
+\r
+        // oauth signing variables that are not dynamic\r
+        'oauth_version'              => '1.0',\r
+        'oauth_signature_method'     => 'HMAC-SHA1',\r
+\r
+        // you probably don't want to change any of these curl values\r
+        'curl_connecttimeout'        => 30,\r
+        'curl_timeout'               => 10,\r
+\r
+        // for security this should always be set to 2.\r
+        'curl_ssl_verifyhost'        => 2,\r
+        // for security this should always be set to true.\r
+        'curl_ssl_verifypeer'        => true,\r
+\r
+        // you can get the latest cacert.pem from here http://curl.haxx.se/ca/cacert.pem\r
+        'curl_cainfo'                => dirname(__FILE__) . '/cacert.pem',\r
+        'curl_capath'                => dirname(__FILE__),\r
+\r
+        'curl_followlocation'        => false, // whether to follow redirects or not\r
+\r
+        // support for proxy servers\r
+        'curl_proxy'                 => false, // really you don't want to use this if you are using streaming\r
+        'curl_proxyuserpwd'          => false, // format username:password for proxy, if required\r
+        'curl_encoding'              => '',    // leave blank for all supported formats, else use gzip, deflate, identity\r
+\r
+        // streaming API\r
+        'is_streaming'               => false,\r
+        'streaming_eol'              => "\r\n",\r
+        'streaming_metrics_interval' => 60,\r
+\r
+        // header or querystring. You should always use header!\r
+        // this is just to help me debug other developers implementations\r
+        'as_header'                  => true,\r
+        'debug'                      => false,\r
+      ),\r
+      $config\r
+    );\r
+    $this->set_user_agent();\r
+  }\r
+\r
+  function set_user_agent() {\r
+    if (!empty($this->config['user_agent']))\r
+      return;\r
+\r
+    if ($this->config['curl_ssl_verifyhost'] && $this->config['curl_ssl_verifypeer']) {\r
+      $ssl = '+SSL';\r
+    } else {\r
+      $ssl = '-SSL';\r
+    }\r
+\r
+    $ua = 'tmhOAuth ' . self::VERSION . $ssl . ' - //github.com/themattharris/tmhOAuth';\r
+    $this->config['user_agent'] = $ua;\r
+  }\r
+\r
+  /**\r
+   * Generates a random OAuth nonce.\r
+   * If 'force_nonce' is true a nonce is not generated and the value in the configuration will be retained.\r
+   *\r
+   * @param string $length how many characters the nonce should be before MD5 hashing. default 12\r
+   * @param string $include_time whether to include time at the beginning of the nonce. default true\r
+   * @return void\r
+   */\r
+  private function create_nonce($length=12, $include_time=true) {\r
+    if ($this->config['force_nonce'] == false) {\r
+      $sequence = array_merge(range(0,9), range('A','Z'), range('a','z'));\r
+      $length = $length > count($sequence) ? count($sequence) : $length;\r
+      shuffle($sequence);\r
+\r
+      $prefix = $include_time ? microtime() : '';\r
+      $this->config['nonce'] = md5(substr($prefix . implode('', $sequence), 0, $length));\r
+    }\r
+  }\r
+\r
+  /**\r
+   * Generates a timestamp.\r
+   * If 'force_timestamp' is true a nonce is not generated and the value in the configuration will be retained.\r
+   *\r
+   * @return void\r
+   */\r
+  private function create_timestamp() {\r
+    $this->config['timestamp'] = ($this->config['force_timestamp'] == false ? time() : $this->config['timestamp']); //echo "#### ".$this->config['timestamp'];// prr($this->config);\r
+  }\r
+\r
+  /**\r
+   * Encodes the string or array passed in a way compatible with OAuth.\r
+   * If an array is passed each array value will will be encoded.\r
+   *\r
+   * @param mixed $data the scalar or array to encode\r
+   * @return $data encoded in a way compatible with OAuth\r
+   */\r
+  private function safe_encode($data) {\r
+    if (is_array($data)) {\r
+      return array_map(array($this, 'safe_encode'), $data);\r
+    } else if (is_scalar($data)) {\r
+      return str_ireplace(\r
+        array('+', '%7E'),\r
+        array(' ', '~'),\r
+        rawurlencode($data)\r
+      );\r
+    } else {\r
+      return '';\r
+    }\r
+  }\r
+\r
+  /**\r
+   * Decodes the string or array from it's URL encoded form\r
+   * If an array is passed each array value will will be decoded.\r
+   *\r
+   * @param mixed $data the scalar or array to decode\r
+   * @return $data decoded from the URL encoded form\r
+   */\r
+  private function safe_decode($data) {\r
+    if (is_array($data)) {\r
+      return array_map(array($this, 'safe_decode'), $data);\r
+    } else if (is_scalar($data)) {\r
+      return rawurldecode($data);\r
+    } else {\r
+      return '';\r
+    }\r
+  }\r
+\r
+  /**\r
+   * Returns an array of the standard OAuth parameters.\r
+   *\r
+   * @return array all required OAuth parameters, safely encoded\r
+   */\r
+  private function get_defaults() {\r
+    $defaults = array(\r
+      'oauth_version'          => $this->config['oauth_version'],\r
+      'oauth_nonce'            => $this->config['nonce'],\r
+      'oauth_timestamp'        => $this->config['timestamp'],\r
+      'oauth_consumer_key'     => $this->config['consumer_key'],\r
+      'oauth_signature_method' => $this->config['oauth_signature_method'],\r
+    );\r
+\r
+    // include the user token if it exists\r
+    if ( $this->config['user_token'] )\r
+      $defaults['oauth_token'] = $this->config['user_token'];\r
+\r
+    // safely encode\r
+    foreach ($defaults as $k => $v) {\r
+      $_defaults[$this->safe_encode($k)] = $this->safe_encode($v);\r
+    }\r
+\r
+    return $_defaults;\r
+  }\r
+\r
+  /**\r
+   * Extracts and decodes OAuth parameters from the passed string\r
+   *\r
+   * @param string $body the response body from an OAuth flow method\r
+   * @return array the response body safely decoded to an array of key => values\r
+   */\r
+  function extract_params($body) {\r
+    $kvs = explode('&', $body);\r
+    $decoded = array();\r
+    foreach ($kvs as $kv) {\r
+      $kv = explode('=', $kv, 2);\r
+      $kv[0] = $this->safe_decode($kv[0]);\r
+      $kv[1] = $this->safe_decode($kv[1]);\r
+      $decoded[$kv[0]] = $kv[1];\r
+    }\r
+    return $decoded;\r
+  }\r
+\r
+  /**\r
+   * Prepares the HTTP method for use in the base string by converting it to\r
+   * uppercase.\r
+   *\r
+   * @param string $method an HTTP method such as GET or POST\r
+   * @return void value is stored to a class variable\r
+   * @author themattharris\r
+   */\r
+  private function prepare_method($method) {\r
+    $this->method = strtoupper($method);\r
+  }\r
+\r
+  /**\r
+   * Prepares the URL for use in the base string by ripping it apart and\r
+   * reconstructing it.\r
+   *\r
+   * Ref: 3.4.1.2\r
+   *\r
+   * @param string $url the request URL\r
+   * @return void value is stored to a class variable\r
+   * @author themattharris\r
+   */\r
+  private function prepare_url($url) {\r
+    $parts = parse_url($url);\r
+\r
+    $port   = isset($parts['port']) ? $parts['port'] : false;\r
+    $scheme = $parts['scheme'];\r
+    $host   = $parts['host'];\r
+    $path   = isset($parts['path']) ? $parts['path'] : false;\r
+\r
+    $port or $port = ($scheme == 'https') ? '443' : '80';\r
+\r
+    if (($scheme == 'https' && $port != '443')\r
+        || ($scheme == 'http' && $port != '80')) {\r
+      $host = "$host:$port";\r
+    }\r
+    $this->url = strtolower("$scheme://$host$path");\r
+  }\r
+\r
+  /**\r
+   * Prepares all parameters for the base string and request.\r
+   * Multipart parameters are ignored as they are not defined in the specification,\r
+   * all other types of parameter are encoded for compatibility with OAuth.\r
+   *\r
+   * @param array $params the parameters for the request\r
+   * @return void prepared values are stored in class variables\r
+   */\r
+  private function prepare_params($params) {\r
+    // do not encode multipart parameters, leave them alone\r
+    if ($this->config['multipart']) {\r
+      $this->request_params = $params;\r
+      $params = array();\r
+    }\r
+\r
+    // signing parameters are request parameters + OAuth default parameters\r
+    $this->signing_params = array_merge($this->get_defaults(), (array)$params);\r
+\r
+    // Remove oauth_signature if present\r
+    // Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.")\r
+    if (isset($this->signing_params['oauth_signature'])) {\r
+      unset($this->signing_params['oauth_signature']);\r
+    }\r
+\r
+    // Parameters are sorted by name, using lexicographical byte value ordering.\r
+    // Ref: Spec: 9.1.1 (1)\r
+    uksort($this->signing_params, 'strcmp');\r
+\r
+    // encode. Also sort the signed parameters from the POST parameters\r
+    foreach ($this->signing_params as $k => $v) {\r
+      $k = $this->safe_encode($k);\r
+      $v = $this->safe_encode($v);\r
+      $_signing_params[$k] = $v;\r
+      $kv[] = "{$k}={$v}";\r
+    }\r
+\r
+    // auth params = the default oauth params which are present in our collection of signing params\r
+    $this->auth_params = array_intersect_key($this->get_defaults(), $_signing_params);\r
+    if (isset($_signing_params['oauth_callback'])) {\r
+      $this->auth_params['oauth_callback'] = $_signing_params['oauth_callback'];\r
+      unset($_signing_params['oauth_callback']);\r
+    }\r
+\r
+    if (isset($_signing_params['oauth_verifier'])) {\r
+      $this->auth_params['oauth_verifier'] = $_signing_params['oauth_verifier'];\r
+      unset($_signing_params['oauth_verifier']);\r
+    }\r
+\r
+    // request_params is already set if we're doing multipart, if not we need to set them now\r
+    if ( ! $this->config['multipart'])\r
+      $this->request_params = array_diff_key($_signing_params, $this->get_defaults());\r
+\r
+    // create the parameter part of the base string\r
+    $this->signing_params = implode('&', $kv);\r
+  }\r
+\r
+  /**\r
+   * Prepares the OAuth signing key\r
+   *\r
+   * @return void prepared signing key is stored in a class variables\r
+   */\r
+  private function prepare_signing_key() {\r
+    $this->signing_key = $this->safe_encode($this->config['consumer_secret']) . '&' . $this->safe_encode($this->config['user_secret']);\r
+  }\r
+\r
+  /**\r
+   * Prepare the base string.\r
+   * Ref: Spec: 9.1.3 ("Concatenate Request Elements")\r
+   *\r
+   * @return void prepared base string is stored in a class variables\r
+   */\r
+  private function prepare_base_string() {\r
+    $base = array(\r
+      $this->method,\r
+      $this->url,\r
+      $this->signing_params\r
+    );\r
+    $this->base_string = implode('&', $this->safe_encode($base));\r
+  }\r
+\r
+  /**\r
+   * Prepares the Authorization header\r
+   *\r
+   * @return void prepared authorization header is stored in a class variables\r
+   */\r
+  private function prepare_auth_header() {\r
+    $this->headers = array();\r
+    uksort($this->auth_params, 'strcmp');\r
+    if (!$this->config['as_header']) :\r
+      $this->request_params = array_merge($this->request_params, $this->auth_params);\r
+      return;\r
+    endif;\r
+\r
+    foreach ($this->auth_params as $k => $v) {\r
+      $kv[] = "{$k}=\"{$v}\"";\r
+    }\r
+    $this->auth_header = 'OAuth ' . implode(', ', $kv);\r
+    $this->headers['Authorization'] = $this->auth_header;\r
+  }\r
+\r
+  /**\r
+   * Signs the request and adds the OAuth signature. This runs all the request\r
+   * parameter preparation methods.\r
+   *\r
+   * @param string $method the HTTP method being used. e.g. POST, GET, HEAD etc\r
+   * @param string $url the request URL without query string parameters\r
+   * @param array $params the request parameters as an array of key=value pairs\r
+   * @param string $useauth whether to use authentication when making the request.\r
+   */\r
+  private function sign($method, $url, $params, $useauth) {\r
+    $this->prepare_method($method);\r
+    $this->prepare_url($url);\r
+    $this->prepare_params($params);\r
+\r
+    // we don't sign anything is we're not using auth\r
+    if ($useauth) {\r
+      $this->prepare_base_string();\r
+      $this->prepare_signing_key();\r
+\r
+      $this->auth_params['oauth_signature'] = $this->safe_encode(\r
+        base64_encode(\r
+          hash_hmac(\r
+            'sha1', $this->base_string, $this->signing_key, true\r
+      )));\r
+\r
+      $this->prepare_auth_header();\r
+    }\r
+  }\r
+\r
+  /**\r
+   * Make an HTTP request using this library. This method doesn't return anything.\r
+   * Instead the response should be inspected directly.\r
+   *\r
+   * @param string $method the HTTP method being used. e.g. POST, GET, HEAD etc\r
+   * @param string $url the request URL without query string parameters\r
+   * @param array $params the request parameters as an array of key=value pairs\r
+   * @param string $useauth whether to use authentication when making the request. Default true.\r
+   * @param string $multipart whether this request contains multipart data. Default false\r
+   */\r
+  function request($method, $url, $params=array(), $useauth=true, $multipart=false) {\r
+    $this->config['multipart'] = $multipart;\r
+\r
+    $this->create_nonce();\r
+    $this->create_timestamp();\r
+\r
+    $this->sign($method, $url, $params, $useauth);\r
+    return $this->curlit();\r
+  }\r
+\r
+  /**\r
+   * Make a long poll HTTP request using this library. This method is\r
+   * different to the other request methods as it isn't supposed to disconnect\r
+   *\r
+   * Using this method expects a callback which will receive the streaming\r
+   * responses.\r
+   *\r
+   * @param string $method the HTTP method being used. e.g. POST, GET, HEAD etc\r
+   * @param string $url the request URL without query string parameters\r
+   * @param array $params the request parameters as an array of key=value pairs\r
+   * @param string $callback the callback function to stream the buffer to.\r
+   */\r
+  function streaming_request($method, $url, $params=array(), $callback='') {\r
+    if ( ! empty($callback) ) {\r
+      if ( ! function_exists($callback) ) {\r
+        return false;\r
+      }\r
+      $this->config['streaming_callback'] = $callback;\r
+    }\r
+    $this->metrics['start']          = time();\r
+    $this->metrics['interval_start'] = $this->metrics['start'];\r
+    $this->metrics['tweets']         = 0;\r
+    $this->metrics['last_tweets']    = 0;\r
+    $this->metrics['bytes']          = 0;\r
+    $this->metrics['last_bytes']     = 0;\r
+    $this->config['is_streaming']    = true;\r
+    $this->request($method, $url, $params);\r
+  }\r
+\r
+  /**\r
+   * Handles the updating of the current Streaming API metrics.\r
+   */\r
+  function update_metrics() {\r
+    $now = time();\r
+    if (($this->metrics['interval_start'] + $this->config['streaming_metrics_interval']) > $now)\r
+      return false;\r
+\r
+    $this->metrics['tps'] = round( ($this->metrics['tweets'] - $this->metrics['last_tweets']) / $this->config['streaming_metrics_interval'], 2);\r
+    $this->metrics['bps'] = round( ($this->metrics['bytes'] - $this->metrics['last_bytes']) / $this->config['streaming_metrics_interval'], 2);\r
+\r
+    $this->metrics['last_bytes'] = $this->metrics['bytes'];\r
+    $this->metrics['last_tweets'] = $this->metrics['tweets'];\r
+    $this->metrics['interval_start'] = $now;\r
+    return $this->metrics;\r
+  }\r
+\r
+  /**\r
+   * Utility function to create the request URL in the requested format\r
+   *\r
+   * @param string $request the API method without extension\r
+   * @param string $format the format of the response. Default json. Set to an empty string to exclude the format\r
+   * @return string the concatenation of the host, API version, API method and format\r
+   */\r
+  function url($request, $format='json') {\r
+    $format = strlen($format) > 0 ? ".$format" : '';\r
+    $proto  = $this->config['use_ssl'] ? 'https:/' : 'http:/';\r
+\r
+    // backwards compatibility with v0.1\r
+    if (isset($this->config['v']))\r
+      $this->config['host'] = $this->config['host'] . '/' . $this->config['v'];\r
+\r
+    return implode('/', array(\r
+      $proto,\r
+      $this->config['host'],\r
+      $request . $format\r
+    ));\r
+  }\r
+\r
+  /**\r
+   * Public access to the private safe decode/encode methods\r
+   *\r
+   * @param string $text the text to transform\r
+   * @param string $mode the transformation mode. either encode or decode\r
+   * @return the string as transformed by the given mode\r
+   */\r
+  function transformText($text, $mode='encode') {\r
+    return $this->{"safe_$mode"}($text);\r
+  }\r
+\r
+  /**\r
+   * Utility function to parse the returned curl headers and store them in the\r
+   * class array variable.\r
+   *\r
+   * @param object $ch curl handle\r
+   * @param string $header the response headers\r
+   * @return the string length of the header\r
+   */\r
+  private function curlHeader($ch, $header) {\r
+    $i = strpos($header, ':');\r
+    if ( ! empty($i) ) {\r
+      $key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\r
+      $value = trim(substr($header, $i + 2));\r
+      $this->response['headers'][$key] = $value;\r
+    }\r
+    return strlen($header);\r
+  }\r
+\r
+  /**\r
+    * Utility function to parse the returned curl buffer and store them until\r
+    * an EOL is found. The buffer for curl is an undefined size so we need\r
+    * to collect the content until an EOL is found.\r
+    *\r
+    * This function calls the previously defined streaming callback method.\r
+    *\r
+    * @param object $ch curl handle\r
+    * @param string $data the current curl buffer\r
+    */\r
+  private function curlWrite($ch, $data) {\r
+    $l = strlen($data);\r
+    if (strpos($data, $this->config['streaming_eol']) === false) {\r
+      $this->buffer .= $data;\r
+      return $l;\r
+    }\r
+\r
+    $buffered = explode($this->config['streaming_eol'], $data);\r
+    $content = $this->buffer . $buffered[0];\r
+\r
+    $this->metrics['tweets']++;\r
+    $this->metrics['bytes'] += strlen($content);\r
+\r
+    if ( ! function_exists($this->config['streaming_callback']))\r
+      return 0;\r
+\r
+    $metrics = $this->update_metrics();\r
+    $stop = call_user_func(\r
+      $this->config['streaming_callback'],\r
+      $content,\r
+      strlen($content),\r
+      $metrics\r
+    );\r
+    $this->buffer = $buffered[1];\r
+    if ($stop)\r
+      return 0;\r
+\r
+    return $l;\r
+  }\r
+\r
+  /**\r
+   * Makes a curl request. Takes no parameters as all should have been prepared\r
+   * by the request method\r
+   *\r
+   * @return void response data is stored in the class variable 'response'\r
+   */\r
+  private function curlit() {\r
+    // method handling\r
+    switch ($this->method) {\r
+      case 'POST':\r
+        break;\r
+      default:\r
+        // GET, DELETE request so convert the parameters to a querystring\r
+        if ( ! empty($this->request_params)) {\r
+          foreach ($this->request_params as $k => $v) {\r
+            // Multipart params haven't been encoded yet.\r
+            // Not sure why you would do a multipart GET but anyway, here's the support for it\r
+            if ($this->config['multipart']) {\r
+              $params[] = $this->safe_encode($k) . '=' . $this->safe_encode($v);\r
+            } else {\r
+              $params[] = $k . '=' . $v;\r
+            }\r
+          }\r
+          $qs = implode('&', $params);\r
+          $this->url = strlen($qs) > 0 ? $this->url . '?' . $qs : $this->url;\r
+          $this->request_params = array();\r
+        }\r
+        break;\r
+    }\r
+\r
+    // configure curl\r
+    $c = curl_init();\r
+    curl_setopt_array($c, array(\r
+      CURLOPT_USERAGENT      => $this->config['user_agent'],\r
+      CURLOPT_CONNECTTIMEOUT => $this->config['curl_connecttimeout'],\r
+      CURLOPT_TIMEOUT        => $this->config['curl_timeout'],\r
+      CURLOPT_RETURNTRANSFER => true,\r
+      CURLOPT_SSL_VERIFYPEER => $this->config['curl_ssl_verifypeer'],\r
+      CURLOPT_SSL_VERIFYHOST => $this->config['curl_ssl_verifyhost'],\r
+\r
+      CURLOPT_FOLLOWLOCATION => $this->config['curl_followlocation'],\r
+      CURLOPT_PROXY          => $this->config['curl_proxy'],\r
+      CURLOPT_ENCODING       => $this->config['curl_encoding'],\r
+      CURLOPT_URL            => $this->url,\r
+      // process the headers\r
+      CURLOPT_HEADERFUNCTION => array($this, 'curlHeader'),\r
+      CURLOPT_HEADER         => false,\r
+      CURLINFO_HEADER_OUT    => true,\r
+    ));\r
+\r
+    if ($this->config['curl_cainfo'] !== false)\r
+      curl_setopt($c, CURLOPT_CAINFO, $this->config['curl_cainfo']);\r
+\r
+    if ($this->config['curl_capath'] !== false)\r
+      curl_setopt($c, CURLOPT_CAPATH, $this->config['curl_capath']);\r
+\r
+    if ($this->config['curl_proxyuserpwd'] !== false)\r
+      curl_setopt($c, CURLOPT_PROXYUSERPWD, $this->config['curl_proxyuserpwd']);\r
+\r
+    if ($this->config['is_streaming']) {\r
+      // process the body\r
+      $this->response['content-length'] = 0;\r
+      curl_setopt($c, CURLOPT_TIMEOUT, 0);\r
+      curl_setopt($c, CURLOPT_WRITEFUNCTION, array($this, 'curlWrite'));\r
+    }\r
+\r
+    switch ($this->method) {\r
+      case 'GET':\r
+        break;\r
+      case 'POST':\r
+        curl_setopt($c, CURLOPT_POST, true);\r
+        break;\r
+      default:\r
+        curl_setopt($c, CURLOPT_CUSTOMREQUEST, $this->method);\r
+    }\r
+\r
+    if ( ! empty($this->request_params) ) {\r
+      // if not doing multipart we need to implode the parameters\r
+      if ( ! $this->config['multipart'] ) {\r
+        foreach ($this->request_params as $k => $v) {\r
+          $ps[] = "{$k}={$v}";\r
+        }\r
+        $this->request_params = implode('&', $ps);\r
+      }\r
+      curl_setopt($c, CURLOPT_POSTFIELDS, $this->request_params);\r
+    } else {\r
+      // CURL will set length to -1 when there is no data, which breaks Twitter\r
+      $this->headers['Content-Type'] = '';\r
+      $this->headers['Content-Length'] = '';\r
+    }\r
+\r
+    // CURL defaults to setting this to Expect: 100-Continue which Twitter rejects\r
+    $this->headers['Expect'] = '';\r
+\r
+    if ( ! empty($this->headers)) {\r
+      foreach ($this->headers as $k => $v) {\r
+        $headers[] = trim($k . ': ' . $v);\r
+      }\r
+      curl_setopt($c, CURLOPT_HTTPHEADER, $headers);\r
+    }\r
+\r
+    if (isset($this->config['prevent_request']) && true == $this->config['prevent_request'])\r
+      return;\r
+\r
+    // do it!\r
+    global $nxs_skipSSLCheck; if ($nxs_skipSSLCheck===true) curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);\r
+    $response = curl_exec($c);\r
+    $code = curl_getinfo($c, CURLINFO_HTTP_CODE);\r
+    $info = curl_getinfo($c);\r
+    $error = curl_error($c);\r
+    $errno = curl_errno($c);\r
+    curl_close($c);\r
+\r
+    // store the response\r
+    $this->response['code'] = $code;\r
+    $this->response['response'] = $response;\r
+    $this->response['info'] = $info;\r
+    $this->response['error'] = $error;\r
+    $this->response['errno'] = $errno;\r
+    return $code;\r
+  }\r
+}
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/tmhUtilities.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/tmhUtilities.php
new file mode 100644 (file)
index 0000000..e07f384
--- /dev/null
@@ -0,0 +1,249 @@
+<?php\r
+/**\r
+ * tmhUtilities\r
+ *\r
+ * Helpful utility and Twitter formatting functions\r
+ *\r
+ * @author themattharris\r
+ * @version 0.2\r
+ *\r
+ * 29 September 2011\r
+ */\r
+class NXS_tmhUtilities {\r
+  /**\r
+   * Entifies the tweet using the given entities element\r
+   *\r
+   * @param array $tweet the json converted to normalised array\r
+   * @return the tweet text with entities replaced with hyperlinks\r
+   */\r
+  function entify($tweet, &$replacements=array()) {\r
+    $encoding = mb_internal_encoding();\r
+    mb_internal_encoding("UTF-8");\r
+\r
+    $keys = array();\r
+    // $replacements = array();\r
+    $is_retweet = false;\r
+\r
+    if (isset($tweet['retweeted_status'])) {\r
+      $tweet = $tweet['retweeted_status'];\r
+      $is_retweet = true;\r
+    }\r
+\r
+    if (!isset($tweet['entities'])) {\r
+      return $tweet['text'];\r
+    }\r
+\r
+    // prepare the entities\r
+    foreach ($tweet['entities'] as $type => $things) {\r
+      foreach ($things as $entity => $value) {\r
+        $tweet_link = "<a href=\"http://twitter.com/{$tweet['user']['screen_name']}/statuses/{$tweet['id']}\">{$tweet['created_at']}</a>";\r
+\r
+        switch ($type) {\r
+          case 'hashtags':\r
+            $href = "<a href=\"http://twitter.com/search?q=%23{$value['text']}\">#{$value['text']}</a>";\r
+            break;\r
+          case 'user_mentions':\r
+            $href = "@<a href=\"http://twitter.com/{$value['screen_name']}\" title=\"{$value['name']}\">{$value['screen_name']}</a>";\r
+            break;\r
+          case 'urls':\r
+          case 'media':\r
+            $url = empty($value['expanded_url']) ? $value['url'] : $value['expanded_url'];\r
+            $display = isset($value['display_url']) ? $value['display_url'] : str_replace('http://', '', $url);\r
+            // Not all pages are served in UTF-8 so you may need to do this ...\r
+            $display = urldecode(str_replace('%E2%80%A6', '&hellip;', urlencode($display)));\r
+            $href = "<a href=\"{$value['url']}\">{$display}</a>";\r
+            break;\r
+        }\r
+        $keys[$value['indices']['0']] = mb_substr(\r
+          $tweet['text'],\r
+          $value['indices']['0'],\r
+          $value['indices']['1'] - $value['indices']['0']\r
+        );\r
+        $replacements[$value['indices']['0']] = $href;\r
+      }\r
+    }\r
+\r
+    ksort($replacements);\r
+    $replacements = array_reverse($replacements, true);\r
+    $entified_tweet = $tweet['text'];\r
+    foreach ($replacements as $k => $v) {\r
+      // $entified_tweet = substr_replace($entified_tweet, $v, $k, strlen($keys[$k]));\r
+      $entified_tweet = mb_substr($entified_tweet, 0, $k).$v.mb_substr($entified_tweet, $k + strlen($keys[$k]));\r
+    }\r
+    $replacements = array(\r
+      'replacements' => $replacements,\r
+      'keys' => $keys\r
+    );\r
+\r
+    mb_internal_encoding($encoding);\r
+    return $entified_tweet;\r
+  }\r
+\r
+  /**\r
+   * Returns the current URL. This is instead of PHP_SELF which is unsafe\r
+   *\r
+   * @param bool $dropqs whether to drop the querystring or not. Default true\r
+   * @return string the current URL\r
+   */\r
+  function php_self($dropqs=true) {\r
+    $url = sprintf('%s://%s%s',\r
+      empty($_SERVER['HTTPS']) ? (@$_SERVER['SERVER_PORT'] == '443' ? 'https' : 'http') : 'http',\r
+      $_SERVER['SERVER_NAME'],\r
+      $_SERVER['REQUEST_URI']\r
+    );\r
+\r
+    $parts = parse_url($url);\r
+\r
+    $port = $_SERVER['SERVER_PORT'];\r
+    $scheme = $parts['scheme'];\r
+    $host = $parts['host'];\r
+    $path = @$parts['path'];\r
+    $qs   = @$parts['query'];\r
+\r
+    $port or $port = ($scheme == 'https') ? '443' : '80';\r
+\r
+    if (($scheme == 'https' && $port != '443')\r
+        || ($scheme == 'http' && $port != '80')) {\r
+      $host = "$host:$port";\r
+    }\r
+    $url = "$scheme://$host$path";\r
+    if ( ! $dropqs)\r
+      return "{$url}?{$qs}";\r
+    else\r
+      return $url;\r
+  }\r
+\r
+  function is_cli() {\r
+    return (PHP_SAPI == 'cli' && empty($_SERVER['REMOTE_ADDR']));\r
+  }\r
+\r
+  /**\r
+   * Debug function for printing the content of an object\r
+   *\r
+   * @param mixes $obj\r
+   */\r
+  function pr($obj) {\r
+\r
+    if (!self::is_cli())\r
+      echo '<pre style="word-wrap: break-word">';\r
+    if ( is_object($obj) )\r
+      print_r($obj);\r
+    elseif ( is_array($obj) )\r
+      print_r($obj);\r
+    else\r
+      echo $obj;\r
+    if (!self::is_cli())\r
+      echo '</pre>';\r
+  }\r
+\r
+  /**\r
+   * Make an HTTP request using this library. This method is different to 'request'\r
+   * because on a 401 error it will retry the request.\r
+   *\r
+   * When a 401 error is returned it is possible the timestamp of the client is\r
+   * too different to that of the API server. In this situation it is recommended\r
+   * the request is retried with the OAuth timestamp set to the same as the API\r
+   * server. This method will automatically try that technique.\r
+   *\r
+   * This method doesn't return anything. Instead the response should be\r
+   * inspected directly.\r
+   *\r
+   * @param string $method the HTTP method being used. e.g. POST, GET, HEAD etc\r
+   * @param string $url the request URL without query string parameters\r
+   * @param array $params the request parameters as an array of key=value pairs\r
+   * @param string $useauth whether to use authentication when making the request. Default true.\r
+   * @param string $multipart whether this request contains multipart data. Default false\r
+   */\r
+  function auto_fix_time_request($tmhOAuth, $method, $url, $params=array(), $useauth=true, $multipart=false) {\r
+    $tmhOAuth->request($method, $url, $params, $useauth, $multipart);\r
+\r
+    // if we're not doing auth the timestamp isn't important\r
+    if ( ! $useauth)\r
+      return;\r
+\r
+    // some error that isn't a 401\r
+    if ($tmhOAuth->response['code'] != 401)\r
+      return;\r
+\r
+    // some error that is a 401 but isn't because the OAuth token and signature are incorrect\r
+    // TODO: this check is horrid but helps avoid requesting twice when the username and password are wrong\r
+    if (stripos($tmhOAuth->response['response'], 'password') !== false)\r
+     return;\r
+\r
+    // force the timestamp to be the same as the Twitter servers, and re-request\r
+    $tmhOAuth->auto_fixed_time = true;\r
+    $tmhOAuth->config['force_timestamp'] = true;\r
+    $tmhOAuth->config['timestamp'] = strtotime($tmhOAuth->response['headers']['date']);\r
+    return $tmhOAuth->request($method, $url, $params, $useauth, $multipart);\r
+  }\r
+\r
+  /**\r
+   * Asks the user for input and returns the line they enter\r
+   *\r
+   * @param string $prompt the text to display to the user\r
+   * @return the text entered by the user\r
+   */\r
+  function read_input($prompt) {\r
+    echo $prompt;\r
+    $handle = fopen("php://stdin","r");\r
+    $data = fgets($handle);\r
+    return trim($data);\r
+  }\r
+\r
+  /**\r
+   * Get a password from the shell.\r
+   *\r
+   * This function works on *nix systems only and requires shell_exec and stty.\r
+   *\r
+   * @param  boolean $stars Wether or not to output stars for given characters\r
+   * @return string\r
+   * @url http://www.dasprids.de/blog/2008/08/22/getting-a-password-hidden-from-stdin-with-php-cli\r
+   */\r
+  function read_password($prompt, $stars=false) {\r
+    echo $prompt;\r
+    $style = shell_exec('stty -g');\r
+\r
+    if ($stars === false) {\r
+      shell_exec('stty -echo');\r
+      $password = rtrim(fgets(STDIN), "\n");\r
+    } else {\r
+      shell_exec('stty -icanon -echo min 1 time 0');\r
+      $password = '';\r
+      while (true) :\r
+        $char = fgetc(STDIN);\r
+        if ($char === "\n") :\r
+          break;\r
+        elseif (ord($char) === 127) :\r
+          if (strlen($password) > 0) {\r
+            fwrite(STDOUT, "\x08 \x08");\r
+            $password = substr($password, 0, -1);\r
+          }\r
+        else\r
+          fwrite(STDOUT, "*");\r
+          $password .= $char;\r
+        endif;\r
+      endwhile;\r
+    }\r
+\r
+    // Reset\r
+    shell_exec('stty ' . $style);\r
+    echo PHP_EOL;\r
+    return $password;\r
+  }\r
+\r
+  /**\r
+   * Check if one string ends with another\r
+   *\r
+   * @param string $haystack the string to check inside of\r
+   * @param string $needle the string to check $haystack ends with\r
+   * @return true if $haystack ends with $needle, false otherwise\r
+   */\r
+  function endswith($haystack, $needle) {\r
+    $haylen  = strlen($haystack);\r
+    $needlelen = strlen($needle);\r
+    if ($needlelen > $haylen)\r
+      return false;\r
+\r
+    return substr_compare($haystack, $needle, -$needlelen) === 0;\r
+  }\r
+}
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/trOAuth.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/trOAuth.php
new file mode 100644 (file)
index 0000000..e465413
--- /dev/null
@@ -0,0 +1,274 @@
+<?php\r
+\r
+/*\r
+ * Abraham Williams (abraham@abrah.am) http://abrah.am\r
+ *\r
+ * The first PHP Library to support OAuth for Tumblr's REST API.  (Originally for Twitter, modified for Tumblr by Lucas)\r
+ */\r
+\r
+/* Load OAuth lib. You can find it at http://oauth.net */\r
+require_once('OAuth.php');\r
+\r
+/**\r
+ * Tumblr OAuth class\r
+ */\r
+class TumblrOAuth {\r
+  /* Contains the last HTTP status code returned. */\r
+  public $http_code;\r
+  /* Contains the last API call. */\r
+  public $url;\r
+  /* Set up the API root URL. */\r
+  public $host = "http://api.tumblr.com/v2/";\r
+  /* Set timeout default. */\r
+  public $timeout = 45;\r
+  /* Set connect timeout. */\r
+  public $connecttimeout = 45; \r
+  /* Verify SSL Cert. */\r
+  public $ssl_verifypeer = FALSE;\r
+  /* Respons format. */\r
+  public $format = 'json';\r
+  /* Decode returned json data. */\r
+  public $decode_json = TRUE;\r
+  /* Contains the last HTTP headers returned. */\r
+  public $http_info;\r
+  /* Set the useragnet. */\r
+  public $useragent = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; .NET4.0E; .NET CLR 1.1.4322)';\r
+  /* Immediately retry the API call if the response was not successful. */\r
+  //public $retry = TRUE;\r
+\r
+  /**\r
+   * Set API URLS\r
+   */\r
+  function accessTokenURL()  { return 'https://www.tumblr.com/oauth/access_token'; }\r
+  function authenticateURL() { return 'https://www.tumblr.com/oauth/authorize'; }\r
+  function authorizeURL()    { return 'https://www.tumblr.com/oauth/authorize'; }\r
+  function requestTokenURL() { return 'https://www.tumblr.com/oauth/request_token'; }\r
+\r
+  /**\r
+   * Debug helpers\r
+   */\r
+  function lastStatusCode() { return $this->http_status; }\r
+  function lastAPICall() { return $this->last_api_call; }\r
+\r
+  /**\r
+   * construct TumblrOAuth object\r
+   */\r
+  function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) {\r
+    $this->sha1_method = new nsx_trOAuthSignatureMethod_HMAC_SHA1();\r
+    $this->consumer = new nsx_trOAuthConsumer($consumer_key, $consumer_secret);\r
+    if (!empty($oauth_token) && !empty($oauth_token_secret)) {\r
+      $this->token = new nsx_trOAuthConsumer($oauth_token, $oauth_token_secret);\r
+    } else {\r
+      $this->token = NULL;\r
+    }\r
+  }\r
+\r
+  /**\r
+   * Get a request_token from Tumblr\r
+   *\r
+   * @returns a key/value array containing oauth_token and oauth_token_secret\r
+   */\r
+  function getRequestToken($oauth_callback = NULL) {\r
+    $parameters = array();\r
+    if (!empty($oauth_callback)) {\r
+      $parameters['oauth_callback'] = $oauth_callback;\r
+    } \r
+    $request = $this->oAuthRequest($this->requestTokenURL(), 'GET', $parameters); \r
+    $token = nsx_trOAuthUtil::parse_parameters($request);\r
+    $this->token = new nsx_trOAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);\r
+    return $token;\r
+  }\r
+\r
+  /**\r
+   * Get the authorize URL\r
+   *\r
+   * @returns a string\r
+   */\r
+  function getAuthorizeURL($token, $sign_in_with_tumblr = TRUE) {\r
+    if (is_array($token)) {\r
+      $token = $token['oauth_token'];\r
+    }\r
+    if (empty($sign_in_with_tumblr)) {\r
+      return $this->authorizeURL() . "?oauth_token={$token}";\r
+    } else {\r
+       return $this->authenticateURL() . "?oauth_token={$token}";\r
+    }\r
+  }\r
+\r
+  /**\r
+   * Exchange request token and secret for an access token and\r
+   * secret, to sign API calls.\r
+   *\r
+   * @returns array("oauth_token" => "the-access-token",\r
+   *                "oauth_token_secret" => "the-access-secret",\r
+   *                "user_id" => "9436992",\r
+   *                "screen_name" => "abraham")\r
+   */\r
+  function getAccessToken($oauth_verifier = FALSE) {\r
+    $parameters = array();\r
+    if (!empty($oauth_verifier)) {\r
+      $parameters['oauth_verifier'] = $oauth_verifier;\r
+    }\r
+    $request = $this->oAuthRequest($this->accessTokenURL(), 'GET', $parameters);\r
+    $token = nsx_trOAuthUtil::parse_parameters($request);\r
+    $this->token = new nsx_trOAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);\r
+    return $token;\r
+  }\r
+\r
+  /**\r
+   * One time exchange of username and password for access token and secret.\r
+   *\r
+   * @returns array("oauth_token" => "the-access-token",\r
+   *                "oauth_token_secret" => "the-access-secret",\r
+   *                "user_id" => "9436992",\r
+   *                "screen_name" => "abraham",\r
+   *                "x_auth_expires" => "0")\r
+   */  \r
+  function getXAuthToken($username, $password) {\r
+    $parameters = array();\r
+    $parameters['x_auth_username'] = $username;\r
+    $parameters['x_auth_password'] = $password;\r
+    $parameters['x_auth_mode'] = 'client_auth';\r
+    $request = $this->oAuthRequest($this->accessTokenURL(), 'POST', $parameters);\r
+    $token = nsx_trOAuthUtil::parse_parameters($request);\r
+    $this->token = new nsx_trOAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);\r
+    return $token;\r
+  }\r
+\r
+  /**\r
+   * GET wrapper for oAuthRequest.\r
+   */\r
+  function get($url, $parameters = array()) {\r
+    $response = $this->oAuthRequest($url, 'GET', $parameters);\r
+    if ($this->format === 'json' && $this->decode_json) {\r
+      return json_decode($response);\r
+    }\r
+    return $response;\r
+  }\r
+  \r
+  /**\r
+   * POST wrapper for oAuthRequest.\r
+   */\r
+  function post($url, $parameters = array()) {\r
+    $response = $this->oAuthRequest($url, 'POST', $parameters); //prr($response);\r
+    if ($this->format === 'json' && $this->decode_json) {\r
+      return json_decode($response);\r
+    }\r
+    return $response;\r
+  }\r
+\r
+  /**\r
+   * DELETE wrapper for oAuthReqeust.\r
+   */\r
+  function delete($url, $parameters = array()) {\r
+    $response = $this->oAuthRequest($url, 'DELETE', $parameters);\r
+    if ($this->format === 'json' && $this->decode_json) {\r
+      return json_decode($response);\r
+    }\r
+    return $response;\r
+  }\r
+\r
+  /**\r
+   * Format and sign an OAuth / API request\r
+   */\r
+  function oAuthRequest($url, $method, $parameters) { \r
+    if (strrpos($url, 'https://') !== 0 && strrpos($url, 'http://') !== 0) {\r
+      $url = "{$this->host}{$url}";\r
+    }\r
+    $request = nsx_trOAuthRequest::from_consumer_and_token($this->consumer, $this->token, $method, $url, $parameters);\r
+    $request->sign_request($this->sha1_method, $this->consumer, $this->token); \r
+    switch ($method) {\r
+    case 'GET':\r
+      return $this->http($request->to_url(), 'GET');\r
+    default:\r
+      return $this->http($request->get_normalized_http_url(), $method, $request->to_postdata());\r
+    }\r
+  }\r
+\r
+  /**\r
+   * Make an HTTP request\r
+   *\r
+   * @return API results\r
+   */\r
+  function http($url, $method, $postfields = NULL) {  $ref = '';\r
+    $this->http_info = array();\r
+    if ($method=='DELETE') $ci = curl_init(); else $ci = curl_init($url);\r
+    \r
+    $headers = array();\r
+$headers[] = 'Connection: keep-alive';\r
+$headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.34 Safari/536.11';\r
+$headers[] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';\r
+$headers[] = 'Accept-Encoding: gzip,deflate,sdch';\r
+$headers[] = 'Accept-Language: en-US,en;q=0.8';\r
+$headers[] = 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3';\r
+    \r
+     $options = array(\r
+        CURLOPT_RETURNTRANSFER => true,     // return web page\r
+        CURLOPT_HEADER         => false,    // don't return headers\r
+//        CURLOPT_FOLLOWLOCATION => true,     // follow redirects\r
+        CURLOPT_ENCODING       => "",       // handle all encodings\r
+        CURLOPT_USERAGENT      => "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; .NET4.0E; .NET CLR 1.1.4322)",\r
+        CURLOPT_AUTOREFERER    => true,     // set referer on redirect\r
+        CURLOPT_CONNECTTIMEOUT => 120,      // timeout on connect\r
+        CURLOPT_TIMEOUT        => 120,      // timeout on response\r
+//        CURLOPT_MAXREDIRS      => $redirs,       // stop after 10 redirects\r
+        CURLOPT_REFERER        => $ref,       // stop after 10 redirects        \r
+        CURLINFO_HEADER_OUT    => true\r
+    ); \r
+    curl_setopt_array($ci, $options);   \r
+        \r
+    curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);\r
+    curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);\r
+    curl_setopt($ci, CURLOPT_HTTPHEADER, $headers);\r
+    curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);\r
+//    curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));\r
+\r
+\r
+    switch ($method) {\r
+      case 'POST':\r
+        curl_setopt($ci, CURLOPT_POST, TRUE);\r
+        if (!empty($postfields)) {\r
+          curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);\r
+        }\r
+        break;\r
+      case 'DELETE':\r
+        curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');\r
+        if (!empty($postfields)) {\r
+          $url = "{$url}?{$postfields}";\r
+        }\r
+    }\r
+//prr($url);\r
+    if ($method=='DELETE')  curl_setopt($ci, CURLOPT_URL, $url);  \r
+    \r
+    global $nxs_skipSSLCheck; if ($nxs_skipSSLCheck===true) curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, false);\r
+    \r
+    $response = curl_exec($ci);  $out = array();\r
+  \r
+    /*  \r
+    $err = curl_errno($ci); if ($err==28){ sleep(10); $tm = true; $response = curl_exec($ci); } //   echo "##".$err; $errmsg = curl_error($ci); $out['errno'] = $err; $out['errmsg'] = $errmsg; prr($out);\r
+    $err = curl_errno($ci); if ($err>0){ $errmsg = curl_error($ci); $out['errno'] = $err; $out['errmsg'] = $errmsg; curl_close($ci); return $out; }\r
+    */\r
+    //$err = curl_errno($ci); $errmsg = curl_error($ci); $header = curl_getinfo($ci);  $header['errno']   = $err;  $header['errmsg']  = $errmsg;  $header['content'] = $response;  prr($header); //die();\r
+    \r
+    $err = curl_errno($ci); if ($err>0){ $errmsg = curl_error($ci); $out['errno'] = $err; $out['errmsg'] = $errmsg.". Tumblr API is down. Please try later.";  $this->http_code = '404'; curl_close($ci); return json_encode($out); }\r
+    \r
+    $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE); \r
+    $this->http_info = array_merge($this->http_info, curl_getinfo($ci));\r
+    $this->url = $url; //prr($this);\r
+    curl_close ($ci); // prr($response);\r
+    return $response;\r
+  }\r
+\r
+  /**\r
+   * Get the header info to store.\r
+   */\r
+  function getHeader($ch, $header) {\r
+    $i = strpos($header, ':');\r
+    if (!empty($i)) {\r
+      $key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\r
+      $value = trim(substr($header, $i + 2));\r
+      $this->http_header[$key] = $value;\r
+    }\r
+    return strlen($header);\r
+  }\r
+}
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/xmlrpc-client.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/xmlrpc-client.php
new file mode 100644 (file)
index 0000000..848dc35
--- /dev/null
@@ -0,0 +1,1459 @@
+<?php\r
+/**\r
+ * IXR - The Incutio XML-RPC Library\r
+ *\r
+ * Copyright (c) 2010, Incutio Ltd.\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions are met:\r
+ *\r
+ *  - Redistributions of source code must retain the above copyright notice,\r
+ *    this list of conditions and the following disclaimer.\r
+ *  - Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ *  - Neither the name of Incutio Ltd. nor the names of its contributors\r
+ *    may be used to endorse or promote products derived from this software\r
+ *    without specific prior written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR\r
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE\r
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * @package IXR\r
+ * @since 1.5\r
+ *\r
+ * @copyright  Incutio Ltd 2010 (http://www.incutio.com)\r
+ * @version    1.7.4 7th September 2010\r
+ * @author     Simon Willison\r
+ * @link       http://scripts.incutio.com/xmlrpc/ Site/manual\r
+ * \r
+ * Modified Nov 2014 by NextScripts.com to provide SSL compatiblity. \r
+ */\r
+\r
+\r
+class NXS_XMLRPC_Value\r
+{\r
+    var $data;\r
+    var $type;\r
+\r
+    function NXS_XMLRPC_Value($data, $type = false)\r
+    {\r
+        $this->data = $data;\r
+        if (!$type) {\r
+            $type = $this->calculateType();\r
+        }\r
+        $this->type = $type;\r
+        if ($type == 'struct') {\r
+            // Turn all the values in the array in to new NXS_XMLRPC_Value objects\r
+            foreach ($this->data as $key => $value) {\r
+                $this->data[$key] = new NXS_XMLRPC_Value($value);\r
+            }\r
+        }\r
+        if ($type == 'array') {\r
+            for ($i = 0, $j = count($this->data); $i < $j; $i++) {\r
+                $this->data[$i] = new NXS_XMLRPC_Value($this->data[$i]);\r
+            }\r
+        }\r
+    }\r
+\r
+    function calculateType()\r
+    {\r
+        if ($this->data === true || $this->data === false) {\r
+            return 'boolean';\r
+        }\r
+        if (is_integer($this->data)) {\r
+            return 'int';\r
+        }\r
+        if (is_double($this->data)) {\r
+            return 'double';\r
+        }\r
+\r
+        // Deal with IXR object types base64 and date\r
+        if (is_object($this->data) && is_a($this->data, 'NXS_XMLRPC_Date')) {\r
+            return 'date';\r
+        }\r
+        if (is_object($this->data) && is_a($this->data, 'NXS_XMLRPC_Base64')) {\r
+            return 'base64';\r
+        }\r
+\r
+        // If it is a normal PHP object convert it in to a struct\r
+        if (is_object($this->data)) {\r
+            $this->data = get_object_vars($this->data);\r
+            return 'struct';\r
+        }\r
+        if (!is_array($this->data)) {\r
+            return 'string';\r
+        }\r
+\r
+        // We have an array - is it an array or a struct?\r
+        if ($this->isStruct($this->data)) {\r
+            return 'struct';\r
+        } else {\r
+            return 'array';\r
+        }\r
+    }\r
+\r
+    function getXml()\r
+    {\r
+        // Return XML for this value\r
+        switch ($this->type) {\r
+            case 'boolean':\r
+                return '<boolean>'.(($this->data) ? '1' : '0').'</boolean>';\r
+                break;\r
+            case 'int':\r
+                return '<int>'.$this->data.'</int>';\r
+                break;\r
+            case 'double':\r
+                return '<double>'.$this->data.'</double>';\r
+                break;\r
+            case 'string':\r
+                return '<string>'.htmlspecialchars($this->data).'</string>';\r
+                break;\r
+            case 'array':\r
+                $return = '<array><data>'."\n";\r
+                foreach ($this->data as $item) {\r
+                    $return .= '  <value>'.$item->getXml()."</value>\n";\r
+                }\r
+                $return .= '</data></array>';\r
+                return $return;\r
+                break;\r
+            case 'struct':\r
+                $return = '<struct>'."\n";\r
+                foreach ($this->data as $name => $value) {\r
+                    $return .= "  <member><name>$name</name><value>";\r
+                    $return .= $value->getXml()."</value></member>\n";\r
+                }\r
+                $return .= '</struct>';\r
+                return $return;\r
+                break;\r
+            case 'date':\r
+            case 'base64':\r
+                return $this->data->getXml();\r
+                break;\r
+        }\r
+        return false;\r
+    }\r
+\r
+    /**\r
+     * Checks whether or not the supplied array is a struct or not\r
+     *\r
+     * @param unknown_type $array\r
+     * @return boolean\r
+     */\r
+    function isStruct($array)\r
+    {\r
+        $expected = 0;\r
+        foreach ($array as $key => $value) {\r
+            if ((string)$key != (string)$expected) {\r
+                return true;\r
+            }\r
+            $expected++;\r
+        }\r
+        return false;\r
+    }\r
+}\r
+\r
+/**\r
+ * NXS_XMLRPC_MESSAGE\r
+ *\r
+ * @package IXR\r
+ * @since 1.5\r
+ *\r
+ */\r
+class NXS_XMLRPC_Message\r
+{\r
+    var $message;\r
+    var $messageType;  // methodCall / methodResponse / fault\r
+    var $faultCode;\r
+    var $faultString;\r
+    var $methodName;\r
+    var $params;\r
+\r
+    // Current variable stacks\r
+    var $_arraystructs = array();   // The stack used to keep track of the current array/struct\r
+    var $_arraystructstypes = array(); // Stack keeping track of if things are structs or array\r
+    var $_currentStructName = array();  // A stack as well\r
+    var $_param;\r
+    var $_value;\r
+    var $_currentTag;\r
+    var $_currentTagContents;\r
+    // The XML parser\r
+    var $_parser;\r
+\r
+    function NXS_XMLRPC_Message($message)\r
+    {\r
+        $this->message =& $message;\r
+    }\r
+\r
+    function parse()\r
+    {\r
+        // first remove the XML declaration\r
+        // merged from WP #10698 - this method avoids the RAM usage of preg_replace on very large messages\r
+        $header = preg_replace( '/<\?xml.*?\?'.'>/', '', substr($this->message, 0, 100), 1);\r
+        $this->message = substr_replace($this->message, $header, 0, 100);\r
+        if (trim($this->message) == '') {\r
+            return false;\r
+        }\r
+        $this->_parser = xml_parser_create();\r
+        // Set XML parser to take the case of tags in to account\r
+        xml_parser_set_option($this->_parser, XML_OPTION_CASE_FOLDING, false);\r
+        // Set XML parser callback functions\r
+        xml_set_object($this->_parser, $this);\r
+        xml_set_element_handler($this->_parser, 'tag_open', 'tag_close');\r
+        xml_set_character_data_handler($this->_parser, 'cdata');\r
+        $chunk_size = 262144; // 256Kb, parse in chunks to avoid the RAM usage on very large messages\r
+        do {\r
+            if (strlen($this->message) <= $chunk_size) {\r
+                $final = true;\r
+            }\r
+            $part = substr($this->message, 0, $chunk_size);\r
+            $this->message = substr($this->message, $chunk_size);\r
+            if (!xml_parse($this->_parser, $part, $final)) {\r
+                return false;\r
+            }\r
+            if ($final) {\r
+                break;\r
+            }\r
+        } while (true);\r
+        xml_parser_free($this->_parser);\r
+\r
+        // Grab the error messages, if any\r
+        if ($this->messageType == 'fault') {\r
+            $this->faultCode = $this->params[0]['faultCode'];\r
+            $this->faultString = $this->params[0]['faultString'];\r
+        }\r
+        return true;\r
+    }\r
+\r
+    function tag_open($parser, $tag, $attr)\r
+    {\r
+        $this->_currentTagContents = '';\r
+        $this->currentTag = $tag;\r
+        switch($tag) {\r
+            case 'methodCall':\r
+            case 'methodResponse':\r
+            case 'fault':\r
+                $this->messageType = $tag;\r
+                break;\r
+                /* Deal with stacks of arrays and structs */\r
+            case 'data':    // data is to all intents and puposes more interesting than array\r
+                $this->_arraystructstypes[] = 'array';\r
+                $this->_arraystructs[] = array();\r
+                break;\r
+            case 'struct':\r
+                $this->_arraystructstypes[] = 'struct';\r
+                $this->_arraystructs[] = array();\r
+                break;\r
+        }\r
+    }\r
+\r
+    function cdata($parser, $cdata)\r
+    {\r
+        $this->_currentTagContents .= $cdata;\r
+    }\r
+\r
+    function tag_close($parser, $tag)\r
+    {\r
+        $valueFlag = false;\r
+        switch($tag) {\r
+            case 'int':\r
+            case 'i4':\r
+                $value = (int)trim($this->_currentTagContents);\r
+                $valueFlag = true;\r
+                break;\r
+            case 'double':\r
+                $value = (double)trim($this->_currentTagContents);\r
+                $valueFlag = true;\r
+                break;\r
+            case 'string':\r
+                $value = (string)trim($this->_currentTagContents);\r
+                $valueFlag = true;\r
+                break;\r
+            case 'dateTime.iso8601':\r
+                $value = new NXS_XMLRPC_Date(trim($this->_currentTagContents));\r
+                $valueFlag = true;\r
+                break;\r
+            case 'value':\r
+                // "If no type is indicated, the type is string."\r
+                if (trim($this->_currentTagContents) != '') {\r
+                    $value = (string)$this->_currentTagContents;\r
+                    $valueFlag = true;\r
+                }\r
+                break;\r
+            case 'boolean':\r
+                $value = (boolean)trim($this->_currentTagContents);\r
+                $valueFlag = true;\r
+                break;\r
+            case 'base64':\r
+                $value = base64_decode($this->_currentTagContents);\r
+                $valueFlag = true;\r
+                break;\r
+                /* Deal with stacks of arrays and structs */\r
+            case 'data':\r
+            case 'struct':\r
+                $value = array_pop($this->_arraystructs);\r
+                array_pop($this->_arraystructstypes);\r
+                $valueFlag = true;\r
+                break;\r
+            case 'member':\r
+                array_pop($this->_currentStructName);\r
+                break;\r
+            case 'name':\r
+                $this->_currentStructName[] = trim($this->_currentTagContents);\r
+                break;\r
+            case 'methodName':\r
+                $this->methodName = trim($this->_currentTagContents);\r
+                break;\r
+        }\r
+\r
+        if ($valueFlag) {\r
+            if (count($this->_arraystructs) > 0) {\r
+                // Add value to struct or array\r
+                if ($this->_arraystructstypes[count($this->_arraystructstypes)-1] == 'struct') {\r
+                    // Add to struct\r
+                    $this->_arraystructs[count($this->_arraystructs)-1][$this->_currentStructName[count($this->_currentStructName)-1]] = $value;\r
+                } else {\r
+                    // Add to array\r
+                    $this->_arraystructs[count($this->_arraystructs)-1][] = $value;\r
+                }\r
+            } else {\r
+                // Just add as a paramater\r
+                $this->params[] = $value;\r
+            }\r
+        }\r
+        $this->_currentTagContents = '';\r
+    }\r
+}\r
+\r
+/**\r
+ * NXS_XMLRPC_Server\r
+ *\r
+ * @package IXR\r
+ * @since 1.5\r
+ */\r
+class NXS_XMLRPC_Server\r
+{\r
+    var $data;\r
+    var $callbacks = array();\r
+    var $message;\r
+    var $capabilities;\r
+\r
+    function NXS_XMLRPC_Server($callbacks = false, $data = false, $wait = false)\r
+    {\r
+        $this->setCapabilities();\r
+        if ($callbacks) {\r
+            $this->callbacks = $callbacks;\r
+        }\r
+        $this->setCallbacks();\r
+        if (!$wait) {\r
+            $this->serve($data);\r
+        }\r
+    }\r
+\r
+    function serve($data = false)\r
+    {\r
+        if (!$data) {\r
+            if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] !== 'POST') {\r
+                header('Content-Type: text/plain'); // merged from WP #9093\r
+                die('XML-RPC server accepts POST requests only.');\r
+            }\r
+\r
+            global $HTTP_RAW_POST_DATA;\r
+            if (empty($HTTP_RAW_POST_DATA)) {\r
+                // workaround for a bug in PHP 5.2.2 - http://bugs.php.net/bug.php?id=41293\r
+                $data = file_get_contents('php://input');\r
+            } else {\r
+                $data =& $HTTP_RAW_POST_DATA;\r
+            }\r
+        }\r
+        $this->message = new NXS_XMLRPC_Message($data);\r
+        if (!$this->message->parse()) {\r
+            $this->error(-32700, 'parse error. not well formed');\r
+        }\r
+        if ($this->message->messageType != 'methodCall') {\r
+            $this->error(-32600, 'server error. invalid xml-rpc. not conforming to spec. Request must be a methodCall');\r
+        }\r
+        $result = $this->call($this->message->methodName, $this->message->params);\r
+\r
+        // Is the result an error?\r
+        if (is_a($result, 'NXS_XMLRPC_Error')) {\r
+            $this->error($result);\r
+        }\r
+\r
+        // Encode the result\r
+        $r = new NXS_XMLRPC_Value($result);\r
+        $resultxml = $r->getXml();\r
+\r
+        // Create the XML\r
+        $xml = <<<EOD\r
+<methodResponse>\r
+  <params>\r
+    <param>\r
+      <value>\r
+      $resultxml\r
+      </value>\r
+    </param>\r
+  </params>\r
+</methodResponse>\r
+\r
+EOD;\r
+      // Send it\r
+      $this->output($xml);\r
+    }\r
+\r
+    function call($methodname, $args)\r
+    {\r
+        if (!$this->hasMethod($methodname)) {\r
+            return new NXS_XMLRPC_Error(-32601, 'server error. requested method '.$methodname.' does not exist.');\r
+        }\r
+        $method = $this->callbacks[$methodname];\r
+\r
+        // Perform the callback and send the response\r
+        if (count($args) == 1) {\r
+            // If only one paramater just send that instead of the whole array\r
+            $args = $args[0];\r
+        }\r
+\r
+        // Are we dealing with a function or a method?\r
+        if (is_string($method) && substr($method, 0, 5) == 'this:') {\r
+            // It's a class method - check it exists\r
+            $method = substr($method, 5);\r
+            if (!method_exists($this, $method)) {\r
+                return new NXS_XMLRPC_Error(-32601, 'server error. requested class method "'.$method.'" does not exist.');\r
+            }\r
+\r
+            //Call the method\r
+            $result = $this->$method($args);\r
+        } else {\r
+            // It's a function - does it exist?\r
+            if (is_array($method)) {\r
+                if (!method_exists($method[0], $method[1])) {\r
+                    return new NXS_XMLRPC_Error(-32601, 'server error. requested object method "'.$method[1].'" does not exist.');\r
+                }\r
+            } else if (!function_exists($method)) {\r
+                return new NXS_XMLRPC_Error(-32601, 'server error. requested function "'.$method.'" does not exist.');\r
+            }\r
+\r
+            // Call the function\r
+            $result = call_user_func($method, $args);\r
+        }\r
+        return $result;\r
+    }\r
+\r
+    function error($error, $message = false)\r
+    {\r
+        // Accepts either an error object or an error code and message\r
+        if ($message && !is_object($error)) {\r
+            $error = new NXS_XMLRPC_Error($error, $message);\r
+        }\r
+        $this->output($error->getXml());\r
+    }\r
+\r
+    function output($xml)\r
+    {\r
+        $xml = '<?xml version="1.0"?>'."\n".$xml;\r
+        $length = strlen($xml);\r
+        header('Connection: close');\r
+        header('Content-Length: '.$length);\r
+        header('Content-Type: text/xml');\r
+        header('Date: '.date('r'));\r
+        echo $xml;\r
+        exit;\r
+    }\r
+\r
+    function hasMethod($method)\r
+    {\r
+        return in_array($method, array_keys($this->callbacks));\r
+    }\r
+\r
+    function setCapabilities()\r
+    {\r
+        // Initialises capabilities array\r
+        $this->capabilities = array(\r
+            'xmlrpc' => array(\r
+                'specUrl' => 'http://www.xmlrpc.com/spec',\r
+                'specVersion' => 1\r
+        ),\r
+            'faults_interop' => array(\r
+                'specUrl' => 'http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php',\r
+                'specVersion' => 20010516\r
+        ),\r
+            'system.multicall' => array(\r
+                'specUrl' => 'http://www.xmlrpc.com/discuss/msgReader$1208',\r
+                'specVersion' => 1\r
+        ),\r
+        );\r
+    }\r
+\r
+    function getCapabilities($args)\r
+    {\r
+        return $this->capabilities;\r
+    }\r
+\r
+    function setCallbacks()\r
+    {\r
+        $this->callbacks['system.getCapabilities'] = 'this:getCapabilities';\r
+        $this->callbacks['system.listMethods'] = 'this:listMethods';\r
+        $this->callbacks['system.multicall'] = 'this:multiCall';\r
+    }\r
+\r
+    function listMethods($args)\r
+    {\r
+        // Returns a list of methods - uses array_reverse to ensure user defined\r
+        // methods are listed before server defined methods\r
+        return array_reverse(array_keys($this->callbacks));\r
+    }\r
+\r
+    function multiCall($methodcalls)\r
+    {\r
+        // See http://www.xmlrpc.com/discuss/msgReader$1208\r
+        $return = array();\r
+        foreach ($methodcalls as $call) {\r
+            $method = $call['methodName'];\r
+            $params = $call['params'];\r
+            if ($method == 'system.multicall') {\r
+                $result = new NXS_XMLRPC_Error(-32600, 'Recursive calls to system.multicall are forbidden');\r
+            } else {\r
+                $result = $this->call($method, $params);\r
+            }\r
+            if (is_a($result, 'NXS_XMLRPC_Error')) {\r
+                $return[] = array(\r
+                    'faultCode' => $result->code,\r
+                    'faultString' => $result->message\r
+                );\r
+            } else {\r
+                $return[] = array($result);\r
+            }\r
+        }\r
+        return $return;\r
+    }\r
+}\r
+\r
+/**\r
+ * NXS_XMLRPC_Request\r
+ *\r
+ * @package IXR\r
+ * @since 1.5\r
+ */\r
+class NXS_XMLRPC_Request\r
+{\r
+    var $method;\r
+    var $args;\r
+    var $xml;\r
+\r
+    function NXS_XMLRPC_Request($method, $args)\r
+    {\r
+        $this->method = $method;\r
+        $this->args = $args;\r
+        $this->xml = <<<EOD\r
+<?xml version="1.0"?>\r
+<methodCall>\r
+<methodName>{$this->method}</methodName>\r
+<params>\r
+\r
+EOD;\r
+        foreach ($this->args as $arg) {\r
+            $this->xml .= '<param><value>';\r
+            $v = new NXS_XMLRPC_Value($arg);\r
+            $this->xml .= $v->getXml();\r
+            $this->xml .= "</value></param>\n";\r
+        }\r
+        $this->xml .= '</params></methodCall>';\r
+    }\r
+\r
+    function getLength()\r
+    {\r
+        return strlen($this->xml);\r
+    }\r
+\r
+    function getXml()\r
+    {\r
+        return $this->xml;\r
+    }\r
+}\r
+\r
+/**\r
+ * NXS_XMLRPC_Client\r
+ *\r
+ * @package IXR\r
+ * @since 1.5\r
+ *\r
+ */\r
+class NXS_XMLRPC_Client\r
+{\r
+    var $server;\r
+    var $port;\r
+    var $path;\r
+    var $scheme;\r
+    var $useragent;\r
+    var $response;\r
+    var $message = false;\r
+    var $debug = false;\r
+    var $timeout;\r
+\r
+    // Storage place for an error message\r
+    var $error = false;\r
+\r
+    function NXS_XMLRPC_Client($server, $path = false, $port = 80, $timeout = 25)\r
+    {\r
+        if (!$path) {\r
+            // Assume we have been given a URL instead\r
+            $bits = parse_url($server);\r
+            $this->server = $bits['host'];\r
+            $this->scheme = isset($bits['scheme']) ? $bits['scheme'] : 'http';\r
+            $this->port = isset($bits['port']) ? $bits['port'] : ($bits['scheme']=='https'?443:80);\r
+            $this->path = isset($bits['path']) ? $bits['path'] : '/';\r
+\r
+            // Make absolutely sure we have a path\r
+            if (!$this->path) {\r
+                $this->path = '/';\r
+            }\r
+        } else {\r
+            $this->server = $server;\r
+            $this->path = $path;\r
+            $this->port = $port;\r
+        }\r
+        $this->useragent = 'The Incutio XML-RPC PHP Library';\r
+        $this->timeout = $timeout;\r
+    }\r
+\r
+    function queryFS()\r
+    {\r
+        $args = func_get_args();\r
+        $method = array_shift($args);\r
+        $request = new NXS_XMLRPC_Request($method, $args);\r
+        $length = $request->getLength();\r
+        $xml = $request->getXml();\r
+        $r = "\r\n";\r
+        $request  = "POST {$this->path} HTTP/1.0$r";\r
+\r
+        // Merged from WP #8145 - allow custom headers\r
+        $this->headers['Host']          = $this->server;\r
+        $this->headers['Content-Type']  = 'text/xml';\r
+        $this->headers['User-Agent']    = $this->useragent;\r
+        $this->headers['Content-Length']= $length;\r
+\r
+        foreach( $this->headers as $header => $value ) {\r
+            $request .= "{$header}: {$value}{$r}";\r
+        }\r
+        $request .= $r;\r
+\r
+        $request .= $xml;\r
+\r
+        // Now send the request\r
+        if ($this->debug) {\r
+            echo '<pre class="NXS_XMLRPC_request">'.htmlspecialchars($request)."\n</pre>\n\n";\r
+        }\r
+\r
+        if ($this->timeout) {\r
+            $fp = @fsockopen($this->server, $this->port, $errno, $errstr, $this->timeout);\r
+        } else {\r
+            $fp = @fsockopen($this->server, $this->port, $errno, $errstr);\r
+        }\r
+        if (!$fp) {\r
+            $this->error = new NXS_XMLRPC_Error(-32300, 'transport error - could not open socket');\r
+            return false;\r
+        }\r
+        fputs($fp, $request);\r
+        $contents = '';\r
+        $debugContents = '';\r
+        $gotFirstLine = false;\r
+        $gettingHeaders = true;\r
+        while (!feof($fp)) {\r
+            $line = fgets($fp, 4096);\r
+            if (!$gotFirstLine) {\r
+                // Check line for '200'\r
+                if (strstr($line, '200') === false) {\r
+                    $this->error = new NXS_XMLRPC_Error(-32300, 'transport error - HTTP status code was not 200');\r
+                    return false;\r
+                }\r
+                $gotFirstLine = true;\r
+            }\r
+            if (trim($line) == '') {\r
+                $gettingHeaders = false;\r
+            }\r
+            if (!$gettingHeaders) {\r
+                // merged from WP #12559 - remove trim\r
+                $contents .= $line;\r
+            }\r
+            if ($this->debug) {\r
+                $debugContents .= $line;\r
+            }\r
+        }\r
+        if ($this->debug) {\r
+            echo '<pre class="NXS_XMLRPC_response">'.htmlspecialchars($debugContents)."\n</pre>\n\n";\r
+        }\r
+\r
+        // Now parse what we've got back\r
+        $this->message = new NXS_XMLRPC_Message($contents);\r
+        if (!$this->message->parse()) {\r
+            // XML error\r
+            $this->error = new NXS_XMLRPC_Error(-32700, 'parse error. not well formed');\r
+            return false;\r
+        }\r
+\r
+        // Is the message a fault?\r
+        if ($this->message->messageType == 'fault') {\r
+            $this->error = new NXS_XMLRPC_Error($this->message->faultCode, $this->message->faultString);\r
+            return false;\r
+        }\r
+\r
+        // Message must be OK\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * Set the query to send to the XML-RPC Server\r
+     * @since 0.1.0\r
+     */\r
+    function query()\r
+    {\r
+        $args = func_get_args();\r
+        $method = array_shift($args);\r
+        $request = new NXS_XMLRPC_Request($method, $args);\r
+        $length = $request->getLength();\r
+        $xml = $request->getXml();\r
+\r
+        if ($this->debug) {\r
+            echo '<pre>'.htmlspecialchars($xml)."\n</pre>\n\n";\r
+        }\r
+\r
+        //This is where we deviate from the normal query()\r
+        //Rather than open a normal sock, we will actually use the cURL\r
+        //extensions to make the calls, and handle the SSL stuff.\r
+\r
+        //Since 04Aug2004 (0.1.3) - Need to include the port (duh...)\r
+        //Since 06Oct2004 (0.1.4) - Need to include the colon!!!\r
+        //        (I swear I've fixed this before... ESP in live... But anyhu...)\r
+        $curl=curl_init($this->scheme.'://' . $this->server . ':' . $this->port . $this->path);\r
+        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r
+\r
+        curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.44 Safari/537.36"); \r
+\r
+        //Since 23Jun2004 (0.1.2) - Made timeout a class field\r
+        curl_setopt($curl, CURLOPT_TIMEOUT, $this->timeout);\r
+\r
+        if ($this->debug) {\r
+            curl_setopt($curl, CURLOPT_VERBOSE, 1);\r
+        }\r
+\r
+\r
+        curl_setopt($curl, CURLOPT_HEADER, 1);\r
+        curl_setopt($curl, CURLOPT_POST, 1);\r
+        curl_setopt($curl, CURLOPT_POSTFIELDS, $xml);\r
+        curl_setopt($curl, CURLOPT_PORT, $this->port);\r
+        curl_setopt($curl, CURLOPT_HTTPHEADER, array(\r
+                                    "Content-Type: text/xml",\r
+                                    "Content-length: {$length}"));\r
+\r
+        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);\r
+        global $nxs_skipSSLCheck; if ($nxs_skipSSLCheck===true) curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\r
+\r
+        // Call cURL to do it's stuff and return us the content\r
+        $contents = curl_exec($curl); $err = curl_errno($curl); $errmsg = curl_error($curl); \r
+        curl_close($curl);\r
+\r
+        // Check for 200 Code in $contents\r
+        if (!strstr($contents, '200 OK')) {\r
+            //There was no "200 OK" returned - we failed\r
+            $this->error = new NXS_XMLRPC_Error(-32300, 'transport error - HTTP status code was not 200 - '.$err.' - '.$errmsg.' | '.print_r($contents, true));\r
+            return false;\r
+        }\r
+\r
+        if ($this->debug) {\r
+            echo '<pre>'.htmlspecialchars($contents)."\n</pre>\n\n";\r
+        }\r
+        // Now parse what we've got back\r
+        // Since 20Jun2004 (0.1.1) - We need to remove the headers first\r
+        // Why I have only just found this, I will never know...\r
+        // So, remove everything before the first <\r
+        $contents = substr($contents,strpos($contents, '<'));\r
+\r
+        $this->message = new NXS_XMLRPC_Message($contents);\r
+        if (!$this->message->parse()) {\r
+            // XML error\r
+            $this->error = new NXS_XMLRPC_Error(-32700, 'parse error. not well formed');\r
+            return false;\r
+        }\r
+        // Is the message a fault?\r
+        if ($this->message->messageType == 'fault') {\r
+            $this->error = new NXS_XMLRPC_Error($this->message->faultCode, $this->message->faultString);\r
+            return false;\r
+        }\r
+\r
+        // Message must be OK\r
+        return true;\r
+    }\r
+    \r
+    function getResponse()\r
+    {\r
+        // methodResponses can only have one param - return that\r
+        return $this->message->params[0];\r
+    }\r
+\r
+    function isError()\r
+    {\r
+        return (is_object($this->error));\r
+    }\r
+\r
+    function getErrorCode()\r
+    {\r
+        return $this->error->code;\r
+    }\r
+\r
+    function getErrorMessage()\r
+    {\r
+        return $this->error->message;\r
+    }\r
+}\r
+\r
+\r
+/**\r
+ * NXS_XMLRPC_Error\r
+ *\r
+ * @package IXR\r
+ * @since 1.5\r
+ */\r
+class NXS_XMLRPC_Error\r
+{\r
+    var $code;\r
+    var $message;\r
+\r
+    function NXS_XMLRPC_Error($code, $message)\r
+    {\r
+        $this->code = $code;\r
+        $this->message = htmlspecialchars($message);\r
+    }\r
+\r
+    function getXml()\r
+    {\r
+        $xml = <<<EOD\r
+<methodResponse>\r
+  <fault>\r
+    <value>\r
+      <struct>\r
+        <member>\r
+          <name>faultCode</name>\r
+          <value><int>{$this->code}</int></value>\r
+        </member>\r
+        <member>\r
+          <name>faultString</name>\r
+          <value><string>{$this->message}</string></value>\r
+        </member>\r
+      </struct>\r
+    </value>\r
+  </fault>\r
+</methodResponse>\r
+\r
+EOD;\r
+        return $xml;\r
+    }\r
+}\r
+\r
+/**\r
+ * NXS_XMLRPC_Date\r
+ *\r
+ * @package IXR\r
+ * @since 1.5\r
+ */\r
+class NXS_XMLRPC_Date {\r
+    var $year;\r
+    var $month;\r
+    var $day;\r
+    var $hour;\r
+    var $minute;\r
+    var $second;\r
+    var $timezone;\r
+\r
+    function NXS_XMLRPC_Date($time)\r
+    {\r
+        // $time can be a PHP timestamp or an ISO one\r
+        if (is_numeric($time)) {\r
+            $this->parseTimestamp($time);\r
+        } else {\r
+            $this->parseIso($time);\r
+        }\r
+    }\r
+\r
+    function parseTimestamp($timestamp)\r
+    {\r
+        $this->year = date('Y', $timestamp);\r
+        $this->month = date('m', $timestamp);\r
+        $this->day = date('d', $timestamp);\r
+        $this->hour = date('H', $timestamp);\r
+        $this->minute = date('i', $timestamp);\r
+        $this->second = date('s', $timestamp);\r
+        $this->timezone = '';\r
+    }\r
+\r
+    function parseIso($iso)\r
+    {\r
+        $this->year = substr($iso, 0, 4);\r
+        $this->month = substr($iso, 4, 2);\r
+        $this->day = substr($iso, 6, 2);\r
+        $this->hour = substr($iso, 9, 2);\r
+        $this->minute = substr($iso, 12, 2);\r
+        $this->second = substr($iso, 15, 2);\r
+        $this->timezone = substr($iso, 17);\r
+    }\r
+\r
+    function getIso()\r
+    {\r
+        return $this->year.$this->month.$this->day.'T'.$this->hour.':'.$this->minute.':'.$this->second.$this->timezone;\r
+    }\r
+\r
+    function getXml()\r
+    {\r
+        return '<dateTime.iso8601>'.$this->getIso().'</dateTime.iso8601>';\r
+    }\r
+\r
+    function getTimestamp()\r
+    {\r
+        return mktime($this->hour, $this->minute, $this->second, $this->month, $this->day, $this->year);\r
+    }\r
+}\r
+\r
+/**\r
+ * NXS_XMLRPC_Base64\r
+ *\r
+ * @package IXR\r
+ * @since 1.5\r
+ */\r
+class NXS_XMLRPC_Base64\r
+{\r
+    var $data;\r
+\r
+    function NXS_XMLRPC_Base64($data)\r
+    {\r
+        $this->data = $data;\r
+    }\r
+\r
+    function getXml()\r
+    {\r
+        return '<base64>'.base64_encode($this->data).'</base64>';\r
+    }\r
+}\r
+\r
+/**\r
+ * NXS_XMLRPC_IntrospectionServer\r
+ *\r
+ * @package IXR\r
+ * @since 1.5\r
+ */\r
+class NXS_XMLRPC_IntrospectionServer extends NXS_XMLRPC_Server\r
+{\r
+    var $signatures;\r
+    var $help;\r
+\r
+    function NXS_XMLRPC_IntrospectionServer()\r
+    {\r
+        $this->setCallbacks();\r
+        $this->setCapabilities();\r
+        $this->capabilities['introspection'] = array(\r
+            'specUrl' => 'http://xmlrpc.usefulinc.com/doc/reserved.html',\r
+            'specVersion' => 1\r
+        );\r
+        $this->addCallback(\r
+            'system.methodSignature',\r
+            'this:methodSignature',\r
+            array('array', 'string'),\r
+            'Returns an array describing the return type and required parameters of a method'\r
+        );\r
+        $this->addCallback(\r
+            'system.getCapabilities',\r
+            'this:getCapabilities',\r
+            array('struct'),\r
+            'Returns a struct describing the XML-RPC specifications supported by this server'\r
+        );\r
+        $this->addCallback(\r
+            'system.listMethods',\r
+            'this:listMethods',\r
+            array('array'),\r
+            'Returns an array of available methods on this server'\r
+        );\r
+        $this->addCallback(\r
+            'system.methodHelp',\r
+            'this:methodHelp',\r
+            array('string', 'string'),\r
+            'Returns a documentation string for the specified method'\r
+        );\r
+    }\r
+\r
+    function addCallback($method, $callback, $args, $help)\r
+    {\r
+        $this->callbacks[$method] = $callback;\r
+        $this->signatures[$method] = $args;\r
+        $this->help[$method] = $help;\r
+    }\r
+\r
+    function call($methodname, $args)\r
+    {\r
+        // Make sure it's in an array\r
+        if ($args && !is_array($args)) {\r
+            $args = array($args);\r
+        }\r
+\r
+        // Over-rides default call method, adds signature check\r
+        if (!$this->hasMethod($methodname)) {\r
+            return new NXS_XMLRPC_Error(-32601, 'server error. requested method "'.$this->message->methodName.'" not specified.');\r
+        }\r
+        $method = $this->callbacks[$methodname];\r
+        $signature = $this->signatures[$methodname];\r
+        $returnType = array_shift($signature);\r
+\r
+        // Check the number of arguments\r
+        if (count($args) != count($signature)) {\r
+            return new NXS_XMLRPC_Error(-32602, 'server error. wrong number of method parameters');\r
+        }\r
+\r
+        // Check the argument types\r
+        $ok = true;\r
+        $argsbackup = $args;\r
+        for ($i = 0, $j = count($args); $i < $j; $i++) {\r
+            $arg = array_shift($args);\r
+            $type = array_shift($signature);\r
+            switch ($type) {\r
+                case 'int':\r
+                case 'i4':\r
+                    if (is_array($arg) || !is_int($arg)) {\r
+                        $ok = false;\r
+                    }\r
+                    break;\r
+                case 'base64':\r
+                case 'string':\r
+                    if (!is_string($arg)) {\r
+                        $ok = false;\r
+                    }\r
+                    break;\r
+                case 'boolean':\r
+                    if ($arg !== false && $arg !== true) {\r
+                        $ok = false;\r
+                    }\r
+                    break;\r
+                case 'float':\r
+                case 'double':\r
+                    if (!is_float($arg)) {\r
+                        $ok = false;\r
+                    }\r
+                    break;\r
+                case 'date':\r
+                case 'dateTime.iso8601':\r
+                    if (!is_a($arg, 'NXS_XMLRPC_Date')) {\r
+                        $ok = false;\r
+                    }\r
+                    break;\r
+            }\r
+            if (!$ok) {\r
+                return new NXS_XMLRPC_Error(-32602, 'server error. invalid method parameters');\r
+            }\r
+        }\r
+        // It passed the test - run the "real" method call\r
+        return parent::call($methodname, $argsbackup);\r
+    }\r
+\r
+    function methodSignature($method)\r
+    {\r
+        if (!$this->hasMethod($method)) {\r
+            return new NXS_XMLRPC_Error(-32601, 'server error. requested method "'.$method.'" not specified.');\r
+        }\r
+        // We should be returning an array of types\r
+        $types = $this->signatures[$method];\r
+        $return = array();\r
+        foreach ($types as $type) {\r
+            switch ($type) {\r
+                case 'string':\r
+                    $return[] = 'string';\r
+                    break;\r
+                case 'int':\r
+                case 'i4':\r
+                    $return[] = 42;\r
+                    break;\r
+                case 'double':\r
+                    $return[] = 3.1415;\r
+                    break;\r
+                case 'dateTime.iso8601':\r
+                    $return[] = new NXS_XMLRPC_Date(time());\r
+                    break;\r
+                case 'boolean':\r
+                    $return[] = true;\r
+                    break;\r
+                case 'base64':\r
+                    $return[] = new NXS_XMLRPC_Base64('base64');\r
+                    break;\r
+                case 'array':\r
+                    $return[] = array('array');\r
+                    break;\r
+                case 'struct':\r
+                    $return[] = array('struct' => 'struct');\r
+                    break;\r
+            }\r
+        }\r
+        return $return;\r
+    }\r
+\r
+    function methodHelp($method)\r
+    {\r
+        return $this->help[$method];\r
+    }\r
+}\r
+\r
+/**\r
+ * NXS_XMLRPC_ClientMulticall\r
+ *\r
+ * @package IXR\r
+ * @since 1.5\r
+ */\r
+class NXS_XMLRPC_ClientMulticall extends NXS_XMLRPC_Client\r
+{\r
+    var $calls = array();\r
+\r
+    function NXS_XMLRPC_ClientMulticall($server, $path = false, $port = 80)\r
+    {\r
+        parent::NXS_XMLRPC_Client($server, $path, $port);\r
+        $this->useragent = 'The Incutio XML-RPC PHP Library (multicall client)';\r
+    }\r
+\r
+    function addCall()\r
+    {\r
+        $args = func_get_args();\r
+        $methodName = array_shift($args);\r
+        $struct = array(\r
+            'methodName' => $methodName,\r
+            'params' => $args\r
+        );\r
+        $this->calls[] = $struct;\r
+    }\r
+\r
+    function query()\r
+    {\r
+        // Prepare multicall, then call the parent::query() method\r
+        return parent::query('system.multicall', $this->calls);\r
+    }\r
+}\r
+\r
+/**\r
+ * Client for communicating with a XML-RPC Server over HTTPS.\r
+ *\r
+ * @author Jason Stirk <jstirk@gmm.com.au> (@link http://blog.griffin.homelinux.org/projects/xmlrpc/)\r
+ * @version 0.2.0 26May2005 08:34 +0800\r
+ * @copyright (c) 2004-2005 Jason Stirk\r
+ * @package IXR\r
+ */\r
+class NXS_XMLRPC_ClientSSL extends NXS_XMLRPC_Client\r
+{\r
+    /**\r
+     * Filename of the SSL Client Certificate\r
+     * @access private\r
+     * @since 0.1.0\r
+     * @var string\r
+     */\r
+    var $_certFile;\r
+\r
+    /**\r
+     * Filename of the SSL CA Certificate\r
+     * @access private\r
+     * @since 0.1.0\r
+     * @var string\r
+     */\r
+    var $_caFile;\r
+\r
+    /**\r
+     * Filename of the SSL Client Private Key\r
+     * @access private\r
+     * @since 0.1.0\r
+     * @var string\r
+     */\r
+    var $_keyFile;\r
+\r
+    /**\r
+     * Passphrase to unlock the private key\r
+     * @access private\r
+     * @since 0.1.0\r
+     * @var string\r
+     */\r
+    var $_passphrase;\r
+\r
+    /**\r
+     * Constructor\r
+     * @param string $server URL of the Server to connect to\r
+     * @since 0.1.0\r
+     */\r
+    function NXS_XMLRPC_ClientSSL($server, $path = false, $port = 443, $timeout = false)\r
+    {\r
+        parent::NXS_XMLRPC_Client($server, $path, $port, $timeout);\r
+        $this->useragent = 'The Incutio XML-RPC PHP Library for SSL';\r
+\r
+        // Set class fields\r
+        $this->_certFile=false;\r
+        $this->_caFile=false;\r
+        $this->_keyFile=false;\r
+        $this->_passphrase='';\r
+    }\r
+\r
+    /**\r
+     * Set the client side certificates to communicate with the server.\r
+     *\r
+     * @since 0.1.0\r
+     * @param string $certificateFile Filename of the client side certificate to use\r
+     * @param string $keyFile Filename of the client side certificate's private key\r
+     * @param string $keyPhrase Passphrase to unlock the private key\r
+     */\r
+    function setCertificate($certificateFile, $keyFile, $keyPhrase='')\r
+    {\r
+        // Check the files all exist\r
+        if (is_file($certificateFile)) {\r
+            $this->_certFile = $certificateFile;\r
+        } else {\r
+            die('Could not open certificate: ' . $certificateFile);\r
+        }\r
+\r
+        if (is_file($keyFile)) {\r
+            $this->_keyFile = $keyFile;\r
+        } else {\r
+            die('Could not open private key: ' . $keyFile);\r
+        }\r
+\r
+        $this->_passphrase=(string)$keyPhrase;\r
+    }\r
+\r
+    function setCACertificate($caFile)\r
+    {\r
+        if (is_file($caFile)) {\r
+            $this->_caFile = $caFile;\r
+        } else {\r
+            die('Could not open CA certificate: ' . $caFile);\r
+        }\r
+    }\r
+\r
+    /**\r
+     * Sets the connection timeout (in seconds)\r
+     * @param int $newTimeOut Timeout in seconds\r
+     * @returns void\r
+     * @since 0.1.2\r
+     */\r
+    function setTimeOut($newTimeOut)\r
+    {\r
+        $this->timeout = (int)$newTimeOut;\r
+    }\r
+\r
+    /**\r
+     * Returns the connection timeout (in seconds)\r
+     * @returns int\r
+     * @since 0.1.2\r
+     */\r
+    function getTimeOut()\r
+    {\r
+        return $this->timeout;\r
+    }\r
+\r
+    /**\r
+     * Set the query to send to the XML-RPC Server\r
+     * @since 0.1.0\r
+     */\r
+    function query()\r
+    {\r
+        $args = func_get_args();\r
+        $method = array_shift($args);\r
+        $request = new NXS_XMLRPC_Request($method, $args);\r
+        $length = $request->getLength();\r
+        $xml = $request->getXml();\r
+\r
+        if ($this->debug) {\r
+            echo '<pre>'.htmlspecialchars($xml)."\n</pre>\n\n";\r
+        }\r
+\r
+        //This is where we deviate from the normal query()\r
+        //Rather than open a normal sock, we will actually use the cURL\r
+        //extensions to make the calls, and handle the SSL stuff.\r
+\r
+        //Since 04Aug2004 (0.1.3) - Need to include the port (duh...)\r
+        //Since 06Oct2004 (0.1.4) - Need to include the colon!!!\r
+        //        (I swear I've fixed this before... ESP in live... But anyhu...)\r
+        $curl=curl_init('https://' . $this->server . ':' . $this->port . $this->path);\r
+        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r
+\r
+        //Since 23Jun2004 (0.1.2) - Made timeout a class field\r
+        curl_setopt($curl, CURLOPT_TIMEOUT, $this->timeout);\r
+\r
+        if ($this->debug) {\r
+            curl_setopt($curl, CURLOPT_VERBOSE, 1);\r
+        }\r
+\r
+        curl_setopt($curl, CURLOPT_HEADER, 1);\r
+        curl_setopt($curl, CURLOPT_POST, 1);\r
+        curl_setopt($curl, CURLOPT_POSTFIELDS, $xml);\r
+        curl_setopt($curl, CURLOPT_PORT, $this->port);\r
+        curl_setopt($curl, CURLOPT_HTTPHEADER, array(\r
+                                    "Content-Type: text/xml",\r
+                                    "Content-length: {$length}"));\r
+\r
+        // Process the SSL certificates, etc. to use\r
+        if (!($this->_certFile === false)) {\r
+            // We have a certificate file set, so add these to the cURL handler\r
+            curl_setopt($curl, CURLOPT_SSLCERT, $this->_certFile);\r
+            curl_setopt($curl, CURLOPT_SSLKEY, $this->_keyFile);\r
+\r
+            if ($this->debug) {\r
+                echo "SSL Cert at : " . $this->_certFile . "\n";\r
+                echo "SSL Key at : " . $this->_keyFile . "\n";\r
+            }\r
+\r
+            // See if we need to give a passphrase\r
+            if (!($this->_passphrase === '')) {\r
+                curl_setopt($curl, CURLOPT_SSLCERTPASSWD, $this->_passphrase);\r
+            }\r
+\r
+            if ($this->_caFile === false) {\r
+                // Don't verify their certificate, as we don't have a CA to verify against\r
+                curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);\r
+            } else {\r
+                // Verify against a CA\r
+                curl_setopt($curl, CURLOPT_CAINFO, $this->_caFile);\r
+            }\r
+        }\r
+        global $nxs_skipSSLCheck; if ($nxs_skipSSLCheck===true) curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\r
+        // Call cURL to do it's stuff and return us the content\r
+        $contents = curl_exec($curl); $err = curl_errno($curl); $errmsg = curl_error($curl);\r
+        curl_close($curl);\r
+\r
+        // Check for 200 Code in $contents\r
+        if (!strstr($contents, '200 OK')) {\r
+            //There was no "200 OK" returned - we failed\r
+            $this->error = new NXS_XMLRPC_Error(-32300, 'transport error - HTTP status code was not 200! - '.$err.' - '.$errmsg.' | '.print_r($contents, true));\r
+            return false;\r
+        }\r
+\r
+        if ($this->debug) {\r
+            echo '<pre>'.htmlspecialchars($contents)."\n</pre>\n\n";\r
+        }\r
+        // Now parse what we've got back\r
+        // Since 20Jun2004 (0.1.1) - We need to remove the headers first\r
+        // Why I have only just found this, I will never know...\r
+        // So, remove everything before the first <\r
+        $contents = substr($contents,strpos($contents, '<'));\r
+\r
+        $this->message = new NXS_XMLRPC_Message($contents);\r
+        if (!$this->message->parse()) {\r
+            // XML error\r
+            $this->error = new NXS_XMLRPC_Error(-32700, 'parse error. not well formed');\r
+            return false;\r
+        }\r
+        // Is the message a fault?\r
+        if ($this->message->messageType == 'fault') {\r
+            $this->error = new NXS_XMLRPC_Error($this->message->faultCode, $this->message->faultString);\r
+            return false;\r
+        }\r
+\r
+        // Message must be OK\r
+        return true;\r
+    }\r
+}\r
+\r
+/**\r
+ * Extension of the {@link NXS_XMLRPC_Server} class to easily wrap objects.\r
+ *\r
+ * Class is designed to extend the existing XML-RPC server to allow the\r
+ * presentation of methods from a variety of different objects via an\r
+ * XML-RPC server.\r
+ * It is intended to assist in organization of your XML-RPC methods by allowing\r
+ * you to "write once" in your existing model classes and present them.\r
+ *\r
+ * @author Jason Stirk <jstirk@gmm.com.au>\r
+ * @version 1.0.1 19Apr2005 17:40 +0800\r
+ * @copyright Copyright (c) 2005 Jason Stirk\r
+ * @package IXR\r
+ */\r
+class NXS_XMLRPC_ClassServer extends NXS_XMLRPC_Server\r
+{\r
+    var $_objects;\r
+    var $_delim;\r
+\r
+    function NXS_XMLRPC_ClassServer($delim = '.', $wait = false)\r
+    {\r
+        $this->NXS_XMLRPC_Server(array(), false, $wait);\r
+        $this->_delimiter = $delim;\r
+        $this->_objects = array();\r
+    }\r
+\r
+    function addMethod($rpcName, $functionName)\r
+    {\r
+        $this->callbacks[$rpcName] = $functionName;\r
+    }\r
+\r
+    function registerObject($object, $methods, $prefix=null)\r
+    {\r
+        if (is_null($prefix))\r
+        {\r
+            $prefix = get_class($object);\r
+        }\r
+        $this->_objects[$prefix] = $object;\r
+\r
+        // Add to our callbacks array\r
+        foreach($methods as $method)\r
+        {\r
+            if (is_array($method))\r
+            {\r
+                $targetMethod = $method[0];\r
+                $method = $method[1];\r
+            }\r
+            else\r
+            {\r
+                $targetMethod = $method;\r
+            }\r
+            $this->callbacks[$prefix . $this->_delimiter . $method]=array($prefix, $targetMethod);\r
+        }\r
+    }\r
+\r
+    function call($methodname, $args)\r
+    {\r
+        if (!$this->hasMethod($methodname)) {\r
+            return new NXS_XMLRPC_Error(-32601, 'server error. requested method '.$methodname.' does not exist.');\r
+        }\r
+        $method = $this->callbacks[$methodname];\r
+\r
+        // Perform the callback and send the response\r
+        if (count($args) == 1) {\r
+            // If only one paramater just send that instead of the whole array\r
+            $args = $args[0];\r
+        }\r
+\r
+        // See if this method comes from one of our objects or maybe self\r
+        if (is_array($method) || (substr($method, 0, 5) == 'this:')) {\r
+            if (is_array($method)) {\r
+                $object=$this->_objects[$method[0]];\r
+                $method=$method[1];\r
+            } else {\r
+                $object=$this;\r
+                $method = substr($method, 5);\r
+            }\r
+\r
+            // It's a class method - check it exists\r
+            if (!method_exists($object, $method)) {\r
+                return new NXS_XMLRPC_Error(-32601, 'server error. requested class method "'.$method.'" does not exist.');\r
+            }\r
+\r
+            // Call the method\r
+            $result = $object->$method($args);\r
+        } else {\r
+            // It's a function - does it exist?\r
+            if (!function_exists($method)) {\r
+                return new NXS_XMLRPC_Error(-32601, 'server error. requested function "'.$method.'" does not exist.');\r
+            }\r
+\r
+            // Call the function\r
+            $result = $method($args);\r
+        }\r
+        return $result;\r
+    }\r
+}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/bg.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/bg.api.php
new file mode 100644 (file)
index 0000000..e0b78a9
--- /dev/null
@@ -0,0 +1,66 @@
+<?php    \r
+//## NextScripts Facebook Connection Class\r
+$nxs_snapAPINts[] = array('code'=>'BG', 'lcode'=>'bg', 'name'=>'Blogger');\r
+\r
+if (!class_exists("nxs_class_SNAP_BG")) { class nxs_class_SNAP_BG {\r
+    \r
+    var $ntCode = 'BG';\r
+    var $ntLCode = 'bg';     \r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; \r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }    \r
+    \r
+    function doPostToNT($options, $message){ $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>''); // prr($message);  prr($options);\r
+      //## Check API Lib\r
+      //if (!function_exists('doConnectToBlogger')) if (file_exists('apis/postToGooglePlus.php')) require_once ('apis/postToGooglePlus.php'); elseif (file_exists('/home/_shared/deSrc.php')) require_once ('/home/_shared/deSrc.php');       \r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }   \r
+      if ( (!isset($options['bgUName']) || empty($options['bgPass'])) && empty($options['AccessToken'])) { $badOut['Error'] = 'Not Configured'; return $badOut; }      \r
+      //## Format\r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['bgMsgFormat'], $message); \r
+      if (!empty($message['pTitle'])) $msgT = $message['pTitle']; else $msgT = nxs_doFormatMsg($options['bgMsgTFormat'], $message); \r
+      if ($options['bgInclTags']=='1') $tags = nsTrnc($message['tags'], 195, ',', ''); else $tags = ''; \r
+      //## Check/Fix HTML   \r
+      if (class_exists('DOMDocument')) {$doc = new DOMDocument();  @$doc->loadHTML('<?xml encoding="UTF-8">' .$msg); $doc->encoding = 'UTF-8'; $msg = $doc->saveHTML(); $msg = CutFromTo($msg, '<body>', '</body>'); \r
+        $msg = preg_replace('/<br(.*?)\/?>/','<br$1/>',$msg);   $msg = preg_replace('/<img(.*?)\/?>/','<img$1/>',$msg);\r
+        require ('apis/htmlNumTable.php');  if (is_array($HTML401NamedToNumeric)) { $msg = strtr($msg, $HTML401NamedToNumeric); $msgT = strtr($msgT, $HTML401NamedToNumeric); }\r
+      }    \r
+      $msg = preg_replace('/<script\b[^>]*>(.*?)<\/script>/is', "", $msg); $msg = preg_replace('/<!--(.*)-->/Uis', "", $msg);  $nxshf = new NXS_HtmlFixer(); $nxshf->debug = false; $msg = $nxshf->getFixedHtml($msg);     \r
+      $msg = str_replace("\r\n","\n", $msg); $msg = str_replace("\n\r","\n", $msg); $msg = str_replace("\r","\n", $msg); $msg = str_replace("\n","<br/>", $msg);  \r
+      //## Make Post\r
+      $email = $options['bgUName'];  $pass = substr($options['bgPass'], 0, 5)=='b4d7s'?nsx_doDecode(substr($options['bgPass'], 5)):$options['bgPass']; $blogID = $options['bgBlogID']; // prr($msgT); prr($msg); die();\r
+      if (class_exists('nxsAPI_GP') && !empty($options['bgUName']) && empty($options['APIKey'])) {           \r
+          $nt = new nxsAPI_GP(); if(!empty($options['ck'])) $nt->ck = $options['ck'];  $nt->debug = false;  $loginError = $nt->connect($email, $pass, 'BG');     \r
+          if (!$loginError){          \r
+             $result = $nt -> postBG($blogID, $msgT, $msg, $tags);// prr($result); \r
+          } else {  $badOut['Error'] = "Login/Connection Error: ". print_r($loginError, true); return $badOut; }       \r
+          if (is_array($result) && $result['isPosted']=='1') nxs_save_glbNtwrks('bg', $options['ii'], $nt->ck, 'ck');\r
+          return $result;         \r
+      } else { \r
+        //## Refresh token\r
+        if (function_exists('get_option')) $currTime = time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); else  $currTime = time();\r
+        if ($options['AccessTokenExp']<$currTime){\r
+          $tknURL = 'https://www.googleapis.com/oauth2/v3/token?refresh_token='.$options['RefreshToken'].'&client_id='.$options['APIKey'].'&client_secret='.$options['APISec'].'&grant_type=refresh_token';\r
+          $response  = wp_remote_post($tknURL); $resp = json_decode($response['body'], true); $options['AccessToken'] = $resp['access_token']; $options['AccessTokenExp'] = $currTime + $resp['expires_in'];\r
+          nxs_save_glbNtwrks('bg', $options['ii'], $resp['access_token'], 'AccessTokenExp'); nxs_save_glbNtwrks('bg', $options['ii'], $options['AccessTokenExp'], 'AccessTokenExp');   \r
+          //nxs_addToLogN('S', 'Test', $logNT, 'Token Refreshed '.date('Y-m-d H:i:s',$options['AccessTokenExp'])."|".$tknURL.$options['AccessToken'].print_r($response, true));\r
+        } \r
+        //## Post\r
+        $post = array("kind"=>"blogger#post", "blog"=>array("id"=>$blogID), "title"=> $msgT,  "content" => $msg ); $post = json_encode($post); // prr($post);        \r
+        $hdrsArr = array('Content-Type'=>'application/json'); $advSet = array('headers' => $hdrsArr, 'httpversion' => '1.1', 'timeout' => 45, 'redirection' => 0, 'body' => $post);         \r
+        $tknURL = 'https://www.googleapis.com/blogger/v3/blogs/'.$blogID.'/posts?access_token='.$options['AccessToken'].''; $ret = ''; $response  = wp_remote_post($tknURL, $advSet); //prr($tknURL); prr($response);      \r
+        if ((is_object($response) && isset($response->errors))) $badOut['Error'] = print_r($response, true); else $ret = json_decode($response['body'], true);  //prr($ret);\r
+        if (is_array($ret) && !empty($ret['id'])) return array('postID'=>$ret['id'], 'isPosted'=>1, 'postURL'=>$ret['url'], 'pDate'=>date('Y-m-d H:i:s')); \r
+          else { $badOut['Error'].= "Error: ".print_r($ret, true); return $badOut;}        \r
+      } \r
+      //## Return      \r
+      if (is_array($ret) && $ret['post_id']!='') {\r
+         return array('postID'=>$ret['post_id'], 'isPosted'=>1, 'postURL'=>$ret['post_id'], 'pDate'=>date('Y-m-d H:i:s'));          \r
+      } else { $badOut['Error'] .= print_r($ret, true); \r
+         return $badOut;\r
+      }\r
+    }\r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/bg.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/bg.php
new file mode 100644 (file)
index 0000000..b6fdcc9
--- /dev/null
@@ -0,0 +1,323 @@
+<?php    \r
+//## NextScripts Blogger  Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'BG', 'lcode'=>'bg', 'name'=>'Blogger');\r
+\r
+if (!class_exists("nxs_snapClassBG")) { class nxs_snapClassBG { var $ntInfo = array('code'=>'BG', 'lcode'=>'bg', 'name'=>'Blogger', 'defNName'=>'ulName', 'tstReq' => true);\r
+  //#### Show Common Settings  \r
+  function showGenNTSettings($ntOpts){ global $nxs_snapSetPgURL, $nxs_plurl, $nxs_gOptions;  $ntInfo = $this->ntInfo; \r
+    // V2 Auth\r
+    if ( isset($_GET['code']) && $_GET['code']!='' && isset($_GET['state']) && substr($_GET['state'], 0, 7) == 'nxs-bg-'){  $at = $_GET['code'];  $ii = str_replace('nxs-bg-','',$_GET['state']);\r
+      echo "----=={ oAuth 2.0 Wordflow }==----<br/>-= This is normal technical authorization info that will dissapear (Unless you get some errors) =- <br/><br/><br/>"; \r
+      $gGet = $_GET; unset($gGet['code']); unset($gGet['state']); unset($gGet['post_type']); $sturl = explode('?',$nxs_snapSetPgURL); $nxs_snapSetPgURL = $sturl[0].((!empty($gGet))?'?'.http_build_query($gGet):''); \r
+      \r
+      $nto = $ntOpts[$ii]; $wprg = array();  $wprg['sslverify'] = false;\r
+      if (isset($nto['APIKey'])){ echo "-="; prr($nto);// die();\r
+        $tknURL = 'https://www.googleapis.com/oauth2/v3/token?code='.$at.'&redirect_uri='.urlencode($nxs_snapSetPgURL).'&scope=&client_id='.$nto['APIKey'].'&client_secret='.$nto['APISec'].'&grant_type=authorization_code';\r
+        $response  = wp_remote_post($tknURL, $wprg); prr($tknURL);      \r
+        if((is_object($response)&&(isset($response->errors)))){ prr($response); die(); }\r
+        if (is_array($response)&& stripos($response['body'],'"error":')!==false){ prr($response['body']); prr(json_decode($response['body'],true)); die(); }\r
+        $resp = json_decode($response['body'], true); prr($resp); if (!is_array($resp) || empty($resp['access_token'])) { prr($resp); die(); }\r
+        if (function_exists('get_option')) $currTime = time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); else  $currTime = time();\r
+        $nto['AccessToken'] = $resp['access_token']; $nto['AccessTokenSecret'] = 'No Need for oAuth V2'; $nto['OAuthVerifier'] = 'No Need for oAuth V2';\r
+        $nto['AccessTokenExp'] = $currTime + $resp['expires_in'];  $nto['RefreshToken'] = $resp['refresh_token'];  echo "<br/>----=={ Expires: ".date('Y-m-d H:i:s', $nto['AccessTokenExp'])." }==---- <br/>";\r
+        \r
+        if (!empty($nto['bgBlogID'])){\r
+          if (substr($nto['bgBlogID'], 0, 4)=='http') $tknURL = 'https://www.googleapis.com/blogger/v3/blogs/byurl/?url='.$nto['bgBlogID'].'?access_token='.$nto['AccessToken'];  \r
+            else $tknURL = 'https://www.googleapis.com/blogger/v3/blogs/'.$nto['bgBlogID'].'?access_token='.$nto['AccessToken']; \r
+        }\r
+        \r
+        $response  = wp_remote_get($tknURL, $wprg); prr($tknURL); prr($response);  $user = json_decode($response['body'], true); prr($user);\r
+       \r
+        if (!empty($user['url'])) { $nto['blogURL'] = $user['url']; $nto['bgBlogID'] = $user['id']; $nto['blogInfo'] = $user['name']." [".$user['id']."] (".$user['url'].")"; \r
+          if (function_exists('get_option')) $nxs_gOptions = get_option('NS_SNAutoPoster'); if(!empty($nxs_gOptions)) { $nxs_gOptions['bg'][$ii] = $nto; prr($nto); nxs_settings_save($nxs_gOptions); }\r
+          ?><script type="text/javascript">window.location = "<?php echo $nxs_snapSetPgURL; ?>"</script>      \r
+        <?php }        \r
+      }\r
+      die();\r
+    }\r
+    ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = !empty($pbo[$ntInfo['defNName']])?$pbo[$ntInfo['defNName']]:'Blogger'; \r
+          if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['AccessToken']) && $pbo['AccessTokenSecret']!='')?'1':'';\r
+        ?>\r
+          <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />\r
+           <?php } ?>\r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?> <?php if (!class_exists('nxsAPI_GP') && !empty($pbo['bgUName']) && empty($pbo['APIKey'])){ ?><b style="color: #800000"><?php  _e('Attention requred. "ClientLogin" authentication method is no longer supported by Blogger', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?> <a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;\r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($bo){ $po = array('nName'=>'', 'ulName'=>'', 'bgPass'=>'', 'grpID'=>'', 'uPage'=>'', 'doBG'=>'1', 'APIKey'=>'', 'bgBlogID'=>'', 'APISec'=>'', 'userInfo'=>'', 'OAuthToken'=>'', 'msgFormat'=>'New post has been published on %SITENAME%', 'msgFormatT'=>'New post - %TITLE%' ); $po['ntInfo']= array('lcode'=>'bg'); $this->showNTSettings($bo, $po, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl,$nxs_snapSetPgURL;  $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['bgOK'])) $options['bgOK'] = ''; \r
+  \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['msgAFrmt'])) $options['msgAFrmt'] = ''; \r
+    if (empty($options['apiToUse'])) { if (!empty($options['APIKey'])) $options['apiToUse'] = 'bg'; if (!empty($options['bgUName']) && !empty($options['bgPass'])) $options['apiToUse'] = 'nx'; } ?>\r
+    <div id="doBG<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">   <input type="hidden" name="apDoSBG<?php echo $ii; ?>" value="0" id="apDoSBG<?php echo $ii; ?>" />                                     \r
+    <?php if ($isNew) { ?> <input type="hidden" name="bg[<?php echo $ii; ?>][apDoBG]" value="1" id="apDoNewBG<?php echo $ii; ?>" /> <?php } ?>\r
+            <div id="doBG<?php echo $ii; ?>Div" style="margin-left: 10px;"> \r
+            \r
+            <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/bg16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/setup-installation-blogger-social-networks-auto-poster-wordpress/"><?php $nType="Blogger"; printf( __( 'Detailed %s Installation/Configuration Instructions' , 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?></a></div>\r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="bg[<?php echo $ii; ?>][nName]" id="bgnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel('bg', $ii, $options['qTLng']); ?>\r
+            \r
+            <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+    \r
+    <?php if (!class_exists('nxsAPI_GP') && !empty($options['bgUName']) && empty($options['APIKey'])){ ?> <span style="color: red;">Blogger has <a style="color: red;" target="_blank" href="https://developers.google.com/identity/protocols/AuthForInstalledApps">discontinued support for "ClientLogin" authentication method</a>. This account should be removed and re-added with oAuth authentication method or upgraded to NextScripts API</span><br/></hr>\r
+            \r
+            <?php } ?>\r
+            \r
+            <div style="width:100%;"><strong>Blogger Blog ID:</strong> \r
+            <p style="font-size: 11px; margin: 0px;"><?php _e('Log to your Blogger management panel and look at the URL of your blog: http://www.blogger.com/blogger.g?blogID=8959085979163812093#allposts. Your Blog ID will be: 8959085979163812093', 'social-networks-auto-poster-facebook-twitter-g'); ?></p>\r
+            </div><input name="bg[<?php echo $ii; ?>][bgBlogID]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['bgBlogID'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /> <br/><br/>\r
+    \r
+    <div style="display: <?php echo (empty($options['apiToUse']))?"block":"none"; ?>;">    \r
+    <div style="width:100%; text-align: center; color:#005800; font-weight: bold; font-size: 14px;">You can choose what API you would like to use. </div>          \r
+    <span style="color:#005800; font-weight: bold; font-size: 14px;">Blogger Native API:</span> Free built-in API from Blogger. More secure, more stable. More complicated - <b style="color: red;">requires approval of access to API by Google (3-5 days)</b> and authorization. <br/><br/>    \r
+    <span style="color:#005800; font-weight: bold; font-size: 14px;">NextScripts API for Blogger:</span> Premium API with extended functionality. Easier to configure, but less secure - requires your password.<br/><br/>\r
+    \r
+      <select name="bg[<?php echo $ii; ?>][apiToUse]" onchange="if (jQuery(this).val()=='bg') { jQuery('.nxs_bg_nxapi_<?php echo $ii; ?>').hide(); jQuery('.nxs_bg_bgapi_<?php echo $ii; ?>').show(); }else { jQuery('.nxs_bg_bgapi_<?php echo $ii; ?>').hide(); jQuery('.nxs_bg_nxapi_<?php echo $ii; ?>').show(); }"><option <?php echo (empty($options['apiToUse']) || $options['apiToUse'] =='bg')?"selected":""; ?> value="bg">Blogger API</option><option <?php echo (!empty($options['apiToUse']) && $options['apiToUse'] =='nx')?"selected":""; ?> value="nx">NextScripts API</option></select><hr/>\r
+    \r
+    </div>\r
+    \r
+    <div id="nxsAPIBG<?php echo $ii; ?>" class="nxs_bg_bgapi_<?php echo $ii; ?>" style="display: <?php echo (empty($options['apiToUse']) || $options['apiToUse'] =='bg')?"block":"none"; ?>;"><h3>Blogger API</h3>\r
+    \r
+            <div class="subDiv" id="sub<?php echo $ii; ?>DivL" style="display: block;">\r
+            \r
+            <div style="width:100%;"><strong>Client ID:</strong> </div><input name="bg[<?php echo $ii; ?>][APIKey]" style="width: 70%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['APIKey'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />             \r
+            <div style="width:100%;"><strong>Client Secret:</strong> </div><input name="bg[<?php echo $ii; ?>][APISec]" id="APISec" style="width: 70%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['APISec'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+            <br/><br/>\r
+             <?php \r
+            if($options['APIKey']=='') { ?>\r
+            <b>Authorize Your Blogger Account</b>. Please save your settings and come back here to Authorize your account.\r
+            <?php } else { if(isset($options['AccessToken']) && isset($options['AccessTokenSecret']) && $options['AccessTokenSecret']!=='') { ?>\r
+            Your Blogger Account has been authorized. <br/>Blog ID: <?php _e(apply_filters('format_to_edit', $options['blogInfo']), 'social-networks-auto-poster-facebook-twitter-g') ?>. \r
+            <br/>You can Re- <?php } ?>                              \r
+            \r
+            <a  href="https://accounts.google.com/o/oauth2/auth?redirect_uri=<?php echo trim(urlencode($nxs_snapSetPgURL));?>&response_type=code&client_id=<?php echo trim($options['APIKey']);?>&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fblogger&approval_prompt=force&access_type=offline&state=<?php echo 'nxs-bg-'.$ii; ?>">Authorize Your Blogger Account</a>            \r
+            \r
+            \r
+            <?php if (empty($options['AccessTokenSecret'])) { ?> <div class="blnkg">&lt;=== Authorize your account ===</div> <?php } ?>\r
+            \r
+            <?php } ?>\r
+            </div>\r
+             </div>\r
+           <div id="nxsAPINX<?php echo $ii; ?>" class="nxs_bg_nxapi_<?php echo $ii; ?>" style="display: <?php echo (!empty($options['apiToUse']) && $options['apiToUse'] =='nx')?"block":"none"; ?>;"><h3>NextScripts API</h3>\r
+                        \r
+ <?php if (class_exists('nxsAPI_GP')) { ?>\r
+                 \r
+        <div class="subDiv" id="sub<?php echo $ii; ?>DivN" style="display: block;">            \r
+          <div style="width:100%;"><strong>Your Blogger Username/Email:</strong> </div><input name="bg[<?php echo $ii; ?>][bgUName]" style="width: 70%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['bgUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /> \r
+          <div style="width:100%;"><strong>Your Blogger Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" type="password" name="bg[<?php echo $ii; ?>][bgPass]" style="width: 75%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['bgPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+          \r
+            </div>          \r
+            <?php } else { nxs_show_noLibWrn('"NextScripts API Library for Blogger" is NOT installed'); } ?>           \r
+        </div>\r
+             <br/><hr/>   \r
+           <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="apBGTMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apBGTMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div> \r
+              \r
+              <input name="bg[<?php echo $ii; ?>][apBGMsgTFrmt]" id="apBGMsgTFrmt" style="width: 50%;" value="<?php if ($options['bgMsgTFormat']!='') _e(apply_filters('format_to_edit', htmlentities($options['bgMsgTFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); else echo "%TITLE%"; ?>" onfocus="mxs_showFrmtInfo('apBGTMsgFrmt<?php echo $ii; ?>');" /><?php nxs_doShowHint("apBGTMsgFrmt".$ii); ?><br/>\r
+            \r
+            <div id="altFormat" style="">\r
+   <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="apBGMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apBGMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>) \r
+   \r
+   <!-- \r
+   HTML is <?php if(!function_exists('doPostToGooglePlus')) {?> <b>NOT</b> <?php } ?> allowed. <?php if(!function_exists('doPostToGooglePlus')) {?> <i>- Blogger "Free API" limitation. Please get <a href="http://www.nextscripts.com/google-plus-automated-posting/#blogger">NextScripts API</a> to allow HTML</i> <?php } ?>   -->\r
+   </div>  \r
+   \r
+   <textarea cols="150" rows="3" id="bg<?php echo $ii; ?>SNAPformat" name="bg[<?php echo $ii; ?>][apBGMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#bg<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apBGMsgFrmt<?php echo $ii; ?>');"><?php if ($options['bgMsgFormat']!='') _e(apply_filters('format_to_edit',htmlentities($options['bgMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g');  else echo "%FULLTEXT% <br/><a href='%URL%'>%TITLE%</a>"; ?></textarea>\r
+   \r
+   <?php nxs_doShowHint("apBGMsgFrmt".$ii, __('HTML is allowed', 'social-networks-auto-poster-facebook-twitter-g'));  ?>\r
+            </div>\r
+            \r
+             <p style="margin-bottom: 20px;margin-top: 5px;"><input value="1"  id="bgInclTags" type="checkbox" name="bg[<?php echo $ii; ?>][bgInclTags]"  <?php if ((int)$options['bgInclTags'] == 1) echo "checked"; ?> /> \r
+              <strong><?php _e('Post with tags', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong>  <?php _e('Tags from the blogpost will be auto-posted to Blogger/Blogspot', 'social-networks-auto-poster-facebook-twitter-g'); ?>                                                               \r
+            </p> \r
+            \r
+            <?php if (!empty($options['bgPass']) || !empty($options['AccessToken'])) { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <?php if (!isset($options['bgOK']) || $options['bgOK']!='1') { ?> <div class="blnkg">=== <?php _e('Submit Test Post to Finish Configuration', 'social-networks-auto-poster-facebook-twitter-g'); ?> ===&gt;</div> <?php } ?> <a href="#" class="NXSButton" onclick="testPost('BG', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>         \r
+            <?php } ?>\r
+            \r
+            </div>\r
+              \r
+                <?php /* ######################## Advanced Tab ####################### */ ?>\r
+   <?php if (!$isNew) { ?>  <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+    <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); \r
+      nxs_showRepostSettings($nt, $ii, $options); ?>\r
+            \r
+            \r
+    </div>  <?php } ?> <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div>\r
+            \r
+            </div>\r
+        </div>\r
+        <?php\r
+      \r
+      \r
+  }\r
+ //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = $this->ntInfo['code'];\r
+    foreach ($post as $ii => $pval){// prr($pval);\r
+      if ( (!empty($pval['APISec']) && !empty($pval['APIKey'])) || (!empty($pval['bgUName']) && !empty($pval['bgPass'])) ) { if (!isset($options[$ii])) $options[$ii] = array();\r
+        \r
+                if (isset($pval['apDoBG']))   $options[$ii]['doBG'] = $pval['apDoBG']; else $options[$ii]['doBG'] = 0;\r
+                \r
+                if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+                if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+                \r
+                if (isset($pval['nName']))       $options[$ii]['nName'] = trim($pval['nName']);\r
+                if (isset($pval['bgUName']))   $options[$ii]['bgUName'] = trim($pval['bgUName']);\r
+                if (isset($pval['bgPass']))    $options[$ii]['bgPass'] = 'b4d7s'.nsx_doEncode($pval['bgPass']); else $options[$ii]['bgPass'] = '';\r
+                \r
+                if (isset($pval['APIKey']))   $options[$ii]['APIKey'] = trim($pval['APIKey']);\r
+                if (isset($pval['APISec']))   $options[$ii]['APISec'] = trim($pval['APISec']);\r
+                \r
+                if (isset($pval['bgBlogID']))     $options[$ii]['bgBlogID'] = trim($pval['bgBlogID']);                \r
+                if (isset($pval['apBGMsgFrmt']))  $options[$ii]['bgMsgFormat'] = trim($pval['apBGMsgFrmt']);                   \r
+                if (isset($pval['apBGMsgTFrmt'])) $options[$ii]['bgMsgTFormat'] = trim($pval['apBGMsgTFrmt']);         \r
+                if (isset($pval['bgInclTags']))   $options[$ii]['bgInclTags'] = $pval['bgInclTags'];  else $options[$ii]['bgInclTags'] = 0;        \r
+                \r
+                $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+                if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+                if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+                if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+                \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  } \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID;  $nt = 'bg'; $ntU = 'BG';\r
+    foreach($ntOpts as $ii=>$ntOpt){ $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapBG', true)); if (is_array($pMeta)) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]); \r
+       if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = '';\r
+       $doBG = $ntOpt['doBG'] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse']; $isAvailBG =  (!empty($ntOpt['bgUName']) && !empty($ntOpt['bgPass'])) || !empty($ntOpt['AccessToken']);  \r
+       $bgMsgFormat = htmlentities($ntOpt['bgMsgFormat'], ENT_COMPAT, "UTF-8");  $bgMsgTFormat = htmlentities($ntOpt['bgMsgTFormat'], ENT_COMPAT, "UTF-8");\r
+      ?>  \r
+      \r
+   <tr><th style="text-align:left;" colspan="2">\r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSel'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSel']; ?>" /> <?php } ?>\r
+      <?php if ($isAvailBG) { ?><input class="nxsGrpDoChb" value="1" id="doBG<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="bg[<?php echo $ii; ?>][doBG]" <?php if ((int)$doBG == 1) echo 'checked="checked" title="def"';  ?> /> <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="bg[<?php echo $ii; ?>][doBG]" value="<?php echo $doBG;?>"> <?php } ?> <?php } ?>\r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/bg16.png);">Blogger - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td style="min-width: 180px; width: 350px;" ><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvailBG) { ?>\r
+                    <input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToBG_repostButton" id="rePostToBG_button" value="<?php _e('Repost to Blogger', 'social-networks-auto-poster-facebook-twitter-g') ?>" />                    \r
+                    <?php } ?>\r
+                    \r
+                    <?php  if (is_array($pMeta) && !empty($pMeta[$ii]) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) {                         \r
+                        ?> <span id="pstdBG<?php echo $ii; ?>" style="float: right; padding-top: 4px; padding-right: 10px;">\r
+          <a style="font-size: 10px;" href="<?php echo $pMeta[$ii]['pgID']; ?>" target="_blank"><?php $nType="Blogger"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?><?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>                    \r
+                    \r
+                </td></tr>\r
+                <?php if (!$isAvailBG) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b><?php _e('Setup your Blogger Account to AutoPost to Blogger', 'social-networks-auto-poster-facebook-twitter-g') ?></b>\r
+                <?php }  else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>bg" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> /> \r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>                \r
+                </td></tr> <?php } ?>\r
+                \r
+                 <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Title Format:', 'NS_SPAP') ?></th>\r
+                <td><input value="<?php echo $bgMsgTFormat ?>" type="text" name="bg[<?php echo $ii; ?>][SNAPTformat]" style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apBGTMsgFrmt<?php echo $ii; ?>');"/><?php nxs_doShowHint("apBGTMsgFrmt".$ii, '', '58'); ?></td></tr>\r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Message Format:', 'NS_SPAP') ?></th>\r
+                <td>\r
+                <textarea cols="150" rows="1" id="bg<?php echo $ii; ?>SNAPformat" name="bg[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#bg<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apBGMsgFrmt<?php echo $ii; ?>');"><?php echo $bgMsgFormat; ?></textarea>                \r
+                <?php nxs_doShowHint("apBGMsgFrmt".$ii, '', '58'); ?></td></tr>                \r
+                <?php }\r
+    }      \r
+  }\r
+  \r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = '';\r
+     if (isset($pMeta['SNAPformat'])) $optMt['bgMsgFormat'] = $pMeta['SNAPformat'];  if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];      \r
+     if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+     if (isset($pMeta['SNAPTformat'])) $optMt['bgMsgTFormat'] = $pMeta['SNAPTformat'];      \r
+     if (isset($pMeta['doBG'])) $optMt['doBG'] = $pMeta['doBG'] == 1?1:0; else { if (isset($pMeta['SNAPformat']))  $optMt['doBG'] = 0; } \r
+     if (isset($pMeta['SNAPincludeBG']) && $pMeta['SNAPincludeBG'] == '1' ) $optMt['doBG'] = 1;  \r
+     return $optMt;\r
+  }\r
+}}\r
+\r
+if (!function_exists("nxs_rePostToBG_ajax")) { function nxs_rePostToBG_ajax() {  check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; // $result = nsPublishTo($id, 'FB', true);   \r
+      global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+      foreach ($options['bg'] as $ii=>$po) if ($ii==$_POST['nid']) {   $po['ii'] = $ii; $po['pType'] = 'aj';\r
+      $mpo =  get_post_meta($postID, 'snapBG', true); $mpo =  maybe_unserialize($mpo);       \r
+      if (is_array($mpo) && isset($mpo[$ii]) && is_array($mpo[$ii]) ){ $ntClInst = new nxs_snapClassBG(); $po = $ntClInst->adjMetaOpt($po, $mpo[$ii]); } \r
+      $result = nxs_doPublishToBG($postID, $po);  if ($result === 200) nxs_save_glbNtwrks('bg', $ii, 1, 'bgOK');       \r
+      if ($result == 200) die("Successfully sent your post to Blogger."); else die($result);\r
+    }    \r
+  }\r
+}\r
+\r
+if (!function_exists("nxs_doPublishToBG")) { //## Second Function to Post to BG\r
+  function nxs_doPublishToBG($postID, $options){ $ntCd = 'BG'; $ntCdL = 'bg'; $ntNm = 'Blogger';  if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true)); \r
+    //$backtrace = debug_backtrace(); nxs_addToLogN('W', 'Enter', $ntCd, 'I am here - '.$ntCd."|".print_r($backtrace, true), '');  \r
+   // if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToBG',  array($postID, $options));\r
+    $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url();     \r
+    $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'ACCNAME'=>$options['nName'], 'POSTID'=>$postID));\r
+    $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10));     \r
+    $logNT = '<span style="color:#F87907">'.$ntNm.'</span> - '.$options['nName']; \r
+    $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);   \r
+    if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+      $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {  \r
+         nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'); return;\r
+      }\r
+    }         \r
+    \r
+    if ($postID=='0') { echo "Testing ... <br/><br/>"; $options['bgMsgTFormat'] = 'Test Post from '.htmlentities($blogTitle);  $link = home_url(); $options['bgMsgFormat'] = 'Test Post from '.$blogTitle. ' <a href="'.$link.'">'.$link.'</a>'; }\r
+    else { $post = get_post($postID); if(!$post) return;  $options['bgMsgFormat'] = nsFormatMessage($options['bgMsgFormat'], $postID, $addParams); \r
+       $options['bgMsgTFormat'] = nsFormatMessage($options['bgMsgTFormat'], $postID, $addParams); nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1')); \r
+    }\r
+    $extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?$post->post_title:'');\r
+    //## Actual POST Code\r
+    if ($options['bgInclTags']=='1'){$t = wp_get_post_tags($postID); $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = implode('","',$tggs);  $tags = nsTrnc($tags, 195, ',', ''); }\r
+    if (substr($tags, -1)=='"') $tags = substr($tags, 0, -1); if (substr($tags, -1)==',') $tags = substr($tags, 0, -1); if (substr($tags, -1)=='"') $tags = substr($tags, 0, -1);   \r
+    //## Set Message\r
+    $message = array('title'=>'', 'announce'=>'', 'text'=>'', 'url'=>'', 'surl'=>'', 'urlDescr'=>'', 'urlTitle'=>'', 'imageURL' => array(), 'videoCode'=>'', 'videoURL'=>'', 'siteName'=>$blogTitle, 'tags'=>$tags, 'cats'=>'', 'authorName'=>'');    \r
+    //## Actual Post\r
+    $ntToPost = new nxs_class_SNAP_BG(); $ret = $ntToPost->doPostToNT($options, $message);\r
+    //## Process Results\r
+    if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+       if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+    } else {  // ## All Good - log it.\r
+      if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+        else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'pDate'=>date('Y-m-d H:i:s'))); \r
+        $extInfo .= ' | <a href="'.$ret['postURL'].'" target="_blank">Post Link</a>'; nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+    }\r
+    //## Return Result\r
+    if ($ret['isPosted']=='1') return 200; else return print_r($ret, true); \r
+  }\r
+}\r
+\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/da.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/da.api.php
new file mode 100644 (file)
index 0000000..d3e5758
--- /dev/null
@@ -0,0 +1,129 @@
+<?php    \r
+//## NextScripts deviantART Connection Class\r
+\r
+/* \r
+1. Options\r
+\r
+nName - Nickname of the account [Optional] (Presentation purposes only - No affect on functionality)\r
+rdUName - Reddit User Name\r
+rdPass - Reddit User Passord\r
+rdSubReddit - Name of the Sub-Reddit\r
+\r
+rdTitleFormat\r
+rdTextFormat\r
+\r
+2. Post Info\r
+\r
+url\r
+title - [up to 300 characters long] - title of the submission\r
+text\r
+\r
+*/\r
+$nxs_snapAPINts[] = array('code'=>'DA', 'lcode'=>'da', 'name'=>'deviantART');\r
+\r
+if (!function_exists("doConnectToDeviantART")) { function doConnectToDeviantART($unm, $pass){ }}\r
+\r
+if (!class_exists('nxsAPI_DA')){class nxsAPI_DA{ var $ck = array(); var $mh = '';  var $debug = false;\r
+    function headers($ref, $org='', $post=false, $aj=false){  $hdrsArr = array(); \r
+ $hdrsArr['Cache-Control']='max-age=0'; $hdrsArr['Connection']='keep-alive'; $hdrsArr['Referer']=$ref;\r
+ $hdrsArr['User-Agent']=': Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.39 Safari/537.36';\r
+ if($post==true) $hdrsArr['Content-Type']='application/x-www-form-urlencoded'; \r
+ if($aj==true) $hdrsArr['X-Requested-With']='XMLHttpRequest'; \r
+ if ($org!='') $hdrsArr['Origin']=$org; \r
+ $hdrsArr['Accept']='text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8';// $hdrsArr['DNT']='1';\r
+ if (function_exists('gzdeflate')) $hdrsArr['Accept-Encoding']='gzip,deflate,sdch'; \r
+ $hdrsArr['Accept-Language']='en-US,en;q=0.8'; return $hdrsArr;         \r
+    }\r
+    function check(){ $ck = $this->ck;  if (!empty($ck) && is_array($ck)) { $hdrsArr = $this->headers('https://www.deviantart.com'); if ($this->debug) echo "[DA] Checking....;<br/>\r\n";\r
+        $rep = nxs_remote_get('https://www.deviantart.com', array('headers' => $hdrsArr, 'httpversion' => '1.1', 'cookies' => $ck)); \r
+        if (is_wp_error($rep)) {  $badOut = print_r($rep, true)." - ERROR https://www.deviantart.com is not accessible. "; return $badOut; }  \r
+        $ck2 =  $rep['cookies']; for($i=0;$i<count($ck);$i++) if ($ck[$i]->name=='userinfo') $ck[$i]->value = urlencode($ck2[0]->value);  $this->ck = $ck;\r
+        if (is_nxs_error($rep)) return false; $contents = $rep['body']; //if ($this->debug) prr($contents);\r
+        $mh = CutFromTo($rep['body'], '$(\'#logoutme\').submit();">', 'data-ga_click_event'); $mh = CutFromTo($mh, 'href="', '"'); $this->mh = $mh;\r
+        return stripos($contents, 'https://www.deviantart.com/users/logout')!==false;\r
+      } else return false;\r
+    }\r
+    function connect($u,$p){ $badOut = 'Error: ';\r
+        //## Check if alrady IN\r
+        if (!$this->check()){ if ($this->debug) echo "[DA] NO Saved Data;<br/>\r\n";\r
+          $url = "https://www.deviantart.com/users/login";  $hdrsArr = $this->headers('http://www.deviantart.com/');\r
+          $rep = wp_remote_get($url, array( 'headers' => $hdrsArr, 'httpversion' => '1.1')); if (is_wp_error($rep)) {  $badOut = print_r($rep, true)." - ERROR Login 1"; return $badOut; }  $ck =  $rep['cookies'];\r
+          $rTok = CutFromTo($rep['body'], 'name="validate_token" value="', '"'); $rKey = CutFromTo($rep['body'], 'name="validate_key" value="', '"'); $ck[0]->value = urlencode($ck[0]->value);\r
+          $hdrsArr = $this->headers('https://www.deviantart.com/users/login', 'https://www.deviantart.com/', true);\r
+          $flds = array('ref' => 'https://www.deviantart.com/users/loggedin', 'username' => $u, 'password' => $p, 'remember_me' => '1', 'validate_token' => $rTok, 'validate_key' => $rKey);\r
+          $response = wp_remote_post( $url, array( 'method' => 'POST', 'httpversion' => '1.1', 'timeout' => 45, 'redirection' => 0, 'cookies' => $ck, 'headers' => $hdrsArr, 'body' => $flds));  \r
+          if (is_wp_error($response)) {  $badOut = print_r($response, true)." - ERROR Login 2"; return $badOut; }  \r
+          $ck =  $response['cookies']; for($i=0;$i<4;$i++) $ck[$i]->value = urlencode($ck[$i]->value);   \r
+          if (isset($response['headers']['location']) && stripos($response['headers']['location'], 'wrong-password')!==false  ) {  $badOut = "Wrong Password - ERROR"; return $badOut; }  \r
+          if (isset($response['headers']['location']) && ( $response['headers']['location']=='http://www.deviantart.com' || $response['headers']['location']=='https://www.deviantart.com/users/loggedin')) { \r
+            $hdrsArr = $this->headers('http://www.deviantart.com'); $rep = wp_remote_get( 'http://www.deviantart.com', array( 'headers' => $hdrsArr, 'httpversion' => '1.1', 'cookies' => $ck));// die();  prr($rep);     \r
+            if (is_wp_error($rep)) {  $badOut = print_r($rep, true)." - ERROR  Login 3"; return $badOut; } \r
+            $mh = CutFromTo($rep['body'], '$(\'#logoutme\').submit();">', 'data-ga_click_event'); $mh = CutFromTo($mh, 'href="', '"');\r
+            $ck2 =  $rep['cookies']; for($i=0;$i<count($ck);$i++) if ($ck[$i]->name=='userinfo') $ck[$i]->value = urlencode($ck2[0]->value);  $this->ck = $ck; $this->mh = $mh; return false;\r
+          } else  $badOut = print_r($response, true)." - ERROR  Login 4"; return $badOut; \r
+        } else { if ($this->debug) echo "[DA] Saved Data is OK;<br/>\r\n"; return false; }\r
+    }\r
+    function post($post){ $ck = $this->ck; $mh = $this->mh; $hdrsArr = $this->headers('http://www.deviantart.com/'); $badOut = '';\r
+      $advSets = array( 'headers' => $hdrsArr, 'cookies' => $ck); // prr($advSets);\r
+      $rep = wp_remote_get( $mh.'/journal/?edit', $advSets); if (is_wp_error($rep)) {  $badOut = print_r($rep, true)." - ERROR Post 1"; return $badOut; } \r
+      $contents = CutFromTo($rep['body'], '<h3 class="journal-editor-create">', '</form>'); // prr($contents);      \r
+      $md = array();  while (stripos($contents, '"hidden"')!==false){$contents = substr($contents, stripos($contents, '"hidden"')+8); $name = trim(CutFromTo($contents,'name="', '"'));\r
+        if (!in_array($name, $md)) { $md[] = $name; $val = trim(CutFromTo($contents,'value="', '"')); $flds[$name]= urldecode (nxs_decodeEntities($val)); }\r
+      } $flds['subject'] = nsTrnc(nxs_decodeEntities($post['title']), 50); $flds['body'] = trim($post['text']);  $flds['song'] = '';       \r
+      $flds['game'] = ''; $flds['book'] = ''; $flds['food'] = ''; $flds['movie'] = ''; $flds['drink'] = ''; $flds['flip'] = '0'; $flds['featured'] = '1'; \r
+      $flds['portal'] = '1'; $flds['skinlabel'] = 'No+skin'; $flds['jheader'] = ''; $flds['jcss'] = ''; $flds['jfooter'] = '';       \r
+      $ck2 =  $rep['cookies']; for($i=0;$i<count($ck);$i++) if ($ck[$i]->name=='userinfo') $ck[$i]->value = urlencode($ck2[0]->value);       \r
+      $fldsOut = http_build_query ($flds); $fldsOut = str_replace('No%2Bskin','No+skin',$fldsOut); $ckk = array(); for($i=0;$i<count($ck);$i++)  \r
+      if ($ck[$i]->name=='userinfo' || $ck[$i]->name=='auth') {$ckk[] = $ck[$i]; if ($ck[$i]->name=='userinfo') $ui = $ck[$i]->value; } $ck = $ckk; sleep(6); //## Important.      \r
+      $pid = CutFromTo($contents, '"pageviewID":"','"'); $iid = CutFromTo($contents, '"requestid":"','"');      \r
+      $dflds = array('ui'=>$ui,'pid'=>$pid, 'iid'=>$iid.'-i7ex4avh-1.0','t'=>'json'); $dfldsq = http_build_query($dflds);      \r
+      $dfldsq1 = 'ui='.$ui.'&c%5B%5D=%22Stash%22%2C%22create_journal%22%2C%5B%2235020854%22%2C%22'.urlencode($flds['subject']).'%22%2C%22'.urlencode($flds['subject']).'%22%2C%22-1%22%2C%7B%7D%5D&pid='.$pid.'&iid='.$iid.'-i7exlgzv-1.0&t=json';      \r
+      $hdrsArr = $this->headers($mh.'/journal/?edit', $mh, true); $advSets = array( 'method' => 'POST', 'httpversion' => '1.1', 'timeout' => 45, 'redirection' => 0, 'headers' => $hdrsArr, 'cookies' => $ck);       \r
+      $advSets['body'] = $dfldsq1; $rep = wp_remote_post($mh.'/global/difi/?', $advSets); //prr($mh.'/global/difi/?');  prr($advSets);       prr($rep); \r
+      if (is_wp_error($rep)) {  $badOut = print_r($rep, true)." - ERROR DFI 1"; return $badOut; } $cnt = $rep['body']; \r
+      if (stripos($cnt, '"status":"SUCCESS"')===false || stripos($cnt, '"args":["')===false) {  $badOut = print_r($cnt, true)." - ERROR DFI 1.1"; return $badOut; } else $npid = CutFromTo($cnt, '"args":["','"');\r
+      $dfldsq2 = 'ui='.$ui.'&c%5B%5D=%22Deviation%22%2C%22DeleteSingle%22%2C%5B%'.$npid.'%22%2C%221%22%5D&pid='.$pid.'&iid='.$iid.'-i7exlgzv-1.0&t=json';\r
+      $advSets['body'] = $dfldsq2; $rep = wp_remote_post($mh.'/global/difi/?', $advSets); // sleep(6); //## Important.      //prr($advSets); prr($rep); die();\r
+      $advSets['body'] = $fldsOut; $response = wp_remote_post($mh.'/journal/?edit', $advSets); //prr($mh.'/journal/?edit');  prr($advSets); prr($response);\r
+      if ($response['response']['code']=='200' && stripos($response['body'],'field_error')!==false) { $eRRMsg = CutFromTo($response['body'],'field_error', '</div>');  $eRRMsg = trim(strip_tags(CutFromTo($eRRMsg."|GGG|",'>', '|GGG|')));\r
+           $badOut = "POST Error: ".$eRRMsg; return $badOut;\r
+      }      \r
+      if ($response['response']['code']=='302') { $hdrsArr = $this->headers($mh);\r
+          $rep = wp_remote_get( $mh.'/journal/', array( 'headers' => $hdrsArr, 'cookies' => $ck)); \r
+          $daNewPostURL = CutFromTo($rep['body'], 'a data-deviationid="', '</a>'); $daNewPostURL = CutFromTo($daNewPostURL, 'href="', '"'); $daNewPostID = CutFromTo($rep['body'], 'a data-deviationid="', '"');          \r
+         return array('postID'=>$daNewPostID, 'isPosted'=>1, 'postURL'=>$daNewPostURL, 'pDate'=>date('Y-m-d H:i:s'));          \r
+      } else { $badOut .= 'Somethibng is not right';\r
+        return $badOut;\r
+      }\r
+      return $badOut;         \r
+    }\r
+    \r
+} }\r
+\r
+if (!class_exists("nxs_class_SNAP_DA")) { class nxs_class_SNAP_DA {\r
+    \r
+    var $ntCode = 'DA';\r
+    var $ntLCode = 'da';\r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array(); // return false;\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }       \r
+    \r
+    function doPostToNT($options, $message){ global $nxs_urlLen; $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>'');\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut = 'No Options'; return $badOut; }      \r
+      if (!isset($options['daUName']) || trim($options['daUName'])=='' || !isset($options['daPass']) || trim($options['daPass'])=='') { $badOut = 'No username/password Found'; return $badOut; }      \r
+      //## Format Post\r
+      if (!empty($message['pTitle'])) $title = $message['pTitle']; else $title = nxs_doFormatMsg($options['daTitleFormat'], $message); $title = nsTrnc($title, 300);  \r
+      if (!empty($message['pText'])) $text = $message['pText']; else $text = nxs_doFormatMsg($options['daTextFormat'], $message);     \r
+      //## Make Post            \r
+      if (!empty($options['ck'])) $ck = maybe_unserialize($options['ck']); if (!empty($options['mh'])) $mh = maybe_unserialize($options['mh']); \r
+      $pass = substr($options['daPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['daPass'], 5)):$options['uPass'];\r
+      $nt = new nxsAPI_DA(); $nt->debug = false; if (!empty($ck)) $nt->ck = $ck; if (!empty($mh)) $nt->mh = $mh; $loginErr = $nt->connect($options['daUName'], $pass); \r
+      if (!$loginErr) { $post = array('title'=>$title, 'text'=>$text ); $ret = $nt->post($post);         \r
+        if (is_array($ret)) { $ret['ck'] = $nt->ck; $ret['mh'] = $nt->mh; return $ret;  } else return print_r($ret, true);\r
+      } else return print_r($loginErr, true);  \r
+    }  \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/da.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/da.php
new file mode 100644 (file)
index 0000000..d2086bf
--- /dev/null
@@ -0,0 +1,235 @@
+<?php    \r
+//## NextScripts deviantART Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'DA', 'lcode'=>'da', 'name'=>'deviantART (!)');\r
+\r
+if (!class_exists("nxs_snapClassDA")) { class nxs_snapClassDA {\r
+  //#### Show Common Settings\r
+  function showGenNTSettings($ntOpts){  global $nxs_plurl; $ntInfo = array('code'=>'DA', 'lcode'=>'da', 'name'=>'deviantART', 'defNName'=>'daUName', 'tstReq' => false); ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php if(!function_exists('doConnectToDeviantART')) {?> deviantART doesn't have a built-in API for automated posts yet.  <br/>You need to get a special <a target="_blank" href="http://www.nextscripts.com/deviantart-automated-posting">library module</a> to be able to publish your content to deviantART. \r
+        <?php } else  foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>\r
+          <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />\r
+           <?php } ?>\r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;\r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php // $pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($options){ $nto = array('nName'=>'', 'doDA'=>'1', 'daUName'=>'', 'daPageID'=>'', 'daCommID'=>'', 'postType'=>'A', 'daPass'=>''); $nto['ntInfo']= array('lcode'=>'da'); $this->showNTSettings($options, $nto, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = '';  ?>\r
+            <div id="doDA<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">     <input type="hidden" value="0" id="apDoS<?php echo $ntU.$ii; ?>" />\r
+            \r
+            <div style="color:red;padding:5px;margin:5px; border: 1px solid darkred;">DeviantArt API is being extremely unstable and buggy on their side for the last several months. Until further notice DeviantArt connector is provided "as is". Please use it on your own risk. This may cause numerous of different issues including disapering posts, broken accounts, messed up posts, etc...<br/></div>\r
+            \r
+            <?php if(!function_exists('doConnectToDeviantART')) {?><span style="color:#580000; font-size: 16px;"><br/><br/>\r
+            <b><?php _e('deviantART API Library not found', 'social-networks-auto-poster-facebook-twitter-g'); ?></b>\r
+             <br/><br/> <?php _e('deviantART doesn\'t have a built-in API for automated posts yet.', 'social-networks-auto-poster-facebook-twitter-g'); ?> <br/><?php _e('<br/>You need to get a special <a target="_blank" href="http://www.nextscripts.com/deviantart-automated-posting"><b>API Library Module</b></a> to be able to publish your content to deviantART.', 'social-networks-auto-poster-facebook-twitter-g'); ?></span></div>\r
+            <?php return; }; ?>             \r
+                               \r
+            <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/da16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/setup-installation-deviantart-social-networks-auto-poster-wordpress/"><?php $nType="deviantART"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="da[<?php echo $ii; ?>][nName]" id="danName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel('da', $ii, $options['qTLng']); ?>\r
+            \r
+            \r
+          <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+      \r
+            \r
+            <div style="width:100%;"><strong>deviantART Username or Email:</strong> </div><input name="da[<?php echo $ii; ?>][uName]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['daUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+            <div style="width:100%;"><strong>deviantART Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="da[<?php echo $ii; ?>][uPass]" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['daPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['daPass'], 5)):$options['daPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>                            \r
+            <br/> \r
+            \r
+            <div id="altFormat" style="">\r
+  <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> (<a href="#" id="daTitleFormat<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('daTitleFormat<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div>\r
+              <input name="da[<?php echo $ii; ?>][daTitleFormat]" id="daTitleFormat<?php echo $ii; ?>" style="width: 50%;" value="<?php if ($isNew) echo "%TITLE%"; else _e(apply_filters('format_to_edit', htmlentities($options['daTitleFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?>"  onfocus="mxs_showFrmtInfo('daTitleFormat<?php echo $ii; ?>');" /><?php nxs_doShowHint("daTitleFormat".$ii); ?>\r
+            </div><br/> \r
+                      \r
+            <div id="altFormat" style="margin-left: 0px;">\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="daTextFormat<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('daTextFormat<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)\r
+              </div>\r
+              \r
+              <textarea cols="150" rows="3" id="da<?php echo $ii; ?>SNAPformat" name="da[<?php echo $ii; ?>][daTextFormat]" style="width:51%;max-width: 650px;" onfocus="jQuery('#da<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apDAMsgFrmt<?php echo $ii; ?>');"><?php if ($isNew) _e("%FULLTEXT%", 'social-networks-auto-poster-facebook-twitter-g'); else _e(apply_filters('format_to_edit', htmlentities($options['daTextFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea>\r
+              \r
+              <?php nxs_doShowHint("daTextFormat".$ii); ?>\r
+            </div><br/>          \r
+            \r
+            \r
+            <?php if ($isNew) { ?> <input type="hidden" name="da[<?php echo $ii; ?>][apDoDA]" value="1" id="apDoNewDA<?php echo $ii; ?>" /> <?php } ?>\r
+            <?php if ($options['daPass']!='') { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('DA', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>              <?php } \r
+            ?>\r
+            </div>\r
+            \r
+            <?php /* ######################## Advanced Tab ####################### */ ?>\r
+  <?php if (!$isNew) { ?>  <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+     <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); \r
+      nxs_showRepostSettings($nt, $ii, $options); ?>  \r
+            \r
+            \r
+    </div>  <?php } ?> <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div>\r
+            \r
+            </div><?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = 'DA'; $lcode = 'da'; \r
+    foreach ($post as $ii => $pval){ \r
+      if (!empty($pval['uName']) && !empty($pval['uPass'])){ if (!isset($options[$ii])) $options[$ii] = array();\r
+        if (isset($pval['uName']))   $options[$ii]['daUName'] = trim($pval['uName']);\r
+        if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);\r
+        if (isset($pval['uPass']))    $options[$ii]['daPass'] = 'n5g9a'.nsx_doEncode($pval['uPass']); else $options[$ii]['daPass'] = '';  \r
+        \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+\r
+        if (isset($pval['daTitleFormat'])) $options[$ii]['daTitleFormat'] = trim($pval['daTitleFormat']);\r
+        if (isset($pval['daTextFormat'])) $options[$ii]['daTextFormat'] = trim($pval['daTextFormat']);\r
+        \r
+        if (isset($pval['apDoDA']))      $options[$ii]['doDA'] = $pval['apDoDA']; else $options[$ii]['doDA'] = 0; \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }  \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'da'; $ntU = 'DA'; \r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapDA', true));  if (is_array($pMeta) && !empty($pMeta[$ii])) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]); \r
+        $doDA = $ntOpt['doDA'] && (is_array($pMeta) || $ntOpt['catSel']!='1');   \r
+        $isAvailDA =  $ntOpt['daUName']!='' && $ntOpt['daPass']!='';   $daMsgFormat = htmlentities($ntOpt['daTextFormat'], ENT_COMPAT, "UTF-8");      $daMsgTFormat = htmlentities($ntOpt['daTitleFormat'], ENT_COMPAT, "UTF-8");      \r
+\r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2">\r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvailDA) { ?><input class="nxsGrpDoChb" value="1" id="doDA<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="da[<?php echo $ii; ?>][doDA]" <?php if ((int)$doDA == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="da[<?php echo $ii; ?>][doDA]" value="<?php echo $doDA;?>"> <?php } ?> <?php } ?>\r
+      \r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/da16.png);">deviantART - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvailDA) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToDA_repostButton" id="rePostToDA_button" value="<?php _e('Repost to deviantART', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php } ?>\r
+                    \r
+                    <?php  if (is_array($pMeta) && !empty($pMeta[$ii]) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) { \r
+                        \r
+                        ?> <span id="pstdDA<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+                      <a style="font-size: 10px;" href="<?php echo $pMeta[$ii]['postURL']; ?>" target="_blank"><?php $nType="deviantART"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>                \r
+                \r
+                <?php if (!$isAvailDA) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your deviantART Account to AutoPost to deviantART</b></td></tr>\r
+                <?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>da" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> /> \r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>                \r
+                </td></tr> <?php } ?>\r
+                \r
+                \r
+       <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Title Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+        <td><input value="<?php echo $daMsgTFormat ?>" type="text" name="da[<?php echo $ii; ?>][SNAPformatT]" style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apDAMsgTFrmt<?php echo $ii; ?>');"/><?php nxs_doShowHint("apDAMsgTFrmt".$ii, '', '58'); ?></td></tr>  \r
+      \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top;  padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th><td>                \r
+                \r
+                <textarea cols="150" rows="1" id="da<?php echo $ii; ?>SNAPformat" name="da[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#da<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apDAMsgFrmt<?php echo $ii; ?>');"><?php echo $daMsgFormat ?></textarea>                \r
+                \r
+                </td></tr>\r
+           <?php } \r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = ''; \r
+    if (isset($pMeta['SNAPformat'])) $optMt['daTextFormat'] = $pMeta['SNAPformat'];  if (isset($pMeta['SNAPformatT'])) $optMt['daTitleFormat'] = $pMeta['SNAPformatT'];  \r
+    if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse']; \r
+    if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];        \r
+    if (isset($pMeta['doDA'])) $optMt['doDA'] = $pMeta['doDA'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doDA'] = 0; } \r
+    if (isset($pMeta['SNAPincludeDA']) && $pMeta['SNAPincludeDA'] == '1' ) $optMt['doDA'] = 1;  \r
+    return $optMt;\r
+  }  \r
+}}\r
+if (!function_exists("nxs_rePostToDA_ajax")) {\r
+  function nxs_rePostToDA_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+    foreach ($options['da'] as $ii=>$two) if ($ii==$_POST['nid']) {   $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['daPageID'].$two['daUName']==$_POST['nid']) {  \r
+      $dapo =  get_post_meta($postID, 'snapDA', true); $dapo =  maybe_unserialize($dapo);// prr($dapo);\r
+      if (is_array($dapo) && isset($dapo[$ii]) && is_array($dapo[$ii])){ $ntClInst = new nxs_snapClassDA(); $two = $ntClInst->adjMetaOpt($two, $dapo[$ii]); } \r
+      $result = nxs_doPublishToDA($postID, $two); if ($result == 200) die("Successfully sent your post to deviantART."); else die($result);        \r
+    }    \r
+  }\r
+}  \r
+if (!function_exists("nxs_doPublishToDA")) { //## Second Function to Post to DA\r
+  function nxs_doPublishToDA($postID, $options){ $ntCd = 'DA'; $ntCdL = 'da'; $ntNm = 'deviantART';  if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));      \r
+      $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));   \r
+      $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url();     \r
+      \r
+      $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+      $logNT = '<span style="color:#800000">deviantART</span> - '.$options['nName'];      \r
+      $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+      if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {  \r
+           nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$uqID); return;\r
+        }\r
+      }       \r
+      $message = array('message'=>'', 'link'=>'', 'imageURL'=>'', 'videoURL'=>''); \r
+      \r
+      if ($postID=='0') { echo "Testing ... <br/><br/>"; $message['description'] = 'Test Post, Description';  $message['title'] = 'Test Post - Title';  $message['url'] = home_url();    \r
+      } else { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));  $post = get_post($postID); if(!$post) return; \r
+        \r
+        $options['daTitleFormat'] = nsFormatMessage($options['daTitleFormat'], $postID, $addParams);  $options['daTextFormat'] = nsFormatMessage($options['daTextFormat'], $postID, $addParams); // prr($options['daTextFormat']); echo $postID;\r
+        $extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?$post->post_title:'');\r
+      }            \r
+      //## Actual Post\r
+      $ntToPost = new nxs_class_SNAP_DA(); $ret = $ntToPost->doPostToNT($options, $message); // echo "~~~"; prr($ret); echo "+++";\r
+      //## Save Session\r
+      if (empty($options['ck'])) $options['ck'] = '';\r
+      if (!empty($ret) && is_array($ret) && !empty($ret['ck']) && !empty($ret['ck']) && serialize($ret['ck'])!=$options['ck']) { $options['ck'] = serialize($ret['ck']); $options['mh'] = serialize($ret['mh']);\r
+        if (function_exists('get_option')) $nxs_gOptions = get_option('NS_SNAutoPoster'); if(!empty($nxs_gOptions)) { $nxs_gOptions['da'][$ii] = $options; nxs_settings_save($nxs_gOptions); }\r
+      } \r
+      //## Process Results\r
+      if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+         if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+      } else {  // ## All Good - log it.\r
+        if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+          else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'postURL'=>$ret['postURL'], 'pDate'=>date('Y-m-d H:i:s'))); nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+      }\r
+      //## Return Result\r
+      if ($ret['isPosted']=='1') return 200; else return print_r($ret, true);      \r
+      \r
+  } \r
+}  \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/di.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/di.api.php
new file mode 100644 (file)
index 0000000..faa6700
--- /dev/null
@@ -0,0 +1,41 @@
+<?php    \r
+//## NextScripts Diigo Connection Class\r
+$nxs_snapAPINts[] = array('code'=>'DI', 'lcode'=>'di', 'name'=>'Diigo');\r
+\r
+if (!class_exists("nxs_class_SNAP_DI")) { class nxs_class_SNAP_DI {\r
+    \r
+    var $ntCode = 'DI';\r
+    var $ntLCode = 'di';     \r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array();\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }    \r
+    function nxs_getDIHeaders($ref, $uname, $pass, $post=false){ $hdrsArr = array(); \r
+      $hdrsArr['X-Requested-With']='XMLHttpRequest'; $hdrsArr['Connection']='keep-alive'; $hdrsArr['Referer']=$ref;\r
+      $hdrsArr['User-Agent']='Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.22 Safari/537.11';\r
+      if($post) $hdrsArr['Content-Type']='application/x-www-form-urlencoded'; \r
+      $hdrsArr['Accept']='application/json, text/javascript, */*; q=0.01'; \r
+      $hdrsArr['Authorization']= 'Basic '.base64_encode($uname.':'.$pass);\r
+      $hdrsArr['Accept-Encoding']='gzip,deflate,sdch'; $hdrsArr['Accept-Language']='en-US,en;q=0.8'; $hdrsArr['Accept-Charset']='ISO-8859-1,utf-8;q=0.7,*;q=0.3'; return $hdrsArr;\r
+    }\r
+    function doPostToNT($options, $message){ $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>''); \r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['diUName']) || trim($options['diPass'])=='') { $badOut['Error'] = 'Not Configured'; return $badOut; }      \r
+      $email = $options['diUName'];  $pass = substr($options['diPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['diPass'], 5)):$options['diPass3'];  \r
+      //## Format\r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['diMsgFormat'], $message); \r
+      if (!empty($message['pTitle'])) $msgT = $message['pTitle']; else $msgT = nxs_doFormatMsg($options['diMsgTFormat'], $message);       \r
+      $flds = array(); $flds['key']=$options['diAPIKey']; $flds['url']=$message['url']; $flds['title']=nsTrnc($msgT, 250); $flds['desc']=nsTrnc($msg, 250); $flds['tags']=$message['tags']; $flds['shared']='yes';   //   prr($flds); die();\r
+      $hdrsArr = $this->nxs_getDIHeaders('https://www.diigo.com/api/v2/bookmarks', $email, $pass, true);\r
+      $cnt = wp_remote_post( 'https://www.diigo.com/api/v2/bookmarks', array( 'method' => 'POST', 'timeout' => 45, 'redirection' => 0, 'headers' => $hdrsArr, 'body' => $flds));        \r
+      //## Return      \r
+      if (is_array($cnt) &&  stripos($cnt['body'],'"code":1')!==false) {         \r
+         return array('postID'=>'DI', 'isPosted'=>1, 'postURL'=>'DI', 'pDate'=>date('Y-m-d H:i:s'));          \r
+      } else { $badOut['Error'] .= print_r($cnt, true); \r
+        return $badOut;\r
+      }\r
+    }\r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/di.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/di.php
new file mode 100644 (file)
index 0000000..66dc749
--- /dev/null
@@ -0,0 +1,224 @@
+<?php    \r
+//## NextScripts Facebook Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'DI', 'lcode'=>'di', 'name'=>'Diigo');\r
+\r
+if (!class_exists("nxs_snapClassDI")) { class nxs_snapClassDI {\r
+  //#### Show Common Settings\r
+  \r
+  function showGenNTSettings($ntOpts){ global $nxs_plurl; $ntInfo = array('code'=>'DI', 'lcode'=>'di', 'name'=>'Diigo', 'defNName'=>'diUName', 'tstReq' => false); ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>\r
+          <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />\r
+           <?php } ?>\r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;\r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div> <?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php\r
+  }   \r
+  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($mgpo){ $options = array('nName'=>'', 'doDI'=>'1', 'diUName'=>'', 'diInclTags'=>'1', 'diAttch'=>'', 'diAPIKey'=>'', 'diPass'=>''); $options['ntInfo']= array('lcode'=>'di'); $this->showNTSettings($mgpo, $options, true);}  \r
+  \r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = '';  ?>\r
+            <div id="doDI<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew){ ?> clNewNTSets<?php } ?>"> <input type="hidden" name="apDoSDI<?php echo $ii; ?>" value="0" id="apDoSDI<?php echo $ii; ?>" />          \r
+            \r
+             <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/di16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/setup-installation-diigo-social-networks-auto-poster-wordpress/"><?php $nType="Diigo"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="di[<?php echo $ii; ?>][nName]" id="dinName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel('di', $ii, $options['qTLng']); ?>\r
+            \r
+              <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+    \r
+    \r
+            \r
+                        <div id="altFormat" style="">\r
+  <div style="width:100%;"><strong id="altFormatText">Diigo API Key:</strong> <span style="font-size: 11px; margin: 0px;">Get it from <a target="_blank" href="http://www.diigo.com/api_keys/">http://www.diigo.com/api_keys</a>.</span></div>\r
+                <input name="di[<?php echo $ii; ?>][apDIAPIKey]" id="apDIAPIKey" style="width: 60%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['diAPIKey'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/> \r
+            </div>   \r
+           <div style="width:100%;"><strong>Diigo Username:</strong> </div><input name="di[<?php echo $ii; ?>][apDIUName]" id="apDIUName" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['diUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+            <div style="width:100%;"><strong>Diigo Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="di[<?php echo $ii; ?>][apDIPass]" id="apDIPass" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['diPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['diPass'], 5)):$options['diPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>                \r
+            \r
+            <?php if ($isNew) { ?> <input type="hidden" name="di[<?php echo $ii; ?>][apDoDI]" value="1" id="apDoNewDI<?php echo $ii; ?>" /> <?php } ?><br/>            \r
+            <p style="margin-bottom: 20px;margin-top: 5px;"><input value="1"  id="diInclTags" type="checkbox" name="di[<?php echo $ii; ?>][diInclTags]"  <?php if ((int)$options['diInclTags'] == 1) echo "checked"; ?> /> \r
+              <strong><?php _e('Post with tags', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> <?php _e('Tags from the blogpost will be auto posted to Diigo', 'social-networks-auto-poster-facebook-twitter-g'); ?>                                \r
+            </p>\r
+            \r
+            <div id="altFormat" style="">\r
+  <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> (<a href="#" id="apDIMsgTFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apDIMsgTFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div>\r
+              <input name="di[<?php echo $ii; ?>][apDIMsgTFrmt]" id="apDIMsgTFrmt<?php echo $ii; ?>" style="width: 50%;" value="<?php if ($isNew) echo "%TITLE%"; else _e(apply_filters('format_to_edit', htmlentities($options['diMsgTFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?>"  onfocus="mxs_showFrmtInfo('apDIMsgTFrmt<?php echo $ii; ?>');" /><?php nxs_doShowHint("apDIMsgTFrmt".$ii); ?>\r
+            </div><br/> \r
+            \r
+            <div id="altFormat" style="">\r
+  <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> (<a href="#" id="apDIMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apDIMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div>\r
+              \r
+              \r
+              <textarea cols="150" rows="3" id="di<?php echo $ii; ?>SNAPformat" name="di[<?php echo $ii; ?>][apDIMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#di<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apDIMsgFrmt<?php echo $ii; ?>');"><?php if ($isNew) echo "%EXCERPT%"; else _e(apply_filters('format_to_edit', htmlentities($options['diMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea>\r
+              \r
+              <?php nxs_doShowHint("apDIMsgFrmt".$ii); ?>\r
+            </div><br/>    \r
+            \r
+            <?php if ($options['diPass']!='') { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('DI', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>            <?php } \r
+          ?>\r
+          </div>\r
+            <?php /* ######################## Advanced Tab ####################### */ ?>\r
+  <?php if (!$isNew) { ?>  <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+    <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); \r
+      nxs_showRepostSettings($nt, $ii, $options); ?>            \r
+            \r
+    </div>  <?php } ?> <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div>\r
+          </div><?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = 'DI'; $lcode = 'di'; \r
+    foreach ($post as $ii => $pval){ \r
+      \r
+      if (!empty($pval['apDIUName']) && !empty($pval['apDIPass'])){ if (!isset($options[$ii])) $options[$ii] = array();\r
+        if (isset($pval['apDIUName']))   $options[$ii]['diUName'] = trim($pval['apDIUName']);\r
+        if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);\r
+        if (isset($pval['apDIPass']))    $options[$ii]['diPass'] = 'n5g9a'.nsx_doEncode($pval['apDIPass']); else $options[$ii]['diPass'] = '';  \r
+        if (isset($pval['apDIAPIKey'])) $options[$ii]['diAPIKey'] = trim($pval['apDIAPIKey']);                                                  \r
+        \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+        \r
+        if (isset($pval['diInclTags']))     $options[$ii]['diInclTags'] = $pval['diInclTags']; else $options[$ii]['diInclTags'] = 0;\r
+        if (isset($pval['apDIMsgTFrmt'])) $options[$ii]['diMsgTFormat'] = trim($pval['apDIMsgTFrmt']);\r
+        if (isset($pval['apDIMsgFrmt'])) $options[$ii]['diMsgFormat'] = trim($pval['apDIMsgFrmt']);\r
+        if (isset($pval['apDoDI']))      $options[$ii]['doDI'] = $pval['apDoDI']; else $options[$ii]['doDI'] = 0; \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }  \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'di'; $ntU = 'DI';\r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapDI', true));   if (is_array($pMeta)) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]); \r
+        $doDI = $ntOpt['doDI'] && (is_array($pMeta) || $ntOpt['catSel']!='1');   \r
+        $isAvailDI =  $ntOpt['diUName']!='' && $ntOpt['diPass']!=''; $diMsgFormat = htmlentities($ntOpt['diMsgFormat'], ENT_COMPAT, "UTF-8"); $diMsgTFormat = htmlentities($ntOpt['diMsgTFormat'], ENT_COMPAT, "UTF-8");      \r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2">\r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvailDI) { ?><input class="nxsGrpDoChb" value="1" id="doDI<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="di[<?php echo $ii; ?>][doDI]" <?php if ((int)$doDI == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="di[<?php echo $ii; ?>][doDI]" value="<?php echo $doDI;?>"> <?php } ?> <?php } ?>\r
+      \r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/di16.png);">Diigo - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvailDI) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToDI_repostButton" id="rePostToDI_button" value="<?php _e('Repost to Diigo', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php } ?>                    \r
+                    <?php  if (is_array($pMeta) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) {                         \r
+                        ?> <span id="pstdDI<?php echo $ii; ?>" style="float: right; padding-top: 4px; padding-right: 10px;">\r
+          <a style="font-size: 10px;" href="http://www.diigo.com/user/<?php echo $ntOpt['diUName']; ?>" target="_blank"><?php $nType="Diigo"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>                    \r
+                </td></tr>\r
+                <?php if (!$isAvailDI) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your Diigo Account to AutoPost to Diigo</b>\r
+                <?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>di" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> />\r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>                \r
+                </td></tr> <?php } ?>\r
+                \r
+       <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Title Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+        <td><input value="<?php echo $diMsgTFormat ?>" type="text" name="di[<?php echo $ii; ?>][SNAPformatT]" style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apDIMsgTFrmt<?php echo $ii; ?>');"/><?php nxs_doShowHint("apDIMsgTFrmt".$ii, '', '58'); ?></td></tr>                \r
+      <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+        <td>        \r
+        <textarea cols="150" rows="1" id="di<?php echo $ii; ?>SNAPformat" name="di[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#di<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apDIMsgFrmt<?php echo $ii; ?>');"><?php echo $diMsgFormat; ?></textarea>\r
+        <?php nxs_doShowHint("apDIMsgFrmt".$ii, '', '58'); ?></td></tr>\r
+                <?php } \r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = '';\r
+     if (isset($pMeta['SNAPformat'])) $optMt['diMsgFormat'] = $pMeta['SNAPformat']; \r
+     if (isset($pMeta['SNAPformatT'])) $optMt['diMsgTFormat'] = $pMeta['SNAPformatT']; \r
+     if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];      \r
+     if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+     if (isset($pMeta['doDI'])) $optMt['doDI'] = $pMeta['doDI'] == 1?1:0; else { if (isset($pMeta['SNAPformat']))  $optMt['doDI'] = 0; } \r
+     if (isset($pMeta['SNAPincludeDI']) && $pMeta['SNAPincludeDI'] == '1' ) $optMt['doDI'] = 1;  \r
+     return $optMt;\r
+  }  \r
+}}\r
+if (!function_exists("nxs_rePostToDI_ajax")) {\r
+  function nxs_rePostToDI_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; $options = get_option('NS_SNAutoPoster');  \r
+    foreach ($options['di'] as $ii=>$two) if ($ii==$_POST['nid']) {   $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['gpPageID'].$two['gpUName']==$_POST['nid']) {  \r
+      $gppo =  get_post_meta($postID, 'snapDI', true); $gppo =  maybe_unserialize($gppo);// prr($gppo);\r
+      if (is_array($gppo) && isset($gppo[$ii]) && is_array($gppo[$ii])){   $ntClInst = new nxs_snapClassDI(); $two = $ntClInst->adjMetaOpt($two, $gppo[$ii]); }\r
+      $result = nxs_doPublishToDI($postID, $two); if ($result == 200) die("Successfully sent your post to Diigo."); else die($result);        \r
+    }    \r
+  }\r
+}  \r
+\r
+if (!function_exists("nxs_doPublishToDI")) { //## Second Function to Post to DI\r
+  function nxs_doPublishToDI($postID, $options){ global $nxs_diCkArray; $ntCd = 'DI'; $ntCdL = 'di'; $ntNm = 'Diigo'; if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+  //  if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToDI',  array($postID, $options));  \r
+    $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));   \r
+    $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url();  \r
+    $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+    $logNT = '<span style="color:#000080">Diigo</span> - '.$options['nName'];      \r
+    $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+    if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+      $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') { sleep(5);\r
+         nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'); return;\r
+      }\r
+    }     \r
+    if (empty($postID)) { echo "Testing ... <br/><br/>"; $urlToGo = home_url();  $options['diMsgFormat'] = 'Test Message from '.$urlToGo;  $options['diMsgTFormat'] = 'Test Link from '.$urlToGo; } else {  \r
+      $post = get_post($postID); $options = nxs_getURL($options, $postID, $addParams); $urlToGo = $options['urlToUse'];       \r
+      $options['diMsgFormat'] = nxs_decodeEntitiesFull(nsFormatMessage( $options['diMsgFormat'], $postID, $addParams)); $options['diMsgTFormat'] = nxs_decodeEntitiesFull(nsFormatMessage($options['diMsgTFormat'], $postID, $addParams));       \r
+      nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1')); \r
+    } \r
+    $extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?$post->post_title:'');\r
+    //## Create and Format message\r
+    $t = wp_get_post_tags($postID); $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = (implode(',',$tggs)); $tags = str_replace(' ','+',$tags);    \r
+    $message = array('url'=>$urlToGo, 'surl'=>$urlToGo, 'siteName'=>$blogTitle, 'tags'=>$tags);    \r
+    //## Actual Post\r
+    $ntToPost = new nxs_class_SNAP_DI(); $ret = $ntToPost->doPostToNT($options, $message);\r
+    //## Process Results\r
+    if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+       if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+    } else {  // ## All Good - log it.\r
+      if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+        else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'pDate'=>date('Y-m-d H:i:s'))); nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+    }\r
+    //## Return Result\r
+    if (!empty($ret['isPosted']) && $ret['isPosted']=='1') return 200; else return print_r($ret, true); \r
+  }\r
+}  \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/dl.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/dl.api.php
new file mode 100644 (file)
index 0000000..b393d53
--- /dev/null
@@ -0,0 +1,56 @@
+<?php    \r
+//## NextScripts Delicious Connection Class\r
+$nxs_snapAPINts[] = array('code'=>'DL', 'lcode'=>'dl', 'name'=>'Delicious');\r
+\r
+if (!class_exists("nxs_class_SNAP_DL")) { class nxs_class_SNAP_DL {\r
+    \r
+    var $ntCode = 'DL';\r
+    var $ntLCode = 'dl';     \r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array();\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }    \r
+    function nxs_getDLHeaders($up){ $hdrsArr = array(); \r
+      $hdrsArr['Cache-Control']='no-cache'; $hdrsArr['Connection']='keep-alive'; \r
+      $hdrsArr['User-Agent']='SNAP for Wordpress; Ver 3';\r
+      $hdrsArr['Accept']='text/html, application/xhtml+xml, */*'; $hdrsArr['DNT']='1';\r
+      $hdrsArr['Authorization'] = 'Basic ' . base64_encode("$up");\r
+      if (function_exists('gzdeflate')) $hdrsArr['Accept-Encoding']='gzip,deflate'; \r
+      $hdrsArr['Accept-Language']='en-US,en;q=0.8'; $hdrsArr['Accept-Charset']='ISO-8859-1,utf-8;q=0.7,*;q=0.3'; return $hdrsArr;\r
+    }\r
+    \r
+    function getHeaders($ref, $org='', $post=false, $aj=false){ $hdrsArr = array(); \r
+        $hdrsArr['Cache-Control']='max-age=0'; $hdrsArr['Connection']='keep-alive'; $hdrsArr['Referer']=$ref;\r
+        $hdrsArr['User-Agent']='Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.22 Safari/537.36'; \r
+        if($post==='j') $hdrsArr['Content-Type']='application/json;charset=UTF-8'; elseif($post===true) $hdrsArr['Content-Type']='application/x-www-form-urlencoded';\r
+        if($aj===true) $hdrsArr['X-Requested-With']='XMLHttpRequest';  if ($org!='') $hdrsArr['Origin']=$org; \r
+        $hdrsArr['Accept']='text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';// $hdrsArr['DNT']='1';\r
+        if (function_exists('gzdeflate')) $hdrsArr['Accept-Encoding']='gzip,deflate,sdch'; \r
+        $hdrsArr['Accept-Language']='en-US,en;q=0.8'; return $hdrsArr; \r
+    }\r
+    \r
+    function doPostToNT($options, $message){ $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>'');\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['dlUName']) || trim($options['dlPass'])=='') { $badOut['Error'] = 'Not Configured'; return $badOut; }      \r
+      $email = $options['dlUName'];  $pass = substr($options['dlPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['dlPass'], 5)):$options['dlPass'];  \r
+      //## Format\r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['dlMsgFormat'], $message); \r
+      if (!empty($message['pTitle'])) $msgT = $message['pTitle']; else $msgT = nxs_doFormatMsg($options['dlMsgTFormat'], $message); $tags = nsTrnc($message['tags'], 195, ',', '');\r
+      \r
+      $link = $message['url']; $desc = substr($msgT, 0, 250); $ext = substr($msg, 0, 1000);      \r
+      $hdrsArr = $this->getHeaders('https://delicious.com','https://delicious.com',true); $flds = array('username'=>$email, 'password'=>base64_encode(strrev($pass)));\r
+      $cnt = wp_remote_post( 'https://avosapi.delicious.com/api/v1/account/login', array( 'method' => 'POST', 'timeout' => 45, 'redirection' => 0, 'body'=>$flds, 'headers' => $hdrsArr) ); \r
+      if (is_nxs_error($cnt)) {  $badOut = "ERROR (Login Form): ".print_r($rep, true); return $badOut; } $rep = json_decode($cnt['body'], true); \r
+      \r
+      if ($rep['status']!='success') { $badOut = "ERROR (Login): ".print_r($rep, true); return $badOut; } $ck = $cnt['cookies'];\r
+      $flds = array('url'=>$link, 'description'=>$desc, 'tags'=>$tags, 'note'=>$ext, 'replace'=>'true', 'private'=>'false', 'share'=>'');\r
+      $advSts = array( 'method' => 'POST', 'timeout' => 45, 'redirection' => 0, 'body'=>$flds, 'cookies' => $ck, 'headers' => $hdrsArr); //prr($advSts);\r
+      $cnt = wp_remote_post( 'https://avosapi.delicious.com/api/v1/posts/addoredit', $advSts ); \r
+      if (is_nxs_error($cnt)) {  $badOut = "ERROR (Login Form): ".print_r($rep, true); return $badOut; } $rep = json_decode($cnt['body'], true); \r
+      if ($rep['status']!='success') { $badOut = "ERROR (Login): ".print_r($rep, true); return $badOut; } \r
+      return array('postID'=>md5($message['url']), 'isPosted'=>1, 'postURL'=>'https://delicious.com/link/'.md5($message['url']), 'pDate'=>date('Y-m-d H:i:s'));  \r
+   }    \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/dl.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/dl.php
new file mode 100644 (file)
index 0000000..55559fc
--- /dev/null
@@ -0,0 +1,221 @@
+<?php    \r
+//## NextScripts Facebook Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'DL', 'lcode'=>'dl', 'name'=>'Delicious');\r
+\r
+if (!class_exists("nxs_snapClassDL")) { class nxs_snapClassDL {\r
+  //#### Show Common Settings\r
+  function showGenNTSettings($ntOpts){ global $nxs_plurl; $ntInfo = array('code'=>'DL', 'lcode'=>'dl', 'name'=>'Delicious', 'defNName'=>'dlUName', 'tstReq' => false); ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>\r
+          <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />\r
+           <?php } ?>\r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;\r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($mgpo){ $options = array('nName'=>'', 'doDL'=>'1', 'dlUName'=>'', 'dlPageID'=>'', 'dlAttch'=>'', 'dlPass'=>''); $options['ntInfo']= array('lcode'=>'dl'); $this->showNTSettings($mgpo, $options, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = '';  ?>\r
+            <div id="doDL<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>" style="max-width: 1000px; background-color: #EBF4FB; margin: 10px; border: 1px solid #808080; padding: 10px; display:none;">     <input type="hidden" name="apDoSDL<?php echo $ii; ?>" value="0" id="apDoSDL<?php echo $ii; ?>" />          \r
+            \r
+             <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/dl16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/setup-installation-delicious-social-networks-auto-poster-wordpress/"><?php $nType="Delicious"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="dl[<?php echo $ii; ?>][nName]" id="dlnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit',htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel('dl', $ii, $options['qTLng']); ?>  \r
+            \r
+            <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+    \r
+            \r
+            <div style="width:100%;"><strong>Delicious Username:</strong> </div><input name="dl[<?php echo $ii; ?>][apDLUName]" id="apDLUName" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit',htmlentities($options['dlUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+            <div style="width:100%;"><strong>Delicious Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="dl[<?php echo $ii; ?>][apDLPass]" id="apDLPass" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['dlPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['dlPass'], 5)):$options['dlPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>                \r
+            \r
+            <?php if ($isNew) { ?> <input type="hidden" name="dl[<?php echo $ii; ?>][apDoDL]" value="1" id="apDoNewDL<?php echo $ii; ?>" /> <?php } ?>\r
+            <br/>            \r
+            \r
+            <div id="altFormat" style="">\r
+  <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> (<a href="#" id="apDLTMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apDLTMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div>\r
+  \r
+              <input name="dl[<?php echo $ii; ?>][apDLMsgTFrmt]" id="apDLMsgTFrmt" style="width: 50%;" value="<?php if ($isNew) echo "%TITLE%"; else _e(apply_filters('format_to_edit',htmlentities($options['dlMsgTFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?>" onfocus="mxs_showFrmtInfo('apDLTMsgFrmt<?php echo $ii; ?>');" /><?php nxs_doShowHint("apDLTMsgFrmt".$ii); ?>\r
+            </div>   \r
+            \r
+            <div id="altFormat" style="">\r
+  <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> (<a href="#" id="apDLMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apDLMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div>\r
+  \r
+  <textarea cols="150" rows="3" id="di<?php echo $ii; ?>SNAPformat" name="dl[<?php echo $ii; ?>][apDLMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#dl<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apDLMsgFrmt<?php echo $ii; ?>');"><?php if ($isNew) echo "%EXCERPT%"; else _e(apply_filters('format_to_edit', htmlentities($options['dlMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea>\r
+  \r
+              <?php nxs_doShowHint("apDLMsgFrmt".$ii); ?>\r
+            </div><br/>    \r
+            \r
+            <?php if ($options['dlPass']!='') { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('DL', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>      \r
+               \r
+            <?php } \r
+            \r
+            ?></div>\r
+            <?php /* ######################## Advanced Tab ####################### */ ?>\r
+   <?php if (!$isNew) { ?>  <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+    <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); \r
+      nxs_showRepostSettings($nt, $ii, $options); ?> \r
+            \r
+            \r
+    </div> <?php } ?> <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div></div><?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){$code = 'DL'; $lcode = 'dl'; \r
+    foreach ($post as $ii => $pval){       \r
+      if (!empty($pval['apDLUName']) && !empty($pval['apDLPass'])){ if (!isset($options[$ii])) $options[$ii] = array();\r
+        if (isset($pval['apDLUName']))   $options[$ii]['dlUName'] = trim($pval['apDLUName']);\r
+        if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);\r
+        if (isset($pval['apDLPass']))    $options[$ii]['dlPass'] = 'n5g9a'.nsx_doEncode($pval['apDLPass']); else $options[$ii]['dlPass'] = '';  \r
+        \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+        \r
+        if (isset($pval['apDLMsgFrmt'])) $options[$ii]['dlMsgFormat'] = trim($pval['apDLMsgFrmt']);                                                  \r
+        if (isset($pval['apDLMsgTFrmt'])) $options[$ii]['dlMsgTFormat'] = trim($pval['apDLMsgTFrmt']);                                                  \r
+        if (isset($pval['apDoDL']))      $options[$ii]['doDL'] = $pval['apDoDL']; else $options[$ii]['doDL'] = 0; \r
+         \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);   \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }  \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'dl'; $ntU = 'DL';\r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapDL', true));   if (is_array($pMeta)) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]); \r
+        $doDL = $ntOpt['doDL'] && (is_array($pMeta) || $ntOpt['catSel']!='1');   \r
+        $isAvailDL =  $ntOpt['dlUName']!='' && $ntOpt['dlPass']!=''; $dlMsgFormat = htmlentities($ntOpt['dlMsgFormat'], ENT_COMPAT, "UTF-8"); $dlMsgTFormat = htmlentities($ntOpt['dlMsgTFormat'], ENT_COMPAT, "UTF-8");      \r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2">\r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvailDL) { ?><input class="nxsGrpDoChb" value="1" id="doDL<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="dl[<?php echo $ii; ?>][doDL]" <?php if ((int)$doDL == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="dl[<?php echo $ii; ?>][doDL]" value="<?php echo $doDL;?>"> <?php } ?> <?php } ?>\r
+      \r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/dl16.png);">Delicious - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvailDL) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToDL_repostButton" id="rePostToDL_button" value="<?php _e('Repost to Delicious', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php } ?>\r
+                    \r
+                    <?php  if (is_array($pMeta) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) {                         \r
+                        ?> <span id="pstdDL<?php echo $ii; ?>" style="float: right; padding-top: 4px; padding-right: 10px;">\r
+          <a style="font-size: 10px;" href="http://delicious.com/<?php echo $ntOpt['dlUName']; ?>" target="_blank"><?php $nType="Delicious"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>                \r
+                \r
+                <?php if (!$isAvailDL) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your Delicious Account to AutoPost to Delicious</b>\r
+                <?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>dl" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> /> \r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>                \r
+                </td></tr> <?php } ?>\r
+                \r
+               \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Title Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                <td><input value="<?php echo $dlMsgTFormat ?>" type="text" name="dl[<?php echo $ii; ?>][SNAPformatT]"  style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apDLTMsgFrmt<?php echo $ii; ?>');"/><?php nxs_doShowHint("apDLTMsgFrmt".$ii, '', '58'); ?></td></tr>\r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                <td>                \r
+                <textarea cols="150" rows="1" id="dl<?php echo $ii; ?>SNAPformat" name="dl[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#dl<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apDLMsgFrmt<?php echo $ii; ?>');"><?php echo $dlMsgFormat; ?></textarea>\r
+                <?php nxs_doShowHint("apDLMsgFrmt".$ii, '', '58'); ?></td></tr>\r
+                <?php } \r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = ''; \r
+     if (isset($pMeta['SNAPformat'])) $optMt['dlMsgFormat'] = $pMeta['SNAPformat']; \r
+     if (isset($pMeta['SNAPformatT'])) $optMt['dlMsgTFormat'] = $pMeta['SNAPformatT'];    \r
+     if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];      \r
+     if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];      \r
+     if (isset($pMeta['doDL'])) $optMt['doDL'] = $pMeta['doDL'] == 1?1:0; else { if (isset($pMeta['SNAPformat']))  $optMt['doDL'] = 0; } \r
+     if (isset($pMeta['SNAPincludeDL']) && $pMeta['SNAPincludeDL'] == '1' ) $optMt['doDL'] = 1;  \r
+     return $optMt;\r
+  }  \r
+}}\r
+if (!function_exists("nxs_rePostToDL_ajax")) {\r
+  function nxs_rePostToDL_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; $options = get_option('NS_SNAutoPoster');  \r
+    foreach ($options['dl'] as $ii=>$two) if ($ii==$_POST['nid']) {   $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['gpPageID'].$two['gpUName']==$_POST['nid']) {  \r
+      $gppo =  get_post_meta($postID, 'snapDL', true); $gppo =  maybe_unserialize($gppo);// prr($gppo);\r
+      if (is_array($gppo) && isset($gppo[$ii]) && is_array($gppo[$ii])){ $ntClInst = new nxs_snapClassDL(); $two = $ntClInst->adjMetaOpt($two, $gppo[$ii]);}\r
+      $result = nxs_doPublishToDL($postID, $two); if ($result == 200) die("Successfully sent your post to Delicious."); else die($result);        \r
+    }    \r
+  }\r
+}  \r
+\r
+\r
+if (!function_exists("nxs_doPublishToDL")) { //## Second Function to Post to DL\r
+  function nxs_doPublishToDL($postID, $options){ $ntCd = 'DL'; $ntCdL = 'dl'; $ntNm = 'Delicious'; global $plgn_NS_SNAutoPoster;  if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+      // if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToDL',  array($postID, $options));      \r
+      $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));     \r
+      $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url();  \r
+      $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+      $logNT = '<span style="color:#000080">Delicious</span> - '.$options['nName'];\r
+      $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+      if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {  sleep(5);\r
+          nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'); return;\r
+        }\r
+      }  \r
+      if ($postID=='0') { echo "Testing ... <br/><br/>"; $urlToGo = home_url(); $msgT = 'Test Link from '.$urlToGo; } else { $post = get_post($postID); if(!$post) return; \r
+        $options['dlMsgTFormat'] = nsFormatMessage($options['dlMsgTFormat'], $postID);  $options['dlMsgFormat'] = nsFormatMessage($options['dlMsgFormat'], $postID); \r
+        nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1')); \r
+        //## MyURL - URLToGo code\r
+        $options = nxs_getURL($options, $postID, $addParams); $urlToGo = $options['urlToUse'];      \r
+      }\r
+      $extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?$post->post_title:'');\r
+      //## Create and Format message\r
+      $t = wp_get_post_tags($postID); $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = implode(',',$tggs);   //  $tags = str_replace(' ','+',$tags); \r
+      \r
+      $message = array('url'=>$urlToGo, 'surl'=>$urlToGo, 'siteName'=>$blogTitle, 'tags'=>$tags);\r
+      //## Actual Post\r
+      $ntToPost = new nxs_class_SNAP_DL(); $ret = $ntToPost->doPostToNT($options, $message);\r
+      //## Process Results\r
+      if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+        if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+      } else {  // ## All Good - log it.\r
+        if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+          else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'pDate'=>date('Y-m-d H:i:s'))); nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+      }\r
+      //## Return Result\r
+      if ($ret['isPosted']=='1') return 200; else return print_r($ret, true);       \r
+  }\r
+}  \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/fb.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/fb.api.php
new file mode 100644 (file)
index 0000000..7395da8
--- /dev/null
@@ -0,0 +1,99 @@
+<?php    \r
+//## NextScripts Facebook Connection Class\r
+$nxs_snapAPINts[] = array('code'=>'FB', 'lcode'=>'fb', 'name'=>'Facebook');\r
+\r
+if (!class_exists("nxs_class_SNAP_FB")) { class nxs_class_SNAP_FB {\r
+    \r
+    var $ntCode = 'FB';\r
+    var $ntLCode = 'fb';\r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array(); //return false;\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }\r
+    function doPostToNT($options, $message){ $badOut = array('Warning'=>'', 'Error'=>''); $wprg = array('sslverify'=>false); \r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (empty($options['fbAppAuthToken']) && empty($options['atpKey']) && empty($options['uName'])) { $badOut['Error'] = 'No Auth Token Found/Not configured'; return $badOut; }\r
+      //## Make Post\r
+      \r
+      \r
+      // $facebook = new NXS_Facebook(array( 'appId' => $options['fbAppID'], 'secret' => $options['fbAppSec'], 'cookie' => true )); \r
+      if (!empty($options['fbAppAuthToken'])) if (!isset($options['fbAppPageAuthToken']) || trim($options['fbAppPageAuthToken'])=='') $options['fbAppPageAuthToken'] = $options['fbAppAuthToken'];\r
+      \r
+      //## Some OLD Format Conversion\r
+      if (!isset($options['attachType']) && isset($options['fbAttch'])) $options['attachType'] = $options['fbAttch'];\r
+      if (!isset($options['postType']) && isset($options['fbPostType'])) $options['postType'] = $options['fbPostType'];  $fbPostType = $options['postType']; //## Compatibility with v <3.2\r
+      if (!isset($options['pgID']) && isset($options['fbPgID'])) $options['pgID'] = $options['fbPgID'];      \r
+      \r
+      if ($fbPostType!='I' && $fbPostType!='T') { $url = $message['url']; $flds = array('id'=>$url, 'scrape'=>'true'); sleep(2); }            \r
+      //## Get URL info.      \r
+      if ($fbPostType!='I' && $fbPostType!='T' && !empty($options['atchUse']) && $options['atchUse'] == 'F') { \r
+        $response =  wp_remote_post('http://graph.facebook.com', array('body' => $flds, 'sslverify'=>false ));      \r
+        if (is_wp_error($response)) $badOut['Error'] = print_r($response, true)." - ERROR"; else { $response = json_decode($response['body'], true);     //  prr($response);     die();\r
+            if (!empty($response['description'])) $message['urlDescr'] = $response['description'];  if (!empty($response['title'])) $message['urlTitle'] =  $response['title'];\r
+            if (!empty($response['site_name'])) $message['siteName'] = $response['site_name']; elseif ($message['siteName']=='') $message['siteName'] = $message['title'];\r
+            if (!empty($response['image'][0]['url'])) $message['imageURL'] = $response['image'][0]['url'];\r
+        }\r
+      } // prr($message);\r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['fbMsgFormat'], $message); \r
+      $imgURL = nxs_getImgfrOpt($message['imageURL']); $fbWhere = 'feed'; \r
+      $attachType = $options['attachType']; if ($attachType=='1') $attachType = 'A'; else $attachType = 'S';\r
+      if ($options['imgUpl']!='2') $options['imgUpl'] = 'T'; else $options['imgUpl'] = 'A';      \r
+      if (stripos($options['fbURL'], '/groups/')!=false) $options['destType'] == 'gr';\r
+      \r
+      if (!empty($options['destType']) && $options['destType'] == 'pr') $page_id = $options['fbAppAuthUser']; else $page_id = $options['pgID'];        \r
+      $msg = strip_tags($msg); $msg = str_ireplace('&lt;(")','<(")', $msg); //## FB Smiles FIX 3\r
+      if (substr($msg, 0, 1)=='@') $msg = ' '.$msg; // ERROR] couldn't open file fix\r
+      \r
+      //## Own App Post\r
+      if (!empty($options['fbAppPageAuthToken'])) {\r
+        if (empty($options['appsecret_proof'])) $options['appsecret_proof'] = hash_hmac('sha256', $options['fbAppPageAuthToken'], $options['fbAppSec']); \r
+        $mssg = array('access_token'=>$options['fbAppPageAuthToken'], 'appsecret_proof'=>$options['appsecret_proof'], 'method'=>'post', 'message'=>$msg);\r
+        if ($fbPostType=='I' && trim($imgURL)=='') $fbPostType='T';\r
+        if ($fbPostType=='A' && !(preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i", $message['url']))) { \r
+            $badOut['Warning'] = 'Unvalid URL: '.$message['url'].'| Will be posting as text message'; $fbPostType='T'; \r
+        } \r
+        if ($fbPostType=='A' || $fbPostType=='') {\r
+          if (($attachType=='A' || $attachType=='S')) { $attArr = array('name' => $message['urlTitle'], 'caption' => $message['siteName'], 'link' =>$message['url'], 'description' => $message['urlDescr']); \r
+          $mssg = array_merge($mssg, $attArr); ; }\r
+          if ($attachType=='A') $mssg['actions'] = json_encode(array('name' => $message['siteName'], 'link' =>$message['url']));        \r
+          if (trim($imgURL)!='') $mssg['picture'] = $imgURL;  //if (trim($message['videoURL'])!='') $mssg['source'] = $message['videoURL'];        \r
+        } elseif ($fbPostType=='I') { /* $facebook->setFileUploadSupport(true); */ $fbWhere = 'photos'; $mssg['url'] = $imgURL; \r
+          if ($options['imgUpl']=='T') { //## Try to Post to TImeline\r
+            $aacct = array('access_token'=>$options['fbAppPageAuthToken'], 'appsecret_proof'=>$options['appsecret_proof'], 'method'=>'get');  \r
+            $res = wp_remote_get( "https://graph.facebook.com/$page_id/albums?".http_build_query($aacct, null, '&'),$wprg); \r
+            if (is_wp_error($res) || empty($res['body'])) $badOut['Error'] = ' [ERROR] '.print_r($res, true); else {\r
+              $albums = json_decode($res['body'], true);  if (empty($albums)) $badOut['Error'] .= "JSON ERROR: ".print_r($res, true); else {\r
+                if (is_array($albums) && is_array($albums["data"])) foreach ($albums["data"] as $album) { if ($album["type"] == "wall") { $chosen_album = $album; break;}}\r
+                if (isset($chosen_album) && isset($chosen_album["id"])) $page_id = $chosen_album["id"];\r
+              }\r
+            }\r
+          }        \r
+        }         \r
+        //## Actual Post                \r
+        $destURL = "https://graph.facebook.com/$page_id/".$fbWhere; //  prr($destURL); prr($args);   prr($mssg); //die();\r
+        $response = wp_remote_post( $destURL, array( 'method' => 'POST', 'httpversion' => '1.1', 'timeout' => 45, 'sslverify'=>false, 'redirection' => 0, 'body' => $mssg)); \r
+      }     \r
+      \r
+      if (is_wp_error($response) || empty($response['body'])) return "ERROR: ".print_r($response, true);\r
+      $res = json_decode($response['body'], true); if (empty($res)) return "JSON ERROR: ".print_r($response, true);\r
+      if (!empty($res['error'])) if (!empty($res['error']['message'])) { $badOut['Error'] .= $res['error']['message']; //## Some Known Errors\r
+        if (stripos($res['error']['message'], 'This API call requires a valid app_id')!==false) { \r
+            if ( !is_numeric($page_id) && stripos($options['fbURL'], '/groups/')!=false) $badOut['Error'] .= ' [ERROR] Unrecognized Facebook Group ID. Please use numeric ID. Please see <a href="http://gd.is/f412">FAQ 4.12</a>'; \r
+              else $badOut['Error'] .= " [ERROR] (invalid app_id) Authorization Error. <br/>\r\n<br/>\r\n Possible Reasons: <br/>\r\n 1. Your app is not authorized. Please go to the Plugin Settings - Facebook and authorize it.<br/>\r\n 2. The current authorized user have no rights to post to the specified page. Please login to Facebook as the correct user and Re-Authorize the Plugin.<br/>\r\n 3. You clicked 'Skip' or unchecked the 'Manage Pages' or 'Post on your behalf' permissions when Authorization wizard asked you. Please Re-Authorize the Plugin<br/>\r\n"; \r
+        }\r
+        if (stripos($res['error']['message'], 'Some of the aliases you requested do not exist')!==false) $badOut['Error'] .= '| Please check what do you have in the "Facebook URL" field.';\r
+        if (stripos($res['error']['message'], 'Unsupported post request')!==false) $badOut['Error'] .= "<br/>\r\n".'| Are you posting to a secret group? Please see: <a href="http://gd.is/fbe2">http://gd.is/fbe2</a>';\r
+        if (stripos($res['error']['message'], 'The target user has not authorized this action')!==false) $badOut['Error'] .= '| Please Authorize the plugin from the plugin settings Page - Facebook.';\r
+        \r
+        return $badOut;          \r
+      } else return print_r($res['error'], true);\r
+      if (empty($res['id'])) return print_r($res, true);\r
+      //## All Good!\r
+      $pgID = (isset($res['post_id']) && strpos($res['post_id'],'_')!==false)?$res['post_id']:$res['id']; $pgg = explode('_', $pgID); $postID = $pgg[1];\r
+      $pgURL = 'http://www.facebook.com/'.$options['pgID'].'/posts/'.$postID; \r
+      return array('isPosted'=>'1', 'postID'=>$pgID, 'postURL'=>$pgURL, 'pDate'=>date('Y-m-d H:i:s'), 'log'=>$badOut);      \r
+    }\r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/fb.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/fb.php
new file mode 100644 (file)
index 0000000..1e71eb7
--- /dev/null
@@ -0,0 +1,563 @@
+<?php    \r
+//## NextScripts Facebook Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'FB', 'lcode'=>'fb', 'name'=>'Facebook');\r
+\r
+if (!class_exists("nxs_snapClassFB")) { class nxs_snapClassFB {\r
+  //#### Show Common Settings  \r
+  function showGenNTSettings($ntOpts){ global $nxs_snapSetPgURL, $nxs_plurl, $nxs_gOptions; $ntInfo = array('code'=>'FB', 'lcode'=>'fb', 'name'=>'Facebook', 'defNName'=>'dlUName', 'tstReq' => true);\r
+    if ( isset($_GET['code']) && $_GET['code']!='' && isset($_GET['state']) && substr($_GET['state'], 0, 7) == 'nxs-fb-'){  $at = $_GET['code'];  $ii = str_replace('nxs-fb-','',$_GET['state']);\r
+     echo '-= This is normal technical authorization info that will dissapear. (Unless you get some errors. If you do get errors please check them at the <a target="_blank" href="http://www.nextscripts.com/support-faq/">FAQ Page</a>) =- <br/><br/><br/>'; $gGet = array();     \r
+     if (!empty($_SERVER['QUERY_STRING'])) parse_str($_SERVER['QUERY_STRING'], $gGet); elseif (!empty($_SERVER['argv'][0])) parse_str($_SERVER['argv'][0], $gGet); \r
+       else { $gGet = $_GET; prr($_GET); unset($gGet['post_type']);} prr($gGet);  unset($gGet['code']); unset($gGet['state']); prr($gGet);\r
+     $sturl = explode('?',$nxs_snapSetPgURL); $nxs_snapSetPgURL = $sturl[0].((!empty($gGet))?'?'.http_build_query($gGet):''); $fbo = $ntOpts[$ii]; $wprg = array('sslverify'=>false); \r
+     if (isset($fbo['fbPgID'])){ echo "-="; prr($fbo);// die();\r
+      $tknURL = 'https://graph.facebook.com/v2.3/oauth/access_token?client_id='.$fbo['fbAppID'].'&state=nxs-fb-'.$ii.'&redirect_uri='.urlencode($nxs_snapSetPgURL).'&client_secret='.$fbo['fbAppSec'].'&code='.$at;       \r
+      $response  = wp_remote_get($tknURL, $wprg); echo "<br/>TKN URL: "; prr($tknURL);   \r
+      if ( (is_object($response) && (isset($response->errors))) || (is_array($response) && stripos($response['body'],'"error":')!==false )) { prr($response); die(); }      \r
+      if (substr($response['body'],0,1)=='{') $params = json_decode($response['body'], true); else parse_str($response['body'], $params);  \r
+      $at = $params['access_token']; echo "<br/>TKN PARAMS: "; prr($params); echo "<br/>TKN RESP: "; prr($response);  \r
+      $response  = wp_remote_get('https://graph.facebook.com/v2.3/oauth/access_token?client_secret='.$fbo['fbAppSec'].'&client_id='.$fbo['fbAppID'].'&grant_type=fb_exchange_token&fb_exchange_token='.$at, $wprg); \r
+      if ((is_object($response) && isset($response->errors))) {  prr($response); die();}\r
+      if (substr($response['body'],0,1)=='{') $params = json_decode($response['body'], true); else parse_str($response['body'], $params);  $at = $params['access_token']; $fbo['fbAppAuthToken'] = $at; \r
+      $appsecret_proof = hash_hmac('sha256', $fbo['fbAppAuthToken'], $fbo['fbAppSec']); \r
+      $aacct = array('access_token'=>$fbo['fbAppAuthToken'], 'appsecret_proof'=>$appsecret_proof, 'method'=>'get');  \r
+      $uurl = "https://graph.facebook.com/v2.3/me?".http_build_query($aacct, null, '&'); prr($uurl); $res = wp_remote_get( $uurl, $wprg); \r
+      if (is_wp_error($res) || empty($res['body'])) {  echo "Can't get Facebook User."; prr($res); die();} else {\r
+        $user = json_decode($res['body'], true); if (empty($user)) {echo "Can't get Facebook User. JSON Error. "; prr($res); die();} else {\r
+          if (!empty($user['id'])) {        echo "-= Got user: "; prr($user);            \r
+            if (stripos($fbo['fbURL'], '/groups/')!==false) { $fbo['destType'] = 'gr'; $fbo['fbAppPageAuthToken'] = $fbo['fbAppAuthToken']; } else {            \r
+              $page_id = $fbo['fbPgID']; echo "-= Authorizing Page =-<br/>";                        \r
+              $aacct = array('access_token'=>$fbo['fbAppAuthToken'], 'appsecret_proof'=>$appsecret_proof, 'method'=>'get');  $fbo['destType'] = '';              \r
+              echo "-= Getting List of Pages =-<br/>";  \r
+              $resP = wp_remote_get('https://graph.facebook.com/v2.3/'.$user['id'].'/accounts?'.http_build_query($aacct, null, '&'), $wprg); prr($resP); $pages = json_decode($resP['body'], true);  prr($pages);\r
+              echo "-= Getting Page Token =-<br/>";                \r
+              echo "https://graph.facebook.com/v2.3/$page_id?fields=access_token&".http_build_query($aacct, null, '&');\r
+              $res = wp_remote_get( "https://graph.facebook.com/v2.3/$page_id?fields=access_token&".http_build_query($aacct, null, '&'), $wprg); prr($res);\r
+              if (is_wp_error($res) || empty($res['body'])) {  echo "Can't get Page Token."; prr($res); die();} else {\r
+                  $token = json_decode($res['body'], true); if (empty($token)) {echo "Can't get Page Token. JSON Error. "; prr($res); die();} else {\r
+                    if (!empty($token['error'])) if (!empty($token['error']['message'])) { $errMsg = $token['error']['message'];\r
+                      if ( stripos($errMsg, 'Unknown fields: access_token')!==false || stripos($errMsg, 'Cannot query users by their username')!==false || stripos($errMsg, 'node type (User)')!==false) {\r
+                          $token['access_token'] = $fbo['fbAppAuthToken']; $fbo['destType'] =  (stripos($fbo['fbURL'], '/groups/')!=false)?'gr':'pr'; } else { \r
+                        if (stripos($errMsg, 'Unsupported get request')!==false) echo "<b style='color:red;'>Error </b>: Your Facebook URL ( <i>".$fbo['fbURL']."</i> ) is either incorrect or authorzing user don't have rights to post there.<br/>";\r
+                        echo '<br/>Reported Error: ',  $errMsg, "\n"; die(); \r
+                      }                    \r
+                    }                      \r
+                    if (!empty($token['access_token'])) { $fbo['fbAppPageAuthToken'] = $token['access_token']; } else { echo "Can't get Page Token. NO TOKEN RETURNED. Are you sure that user you are trying to authorize is an admin of the page? This message means user was authorized as profile, but page refused to return authorization token. This usually happens when user has <b>no rights</b> to post to that page. "; prr($res); die(); }\r
+                  } \r
+              }\r
+            }\r
+            } else {echo "Can't get User. NO USER RETURNED. "; prr($res); die();}\r
+        }\r
+      }\r
+                                               \r
+      if (!empty($user['id'])) { $fbo['fbAppAuthUser'] = $user['id'];  $fbo['fbAppAuthUserName'] = $user['name'].(!empty($user['username'])?" (".$user['username'].")":'');  \r
+        if (function_exists('get_option')) $nxs_gOptions = get_option('NS_SNAutoPoster'); if(!empty($nxs_gOptions)) { $nxs_gOptions['fb'][$ii] = $fbo; nxs_settings_save($nxs_gOptions); }\r
+        ?><script type="text/javascript">window.location = "<?php echo $nxs_snapSetPgURL; ?>"</script>      \r
+      <?php } die(); }\r
+    }     \r
+    $ntParams = array('ntInfo'=>$ntInfo, 'nxs_plurl'=>$nxs_plurl, 'ntOpts'=>$ntOpts, 'chkField'=>'fbAppAuthUser'); nxs_showListRow($ntParams); \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($mfbo){ $fbo = array('nName'=>'', 'doFB'=>'1', 'fbURL'=>'', 'atpKey'=>'','uName'=>'','uPass'=>'', 'fbAppID'=>'', 'imgUpl'=>'1', 'postType'=>'A', 'fbMsgAFormat'=>'', 'fbAppSec'=>'', 'fbAttch'=>'2', 'fbPgID'=>'', 'fbAppAuthUser'=>'', 'fbMsgFormat'=>__('New post (%TITLE%) has been published on %SITENAME%', 'social-networks-auto-poster-facebook-twitter-g') ); $fbo['ntInfo']= array('lcode'=>'fb'); $this->showNTSettings($mfbo, $fbo, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl, $nxs_snapSetPgURL, $plgn_NS_SNAutoPoster; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); $tmzFrmt = _x('Y-m-d G:i:s', 'timezone date format'); \r
+    if (empty($options['postType']) && !empty($options['fbPostType'])) { $options['postType'] = $options['fbPostType']; unset($options['fbPostType']); } //## Compatibility with V <3.2\r
+    if (empty($options['postType']) && !empty($options['PostType'])) { $pt = $options['PostType']; unset($options['PostType']);  $options['postType'] = $pt; } //## Compatibility with V <3.2\r
+    if ((int)$options['fbAttch']==0 && empty($options['postType'])) $options['postType'] = 'T';  \r
+    if (!isset($plgn_NS_SNAutoPoster)) $gOptions = array(); else $gOptions = $plgn_NS_SNAutoPoster->nxs_options;  \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['msgDAFrmt'])) $options['msgDAFrmt'] = ''; \r
+    if (!isset($options['msgTAFrmt'])) $options['msgTAFrmt'] = ''; if (!isset($options['riComments'])) $options['riComments'] = '';  if (!isset($options['riCommentsAA'])) $options['riCommentsAA'] = ''; \r
+    \r
+    ?> \r
+    <div id="doFB<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">   <input type="hidden" name="apDoSFB<?php echo $ii; ?>" value="0" id="apDoSFB<?php echo $ii; ?>" />                                \r
+    <?php if ($isNew) { ?>    <input type="hidden" name="fb[<?php echo $ii; ?>][apDoFB]" value="1" id="apDoNewFB<?php echo $ii; ?>" /> <?php } ?>\r
+    \r
+     <div class="nsx_iconedTitle" style="float: right; max-width: 342px; text-align: right; background-image: url(<?php echo $nxs_plurl; ?>img/fb16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/instructions/facebook-social-networks-auto-poster-setup-installation"><?php $nType="Facebook"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a><br/>\r
+     <span style="font-size: 10px;"><?php _e('Please use in your Facebook App:', 'social-networks-auto-poster-facebook-twitter-g'); ?> <br/> URL: <em style="font-size: 10px; color:#CB4B16;"><?php echo !empty($_SERVER["REQUEST_SCHEME"])?$_SERVER["REQUEST_SCHEME"]:'http'; ?>://<?php echo $_SERVER["SERVER_NAME"] ?></em> <br/>Domain: <em style="font-size: 10px; color:#CB4B16;"><?php echo $_SERVER["SERVER_NAME"] ?></em> </span>\r
+     \r
+     </div>\r
+    \r
+    <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="fb[<?php echo $ii; ?>][nName]" id="fbnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+    <?php echo nxs_addQTranslSel('fb', $ii, $options['qTLng']); ?>\r
+    \r
+    \r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>    \r
+    \r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+    \r
+    <div style="width:100%;"><strong>Facebook URL:</strong> </div>\r
+    <p style="font-size: 11px; margin: 0px;"><?php _e('Could be your Facebook Profile, Facebook Page, Facebook Group', 'social-networks-auto-poster-facebook-twitter-g'); ?></p>\r
+    <input name="fb[<?php echo $ii; ?>][apFBURL]" id="apFBURL" style="width: 50%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['fbURL'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />              \r
+    <br/><br/> <?php /* \r
+    <?php if ($isNew) { ?><b>Choose How to connect to Facebook:</b>&nbsp;&lt;-&nbsp;<a target="_blank" href="http://www.nextscripts.com/connect-facebook/">What is it?</a> <br/> \r
+    \r
+    <select onchange="nxs_showHideBlock('fbChooseSRVB'+this.value, 'fbChooseSRVC');" id="fbChooseSRV<?php echo $ii; ?>"><option value="0">Your own app</option><option value="1">Autopost.to Service</option><option value="2">Username/password (Pro Only)</option></select> <br/> <br/> \r
+    \r
+    <?php } */ ?>\r
+    <div id="fbChooseSRVB0" class="fbChooseSRVC" style="padding-left:15px; display: <?php if ($isNew || !empty($options['fbAppID'])) echo 'block'; else echo 'none'; ?>;">  \r
+      <div style="width:100%;"><strong>Facebook App ID:</strong> </div><input name="fb[<?php echo $ii; ?>][apFBAppID]" id="apFBAppID" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['fbAppID'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  \r
+      <div style="width:100%;"><strong>Facebook App Secret:</strong> </div><input name="fb[<?php echo $ii; ?>][apFBAppSec]" id="apFBAppSec" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['fbAppSec'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+    </div>    \r
+    <br/><br/>\r
+    <div id="altFormat">\r
+      <div style="width:100%;"><strong id="altFormatText"><?php _e('Message text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="apFBMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apFBMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div>\r
+        \r
+        <textarea cols="150" rows="3" id="fb<?php echo $ii; ?>SNAPformat" name="fb[<?php echo $ii; ?>][apFBMsgFrmt]"  style="width:51%;max-width: 610px;" onfocus="jQuery('#fb<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apFBMsgFrmt<?php echo $ii; ?>');"><?php _e(apply_filters('format_to_edit', htmlentities($options['fbMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?></textarea>    <?php nxs_doShowHint("apFBMsgFrmt".$ii); ?>    \r
+       <br/>\r
+   </div><br/>\r
+      <div style="width:100%;"><strong style="font-size: 16px;" id="altFormatText">Post Type:</strong>&lt;-- (<a id="showShAtt" onmouseout="hidePopShAtt('<?php echo $ii; ?>X');" onmouseover="showPopShAtt('<?php echo $ii; ?>X', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php _e('What\'s the difference?', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)  </div>                      \r
+<div style="margin-left: 10px;">\r
+        \r
+        <input type="radio" name="fb[<?php echo $ii; ?>][postType]" value="T" <?php if ($options['postType'] == 'T') echo 'checked="checked"'; ?> onchange="if (jQuery(this).is(':checked')) jQuery('.nxsDivFBPostTypeOpts<?php echo $ii; ?>').hide();"/> <?php _e('Text Post', 'social-networks-auto-poster-facebook-twitter-g'); ?> - <i><?php _e('just text message', 'social-networks-auto-poster-facebook-twitter-g'); ?></i><br/>                    \r
+        \r
+        <input type="radio" name="fb[<?php echo $ii; ?>][postType]" value="I" <?php if ($options['postType'] == 'I') echo 'checked="checked"'; ?> onchange="if (jQuery(this).is(':checked')) { jQuery('.nxsDivFBPostTypeOpts<?php echo $ii; ?>').hide(); jQuery('#nxsDivFBImgUplOpts<?php echo $ii; ?>').show();}"/> <?php _e('Image Post', 'social-networks-auto-poster-facebook-twitter-g'); ?> - <i><?php _e('big image with text message', 'social-networks-auto-poster-facebook-twitter-g'); ?></i><br/>\r
+          <div style="width:100%; margin-left: 15px;<?php if (empty($options['postType']) || $options['postType'] != 'I') echo "display:none;"; ?>" id="nxsDivFBImgUplOpts<?php echo $ii; ?>" class="nxsDivFBPostTypeOpts<?php echo $ii; ?>" ><strong><?php _e('Upload Images to', 'social-networks-auto-poster-facebook-twitter-g'); ?>:&nbsp;</strong> \r
+             <input value="2" id="apFBImgUplAPP<?php echo $ii; ?>" type="radio" name="fb[<?php echo $ii; ?>][apFBImgUpl]" <?php if ((int)$options['imgUpl'] == 2) echo "checked"; ?> /> <?php _e('App Album', 'social-networks-auto-poster-facebook-twitter-g'); ?> \r
+             <input value="1" id="apFBImgUplTML<?php echo $ii; ?>" type="radio" name="fb[<?php echo $ii; ?>][apFBImgUpl]" <?php if ((int)$options['imgUpl'] != 2) echo "checked"; ?> /> \r
+              <?php _e('Timeline', 'social-networks-auto-poster-facebook-twitter-g'); ?> &lt;-- (<a id="showShAtt" onmouseout="hidePopShAtt('<?php echo $ii; ?>I');" onmouseover="showPopShAtt('<?php echo $ii; ?>I', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php _e('What\'s the difference?', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)      \r
+          </div>        \r
+        \r
+        <input type="radio" name="fb[<?php echo $ii; ?>][postType]" value="A" <?php if ( !isset($options['postType']) || $options['postType'] == '' || $options['postType'] == 'A') echo 'checked="checked"'; ?> onchange="if (jQuery(this).is(':checked')) { jQuery('.nxsDivFBPostTypeOpts<?php echo $ii; ?>').hide(); jQuery('#nxsDivFBAttchLinkOpts<?php echo $ii; ?>').show();}" /> <?php _e('Text Post with "attached" link', 'social-networks-auto-poster-facebook-twitter-g'); ?><br/>\r
+\r
+<div id="nxsDivFBAttchLinkOpts<?php echo $ii; ?>" class="nxsDivFBPostTypeOpts<?php echo $ii; ?>" style="width:100%; margin-left: 15px; line-height: 22px;<?php if (!empty($options['postType']) && $options['postType'] != 'A') echo "display:none;"; ?>">\r
+<?php //prr($options);\r
+ if (empty($options['atchUse'])) $options['atchUse'] = 'F';  \r
+ if (!empty($options['useFBGURLInfo']) && $options['useFBGURLInfo']=='1') $options['atchUse'] = 'F'; \r
+ if (isset($options['useFBGURLInfo']) && $options['useFBGURLInfo']=='0') $options['atchUse'] = 'A'; \r
+ if (!empty($options['fbMsgAFrmt']) && empty($options['msgDAFrmt'])) { $options['msgDAFrmt'] = $options['fbMsgAFrmt']; $options['msgTAFrmt'] = '%TITLE%'; }\r
+ if (!empty($options['fbMsgAFrmt'])) $options['atchUse'] = 'M'; \r
+ if (isset($options['fbAttchAsVid']) && $options['fbAttchAsVid'] == '1') $options['fbAttchAsVid'] = 'A'; \r
+ if (empty($options['fbAttchAsVid'])) $options['fbAttchAsVid'] = 'N'; \r
+\r
+ ?>\r
+        <strong><?php _e('Link attachment type', 'social-networks-auto-poster-facebook-twitter-g'); ?>:&nbsp;</strong> <input value="2"  id="apFBAttchShare<?php echo $ii; ?>" type="radio" name="fb[<?php echo $ii; ?>][apFBAttch]" <?php if ((int)$options['fbAttch'] == 2) echo "checked"; ?> /><?php _e('Share a link to your blogpost', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;&nbsp;&nbsp;\r
+          <input value="1"  id="apFBAttch<?php echo $ii; ?>" type="radio" name="fb[<?php echo $ii; ?>][apFBAttch]"  <?php if ((int)$options['fbAttch'] == 1) echo "checked"; ?> /> \r
+          <?php _e('Attach your blogpost', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;&nbsp;\r
+          &lt;-- (<a id="showShAtt" onmouseout="hidePopShAtt('<?php echo $ii; ?>');" onmouseover="showPopShAtt('<?php echo $ii; ?>', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php _e('What\'s the difference?', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)\r
+          <br/>\r
+        <strong><?php _e('What should fill attachment info:', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;</strong> \r
+          <input value="F" type="radio" name="fb[<?php echo $ii; ?>][atchUse]" <?php if ($options['atchUse'] == 'F') echo "checked"; ?> onchange="if (jQuery(this).is(':checked')) { jQuery('#apFBMsgAFrmtDiv<?php echo $ii; ?>').hide(); jQuery('#nxsRBVidThumb<?php echo $ii; ?>').prop('disabled', true); }"/><?php _e('Facebook', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;&nbsp;&nbsp;\r
+          <input value="A" type="radio" name="fb[<?php echo $ii; ?>][atchUse]" <?php if ($options['atchUse'] == 'A') echo "checked"; ?> onchange="if (jQuery(this).is(':checked')) { jQuery('#apFBMsgAFrmtDiv<?php echo $ii; ?>').hide(); jQuery('#nxsRBVidThumb<?php echo $ii; ?>').prop('disabled', false);}"/><?php _e('Plugin/API', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;&nbsp;&nbsp;\r
+          <input value="M" type="radio" name="fb[<?php echo $ii; ?>][atchUse]" <?php if ($options['atchUse'] == 'M') echo "checked"; ?> onchange="if (jQuery(this).is(':checked')) { jQuery('#apFBMsgAFrmtDiv<?php echo $ii; ?>').show(); jQuery('#nxsRBVidThumb<?php echo $ii; ?>').prop('disabled', false);}"/><?php _e('Set your own', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;&nbsp;\r
+          &lt;-- (<a id="showShAtt" onmouseout="hidePopShAtt('<?php echo $ii; ?>Fill');" onmouseover="showPopShAtt('<?php echo $ii; ?>Fill', event);" onclick="return false;" class="underdash" href="#"><?php _e('What\'s the difference?', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)<br/>\r
+          \r
+          <div id="apFBMsgAFrmtDiv<?php echo $ii; ?>" style="<?php if ($options['atchUse'] != 'M') echo "display:none;"; ?>" >\r
+      &nbsp;&nbsp;&nbsp; <?php _e('Attachment Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:<input name="fb[<?php echo $ii; ?>][msgTAFrmt]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['msgTAFrmt'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+      &nbsp;&nbsp;&nbsp; <?php _e('Attachment Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:<input name="fb[<?php echo $ii; ?>][msgDAFrmt]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['msgDAFrmt'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+          </div>          \r
+            \r
+        <strong><?php _e('If post has a video:', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;</strong> \r
+          <input value="N" type="radio" name="fb[<?php echo $ii; ?>][fbAttchAsVid]" <?php if ($options['fbAttchAsVid'] == 'N') echo 'checked="checked"'; ?> /><?php _e('Do nothing', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;&nbsp;&nbsp;\r
+          <input value="A" id="nxsRBVidThumb<?php echo $ii; ?>" <?php if ($options['atchUse'] == 'F') echo "disabled"; ?>  type="radio" name="fb[<?php echo $ii; ?>][fbAttchAsVid]" <?php if ($options['fbAttchAsVid'] == 'A') echo 'checked="checked"'; ?> /><?php _e('Use as thumbnail', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;&nbsp;&nbsp;\r
+          <input value="V" type="radio" name="fb[<?php echo $ii; ?>][fbAttchAsVid]" <?php if ($options['fbAttchAsVid'] == 'V') echo 'checked="checked"'; ?> /> \r
+          <?php _e('Attach Video(!)', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;&nbsp;\r
+          &lt;-- (<a id="showShAtt" onmouseout="hidePopShAtt('<?php echo $ii; ?>Video');" onmouseover="showPopShAtt('<?php echo $ii; ?>Video', event);" onclick="return false;" class="underdash" href="#"><?php _e('What\'s the difference?', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)\r
+          <br/>   \r
+       \r
+      \r
+</div><br/></div>\r
+  \r
+<div class="popShAtt" style="z-index: 9999; width: 350px;" id="popShAtt<?php echo $ii; ?>I"><h3><?php _e('Where to upload Images', 'social-networks-auto-poster-facebook-twitter-g'); ?></h3> <b><?php _e('(App Album)', 'social-networks-auto-poster-facebook-twitter-g'); ?></b> <?php _e('Facebook automatically creates an album for your app. Images will be grouped there as in any regular album.', 'social-networks-auto-poster-facebook-twitter-g'); ?>  <br/><br/><b><?php _e('(Timeline)', 'social-networks-auto-poster-facebook-twitter-g'); ?></b> <?php _e('Images will be posted to the special "Wall/Timeline" album and won\'t be grouped. "Wall/Timeline" album must exist. It\'s created when first image posted to timeline manually.', 'social-networks-auto-poster-facebook-twitter-g'); ?></div>  \r
+<div class="popShAtt" style="z-index: 9999" id="popShAtt<?php echo $ii; ?>"><h3><?php _e('Two ways of attaching post on Facebook', 'social-networks-auto-poster-facebook-twitter-g'); ?></h3><img src="<?php echo $nxs_plurl; ?>img/fb2wops.png" width="600" height="257" alt="<?php _e('Two ways of attaching post on Facebook', 'social-networks-auto-poster-facebook-twitter-g'); ?>"/></div>\r
+<div class="popShAtt" style="z-index: 9999" id="popShAtt<?php echo $ii; ?>X"><h3><?php _e('Facebook Post Types', 'social-networks-auto-poster-facebook-twitter-g'); ?></h3><img src="<?php echo $nxs_plurl; ?>img/fbPostTypesDiff6.png" width="600" height="398" alt="<?php _e('Facebook Post Types', 'social-networks-auto-poster-facebook-twitter-g'); ?>"/></div>\r
+\r
+<div class="popShAtt" style="z-index: 9999; width: 350px;" id="popShAtt<?php echo $ii; ?>Fill"><h3><?php _e('What should fill attachment info', 'social-networks-auto-poster-facebook-twitter-g'); ?></h3> <b><?php _e('(Facebook)', 'social-networks-auto-poster-facebook-twitter-g'); ?></b> <?php _e('Recommended. Facebook will automatically take attached/shared link info from OG: tags or other sources.', 'social-networks-auto-poster-facebook-twitter-g'); ?>  <br/><br/><b><?php _e('(Pluign/API)', 'social-networks-auto-poster-facebook-twitter-g'); ?></b> <?php _e('Plugin will generate attachment title and description using info from SEO Plugins, then post excerpt, then post text and title.', 'social-networks-auto-poster-facebook-twitter-g'); ?><br/><br/><b><?php _e('(Set your own)', 'social-networks-auto-poster-facebook-twitter-g'); ?></b> <?php _e('Set the format by yourself using message formatting tags', 'social-networks-auto-poster-facebook-twitter-g'); ?></div>  \r
+<div class="popShAtt" style="z-index: 9999; width: 350px;" id="popShAtt<?php echo $ii; ?>Video"><h3><?php _e('If post has a video', 'social-networks-auto-poster-facebook-twitter-g'); ?></h3> <b><?php _e('(Do Nothing)', 'social-networks-auto-poster-facebook-twitter-g'); ?></b> <?php _e('Plugin is not going to do anything specific about video', 'social-networks-auto-poster-facebook-twitter-g'); ?>  <br/><br/><b><?php _e('(Use as thumbnail)', 'social-networks-auto-poster-facebook-twitter-g'); ?></b> <?php _e('Video thumbnail will be used as attachment image. Please note - <b>it won\'t be playable.</b> This option is not compatible with "What should fill attachment info: Facebook"', 'social-networks-auto-poster-facebook-twitter-g'); ?><br/><br/><b><?php _e('(Attach video page to the Facebook post)', 'social-networks-auto-poster-facebook-twitter-g'); ?></b> <?php _e('If you choose this, YouTube or Vimeo page will be attached to the Facebook post as <b>playable thumbnail</b>. Please note! <b>There will be no link to your site.</b> Please use %URL% in the message format if you need a backlink', 'social-networks-auto-poster-facebook-twitter-g'); ?></div>  \r
+\r
+\r
+\r
+              \r
+            <?php if ($options['fbPgID']!='') {?><div style="width:100%;"><strong>Facebook Page ID:</strong> <?php if (!empty($options['destType']) && $options['destType'] == 'pr') _e('Profile', 'social-networks-auto-poster-facebook-twitter-g');  \r
+              if (!empty($options['destType']) && $options['destType'] == 'gr') _e('Group', 'social-networks-auto-poster-facebook-twitter-g');               \r
+              if (empty($options['destType']) || (!empty($options['destType']) && $options['destType'] == 'pg')) _e('Page', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;-&nbsp;\r
+              <?php _e(apply_filters('format_to_edit', htmlentities($options['fbPgID'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+              </div><?php } ?>\r
+            <?php \r
+          if (!empty($options['fbAppID'])) {\r
+            if($options['fbAppSec']=='') { ?>\r
+            <b><?php _e('Authorize Your Facebook Account', 'social-networks-auto-poster-facebook-twitter-g'); ?></b> <?php _e('Please click "Update Settings" to be able to Authorize your account.', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+            <?php } else { if(isset($options['fbAppAuthUser']) && $options['fbAppAuthUser']>0) { ?>\r
+            <?php _e('Your Facebook Account has been authorized.', 'social-networks-auto-poster-facebook-twitter-g'); ?> User ID: <?php _e(apply_filters('format_to_edit', htmlentities($options['fbAppAuthUser'].(!empty($options['fbAppAuthUserName'])?" - ".$options['fbAppAuthUserName']:''), ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>.\r
+            <br/><?php _e('You can', 'social-networks-auto-poster-facebook-twitter-g'); ?> Re- <?php } ?>            \r
+            <a href="https://www.facebook.com/dialog/oauth?client_id=<?php echo trim($options['fbAppID']);?>&scope=publish_actions,manage_pages,publish_pages,user_managed_groups,user_posts,user_photos&state=<?php echo 'nxs-fb-'.$ii; ?>&redirect_uri=<?php echo trim(urlencode($nxs_snapSetPgURL));?>">Authorize Your Facebook Account</a> \r
+            <?php if (!isset($options['fbAppAuthUser']) || $options['fbAppAuthUser']<1) { ?> <div class="blnkg">&lt;=== <?php _e('Authorize your account', 'social-networks-auto-poster-facebook-twitter-g'); ?> ===</div> \r
+            <br/><br/><i> <?php _e('If you get Facebook message:', 'social-networks-auto-poster-facebook-twitter-g'); ?> <b>"Error. An error occurred. Please try again later."</b> or <b>"Error 191"</b>  <?php _e('please make sure that domain name in your Facebook App matches your website domain exactly. Please note that www. and non www. versions are different domains.', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> <?php }?>\r
+          <?php } } ?>\r
+            \r
+            <?php  if((isset($options['fbAppAuthUser']) && $options['fbAppAuthUser']>0) || !empty($options['atpKey']) || !empty($options['uName']) ) { ?>\r
+            \r
+            <br/><br/><b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('FB','<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>         \r
+            <?php }?>\r
+    \r
+     </div>\r
+      <?php /* ######################## Tools Tab ####################### */ ?>\r
+  <?php if (!$isNew) { ?>   <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+  <?php  nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);  ?>    \r
+       \r
+   <div style="width:100%;"><strong style="font-size: 16px;"><?php _e('Facebook Comments:', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> </div>\r
+   <div style="margin-bottom: 5px; margin-left: 10px; ">\r
+   <p style="font-size: 11px; margin: 0px;"><?php _e('Plugin could grab comments from Facebook and import them as Wordpress Comments', 'social-networks-auto-poster-facebook-twitter-g'); ?></p>\r
+   \r
+   <?php if ( !empty($gOptions['riActive']) && $gOptions['riActive'] == '1' ) { ?>\r
+   <input value="1"  id="apFBMsgAFrmtA<?php echo $ii; ?>" <?php if (trim($options['riComments'])=='1') echo "checked"; ?> type="checkbox" name="fb[<?php echo $ii; ?>][riComments]"/> <strong><?php _e('Import Facebook Comments', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong>\r
+   <br/>\r
+   <div style="margin-bottom: 5px; margin-left: 10px; ">\r
+   <input value="1"  id="apFBMsgAFrmtA<?php echo $ii; ?>" <?php if (trim($options['riCommentsAA'])=='1') echo "checked"; ?> type="checkbox" name="fb[<?php echo $ii; ?>][riCommentsAA]"/> <strong><?php _e('Auto-approve imported comments', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong></div>\r
+   \r
+   <?php } else { echo "<br/>"; _e('Please activate the "Comments Import" from SNAP Settings Tab', 'social-networks-auto-poster-facebook-twitter-g'); } ?>\r
+   \r
+   </div>\r
+  \r
+  <?php  nxs_showRepostSettings($nt, $ii, $options); ?> \r
+            \r
+            \r
+    </div> <?php } ?> <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"> \r
+      <input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+      <?php /* ?>\r
+      <input type="button" id="svBtn<?php echo $nt.$ii ?>" onclick="nxs_svSet('<?php echo $nt; ?>', '<?php echo $ii; ?>')" class="button-primary" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+      <div id="nxsSaveLoadingImg<?php echo $nt.$ii; ?>" class="doneMsg">Saving.....</div> <div id="doneMsg<?php echo $nt.$ii; ?>" class="doneMsg">Done</div>\r
+      <?php */ ?>\r
+    </div>\r
+            \r
+          </div>        \r
+        <?php\r
+      \r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = 'FB'; $lcode = 'fb';\r
+    foreach ($post as $ii => $pval){ \r
+      if (!empty($pval['apFBAppID']) || !empty($pval['atpKey']) || !empty($pval['uName'])) { if (!isset($options[$ii])) $options[$ii] = array();\r
+        \r
+        if (isset($pval['atpKey']))         $options[$ii]['atpKey'] = trim($pval['atpKey']);\r
+        if (isset($pval['uName']))          $options[$ii]['uName'] = trim($pval['uName']);\r
+        if (isset($pval['uPass']))          $options[$ii]['uPass'] = trim($pval['uPass']);        \r
+        \r
+        if (isset($pval['apDoFB']))         $options[$ii]['doFB'] = $pval['apDoFB']; else $options[$ii]['doFB'] = 0;\r
+        if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);\r
+        if (isset($pval['apFBAppID']))      $options[$ii]['fbAppID'] = trim($pval['apFBAppID']);                                \r
+        if (isset($pval['apFBAppSec']))     $options[$ii]['fbAppSec'] = trim($pval['apFBAppSec']);        \r
+        \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+        \r
+        if (isset($pval['postType']))     $options[$ii]['postType'] = trim($pval['postType']);\r
+        if (isset($pval['apFBAttch']))      $options[$ii]['fbAttch'] = $pval['apFBAttch']; else $options[$ii]['fbAttch'] = 0;\r
+        if (isset($pval['fbAttchAsVid'])) $options[$ii]['fbAttchAsVid'] = $pval['fbAttchAsVid']; else $options[$ii]['fbAttchAsVid'] = 0;\r
+        if (isset($pval['atchUse']))     $options[$ii]['atchUse'] = trim($pval['atchUse']);\r
+        \r
+        if ($options[$ii]['atchUse']=='F' && $options[$ii]['fbAttchAsVid'] = 'A') $options[$ii]['fbAttchAsVid'] = 'N';\r
+        \r
+        if (isset($pval['apFBImgUpl']))     $options[$ii]['imgUpl'] = $pval['apFBImgUpl']; else $options[$ii]['imgUpl'] = 0;\r
+        \r
+        if (isset($pval['apFBMsgFrmt']))    $options[$ii]['fbMsgFormat'] = trim($pval['apFBMsgFrmt']); \r
+        \r
+        \r
+        if (isset($pval['msgTAFrmt']))    $options[$ii]['msgTAFrmt'] = trim($pval['msgTAFrmt']); \r
+        if (isset($pval['msgDAFrmt']))    $options[$ii]['msgDAFrmt'] = trim($pval['msgDAFrmt']); \r
+        \r
+        if (isset($options[$ii]['useFBGURLInfo'])) unset($options[$ii]['useFBGURLInfo']);\r
+        if (isset($options[$ii]['fbMsgAFrmt'])) unset($options[$ii]['fbMsgAFrmt']);\r
+        \r
+        if (isset($pval['riComments']))      $options[$ii]['riComments'] = $pval['riComments']; else $options[$ii]['riComments'] = 0;\r
+        if (isset($pval['riCommentsAA']))    $options[$ii]['riCommentsAA'] = $pval['riCommentsAA']; else $options[$ii]['riCommentsAA'] = 0;\r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+                \r
+        if (isset($pval['apFBURL']))  {  $options[$ii]['fbURL'] = trim($pval['apFBURL']);   if ( substr($options[$ii]['fbURL'], 0, 4)!='http' )  $options[$ii]['fbURL'] = 'http://'.$options[$ii]['fbURL'];\r
+          $fbPgID = $options[$ii]['fbURL']; if (substr($fbPgID, -1)=='/') $fbPgID = substr($fbPgID, 0, -1);  $fbPgID = substr(strrchr($fbPgID, "/"), 1); \r
+          if (strpos($fbPgID, '?')!==false) $fbPgID = substr($fbPgID, 0, strpos($fbPgID, '?'));           \r
+          if (strpos($fbPgID, '-')!==false) { $possID = substr(strrchr($fbPgID, "-"), 1);   $fbPgID = (strlen($possID)>10 && is_numeric($possID))?$possID:$fbPgID; } //prr($fbPgID); die();          \r
+          $options[$ii]['fbPgID'] = $fbPgID; //echo $fbPgID;\r
+          if (strpos($options[$ii]['fbURL'], '?')!==false) $options[$ii]['fbURL'] = substr($options[$ii]['fbURL'], 0, strpos($options[$ii]['fbURL'], '?'));// prr($pval); prr($options[$ii]); // die();\r
+        }                 \r
+        //## Compatibility with ver <3.2\r
+        if (empty($options[$ii]['postType']) && !empty($options[$ii]['fbPostType'])) { $options[$ii]['postType'] = $options[$ii]['fbPostType']; unset($options[$ii]['fbPostType']); }\r
+        if (empty($options[$ii]['postType']) && !empty($options[$ii]['PostType'])) { $pt = $options[$ii]['PostType']; unset($options[$ii]['PostType']); $options[$ii]['postType'] = $pt; }\r
+        \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  } \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID;  $nt = 'fb'; $ntU = 'FB'; \r
+    foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapFB', true));  if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii])) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]);         \r
+        if (empty($ntOpt['postType']) && !empty($ntOpt['fbPostType'])) { $ntOpt['postType'] = $ntOpt['fbPostType']; unset($ntOpt['fbPostType']); } //## Compatibility with ver <3.2         \r
+        if (empty($ntOpt['postType']) && !empty($ntOpt['PostType'])) { $pt = $ntOpt['PostType']; unset($ntOpt['PostType']); $ntOpt['postType'] = $pt; } //## Compatibility with ver <3.2         \r
+        if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = '';  if (empty($ntOpt['urlToUse'])) $ntOpt['urlToUse'] = '';\r
+        $doFB = $ntOpt['doFB'] && (is_array($pMeta) || $ntOpt['catSel']!='1');        \r
+        $imgToUse = $ntOpt['imgToUse'];  $urlToUse = $ntOpt['urlToUse']; \r
+        $isAvailFB =  $ntOpt['fbURL']!='' && $ntOpt['fbAppID']!='' && $ntOpt['fbAppSec']!=''; $isAttachFB = $ntOpt['fbAttch']; $fbMsgFormat = htmlentities($ntOpt['fbMsgFormat'], ENT_COMPAT, "UTF-8"); $fbPostType = $ntOpt['postType'];\r
+      ?>  \r
+      \r
+      <tr><th style="text-align:left;" colspan="2"> \r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      \r
+      <?php if ($isAvailFB) { ?><input class="nxsGrpDoChb" value="1" id="doFB<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="fb[<?php echo $ii; ?>][doFB]" <?php if ((int)$doFB == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="fb[<?php echo $ii; ?>][doFB]" value="<?php echo $doFB;?>"> <?php } ?> <?php } ?>\r
+      \r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/fb16.png);">Facebook - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th><td><?php //## Only show RePost button if the post is "published"\r
+    if ($post->post_status == "publish" && $isAvailFB) { ?>\r
+    \r
+    <input alt="<?php echo $ii; ?>" style="float: right;margin-left: 10px" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToFB_repostButton" id="rePostToFB_button" value="<?php _e('Repost to Facebook', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+    <?php if ($ntOpt['riComments']=='1' && (is_array($pMeta) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) && strpos($pMeta[$ii]['pgID'],'_')!==false ) ) { ?>\r
+       <input alt="<?php echo $ii; ?>" style="float: right; " onclick="return false;" type="button" class="button" name="riToFB_repostButton" id="riToFB_button" value="<?php _e('Import Comments from Facebook', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+    <?php } ?>\r
+    \r
+                    <?php } ?>\r
+                    \r
+                    <?php  if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) && strpos($pMeta[$ii]['pgID'],'_')!==false ) { $pid = explode('_', $pMeta[$ii]['pgID']);\r
+                        \r
+                        ?> <span id="pstdFB<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+                      <a style="font-size: 10px;" href="http://www.facebook.com/permalink.php?story_fbid=<?php echo $pid[1].'&id='.$pid[0]; ?>" target="_blank"><?php $nType="Facebook"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>\r
+                <?php if (!$isAvailFB) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup and Authorize your Facebook Account to AutoPost to Facebook</b>\r
+                <?php }  else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); }  ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>fb" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> /> \r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>               \r
+                </td></tr> <?php } ?>\r
+                \r
+                <tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;">\r
+                  \r
+                  <b></b>\r
+                </th>\r
+                <td></td>\r
+                </tr>\r
+                \r
+             <tr><th scope="row" style="text-align:right; width:150px; vertical-align:top; padding-top: 0px; padding-right:10px;"> <?php _e('Post Type:', 'social-networks-auto-poster-facebook-twitter-g'); ?> <br/>\r
+                (<a id="showShAtt" style="font-weight: normal" onmouseout="hidePopShAtt('<?php echo $ii; ?>X');" onmouseover="showPopShAtt('<?php echo $ii; ?>X', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php _e('What\'s the difference?', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</th><td>     \r
+        \r
+        <input type="radio" name="fb[<?php echo $ii; ?>][postType]" value="T" <?php if ($fbPostType == 'T') echo 'checked="checked"'; ?> /> <?php _e('Text Post', 'social-networks-auto-poster-facebook-twitter-g'); ?>  - <i><?php _e('just text message', 'social-networks-auto-poster-facebook-twitter-g'); ?></i><br/>       \r
+        <input type="radio" name="fb[<?php echo $ii; ?>][postType]" value="I" <?php if ($fbPostType == 'I') echo 'checked="checked"'; ?> /> <?php _e('Image Post', 'social-networks-auto-poster-facebook-twitter-g'); ?> - <i><?php _e('big image with text message', 'social-networks-auto-poster-facebook-twitter-g'); ?></i><br/>             \r
+        <input type="radio" name="fb[<?php echo $ii; ?>][postType]" value="A" <?php if ( !isset($fbPostType) || $fbPostType == '' || $fbPostType == 'A') echo 'checked="checked"'; ?> /> <?php _e('Text Post with "attached" blogpost', 'social-networks-auto-poster-facebook-twitter-g'); ?> &lt;-- (<a id="showShAtt" onmouseout="hidePopShAtt('<?php echo $ii; ?>');" onmouseover="showPopShAtt('<?php echo $ii; ?>', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php _e('What\'s the difference?', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>) <br/>\r
+\r
+<div style="width:100%; margin-left: 25px;"><strong><?php _e('Link attachment type:', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;</strong> <input value="2"  id="apFBAttchShare<?php echo $ii; ?>" onchange="doSwitchShAtt(0,<?php echo $ii; ?>);" type="radio" name="fb[<?php echo $ii; ?>][AttachPost]" <?php if ((int)$isAttachFB == 2) echo "checked"; ?> /> \r
+                <?php _e('Share a link to your blogpost', 'social-networks-auto-poster-facebook-twitter-g'); ?> .. <?php _e('or', 'social-networks-auto-poster-facebook-twitter-g'); ?> ..                                  \r
+               <input value="1"  id="apFBAttch<?php echo $ii; ?>" onchange="doSwitchShAtt(1,<?php echo $ii; ?>);" type="radio" name="fb[<?php echo $ii; ?>][AttachPost]"  <?php if ((int)$isAttachFB == 1) echo "checked"; ?> /> \r
+              <?php _e('Attach your blogpost', 'social-networks-auto-poster-facebook-twitter-g'); ?>          \r
+</div> \r
+<div class="popShAtt" id="popShAtt<?php echo $ii; ?>"><h3><?php _e('Two ways of attaching post on Facebook', 'social-networks-auto-poster-facebook-twitter-g'); ?></h3> <img src="<?php echo $nxs_plurl; ?>img/fb2wops.png" width="600" height="257" alt="<?php _e('Two ways of attaching post on Facebook', 'social-networks-auto-poster-facebook-twitter-g'); ?>"/></div>\r
+<div class="popShAtt" id="popShAtt<?php echo $ii; ?>X"><h3><?php _e('Facebook Post Types', 'social-networks-auto-poster-facebook-twitter-g'); ?></h3><img src="<?php echo $nxs_plurl; ?>img/fbPostTypesDiff6.png" width="600" height="398" alt="<?php _e('Facebook Post Types', 'social-networks-auto-poster-facebook-twitter-g'); ?>"/></div>\r
+     </td></tr>\r
+                              \r
+                    \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Message Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                <td>\r
+                <?php if (1==1) { ?>\r
+                <textarea cols="150" rows="2" id="fb<?php echo $ii; ?>SNAPformat" name="fb[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#fb<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apFBTMsgFrmt<?php echo $ii; ?>');"><?php echo $fbMsgFormat ?></textarea>\r
+                <?php } else { ?>\r
+                <input value="<?php echo $fbMsgFormat ?>" type="text" name="fb[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apFBTMsgFrmt<?php echo $ii; ?>');"/><?php nxs_doShowHint("apFBTMsgFrmt".$ii, '', '58'); ?>\r
+                <?php } ?>\r
+                </td></tr>\r
+                <?php /* ## Select Image & URL ## */ nxs_showImgToUseDlg($nt, $ii, $imgToUse); nxs_showURLToUseDlg($nt, $ii, $urlToUse);\r
+     } \r
+    }\r
+      \r
+  }\r
+  \r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = '';\r
+     if (isset($pMeta['SNAPformat'])) $optMt['fbMsgFormat'] = $pMeta['SNAPformat']; \r
+     if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse']; if (isset($pMeta['urlToUse'])) $optMt['urlToUse'] = $pMeta['urlToUse']; \r
+     if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+     if (isset($pMeta['AttachPost'])) $optMt['fbAttch'] = ($pMeta['AttachPost'] != '')?$pMeta['AttachPost']:0; else { if (isset($pMeta['SNAPformat'])) $optMt['fbAttch'] = 0; } \r
+     if (isset($pMeta['postType'])) $optMt['postType'] = $pMeta['postType'];\r
+     if (isset($pMeta['doFB'])) $optMt['doFB'] = $pMeta['doFB'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doFB'] = 0; }      \r
+     if (isset($pMeta['SNAPincludeFB']) && $pMeta['SNAPincludeFB'] == '1' ) $optMt['doFB'] = 1;   // <2.6 Compatibility fix    \r
+     return $optMt;\r
+  }\r
+}}\r
+\r
+if (!function_exists("nxs_getBackFBComments")) { function nxs_getBackFBComments($postID, $options, $po) { $ci = 0;  if (empty($options['fbAppPageAuthToken'])) return;    \r
+    $options['appsecret_proof'] = hash_hmac('sha256', $options['fbAppPageAuthToken'], $options['fbAppSec']);    $wprg = array('sslverify'=>false);  \r
+    $aacct = array('access_token'=>$options['fbAppPageAuthToken'], 'appsecret_proof'=>$options['appsecret_proof'], 'method'=>'get');  $ptype =  get_post_type( $postID ); \r
+    $res = wp_remote_get( "https://graph.facebook.com/v2.3/".$po['pgID']."/comments?filter=toplevel&limit=250&".http_build_query($aacct, null, '&'), $wprg); \r
+    if (is_wp_error($res) || empty($res['body'])) $badOut['Error'] = ' [ERROR] '.print_r($res, true); else { //prr($res);\r
+    $ret = json_decode($res['body'], true); if (empty($ret)) $badOut['Error'] .= "JSON ERROR: ".print_r($res, true); else { //   prr($ret);    \r
+      $impCmnts = get_post_meta($postID, 'snapImportedFBComments', true); if (!is_array($impCmnts)) $impCmnts = array(); //prr($impCmnts);   \r
+      if (is_array($ret) && is_array($ret['data'])) foreach ($ret['data'] as $comment){ $cid = $comment['id']; if (trim($cid)=='') continue;\r
+      if (!in_array('fbxcw'.$cid, $impCmnts)) {  \r
+          $res = wp_remote_get( "https://graph.facebook.com/v2.3/".$comment['from']['id']."?".http_build_query($aacct, null, '&'), $wprg); $authData = json_decode($res['body'], true);\r
+          \r
+          if ($ptype=='topic'){ $my_post = array('post_title' => '', 'post_content' => $comment['message'], 'post_status' => 'publish', 'post_parent' => $postID, 'post_author' => 0, 'post_type' => 'reply');\r
+              $wpCid = wp_insert_post($my_post); add_post_meta($wpCid, '_bbp_anonymous_name', $comment['from']['name']); $fid = get_post_meta($postID, '_bbp_forum_id', true);\r
+              add_post_meta($wpCid, '_bbp_anonymous_email', $comment['from']['id'].'@facebook.com'); add_post_meta($wpCid, '_bbp_anonymous_website', 'http://www.facebook.com/'.$comment['from']['id']);\r
+              add_post_meta($wpCid, '_bbp_topic_id', $postID); add_post_meta($wpCid, '_bbp_forum_id', $fid);\r
+              \r
+          } else { $commentdata = array( 'comment_post_ID' => $postID, 'comment_author' => $comment['from']['name'], 'comment_author_email' => $comment['from']['id'].'@facebook.com', \r
+              'comment_author_url' => $authData['link'], 'comment_content' => $comment['message'], 'comment_date_gmt' => date('Y-m-d H:i:s', strtotime( $comment['created_time'] ) ), 'comment_type' => '');             \r
+            $wpCid = nxs_postNewComment($commentdata, $options['riCommentsAA']=='1'); //prr($commentdata);\r
+          } $ci++; $impCmnts[$wpCid] = 'fbxcw'.$cid; \r
+      } else $wpCid = array_search('fbxcw'.$cid, $impCmnts);      \r
+            \r
+      $res = wp_remote_get( "https://graph.facebook.com/v2.3/".$cid."/comments?".http_build_query($aacct, null, '&'), $wprg); $replRet = json_decode($res['body'], true);\r
+      if (is_array($replRet) && is_array($replRet['data'])) foreach ($replRet['data'] as $rComment){ $rCid = $rComment['id']; \r
+        if (trim($rCid)!='' && !in_array('fbxcw'.$rCid, $impCmnts)) {  // prr($impCmnts);\r
+          $res = wp_remote_get( "https://graph.facebook.com/v2.3/".$rComment['from']['id']."?".http_build_query($aacct, null, '&'), $wprg); $authData = json_decode($res['body'], true);\r
+          if ($ptype=='topic'){ $my_post = array('post_title' => '', 'post_content' => $rComment['message'], 'post_status' => 'publish', 'post_parent' => $postID, 'post_author' => 0, 'post_type' => 'reply');\r
+              $wpCid = wp_insert_post($my_post); add_post_meta($wpCid, '_bbp_anonymous_name', $rComment['from']['name']); $fid = get_post_meta($postID, '_bbp_forum_id', true);\r
+              add_post_meta($wpCid, '_bbp_anonymous_email', $rComment['from']['id'].'@facebook.com'); add_post_meta($wpCid, '_bbp_anonymous_website', 'http://www.facebook.com/'.$rComment['from']['id']);\r
+              add_post_meta($wpCid, '_bbp_topic_id', $postID); add_post_meta($wpCid, '_bbp_forum_id', $fid);              \r
+          } else {\r
+            $commentdata = array( 'comment_parent' => $wpCid, 'comment_post_ID' => $postID, 'comment_author' => $rComment['from']['name'], 'comment_author_email' => $rComment['from']['id'].'@facebook.com', \r
+              'comment_author_url' => $authData['link'], 'comment_content' => $rComment['message'], 'comment_date_gmt' => date('Y-m-d H:i:s', strtotime( $rComment['created_time'] ) ), 'comment_type' => '');\r
+            // prr($commentdata);\r
+            nxs_postNewComment($commentdata, $options['riCommentsAA']=='1'); \r
+          } $ci++; $impCmnts[] = 'fbxcw'.$rCid; \r
+        }\r
+      }        \r
+    }    \r
+    delete_post_meta($postID, 'snapImportedFBComments'); add_post_meta($postID, 'snapImportedFBComments', $impCmnts ); \r
+    //## if Importing manually from Button echo result.\r
+    if (isset($_POST['id']) && $_POST['id']!='') printf( _n( '%d comment has been imported.', '%d comments has been imported.', $ci, 'social-networks-auto-poster-facebook-twitter-g'), $ci );\r
+   }}\r
+}}\r
+\r
+// ShortCode [nxs_fbembed accnum=0]\r
+function nxs_fbembed_func( $atts ) { extract( shortcode_atts( array('accnum' => '0'), $atts ) );  $pid = get_the_ID(); $fbpo =  get_post_meta($pid, 'snapFB', true); $fbpo =  maybe_unserialize($fbpo);     \r
+  if (!is_array($fbpo) || !is_array($fbpo[$accnum]) || !isset($fbpo[$accnum]['pgID']) || strpos($fbpo[$accnum]['pgID'], '_')===false ) return; $fbpo = $fbpo[$accnum]['pgID']; \r
+  $fbpoA = explode('_',$fbpo);  $fpg = $fbpoA[0];  $fpid = $fbpoA[1]; \r
+  $txtOut = '<div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, \'script\', \'facebook-jssdk\'));</script>\r
+<div class="fb-post" data-href="https://www.facebook.com/permalink.php?story_fbid='.$fpid.'&amp;id='.$fpg.'"><div class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/permalink.php?story_fbid='.$fpid.'&amp;id='.$fpg.'">Post</a></div></div>';\r
+  return $txtOut;\r
+}\r
+if (function_exists("add_shortcode")) add_shortcode( 'nxs_fbembed', 'nxs_fbembed_func' );\r
+\r
+if (!function_exists("nxs_rePostToFB_ajax")) { function nxs_rePostToFB_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; // $result = nsPublishTo($id, 'FB', true);   \r
+      $options = get_option('NS_SNAutoPoster');  foreach ($options['fb'] as $ii=>$fbo) if ($ii==$_POST['nid']) {  $fbo['ii'] = $ii; $fbo['pType'] = 'aj';\r
+      $fbpo =  get_post_meta($postID, 'snapFB', true); /* echo $postID."|"; echo $fbpo; */ $fbpo =  maybe_unserialize($fbpo);  //prr($fbpo); \r
+      if (is_array($fbpo) && isset($fbpo[$ii]) && is_array($fbpo[$ii]) ){ $ntClInst = new nxs_snapClassFB(); $fbo = $ntClInst->adjMetaOpt($fbo, $fbpo[$ii]); } //prr($fbo);\r
+      if (isset($_POST['ri']) && $_POST['ri']=='1') { nxs_getBackFBComments($postID, $fbo, $fbpo[$ii]); die(); } else {\r
+        $result = nxs_doPublishToFB($postID, $fbo); if ($result == '200') die("Your post has been successfully sent to Facebook."); else die($result);\r
+      }\r
+    }    \r
+  }\r
+}\r
+\r
+if (!function_exists("nxs_doPublishToFB")) { //## Second Function to Post to FB\r
+  function nxs_doPublishToFB($postID, $options){ global $ShownAds; $ntCd = 'FB'; $ntCdL = 'fb'; $ntNm = 'Facebook'; $dsc = ''; $vidURL = ''; \r
+    if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+    if (!class_exists('nxs_class_SNAP_FB')) { nxs_addToLogN('E', 'Error', $ntCd, '-=ERROR=- No Facebook API Lib Detected', ''); return "No Facebook API Lib Detected";}\r
+    \r
+    $fbWhere = 'feed'; $page_id = $options['fbPgID']; if (isset($ShownAds)) $ShownAdsL = $ShownAds;  \r
+    $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));\r
+    //## Some Common stuff \r
+    if (empty($options['postType']) && !empty($options['fbPostType'])) { $options['postType'] = $options['fbPostType']; unset($options['fbPostType']); } //## Compatibility with v <3.2\r
+    if (empty($options['postType']) && !empty($options['PostType'])) { $pt = $options['PostType']; unset($options['PostType']); $options['postType'] = $pt; } //## Compatibility with v <3.2\r
+    //## Compatibility with v <3.4.15\r
+    if (empty($options['atchUse'])) $options['atchUse'] = 'F';  \r
+    if (!empty($options['useFBGURLInfo']) && $options['useFBGURLInfo']=='1') $options['atchUse'] = 'F'; \r
+    if (isset($options['useFBGURLInfo']) && $options['useFBGURLInfo']=='0') $options['atchUse'] = 'A'; \r
+    if (!empty($options['fbMsgAFrmt'])) $options['atchUse'] = 'M'; \r
+    if (!empty($options['fbMsgAFrmt']) && empty($options['msgDAFrmt'])) { $options['msgDAFrmt'] = $options['fbMsgAFrmt']; $options['msgTAFrmt'] = '%TITLE%'; }\r
+    if (isset($options['fbAttchAsVid']) && $options['fbAttchAsVid'] == '1') $options['fbAttchAsVid'] = 'A';    \r
+    if (empty($options['fbAttchAsVid'])) $options['fbAttchAsVid'] = 'N'; \r
+    \r
+    $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+    $logNT = '<span style="color:#0000FF">Facebook</span> - '.$options['nName'];\r
+    $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+    if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+      $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') { \r
+         nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$options['pType']); return;\r
+      }\r
+    }      \r
+    //## Make the post\r
+    if (isset($options['qTLng'])) $lng = $options['qTLng']; else $lng = '';      if (!isset($options['fbAppPageAuthToken'])) $options['fbAppPageAuthToken'] = '';\r
+    $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url();        \r
+    //## Initiate Posting Array\r
+    $message = array('message'=>'', 'link'=>'', 'title'=>'', 'description'=>'', 'imageURL'=>'', 'videoURL'=>'', 'siteName'=>$blogTitle);     $imgURL = '';\r
+    \r
+    if ($postID=='0') { $options['fbMsgFormat'] = 'Test Post, Please Ignore';\r
+      $dsc = 'Test Post, Description';  $urlTitle = 'Test Post - Title';  $urlToGo = home_url();    \r
+    } else { $post = get_post($postID); if(!$post) return; $msg = nsFormatMessage($options['fbMsgFormat'], $postID, $addParams); \r
+      $fbPostType = $options['postType'];  if ($fbPostType=='A') $fbPostType = (int)$options['fbAttch']==2?'S':'A';  $isAttachVidFB = $options['fbAttchAsVid'];\r
+      nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));  \r
+      $extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?nxs_doQTrans($post->post_title, $lng):'').' |'.$options['pType'];\r
+      if ($fbPostType=='A') $imgURL = nxs_getPostImage($postID, 'medium'); // prr($options); echo "PP - ".$postID; prr($src);      \r
+      if ($fbPostType=='I' || $fbPostType=='S') $imgURL = nxs_getPostImage($postID, 'full'); // prr($options); echo "PP - ".$postID; prr($src);                  \r
+      if ( ($fbPostType=='A' || $fbPostType=='S') && $options['atchUse']!='F' ){\r
+        //## AUTO - Get Post Descr from SEO Plugins or make it.      \r
+        if ($options['atchUse']=='M') {$dsc = nsFormatMessage($options['msgDAFrmt'], $postID, $addParams); $urlTitle = nsFormatMessage($options['msgTAFrmt'], $postID, $addParams);  } \r
+        else { if (function_exists('aioseop_mrt_fix_meta') && $dsc=='')  $dsc = trim(get_post_meta($postID, '_aioseop_description', true)); \r
+          if (function_exists('wpseo_admin_init') && $dsc=='') $dsc = trim(get_post_meta($postID, '_yoast_wpseo_opengraph-description', true));  \r
+          if (function_exists('wpseo_admin_init') && $dsc=='') $dsc = trim(get_post_meta($postID, '_yoast_wpseo_metadesc', true));      \r
+          if ($dsc=='') $dsc = trim(nxs_doQTrans($post->post_excerpt, $lng)); \r
+          if ($dsc=='') $dsc = trim(nxs_doQTrans($post->post_content, $lng));  \r
+          global $plgn_NS_SNAutoPoster; $gOptions = $plgn_NS_SNAutoPoster->nxs_options;if (empty($gOptions['brokenCntFilters'])) $dsc = apply_filters('the_content', $dsc);\r
+          if ($dsc=='') $dsc = get_bloginfo('description'); $urlTitle = nxs_doQTrans($post->post_title, $lng);\r
+        }      \r
+        $dsc = strip_tags(strip_shortcodes($dsc));// $dsc = nxs_decodeEntitiesFull($dsc); /## This is commented out to support Emoji in Link Description\r
+        $dsc = nsTrnc($dsc, 900, ' ');\r
+      }\r
+      \r
+      $msg = str_replace('<br>', "\n", $msg); $msg = str_replace('<br/>', "\n", $msg); $msg = str_replace('<br />', "\n", $msg);        \r
+      $msg = str_ireplace('<3','&lt;3', $msg); $msg = str_ireplace('<(','&lt;(', $msg);  //## FB Smiles FIX.            \r
+      $msg = strip_tags($msg); $msg = nxs_decodeEntitiesFull($msg);       \r
+      $msg = str_ireplace('&#039;',"'", $msg); $msg = str_ireplace('&039;',"'", $msg); $msg = str_ireplace('&#39;',"'", $msg); $msg = str_ireplace('<3','&lt;3', $msg); $msg = str_ireplace('<(','&lt;(', $msg);  //## FB Smiles FIX 2.            \r
+      \r
+      if ($isAttachVidFB=='V') {$vids = nsFindVidsInPost($post, false); if (count($vids)>0) { \r
+          if (strlen($vids[0])==11) $options['urlToUse'] = 'http://youtu.be/'.$vids[0];\r
+          if (strlen($vids[0])==8 || strlen($vids[0])==9) $options['urlToUse'] = 'https://vimeo.com/'.$vids[0];\r
+          if (strlen($vids[0])==15) $options['urlToUse'] = 'https://www.facebook.com/video.php?v='.$vids[0];\r
+      }}\r
+      \r
+      if ($isAttachVidFB=='A') {$vids = nsFindVidsInPost($post, false); if (count($vids)>0) {\r
+          if (strlen($vids[0])==11) { $vidURL = 'http://www.youtube.com/v/'.$vids[0]; $imgURL = nsGetYTThumb($vids[0]); }\r
+          if (strlen($vids[0])==8 || strlen($vids[0])==9) { // $vidURL = 'https://secure.vimeo.com/moogaloop.swf?clip_id='.$vids[0].'&autoplay=1';            \r
+            $vidURL = 'https://f.vimeocdn.com/p/flash/moogaloop/6.0.37/moogaloop.swf?autoplay=1&clip_id='.$vids[0];\r
+            $apiURL = "http://vimeo.com/api/v2/video/".$vids[0].".json?callback=showThumb"; $json = wp_remote_get($apiURL);\r
+            if (!is_wp_error($json)) { $json = $json['body'];  $json = str_replace('/**/','',$json);\r
+            $json = str_replace('showThumb(','',$json); $json = str_replace('])',']',$json);  $json = json_decode($json, true); $imgURL = $json[0]['thumbnail_large']; }           \r
+          }\r
+          if (strlen($vids[0])==15) { // $vidURL = 'https://secure.vimeo.com/moogaloop.swf?clip_id='.$vids[0].'&autoplay=1';            \r
+            $vidURL = 'https://www.facebook.com/video.php?v='.$vids[0]; $apiURL = "https://graph.facebook.com/v2.3/".$vids[0]; $json = wp_remote_get($apiURL);\r
+            if (!is_wp_error($json)) { $json = $json['body']; $json = json_decode($json, true); $frmts = $json['format']; $imgURL = array_pop($frmts); $imgURL = $imgURL['picture'];  }           \r
+          }\r
+      }}\r
+      if (!empty($options['imgToUse'])) $imgURL = $options['imgToUse'];  if (preg_match("/noImg.\.png/i", $imgURL)) $imgURL = 'http://www.noimage.faketld';//$imgURL = 'http://cdn.gtln.us/img/t1x1.gif'; \r
+      \r
+      $options = nxs_getURL($options, $postID, $addParams); $urlToGo = $options['urlToUse'];     \r
+      $options['fbMsgFormat'] = $msg;   if (!empty($urlTitle)) $urlTitle = nxs_decodeEntitiesFull(strip_tags(strip_shortcodes($urlTitle)));\r
+    } \r
+    \r
+    $message = array('url'=>$urlToGo, 'urlTitle'=>$urlTitle, 'urlDescr'=>$dsc, 'imageURL'=>$imgURL, 'videoURL'=>$vidURL, 'siteName'=>$blogTitle);      //  prr($message); die();\r
+      if (isset($ShownAds)) $ShownAds = $ShownAdsL; // FIX for the quick-adsense plugin\r
+      \r
+    //## Actual Post\r
+    $ntToPost = new nxs_class_SNAP_FB(); $ret = $ntToPost->doPostToNT($options, $message); \r
+    //## Process Results\r
+    if (!is_array($ret) || !isset($ret['isPosted']) || $ret['isPosted']!='1') { //## Error \r
+         if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+    } else {  // ## All Good - log it.\r
+      if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+        else  { nxs_addToRI($postID); nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'pDate'=>date('Y-m-d H:i:s'))); \r
+        $extInfo .= ' | <a href="'.$ret['postURL'].'" target="_blank">Post Link</a>'; nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); \r
+          if (!empty($ret['log']) && !empty($ret['log']['Warning'])) nxs_addToLogN('W', 'Warning', $logNT, $ret['log']['Warning'], $extInfo);\r
+        }\r
+    }\r
+    //## Return Result\r
+    if (!empty($ret['isPosted']) && $ret['isPosted']=='1') return 200; else return print_r($ret, true);     \r
+  }  \r
+}\r
+\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/fl.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/fl.api.php
new file mode 100644 (file)
index 0000000..879a290
--- /dev/null
@@ -0,0 +1,101 @@
+<?php\r
+//## NextScripts App.net Connection Class\r
+\r
+/*\r
+1. Options\r
+\r
+nName - Nickname of the account [Optional] (Presentation purposes only - No affect on functionality)\r
+rdUName - Reddit User Name\r
+rdPass - Reddit User Passord\r
+rdSubReddit - Name of the Sub-Reddit\r
+postType - A or T - "Attached link" or "Text"\r
+\r
+rdTitleFormat\r
+rdTextFormat\r
+\r
+2. Post Info\r
+\r
+url\r
+title - [up to 300 characters long] - title of the submission\r
+text\r
+\r
+*/\r
+$nxs_snapAPINts[] = array('code'=>'FL', 'lcode'=>'fl', 'name'=>'Flickr');\r
+\r
+if (!function_exists('curl_file_create')) {\r
+    function curl_file_create($filename, $mimetype = '', $postname = '') { return "@$filename;filename=" . ($postname ? $postname: basename($filename)) . ($mimetype ? ";type=$mimetype" : '');}\r
+}\r
+\r
+if (!class_exists("nxs_class_SNAP_FL")) { class nxs_class_SNAP_FL {\r
+\r
+    var $ntCode = 'FL';\r
+    var $ntLCode = 'fl';\r
+\r
+    function createFile($imgURL) {\r
+      $remImgURL = urldecode($imgURL); $urlParced = pathinfo($remImgURL); $remImgURLFilename = $urlParced['basename'];\r
+      $imgData = wp_remote_get($remImgURL, array('timeout' => 45)); if (is_wp_error($imgData)) { $badOut['Error'] = print_r($imgData, true)." - ERROR"; return $badOut; }\r
+      if (isset($imgData['content-type'])) $cType = $imgData['content-type']; $imgData = $imgData['body'];\r
+      $tmp=array_search('uri', @array_flip(stream_get_meta_data($GLOBALS[mt_rand()]=tmpfile())));\r
+      if (!is_writable($tmp))  { $badOut['Error'] = "Your temporary folder or file (file - ".$tmp.") is not witable. Can't upload images to Flickr"; return $badOut; }\r
+      rename($tmp, $tmp.='.png'); register_shutdown_function(create_function('', "unlink('{$tmp}');"));\r
+      file_put_contents($tmp, $imgData); if (!$tmp) { $badOut['Error'] = 'You must specify a path to a file'; return $badOut; }\r
+      if (!file_exists($tmp)) { $badOut['Error'] = 'File path specified does not exist'; return $badOut; }\r
+      if (!is_readable($tmp)) { $badOut['Error'] = 'File path specified is not readable'; return $badOut; }\r
+      $cfile = curl_file_create($tmp,$cType,'nxstmp'); return $cfile;\r
+    }\r
+\r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array(); // return false;\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }\r
+\r
+    function doPostToNT($options, $message){ global $nxs_urlLen; $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>'');\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }\r
+      if (!isset($options['accessToken']) || trim($options['accessToken'])=='') { $badOut['Error'] = 'Not Authorized'; return $badOut; }\r
+      if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      //## Format Post\r
+      if (!empty($message['pText'])) $text = $message['pText']; else $text = nxs_doFormatMsg($options['msgFrmt'], $message);\r
+      if (!empty($message['pTitle'])) $msgT = $message['pTitle']; else $msgT = nxs_doFormatMsg($options['msgTFrmt'], $message);\r
+      //## Make Post\r
+      if (isset($message['imageURL'])) $imgURL = trim(nxs_getImgfrOpt($message['imageURL'], $options['imgSize'])); else $imgURL = '';  $postType = $options['postType'];\r
+\r
+      if (empty($imgURL)) { $badOut['Error'] = 'No Image. Flickr is an image-sharing network. You can\'t post to Flickr without image.'; return $badOut; }\r
+\r
+      require_once('apis/scOAuth.php');   $tum_oauth = new wpScoopITOAuth($options['appKey'], $options['appSec'], $options['accessToken'], $options['accessTokenSec']);\r
+      $tum_oauth->baseURL = 'https://www.flickr.com/services'; $tum_oauth->request_token_path = '/oauth/request_token'; $tum_oauth->access_token_path = '/oauth/access_token';\r
+\r
+      $tags = $message['tags']; $postArr = array('title'=>$msgT, 'description'=>$text, 'tags'=>$tags, 'is_public'=>1, 'safety_level'=>1, 'content_type'=>1, 'hidden'=>1);\r
+      $imgFile = $this->createFile($imgURL);  if (empty($imgFile) || is_array($imgFile)) { $badOut['Error'] = 'Image Error - '.print_r($imgFile, true); return $badOut; }\r
+\r
+      $phiID = $tum_oauth->flUploadPhoto($imgFile, $postArr); // prr($phiID);\r
+\r
+      if (!empty($phiID) && strpos($phiID, 'Problem: ')===false) {\r
+          $params = array ('format' => 'php_serial', 'method'=>'flickr.photosets.addPhoto', 'photo_id'=>$phiID, 'photoset_id'=>$options['setID']);\r
+              $uinfo = $tum_oauth->makeReq('https://api.flickr.com/services/rest/',$params);\r
+\r
+          if (!empty($message['latitude']) && !empty($message['longitude'])) {\r
+\r
+            $params = array (\r
+                'format' => 'php_serial',\r
+                'method'=>'flickr.photos.geo.setLocation',\r
+                'photo_id'=>$phiID,\r
+                'lat'=>$message['latitude'],\r
+                'lon'=>$message['longitude'],\r
+            );\r
+\r
+          $uinfo = $tum_oauth->makeReq('https://api.flickr.com/services/rest/',$params);\r
+          }\r
+\r
+      }\r
+\r
+      if (!empty($phiID) && strpos($phiID, 'Problem: ')===false) {\r
+         return array('postID'=>$phiID, 'isPosted'=>1, 'postURL'=> str_ireplace('people', 'photos', $options['userURL']).$phiID, 'pDate'=>date('Y-m-d H:i:s'));\r
+      } else { $badOut['Error'] .= print_r($phiID, true)." Code:".$tum_oauth->http_code;\r
+        return $badOut;\r
+      }\r
+      return $badOut;\r
+    }\r
+\r
+}}\r
+?>\r
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/fl.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/fl.php
new file mode 100644 (file)
index 0000000..8a3f166
--- /dev/null
@@ -0,0 +1,304 @@
+<?php\r
+//## NextScripts App.net Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'FL', 'lcode'=>'fl', 'name'=>'Flickr');\r
+\r
+if (!class_exists("nxs_snapClassFL")) { class nxs_snapClassFL { var $ntInfo = array('code'=>'FL', 'lcode'=>'fl', 'name'=>'Flickr', 'defNName'=>'', 'tstReq' => true);\r
+  //#### Show Common Settings\r
+  function showGenNTSettings($ntOpts){  global $nxs_plurl, $nxs_snapSetPgURL, $nxs_gOptions;  $ntInfo = $this->ntInfo;\r
+    if ( isset($_GET['auth']) && $_GET['auth']==$ntInfo['lcode']){ require_once('apis/scOAuth.php'); $options = $ntOpts[$_GET['acc']];\r
+           $consumer_key = $options['appKey']; $consumer_secret = $options['appSec'];\r
+           $callback_url = $nxs_snapSetPgURL."&auth=".$ntInfo['lcode']."a&acc=".$_GET['acc'];\r
+           $tum_oauth = new wpScoopITOAuth($consumer_key, $consumer_secret);\r
+           $tum_oauth->baseURL = 'https://www.flickr.com/services'; $tum_oauth->request_token_path = '/oauth/request_token'; $tum_oauth->access_token_path = '/oauth/access_token';\r
+           $request_token = $tum_oauth->getReqToken($callback_url); $options['oAuthToken'] = $request_token['oauth_token']; $options['oAuthTokenSecret'] = $request_token['oauth_token_secret'];\r
+           switch ($tum_oauth->http_code) { case 200: $url = 'https://www.flickr.com/services/oauth/authorize?oauth_token='.$options['oAuthToken'];\r
+             if (function_exists('get_option')) $nxs_gOptions = get_option('NS_SNAutoPoster'); if(!empty($nxs_gOptions)) { $nxs_gOptions[$ntInfo['lcode']][$_GET['acc']] = $options; nxs_settings_save($nxs_gOptions);}\r
+             echo '<br/><br/>All good?! Redirecting ..... <script type="text/javascript">window.location = "'.$url.'"</script>'; break;\r
+             default: echo '<br/><b style="color:red">Could not connect to Flickr. Refresh the page or try again later.</b>'; die();\r
+           } die();\r
+    }\r
+    if ( isset($_GET['auth']) && $_GET['auth']==$ntInfo['lcode'].'a'){ require_once('apis/scOAuth.php'); $options = $ntOpts[$_GET['acc']];\r
+           $consumer_key = $options['appKey']; $consumer_secret = $options['appSec'];\r
+\r
+           $tum_oauth = new wpScoopITOAuth($consumer_key, $consumer_secret, $options['oAuthToken'], $options['oAuthTokenSecret']); //prr($tum_oauth);\r
+           $tum_oauth->baseURL = 'https://www.flickr.com/services'; $tum_oauth->request_token_path = '/oauth/request_token'; $tum_oauth->access_token_path = '/oauth/access_token';\r
+           $access_token = $tum_oauth->getAccToken($_GET['oauth_verifier']); prr($access_token);\r
+           $options['accessToken'] = $access_token['oauth_token'];  $options['accessTokenSec'] = $access_token['oauth_token_secret'];\r
+           if (function_exists('get_option')) $nxs_gOptions = get_option('NS_SNAutoPoster'); if(!empty($nxs_gOptions)) { $nxs_gOptions[$ntInfo['lcode']][$_GET['acc']] = $options; nxs_settings_save($nxs_gOptions); }\r
+           $tum_oauth = new wpScoopITOAuth($consumer_key, $consumer_secret, $options['accessToken'], $options['accessTokenSec']);\r
+           echo "OK. Let's Get Profile: "; prr($access_token);\r
+           $params = array ('format' => 'php_serial', 'method'=>'flickr.urls.getUserProfile');\r
+           $uinfo = $tum_oauth->makeReq('https://api.flickr.com/services/rest/',$params); // prr($uinfo);die();\r
+           if (is_array($uinfo) && isset($uinfo['user'])) { $options['appAppUserName'] = $access_token['username']."(".urldecode($access_token['fullname']).")";\r
+             $options['appAppUserID'] = urldecode($uinfo['user']['nsid']);  $options['userURL'] = urldecode($uinfo['user']['url']);\r
+             if (function_exists('get_option')) $nxs_gOptions = get_option('NS_SNAutoPoster'); if(!empty($nxs_gOptions)) { $nxs_gOptions[$ntInfo['lcode']][$_GET['acc']] = $options; nxs_settings_save($nxs_gOptions); }\r
+           } //die();\r
+           if (!empty($options['appAppUserID'])) {\r
+             $gGet = $_GET; unset($gGet['auth']); unset($gGet['acc']); unset($gGet['oauth_token']);  unset($gGet['oauth_verifier']); unset($gGet['post_type']);\r
+             $sturl = explode('?',$nxs_snapSetPgURL); $nxs_snapSetPgURL = $sturl[0].((!empty($gGet))?'?'.http_build_query($gGet):'');\r
+             echo '<br/><br/>All good?! Redirecting ..... <script type="text/javascript">window.location = "'.$nxs_snapSetPgURL.'"</script>'; break;  die();\r
+           } else die("<span style='color:red;'>ERROR: Authorization Error: <span style='color:darkred; font-weight: bold;'>".print_r($uinfo, true)."</span></span>");\r
+    }\r
+\r
+  ?>\r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header">\r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?>\r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $ntInfo['name'];\r
+          if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['appAppUserID']) && $pbo['appAppUserID']>1)?'1':'';\r
+        ?>\r
+            <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+\r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>\r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />\r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />\r
+            <?php } ?>\r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?>\r
+          <a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;\r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);\r
+        }?>\r
+      </div>\r
+    </div> <?php\r
+  }\r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($options){ $opts = array('nName'=>'', 'doFL'=>'1', 'appKey'=>'', 'appSec'=>'', 'setID'=>'', 'inclTags'=>'1', 'defImg'=>''); $opts['ntInfo']= $this->ntInfo; $this->showNTSettings($options, $opts, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl, $nxs_snapSetPgURL; $ntInfo = $this->ntInfo; $nt = $ntInfo['lcode']; $ntU = $ntInfo['code'];\r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = '';\r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['setID'])) $options['setID'] = '';\r
+    if (!isset($options['appKey'])) $options['appKey'] = ''; if (!isset($options['appSec'])) $options['appSec'] = '';  ?>\r
+            <div id="do<?php echo $ntU; ?><?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">\r
+            <input type="hidden" value="0" id="apDoS<?php echo $ntU.$ii; ?>" />\r
+            <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/instructions/flickr-social-networks-auto-poster-setup-installation/"><?php $nType=$ntInfo['name']; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+\r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][nName]" id="apnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel($nt, $ii, $options['qTLng']); ?>\r
+            <br/>\r
+                <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>\r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+\r
+            <div style="width:100%;"><strong><?php echo $nType; ?> Consumer Key:</strong> </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][appKey]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['appKey'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+            <div style="width:100%;"><strong><?php echo $nType; ?> Consumer Secret:</strong> </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][appSec]"  style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['appSec'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>\r
+            <div style="width:100%;"><strong><?php echo $nType; ?> Set ID (Optional):</strong> </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][setID]"  style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['setID'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>\r
+              <br/>\r
+\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="msgFrmtT<?php echo $ntU.$ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('msgFrmtT<?php echo $ntU.$ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div>\r
+              <input name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgTFrmt]" style="width: 50%;" value="<?php if (!empty($options['msgTFrmt'])) _e(apply_filters('format_to_edit', htmlentities($options['msgTFrmt'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); else echo "%TITLE%"; ?>" onfocus="mxs_showFrmtInfo('msgFrmtT<?php echo $ntU.$ii; ?>');" /><?php nxs_doShowHint("msgFrmtT".$ntU.$ii); ?><br/>\r
+\r
+            <div id="altFormat" style="margin-left: 0px;">\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="msgFrmt<?php echo $ntU; ?><?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('msgFrmt<?php echo $ntU; ?><?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)\r
+              </div>\r
+\r
+              <textarea cols="150" rows="3" id="<?php echo $nt; ?><?php echo $ii; ?>msgFrmt" name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#<?php echo $nt; ?><?php echo $ii; ?>msgFrmt').attr('rows', 6); mxs_showFrmtInfo('msgFrmt<?php echo $ntU.$ii; ?>');"><?php if ($isNew) _e("%EXCERPT% \r\n\r\n%URL%", 'social-networks-auto-poster-facebook-twitter-g'); else _e(apply_filters('format_to_edit', htmlentities($options['msgFrmt'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea><?php nxs_doShowHint("msgFrmt".$ntU.$ii); ?>\r
+            </div>\r
+\r
+            <p style="margin-bottom: 20px;margin-top: 5px;"><input value="1" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][inclTags]"  <?php if ((int)$options['inclTags'] == 1) echo "checked"; ?> />\r
+              <strong><?php _e('Post with tags', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong>  <?php _e('Tags from the blogpost will be auto-posted to '.$ntInfo['name'], 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+            </p>\r
+\r
+            <div style="width:100%;"><strong>Default Image to use:</strong>\r
+            <p style="font-size: 11px; margin: 0px;">If your post does not have any images this will be used instead.</p>\r
+            </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][defImg]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['defImg'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+            <br/><br/>\r
+\r
+\r
+            <?php  if($options['appKey']=='') { ?>\r
+            <b><?php _e('Authorize Your '.$ntInfo['name'].' Account', 'social-networks-auto-poster-facebook-twitter-g'); ?></b> <?php _e('Please click "Update Settings" to be able to Authorize your account.', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+            <?php } else { if(isset($options['appAppUserID']) && $options['appAppUserID']>0) { ?>\r
+            <?php _e('Your '.$ntInfo['name'].' Account has been authorized.', 'social-networks-auto-poster-facebook-twitter-g'); ?> User ID: <?php _e(apply_filters('format_to_edit', htmlentities($options['appAppUserID'].' - '.$options['appAppUserName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>.\r
+            <?php _e('You can', 'social-networks-auto-poster-facebook-twitter-g'); ?> Re- <?php } ?>\r
+            <a href="<?php echo $nxs_snapSetPgURL.(stripos($nxs_snapSetPgURL, '?')!==false?'&':'?');?>auth=<?php echo $nt; ?>&acc=<?php echo $ii; ?>">Authorize Your <?php echo $ntInfo['name']; ?> Account</a>\r
+\r
+            <?php if (!isset($options['appAppUserID']) || $options['appAppUserID']<1) { ?> <div class="blnkg">&lt;=== <?php _e('Authorize your account', 'social-networks-auto-poster-facebook-twitter-g'); ?> ===</div> <?php }?>\r
+            <?php } ?>\r
+            <br/><br/>\r
+\r
+            <?php if ($isNew) { ?> <input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][apDo<?php echo $ntU; ?>]" value="1" id="apDoNew<?php echo $ntU; ?><?php echo $ii; ?>" /> <?php } ?>\r
+            <?php if (isset($options['appAppUserID']) && $options['appAppUserID']>0) { ?>\r
+\r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('<?php echo $ntU; ?>', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>              <?php }\r
+            ?>\r
+\r
+     </div>\r
+      <?php /* ######################## Tools Tab ####################### */ ?>\r
+    <?php if (!$isNew) { ?><div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    <?php nxs_showCatTagsCTFilters($nt, $ii, $options);\r
+          nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);\r
+          nxs_showRepostSettings($nt, $ii, $options); ?>\r
+    </div> <?php } ?>       <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+\r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div>\r
+\r
+\r
+            </div><?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = $this->ntInfo['code'];\r
+    foreach ($post as $ii => $pval){\r
+      if (isset($pval['appKey']) && $pval['appKey']!=''){ if (!isset($options[$ii])) $options[$ii] = array();\r
+\r
+        if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0;\r
+        if (isset($pval['nName']))  $options[$ii]['nName'] = trim($pval['nName']);\r
+\r
+        if (isset($pval['appKey'])) $options[$ii]['appKey'] = trim($pval['appKey']);\r
+        if (isset($pval['appSec'])) $options[$ii]['appSec'] = trim($pval['appSec']);\r
+        if (isset($pval['setID'])) $options[$ii]['setID'] = trim($pval['setID']);\r
+\r
+\r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+\r
+        if (isset($pval['defImg'])) $options[$ii]['defImg'] = $pval['defImg'];\r
+        if (isset($pval['inclTags'])) $options[$ii]['inclTags'] = trim($pval['inclTags']); else $options[$ii]['inclTags'] = 0;\r
+        if (isset($pval['msgFrmt'])) $options[$ii]['msgFrmt'] = trim($pval['msgFrmt']);\r
+        if (isset($pval['msgTFrmt'])) $options[$ii]['msgTFrmt'] = trim($pval['msgTFrmt']);\r
+\r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);\r
+\r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);\r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);\r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0;\r
+    } return $options;\r
+  }\r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = $this->ntInfo['lcode']; $ntU = $this->ntInfo['code'];\r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snap'.$ntU, true));\r
+        if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii])) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]);  if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = '';\r
+        $doIT = $ntOpt['do'.$ntU] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse'];\r
+        $isAvail = $ntOpt['appKey']!='' && $ntOpt['appSec']!=''; $msgFormat = htmlentities($ntOpt['msgFrmt'], ENT_COMPAT, "UTF-8");    $msgFormatT = htmlentities($ntOpt['msgTFrmt'], ENT_COMPAT, "UTF-8");\r
+      ?>\r
+      <tr><th style="text-align:left;" colspan="2">\r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvail) { ?> <input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][do<?php echo $ntU; ?>]" value="<?php echo ($post->post_status == "publish")?$doIT:'0';?>">\r
+      <input class="nxsGrpDoChb" value="1" id="do<?php echo $ntU.$ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][do<?php echo $ntU; ?>]" <?php if ((int)$doIT == 1) echo 'checked="checked" title="def"';  ?> />\r
+       <?php } ?>\r
+\r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>16.png);"><?php echo $this->ntInfo['name']; ?> - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvail) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostTo<?php echo $ntU; ?>_repostButton" id="rePostTo<?php echo $ntU; ?>_button" value="<?php _e('Repost to '.$this->ntInfo['name'], 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php  } ?>\r
+\r
+                    <?php  if (is_array($pMeta) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) {\r
+\r
+                        ?> <span id="pstd<?php echo $ntU; ?><?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+                      <a style="font-size: 10px;" href="<?php echo $pMeta[$ii]['postURL']; ?>" target="_blank"><?php $nType=$this->ntInfo['name']; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+\r
+                </td></tr>\r
+\r
+                <?php if (!$isAvail) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your <?php echo $this->ntInfo['name']; ?> Account to AutoPost to <?php echo $this->ntInfo['name']; ?></b></td></tr>\r
+                <?php }  else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+\r
+                <?php if ($ntOpt['rpstOn']=='1') { ?>\r
+\r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>ap" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> />\r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+                </td></tr> <?php } ?>\r
+\r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Title Format:', 'NS_SPAP') ?></th>\r
+                  <td><input value="<?php echo $msgFormatT; ?>" type="text" name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgTFrmt]" style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('msgFrmtT<?php echo $nt.$ii; ?>');"/><?php nxs_doShowHint("msgFrmtT".$nt.$ii, '', '58'); ?></td></tr>\r
+\r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top;  padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th><td>\r
+\r
+                <textarea cols="150" rows="1" id="<?php echo $nt.$ii; ?>msgFrmt" name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgFrmt]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#<?php echo $nt.$ii; ?>msgFrmt').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('msgFrmt<?php echo $nt.$ii; ?>');"><?php echo $msgFormat ?></textarea> <?php nxs_doShowHint("msgFrmt".$nt.$ii, '', '58'); ?>\r
+\r
+                </td></tr>\r
+\r
+                 <?php /* ## Select Image & URL ## */ nxs_showImgToUseDlg($nt, $ii, $imgToUse);  ?>\r
+       <?php }\r
+\r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = '';\r
+    if (isset($pMeta['doFL'])) $optMt['doFL'] = $pMeta['doFL'] == 1?1:0;\r
+\r
+    if (isset($pMeta['msgFrmt'])) $optMt['msgFrmt'] = $pMeta['msgFrmt']; if (isset($pMeta['msgTFrmt'])) $optMt['msgTFrmt'] = $pMeta['msgTFrmt'];\r
+\r
+    if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];  if (isset($pMeta['urlToUse'])) $optMt['urlToUse'] = $pMeta['urlToUse'];\r
+    if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];\r
+    if (isset($pMeta['SNAPincludeFL']) && $pMeta['SNAPincludeFL'] == '1' ) $optMt['doFL'] = 1;\r
+    return $optMt;\r
+  }\r
+}}\r
+if (!function_exists("nxs_rePostToFL_ajax")) {\r
+  function nxs_rePostToFL_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;\r
+    foreach ($options['fl'] as $ii=>$two) if ($ii==$_POST['nid']) {   $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['apPageID'].$two['apUName']==$_POST['nid']) {\r
+      $appo =  get_post_meta($postID, 'snapFL', true); $appo =  maybe_unserialize($appo);// prr($appo);\r
+      if (is_array($appo) && isset($appo[$ii]) && is_array($appo[$ii])){ $ntClInst = new nxs_snapClassFL(); $two = $ntClInst->adjMetaOpt($two, $appo[$ii]); }\r
+      $result = nxs_doPublishToFL($postID, $two); if ($result == 200) die("Successfully sent your post to Flickr. "); else die($result);\r
+    }\r
+  }\r
+}\r
+if (!function_exists("nxs_doPublishToFL")) { //## Post to FL. // V3 - imgToUse - Done, class_SNAP_AP - Done, New Format - Done\r
+  function nxs_doPublishToFL($postID, $options){ $ntCd = 'FL'; $ntCdL = 'fl'; $ntNm = 'Flickr'; if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+      $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));\r
+      if (empty($options['imgToUse'])) $options['imgToUse'] = ''; if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10));\r
+      $logNT = '<span style="color:#800000">Flickr</span> - '.$options['nName'];\r
+      $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);\r
+      if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {\r
+           nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'); return;\r
+        }\r
+      }\r
+      $message = array('message'=>'', 'link'=>'', 'imageURL'=>'', 'videoURL'=>'', 'announce'=>'');\r
+\r
+      if ($postID=='0') { echo "Testing ... <br/><br/>"; $message['description'] = 'Test Post, Description';  $message['title'] = 'Test Post - Title';  $message['url'] = home_url();  $message['tags']='';\r
+        if ($options['defImg']!='') $imgURL = $options['defImg']; else $imgURL ="http://direct.gtln.us/img/nxs/NXS-Lama.jpg";    $message['imageURL'] = $imgURL;\r
+      } else { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));  $post = get_post($postID); if(!$post) return;\r
+        $isNoImg = false; $tags = '';\r
+\r
+        $options['msgFrmt'] = nsFormatMessage($options['msgFrmt'], $postID, $addParams); $options['msgTFrmt'] = nsFormatMessage($options['msgTFrmt'], $postID, $addParams);\r
+\r
+        $tggs = array(); if ($options['inclTags']=='1'){ $t = wp_get_post_tags($postID); $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = '"'.implode('" "',$tggs).'"'; }\r
+\r
+        $imgURL = nxs_getPostImage($postID, 'full'); if (preg_match("/noImg.\.png/i", $imgURL)) { $imgURL = ''; $isNoImg = true; }\r
+\r
+        $options = nxs_getURL($options, $postID); $urlToGo = $options['urlToUse'];\r
+\r
+        $message = array('url'=>$urlToGo, 'imageURL'=>$imgURL, 'noImg'=>$isNoImg, 'tags'=>$tags);\r
+\r
+        $lat = get_post_meta($postID, 'geo_latitude', true);\r
+        $long = get_post_meta($postID, 'geo_longitude', true);\r
+        if (!empty($lat) && !empty($long)) {\r
+            $message['latitude'] = $lat;\r
+            $message['longitude'] = $long;\r
+        }\r
+\r
+        $extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?$post->post_title:'');\r
+      }\r
+      //## Actual Post\r
+      $ntToPost = new nxs_class_SNAP_FL(); $ret = $ntToPost->doPostToNT($options, $message); //prr($ret);\r
+      //## Process Results\r
+      if (!is_array($ret) || $ret['isPosted']!='1') { //## Error\r
+         if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo);\r
+      } else {  // ## All Good - log it.\r
+        if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); }\r
+          else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'postURL'=>$ret['postURL'], 'pDate'=>date('Y-m-d H:i:s')));\r
+            $extInfo .= ' | <a href="'.$ret['postURL'].'" target="_blank">Post Link</a>'; nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo);\r
+          }\r
+      }\r
+      //## Return Result\r
+      if ($ret['isPosted']=='1') return 200; else return print_r($ret, true);\r
+\r
+  }\r
+}\r
+?>\r
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/fp.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/fp.api.php
new file mode 100644 (file)
index 0000000..3980920
--- /dev/null
@@ -0,0 +1,76 @@
+<?php    \r
+//## NextScripts Flipboard Connection Class\r
+\r
+/* \r
+1. Options\r
+\r
+nName - Nickname of the account [Optional] (Presentation purposes only - No affect on functionality)\r
+rdUName - Reddit User Name\r
+rdPass - Reddit User Passord\r
+rdSubReddit - Name of the Sub-Reddit\r
+postType - A or T - "Attached link" or "Text"\r
+\r
+rdTitleFormat\r
+rdTextFormat\r
+\r
+2. Post Info\r
+\r
+url\r
+title - [up to 300 characters long] - title of the submission\r
+text\r
+\r
+*/\r
+$nxs_snapAPINts[] = array('code'=>'FP', 'lcode'=>'fp', 'name'=>'Flipboard');\r
+\r
+if (!function_exists("nxs_getFPHeaders")) {  function nxs_getFPHeaders($ref, $org='', $post=false, $aj=false){ $hdrsArr = array(); \r
+ $hdrsArr['Cache-Control']='max-age=0'; $hdrsArr['Connection']='keep-alive'; $hdrsArr['Referer']=$ref;\r
+ $hdrsArr['User-Agent']='Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.22 Safari/537.36'; \r
+ if($post==='j') $hdrsArr['Content-Type']='application/json;charset=UTF-8'; elseif($post===true) $hdrsArr['Content-Type']='application/x-www-form-urlencoded';\r
+ if($aj===true) $hdrsArr['X-Requested-With']='XMLHttpRequest';  if ($org!='') $hdrsArr['Origin']=$org; \r
+ $hdrsArr['Accept']='text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';// $hdrsArr['DNT']='1';\r
+ if (function_exists('gzdeflate')) $hdrsArr['Accept-Encoding']='gzip,deflate,sdch'; \r
+ $hdrsArr['Accept-Language']='en-US,en;q=0.8'; return $hdrsArr; \r
+}}\r
+\r
+if (!class_exists("nxs_class_SNAP_FP")) { class nxs_class_SNAP_FP {\r
+    \r
+    var $ntCode = 'FP';\r
+    var $ntLCode = 'fp';\r
+    \r
+    function createFile($imgURL) {\r
+      $remImgURL = urldecode($imgURL); $urlParced = pathinfo($remImgURL); $remImgURLFilename = $urlParced['basename']; \r
+      $imgData = wp_remote_get($remImgURL); if (is_wp_error($imgData)) { $badOut['Error'] = print_r($imgData, true)." - ERROR"; return $badOut; }          \r
+      $imgData = $imgData['body'];\r
+      $tmp=array_search('uri', @array_flip(stream_get_meta_data($GLOBALS[mt_rand()]=tmpfile())));  \r
+      if (!is_writable($tmp)) return "Your temporary folder or file (file - ".$tmp.") is not witable. Can't upload images to Flickr";\r
+      rename($tmp, $tmp.='.png'); register_shutdown_function(create_function('', "unlink('{$tmp}');"));       \r
+      file_put_contents($tmp, $imgData); if (!$tmp) return 'You must specify a path to a file'; if (!file_exists($tmp)) return 'File path specified does not exist';\r
+      if (!is_readable($tmp)) return 'File path specified is not readable';      \r
+      //  $data['name'] = basename($tmp);\r
+      return "@$tmp";\r
+      \r
+    }\r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array(); // return false;\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }\r
+    \r
+    function doPostToNT($options, $message){ global $nxs_urlLen; $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>'');\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['uPass']) || trim($options['uPass'])=='') { $badOut['Error'] = 'Not Authorized'; return $badOut; }      \r
+      if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      //## Format Post\r
+      if (!empty($message['pText'])) $text = $message['pText']; else $text = nxs_doFormatMsg($options['msgFrmt'], $message); \r
+      //## Make Post            \r
+      if (isset($message['imageURL'])) $imgURL = trim(nxs_getImgfrOpt($message['imageURL'], $options['imgSize'])); else $imgURL = '';       \r
+      //## Make Post   \r
+      if (!empty($options['ck'])){$ck = maybe_unserialize($options['ck']); $loginError = doCheckFlipboard($ck);}\r
+      if (empty($ck) || $loginError!==false) { $pass = substr($options['uPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['uPass'], 5)):$options['uPass'];  \r
+          $loginInfo = doConnectToFlipboard($options['uName'], $pass);  if (!is_array($loginInfo))  {  $badOut['Error'] = print_r($loginInfo, true)." - ERROR"; return $badOut; } $ck = $loginInfo['ck']; \r
+      } $post = array('url'=>$message['url'], 'mgzURL'=>$options['mgzURL'], 'imgURL'=>$imgURL, 'text'=>$text );\r
+      return doPostToFlipboard($ck, $post);            \r
+    }      \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/fp.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/fp.php
new file mode 100644 (file)
index 0000000..36ba74d
--- /dev/null
@@ -0,0 +1,245 @@
+<?php    \r
+//## NextScripts Flipboard Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'FP', 'lcode'=>'fp', 'name'=>'Flipboard');\r
+\r
+if (!class_exists("nxs_snapClassFP")) { class nxs_snapClassFP { var $ntInfo = array('code'=>'FP', 'lcode'=>'fp', 'name'=>'Flipboard', 'defNName'=>'', 'tstReq' => false);\r
+  //#### Show Common Settings\r
+  function showGenNTSettings($ntOpts){  global $nxs_plurl, $nxs_snapSetPgURL;  $ntInfo = $this->ntInfo;\r
+  ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php if(!function_exists('doPostToFlipboard')) {?> Flipboard doesn't have a built-in API for automated posts yet. <br/>You need to get a special <a target="_blank" href="http://www.nextscripts.com/api/flipboard-automated-posting/">library module</a> to be able to publish your content to Flipboard. \r
+        <?php } else foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $ntInfo['name']; \r
+          if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['appAppUserID']) && $pbo['appAppUserID']>1)?'1':'';\r
+        ?>\r
+            <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            \r
+            \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+              <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+              <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />             \r
+            <?php } ?>            \r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?>\r
+          <a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;          \r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($options){ $opts = array('nName'=>'', 'doFP'=>'1', 'uName'=>'', 'uPass'=>'', 'mgzURL'=>'', 'inclTags'=>'1', 'defImg'=>''); $opts['ntInfo']= $this->ntInfo; $this->showNTSettings($options, $opts, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl, $nxs_snapSetPgURL; $ntInfo = $this->ntInfo; $nt = $ntInfo['lcode']; $ntU = $ntInfo['code']; \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['mgzURL'])) $options['mgzURL'] = '';      ?>    \r
+            <div id="do<?php echo $ntU; ?><?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">     \r
+            <input type="hidden" value="0" id="apDoS<?php echo $ntU.$ii; ?>" />\r
+            \r
+            <?php if(!function_exists('doPostToFlipboard')) {                \r
+                 nxs_show_noLibWrn('Flipboard API Library module NOT found.<br/><br/><span style="color:black;">Flipboard does not have a free native API for automated posts yet.</span><br/><br/><span style="font-size: 12px;color:black;">You need to have a special API Library Module to be able to publish your content to Flipboard.</span>'); echo "</div>"; return; }; ?>\r
+            \r
+            <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/instructions/flipboard-social-networks-auto-poster-setup-installation/"><?php $nType=$ntInfo['name']; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][nName]" id="apnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel($nt, $ii, $options['qTLng']); ?>\r
+            <br/>\r
+                <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+            \r
+            <div style="width:100%;"><strong><?php echo $nType; ?> Login/Email:</strong> </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][uName]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['uName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+            <div style="width:100%;"><strong><?php echo $nType; ?> Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="<?php echo $nt; ?>[<?php echo $ii; ?>][uPass]" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['uPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['uPass'], 5)):$options['uPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>  \r
+                                     \r
+            <div style="width:100%;"><strong><?php echo $nType; ?> Magazine URL:</strong> </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][mgzURL]"  style="width: 60%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['mgzURL'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>                \r
+              <br/>  \r
+                      \r
+            <div id="altFormat" style="margin-left: 0px;">\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Comment Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="msgFrmt<?php echo $ntU; ?><?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('msgFrmt<?php echo $ntU; ?><?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)\r
+              </div>              \r
+              <textarea cols="150" rows="3" id="<?php echo $nt; ?><?php echo $ii; ?>msgFrmt" name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#<?php echo $nt; ?><?php echo $ii; ?>msgFrmt').attr('rows', 6); mxs_showFrmtInfo('msgFrmt<?php echo $ntU.$ii; ?>');"><?php if ($isNew) _e("%EXCERPT% \r\n\r\n%URL%", 'social-networks-auto-poster-facebook-twitter-g'); else _e(apply_filters('format_to_edit', htmlentities($options['msgFrmt'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea><?php nxs_doShowHint("msgFrmt".$ntU.$ii); ?>\r
+            </div>\r
+                  <br/>     \r
+            \r
+            <?php if ($isNew) { ?> <input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][apDo<?php echo $ntU; ?>]" value="1" id="apDoNew<?php echo $ntU; ?><?php echo $ii; ?>" /> <?php } ?>\r
+            <?php if (!empty($options['uPass'])) { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('<?php echo $ntU; ?>', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>              <?php } \r
+            ?>\r
+    \r
+     </div>\r
+      <?php /* ######################## Tools Tab ####################### */ ?>\r
+    <?php if (!$isNew) { ?><div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">    \r
+    <?php nxs_showCatTagsCTFilters($nt, $ii, $options);\r
+          nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);\r
+          nxs_showRepostSettings($nt, $ii, $options); ?>      \r
+    </div> <?php } ?>       <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div>\r
+            \r
+            \r
+            </div><?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = $this->ntInfo['code']; \r
+    foreach ($post as $ii => $pval){ \r
+      if (isset($pval['uName']) && $pval['uPass']!=''){ if (!isset($options[$ii])) $options[$ii] = array();\r
+        \r
+        if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+        if (isset($pval['nName']))  $options[$ii]['nName'] = trim($pval['nName']);  \r
+        \r
+        if (isset($pval['uName'])) $options[$ii]['uName'] = trim($pval['uName']);        \r
+        if (isset($pval['uPass']))    $options[$ii]['uPass'] = 'n5g9a'.nsx_doEncode($pval['uPass']); else $options[$ii]['uPass'] = '';  \r
+        if (isset($pval['mgzURL'])) $options[$ii]['mgzURL'] = trim($pval['mgzURL']);                  \r
+        \r
+                \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';                                 \r
+        \r
+        if (isset($pval['msgFrmt'])) $options[$ii]['msgFrmt'] = trim($pval['msgFrmt']);        \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }  \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = $this->ntInfo['lcode']; $ntU = $this->ntInfo['code'];\r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snap'.$ntU, true));  \r
+        if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii])) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]);  if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = ''; \r
+        $doIT = $ntOpt['do'.$ntU] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse']; if (empty($ntOpt['urlToUse'])) $ntOpt['urlToUse'] = '';  $urlToUse = $ntOpt['urlToUse']; \r
+        $isAvail = $ntOpt['uPass']!='' && $ntOpt['uName']!=''; $msgFormat = htmlentities($ntOpt['msgFrmt'], ENT_COMPAT, "UTF-8"); \r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2"> \r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvail) { ?> <input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][do<?php echo $ntU; ?>]" value="<?php echo ($post->post_status == "publish")?$doIT:'0';?>">\r
+        <input class="nxsGrpDoChb" value="1" id="do<?php echo $ntU.$ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][do<?php echo $ntU; ?>]" <?php if ((int)$doIT == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php } ?>\r
+      \r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>16.png);"><?php echo $this->ntInfo['name']; ?> - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvail) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostTo<?php echo $ntU; ?>_repostButton" id="rePostTo<?php echo $ntU; ?>_button" value="<?php _e('Repost to '.$this->ntInfo['name'], 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php  } ?>\r
+                    \r
+                    <?php  if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) { \r
+                        \r
+                        ?> <span id="pstd<?php echo $ntU; ?><?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+                      <a style="font-size: 10px;" href="<?php echo $pMeta[$ii]['postURL']; ?>" target="_blank"><?php $nType=$this->ntInfo['name']; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>                \r
+                \r
+                <?php if (!$isAvail) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your <?php echo $this->ntInfo['name']; ?> Account to AutoPost to <?php echo $this->ntInfo['name']; ?></b></td></tr>\r
+                <?php }  else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>ap" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> /> \r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+                </td></tr> <?php } ?>\r
+     \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top;  padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Comment Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th><td>                \r
+                \r
+                <textarea cols="150" rows="1" id="<?php echo $nt.$ii; ?>msgFrmt" name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgFrmt]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#<?php echo $nt.$ii; ?>msgFrmt').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('msgFrmt<?php echo $nt.$ii; ?>');"><?php echo $msgFormat ?></textarea> <?php nxs_doShowHint("msgFrmt".$nt.$ii, '', '58'); ?>\r
+                \r
+                </td></tr>                \r
+                \r
+                 <?php /* ## Select Image & URL ## */ nxs_showImgToUseDlg($nt, $ii, $imgToUse);  nxs_showURLToUseDlg($nt, $ii, $urlToUse); ?>\r
+       <?php } \r
+\r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = ''; \r
+    if (isset($pMeta['doFP'])) $optMt['doFP'] = $pMeta['doFP'] == 1?1:0; \r
+    if (isset($pMeta['msgFrmt'])) $optMt['msgFrmt'] = $pMeta['msgFrmt'];     \r
+    if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];  if (isset($pMeta['urlToUse'])) $optMt['urlToUse'] = $pMeta['urlToUse'];  \r
+    if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+    if (isset($pMeta['SNAPincludeFP']) && $pMeta['SNAPincludeFP'] == '1' ) $optMt['doFP'] = 1;  \r
+    return $optMt;\r
+  }  \r
+}}\r
+if (!function_exists("nxs_rePostToFP_ajax")) {\r
+  function nxs_rePostToFP_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+    foreach ($options['fp'] as $ii=>$two) if ($ii==$_POST['nid']) {   $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['apPageID'].$two['apUName']==$_POST['nid']) {  \r
+      $appo =  get_post_meta($postID, 'snapFP', true); $appo =  maybe_unserialize($appo);// prr($appo);\r
+      if (is_array($appo) && isset($appo[$ii]) && is_array($appo[$ii])){ $ntClInst = new nxs_snapClassFP(); $two = $ntClInst->adjMetaOpt($two, $appo[$ii]); } \r
+      $result = nxs_doPublishToFP($postID, $two); if ($result == 200) die("Successfully sent your post to Flipboard. "); else die($result);        \r
+    }    \r
+  }\r
+}  \r
+if (!function_exists("nxs_doPublishToFP")) { //## Post to FP. // V3 - imgToUse - Done, class_SNAP_AP - Done, New Format - Done\r
+  function nxs_doPublishToFP($postID, $options){ global $plgn_NS_SNAutoPoster; $ntCd = 'FP'; $ntCdL = 'fp'; $ntNm = 'Flipboard'; if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+      $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));   \r
+      if (empty($options['imgToUse'])) $options['imgToUse'] = ''; if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+      $logNT = '<span style="color:#800000">Flipboard</span> - '.$options['nName'];      \r
+      $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+      if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {  \r
+           nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$uqID); return;\r
+        }\r
+      }       \r
+      $message = array('message'=>'', 'link'=>'', 'imageURL'=>'', 'videoURL'=>'', 'announce'=>''); \r
+      \r
+      if ($postID=='0') { echo "Testing ... <br/><br/>"; $message['description'] = 'Test Post, Description';  $message['title'] = 'Test Post - Title';  $message['url'] = home_url();  $message['tags']='';\r
+        if ($options['defImg']!='') $imgURL = $options['defImg']; else $imgURL ="http://direct.gtln.us/img/nxs/NXS-Lama.jpg";    $message['imageURL'] = $imgURL;\r
+      } else { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));  $post = get_post($postID); if(!$post) return; \r
+        $isNoImg = false; $tags = '';\r
+        \r
+        $options['msgFrmt'] = nsFormatMessage($options['msgFrmt'], $postID, $addParams); \r
+        \r
+        $tggs = array(); if ($options['inclTags']=='1'){ $t = wp_get_post_tags($postID); $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = '"'.implode('" "',$tggs).'"'; }\r
+        \r
+        if (trim($options['imgToUse'])!='') $imgURL = $options['imgToUse']; else $imgURL = nxs_getPostImage($postID, 'full');   if (preg_match("/noImg.\.png/i", $imgURL)) { $imgURL = ''; $isNoImg = true; }\r
+        \r
+        //## MyURL - URLToGo code\r
+        if (!isset($options['urlToUse']) || trim($options['urlToUse'])=='') $myurl =  trim(get_post_meta($postID, 'snap_MYURL', true)); if (!empty($myurl)) $options['urlToUse'] = $myurl;\r
+        if (isset($options['urlToUse']) && trim($options['urlToUse'])!='') { $urlToGo = $options['urlToUse']; $options['useFBGURLInfo'] = true; } else $urlToGo = get_permalink($postID);      \r
+        $gOptions = $plgn_NS_SNAutoPoster->nxs_options; $addURLParams = trim($gOptions['addURLParams']);  if($addURLParams!='') $urlToGo .= (strpos($urlToGo,'?')!==false?'&':'?').$addURLParams;                 \r
+        $message = array('url'=>$urlToGo, 'imageURL'=>$imgURL, 'noImg'=>$isNoImg, 'tags'=>$tags);                 \r
+        $extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?$post->post_title:''); \r
+      }            \r
+      //## Actual Post\r
+      $ntToPost = new nxs_class_SNAP_FP(); $ret = $ntToPost->doPostToNT($options, $message); //prr($ret);\r
+      //## Save Session\r
+      if (empty($options['ck'])) $options['ck'] = '';\r
+      if (!empty($ret) && is_array($ret) && !empty($ret['ck']) && !empty($ret['ck']) && serialize($ret['ck'])!=$options['ck']) { global $plgn_NS_SNAutoPoster;  $gOptions = $plgn_NS_SNAutoPoster->nxs_options; // prr($gOptions['pn']);\r
+        if (isset($options['ii']) && $options['ii']!=='')  { $gOptions[$ntCdL][$options['ii']]['ck'] = serialize($ret['ck']); update_option('NS_SNAutoPoster', $gOptions);  }        \r
+        else foreach ($gOptions[$ntCdL] as $ii=>$gpn) { $result = array_diff($options, $gpn);\r
+          if (!is_array($result) || count($result)<1) { $gOptions[$ntCdL][$ii]['ck'] = serialize($ret['ck']); $plgn_NS_SNAutoPoster->nxs_options = $gOptions; update_option('NS_SNAutoPoster', $gOptions); break; }\r
+        }        \r
+      } \r
+      //## Process Results\r
+      if (!is_array($ret) || empty($ret['isPosted']) || $ret['isPosted']!='1') { //## Error \r
+         if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+      } else {  // ## All Good - log it.\r
+        if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+          else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'postURL'=>$ret['postURL'], 'pDate'=>date('Y-m-d H:i:s'))); \r
+            $extInfo .= ' | <a href="'.$ret['postURL'].'" target="_blank">Post Link</a>'; nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); \r
+          }\r
+      }\r
+      //## Return Result\r
+      if (!empty($ret['isPosted']) && $ret['isPosted']=='1') return 200; else return print_r($ret, true);      \r
+      \r
+  } \r
+}  \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/gp.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/gp.api.php
new file mode 100644 (file)
index 0000000..dd8d4dd
--- /dev/null
@@ -0,0 +1,43 @@
+<?php    \r
+//## NextScripts Facebook Connection Class\r
+$nxs_snapAPINts[] = array('code'=>'GP', 'lcode'=>'gp', 'name'=>'Google+');\r
+\r
+if (!class_exists("nxs_class_SNAP_GP")) { class nxs_class_SNAP_GP {\r
+    \r
+    var $ntCode = 'GP';\r
+    var $ntLCode = 'gp';     \r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array();\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }\r
+    function doPostToNT($options, $message){ $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>''); $lnk = '';\r
+      //## Check API Lib\r
+      // if (!function_exists('doPostToGooglePlus')) if (file_exists('apis/postToGooglePlus.php')) require_once ('apis/postToGooglePlus.php'); elseif (file_exists('/home/_shared/deSrc.php')) require_once ('/home/_shared/deSrc.php'); \r
+      if (!function_exists('doPostToGooglePlus')) { $badOut['Error'] = 'Google+ API Library not found'; return $badOut; }\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['gpUName']) || trim($options['gpPass'])=='') { $badOut['Error'] = 'Not Configured'; return $badOut; }\r
+      if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      //## Make Post      \r
+      $gpPostType = $options['postType']; \r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['gpMsgFormat'], $message); // Make "message default"\r
+      if ($gpPostType=='I' || $gpPostType=='A') { if (isset($message['imageURL'])) $imgURL = trim(nxs_getImgfrOpt($message['imageURL'], $options['imgSize'])); else $imgURL = ''; } \r
+            \r
+      $email = $options['gpUName'];  $pass = substr($options['gpPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['gpPass'], 5)):$options['gpPass'];    \r
+      \r
+      $nt = new nxsAPI_GP(); if(!empty($options['ck'])) $nt->ck = $options['ck'];  $nt->debug = false;  $loginError = $nt->connect($email, $pass);     \r
+      if (!$loginError){ \r
+         if ($gpPostType=='A') $lnk = $message['url']; elseif ($gpPostType=='I') { $lnk = array(); if ($imgURL!='') $lnk['img'] = $imgURL;  if ($imgURL=='' && $message['noImg']===true) $lnk['img'] = '';\r
+            if (!empty($message['videoURL'])) $lnk['video'] = $message['videoURL']; \r
+         } $pageID = ''; $comPgID = ''; $comPGCatID = '';\r
+         if (!empty($options['gpPageID']) && empty($options['gpCommID']))  $pageID = $options['gpPageID']; \r
+         if (!empty($options['gpCommID'])) {$comPgID = $options['gpCommID']; $comPGCatID = $options['gpCCat'];}\r
+         $result = $nt -> postGP($msg, $lnk, $pageID, $comPgID, $comPGCatID);\r
+      } else {  $badOut['Error'] = "Login/Connection Error: ". print_r($loginError, true); return $badOut; }       \r
+      if (is_array($result) && $result['isPosted']=='1') nxs_save_glbNtwrks('gp', $options['ii'], $nt->ck, 'ck');\r
+      return $result;\r
+    }\r
+    \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/gp.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/gp.php
new file mode 100644 (file)
index 0000000..437bfc4
--- /dev/null
@@ -0,0 +1,284 @@
+<?php    \r
+//## NextScripts Facebook Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'GP', 'lcode'=>'gp', 'name'=>'Google+');\r
+\r
+\r
+function nxs_CptCheckGP($o){ session_id("nxs-temp-gpcpt"); session_start(); $sess = unserialize($_SESSION['nxs-temp-gpcpt']);\r
+ if (!empty($_POST['c'])) { $ck = $sess['c']; $flds = $sess['f']; \r
+    $flds['recaptcha_response_field'] = $_POST['c']; $liObj = new nxsAPI_GP();   $hdrsArr = $liObj->headers('https://www.youtube.com/', 'https://www.youtube.com', 'POST', false);\r
+    $advSet = array('headers' => $hdrsArr, 'httpversion' => '1.1', 'timeout' => 45, 'redirection' => 0, 'cookies' => $ck, 'body' => $flds);  prr($advSet);\r
+    $rep = nxs_remote_post('https://www.youtube.com/das_captcha', $advSet); if (is_nxs_error($rep)) {  $badOut = print_r($rep, true)." - ERROR"; return $badOut; }  $contents2 = $rep['body'];    prr($rep); \r
+    if (stripos($contents2, 'id="error-box"')!==false) { echo 'The verification code was invalid or has timed out. Please try again.'; die(); }    \r
+    if (stripos($contents2, 'The verification code was invalid')!==false) { echo 'The verification code was invalid or has timed out. Please try again.'; die(); }    \r
+    if ($rep['response']['code']=='303' && !empty($rep['headers']['location']) ) { echo "OK. You are In";      \r
+      $hdrsArr = $liObj->headers('http://www.youtube.com', 'https://www.youtube.com');  $ck = $rep['cookies'];    \r
+      $advSet = array('headers' => $hdrsArr, 'httpversion' => '1.1', 'timeout' => 45, 'redirection' => 0, 'cookies' => $ck); // prr($advSet);\r
+      $rep = nxs_remote_get($rep['headers']['location'], $advSet); prr($ck); if (is_nxs_error($rep)) {  $badOut = print_r($rep, true)." - ERROR"; return $badOut; }  $ck = $rep['cookies'];   \r
+    }\r
+ } \r
+}\r
+\r
+if (!class_exists("nxs_snapClassGP")) { class nxs_snapClassGP {\r
+  //#### Show Common Settings\r
+  function showGenNTSettings($ntOpts){  global $nxs_plurl; $ntInfo = array('code'=>'GP', 'lcode'=>'gp', 'name'=>'Google+', 'defNName'=>'gpUName', 'tstReq' => false); \r
+    $fMsg = 'Google+ doesn\'t have a built-in API for automated posts yet. The current <a href="http://developers.google.com/+/api/">Google+ API</a> is "Read Only" and can\'t be used for posting.  <br/>You need to get a special <a target="_blank" href="http://www.nextscripts.com/google-plus-automated-posting">library module</a> to be able to publish your content to Google+.';\r
+    $ntParams = array('ntInfo'=>$ntInfo, 'nxs_plurl'=>$nxs_plurl, 'ntOpts'=>$ntOpts, 'chkField'=>'', 'checkFunc' => array('funcName'=>'doPostToGooglePlus', 'msg'=>$fMsg)); nxs_showListRow($ntParams);\r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($mgpo){ $options = array('nName'=>'', 'doGP'=>'1', 'gpUName'=>'', 'gpPageID'=>'', 'gpCommID'=>'', 'postType'=>'A', 'gpPass'=>''); $options['ntInfo']= array('lcode'=>'gp'); $this->showNTSettings($mgpo, $options, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt);\r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['gpCCatsList'])) $options['gpCCatsList'] = '';  ?>\r
+            <div id="doGP<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>" >     <input type="hidden" name="apDoSGP<?php echo $ii; ?>" value="0" id="apDoSGP<?php echo $ii; ?>" />             \r
+            <?php if(!class_exists('nxsAPI_GP') || (defined('d1') && d1==1)) {\r
+                 nxs_show_noLibWrn('Google+ API Library module NOT found.<br/><br/><span style="color:black;">Google+ does not have a free native API for automated posts yet. The current <a target="_blank" href="http://developers.google.com/+/api/">Google+ API</a> is "Read Only" and can\'t be used for posting.</span><br/><br/><span style="font-size: 12px;color:black;">You need to have a special API Library Module to be able to publish your content to Google+.</span>'); echo "</div>"; return; }; \r
+             ?>                      \r
+            <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/gp16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/setup-installation-google-plus-social-networks-auto-poster-wordpress/"><?php $nType="Google+"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="gp[<?php echo $ii; ?>][nName]" id="gpnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel('gp', $ii, $options['qTLng']); ?>\r
+    <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+    \r
+    \r
+            \r
+            <div style="width:100%;"><strong>Google+ Login Email:</strong> </div><input name="gp[<?php echo $ii; ?>][apGPUName]" id="apGPUName<?php echo $ii; ?>" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['gpUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+            <div style="width:100%;"><strong>Google+ Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="gp[<?php echo $ii; ?>][apGPPass]" id="apGPPass<?php echo $ii; ?>" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['gpPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['gpPass'], 5)):$options['gpPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>                \r
+            <p><div style="width:100%;"><strong>Google+ Page ID (Optional - for Google+ Pages Only. <b style="color: #580000;"> <?php _e('Leave Empty to publish to your profile or community', 'social-networks-auto-poster-facebook-twitter-g'); ?></b>):</strong> \r
+            <p style="font-size: 11px; margin: 0px;">For example if URL of your page is https://plus.google.com/u/0/b/117008619877691455570/ your Page ID is: 117008619877691455570. <b><?php _e('Leave Empty to publish to your profile or community.', 'social-networks-auto-poster-facebook-twitter-g'); ?></b></p>\r
+            </div><input name="gp[<?php echo $ii; ?>][apGPPage]" id="apGPPage" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['gpPageID'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /> \r
+            <br/>\r
+            <p><div style="width:100%;"><strong>Google+ Community ID (Optional - for Google+ Communities Only. <b style="color: #580000;"> <?php _e('Leave Empty to publish to your profile or page', 'social-networks-auto-poster-facebook-twitter-g'); ?></b>):</strong> \r
+            <p style="font-size: 11px; margin: 0px;">For example if URL of your Community is https://plus.google.com/communities/100396001601096060160 your Page ID is: 100396001601096060160. <b><?php _e('Leave Empty to publish to your profile or page', 'social-networks-auto-poster-facebook-twitter-g'); ?>.</b></p>\r
+            </div><input name="gp[<?php echo $ii; ?>][gpCommID]" id="gpCommID<?php echo $ii; ?>" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['gpCommID'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />&nbsp;&nbsp;\r
+            <a href="#" onclick="getGPCats(jQuery('<?php if ($isNew) echo "#nsx_addNT "; ?>#apGPUName<?php echo $ii; ?>').val(), jQuery('<?php if ($isNew) echo "#nsx_addNT "; ?>#apGPPass<?php echo $ii; ?>').val(), '<?php echo $ii; ?>', jQuery('<?php if ($isNew) echo "#nsx_addNT "; ?>#gpCommID<?php echo $ii; ?>').val()); return false;">\r
+            <?php _e('Retrieve Categories and Page Names', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+            </a>\r
+          <div style="padding-left: 15px; width:100%;"><strong>Community Category:</strong>\r
+            <img id="gpLoadingImg<?php echo $ii; ?>" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            <select name="gp[<?php echo $ii; ?>][apGPCCats]" id="apGPCCats<?php echo $ii; ?>">\r
+            <?php if ($options['gpCCatsList']!=''){ $gGPCats = $options['gpCCatsList']; if ( base64_encode(base64_decode($gGPCats)) === $gGPCats) $gGPCats = base64_decode($gGPCats); \r
+              if ($options['gpCCat']!='') $gGPCats = str_replace($options['gpCCat'].'"', $options['gpCCat'].'" selected="selected"', $gGPCats);  echo $gGPCats;} else { ?>\r
+              <option value="0">None(Click above to retrieve your categories)</option>\r
+            <?php } ?>\r
+            </select>\r
+          </div>\r
+            \r
+            <br/><br/>\r
+            \r
+            <div id="altFormat" style="">\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Message text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="apGPMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apGPMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)\r
+              </div>\r
+              \r
+              <textarea cols="150" rows="3" id="gp<?php echo $ii; ?>SNAPformat" name="gp[<?php echo $ii; ?>][apGPMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#gp<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apGPMsgFrmt<?php echo $ii; ?>');"><?php if ($isNew) _e("New post (%TITLE%) has been published on %SITENAME%", 'social-networks-auto-poster-facebook-twitter-g'); else _e(apply_filters('format_to_edit', htmlentities($options['gpMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea>\r
+              \r
+              <?php nxs_doShowHint("apGPMsgFrmt".$ii); ?>\r
+            </div><br/>          \r
+            \r
+             <div style="width:100%;"><strong id="altFormatText">Post Type:</strong>&lt;-- (<a id="showShAtt" onmouseout="hidePopShAtt('<?php echo $ii; ?>XG');" onmouseover="showPopShAtt('<?php echo $ii; ?>XG', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php _e('What\'s the difference?', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)  </div>                      \r
+<div style="margin-left: 10px;">\r
+        <?php if(!isset($options['postType']) || $options['postType']=='') {\r
+            if ((int)$options['imgPost'] == 1) $options['postType'] = 'I';\r
+            if ((int)$options['gpAttch'] == 1 || $isNew) $options['postType'] = 'A';\r
+        } ?>\r
+        <input type="radio" name="gp[<?php echo $ii; ?>][postType]" value="T" <?php if ($options['postType'] == 'T') echo 'checked="checked"'; ?> /> <?php _e('Text Post', 'social-networks-auto-poster-facebook-twitter-g'); ?> - <i><?php _e('just text message', 'social-networks-auto-poster-facebook-twitter-g'); ?></i><br/>                    \r
+        <input type="radio" name="gp[<?php echo $ii; ?>][postType]" value="I" <?php if ($options['postType'] == 'I') echo 'checked="checked"'; ?> /> <?php _e('Google+ Image Post', 'social-networks-auto-poster-facebook-twitter-g'); ?> - <i><?php _e('big image with text message', 'social-networks-auto-poster-facebook-twitter-g'); ?></i><br/>\r
+        <input type="radio" name="gp[<?php echo $ii; ?>][postType]" value="A" <?php if ( !isset($options['postType']) || $options['postType'] == '' || $options['postType'] == 'A') echo 'checked="checked"'; ?> /> <?php _e('Add blogpost to Google+ message as an attachment', 'social-networks-auto-poster-facebook-twitter-g'); ?><br/>\r
+<div class="popShAtt" id="popShAtt<?php echo $ii; ?>XG"><h3><?php _e('Google+ Post Types', 'social-networks-auto-poster-facebook-twitter-g'); ?></h3><img src="<?php echo $nxs_plurl; ?>img/gpPostTypesDiff6.png" width="600" height="285" alt="<?php _e('Google+ Post Types', 'social-networks-auto-poster-facebook-twitter-g'); ?>"/></div>\r
+   </div><br/>\r
+            <?php if ($isNew) { ?> <input type="hidden" name="gp[<?php echo $ii; ?>][apDoGP]" value="1" id="apDoNewGP<?php echo $ii; ?>" /> <?php } ?>\r
+            <?php if ($options['gpPass']!='') { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('GP', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>              <?php } \r
+            ?>\r
+            \r
+             </div>\r
+      <?php /* ######################## Advanced Tab ####################### */ ?>\r
+  <?php if (!$isNew) { ?>  <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+    <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); \r
+      nxs_showRepostSettings($nt, $ii, $options); ?>\r
+            \r
+            \r
+    </div>  <?php } ?> <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div> </div>\r
+            \r
+            <?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){  $code = 'GP'; $lcode = 'gp'; \r
+    foreach ($post as $ii => $pval){       \r
+      if (!empty($pval['apGPUName']) && !empty($pval['apGPPass'])){ if (!isset($options[$ii])) $options[$ii] = array();      \r
+        if (isset($pval['apGPUName']))   $options[$ii]['gpUName'] = trim($pval['apGPUName']);\r
+        if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);\r
+        if (isset($pval['apGPPass']))    $options[$ii]['gpPass'] = 'n5g9a'.nsx_doEncode($pval['apGPPass']); else $options[$ii]['gpPass'] = '';  \r
+        if (isset($pval['apGPPage']))    $options[$ii]['gpPageID'] = trim($pval['apGPPage']);  \r
+        if (isset($pval['gpCommID']))    $options[$ii]['gpCommID'] = trim($pval['gpCommID']);  \r
+        \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';        \r
+        \r
+        if (isset($pval['apGPCCats']))   $options[$ii]['gpCCat'] = trim($pval['apGPCCats']);        \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+                      \r
+        if (isset($pval['postType']))   $options[$ii]['postType'] = $pval['postType'];         \r
+        if (isset($pval['apGPMsgFrmt'])) $options[$ii]['gpMsgFormat'] = trim($pval['apGPMsgFrmt']);                                                  \r
+        if (isset($pval['apDoGP']))      $options[$ii]['doGP'] = $pval['apDoGP']; else $options[$ii]['doGP'] = 0; \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']); if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }  \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'gp'; $ntU = 'GP'; \r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapGP', true));  if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii])) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]);  \r
+        if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = '';  if (empty($ntOpt['urlToUse'])) $ntOpt['urlToUse'] = '';\r
+        $doGP = $ntOpt['doGP'] && (is_array($pMeta) || $ntOpt['catSel']!='1');    $imgToUse = $ntOpt['imgToUse'];   $urlToUse = $ntOpt['urlToUse']; \r
+        $isAvailGP =  $ntOpt['gpUName']!='' && $ntOpt['gpPass']!='';   $gpMsgFormat = htmlentities($ntOpt['gpMsgFormat'], ENT_COMPAT, "UTF-8");      \r
+        if(!isset($ntOpt['postType']) || $ntOpt['postType']=='') {\r
+            if ((int)$ntOpt['imgPost'] == 1) $ntOpt['postType'] = 'I';\r
+            if ((int)$ntOpt['gpAttch'] == 1 || $isNew) $ntOpt['postType'] = 'A';\r
+        } $gpPostType = $ntOpt['postType'];\r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2">\r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvailGP) { ?><input class="nxsGrpDoChb" value="1" id="doGP<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="gp[<?php echo $ii; ?>][doGP]" <?php if ((int)$doGP == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="gp[<?php echo $ii; ?>][doGP]" value="<?php echo $doGP;?>"> <?php } ?> <?php } ?>\r
+      \r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/gp16.png);">Google+ - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvailGP) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToGP_repostButton" id="rePostToGP_button" value="<?php _e('Repost to Google+', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php } ?>\r
+                    \r
+                    <?php  if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) { \r
+                        \r
+                        ?> <span id="pstdGP<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+                      <a style="font-size: 10px;" href="https://plus.google.com/<?php echo $pMeta[$ii]['pgID']; ?>" target="_blank"><?php $nType="Google+"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>                \r
+                \r
+                <?php if (!$isAvailGP) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your Google+ Account to AutoPost to Google+</b>\r
+                <?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } \r
+                \r
+                if (((int)$doGP == 1) && $post->post_status == "publish" && isset($ntOpt['timeToRun']) && $ntOpt['timeToRun'] > time()) { ?> <tr><th style="text-align:left; color: purple;" colspan="2">\r
+                ===&gt;&gt;&gt;&gt;&nbsp;<?php _e('Autopost has been schedulled for', 'social-networks-auto-poster-facebook-twitter-g') ?> <?php echo date('F j, Y, g:i a', $ntOpt['timeToRun']) ?></th> <?php } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>gp" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> />\r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>                \r
+                </td></tr> <?php } ?>\r
+                \r
+                <tr><th scope="row" style="text-align:right; width:150px; vertical-align:top; padding-top: 0px; padding-right:10px;"> <?php _e('Post Type:', 'social-networks-auto-poster-facebook-twitter-g') ?> <br/>\r
+                (<a id="showShAtt" style="font-weight: normal" onmouseout="hidePopShAtt('<?php echo $ii; ?>XG');" onmouseover="showPopShAtt('<?php echo $ii; ?>XG', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php _e('What\'s the difference?', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)\r
+                </th><td>     \r
+        \r
+        <input type="radio" name="gp[<?php echo $ii; ?>][postType]" value="T" <?php if ($gpPostType == 'T') echo 'checked="checked"'; ?> /> <?php _e('Text Post', 'social-networks-auto-poster-facebook-twitter-g') ?>  - <i><?php _e('just text message', 'social-networks-auto-poster-facebook-twitter-g') ?></i><br/>       \r
+        <input type="radio" name="gp[<?php echo $ii; ?>][postType]" value="I" <?php if ($gpPostType == 'I') echo 'checked="checked"'; ?> onchange="jQuery('#altFormatIMG<?php echo $nt.$ii;?>').show();" /> <?php _e('Post to Google+ as "Image post"', 'social-networks-auto-poster-facebook-twitter-g') ?> - <i><?php _e('big image with text message', 'social-networks-auto-poster-facebook-twitter-g') ?></i><br/>             \r
+        <input type="radio" name="gp[<?php echo $ii; ?>][postType]" value="A" <?php if ( !isset($gpPostType) || $gpPostType == '' || $gpPostType == 'A') echo 'checked="checked"'; ?> onchange="jQuery('#altFormatIMG<?php echo $nt.$ii;?>').hide();" /><?php _e('Text Post with "attached" blogpost', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+        <div class="popShAtt" id="popShAtt<?php echo $ii; ?>XG"><h3><?php _e('Google+ Post Types', 'social-networks-auto-poster-facebook-twitter-g') ?></h3><img src="<?php echo $nxs_plurl; ?>img/gpPostTypesDiff6.png" width="600" height="285" alt="<?php _e('Google+ Post Types', 'social-networks-auto-poster-facebook-twitter-g') ?>"/></div>\r
+     </td></tr>\r
+         <?php if ($ntOpt['gpCommID']!='') { ?>\r
+     <tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;">Community Category</th>\r
+                <td><select name="gp[<?php echo $ii; ?>][apGPCCat]" id="apGPCCat">\r
+            <?php if (!empty($ntOpt['gpCCatsList'])){ $gCats = $ntOpt['gpCCatsList']; if ( base64_encode(base64_decode($gCats)) === $gCats) $gCats = base64_decode($gCats); \r
+              if ($ntOpt['gpCCat']!='') $gCats = str_replace($ntOpt['gpCCat'].'"', $ntOpt['gpCCat'].'" selected="selected"', $gCats);  echo $gCats;} else { ?>\r
+              <option value="0">None(Please go to settings and retreive)</option>\r
+            <?php } ?>\r
+            </select></td>\r
+                </tr> \r
+                       <?php } ?>                \r
+               <?php /* ## Message Format ## */ ?>         \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top;  padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Message Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                <td>\r
+                \r
+                 <?php if (1==1) { ?>\r
+                <textarea cols="150" rows="1" id="gp<?php echo $ii; ?>SNAPformat" name="gp[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#gp<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apGPMsgFrmt<?php echo $ii; ?>');"><?php echo $gpMsgFormat ?></textarea>\r
+                <?php } else { ?>\r
+                <input value="<?php echo $gpMsgFormat ?>" type="text" name="gp[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apGPMsgFrmt<?php echo $ii; ?>');"/><?php nxs_doShowHint("apGPMsgFrmt".$ii); ?>\r
+                <?php } ?>\r
+                </td></tr>\r
+                <?php /* ## Select Image & URL ## */ nxs_showImgToUseDlg($nt, $ii, $imgToUse, ( !isset($gpPostType) || $gpPostType == '' || $gpPostType == 'A') ); nxs_showURLToUseDlg($nt, $ii, $urlToUse); ?>\r
+           <?php } \r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = ''; \r
+    if (isset($pMeta['SNAPformat'])) $optMt['gpMsgFormat'] = $pMeta['SNAPformat'];    \r
+    if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse']; if (isset($pMeta['urlToUse'])) $optMt['urlToUse'] = $pMeta['urlToUse']; \r
+    if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+    if (isset($pMeta['postType'])) $optMt['postType'] = $pMeta['postType'];\r
+    if (isset($pMeta['apGPCCat']) && $pMeta['apGPCCat']!='' && $pMeta['apGPCCat']!='0') $optMt['gpCCat'] = $pMeta['apGPCCat']; \r
+    if (isset($pMeta['doGP'])) $optMt['doGP'] = $pMeta['doGP'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doGP'] = 0; } \r
+    if (isset($pMeta['SNAPincludeGP']) && $pMeta['SNAPincludeGP'] == '1' ) $optMt['doGP'] = 1;  \r
+    return $optMt;\r
+  }  \r
+}}\r
+if (!function_exists("nxs_rePostToGP_ajax")) {\r
+  function nxs_rePostToGP_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+    foreach ($options['gp'] as $ii=>$two) if ($ii==$_POST['nid']) {   $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['gpPageID'].$two['gpUName']==$_POST['nid']) {  \r
+      $gppo =  get_post_meta($postID, 'snapGP', true); $gppo =  maybe_unserialize($gppo);// prr($gppo);\r
+      if (is_array($gppo) && isset($gppo[$ii]) && is_array($gppo[$ii])){ $ntClInst = new nxs_snapClassGP(); $two = $ntClInst->adjMetaOpt($two, $gppo[$ii]); } \r
+      $result = nxs_doPublishToGP($postID, $two); if ($result == 200) die("Successfully sent your post to Google+."); else die($result);        \r
+    }    \r
+  }\r
+}  \r
+if (!function_exists("nxs_doPublishToGP")) { //## Second Function to Post to G+\r
+  function nxs_doPublishToGP($postID, $options){ $ntCd = 'GP'; $ntCdL = 'gp'; $ntNm = 'Google+';   global $plgn_NS_SNAutoPoster; $ytCode = ''; $imgURL = '';\r
+      if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+      if (!class_exists('nxsAPI_GP') || (defined('d1') && d1==1)) { nxs_addToLogN('E', 'Error', $ntCd, '-=ERROR=- No G+ API Lib Detected', ''); return "No G+ API Lib Detected";}\r
+      $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));\r
+      if (empty($options['imgToUse'])) $options['imgToUse'] = ''; if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      \r
+      $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+      $logNT = '<span style="color:#800000">Google+</span> - '.$options['nName'];      \r
+      $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+      if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {  \r
+           nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$uqID); return;\r
+        }\r
+      }         \r
+      \r
+      $message = array('message'=>'', 'link'=>'', 'imageURL'=>'', 'videoURL'=>'', 'noImg'=>false);  $isNoImg = false;     \r
+      if ($postID=='0') { echo "Testing ... <br/><br/>"; $options['gpMsgFormat'] = "Test Post from ". htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES)." - ".home_url();  $message['url'] = home_url();    \r
+      } else { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));  $post = get_post($postID); if(!$post) return; \r
+        $gpMsgFormat = $options['gpMsgFormat']; $gpPostType = $options['postType'];  $msg = nsFormatMessage($gpMsgFormat, $postID, $addParams); $options['gpMsgFormat'] = $msg; \r
+        $extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?$post->post_title:'');\r
+        if ($gpPostType=='I') { $vids = nsFindVidsInPost($post, false); if (count($vids)>0) $ytCode = $vids[0]; /* if (trim($ytCode)=='') $options['trPostType']='T'; /* What is it? */ }       \r
+        if ($gpPostType=='A') if (trim($options['imgToUse'])!='') $imgURL = $options['imgToUse']; else $imgURL = nxs_getPostImage($postID, 'medium');  \r
+        if ($gpPostType=='I') if (trim($options['imgToUse'])!='') $imgURL = $options['imgToUse']; else $imgURL = nxs_getPostImage($postID, 'full');      \r
+        if (preg_match("/noImg.\.png/i", $imgURL)) { $imgURL = ''; $isNoImg = true; }\r
+        \r
+        //## MyURL - URLToGo code\r
+        $options = nxs_getURL($options, $postID, $addParams); $urlToGo = $options['urlToUse'];       \r
+        $message = array('url'=>$urlToGo, 'imageURL'=>$imgURL, 'videoCode'=>$ytCode, 'noImg'=>$isNoImg); //prr($message); die();\r
+      }            \r
+      //## Actual Post\r
+      $ntToPost = new nxs_class_SNAP_GP(); $ret = $ntToPost->doPostToNT($options, $message);\r
+      //## Process Results\r
+      if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+         if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+      } else {  // ## All Good - log it.\r
+        if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+          else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'pDate'=>date('Y-m-d H:i:s'))); \r
+          $extInfo .= ' | <a href="'.$ret['postURL'].'" target="_blank">Post Link</a>'; nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+      }\r
+      //## Return Result\r
+      if ($ret['isPosted']=='1') return 200; else return print_r($ret, true);      \r
+      \r
+  } \r
+}  \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/ip.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/ip.api.php
new file mode 100644 (file)
index 0000000..099ba9e
--- /dev/null
@@ -0,0 +1,44 @@
+<?php    \r
+//## NextScripts FriendFeed Connection Class\r
+$nxs_snapAPINts[] = array('code'=>'IP', 'lcode'=>'ip', 'name'=>'Instapaper');\r
+\r
+if (!class_exists("nxs_class_SNAP_IP")) { class nxs_class_SNAP_IP {\r
+    \r
+    var $ntCode = 'IP';\r
+    var $ntLCode = 'ip';     \r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array();\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }    \r
+    function nxs_getIPHeaders($up){ $hdrsArr = array(); \r
+      $hdrsArr['Cache-Control']='no-cache'; $hdrsArr['Connection']='keep-alive'; \r
+      $hdrsArr['User-Agent']='SNAP for Wordpress; Ver 3';\r
+      $hdrsArr['Accept']='text/html, application/xhtml+xml, */*'; $hdrsArr['DNT']='1';\r
+      $hdrsArr['Authorization'] = 'Basic ' . base64_encode("$up");\r
+      if (function_exists('gzdeflate')) $hdrsArr['Accept-Encoding']='gzip,deflate'; \r
+      $hdrsArr['Accept-Language']='en-US,en;q=0.8'; $hdrsArr['Accept-Charset']='ISO-8859-1,utf-8;q=0.7,*;q=0.3'; return $hdrsArr;\r
+    }\r
+    function doPostToNT($options, $message){ $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>'');\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['ipUName']) || trim($options['ipPass'])=='') { $badOut['Error'] = 'Not Configured'; return $badOut; }            \r
+      $dusername = $options['ipUName']; $pass = (substr($options['ipPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['ipPass'], 5)):$options['ipPass']);\r
+      //## Format\r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['ipMsgFormat'], $message); \r
+      if (!empty($message['pTitle'])) $msgT = $message['pTitle']; else $msgT = nxs_doFormatMsg($options['ipMsgTFormat'], $message);      \r
+      $link = urlencode($message['url']); $desc = urlencode(substr($msgT, 0, 250)); $ext = urlencode(substr($msg, 0, 1000)); $tags = $message['tags'];      \r
+      if (!(preg_match("@^(https?|ftp)://[^\s/$.?#].[^\s]*$@iS", $message['url']))) return 'Error: Unvalid URL: '.$message['url'];            \r
+      $apicall = "https://www.instapaper.com/api/add?red=api&url=$link&title=$desc&selection=$ext";\r
+      $hdrsArr = $this->nxs_getIPHeaders($dusername.':'.$pass); $cnt = wp_remote_get( $apicall, array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr) );//  prr($cnt);\r
+      \r
+      if(is_wp_error($cnt)) { $error_string = $cnt->get_error_message(); if (stripos($error_string, ' timed out')!==false) { sleep(10); \r
+        $cnt = wp_remote_get( $apicall, array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr) );}\r
+      } \r
+      if(is_wp_error($cnt)) $ret = 'Something went wrong - '.print_r($cnt, true);  else {      \r
+        if (is_array($cnt) &&  stripos($cnt['body'],'bookmark_id')!==false) return array('postID'=>CutFromTo($cnt['body'],'"bookmark_id": ','}'), 'isPosted'=>1, 'postURL'=>'IP', 'pDate'=>date('Y-m-d H:i:s'));\r
+          else { $ret = "Error: "; if ( is_array($cnt) && $cnt['response']['code']=='401') $ret .= " Incorrect Username/Password "; else $ret .= print_r($cnt, true);  $ret .= $cnt['response']['message']; }\r
+      } $badOut['Error'] .= $ret;  return $badOut;\r
+   }    \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/ip.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/ip.php
new file mode 100644 (file)
index 0000000..26936de
--- /dev/null
@@ -0,0 +1,224 @@
+<?php    \r
+//## NextScripts Facebook Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'IP', 'lcode'=>'ip', 'name'=>'Instapaper');\r
+\r
+if (!class_exists("nxs_snapClassIP")) { class nxs_snapClassIP {\r
+  //#### Show Common Settings\r
+  function showGenNTSettings($ntOpts){ global $nxs_plurl; $ntInfo = array('code'=>'IP', 'lcode'=>'ip', 'name'=>'Instapaper', 'defNName'=>'ipUName', 'tstReq' => false); ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>\r
+          <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />\r
+           <?php } ?>\r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;\r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($mgpo){ $options = array('nName'=>'', 'doIP'=>'1', 'ipUName'=>'', 'ipPageID'=>'', 'ipAttch'=>'', 'ipPass'=>''); $options['ntInfo']= array('lcode'=>'ip'); $this->showNTSettings($mgpo, $options, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = '';  ?>\r
+            <div id="doIP<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>" style="max-width: 1000px; margin: 10px; border: 1px solid #808080; padding: 10px; display:none;">     <input type="hidden" name="apDoSIP<?php echo $ii; ?>" value="0" id="apDoSIP<?php echo $ii; ?>" />          \r
+            \r
+             <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/ip16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/setup-installation-instapaper-social-networks-auto-poster-wordpress/"><?php $nType="Instapaper"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="ip[<?php echo $ii; ?>][nName]" id="ipnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit',htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel('ip', $ii, $options['qTLng']); ?>\r
+            \r
+              <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+    \r
+            \r
+            <div style="width:100%;"><strong>Instapaper Username:</strong> </div><input name="ip[<?php echo $ii; ?>][apIPUName]" id="apIPUName" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit',htmlentities($options['ipUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+            <div style="width:100%;"><strong>Instapaper Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="ip[<?php echo $ii; ?>][apIPPass]" id="apIPPass" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['ipPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['ipPass'], 5)):$options['ipPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>                \r
+            \r
+            <?php if ($isNew) { ?> <input type="hidden" name="ip[<?php echo $ii; ?>][apDoIP]" value="1" id="apDoNewIP<?php echo $ii; ?>" /> <?php } ?>\r
+            <br/>            \r
+            \r
+            <div id="altFormat" style="">\r
+  <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> (<a href="#" id="apIPTMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apIPTMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div>\r
+  \r
+              <input name="ip[<?php echo $ii; ?>][apIPMsgTFrmt]" id="apIPMsgTFrmt" style="width: 50%;" value="<?php if ($isNew) echo "%TITLE%"; else _e(apply_filters('format_to_edit',htmlentities($options['ipMsgTFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?>" onfocus="mxs_showFrmtInfo('apIPTMsgFrmt<?php echo $ii; ?>');" /><?php nxs_doShowHint("apIPTMsgFrmt".$ii); ?>\r
+            </div>   \r
+            \r
+            <div id="altFormat" style="">\r
+  <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> (<a href="#" id="apIPMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apIPMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div>\r
+              \r
+              <textarea cols="150" rows="3" id="ip<?php echo $ii; ?>SNAPformat" name="ip[<?php echo $ii; ?>][apIPMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#ip<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apIPMsgFrmt<?php echo $ii; ?>');"><?php if ($isNew) echo "%EXCERPT%"; else _e(apply_filters('format_to_edit', htmlentities($options['ipMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea>\r
+              \r
+              <?php nxs_doShowHint("apIPMsgFrmt".$ii); ?>\r
+            </div><br/>    \r
+            \r
+            <?php if ($options['ipPass']!='') { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('IP', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>      \r
+               \r
+            <?php } \r
+            \r
+            ?></div>\r
+            <?php /* ######################## Advanced Tab ####################### */ ?>\r
+    <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+    <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); \r
+      nxs_showRepostSettings($nt, $ii, $options); ?>\r
+            \r
+            \r
+    </div> <?php } ?> <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div></div><?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = 'IP'; $lcode = 'ip'; \r
+    foreach ($post as $ii => $pval){       \r
+      if (!empty($pval['apIPUName']) && !empty($pval['apIPPass'])){ if (!isset($options[$ii])) $options[$ii] = array();      \r
+        if (isset($pval['apIPUName']))   $options[$ii]['ipUName'] = trim($pval['apIPUName']);\r
+        if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);\r
+        if (isset($pval['apIPPass']))    $options[$ii]['ipPass'] = 'n5g9a'.nsx_doEncode($pval['apIPPass']); else $options[$ii]['ipPass'] = '';  \r
+        \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+        \r
+        if (isset($pval['apIPMsgFrmt'])) $options[$ii]['ipMsgFormat'] = trim($pval['apIPMsgFrmt']);                                                  \r
+        if (isset($pval['apIPMsgTFrmt'])) $options[$ii]['ipMsgTFormat'] = trim($pval['apIPMsgTFrmt']);                                                  \r
+        if (isset($pval['apDoIP']))      $options[$ii]['doIP'] = $pval['apDoIP']; else $options[$ii]['doIP'] = 0; \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }  \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'ip'; $ntU = 'IP';\r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapIP', true));   if (is_array($pMeta)) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]); \r
+        $doIP = $ntOpt['doIP'] && (is_array($pMeta) || $ntOpt['catSel']!='1');   \r
+        $isAvailIP =  $ntOpt['ipUName']!='' && $ntOpt['ipPass']!=''; $ipMsgFormat = htmlentities($ntOpt['ipMsgFormat'], ENT_COMPAT, "UTF-8"); $ipMsgTFormat = htmlentities($ntOpt['ipMsgTFormat'], ENT_COMPAT, "UTF-8");      \r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2">\r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvailIP) { ?><input class="nxsGrpDoChb" value="1" id="doIP<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="ip[<?php echo $ii; ?>][doIP]" <?php if ((int)$doIP == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="ip[<?php echo $ii; ?>][doIP]" value="<?php echo $doIP;?>"> <?php } ?> <?php } ?> \r
+      \r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/ip16.png);">Instapaper - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvailIP) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToIP_repostButton" id="rePostToIP_button" value="<?php _e('Repost to Instapaper', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php } ?>\r
+                    \r
+                    <?php  if (is_array($pMeta) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) {                         \r
+                        ?> <span id="pstdIP<?php echo $ii; ?>" style="float: right; padding-top: 4px; padding-right: 10px;">\r
+          <a style="font-size: 10px;" href="http://www.instapaper.com/u" target="_blank"><?php $nType="Instapaper"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>                \r
+                \r
+                <?php if (!$isAvailIP) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your Instapaper Account to AutoPost to Instapaper</b>\r
+                <?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>ip" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> />\r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>                \r
+                </td></tr> <?php } ?>\r
+                \r
+               \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Title Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                <td><input value="<?php echo $ipMsgTFormat ?>" type="text" name="ip[<?php echo $ii; ?>][SNAPformatT]"  style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apIPTMsgFrmt<?php echo $ii; ?>');"/><?php nxs_doShowHint("apIPTMsgFrmt".$ii); ?></td></tr>\r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                <td>                \r
+                <textarea cols="150" rows="1" id="ip<?php echo $ii; ?>SNAPformat" name="ip[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#ip<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apIPMsgFrmt<?php echo $ii; ?>');"><?php echo $ipMsgFormat; ?></textarea>\r
+                <?php nxs_doShowHint("apIPMsgFrmt".$ii); ?></td></tr>\r
+                <?php } \r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = ''; \r
+     if (isset($pMeta['SNAPformat'])) $optMt['ipMsgFormat'] = $pMeta['SNAPformat']; \r
+     if (isset($pMeta['SNAPformatT'])) $optMt['ipMsgTFormat'] = $pMeta['SNAPformatT'];\r
+     if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];      \r
+     if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];          \r
+     if (isset($pMeta['doIP'])) $optMt['doIP'] = $pMeta['doIP'] == 1?1:0; else { if (isset($pMeta['SNAPformat']))  $optMt['doIP'] = 0; } \r
+     if (isset($pMeta['SNAPincludeIP']) && $pMeta['SNAPincludeIP'] == '1' ) $optMt['doIP'] = 1;  \r
+     return $optMt;\r
+  }  \r
+}}\r
+if (!function_exists("nxs_rePostToIP_ajax")) {\r
+  function nxs_rePostToIP_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; $options = get_option('NS_SNAutoPoster');  \r
+    foreach ($options['ip'] as $ii=>$two) if ($ii==$_POST['nid']) {   $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['gpPageID'].$two['gpUName']==$_POST['nid']) {  \r
+      $gppo =  get_post_meta($postID, 'snapIP', true); $gppo =  maybe_unserialize($gppo);// prr($gppo);\r
+      if (is_array($gppo) && isset($gppo[$ii]) && is_array($gppo[$ii])){ $ntClInst = new nxs_snapClassIP(); $two = $ntClInst->adjMetaOpt($two, $gppo[$ii]);}\r
+      $result = nxs_doPublishToIP($postID, $two); if ($result == 200) die("Successfully sent your post to Instapaper."); else die($result);        \r
+    }    \r
+  }\r
+}  \r
+\r
+\r
+\r
+if (!function_exists("nxs_doPublishToIP")) { //## Second Function to Post to IP\r
+  function nxs_doPublishToIP($postID, $options){ $ntCd = 'IP'; $ntCdL = 'ip'; $ntNm = 'Instapaper';  global $plgn_NS_SNAutoPoster;\r
+      if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+      //if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToIP',  array($postID, $options));\r
+      $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));   \r
+      $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url();     \r
+      $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+      $logNT = '<span style="color:#000080">Instapaper</span> - '.$options['nName'];\r
+      $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+      if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {  sleep(5);\r
+         nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$uqID); return;\r
+        }\r
+      }                   \r
+      if ($postID=='0') { echo "Testing ... <br/><br/>"; $urlToGo = home_url();  $options['ipMsgTFormat'] = 'Test Link from '.$urlToGo; } else { $post = get_post($postID); if(!$post) return;       \r
+        //## MyURL - URLToGo code\r
+        $options = nxs_getURL($options, $postID, $addParams); $urlToGo = $options['urlToUse']; \r
+      \r
+        $options['ipMsgTFormat'] = nsFormatMessage($options['ipMsgTFormat'], $postID, $addParams);  $options['ipMsgFormat'] = nsFormatMessage($options['ipMsgFormat'], $postID, $addParams); \r
+        nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1')); \r
+      }\r
+      $extInfo = ' | PostID: '.$postID." - ".(is_object($post)?$post->post_title:'');\r
+      \r
+      $t = wp_get_post_tags($postID); $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = urlencode(implode(',',$tggs)); $tags = str_replace(' ','+',$tags);             \r
+      $message = array('url'=>$urlToGo, 'surl'=>$urlToGo, 'siteName'=>$blogTitle, 'tags'=>$tags);\r
+      //## Actual Post\r
+      $ntToPost = new nxs_class_SNAP_IP(); $ret = $ntToPost->doPostToNT($options, $message);\r
+      //## Process Results\r
+      if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+        if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+      } else {  // ## All Good - log it.\r
+        if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+          else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'pDate'=>date('Y-m-d H:i:s'))); nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+      }\r
+      //## Return Result\r
+      if ($ret['isPosted']=='1') return 200; else return print_r($ret, true); \r
+      \r
+  }\r
+}  \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/kt.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/kt.api.php
new file mode 100644 (file)
index 0000000..88e3223
--- /dev/null
@@ -0,0 +1,50 @@
+<?php    \r
+//## NextScripts Kippt Connection Class \r
+$nxs_snapAPINts[] = array('code'=>'KT', 'lcode'=>'kt', 'name'=>'Kippt');\r
+\r
+if (!class_exists("nxs_class_SNAP_KT")) { class nxs_class_SNAP_KT {\r
+    \r
+    var $ntCode = 'KT';\r
+    var $ntLCode = 'kt';     \r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array();\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }    \r
+    function nxs_getKTHeaders($ref, $uname, $pass, $post=false){ $hdrsArr = array(); \r
+      $hdrsArr['X-Requested-With']='XMLHttpRequest'; $hdrsArr['Connection']='keep-alive'; $hdrsArr['Referer']=$ref;\r
+      $hdrsArr['User-Agent']='Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.22 Safari/537.11';\r
+      if($post) $hdrsArr['Content-Type']='application/x-www-form-urlencoded'; \r
+      $hdrsArr['Accept']='application/json, text/javascript, */*; q=0.01'; \r
+      //$hdrsArr['Authorization']= 'Basic '.base64_encode($uname.':'.$pass);\r
+      $hdrsArr['Accept-Encoding']='gzip,deflate,sdch'; $hdrsArr['Accept-Language']='en-US,en;q=0.8'; $hdrsArr['Accept-Charset']='ISO-8859-1,utf-8;q=0.7,*;q=0.3'; return $hdrsArr;\r
+    }\r
+    function doPostToNT($options, $message){ $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>''); \r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['uName']) || trim($options['uPass'])=='') { $badOut['Error'] = 'Not Configured'; return $badOut; }      \r
+      $email = $options['uName'];  $pass = substr($options['uPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['uPass'], 5)):$options['uPass'];  \r
+      //## Format\r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['msgFormat'], $message);       \r
+      if (!empty($message['pTitle'])) $msgT = $message['pTitle']; else $msgT = nxs_doFormatMsg($options['msgTFrmt'], $message);\r
+      //######  ===============\r
+      \r
+      $hdrsArr = $this->nxs_getKTHeaders('https://kippt.com/api/clips/', $email, $pass, true); $hdrsArr['X-Kippt-Username'] = $email; $hdrsArr['X-Kippt-API-Token'] = $pass;            \r
+      $cnt = wp_remote_get( 'https://kippt.com/api/lists/', array( 'timeout' => 45, 'redirection' => 0, 'headers' => $hdrsArr)); $lists = json_decode($cnt['body'], true); \r
+      foreach ($lists['objects'] as $list) if ($list['slug'] == $options['list']) $listID = $list['resource_uri']; if (empty($listID))  $listID = '';      \r
+      $flds = array();  $flds['url']=$message['url']; $flds['notes']=$msg; $flds['title']=$msgT; $flds['list']=$listID; $flds = json_encode($flds); // prr($flds);      \r
+      $cnt = wp_remote_post( 'https://kippt.com/api/clips/', array( 'method' => 'POST', 'timeout' => 45, 'redirection' => 0, 'headers' => $hdrsArr, 'body' => $flds));     \r
+      if (is_wp_error($cnt) || empty($cnt['body']) || $cnt['response']['code']!='201') return "ERROR: ".print_r($cnt, true);\r
+      \r
+      //prr($cnt['body']);\r
+         \r
+      //## Return      \r
+      if (stripos($cnt['body'],'"resource_uri": "')!==false) { \r
+         $pid = CutFromTo($cnt['body'], '"resource_uri": "', '"'); $purl = 'https://kippt.com'.CutFromTo($cnt['body'], '"app_url": "', '"');\r
+         return array('postID'=>$pid, 'isPosted'=>1, 'postURL'=>$purl, 'pDate'=>date('Y-m-d H:i:s'));          \r
+      } else { $badOut['Error'] .= print_r($cnt, true); \r
+        return $badOut;\r
+      }\r
+    }\r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/kt.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/kt.php
new file mode 100644 (file)
index 0000000..da0432f
--- /dev/null
@@ -0,0 +1,206 @@
+<?php    \r
+//## NextScripts Facebook Connection Class \r
+$nxs_snapAvNts[] = array('code'=>'KT', 'lcode'=>'kt', 'name'=>'Kippt');\r
+\r
+if (!class_exists("nxs_snapClassKT")) { class nxs_snapClassKT { var $ntInfo = array('code'=>'KT', 'lcode'=>'kt', 'name'=>'Kippt', 'defNName'=>'uName', 'tstReq' => false);\r
+  //#### Show Common Settings\r
+  function showGenNTSettings($ntOpts){  global $nxs_plurl, $nxs_snapSetPgURL;  $ntInfo = $this->ntInfo;    \r
+    $ntParams = array('ntInfo'=>$ntInfo, 'nxs_plurl'=>$nxs_plurl, 'ntOpts'=>$ntOpts, 'chkField'=>'uPass'); nxs_showListRow($ntParams);  \r
+  }   \r
+  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($mgpo){ $options = array('nName'=>'', 'doKT'=>'1', 'uName'=>'', 'uPass'=>''); $options['ntInfo']= array('lcode'=>'kt'); $this->showNTSettings($mgpo, $options, true);}  \r
+  \r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = '';  ?>\r
+            <div id="doKT<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew){ ?> clNewNTSets<?php } ?>"> <input type="hidden" name="apDoSKT<?php echo $ii; ?>" value="0" id="apDoSKT<?php echo $ii; ?>" />          \r
+            \r
+             <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/instructions/kippt-social-networks-auto-poster-setup-installation/"><?php $nType="Kippt"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][nName]" id="nName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel($nt, $ii, $options['qTLng']); ?>\r
+            \r
+              <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+    \r
+    \r
+    \r
+           <div style="width:100%;"><strong><?php echo $nType; ?> Username:</strong> </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][uName]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['uName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />    \r
+                       \r
+            <div style="width:100%;"><strong><?php echo $nType; ?> Token:</strong> <span style="font-size: 11px; margin: 0px;">Get it from <a target="_blank" href="http://developers.kippt.com/">developers.kippt.com</a>.</span></div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][uPass]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['uPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['uPass'], 5)):$options['uPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>                \r
+            \r
+            <div style="width:100%;"><strong><?php echo $nType; ?> List:</strong> </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][list]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['list'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />    \r
+            <br/><br/>\r
+            <?php if ($isNew) { ?> <input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][apDo<?php echo $ntU; ?>]" value="1" id="apDoNew<?php echo $ntU; ?><?php echo $ii; ?>" /> <?php } ?><br/>            \r
+            \r
+            \r
+            <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="msgFrmtT<?php echo $ntU.$ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('msgFrmtT<?php echo $ntU.$ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div>               \r
+              <input name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgTFrmt]" style="width: 50%;" value="<?php if (!empty($options['msgTFrmt'])) _e(apply_filters('format_to_edit', htmlentities($options['msgTFrmt'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); else echo "%TITLE%"; ?>" onfocus="mxs_showFrmtInfo('msgFrmtT<?php echo $ntU.$ii; ?>');" /><?php nxs_doShowHint("msgFrmtT".$ntU.$ii); ?><br/> \r
+   \r
+    \r
+            \r
+            <div id="altFormat" style="margin-left: 0px;">\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="msgFrmt<?php echo $ntU; ?><?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('msgFrmt<?php echo $ntU; ?><?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)\r
+              </div>              \r
+              <textarea cols="150" rows="3" id="<?php echo $nt; ?><?php echo $ii; ?>msgFrmt" name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#<?php echo $nt; ?><?php echo $ii; ?>msgFrmt').attr('rows', 6); mxs_showFrmtInfo('msgFrmt<?php echo $ntU.$ii; ?>');"><?php if ($isNew) _e("%EXCERPT%", 'social-networks-auto-poster-facebook-twitter-g'); else _e(apply_filters('format_to_edit', htmlentities($options['msgFrmt'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea><?php nxs_doShowHint("msgFrmt".$ntU.$ii); ?>\r
+            </div>   \r
+            \r
+            <?php if ($options['uPass']!='') { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('<?php echo $ntU; ?>', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>            <?php } \r
+          ?>\r
+          </div>\r
+            <?php /* ######################## Advanced Tab ####################### */ ?>\r
+  <?php if (!$isNew) { ?>  <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+    <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); \r
+      nxs_showRepostSettings($nt, $ii, $options); ?>            \r
+            \r
+    </div>  <?php } ?> <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div>\r
+          </div><?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = 'KT'; $lcode = 'kt'; \r
+    foreach ($post as $ii => $pval){ \r
+      if (!empty($pval['uName']) && !empty($pval['uPass'])){ if (!isset($options[$ii])) $options[$ii] = array();\r
+        if (isset($pval['uName']))   $options[$ii]['uName'] = trim($pval['uName']);\r
+        if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);\r
+        if (isset($pval['uPass']))    $options[$ii]['uPass'] = 'n5g9a'.nsx_doEncode($pval['uPass']); else $options[$ii]['uPass'] = '';  \r
+        if (isset($pval['list']))          $options[$ii]['list'] = trim($pval['list']);\r
+                \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+        \r
+        if (isset($pval['msgFrmt'])) $options[$ii]['msgFrmt'] = trim($pval['msgFrmt']);        \r
+        if (isset($pval['msgTFrmt'])) $options[$ii]['msgTFrmt'] = trim($pval['msgTFrmt']);        \r
+        \r
+        if (isset($pval['apDoKT']))      $options[$ii]['doKT'] = $pval['apDoKT']; else $options[$ii]['doKT'] = 0; \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }  \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = $this->ntInfo['lcode']; $ntU = $this->ntInfo['code'];\r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snap'.$ntU, true));  \r
+        if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii])) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]);  if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = ''; \r
+        $doIT = $ntOpt['do'.$ntU] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse']; if (empty($ntOpt['urlToUse'])) $ntOpt['urlToUse'] = '';  $urlToUse = $ntOpt['urlToUse'];\r
+        $isAvail = $ntOpt['uPass']!='' && $ntOpt['uName']!=''; $msgFormat = htmlentities($ntOpt['msgFrmt'], ENT_COMPAT, "UTF-8"); $msgFormatT = htmlentities($ntOpt['msgTFrmt'], ENT_COMPAT, "UTF-8"); \r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2"> \r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvail) { ?> <input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][do<?php echo $ntU; ?>]" value="<?php echo ($post->post_status == "publish")?$doIT:'0';?>">\r
+        <input class="nxsGrpDoChb" value="1" id="do<?php echo $ntU.$ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][do<?php echo $ntU; ?>]" <?php if ((int)$doIT == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php } ?>\r
+      \r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>16.png);"><?php echo $this->ntInfo['name']; ?> - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvail) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostTo<?php echo $ntU; ?>_repostButton" id="rePostTo<?php echo $ntU; ?>_button" value="<?php _e('Repost to '.$this->ntInfo['name'], 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php  } ?>\r
+                    \r
+                    <?php  if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) { \r
+                        \r
+                        ?> <span id="pstd<?php echo $ntU; ?><?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+                      <a style="font-size: 10px;" href="<?php echo $pMeta[$ii]['postURL']; ?>" target="_blank"><?php $nType=$this->ntInfo['name']; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>                \r
+                \r
+                <?php if (!$isAvail) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your <?php echo $this->ntInfo['name']; ?> Account to AutoPost to <?php echo $this->ntInfo['name']; ?></b></td></tr>\r
+                <?php }  else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>ap" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> /> \r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+                </td></tr> <?php } ?>\r
+     \r
+     <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Title Format:', 'NS_SPAP') ?></th>\r
+                  <td><input value="<?php echo $msgFormatT; ?>" type="text" name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgTFrmt]" style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('msgFrmtT<?php echo $nt.$ii; ?>');"/><?php nxs_doShowHint("msgFrmtT".$nt.$ii, '', '58'); ?></td></tr>\r
+     \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top;  padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th><td>                \r
+                \r
+                <textarea cols="150" rows="1" id="<?php echo $nt.$ii; ?>msgFrmt" name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgFrmt]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#<?php echo $nt.$ii; ?>msgFrmt').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('msgFrmt<?php echo $nt.$ii; ?>');"><?php echo $msgFormat ?></textarea> <?php nxs_doShowHint("msgFrmt".$nt.$ii, '', '58'); ?>\r
+                \r
+                </td></tr>                \r
+                \r
+                 <?php /* ## Select Image & URL ## */ nxs_showImgToUseDlg($nt, $ii, $imgToUse);  nxs_showURLToUseDlg($nt, $ii, $urlToUse); ?>\r
+       <?php } \r
+\r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = '';\r
+     if (isset($pMeta['msgFrmt'])) $optMt['msgFrmt'] = $pMeta['msgFrmt'];  if (isset($pMeta['msgTFrmt'])) $optMt['msgTFrmt'] = $pMeta['msgTFrmt'];    \r
+     if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];      \r
+     if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+     if (isset($pMeta['doKT'])) $optMt['doKT'] = $pMeta['doKT'] == 1?1:0; else { if (isset($pMeta['SNAPformat']))  $optMt['doKT'] = 0; } \r
+     if (isset($pMeta['SNAPincludeKT']) && $pMeta['SNAPincludeKT'] == '1' ) $optMt['doKT'] = 1;  \r
+     return $optMt;\r
+  }  \r
+}}\r
+if (!function_exists("nxs_rePostToKT_ajax")) {\r
+  function nxs_rePostToKT_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; $options = get_option('NS_SNAutoPoster');  \r
+    foreach ($options['kt'] as $ii=>$two) if ($ii==$_POST['nid']) {   $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['gpPageID'].$two['gpUName']==$_POST['nid']) {  \r
+      $gppo =  get_post_meta($postID, 'snapKT', true); $gppo =  maybe_unserialize($gppo);// prr($gppo);\r
+      if (is_array($gppo) && isset($gppo[$ii]) && is_array($gppo[$ii])){   $ntClInst = new nxs_snapClassKT(); $two = $ntClInst->adjMetaOpt($two, $gppo[$ii]); }\r
+      $result = nxs_doPublishToKT($postID, $two); if ($result == 200) die("Successfully sent your post to Kippt."); else die($result);        \r
+    }    \r
+  }\r
+}  \r
+\r
+if (!function_exists("nxs_doPublishToKT")) { //## Second Function to Post to KT\r
+  function nxs_doPublishToKT($postID, $options){ global $nxs_ktCkArray; $ntCd = 'KT'; $ntCdL = 'kt'; $ntNm = 'Kippt'; if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+  //  if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToDI',  array($postID, $options));  \r
+    $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));   \r
+    $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url();  \r
+    $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+    $logNT = '<span style="color:#000080">Kippt</span> - '.$options['nName'];      \r
+    $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+    if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+      $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') { sleep(5);\r
+         nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'); return;\r
+      }\r
+    }     \r
+    if ($postID=='0') { echo "Testing ... <br/><br/>"; $link = home_url();  $options['msgFormat'] = 'Test Message from '.$link;   } else {  \r
+      $post = get_post($postID); if(!$post) return; $link = get_permalink($postID);\r
+      $options['msgFrmt'] = nsFormatMessage($options['msgFrmt'], $postID, $addParams); $options['msgTFrmt'] = nsFormatMessage($options['msgTFrmt'], $postID, $addParams); \r
+      nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1')); \r
+    } \r
+    $extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?$post->post_title:'');\r
+    //## Create and Format message\r
+    $t = wp_get_post_tags($postID); $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = (implode(',',$tggs)); $tags = str_replace(' ','+',$tags);    \r
+    $message = array('url'=>$link, 'surl'=>$link, 'siteName'=>$blogTitle, 'tags'=>$tags);    \r
+    //## Actual Post\r
+    $ntToPost = new nxs_class_SNAP_KT(); $ret = $ntToPost->doPostToNT($options, $message);\r
+    //## Process Results\r
+    if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+       if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+    } else {  // ## All Good - log it.\r
+      if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+        else  {nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'postURL'=>$ret['postURL'], 'pDate'=>date('Y-m-d H:i:s')));  \r
+         nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); \r
+        }\r
+    }\r
+    //## Return Result\r
+    if ($ret['isPosted']=='1') return 200; else return print_r($ret, true); \r
+  }\r
+}  \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/li.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/li.api.php
new file mode 100644 (file)
index 0000000..4f5b11c
--- /dev/null
@@ -0,0 +1,97 @@
+<?php    \r
+//########################################\r
+//##    LI API V1/V2 Combined Edition\r
+//########################################\r
+$nxs_snapAPINts[] = array('code'=>'LI', 'lcode'=>'li', 'name'=>'LinkedIn');\r
+\r
+if (!class_exists("nxs_class_SNAP_LI")) { class nxs_class_SNAP_LI {\r
+    \r
+    var $ntCode = 'LI';\r
+    var $ntLCode = 'li';     \r
+    \r
+    function postShare($tkn, $msg, $title='', $url='', $imgURL='', $dsc='') { $nURL = 'https://api.linkedin.com/v1/people/~/shares?format=json&oauth2_access_token='.$tkn;  \r
+      $dsc =  nxs_decodeEntitiesFull(strip_tags($dsc));  $msg = strip_tags(nxs_decodeEntitiesFull($msg));  $title =  nxs_decodeEntitiesFull(strip_tags($title));\r
+      $xml = '<?xml version="1.0" encoding="UTF-8"?><share><comment>'.htmlspecialchars($msg, ENT_NOQUOTES, "UTF-8").'</comment>'.\r
+      ($url!=''?'<content><title>'.htmlspecialchars($title, ENT_NOQUOTES, "UTF-8").'</title><submitted-url>'.$url.'</submitted-url>'.(!empty($imgURL)?'<submitted-image-url>'.$imgURL.'</submitted-image-url>':'').'<description>'.htmlspecialchars($dsc, ENT_NOQUOTES, "UTF-8").'</description></content>':'').\r
+        '<visibility><code>anyone</code></visibility></share>'; $hdrsArr = array();  $hdrsArr['Content-Type']='application/xml';   //   prr($xml);\r
+      $wprg = array( 'method' => 'POST', 'headers' => $hdrsArr, 'httpversion' => '1.1', 'timeout' => 45, 'redirection' => 0, 'body' => $xml);  $wprg['sslverify'] = false;      \r
+      $response  = wp_remote_post($nURL, $wprg); if (is_wp_error($response) || empty($response['body'])) return "ERROR: ".print_r($response, true);      \r
+      $post = json_decode($response['body'], true); return $post; \r
+    }\r
+  \r
+    function postToGroup($tkn, $msg, $title, $groupID, $url='', $imgURL='', $dsc='') { $nURL = 'https://api.linkedin.com/v1/groups/'.$groupID.'/posts?oauth2_access_token='.$tkn; \r
+      $dsc =  nxs_decodeEntitiesFull(strip_tags($dsc));  $msg = strip_tags(nxs_decodeEntitiesFull($msg));  $title =  nxs_decodeEntitiesFull(strip_tags($title));\r
+      $xml = '<?xml version="1.0" encoding="UTF-8"?><post><title>'.htmlspecialchars($title, ENT_NOQUOTES, "UTF-8").'</title>'."\n".'<summary>'.htmlspecialchars($msg, ENT_NOQUOTES, "UTF-8").'</summary>'."\n".'\r
+        '.($url!=''?'<content><title>'.htmlspecialchars($title, ENT_NOQUOTES, "UTF-8").'</title>'."\n".'<submitted-url>'.$url.'</submitted-url>'."\n".(!empty($imgURL)?'<submitted-image-url>'.$imgURL.'</submitted-image-url>':'')."\n".'<description>'.htmlspecialchars($dsc, ENT_NOQUOTES, "UTF-8").'</description><category>discussion</category></content><category>discussion</category>':'').'</post>'; $hdrsArr = array();  $hdrsArr['Content-Type']='application/xml';      \r
+      $wprg = array( 'method' => 'POST', 'headers' => $hdrsArr, 'httpversion' => '1.1', 'timeout' => 45, 'redirection' => 0, 'body' => $xml);  $wprg['sslverify'] = false;      \r
+      $response  = wp_remote_post($nURL, $wprg);if (is_wp_error($response) || $response['response']['code']!='201') return "ERROR: ".print_r($response, true);      \r
+      return array('updateUrl'=>'https://www.linkedin.com/groups?home=&gid='.$groupID);\r
+    }\r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array();\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }        \r
+    function doPostToNT($options, $message){ $badOut = array('postID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>''); $liPostID = '';\r
+\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if ((!isset($options['ulName']) || trim($options['uPass'])=='') && (empty($options['liOAuthVerifier'])))  { $badOut['Error'] = 'Not Configured'; return $badOut; }                  \r
+      if (empty($options['imgSize'])) $options['imgSize'] = ''; if (empty($options['liMsgFormatT'])) $options['liMsgFormatT'] = '%TITLE%'; \r
+      //## Format\r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['liMsgFormat'], $message); \r
+      if (!empty($message['pTitle'])) $msgT = $message['pTitle']; else $msgT = nxs_doFormatMsg($options['liMsgFormatT'], $message);         \r
+      if(empty($options['postType'])) { if ((int)$options['liAttch'] == 1 || $isNew) $options['postType'] = 'A';}\r
+      if ( $options['postType'] == 'A' || $options['postType'] == 'I') { \r
+        if (isset($message['imageURL'])) $imgURL = trim(nxs_getImgfrOpt($message['imageURL'], $options['imgSize'])); else $imgURL = '';  if (preg_match("/noImg.\.png/i", $imgURL)) $imgURL = '';           \r
+        if (!empty($message['urlDescr'])) $dsc = $message['urlDescr']; else $dsc = $msg;          \r
+        $dsc = strip_tags($dsc); $dsc = nxs_decodeEntitiesFull($dsc); $dsc = nxs_html_to_utf8($dsc);  $dsc = nsTrnc($dsc, 300);        \r
+      }        \r
+      $msg  = strip_tags($msg); $msg = nxs_html_to_utf8($msg);  $msgT = nxs_html_to_utf8($msgT); $urlToGo = $message['url'];\r
+    \r
+      if (function_exists("doConnectToLinkedIn") && $options['ulName']!='' && $options['uPass']!='') {\r
+        $dusername = $options['ulName']; $pass = (substr($options['uPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['uPass'], 5)):$options['uPass']); // ??? Do we need that??????\r
+        $auth = doConnectToLinkedIn($options['ulName'], $options['uPass'], $options['ii']); if ($auth!=false) { $badOut['Error'] .= "|Auth Error - ".$auth;  return $badOut; }\r
+        $to = $options['uPage']!=''?$options['uPage']:'https://www.linkedin.com/home'; $lnk = array(); $msg = str_ireplace('&nbsp;',' ',$msg);  $msg = nsTrnc(strip_tags($msg), 700);\r
+        if ($options['postType'] == 'A'){ $lnk['title']=$message['urlTitle']; $lnk['postTitle'] = $msgT; $lnk['desc'] =  $message['urlDescr']; $lnk['url'] = $urlToGo; $lnk['img'] = $imgURL; $lnk['postType'] = 'A';}\r
+        if ($options['postType'] == 'I'){ $lnk['title'] = ''; $lnk['postTitle'] = ''; $lnk['desc'] =  ''; $lnk['url'] = $imgURL; $lnk['img'] = $imgURL; $lnk['postType'] = 'I'; $lnk['postTitle'] = $msgT;}              \r
+        if ($options['postType'] == 'T'){ $lnk['postTitle'] = $msgT;  $lnk['postType'] = 'T'; }\r
+        global $nxs_gCookiesArr; $li = new nxsAPI_LI(); $li->debug = false; if (!empty($nxs_gCookiesArr)) $li->ck = $nxs_gCookiesArr; $ret = $li->post($msg, $lnk, $to); \r
+        if (is_array($ret) && !empty($ret['isPosted'])) return $ret; $liPostID = $options['uPage'];\r
+      } else {\r
+        if (!empty($options['isV2'])) { //## V2\r
+          if ($options['grpID']!=''){\r
+            try { if ($msgT == '') $msgT = ' '; \r
+              if( $options['postType'] == 'A') $ret = $this->postToGroup($options['liAccessToken'], $msg, $msgT, $options['grpID'], str_replace('&', '&amp;', $urlToGo), $imgURL, $dsc); \r
+                else $ret = $this->postToGroup($options['liAccessToken'], $msg, $msgT, $options['grpID']); \r
+              $liPostID= 'http://www.linkedin.com/groups?gid='.$options['grpID'];\r
+            } catch (Exception $o){ $ret="ERROR: ".print_r($o, true); }        \r
+          } else { //echo $msg ."|". nsTrnc($msgT, 200) ."|". $urlToGo ."|". $imgURL ."|". $dsc;\r
+            if($options['postType'] == 'A') $ret = $this->postShare($options['liAccessToken'], $msg, nsTrnc($msgT, 200), str_replace('&', '&amp;', $urlToGo), $imgURL, $dsc); \r
+              else $ret = $this->postShare($options['liAccessToken'], $msg);\r
+          }  \r
+        } else {  //## V1\r
+          require_once ('apis/liOAuth.php'); $linkedin = new nsx_LinkedIn($options['liAPIKey'], $options['liAPISec']);  $linkedin->oauth_verifier = $options['liOAuthVerifier'];\r
+          $linkedin->request_token = new nsx_trOAuthConsumer($options['liOAuthToken'], $options['liOAuthTokenSecret'], 1);     \r
+          $linkedin->access_token = new nsx_trOAuthConsumer($options['liAccessToken'], $options['liAccessTokenSecret'], 1);  \r
+          $msg = nsTrnc($msg, 700); //prr($urlToGo);  $urlToGo = urlencode($urlToGo);   prr($urlToGo); die();\r
+          if ($options['grpID']!=''){\r
+            try{ if ($msgT == '') $msgT = ' '; \r
+              if($options['postType'] == 'A') $ret = $linkedin->postToGroup($msg, $msgT, $options['grpID'], str_replace('&', '&amp;', $urlToGo), $imgURL, $dsc); \r
+                else $ret = $linkedin->postToGroup($msg, $msgT, $options['grpID']); \r
+              $liPostID= 'http://www.linkedin.com/groups?gid='.$options['grpID']; if ($ret=='201') $ret = array('updateUrl'=>$liPostID);\r
+            } catch (Exception $o){ $ret="ERROR: ".print_r($o, true); }        \r
+          } else { //echo $msg ."|". nsTrnc($msgT, 200) ."|". $urlToGo ."|". $imgURL ."|". $dsc;\r
+            try{ if($options['postType'] == 'A') $ret = $linkedin->postShare($msg, nsTrnc($msgT, 200), str_replace('&', '&amp;', $urlToGo), $imgURL, $dsc); else $ret = $linkedin->postShare($msg); } catch (Exception $o){ $ret="ERROR:".print_r($o, true); }             \r
+          }  \r
+        }        \r
+        if ($liPostID=='') $liPostID = $options['liUserInfo'];        \r
+      } // prr($ret);\r
+      if (!is_array($ret) && stripos($ret, '<update-url>')!==false) { $rurl = CutFromTo($ret,'<update-url>','</update-url>'); $ret = array('updateUrl'=>$rurl); }\r
+      if (is_array($ret) && !empty($ret['updateUrl'])) { if (stripos($ret['updateUrl'], 'topic=')!==false) $liPostID = CutFromTo($ret['updateUrl'], 'topic=','&'); else $liPostID = ''; \r
+        return array('isPosted'=>'1', 'postID'=>$liPostID, 'postURL'=>$ret['updateUrl'], 'pDate'=>date('Y-m-d H:i:s'));  \r
+      } else  { $badOut['Error'] .= print_r($ret, true); }\r
+      return $badOut;     \r
+   }    \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/li.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/li.php
new file mode 100644 (file)
index 0000000..5ad1a15
--- /dev/null
@@ -0,0 +1,452 @@
+<?php    \r
+\r
+if (isset($_GET['pg']) && $_GET['pg']=='nxs' && isset($_GET['ca']) && $_GET['ca']!='') { $ch = curl_init();  curl_setopt($ch, CURLOPT_URL, 'https://www.google.com/recaptcha/api/image?c='.$_GET['ca']); \r
+  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_REFERER, 'https://www.google.com/'); global $nxs_skipSSLCheck; if ($nxs_skipSSLCheck===true) curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\r
+  $imageData = curl_exec($ch);  if ($imageData  === false) { echo 'Curl error: ' . curl_error($ch); die(); }\r
+  header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); \r
+  header("Cache-Control: private",false); header("Content-Type: image/jpg"); header("Content-Transfer-Encoding: binary"); echo $imageData; die();\r
+}\r
+\r
+if (function_exists("add_action")) add_action('wp_ajax_nxsCptCheck' , 'nxsCptCheck_ajax'); \r
+\r
+if (!function_exists("nxsCptCheck_ajax")) { function nxsCptCheck_ajax() { global $nxs_gCookiesArr; $advSettings = array();\r
+  if (!empty($_POST['c'])) { $seForDB = get_option('nxs_li_ctp_save'); $ser = maybe_unserialize($seForDB); $nxs_gCookiesArr = $ser['c']; $ck = $nxs_gCookiesArr; $flds = $ser['f']; \r
+    $flds['recaptcha_response_field'] = $_POST['c']; $liObj = new nxsAPI_LI();   $hdrsArr = $liObj->headers('https://www.linkedin.com/uas/login-submit', 'https://www.linkedin.com', 'POST', false);\r
+    $advSet = array('headers' => $hdrsArr, 'httpversion' => '1.1', 'timeout' => 45, 'redirection' => 0, 'cookies' => $ck, 'body' => $flds); // prr($advSet);\r
+    $rep = nxs_remote_post('https://www.linkedin.com/uas/captcha-submit', $advSet); if (is_nxs_error($rep)) {  $badOut = print_r($rep, true)." - ERROR"; return $badOut; }  $contents2 = $rep['body']; \r
+    if (stripos($contents2, '<span class="error">')!==false) { echo strip_tags(CutFromTo($contents2, '<span class="error">', '</span>')); die(); }    \r
+    if (stripos($contents2, '<div id="global-error">')!==false) { echo CutFromTo($contents2, '<div role="alert" class="alert error">', '</div>'); die(); }    \r
+    if (stripos($contents2, 'The email address or password you provided does not match our records')!==false) { echo "Invalid Login/Password"; die(); }\r
+    if (stripos($contents2, 'Hmm, ')!==false) { echo "Invalid Login/Password"; die(); }    \r
+    if ($rep['response']['code']=='302' && !empty($rep['headers']['location']) &&  stripos($rep['headers']['location'], 'linkedin.com/uas/captcha-submit')!==false) echo "Wrong Captcha. Please try Again";\r
+    if ($rep['response']['code']=='302' && !empty($rep['headers']['location']) &&  (stripos($rep['headers']['location'], 'linkedin.com/nhome')!==false || stripos($rep['headers']['location'], 'linkedin.com/home')!==false)) { echo "OK. You are In";    \r
+      $hdrsArr = $liObj->headers('http://www.linkedin.com/home', 'https://www.linkedin.com');  $ck = $rep['cookies'];    \r
+      $advSet = array('headers' => $hdrsArr, 'httpversion' => '1.1', 'timeout' => 45, 'redirection' => 0, 'cookies' => $ck); // prr($advSet);\r
+      $rep = nxs_remote_get('http://www.linkedin.com/profile/edit?trk=tab_pro', $advSet); if (is_nxs_error($rep)) {  $badOut = print_r($rep, true)." - ERROR"; return $badOut; }  $ck = $rep['cookies'];   \r
+      if ($_POST['i']!='') { global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+          $options['li'][$_POST['i']]['ck'] = $ck; if (is_array($options)) update_option('NS_SNAutoPoster', $options);\r
+      }\r
+    }\r
+  } \r
+  if (!empty($_POST['s'])) { $seForDB = get_option('nxs_li_ctp_save'); $ser = maybe_unserialize($seForDB); $ck = $ser['c']; $flds = $ser['f']; \r
+    $flds['PinVerificationForm_pinParam'] = $_POST['s']; $liObj = new nxsAPI_LI();   $hdrsArr = $liObj->headers('https://www.linkedin.com/uas/login-submit', 'https://www.linkedin.com', 'POST', true);\r
+    $advSet = array('headers' => $hdrsArr, 'httpversion' => '1.1', 'timeout' => 45, 'redirection' => 0, 'cookies' => $ck, 'body' => $flds); // prr($advSet);\r
+    $rep=nxs_remote_post('https://www.linkedin.com/uas/ato-pin-challenge-submit',$advSet); if (is_nxs_error($rep)) {$badOut = print_r($rep, true)." - ERROR"; return $badOut; } $contents2 = $rep['body']; // prr($rep);\r
+    \r
+    if (stripos($contents2, 'The email address or password you provided does not match our records')!==false) { echo "Invalid Login/Password"; die(); }\r
+    if (stripos($contents2, '<div id="global-error">')!==false) { echo CutFromTo($contents2, '<div role="alert" class="alert error">', '</div>'); die(); }    \r
+    if (stripos($contents2, 'Hmm, ')!==false) { echo "Invalid Login/Password"; die(); }        \r
+    if ($rep['response']['code']=='302' && !empty($rep['headers']['location']) &&  stripos($rep['headers']['location'], 'linkedin.com/uas/ato-pin-challenge-submit')!==false) echo "Wrong Code. Please try Again";\r
+    if ($rep['response']['code']=='302' && !empty($rep['headers']['location']) &&  (stripos($rep['headers']['location'], 'linkedin.com/nhome')!==false || stripos($rep['headers']['location'], 'linkedin.com/home')!==false)) echo "OK. You are In";    \r
+    \r
+    $hdrsArr = $liObj->headers('http://www.linkedin.com/home', 'https://www.linkedin.com');  $ck = $rep['cookies'];    \r
+    $advSet = array('headers' => $hdrsArr, 'httpversion' => '1.1', 'timeout' => 45, 'redirection' => 0, 'cookies' => $ck); // prr($advSet);\r
+    $rep = nxs_remote_get('http://www.linkedin.com/profile/edit?trk=tab_pro', $advSet); if (is_nxs_error($rep)) {  $badOut = print_r($rep, true)." - ERROR"; return $badOut; }  $ck = $rep['cookies'];   \r
+    if ($_POST['i']!='') { global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+          $options['li'][$_POST['i']]['ck'] = $ck; if (is_array($options)) update_option('NS_SNAutoPoster', $options);\r
+    }       \r
+  } die();     \r
+}}  \r
+\r
+//## NextScripts Facebook Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'LI', 'lcode'=>'li', 'name'=>'LinkedIn');\r
+\r
+if (!function_exists("nxs_ntp_time")) { function nxs_ntp_time($host='time.nist.gov') { $sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); socket_connect($sock, $host, 123);   \r
+  $msg = "\010" . str_repeat("\0", 47); socket_send($sock, $msg, strlen($msg), 0); socket_recv($sock, $recv, 48, MSG_WAITALL); socket_close($sock);\r
+  $data = unpack('N12', $recv); $timestamp = sprintf('%u', $data[9]); $timestamp -= 2208988800;  return $timestamp;\r
+}}\r
+\r
+if (!class_exists("nxs_snapClassLI")) { class nxs_snapClassLI { var $ntInfo = array('code'=>'LI', 'lcode'=>'li', 'name'=>'LinkedIn', 'defNName'=>'ulName', 'tstReq' => true);\r
+  //#### Show Common Settings  \r
+  function showGenNTSettings($ntOpts){ global $nxs_snapSetPgURL, $nxs_plurl, $nxs_gOptions;  $ntInfo = $this->ntInfo; \r
+    // V2 Auth\r
+    if ( isset($_GET['code']) && $_GET['code']!='' && isset($_GET['state']) && substr($_GET['state'], 0, 7) == 'nxs-li-'){  $at = $_GET['code'];  $ii = str_replace('nxs-li-','',$_GET['state']);\r
+      echo "----=={ oAuth 2.0 Wordflow }==----<br/>-= This is normal technical authorization info that will dissapear (Unless you get some errors) =- <br/><br/><br/>"; \r
+      $gGet = $_GET; unset($gGet['code']); unset($gGet['state']); unset($gGet['post_type']); $sturl = explode('?',$nxs_snapSetPgURL); $nxs_snapSetPgURL = $sturl[0].((!empty($gGet))?'?'.http_build_query($gGet):''); \r
+      \r
+      $nto = $ntOpts[$ii]; $wprg = array();  $wprg['sslverify'] = false;\r
+      if (isset($nto['liAPIKey'])){ echo "-="; prr($nto);// die();\r
+        $tknURL = 'https://www.linkedin.com/uas/oauth2/accessToken?grant_type=authorization_code&code='.$at.'&redirect_uri='.urlencode($nxs_snapSetPgURL).'&client_id='.$nto['liAPIKey'].'&client_secret='.$nto['liAPISec']; \r
+        $response  = wp_remote_post($tknURL, $wprg); prr($tknURL);      \r
+        if((is_object($response)&&(isset($response->errors)))){ prr($response); die(); }\r
+        if (is_array($response)&& stripos($response['body'],'"error":')!==false){ prr($response['body']); prr(json_decode($response['body'],true)); die(); }\r
+        $resp = json_decode($response['body'], true); prr($resp); if (!is_array($resp) || empty($resp['access_token'])) { prr($resp); die(); }\r
+        if (function_exists('get_option')) $currTime = time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); else  $currTime = time();\r
+        $nto['liAccessToken'] = $resp['access_token']; $nto['liAccessTokenSecret'] = 'No Need for oAuth V2'; $nto['liOAuthVerifier'] = 'No Need for oAuth V2';\r
+        $nto['liAccessTokenExp'] = $currTime + $resp['expires_in'];    echo "<br/>----=={ Expires: ".date('Y-m-d H:i:s', $nto['liAccessTokenExp'])." }==---- <br/>";\r
+        $tknURL = 'https://api.linkedin.com/v1/people/~:(id,first-name,last-name)?format=json&oauth2_access_token='.$nto['liAccessToken'];\r
+        $response  = wp_remote_get($tknURL, $wprg); prr($tknURL); prr($response);  $user = json_decode($response['body'], true);\r
+       \r
+        if (!empty($user['id'])) { $nto['liUserID'] = $user['id'];  $nto['liUserInfo'] = $user['firstName'].$user['lastName'].(!empty($user['id'])?" (".$user['id'].")":'');  $nto['isV2'] = true;\r
+          if (function_exists('get_option')) $nxs_gOptions = get_option('NS_SNAutoPoster'); if(!empty($nxs_gOptions)) { $nxs_gOptions['li'][$ii] = $nto; prr($nto); nxs_settings_save($nxs_gOptions); }\r
+          ?><script type="text/javascript">window.location = "<?php echo $nxs_snapSetPgURL; ?>"</script>      \r
+        <?php }        \r
+      }\r
+      die();\r
+    }\r
+    // V1 Auth\r
+    if ( isset($_GET['auth']) && $_GET['auth']=='li'){ require_once('apis/liOAuth.php'); $options = $ntOpts[$_GET['acc']];\r
+              \r
+              $api_key = $options['liAPIKey']; $api_secret = $options['liAPISec'];\r
+              $callback_url = $nxs_snapSetPgURL."&auth=lia&acc=".$_GET['acc'];\r
+              $li_oauth = new nsx_LinkedIn($api_key, $api_secret, $callback_url); \r
+              $request_token = $li_oauth->getRequestToken(); //echo "####"; prr($request_token); die();\r
+              if (!is_object($request_token)) { echo "### LinkedIn Authorization Error:"; prr($request_token);\r
+                if (is_string($request_token) && stripos($request_token, 'timestamp')!==false) { echo "Your Server Time: ".date('m/d/Y h:i:s a'); echo " Correct Time: ".date('m/d/Y h:i:s a', nxs_ntp_time('t1.timegps.net')); } die();\r
+              }\r
+              $options['liOAuthToken'] = $request_token->key;\r
+              $options['liOAuthTokenSecret'] = $request_token->secret; // prr($li_oauth);\r
+              switch ($li_oauth->http_code) { case 200: $url = $li_oauth->generateAuthorizeUrl();   \r
+                $optionsG = get_option('NS_SNAutoPoster'); $optionsG['li'][$_GET['acc']] = $options;  update_option('NS_SNAutoPoster', $optionsG);\r
+                echo '<script type="text/javascript">window.location = "'.$url.'"</script>'; break; \r
+                default: echo '<br/><b style="color:red">Could not connect to LinkedIn. Refresh the page or try again later.</b>'; die();\r
+              }die();\r
+            }\r
+    if ( isset($_GET['auth']) && $_GET['auth']=='lia'){ require_once('apis/liOAuth.php');  $options = $ntOpts[$_GET['acc']]; $api_key = $options['liAPIKey']; $api_secret = $options['liAPISec'];\r
+              $li_oauth = new nsx_LinkedIn($api_key, $api_secret); $li_oauth->request_token = new nsx_trOAuthConsumer($options['liOAuthToken'], $options['liOAuthTokenSecret'], 1);              \r
+              $li_oauth->oauth_verifier = $_REQUEST['oauth_verifier'];  $li_oauth->getAccessToken($_REQUEST['oauth_verifier']); $options['liOAuthVerifier'] = $_REQUEST['oauth_verifier'];\r
+              $options['liAccessToken'] = $li_oauth->access_token->key; $options['liAccessTokenSecret'] = $li_oauth->access_token->secret;                            \r
+              try{$xml_response = $li_oauth->getProfile("~:(id,first-name,last-name)");} catch (Exception $o){prr($o); die("<span style='color:red;'>ERROR: Authorization Error</span>");}\r
+              if (stripos($xml_response,'<first-name>')!==false) $userinfo =  CutFromTo($xml_response, '<id>','</id>')." - ".CutFromTo($xml_response, '<first-name>','</first-name>')." ".CutFromTo($xml_response, '<last-name>','</last-name>'); else $userinfo='';              \r
+              if ($userinfo!='') {  $options['liUserInfo'] = $userinfo; $optionsG = get_option('NS_SNAutoPoster'); $optionsG['li'][$_GET['acc']] = $options;  update_option('NS_SNAutoPoster', $optionsG); \r
+                  echo '<script type="text/javascript">window.location = "'.$nxs_snapSetPgURL.'"</script>'; die();\r
+              } prr($xml_response); die("<span style='color:red;'>ERROR: Something is Wrong with your LinkedIn account</span>");\r
+            }     \r
+    \r
+    ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = !empty($pbo[$ntInfo['defNName']])?$pbo[$ntInfo['defNName']]:'LinkedIn'; \r
+          if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['liAccessToken']) && $pbo['liAccessTokenSecret']!='')?'1':'';\r
+        ?>\r
+          <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />\r
+           <?php } ?>\r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?> <?php if (!empty($pbo['grpID'])){ ?><b style="color: #800000"><?php  _e('Attention requred. Groups are no longer supported by LinkedIn Native API', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?> <a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;\r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($bo){ $po = array('nName'=>'', 'ulName'=>'', 'uPass'=>'', 'grpID'=>'', 'uPage'=>'', 'doLI'=>'1', 'liAPIKey'=>'', 'liAPISec'=>'', 'liUserInfo'=>'', 'liOAuthToken'=>'', 'liMsgFormat'=>'New post has been published on %SITENAME%', 'liMsgFormatT'=>'New post - %TITLE%' ); $po['ntInfo']= array('lcode'=>'li'); $this->showNTSettings($bo, $po, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl,$nxs_snapSetPgURL;  $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['liOK'])) $options['liOK'] = ''; \r
+  \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['liMsgAFrmt'])) $options['liMsgAFrmt'] = ''; \r
+    if (empty($options['apiToUse'])) { if (!empty($options['liAPIKey'])) $options['apiToUse'] = 'li'; if (!empty($options['ulName']) && !empty($options['uPass'])) $options['apiToUse'] = 'nx'; } ?>\r
+    <div id="doLI<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">   <input type="hidden" name="apDoSLI<?php echo $ii; ?>" value="0" id="apDoSLI<?php echo $ii; ?>" />                                     \r
+    <?php if ($isNew) { ?> <input type="hidden" name="li[<?php echo $ii; ?>][apDoLI]" value="1" id="apDoNewLI<?php echo $ii; ?>" /> <?php } ?>\r
+            <div id="doLI<?php echo $ii; ?>Div" style="margin-left: 10px;"> \r
+            \r
+            <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/li16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/setup-installation-linkedin-social-networks-auto-poster-wordpress/"><?php $nType="LinkedIn"; printf( __( 'Detailed %s Installation/Configuration Instructions' , 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?></a></div>\r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="li[<?php echo $ii; ?>][nName]" id="linName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel('li', $ii, $options['qTLng']); ?>\r
+            \r
+            <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+    \r
+    <div style="display: <?php echo (empty($options['apiToUse']))?"block":"none"; ?>;">\r
+    \r
+    <div style="width:100%; text-align: center; color:#005800; font-weight: bold; font-size: 14px;">You can choose what API you would like to use. </div>      \r
+    \r
+    <span style="color:#005800; font-weight: bold; font-size: 14px;">LinkedIn Native API:</span> Free built-in API from LinkedIn. Can be used for posting to your profile. More secure, more stable. More complicated - requires LinkedIn App and authorization. <br/><br/>\r
+    \r
+    <span style="color:#005800; font-weight: bold; font-size: 14px;">NextScripts API for LinkedIn:</span> Premium API with extended functionality. Can be used for posting to your profile, <b>group page</b> or <b>company page</b>. Easier to configure, but less secure - requires your password.<br/><br/>\r
+    \r
+    <select name="li[<?php echo $ii; ?>][apiToUse]" onchange="if (jQuery(this).val()=='li') { jQuery('.nxs_li_nxapi_<?php echo $ii; ?>').hide(); jQuery('.nxs_li_liapi_<?php echo $ii; ?>').show(); }else { jQuery('.nxs_li_liapi_<?php echo $ii; ?>').hide(); jQuery('.nxs_li_nxapi_<?php echo $ii; ?>').show(); }"><option <?php echo (empty($options['apiToUse']) || $options['apiToUse'] =='li')?"selected":""; ?> value="li">LinkedIn API</option><option <?php echo (!empty($options['apiToUse']) && $options['apiToUse'] =='nx')?"selected":""; ?> value="nx">NextScripts API</option></select><hr/>\r
+    \r
+    </div>\r
+    \r
+    <div id="nxsAPILI<?php echo $ii; ?>" class="nxs_li_liapi_<?php echo $ii; ?>" style="display: <?php echo (empty($options['apiToUse']) || $options['apiToUse'] =='li')?"block":"none"; ?>;"><h3>LinkedIn API</h3>\r
+    \r
+            <div class="subDiv" id="sub<?php echo $ii; ?>DivL" style="display: block;">\r
+            \r
+            <?php if (!empty($options['grpID'])) { ?> <span style="color: red;">LinkedIn has <a style="color: red;" target="_blank" href="https://developer.linkedin.com/support/developer-program-transition">discontinued support for groups</a> from it's free native API. This account should be removed or switched to NextScripts API</span> <br/>\r
+            <br/><a onclick="jQuery('#nxsAPILI<?php echo $ii; ?>').hide(); jQuery('#nxsAPINX<?php echo $ii; ?>').show();  jQuery('#liuPage<?php echo $ii; ?>').val('https://www.linkedin.com/groups/?gid=<?php echo $options['grpID']; ?>'); jQuery('#sub<?php echo $ii; ?>DivL').append('<input type=hidden name=li[<?php echo $ii; ?>][apiToUse] value=nx />'); return false;" style="font-size: 16px;" href="#">&gt;&gt;&gt;&nbsp;Switch to NextScripts API Now&nbsp;&lt;&lt;&lt;</a><br/><br/></hr>\r
+            \r
+            <?php } ?>\r
+            \r
+            <div style="width:100%;"><strong>LinkedIn Client ID:</strong> </div><input name="li[<?php echo $ii; ?>][apLIAPIKey]" id="apLIAPIKey" style="width: 70%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['liAPIKey'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />             \r
+            <div style="width:100%;"><strong>LinkedIn Client Secret:</strong> </div><input name="li[<?php echo $ii; ?>][apLIAPISec]" id="apLIAPISec" style="width: 70%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['liAPISec'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+            <br/>\r
+             <?php \r
+            if($options['liAPIKey']=='') { ?>\r
+            <b>Authorize Your LinkedIn Account</b>. Please save your settings and come back here to Authorize your account.\r
+            <?php } else { if(isset($options['liAccessToken']) && isset($options['liAccessTokenSecret']) && $options['liAccessTokenSecret']!=='') { ?>\r
+            Your LinkedIn Account has been authorized. <br/>User ID: <?php _e(apply_filters('format_to_edit', $options['liUserInfo']), 'social-networks-auto-poster-facebook-twitter-g') ?>. \r
+            <br/>You can Re- <?php } ?>                              \r
+            \r
+            <?php if (class_exists("cl_nxsAutoPostToSN")) { ?><a  href="https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=<?php echo trim($options['liAPIKey']);?>&scope=r_basicprofile+r_emailaddress+w_share&state=<?php echo 'nxs-li-'.$ii; ?>&redirect_uri=<?php echo trim(urlencode($nxs_snapSetPgURL));?>">Authorize Your LinkedIn Account</a>            \r
+            <?php } else { ?><a  href="<?php echo $nxs_snapSetPgURL; ?>&auth=li&acc=<?php echo $ii; ?>">Authorize Your LinkedIn Account</a> <?php }  ?>\r
+            \r
+            <?php if (!isset($options['liAccessTokenSecret']) || $options['liAccessTokenSecret']=='') { ?> <div class="blnkg">&lt;=== Authorize your account ===</div> <?php } ?>\r
+            \r
+            <?php } ?>\r
+            </div>\r
+             </div>\r
+           <div id="nxsAPINX<?php echo $ii; ?>" class="nxs_li_nxapi_<?php echo $ii; ?>" style="display: <?php echo (!empty($options['apiToUse']) && $options['apiToUse'] =='nx')?"block":"none"; ?>;"><h3>NextScripts API</h3>\r
+                        \r
+ <?php if (function_exists("doConnectToLinkedIn")) { ?>\r
+                 \r
+        <div class="subDiv" id="sub<?php echo $ii; ?>DivN" style="display: block;">  \r
+          <div style="width:100%;"><strong>Your LinkedIn Page URL:</strong> Could be your company page or group page. Leave empty to post to your own profile.</div><input name="li[<?php echo $ii; ?>][uPage]" id="liuPage<?php echo $ii; ?>" style="width: 90%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['uPage'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+          <br/>\r
+          <div style="width:100%;"><strong>Your LinkedIn Username/Email:</strong> </div><input name="li[<?php echo $ii; ?>][ulName]" id="liulName" style="width: 70%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['ulName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /> \r
+          <div style="width:100%;"><strong>Your LinkedIn Password:</strong> </div><input type="password" name="li[<?php echo $ii; ?>][uPass]" id="liuPass" style="width: 75%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['uPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+          \r
+            </div>          \r
+            <?php } else { nxs_show_noLibWrn('NextScripts API Library for LinkedIn module NOT found'); } ?>           \r
+        </div>\r
+          \r
+             <br/><hr/>   \r
+  \r
+            <div id="altFormat">\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Message text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> </div>\r
+              <textarea cols="150" rows="3" id="li<?php echo $ii; ?>SNAPformat" name="li[<?php echo $ii; ?>][apLIMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#li<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apLIMsgFrmt<?php echo $ii; ?>');"><?php _e(apply_filters('format_to_edit',htmlentities($options['liMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?></textarea>              \r
+              <?php nxs_doShowHint("apIPMsgFrmt".$ii); ?>              \r
+            </div>              \r
+            \r
+            <div style="width:100%;"><strong id="altFormatText">Post Type:</strong> </div>                      \r
+            <div style="margin-left: 10px;">\r
+        <?php if(empty($options['postType'])) {if ((int)$options['liAttch'] == 1 || $isNew) $options['postType'] = 'A';} ?>\r
+        <input type="radio" name="li[<?php echo $ii; ?>][postType]" value="T" <?php if ($options['postType'] == 'T') echo 'checked="checked"'; ?> /> <?php _e('Text Post', 'social-networks-auto-poster-facebook-twitter-g'); ?> - <i><?php _e('just text message', 'social-networks-auto-poster-facebook-twitter-g'); ?></i><br/>                    \r
+        <span class="nxs_li_nxapi_<?php echo $ii; ?>" style="display: <?php echo (!empty($options['apiToUse']) && $options['apiToUse'] =='nx')?"block":"none"; ?>;">\r
+        <input type="radio" name="li[<?php echo $ii; ?>][postType]" value="I" <?php if ($options['postType'] == 'I') echo 'checked="checked"'; ?> /> <?php _e('Image Post', 'social-networks-auto-poster-facebook-twitter-g'); ?> - <i><?php _e('big image with text message (Profiles and Company pages only)', 'social-networks-auto-poster-facebook-twitter-g'); ?></i><br/>  </span> \r
+        <input type="radio" name="li[<?php echo $ii; ?>][postType]" value="A" <?php if ( !isset($options['postType']) || $options['postType'] == '' || $options['postType'] == 'A') echo 'checked="checked"'; ?> /> <?php _e('Add blogpost to LinkedIn message as an attachment', 'social-networks-auto-poster-facebook-twitter-g'); ?><br/>\r
+        \r
+         <div style="margin-left: 10px;">            \r
+            <strong><?php _e('Attachment Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong><br/> \r
+      <input value="1"  id="apLIMsgAFrmtA<?php echo $ii; ?>" <?php if (trim($options['liMsgAFrmt'])=='') echo "checked"; ?> onchange="if (jQuery(this).is(':checked')) { jQuery('#apLIMsgAFrmtDiv<?php echo $ii; ?>').hide(); jQuery('#apLIMsgAFrmt<?php echo $ii; ?>').val(''); }else jQuery('#apLIMsgAFrmtDiv<?php echo $ii; ?>').show();" type="checkbox" name="li[<?php echo $ii; ?>][apLIMsgAFrmtA]"/> <strong><?php _e('Auto', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong>\r
+      <i> - <?php _e('Recommended. Info from SEO Plugins will be used, then post excerpt, then post text', 'social-networks-auto-poster-facebook-twitter-g'); ?> </i><br/>\r
+      <div id="apLIMsgAFrmtDiv<?php echo $ii; ?>" style="<?php if ($options['liMsgAFrmt']=='') echo "display:none;"; ?>" >&nbsp;&nbsp;&nbsp; <?php _e('Set your own format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:<input name="li[<?php echo $ii; ?>][apLIMsgAFrmt]" id="apLIMsgAFrmt<?php echo $ii; ?>" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['liMsgAFrmt'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/></div>\r
+            \r
+            </div>\r
+        \r
+   </div><br/>          \r
+            \r
+            <br/>\r
+            <div id="altFormat" style="display: <?php echo (!empty($options['apiToUse']) && $options['apiToUse'] =='nx')?"block":"none"; ?>;">\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Message title Format (Groups Only)', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> </div>\r
+              \r
+              <input name="li[<?php echo $ii; ?>][apLIMsgFrmtT]" id="li<?php echo $ii; ?>SNAPformatT" style="width: 50%;" value="<?php if ($isNew) echo "New Post - %TITLE%"; else _e(apply_filters('format_to_edit',htmlentities($options['liMsgFormatT'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?>" onfocus="mxs_showFrmtInfo('apLIMsgFrmtT<?php echo $ii; ?>');" /><?php nxs_doShowHint("apIPMsgFrmt".$ii); ?>\r
+                         \r
+            </div>              \r
+                        \r
+            <br/>    \r
+            \r
+            <?php if($options['liAPIKey']!='' || (isset($options['uPass']) && $options['uPass']!='')) { ?>\r
+            \r
+            <br/><b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('LI', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>\r
+            \r
+            <?php if (!isset($options['liOK']) || $options['liOK']=='') { ?> <div class="blnkg">&lt;=== Click "Test" to finish setup ===</div> <?php } ?>\r
+            \r
+              <br/><?php }?>\r
+              </div>\r
+              \r
+                <?php /* ######################## Advanced Tab ####################### */ ?>\r
+   <?php if (!$isNew) { ?>  <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+    <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); \r
+      nxs_showRepostSettings($nt, $ii, $options); ?>\r
+            \r
+            \r
+    </div>  <?php } ?> <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div>\r
+            \r
+            </div>\r
+        </div>\r
+        <?php\r
+      \r
+      \r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){  $code = $this->ntInfo['code'];\r
+    foreach ($post as $ii => $pval){ // prr($ii); prr($pval);\r
+      if ( (isset($pval['apLIAPIKey']) && $pval['apLIAPISec']!='') || (isset($pval['uPass']) && $pval['uPass']!='') ) { if (!isset($options[$ii])) $options[$ii] = array();  $options[$ii]['ii'] = $ii;        \r
+        if (isset($pval['apDoLI']))    $options[$ii]['doLI'] = $pval['apDoLI']; else $options[$ii]['doLI'] = 0;\r
+        if (isset($pval['nName']))     $options[$ii]['nName'] = trim($pval['nName']);\r
+        \r
+        if (isset($pval['apiToUse'])) $options[$ii]['apiToUse'] = trim($pval['apiToUse']);                                \r
+        \r
+        if (isset($options[$ii]['grpID']) && isset($pval['apiToUse']) && ($pval['apiToUse'])=='nx') unset($options[$ii]['grpID']); //## Switch/Upgrade\r
+        \r
+        if (isset($pval['apLIAPIKey']))$options[$ii]['liAPIKey'] = trim($pval['apLIAPIKey']);                                \r
+        if (isset($pval['apLIAPISec']))$options[$ii]['liAPISec'] = trim($pval['apLIAPISec']);                \r
+        if (isset($pval['postType']))     $options[$ii]['postType'] = trim($pval['postType']);      \r
+        \r
+        if (isset($pval['apiToUse']) && $pval['apiToUse']=='li' && ($options[$ii]['postType']=='I')) $options[$ii]['postType'] = 'T';\r
+        \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+        \r
+        if (isset($pval['ulName']))     $options[$ii]['ulName'] = trim($pval['ulName']);        \r
+        if (isset($pval['uPass']))     $options[$ii]['uPass'] = trim($pval['uPass']);        \r
+        if (isset($pval['grpID']))     $options[$ii]['grpID'] = trim($pval['grpID']);                \r
+        if (isset($pval['uPage']))     $options[$ii]['uPage'] = trim($pval['uPage']);                \r
+        if (isset($pval['apLIMsgFrmt'])) $options[$ii]['liMsgFormat'] = trim($pval['apLIMsgFrmt']); \r
+        if (isset($pval['apLIMsgFrmtT'])) $options[$ii]['liMsgFormatT'] = trim($pval['apLIMsgFrmtT']); \r
+        if (isset($pval['apLIMsgAFrmt']))    $options[$ii]['liMsgAFrmt'] = trim($pval['apLIMsgAFrmt']); \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      }  elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  } \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID;  $nt = 'li'; $ntU = 'LI';\r
+    foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapLI', true));  if (is_array($pMeta) && isset($pMeta[$ii])) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]); \r
+      if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = '';  if (empty($ntOpt['urlToUse'])) $ntOpt['urlToUse'] = '';  if (empty($ntOpt['catSel'])) $ntOpt['catSel'] = '';\r
+      $doLI = $ntOpt['doLI'] && (is_array($pMeta) || $ntOpt['catSel']!='1');  $imgToUse = $ntOpt['imgToUse'];  $urlToUse = $ntOpt['urlToUse']; \r
+      $isAvailLI =  (isset($ntOpt['liOAuthVerifier']) && $ntOpt['liOAuthVerifier']!='' && $ntOpt['liAccessTokenSecret']!='' && $ntOpt['liAccessToken']!='' && $ntOpt['liAPIKey']!='') || ($ntOpt['ulName']!=='' && $ntOpt['uPass']!=='');\r
+      $liMsgFormat = htmlentities($ntOpt['liMsgFormat'], ENT_COMPAT, "UTF-8"); $liMsgFormatT = htmlentities($ntOpt['liMsgFormatT'], ENT_COMPAT, "UTF-8"); \r
+      ?>  \r
+      \r
+<tr><th style="text-align:left;" colspan="2">\r
+<?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvailLI) { ?><input class="nxsGrpDoChb" value="1" id="doLI<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="li[<?php echo $ii; ?>][doLI]" <?php if ((int)$doLI == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="li[<?php echo $ii; ?>][doLI]" value="<?php echo $doLI;?>"> <?php } ?> <?php } ?>\r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/li16.png);">LinkedIn - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th><td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvailLI) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToLI_repostButton" id="rePostToLI_button" value="<?php _e('Repost to LinkedIn', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php } ?>\r
+                    \r
+                    <?php if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) {  // prr($pMeta[$ii]);                       \r
+                        ?> <span id="pstdLI<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+                      <a style="font-size: 10px;" href="<?php if ( $pMeta[$ii]['postURL']!='')  echo $pMeta[$ii]['postURL']; elseif ($ntOpt['uPage']!='') echo $ntOpt['uPage']; else { } ?>" target="_blank"><?php $nType="LinkedIn"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>\r
+                <?php if (!$isAvailLI) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your LinkedIn Account to AutoPost to LinkedIn</b>\r
+                <?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>li" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> />\r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>               \r
+                </td></tr> <?php } ?>\r
+                \r
+                <tr><th scope="row" style="text-align:right; width:150px; vertical-align:top; padding-top: 0px; padding-right:10px;"> <?php _e('Post Type:', 'social-networks-auto-poster-facebook-twitter-g') ?> \r
+                </th><td>     \r
+        \r
+        <input type="radio" name="li[<?php echo $ii; ?>][postType]" value="T" <?php if ($ntOpt['postType'] == 'T') echo 'checked="checked"'; ?> /><?php _e('Text Post', 'social-networks-auto-poster-facebook-twitter-g') ?>  - <i><?php _e('just text message', 'social-networks-auto-poster-facebook-twitter-g') ?></i><br/>       \r
+        <span class="nxs_li_nxapi_<?php echo $ii; ?>" style="display: <?php echo (!empty($ntOpt['apiToUse']) && $ntOpt['apiToUse'] =='nx')?"block":"none"; ?>;">\r
+        <input type="radio" name="li[<?php echo $ii; ?>][postType]" value="I" <?php if ($ntOpt['postType'] == 'I') echo 'checked="checked"'; ?> onchange="jQuery('#altFormatIMG<?php echo $nt.$ii;?>').show();" /> <?php _e('Post to LinkedIn as "Image post"', 'social-networks-auto-poster-facebook-twitter-g') ?> - <i><?php _e('big image with text message', 'social-networks-auto-poster-facebook-twitter-g') ?></i><br/> </span>            \r
+        <input type="radio" name="li[<?php echo $ii; ?>][postType]" value="A" <?php if ( !isset($ntOpt['postType']) || $ntOpt['postType'] == '' || $ntOpt['postType'] == 'A') echo 'checked="checked"'; ?> onchange="jQuery('#altFormatIMG<?php echo $nt.$ii;?>').hide();" /><?php _e('Text Post with "attached" blogpost', 'social-networks-auto-poster-facebook-twitter-g') ?>        \r
+     </td></tr>\r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Message Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                <td>                \r
+                <textarea cols="150" rows="1" id="li<?php echo $ii; ?>SNAPformat" name="li[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#li<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apLIMsgFrmt<?php echo $ii; ?>');"><?php echo $liMsgFormat; ?></textarea>\r
+                <?php nxs_doShowHint("apLIMsgFrmt".$ii); ?></td></tr>\r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Title Format (Groups Only):', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                <td><input value="<?php echo $liMsgFormatT ?>" type="text" name="li[<?php echo $ii; ?>][SNAPformatT]"  style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apLIMsgFrmtT<?php echo $ii; ?>');"/><?php nxs_doShowHint("apLIMsgFrmtT".$ii, '', '58'); ?></td></tr>                \r
+                <?php /* ## Select Image & URL ## */ nxs_showImgToUseDlg($nt, $ii, $imgToUse); nxs_showURLToUseDlg($nt, $ii, $urlToUse); ?>\r
+\r
+                <?php } \r
+    }      \r
+  }\r
+  \r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = '';\r
+     if (isset($pMeta['SNAPformat'])) $optMt['liMsgFormat'] = $pMeta['SNAPformat']; if (trim($optMt['liMsgFormat'])=='') $optMt['liMsgFormat'] = ' ';     \r
+     if (isset($pMeta['SNAPformatT'])) $optMt['liMsgFormatT'] = $pMeta['SNAPformatT']; if (trim($optMt['liMsgFormatT'])=='') $optMt['liMsgFormatT'] = ' ';\r
+     if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse']; if (isset($pMeta['urlToUse'])) $optMt['urlToUse'] = $pMeta['urlToUse']; \r
+     if (isset($pMeta['postType'])) $optMt['postType'] = $pMeta['postType'];\r
+     if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];         \r
+     if (isset($pMeta['doLI'])) $optMt['doLI'] = $pMeta['doLI'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doLI'] = 0; } \r
+     if (isset($pMeta['SNAPincludeLI']) && $pMeta['SNAPincludeLI'] == '1' ) $optMt['doLI'] = 1; \r
+     return $optMt;\r
+  }\r
+}}\r
+\r
+if (!function_exists("nxs_rePostToLI_ajax")) { function nxs_rePostToLI_ajax() {  check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; // $result = nsPublishTo($id, 'FB', true);   \r
+      global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+      foreach ($options['li'] as $ii=>$po) if ($ii==$_POST['nid']) {  $po['ii'] = $ii; $po['pType'] = 'aj';\r
+      $mpo =  get_post_meta($postID, 'snapLI', true); $mpo =  maybe_unserialize($mpo);\r
+      if (is_array($mpo) && isset($mpo[$ii]) && is_array($mpo[$ii]) ){ $ntClInst = new nxs_snapClassLI(); $po = $ntClInst->adjMetaOpt($po, $mpo[$ii]); } \r
+      $result = nxs_doPublishToLI($postID, $po);  \r
+      if ($result == 200 && ($postID=='0') && (!isset($options['li'][$ii]['liOK']) || $options['li'][$ii]['liOK']!='1')) { $options['li'][$ii]['liOK']=1;  update_option('NS_SNAutoPoster', $options); }\r
+      if ($result == 200) die("Successfully sent your post to LinkedIn."); else die($result);\r
+    }    \r
+  }\r
+}\r
+\r
+if (!function_exists("nxs_doPublishToLI")) { //## Second Function to Post to LI\r
+  function nxs_doPublishToLI($postID, $options){ global $nxs_gCookiesArr; $ntCd = 'LI'; $ntCdL = 'li'; $ntNm = 'LinkedIn';   $urlDescr = ''; $myurl = '';\r
+    if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+    //if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToLI',  array($postID, $options));  \r
+    $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));\r
+    if (empty($options['imgToUse'])) $options['imgToUse'] = ''; if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+    $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+    $logNT = '<span style="color:#000058">LinkedIn</span> - '.$options['nName'];\r
+    $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+    if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {  sleep(5);\r
+         nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$uqID); return;\r
+        }\r
+    }\r
+  \r
+    $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url();  $imgURL=''; // prr($options);\r
+    if ($postID=='0') { echo "Testing ... <br/><br/>"; $options['liMsgFormatT'] = 'Test Post from '.$blogTitle;  $urlToGo = home_url(); $options['liMsgFormat'] = 'Test Post from '.$blogTitle. " ".$urlToGo; $title = $blogTitle; }\r
+      else { $post = get_post($postID); if(!$post) return;   \r
+        $options['liMsgFormat'] = nsFormatMessage($options['liMsgFormat'], $postID, $addParams);  $options['liMsgFormatT'] = nsTrnc(nsFormatMessage($options['liMsgFormatT'], $postID, $addParams), 200); \r
+        //## MyURL - URLToGo code\r
+        $options = nxs_getURL($options, $postID, $addParams); $urlToGo = $options['urlToUse'];     \r
+        $title = nsTrnc($post->post_title, 200); nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1')); \r
+                \r
+      if(empty($options['postType'])) { if ((int)$options['liAttch'] == 1 || $isNew) $options['postType'] = 'A';}        \r
+      if ($options['postType'] == 'A' || $options['postType'] == 'I') { \r
+        if (trim($options['liMsgAFrmt'])!='') { $urlDescr = nsFormatMessage($options['liMsgAFrmt'], $postID, $addParams); } else { \r
+            $urlDescr = trim(apply_filters('the_content', $post->post_excerpt)); if ($urlDescr=='') $urlDescr = apply_filters('the_content', $post->post_content);  \r
+        } if (trim($options['imgToUse'])!='') $imgURL = $options['imgToUse']; else $imgURL = nxs_getPostImage($postID, 'full'); \r
+        if (preg_match("/noImg.\.png/i", $imgURL)) $imgURL = '';          \r
+        $urlDescr = strip_tags($urlDescr); $urlDescr = nxs_decodeEntitiesFull($urlDescr); $urlDescr = nxs_html_to_utf8($urlDescr);  $urlDescr = nsTrnc($urlDescr, 300);                \r
+      }  \r
+    }\r
+    $extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?$post->post_title:''); \r
+    //$images = array(nxs_getPostImage($postID, 'thumb'), nxs_getPostImage($postID, 'medium'), nxs_getPostImage($postID, 'full'), nxs_getPostImage($postID, 'original')); \r
+    $message = array('url'=>$urlToGo, 'surl'=>$urlToGo, 'urlDescr'=>$urlDescr, 'urlTitle'=>$title, 'title'=>$title, 'imageURL' => $imgURL, 'videoCode'=>'', 'videoURL'=>'', 'siteName'=>$blogTitle, 'cats'=>'', 'authorName'=>'');   \r
+    //## Actual Post\r
+    $ntToPost = new nxs_class_SNAP_LI(); $ret = $ntToPost->doPostToNT($options, $message);\r
+    //## Process Results\r
+    if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+      if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+    } else {  $extInfo .= ' | '.$ret['postID']; // ## All Good - log it.\r
+      if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+        else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'postID'=>$ret['postID'], 'postURL'=>$ret['postURL'], 'pgID'=>$ret['postID'], 'pDate'=>date('Y-m-d H:i:s'))); \r
+        if (!empty($ret['postURL'])) $extInfo .= ' | <a href="'.$ret['postURL'].'" target="_blank">Post Link</a>'; nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+    }\r
+    //## Return Result\r
+    if ($ret['isPosted']=='1') return 200; else return print_r($ret, true);     \r
+  }\r
+}\r
+\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/lj.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/lj.api.php
new file mode 100644 (file)
index 0000000..16bafbf
--- /dev/null
@@ -0,0 +1,46 @@
+<?php    \r
+//## NextScripts FriendFeed Connection Class\r
+$nxs_snapAPINts[] = array('code'=>'LJ', 'lcode'=>'lj', 'name'=>'LiveJournal');\r
+\r
+if (!class_exists("nxs_class_SNAP_LJ")) { class nxs_class_SNAP_LJ {\r
+    \r
+    var $ntCode = 'LJ';\r
+    var $ntLCode = 'lj';     \r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array();\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }    \r
+    function nxs_getLJHeaders($up){ $hdrsArr = array(); \r
+      $hdrsArr['Cache-Control']='no-cache'; $hdrsArr['Connection']='keep-alive'; \r
+      $hdrsArr['User-Agent']='SNAP for Wordpress; Ver '.NextScripts_SNAP_Version;\r
+      $hdrsArr['Accept']='text/html, application/xhtml+xml, */*'; $hdrsArr['DNT']='1';\r
+      $hdrsArr['Authorization'] = 'Basic ' . base64_encode("$up");\r
+      if (function_exists('gzdeflate')) $hdrsArr['Accept-Encoding']='gzip,deflate'; \r
+      $hdrsArr['Accept-Language']='en-US,en;q=0.8'; $hdrsArr['Accept-Charset']='ISO-8859-1,utf-8;q=0.7,*;q=0.3'; return $hdrsArr;\r
+    }\r
+    function doPostToNT($options, $message){ $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>'');\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['ljUName']) || trim($options['ljPass'])=='') { $badOut['Error'] = 'Not Configured'; return $badOut; }            \r
+      $pass = (substr($options['ljPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['ljPass'], 5)):$options['ljPass']);\r
+      //## Format\r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['ljMsgFormat'], $message); \r
+      if (!empty($message['pTitle'])) $msgT = $message['pTitle']; else $msgT = nxs_doFormatMsg($options['ljMsgTFormat'], $message);      \r
+      \r
+      require_once ('apis/xmlrpc-client.php'); if (!empty($options['ljSrv']) && $options['ljSrv']=='DW') $server = 'dreamwidth.org'; else $server = 'livejournal.com';      \r
+      $nxsToLJclient = new NXS_XMLRPC_Client('http://www.'.$server.'/interface/xmlrpc'); $nxsToLJclient->debug = false;             \r
+      \r
+      $date = time(); $year = date("Y", $date); $mon = date("m", $date); $day = date("d", $date); $hour = date("G", $date); $min = date("i", $date);\r
+      $nxsToLJContent = array( "username" => $options['ljUName'], "password" => $pass, "event" => $msg, "subject" => $msgT, "lineendings" => "unix", "year" => $year, "mon" => $mon, "day" => $day, "hour" => $hour, "min" => $min, "ver" => 2);      \r
+      if (!empty($options['commID']) && $options['commID']!='') $nxsToLJContent["usejournal"] = $options['commID'];  \r
+      if (!empty($options['inclTags']) && $options['inclTags']=='1' && !empty($message['tags'])) $nxsToLJContent['props'] = array('taglist' => $message['tags']);      \r
+        // prr($nxsToLJContent);\r
+      if (!$nxsToLJclient->query('LJ.XMLRPC.postevent', $nxsToLJContent)) {  prr($nxsToLJclient); $ret = 'Something went wrong - '.$nxsToLJclient->getErrorCode().' : '.$nxsToLJclient->getErrorMessage();} else $ret = 'OK';      \r
+      $pid = $nxsToLJclient->getResponse(); \r
+      if (is_array($pid) && !empty($pid['url'])) return array('postID'=>$pid['url'], 'isPosted'=>1, 'postURL'=>$pid['url'], 'pDate'=>date('Y-m-d H:i:s'));  \r
+        else $badOut['Error'] .= 'Something went wrong - NO PID '.print_r($pid, true); \r
+      return $badOut;      \r
+   }    \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/lj.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/lj.php
new file mode 100644 (file)
index 0000000..45ce444
--- /dev/null
@@ -0,0 +1,236 @@
+<?php    \r
+//## NextScripts Facebook Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'LJ', 'lcode'=>'lj', 'name'=>'LiveJournal');\r
+\r
+if (!class_exists("nxs_snapClassLJ")) { class nxs_snapClassLJ {\r
+  //#### Show Common Settings\r
+  function showGenNTSettings($ntOpts){  global $nxs_plurl; $ntInfo = array('code'=>'LJ', 'lcode'=>'lj', 'name'=>'LiveJournal', 'defNName'=>'', 'tstReq' => false); ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('/xmlrpc.php','', str_ireplace('http://','', str_ireplace('https://','', $pbo['ljURL']))); ?>\r
+          <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />\r
+           <?php } ?>\r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;\r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php \r
+  }   \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($mgpo){ $options = array('nName'=>'', 'doLJ'=>'1', 'ljUName'=>'', 'ljPageID'=>'', 'inclTags'=>'1', 'ljAttch'=>'', 'ljPass'=>'', 'ljURL'=>''); $options['ntInfo']= array('lcode'=>'lj'); $this->showNTSettings($mgpo, $options, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){ global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['commID'])) $options['commID'] = ''; ?>\r
+            <div id="doLJ<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">     <input type="hidden" name="apDoSLJ<?php echo $ii; ?>" value="0" id="apDoSLJ<?php echo $ii; ?>" />\r
+            \r
+            <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/lj16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/setup-installation-livejournal-social-networks-auto-poster-for-wordpress/"><?php $nType="LiveJournal"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>            \r
+            <?php if ($isNew){ ?> <br/><?php _e('You can setup LiveJournal blog.', 'social-networks-auto-poster-facebook-twitter-g'); ?><br/><br/> <?php } ?> \r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="lj[<?php echo $ii; ?>][nName]" id="ljnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel('lj', $ii, $options['qTLng']); ?>\r
+            \r
+              <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+    \r
+    \r
+            <div style="width:100%;"><br/><strong>LiveJournal Username:</strong> </div><input name="lj[<?php echo $ii; ?>][apLJUName]" id="apLJUName" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['ljUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+            <div style="width:100%;"><strong>LiveJournal Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="lj[<?php echo $ii; ?>][apLJPass]" id="apLJPass" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['ljPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['ljPass'], 5)):$options['ljPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>                \r
+            \r
+            <div style="width:100%;"><br/><strong>Blog/Community URL or ID:</strong> Please specify the Blog or Community URL or ID. <i>Use this only if you are posting NOT to your own journal. </i></div> \r
+            <input name="lj[<?php echo $ii; ?>][commID]" id="commID" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['commID'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+            \r
+            <div style="width:100%;"><br/><strong>Website:</strong> Please select your website. <i>SNAP could also post to other LJ Engine Based sites like DreamWidth.org </i></div> \r
+            \r
+            <select id="lj1delayHrs" name="lj[<?php echo $ii; ?>][ljSrv]"><option  <?php if ( !isset($options['ljSrv']) || $options['ljSrv']=='' || $options['ljSrv']=='LJ') {?> selected="selected" <?php } ?> value="LJ">LiveJournal.com</option>\r
+      <option <?php if ( isset($options['ljSrv']) && $options['ljSrv']=='DW') {?> selected="selected" <?php } ?> value="DW">DreamWidth.org</option>\r
+      </select>            \r
+            \r
+            <br/>\r
+            \r
+            <?php if ($isNew) { ?> <input type="hidden" name="lj[<?php echo $ii; ?>][apDoLJ]" value="1" id="apDoNewLJ<?php echo $ii; ?>" /> <?php } ?>\r
+            \r
+            <br/><strong id="altFormatText"><?php _e('Post Title and Post Text Formats', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong>               \r
+            <div id="altFormat" style="">\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> (<a href="#" id="apLJMsgTFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apLJMsgTFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)               \r
+              </div><input name="lj[<?php echo $ii; ?>][apLJMsgTFrmt]" id="apLJMsgTFrmt<?php echo $ii; ?>" style="width: 50%;" value="<?php if ($isNew) echo "%TITLE%"; else _e(apply_filters('format_to_edit', htmlentities($options['ljMsgTFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?>"  onfocus="mxs_showFrmtInfo('apLJMsgTFrmt<?php echo $ii; ?>');" /><?php nxs_doShowHint("apLJMsgTFrmt".$ii); ?>\r
+            </div>            \r
+            <div id="altFormat" style="">\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> (<a href="#" id="apLJMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apLJMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)               \r
+              </div>\r
+              \r
+               <textarea cols="150" rows="3" id="lj<?php echo $ii; ?>SNAPformat" name="lj[<?php echo $ii; ?>][apLJMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#lj<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apLJMsgFrmt<?php echo $ii; ?>');"><?php if ($isNew) echo "%FULLTEXT%"; else _e(apply_filters('format_to_edit', htmlentities($options['ljMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea>\r
+              \r
+              <?php nxs_doShowHint("apLJMsgFrmt".$ii); ?>\r
+            </div>\r
+            <p style="margin-bottom: 20px;margin-top: 5px;"><input value="1"  id="ljInclTags<?php echo $ii; ?>" type="checkbox" name="lj[<?php echo $ii; ?>][inclTags]"  <?php if ((int)$options['inclTags'] == 1) echo "checked"; ?> /> \r
+              <strong><?php _e('Post with tags.', 'social-networks-auto-poster-facebook-twitter-g') ?></strong> <?php _e('Tags from the blogpost will be auto posted to LiveJournal', 'social-networks-auto-poster-facebook-twitter-g') ?>                                            \r
+            </p><br/>                \r
+            <?php if ($options['ljPass']!='') { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('LJ', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>           <?php } ?>\r
+     </div>\r
+            <?php /* ######################## Advanced Tab ####################### */ ?>\r
+  <?php if (!$isNew) { ?>   <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+    <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); \r
+      nxs_showRepostSettings($nt, $ii, $options); ?>\r
+            \r
+            \r
+    </div>  <?php } ?> <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div></div><?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = 'LJ'; $lcode = 'lj'; \r
+    foreach ($post as $ii => $pval){       \r
+      if (!empty($pval['apLJUName']) && !empty($pval['apLJPass'])){ if (!isset($options[$ii])) $options[$ii] = array();\r
+        if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);  \r
+        if (isset($pval['ljSrv']))   $options[$ii]['ljSrv'] = trim($pval['ljSrv']); if ($options[$ii]['ljSrv']=='DW') $server = 'dreamwidth.org'; else $server = 'livejournal.com';      \r
+        if (isset($pval['apLJUName']))   $options[$ii]['ljUName'] = trim($pval['apLJUName']);  $options[$ii]['ljURL'] = 'http://'.$options[$ii]['ljUName'].".".$server;\r
+        if (isset($pval['apLJPass']))    $options[$ii]['ljPass'] = 'n5g9a'.nsx_doEncode($pval['apLJPass']); else $options[$ii]['ljPass'] = '';  \r
+        if (isset($pval['apLJMsgFrmt'])) $options[$ii]['ljMsgFormat'] = trim($pval['apLJMsgFrmt']);                                                  \r
+        if (isset($pval['apLJMsgTFrmt'])) $options[$ii]['ljMsgTFormat'] = trim($pval['apLJMsgTFrmt']);               \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if (isset($pval['inclTags'])) $options[$ii]['inclTags'] = $pval['inclTags']; else $options[$ii]['inclTags'] = 0;\r
+        \r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+        \r
+        if (isset($pval['commID']))  {          \r
+          if (stripos($pval['commID'], '.')!==false) $pval['commID'] = CutFromTo($pval['commID'], '://', '.');                                 \r
+          $options[$ii]['commID'] = trim($pval['commID']);\r
+        }                                           \r
+        if (isset($pval['apDoLJ']))      $options[$ii]['doLJ'] = $pval['apDoLJ']; else $options[$ii]['doLJ'] = 0; \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }  \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'lj'; $ntU = 'LJ';\r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapLJ', true));  if (is_array($pMeta)) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]); \r
+        $doLJ = $ntOpt['doLJ'] && (is_array($pMeta) || $ntOpt['catSel']!='1');   \r
+        $isAvailLJ =  $ntOpt['ljUName']!='' && $ntOpt['ljPass']!=''; $ljMsgFormat = htmlentities($ntOpt['ljMsgFormat'], ENT_COMPAT, "UTF-8"); $ljMsgTFormat = htmlentities($ntOpt['ljMsgTFormat'], ENT_COMPAT, "UTF-8");      \r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2">\r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvailLJ) { ?><input class="nxsGrpDoChb" value="1" id="doLJ<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="lj[<?php echo $ii; ?>][doLJ]" <?php if ((int)$doLJ == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      \r
+      \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="lj[<?php echo $ii; ?>][doLJ]" value="<?php echo $doLJ;?>"> <?php } ?> <?php } ?>\r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/lj16.png);">LiveJournal - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvailLJ) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="shoLJopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToLJ_repostButton" id="rePostToLJ_button" value="<?php _e('Repost to LiveJournal', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php } ?>\r
+                    \r
+                     <?php  if (is_array($pMeta) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) {                         \r
+                        ?> <span id="pstdLJ<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+          <a style="font-size: 10px;" href="<?php echo $pMeta[$ii]['pgID']; ?>" target="_blank"><?php $nType="LiveJournal"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>                \r
+                \r
+                <?php if (!$isAvailLJ) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your LiveJournal Account to AutoPost to LiveJournal</b>\r
+                <?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>lj" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> />\r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>                \r
+                </td></tr> <?php } ?> \r
+                                \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Title Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                <td><input value="<?php echo $ljMsgTFormat ?>" type="text" name="lj[<?php echo $ii; ?>][SNAPformatT]"  style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apLJTMsgFrmt<?php echo $ii; ?>');"/><?php nxs_doShowHint("apLJTMsgFrmt".$ii); ?></td></tr>\r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                <td>                \r
+                <textarea cols="150" rows="1" id="lj<?php echo $ii; ?>SNAPformat" name="lj[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#lj<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apLJMsgFrmt<?php echo $ii; ?>');"><?php echo $ljMsgFormat; ?></textarea>\r
+                <?php nxs_doShowHint("apLJMsgFrmt".$ii); ?></td></tr>\r
+  \r
+  <?php } \r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){  if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else $optMt['isPosted'] = '';\r
+    if (isset($pMeta['SNAPformat'])) $optMt['ljMsgFormat'] = $pMeta['SNAPformat']; \r
+    if (isset($pMeta['SNAPformatT'])) $optMt['ljMsgTFormat'] = $pMeta['SNAPformatT'];  \r
+    if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];      \r
+    if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+    if (isset($pMeta['doLJ'])) $optMt['doLJ'] = $pMeta['doLJ'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doLJ'] = 0; } \r
+    if (isset($pMeta['SNAPincludeLJ']) && $pMeta['SNAPincludeLJ'] == '1' ) $optMt['doLJ'] = 1;  \r
+    return $optMt;\r
+  }  \r
+}}\r
+if (!function_exists("nxs_rePostToLJ_ajax")) {\r
+  function nxs_rePostToLJ_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; $options = get_option('NS_SNAutoPoster');  \r
+    foreach ($options['lj'] as $ii=>$two) if ($ii==$_POST['nid']) {   $two['ii'] = $ii;  $two['pType'] = 'aj';//if ($two['gpPageID'].$two['gpUName']==$_POST['nid']) {  \r
+      $gppo =  get_post_meta($postID, 'snapLJ', true); $gppo =  maybe_unserialize($gppo);// prr($gppo);\r
+      if (is_array($gppo) && isset($gppo[$ii]) && is_array($gppo[$ii])){ $ntClInst = new nxs_snapClassLJ(); $two = $ntClInst->adjMetaOpt($two, $gppo[$ii]); }\r
+      $result = nxs_doPublishToLJ($postID, $two); if ($result == 200) die("Successfully sent your post to LiveJournal."); else die($result);        \r
+    }    \r
+  }\r
+}  \r
+\r
+if (!function_exists("nxs_doPublishToLJ")) { //## Second Function to Post to LJ\r
+  function nxs_doPublishToLJ($postID, $options){ $ntCd = 'LJ'; $ntCdL = 'lj'; $ntNm = 'LJ Based Blog';   if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+      //if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToLJ',  array($postID, $options));        \r
+      $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url();     \r
+      $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'ACCNAME'=>$options['nName'], 'POSTID'=>$postID));\r
+      $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+      $logNT = '<span style="color:#2097EE">LJ</span> - '.$options['nName'];\r
+      $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+      if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') { \r
+         nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$uqID); return;\r
+        }\r
+      } \r
+      //$imgURL = nxs_getPostImage($postID);\r
+      $email = $options['ljUName'];  $pass = substr($options['ljPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['ljPass'], 5)):$options['ljPass'];      \r
+      if ($postID=='0') { echo "Testing ... <br/><br/>"; $options['ljMsgTFormat'] = 'Test Link from '. home_url(); $options['ljMsgFormat'] = 'Test post please ignore'; } else { $post = get_post($postID); if(!$post) return; \r
+        $options['ljMsgFormat'] = nsFormatMessage($options['ljMsgFormat'], $postID, $addParams); $options['ljMsgTFormat'] = nsFormatMessage($options['ljMsgTFormat'], $postID, $addParams);      \r
+        nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1')); \r
+      } //prr($msg); prr($msgFormat);\r
+      $extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?$post->post_title:'');\r
+      //## Post         \r
+      $t = wp_get_post_tags($postID); $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = implode(',', $tggs);\r
+      $message = array('siteName'=>$blogTitle, 'tags'=>$tags);// prr($message);\r
+      //## Actual Post\r
+      $ntToPost = new nxs_class_SNAP_LJ(); $ret = $ntToPost->doPostToNT($options, $message);\r
+      //## Process Results\r
+      if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+        if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+      } else {  // ## All Good - log it.\r
+        if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+          else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'pDate'=>date('Y-m-d H:i:s'))); nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+      }\r
+      //## Return Result\r
+      if ($ret['isPosted']=='1') return 200; else return print_r($ret, true); \r
+  }\r
+}  \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/pk.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/pk.api.php
new file mode 100644 (file)
index 0000000..a25568c
--- /dev/null
@@ -0,0 +1,38 @@
+<?php    \r
+//## NextScripts FriendFeed Connection Class\r
+$nxs_snapAPINts[] = array('code'=>'PK', 'lcode'=>'pk', 'name'=>'Plurk');\r
+\r
+if (!class_exists("nxs_class_SNAP_PK")) { class nxs_class_SNAP_PK {\r
+    \r
+    var $ntCode = 'PK';\r
+    var $ntLCode = 'pk';     \r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array();\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }    \r
+    function doPostToNT($options, $message){ $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>'');\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['pkConsKey']) || trim($options['pkConsSec'])=='' || empty($options['pkAccessTocken'])) { $badOut['Error'] = 'Not Configured'; return $badOut; }   \r
+      if (empty($options['imgSize'])) $options['imgSize'] = '';               \r
+      //## Format\r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['pkMsgFormat'], $message);       \r
+      //## Post    \r
+      require_once('apis/plurkOAuth.php'); $consumer_key = $options['pkConsKey']; $consumer_secret = $options['pkConsSec'];\r
+      $tum_oauth = new wpPlurkOAuth($consumer_key, $consumer_secret, $options['pkAccessTocken'], $options['pkAccessTockenSec']); \r
+      $pkURL = trim(str_ireplace('http://', '', $options['pkURL'])); if (substr($pkURL,-1)=='/') $pkURL = substr($pkURL,0,-1);     \r
+      if ($options['pkCat']=='') $options['pkCat'] = ':';    \r
+      if ($options['attchImg']=='1') { if (isset($message['imageURL'])) $imgURL = trim(nxs_getImgfrOpt($message['imageURL'], $options['imgSize'])); else $imgURL = ''; if ($imgURL!='') $msg .= " ".$imgURL; }         \r
+    \r
+      $postArr = array('content'=>$msg, 'qualifier'=>$options['pkCat']);  $postinfo = $tum_oauth->makeReq('http://www.plurk.com/APP/Timeline/plurkAdd', $postArr); //  prr($postinfo);\r
+      if (is_array($postinfo) && isset($postinfo['plurk_id'])) $pkID = $postinfo['plurk_id'];  $code = $tum_oauth->http_code; // echo "XX".print_r($code);  prr($postinfo); // prr($msg); prr($postinfo); echo $code."VVVV"; die("|====");\r
+    \r
+      if ($code == 200 && $pkID!='') { $alphabet = str_split("0123456789abcdefghijklmnopqrstuvwxyz"); $shorten = ''; $plurk_id = $pkID;\r
+          while ($plurk_id != 0){ $i = $plurk_id % 36; $plurk_id = intval($plurk_id / 36); $shorten = $alphabet[$i].$shorten;}  $link = 'http://www.plurk.com/p/'.$shorten;\r
+          return array('postID'=>$pkID, 'isPosted'=>1, 'postURL'=>$link, 'pDate'=>date('Y-m-d H:i:s')); \r
+      } else { $badOut['Error'] .= " ERROR: - ".$postinfo['error_text']; }  \r
+      return $badOut;\r
+   }    \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/pk.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/pk.php
new file mode 100644 (file)
index 0000000..e2707f1
--- /dev/null
@@ -0,0 +1,320 @@
+<?php    \r
+//## NextScripts Facebook Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'PK', 'lcode'=>'pk', 'name'=>'Plurk');\r
+\r
+if (!class_exists("nxs_snapClassPK")) { class nxs_snapClassPK { var $ntInfo = array('code'=>'PK', 'lcode'=>'pk', 'name'=>'Plurk', 'defNName'=>'', 'tstReq' => true); \r
+    \r
+  function pkCats() { return '<option value="">:freestyle(None)</option><option value="loves">loves</option><option value="likes">likes</option><option value="shares">shares</option><option value="gives">gives</option><option value="hates">hates</option><option value="wants">wants</option><option value="wishes">wishes</option><option value="needs">needs</option><option value="will">will</option><option value="hopes">hopes</option><option value="asks">asks</option><option value="has">has</option><option value="was">was</option><option value="wonders">wonders</option><option value="feels on">feels</option><option value="thinks">thinks</option><option value="says">says</option><option value="is">is</option>';}  \r
+  //#### Show Common Settings  \r
+  function showGenNTSettings($ntOpts){ global $nxs_snapSetPgURL, $nxs_plurl, $nxs_gOptions;  $ntInfo = $this->ntInfo;  \r
+   if ( isset($_GET['auth']) && $_GET['auth']=='pk'){ require_once('apis/plurkOAuth.php'); $options = $ntOpts[$_GET['acc']];\r
+              $consumer_key = $options['pkConsKey']; $consumer_secret = $options['pkConsSec'];\r
+              $callback_url = $nxs_snapSetPgURL."&auth=pka&acc=".$_GET['acc'];\r
+             \r
+              $tum_oauth = new wpPlurkOAuth($consumer_key, $consumer_secret); //prr($tum_oauth);\r
+              $request_token = $tum_oauth->getReqToken($callback_url); \r
+              $options['pkOAuthToken'] = $request_token['oauth_token'];\r
+              $options['pkOAuthTokenSecret'] = $request_token['oauth_token_secret'];// prr($tum_oauth ); die();\r
+\r
+              //prr($tum_oauth); prr($options); die();\r
+              \r
+              switch ($tum_oauth->http_code) { case 200: $url = 'http://www.plurk.com/OAuth/authorize?oauth_token='.$options['pkOAuthToken'];                 \r
+                if (function_exists('get_option')) $nxs_gOptions = get_option('NS_SNAutoPoster'); if(!empty($nxs_gOptions)) { $nxs_gOptions['pk'][$_GET['acc']] = $options; nxs_settings_save($nxs_gOptions); }\r
+                echo '<br/><br/>All good?! Redirecting ..... <script type="text/javascript">window.location = "'.$url.'"</script>'; break; \r
+                default: echo '<br/><b style="color:red">Could not connect to Plurk. Refresh the page or try again later.</b>'; die();\r
+              }\r
+              die();\r
+            }\r
+   if ( isset($_GET['auth']) && $_GET['auth']=='pka'){ require_once('apis/plurkOAuth.php'); $options = $ntOpts[$_GET['acc']];\r
+              $consumer_key = $options['pkConsKey']; $consumer_secret = $options['pkConsSec'];\r
+            \r
+              $tum_oauth = new wpPlurkOAuth($consumer_key, $consumer_secret, $options['pkOAuthToken'], $options['pkOAuthTokenSecret']); //prr($tum_oauth);\r
+              $access_token = $tum_oauth->getAccToken($_GET['oauth_verifier']); prr($access_token);\r
+              $options['pkAccessTocken'] = $access_token['oauth_token'];  $options['pkAccessTockenSec'] = $access_token['oauth_token_secret'];\r
+              if (function_exists('get_option')) $nxs_gOptions = get_option('NS_SNAutoPoster'); if(!empty($nxs_gOptions)) { $nxs_gOptions['pk'][$_GET['acc']] = $options; nxs_settings_save($nxs_gOptions); }\r
+              \r
+              $tum_oauth = new wpPlurkOAuth($consumer_key, $consumer_secret, $options['pkAccessTocken'], $options['pkAccessTockenSec']); \r
+              $uinfo = $tum_oauth->makeReq('http://www.plurk.com/APP/Profile/getOwnProfile', $params); \r
+              if (is_array($uinfo) && isset($uinfo['user_info'])) $userinfo = $uinfo['user_info']['display_name'];\r
+              if (empty($userinfo) && is_array($uinfo) && isset($uinfo['user_info'])) $userinfo = $uinfo['user_info']['nick_name'];  $options['pkPgID'] = $userinfo; \r
+              if (function_exists('get_option')) $nxs_gOptions = get_option('NS_SNAutoPoster'); if(!empty($nxs_gOptions)) { $nxs_gOptions['pk'][$_GET['acc']] = $options; nxs_settings_save($nxs_gOptions); }\r
+              if ($options['pkPgID']!='') {  \r
+                  $gGet = $_GET; unset($gGet['auth']); unset($gGet['acc']); unset($gGet['oauth_token']);  unset($gGet['oauth_verifier']); unset($gGet['post_type']);\r
+                  $sturl = explode('?',$nxs_snapSetPgURL); $nxs_snapSetPgURL = $sturl[0].((!empty($gGet))?'?'.http_build_query($gGet):'');\r
+                  echo '<br/><br/>All good?! Redirecting ..... <script type="text/javascript">window.location = "'.$nxs_snapSetPgURL.'"</script>'; break;  die();\r
+              }\r
+                else die("<span style='color:red;'>ERROR: Authorization Error: <span style='color:darkred; font-weight: bold;'>".$options['pkPgID']."</span></span>");              \r
+            }\r
+    global $nxs_plurl; ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('https://','', str_ireplace('http://','', $pbo['pkURL']));         \r
+        if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['pkOAuthTokenSecret']) && $pbo['pkOAuthTokenSecret']!='')?'1':''; ?>\r
+          <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />\r
+           <?php } ?>\r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;\r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($bo){ $po = array('nName'=>'', 'doPK'=>'1', 'pkURL'=>'', 'pkPgID'=>'', 'pkConsKey'=>'', 'pkInclTags'=>'1', 'cImgURL'=>'R', 'pkConsSec'=>'', 'pkPostType'=>'T', 'pkDefImg'=>'', 'pkOAuthTokenSecret'=>'', 'pkAccessTocken'=>'', 'pkMsgFormat'=>'%TITLE% - %URL%'); $po['ntInfo']= array('lcode'=>'pk'); $this->showNTSettings($bo, $po, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl,$nxs_snapSetPgURL; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = '';  if (!isset($options['attchImg'])) $options['attchImg'] = ''; ?>\r
+    <div id="doPK<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">   <input type="hidden" name="apDoSPK<?php echo $ii; ?>" value="0" id="apDoSPK<?php echo $ii; ?>" />                                     \r
+    <?php if ($isNew) { ?> <input type="hidden" name="pk[<?php echo $ii; ?>][apDoPK]" value="1" id="apDoNewPK<?php echo $ii; ?>" /> <?php } ?>\r
+    \r
+    <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/pk16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/setup-installation-plurk-social-networks-auto-poster-wordpress/"><?php $nType="Plurk"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+    \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="pk[<?php echo $ii; ?>][nName]" id="pknName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel('pk', $ii, $options['qTLng']); ?>\r
+            \r
+              <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+    \r
+            \r
+            <div style="width:100%;"><strong>Your Plurk URL:</strong> </div><input onchange="nxsPKURLVal(<?php echo $ii; ?>);" name="pk[<?php echo $ii; ?>][apPKURL]" id="apPKURL<?php echo $ii; ?>" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['pkURL'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><span style="color: #F00000;" id="apPKURLerr<?php echo $ii; ?>"></span>\r
+            <div style="width:100%;"><strong>Your Plurk App Key:</strong> </div><input name="pk[<?php echo $ii; ?>][apPKConsKey]" id="apPKConsKey" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['pkConsKey'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />             \r
+            <div style="width:100%;"><strong>Your Plurk App Secret:</strong> </div><input name="pk[<?php echo $ii; ?>][apPKConsSec]" id="apPKConsSec" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['pkConsSec'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+            <br/><br/>\r
+            \r
+            <div id="altFormat" style="">\r
+  <div style="width:100%;"><strong id="altFormatText">Plurk prefix:</strong> </div>\r
+  \r
+            <select name="pk[<?php echo $ii; ?>][Cat]" id="pkCat<?php echo $ii; ?>">\r
+            <?php  $pkCats = $this->pkCats(); \r
+              if (isset($options['pkCat']) && $options['pkCat']!='') $pkCats = str_replace($options['pkCat'].'"', $options['pkCat'].'" selected="selected"', $pkCats);  echo $pkCats; \r
+            ?>\r
+            </select>            \r
+            </div>  \r
+            <br/>\r
+    <p style="margin: 0px;"><input value="1"  id="apLIAttch" type="checkbox" name="pk[<?php echo $ii; ?>][attchImg]"  <?php if ((int)$options['attchImg'] == 1) echo "checked"; ?> /> <strong>Attach Image to Plurk Post</strong></p>\r
+    <br/>\r
+            \r
+  <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="apPKMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apPKMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>) </div>\r
+              \r
+               <textarea cols="150" rows="3" id="pk<?php echo $ii; ?>SNAPformat" name="pk[<?php echo $ii; ?>][apPKMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#pk<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apPKMsgFrmt<?php echo $ii; ?>');"><?php if ($options['pkMsgFormat']!='') _e(apply_filters('format_to_edit', htmlentities($options['pkMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); else echo htmlentities("%TITLE% - %URL%"); ?></textarea>\r
+              \r
+              <br/>\r
+               <?php nxs_doShowHint("apPKMsgFrmt".$ii); ?>\r
+              <br/>\r
+              <?php \r
+            if($options['pkConsSec']=='') { ?>\r
+            <b>Authorize Your Plurk Account</b>. Please save your settings and come back here to Authorize your account.\r
+            <?php } else { if (!empty($options['pkAccessTocken']) && $options['pkAccessTockenSec']!=='') { ?>\r
+            Your Plurk Account has been authorized. Your display name: <?php _e(apply_filters('format_to_edit', htmlentities($options['pkPgID'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>. \r
+            You can Re- <?php } ?>            \r
+            <a href="<?php echo $nxs_snapSetPgURL.(stripos($nxs_snapSetPgURL, '?')!==false?'&':'?');?>auth=pk&acc=<?php echo $ii; ?>">Authorize Your Plurk Account</a> \r
+              <?php if (!isset($options['pkOAuthTokenSecret']) || $options['pkOAuthTokenSecret']=='') { ?> <div class="blnkg">&lt;=== Authorize your account ===</div> <?php } ?>            \r
+            <?php }  ?>            \r
+            \r
+            \r
+            <?php if( isset($options['pkOAuthTokenSecret']) && $options['pkOAuthTokenSecret']!='') { ?>\r
+            \r
+            <br/><br/><b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('PK', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>  <br/><br/>\r
+            <?php }?>\r
+            </div>\r
+            <?php /* ######################## Advanced Tab ####################### */ ?>\r
+   <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+     <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); \r
+      nxs_showRepostSettings($nt, $ii, $options); ?>\r
+            \r
+            \r
+    </div>  <?php } ?><?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div>\r
+            \r
+        </div>\r
+        <?php\r
+      \r
+      \r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = $this->ntInfo['code'];\r
+    foreach ($post as $ii => $pval){ \r
+      if (isset($pval['apPKConsKey']) && $pval['apPKConsSec']!='') { if (!isset($options[$ii])) $options[$ii] = array();\r
+        \r
+                if (isset($pval['apPKURL']))  {   $options[$ii]['pkURL'] = trim($pval['apPKURL']);  if ( substr($options[$ii]['pkURL'], 0, 4)!='http' )  $options[$ii]['pkURL'] = 'http://'.$options[$ii]['pkURL'];\r
+                  $pkPgID = $options[$ii]['pkURL']; if (substr($pkPgID, -1)=='/') $pkPgID = substr($pkPgID, 0, -1);  $pkPgID = substr(strrchr($pkPgID, "/"), 1);\r
+                  $options[$ii]['pkPgID'] = $pkPgID; //echo $fbPgID;\r
+                }\r
+                if (isset($pval['apDoPK']))         $options[$ii]['doPK'] = $pval['apDoPK']; else $options[$ii]['doPK'] = 0;\r
+                if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);\r
+                if (isset($pval['apPKConsKey']))    $options[$ii]['pkConsKey'] = trim($pval['apPKConsKey']);\r
+                if (isset($pval['apPKConsSec']))    $options[$ii]['pkConsSec'] = trim($pval['apPKConsSec']);\r
+                \r
+                if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+                if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+                                                \r
+                if (isset($pval['apPKMsgFrmt']))    $options[$ii]['pkMsgFormat'] = trim($pval['apPKMsgFrmt']);                                \r
+                if (isset($pval['Cat']))      $options[$ii]['pkCat'] = $pval['Cat']; else $options[$ii]['pkCat'] = "";\r
+                if (isset($pval['attchImg'])) $options[$ii]['attchImg'] = $pval['attchImg']; else $options[$ii]['attchImg'] = 0;                \r
+                \r
+                $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+                if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+                if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+                if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      }  elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  } \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'pk'; $ntU = 'PK';\r
+    foreach($ntOpts as $ii=>$ntOpt)  {$pMeta = maybe_unserialize(get_post_meta($post_id, 'snapPK', true));  if (is_array($pMeta)) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]); \r
+       $doPK = $ntOpt['doPK'] && (is_array($pMeta) || $ntOpt['catSel']!='1');// prr($ntOpt);\r
+       $isAvailPK =  (!empty($ntOpt['pkAccessTocken'])  && !empty($ntOpt['pkOAuthTokenSecret']));\r
+       $pkMsgFormat = htmlentities($ntOpt['pkMsgFormat'], ENT_COMPAT, "UTF-8"); \r
+      ?>  \r
+      \r
+<tr><th style="text-align:left;" colspan="2">\r
+<?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvailPK) { ?><input class="nxsGrpDoChb" value="1" id="doPK<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="pk[<?php echo $ii; ?>][doPK]" <?php if ((int)$doPK == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="pk[<?php echo $ii; ?>][doPK]" value="<?php echo $doPK;?>"> <?php } ?> <?php } ?>\r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/pk16.png);">Plurk - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>) </div></th><td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvailPK) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToPK_repostButton" id="rePostToPK_button" value="<?php _e('Repost to Plurk', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php } ?>\r
+                    \r
+                    <?php  if (is_array($pMeta) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) {                         \r
+                        ?> <span id="pstdPK<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+          <a style="font-size: 10px;" href="http://www.plurk.com/p/<?php echo base_convert($pMeta[$ii]['pgID'], 10, 36); ?>" target="_blank"><?php $nType="Plurk"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>\r
+                <?php if (!$isAvailPK) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup and authorize your Plurk Account to AutoPost to Plurk</b>\r
+                <?php }else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>pk" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> />\r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>                \r
+                </td></tr> <?php } ?>\r
+                         \r
+                <tr id="altFormat1" style=""><th scope="row" style="text-align:right; width:60px; padding-right:10px;">\r
+                Prefix:\r
+                \r
+                </th>\r
+                <td><select name="pk[<?php echo $ii; ?>][Cat]" id="apPKCat<?php echo $ii; ?>">\r
+            <?php  $pkCats = $this->pkCats(); \r
+              if ($ntOpt['pkCat']!='') $pkCats = str_replace($ntOpt['pkCat'].'"', $ntOpt['pkCat'].'" selected="selected"', $pkCats);  echo $pkCats; \r
+            \r
+             ?>\r
+            </select></td></tr>\r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                <td>                \r
+                <textarea cols="150" rows="1" id="pk<?php echo $ii; ?>SNAPformat" name="pk[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#pk<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apPKMsgFrmt<?php echo $ii; ?>');"><?php echo $pkMsgFormat; ?></textarea>\r
+                <?php nxs_doShowHint("apPKMsgFrmt".$ii); ?></td></tr>\r
+                               \r
+   <?php } \r
+    }\r
+      \r
+  }\r
+  \r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else $optMt['isPosted'] = '';\r
+     if (isset($pMeta['SNAPformat'])) $optMt['pkMsgFormat'] = $pMeta['SNAPformat']; \r
+     if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];      \r
+     if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+     if (isset($pMeta['Cat'])) $optMt['pkCat'] = $pMeta['Cat'];      \r
+     if (isset($pMeta['doPK'])) $optMt['doPK'] = $pMeta['doPK'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doPK'] = 0; }\r
+     if (isset($pMeta['SNAPincludePK']) && $pMeta['SNAPincludePK'] == '1' ) $optMt['doPK'] = 1;  \r
+     return $optMt;\r
+  }\r
+}}\r
+\r
+if (!function_exists("nxs_rePostToPK_ajax")) { function nxs_rePostToPK_ajax() {  check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; // $result = nsPublishTo($id, 'FB', true);   \r
+    $options = get_option('NS_SNAutoPoster');  foreach ($options['pk'] as $ii=>$po) if ($ii==$_POST['nid']) {   $po['ii'] = $ii; $po['pType'] = 'aj';\r
+      $mpo =  get_post_meta($postID, 'snapPK', true); $mpo =  maybe_unserialize($mpo); \r
+      if (is_array($mpo) && isset($mpo[$ii]) && is_array($mpo[$ii]) ){ $ntClInst = new nxs_snapClassPK(); $po = $ntClInst->adjMetaOpt($po, $mpo[$ii]); }\r
+      $result = nxs_doPublishToPK($postID, $po); if ($result == 200 || $result == 201) die("Your post has been successfully sent to Plurk."); else { echo $result; die(); }\r
+    }    \r
+  }\r
+}\r
+\r
+if (!function_exists("nxs_doPublishToPK")) { //## Second Function to Post to TR\r
+  function nxs_doPublishToPK($postID, $options){ $ntCd = 'PK'; $ntCdL = 'pk'; $ntNm = 'Plurk'; if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+    //if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToPK',  array($postID, $options));          \r
+    $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url(); \r
+    $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));\r
+    if (empty($options['imgToUse'])) $options['imgToUse'] = ''; if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+    \r
+    $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+    $logNT = '<span style="color:#014A76">Plurk</span> - '.$options['nName'];\r
+    $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+    if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {  sleep(5);\r
+         nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$uqID); return;\r
+        }\r
+    }  \r
+    //## Format\r
+    if ($postID=='0') { echo "Testing ... <br/><br/>"; $msg = 'Test Post from '.$blogTitle;  $msgT = 'Test Post from '.$blogTitle;}\r
+      else { $post = get_post($postID); if(!$post) return; $twMsgFormat = $options['pkMsgFormat']; nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));  $twLim = 180;\r
+        $extInfo = ' | PostID: '.$postID." - ".$post->post_title;\r
+      \r
+        if (stripos($twMsgFormat, '%URL%')!==false || stripos($twMsgFormat, '%SURL%')!==false) $twLim = $twLim - 5; \r
+        if (stripos($twMsgFormat, '%AUTHORNAME%')!==false) { $aun = $post->post_author;  $aun = get_the_author_meta('display_name', $aun ); $twLim = $twLim - strlen($aun); } \r
+        \r
+        $noRepl = str_ireplace("%TITLE%", "", $twMsgFormat); $noRepl = str_ireplace("%SITENAME%", "", $noRepl); $noRepl = str_ireplace("%URL%", "", $noRepl);$noRepl = str_ireplace("%RAWEXCERPT%", "", $noRepl);\r
+        $noRepl = str_ireplace("%SURL%", "", $noRepl);$noRepl = str_ireplace("%TEXT%", "", $noRepl);$noRepl = str_ireplace("%FULLTEXT%", "", $noRepl);$noRepl = str_ireplace("%EXCERPT%", "", $noRepl);\r
+        $noRepl = str_ireplace("%ANNOUNCE%", "", $noRepl); $noRepl = str_ireplace("%AUTHORNAME%", "", $noRepl); $twLim = $twLim - strlen($noRepl); \r
+        \r
+        $pTitle = $title = $post->post_title;\r
+        if ($post->post_excerpt!="") $pText = apply_filters('the_content', $post->post_excerpt); else $pText= apply_filters('the_content', $post->post_content);\r
+        $pFullText = apply_filters('the_content', $post->post_content);  $pRawText = $post->post_content;        \r
+               \r
+        if (stripos($twMsgFormat, '%TITLE%')!==false) { $pTitle = nsTrnc($pTitle, $twLim); $twMsgFormat = str_ireplace("%TITLE%", $pTitle, $twMsgFormat); $twLim = $twLim - strlen($pTitle); } \r
+        if (stripos($twMsgFormat, '%SITENAME%')!==false) {\r
+          $siteTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); $siteTitle = nsTrnc($siteTitle, $twLim); $twMsgFormat = str_ireplace("%SITENAME%", $siteTitle, $twMsgFormat); $twLim = $twLim - strlen($siteTitle);\r
+        }        \r
+        if (stripos($twMsgFormat, '%EXCERPT%')!==false) { $pText = nsTrnc(strip_tags(strip_shortcodes($pText)), 300, " ", "...");\r
+          $pText = nsTrnc($pText, $twLim); $twMsgFormat = str_ireplace("%EXCERPT%", $pText, $twMsgFormat); $twLim = $twLim - strlen($pText);\r
+        }\r
+        if (stripos($twMsgFormat, '%FULLTEXT%')!==false) { $pFullText = nsTrnc(strip_tags($pFullText), $twLim); $twMsgFormat = str_ireplace("%FULLTEXT%", $pFullText, $twMsgFormat); $twLim = $twLim - strlen($pFullText); }          \r
+        if (stripos($twMsgFormat, '%RAWTEXT%')!==false) { $pRawText = nsTrnc(strip_tags($pRawText), $twLim); $twMsgFormat = str_ireplace("%FULLTEXT%", $pRawText, $twMsgFormat); $twLim = $twLim - strlen($pRawText); }          \r
+        $options['pkMsgFormat'] = nsFormatMessage($twMsgFormat, $postID, $addParams);         \r
+    } \r
+    if (isset($options['attchImg']) && $options['attchImg']=='1' ) if (!empty($options['imgToUse'])) $imgURL = $options['imgToUse']; else $imgURL = nxs_getPostImage($postID, 'full'); else $imgURL='';\r
+    if (preg_match("/noImg.\.png/i", $imgURL)) $imgURL = ''; \r
+    //## Post             \r
+    $message = array('siteName'=>$blogTitle, 'tags'=>'', 'imageURL'=>$imgURL);// prr($message);\r
+    //## Actual Post\r
+    $ntToPost = new nxs_class_SNAP_PK(); $ret = $ntToPost->doPostToNT($options, $message);\r
+    //## Process Results\r
+    if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+      if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+    } else {  // ## All Good - log it.\r
+      if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+        else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'pDate'=>date('Y-m-d H:i:s'))); nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+    }\r
+    //## Return Result\r
+    if ($ret['isPosted']=='1') return 200; else return print_r($ret, true);     \r
+  }\r
+}\r
+\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/pn.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/pn.api.php
new file mode 100644 (file)
index 0000000..ed28910
--- /dev/null
@@ -0,0 +1,38 @@
+<?php    \r
+//## NextScripts FriendFeed Connection Class\r
+$nxs_snapAPINts[] = array('code'=>'PN', 'lcode'=>'pn', 'name'=>'Pinterest');\r
+\r
+if (!class_exists("nxs_class_SNAP_PN")) { class nxs_class_SNAP_PN {\r
+    \r
+    var $ntCode = 'PN';\r
+    var $ntLCode = 'pn';     \r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array();\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }    \r
+    function doPostToNT($options, $message){ global $nxs_gCookiesArr; $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>'');\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['pnUName']) || trim($options['pnPass'])=='') { $badOut['Error'] = 'Not Configured'; return $badOut; }            \r
+      $pass = substr($options['pnPass'], 0, 5)=='g9c1a'?nsx_doDecode(substr($options['pnPass'], 5)):$options['pnPass'];\r
+      if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      //## Format\r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['pnMsgFormat'], $message); $boardID = $options['pnBoard'];  // prr($boardID); prr($_POST); die();    \r
+      if (isset($message['imageURL'])) $imgURL = trim(nxs_getImgfrOpt($message['imageURL'], $options['imgSize'])); else $imgURL = ''; if ($imgURL=='') $badOut['Error'] .= 'NO Image.';\r
+      $urlToGo = (!empty($message['url']))?$message['url']:'';\r
+      //## Check for existing session      \r
+      if (isset($options['ck'])) $nxs_gCookiesArr = maybe_unserialize( $options['ck']); $loginError = true; if (is_array($nxs_gCookiesArr)) $loginError = doCheckPinterest(); \r
+      if ($loginError!==false) $loginError = doConnectToPinterest($options['pnUName'], $pass);  if ($loginError!==false) { $badOut['Error'] = print_r($loginError, true)." - BAD USER/PASS"; return $badOut; } \r
+      if (preg_match ( '/\$(\d+\.\d+)/', $msg, $matches )) $price = $matches[0];  else $price = '';\r
+      \r
+      if (isset($options['cImgURL']) && $options['cImgURL']=='S' ) $urlToGo = nxs_mkShortURL($urlToGo); elseif (isset($options['cImgURL']) && $options['cImgURL']=='N' ) $urlToGo = '';\r
+      \r
+      $ret = doPostToPinterest($msg, $imgURL, $urlToGo, $boardID, 'TITLE WHERE IS IT?', $price, $urlToGo."/GTH/" ); if ($ret=='OK') $ret = array("code"=>"OK", "post_id"=>'');\r
+      //prr($ret);\r
+      if (is_array($ret) && !empty($ret['post_id'])) return array('postID'=>str_ireplace('/pin/', '', $ret['post_id']), 'isPosted'=>1, 'postURL'=>$ret['post_url'], 'pDate'=>date('Y-m-d H:i:s'));  \r
+        else $badOut['Error'] .= 'Something went wrong - '.print_r($ret, true); \r
+      return $badOut;      \r
+   }    \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/pn.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/pn.php
new file mode 100644 (file)
index 0000000..b9ab2c1
--- /dev/null
@@ -0,0 +1,251 @@
+<?php    \r
+//## NextScripts Facebook Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'PN', 'lcode'=>'pn', 'name'=>'Pinterest');\r
+\r
+if (!class_exists("nxs_snapClassPN")) { class nxs_snapClassPN { var $ntInfo = array('code'=>'PN', 'lcode'=>'pn', 'name'=>'Pinterest', 'defNName'=>'pnUName', 'tstReq' => false);\r
+  //#### Show Common Settings\r
+  function showGenNTSettings($ntOpts){  global $nxs_plurl;  $ntInfo = $this->ntInfo; \r
+    $fMsg = 'Pinterest doesn\'t have a built-in API for automated posts yet. <br/>You need to get a special <a target="_blank" href="http://www.nextscripts.com/pinterest-automated-posting">library module</a> to be able to publish your content to Pinterest.'; \r
+    $ntParams = array('ntInfo'=>$ntInfo, 'nxs_plurl'=>$nxs_plurl, 'ntOpts'=>$ntOpts, 'chkField'=>'apPNUName', 'checkFunc' => array('funcName'=>'doPostToPinterest', 'msg'=>$fMsg)); nxs_showListRow($ntParams);   ?>    \r
+   <?php \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($mgpo){ $po = array('nName'=>'', 'doPN'=>'1', 'pnUName'=>'', 'pnBoard'=>'', 'gpAttch'=>'', 'cImgURL'=>'R', 'pnPass'=>'', 'pnDefImg'=>'', 'pnMsgFormat'=>'', 'pnBoard'=>'', 'pnBoardsList'=>'');\r
+    $po['ntInfo']= array('lcode'=>'pn'); $this->showNTSettings($mgpo, $po, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = '';  ?>\r
+             <div id="doPN<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">     <input type="hidden" name="apDoSPN<?php echo $ii; ?>" value="0" id="apDoSPN<?php echo $ii; ?>" />         \r
+             <?php if (!function_exists('doPostToPinterest') || (defined('d1') && d1==1)) {                 \r
+                 nxs_show_noLibWrn('Pinterest API Library module NOT found.<br/><br/><span style="color:black;">Pinterest doesn\'t have a free native API for automated posts yet.</span><br/><br/><span style="font-size: 12px;color:black;">You need to have a special API Library Module to be able to publish your content to Pinterest.</span>'); echo "</div>"; return; }; \r
+             ?>             \r
+           \r
+            <div id="doPN<?php echo $ii; ?>Div" style="margin-left: 10px;"> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/pn16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/setup-installation-pinterest-social-networks-auto-poster-wordpress/"><?php $nType="Pinterest"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="pn[<?php echo $ii; ?>][nName]" id="pnnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel('pn', $ii, $options['qTLng']); ?>\r
+            \r
+             <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+    \r
+    \r
+                  \r
+            <div style="width:100%;"><strong>Pinterest Email:</strong> </div><input name="pn[<?php echo $ii; ?>][apPNUName]" id="apPNUName<?php echo $ii; ?>" class="apPNUName<?php echo $ii; ?>"  style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['pnUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+            <div style="width:100%;"><strong>Pinterest Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="pn[<?php echo $ii; ?>][apPNPass]" id="apPNPass<?php echo $ii; ?>" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['pnPass'], 0, 5)=='g9c1a'?nsx_doDecode(substr($options['pnPass'], 5)):$options['pnPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>                \r
+\r
+                <strong>Clickthrough URL:</strong> \r
+<p style="margin-bottom: 20px;margin-top: 5px;">\r
+<input type="radio" name="pn[<?php echo $ii; ?>][cImgURL]" value="R" <?php if ( !isset($options['cImgURL']) || $options['cImgURL'] == '' || $options['cImgURL'] == 'R') echo 'checked="checked"'; ?> /> Regular Post URL&nbsp;&nbsp;\r
+<!-- <input type="radio" name="pn[<?php echo $ii; ?>][cImgURL]" value="S" <?php if ($options['cImgURL'] == 'S') echo 'checked="checked"'; ?> /> Shortened Post URL&nbsp;&nbsp; -->\r
+<input type="radio" name="pn[<?php echo $ii; ?>][cImgURL]" value="N" <?php if ($options['cImgURL'] == 'N') echo 'checked="checked"'; ?> /> No Clickthrough URL&nbsp;&nbsp;\r
+\r
+            <div style="width:100%;"><strong>Default Image to Pin:</strong> \r
+            <p style="font-size: 11px; margin: 0px;">If your post does not have any images this will be used instead.</p>\r
+            </div><input name="pn[<?php echo $ii; ?>][apPNDefImg]" id="apPNDefImg" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['pnDefImg'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /> \r
+            <br/><br/>            \r
+            \r
+            <div style="width:100%;"><strong>Board:</strong> \r
+            Please <a href="#" onclick="nxs_getPNBoards(jQuery('<?php if ($isNew) echo "#nsx_addNT "; ?>#apPNUName<?php echo $ii; ?>').val(),jQuery('<?php if ($isNew) echo "#nsx_addNT "; ?>#apPNPass<?php echo $ii; ?>').val(), '<?php echo $ii; ?>'); return false;">click here to retrieve your boards</a>\r
+            </div>\r
+            <img id="pnLoadingImg<?php echo $ii; ?>" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            <select name="pn[<?php echo $ii; ?>][apPNBoard]" id="apPNBoard<?php echo $ii; ?>">\r
+            <?php if ($options['pnBoardsList']!=''){ $gPNBoards = $options['pnBoardsList']; if ( base64_encode(base64_decode($gPNBoards)) === $gPNBoards) $gPNBoards = base64_decode($gPNBoards); \r
+              if ($options['pnBoard']!='') $gPNBoards = str_replace($options['pnBoard'].'"', $options['pnBoard'].'" selected="selected"', $gPNBoards);  echo $gPNBoards;} else { ?>\r
+              <option value="0">None(Click above to retrieve your boards)</option>\r
+            <?php } ?>\r
+            </select>\r
+            \r
+            <br/><br/>            \r
+            \r
+            <div style="margin-bottom: 5px; margin-left: 0px; "><input value="1"  id="isAttachVid" type="checkbox" name="pn[<?php echo $ii; ?>][isAttachVid]"  <?php if (isset($options['isAttachVid']) && (int)$options['isAttachVid'] == 1) echo "checked"; ?> />    <strong><?php _e('If post has a video use it instead of image', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> <i><?php _e('Video will be pinned instead of featured image. Only Youtube is supported at this time.', 'social-networks-auto-poster-facebook-twitter-g'); ?></i>\r
+    <br/></div>\r
+            \r
+            <div id="altFormat" style="">\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Message text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong>  <a href="#" id="apPNMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apPNMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>             \r
+              </div>\r
+              \r
+               <textarea cols="150" rows="3" id="pn<?php echo $ii; ?>SNAPformat" name="pn[<?php echo $ii; ?>][apPNMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#pn<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apPNMsgFrmt<?php echo $ii; ?>');"><?php if ($options['pnMsgFormat']!='') _e(apply_filters('format_to_edit', htmlentities($options['pnMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g');  else echo "%TITLE% - %URL%"; ?></textarea>\r
+              \r
+              <?php nxs_doShowHint("apPNMsgFrmt".$ii); ?>\r
+            </div><br/>    \r
+            <?php if ($isNew) { ?> <input type="hidden" name="pn[<?php echo $ii; ?>][apDoPN]" value="1" id="apDoNewPN<?php echo $ii; ?>" /> <?php } ?>\r
+            <?php if ($options['pnPass']!='') { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('PN', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>         \r
+            <?php } ?>\r
+            \r
+            </div>\r
+      <?php /* ######################## Advanced Tab ####################### */ ?>\r
+   <?php if (!$isNew) { ?>  <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+   <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); \r
+      nxs_showRepostSettings($nt, $ii, $options); ?>\r
+            \r
+            \r
+    </div>   <?php } ?> <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div>\r
+            \r
+            </div>\r
+  </div>\r
+            <?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = $this->ntInfo['code'];\r
+    foreach ($post as $ii => $pval){       \r
+      if (!empty($pval['apPNUName']) && !empty($pval['apPNPass'])){ if (!isset($options[$ii])) $options[$ii] = array();      \r
+        if (isset($pval['apDoPN']))   $options[$ii]['doPN'] = $pval['apDoPN']; else $options[$ii]['doPN'] = 0;\r
+        if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);\r
+        if (isset($pval['apPNUName']))   $options[$ii]['pnUName'] = trim($pval['apPNUName']);\r
+        if (isset($pval['apPNPass']))    $options[$ii]['pnPass'] = 'g9c1a'.nsx_doEncode($pval['apPNPass']); else $options[$ii]['pnPass'] = '';\r
+        if (isset($pval['apPNBoard']))   $options[$ii]['pnBoard'] = trim($pval['apPNBoard']);                \r
+        if (isset($pval['apPNDefImg']))  $options[$ii]['pnDefImg'] = trim($pval['apPNDefImg']);\r
+        if (isset($pval['isAttachVid']))   $options[$ii]['isAttachVid'] = $pval['isAttachVid']; else $options[$ii]['isAttachVid'] = 0;\r
+        if (isset($pval['cImgURL']))        $options[$ii]['cImgURL'] = trim($pval['cImgURL']);   \r
+        \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+        \r
+        if (isset($pval['apPNMsgFrmt'])) $options[$ii]['pnMsgFormat'] = trim($pval['apPNMsgFrmt']);     \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }  \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'pn'; $ntU = 'PN'; //prr($ntOpts);\r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapPN', true)); if (is_array($pMeta) && !empty($pMeta[$ii])) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]); \r
+        if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = ''; if (empty($ntOpt['urlToUse'])) $ntOpt['urlToUse'] = '';\r
+        $doPN = $ntOpt['doPN'] && (is_array($pMeta) || $ntOpt['catSel']!='1');   $imgToUse = $ntOpt['imgToUse'];  $urlToUse = $ntOpt['urlToUse'];  \r
+        $isAvailPN =  $ntOpt['pnUName']!='' && $ntOpt['pnPass']!=''; $pnMsgFormat = htmlentities($ntOpt['pnMsgFormat'], ENT_COMPAT, "UTF-8");        \r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2">\r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvailPN) { ?><input class="nxsGrpDoChb" value="1" id="doPN<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="pn[<?php echo $ii; ?>][doPN]" <?php if ((int)$doPN == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="pn[<?php echo $ii; ?>][doPN]" value="<?php echo $doPN;?>"> <?php } ?> <?php } ?>\r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/pn16.png);">Pinterest - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvailPN) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;"  type="button" class="button" name="rePostToPN_repostButton" id="rePostToPN_button" value="<?php _e('Repost to Pinterest', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php } ?>\r
+\r
+                    <?php  if (is_array($pMeta) && !empty($pMeta[$ii]) && isset($pMeta[$ii]['postURL']) ) {                         \r
+                        ?> <span id="pstdPN<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+          <a style="font-size: 10px;" href="<?php echo $pMeta[$ii]['postURL']; ?>" target="_blank"><?php $nType="Pinterest"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>                \r
+                \r
+                <?php if (!$isAvailPN) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your Pinterest Account to AutoPost to Pinterest</b>\r
+                <?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>pn" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> />\r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>                \r
+                </td></tr> <?php } ?>\r
+                \r
+                <tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;">Select Board</th>\r
+                <td><select name="pn[<?php echo $ii; ?>][apPNBoard]" id="apPNBoard">\r
+            <?php if (!empty($ntOpt['pnBoardsList'])){ $gPNBoards = $ntOpt['pnBoardsList']; if ( base64_encode(base64_decode($gPNBoards)) === $gPNBoards) $gPNBoards = base64_decode($gPNBoards); \r
+              if ($ntOpt['pnBoard']!='') $gPNBoards = str_replace($ntOpt['pnBoard'].'"', $ntOpt['pnBoard'].'" selected="selected"', $gPNBoards);  echo $gPNBoards;} else { ?>\r
+              <option value="0">None(Click above to retrieve your boards)</option>\r
+            <?php } ?>\r
+            </select></td>\r
+                </tr> \r
+                              \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"><?php _e('Text Message Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                <td>                \r
+                <textarea cols="150" rows="1" id="pn<?php echo $ii; ?>SNAPformat" name="pn[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#pn<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apPNMsgFrmt<?php echo $ii; ?>');"><?php echo $pnMsgFormat; ?></textarea>\r
+                <?php nxs_doShowHint("apPNMsgFrmt".$ii); ?></td></tr>                \r
+                  \r
+                 <?php /* ## Select Image & URL ## */ nxs_showImgToUseDlg($nt, $ii, $imgToUse); nxs_showURLToUseDlg($nt, $ii, $urlToUse); ?>               \r
+                <?php } \r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){  if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = '';\r
+     if (isset($pMeta['SNAPformat'])) $optMt['pnMsgFormat'] = $pMeta['SNAPformat'];      \r
+     if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse']; if (isset($pMeta['urlToUse'])) $optMt['urlToUse'] = $pMeta['urlToUse']; \r
+     if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+     if (isset($pMeta['doPN'])) $optMt['doPN'] = $pMeta['doPN'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doPN'] = 0; }\r
+     if (isset($pMeta['apPNBoard']) && $pMeta['apPNBoard']!='' && $pMeta['apPNBoard']!='0') $optMt['pnBoard'] = $pMeta['apPNBoard']; \r
+     if (isset($pMeta['SNAPincludePN']) && $pMeta['SNAPincludePN'] == '1' ) $optMt['doPN'] = 1;  \r
+     return $optMt;\r
+  }  \r
+}}\r
+if (!function_exists("nxs_rePostToPN_ajax")) {\r
+  function nxs_rePostToPN_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; $options = get_option('NS_SNAutoPoster');  \r
+    foreach ($options['pn'] as $ii=>$two) if ($ii==$_POST['nid']) {    $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['gpPageID'].$two['gpUName']==$_POST['nid']) {  \r
+      $po =  get_post_meta($postID, 'snapPN', true); $po =  maybe_unserialize($po);// prr($gppo);\r
+      if (is_array($po) && isset($po[$ii]) && is_array($po[$ii])){ $ntClInst = new nxs_snapClassPN(); $two = $ntClInst->adjMetaOpt($two, $po[$ii]); }\r
+      $result = nxs_doPublishToPN($postID, $two); if ($result == 200) die("Successfully sent your post to Pinterest."); else die($result);        \r
+    }    \r
+  }\r
+}  \r
+\r
+if (!function_exists("nxs_doPublishToPN")) { //## Second Function to Post to G+\r
+  function nxs_doPublishToPN($postID, $options){ global $nxs_gCookiesArr, $plgn_NS_SNAutoPoster; $ntCd = 'PN'; $ntCdL = 'pn'; $ntNm = 'Pinterest';   $price = ''; \r
+    if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true)); if (empty($options['ck'])) $options['ck'] = '';\r
+    // $backtrace = debug_backtrace(); nxs_addToLogN('W', 'Enter', $ntCd, 'I am here - '.$ntCd."|".print_r($backtrace, true), ''); \r
+    //if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToPN',  array($postID, $options)); \r
+    $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName'])); \r
+    $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url(); \r
+    if (empty($options['imgToUse'])) $options['imgToUse'] = ''; if (empty($options['imgSize'])) $options['imgSize'] = ''; if (empty($options['cImgURL'])) $options['cImgURL'] = 'R'; \r
+    \r
+    $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10));\r
+    $logNT = '<span style="color:#FA5069">Pinterest</span> - '.$options['nName'];\r
+    $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);  $isAttachVid = $options['isAttachVid']; \r
+    if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {  sleep(5);\r
+         nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate |'.$uqID); return;\r
+        }\r
+    }\r
+    if ($postID=='0') { echo "Testing ... <br/><br/>"; $options['pnMsgFormat'] = 'Test Post from '.$blogTitle; $urlToGo = home_url(); \r
+      if ($options['pnDefImg']!='') $imgURL = $options['pnDefImg']; else $imgURL ="http://direct.gtln.us/img/nxs/NXS-Lama.jpg"; \r
+    }\r
+    else { $post = get_post($postID); if(!$post) return; $options['pnMsgFormat'] = nsFormatMessage( $options['pnMsgFormat'], $postID, $addParams); \r
+      //## MyURL - URLToGo code\r
+      $options = nxs_getURL($options, $postID, $addParams); $urlToGo = $options['urlToUse']; if (is_object($post)) $urlToGo = apply_filters( 'nxs_adjust_ex_url', $urlToGo, $post->post_content); \r
+            \r
+      if (!empty($options['imgToUse'])) $imgURL = $options['imgToUse']; else $imgURL = nxs_getPostImage($postID, 'full', $options['pnDefImg']); if (preg_match("/noImg.\.png/i", $imgURL)) $imgURL = ''; \r
+      if ($isAttachVid=='1') { $vids = nsFindVidsInPost($post); if (count($vids)>0) { $vidURL = 'http://www.youtube.com/v/'.$vids[0]; $imgURL = 'http://img.youtube.com/vi/'.$vids[0].'/0.jpg'; }}         \r
+      $extInfo = ' | PostID: '.$postID." - ".(is_object($post))?$post->post_title:''; \r
+    }        \r
+    if ($options['cImgURL']=='S') $options['cImgURL'] = 'R'; //## Pinterest no longer allows shorthened URLs.\r
+    //## Post                 \r
+    $message = array('siteName'=>$blogTitle, 'tags'=>'', 'url'=>$urlToGo, 'imageURL'=>$imgURL);// prr($message);\r
+    //## Actual Post\r
+    $ntToPost = new nxs_class_SNAP_PN(); $ret = $ntToPost->doPostToNT($options, $message);\r
+    //## Save Session\r
+    if (serialize($nxs_gCookiesArr)!=$options['ck']) { global $plgn_NS_SNAutoPoster;  $gOptions = $plgn_NS_SNAutoPoster->nxs_options; // prr($gOptions['pn']);\r
+        if (isset($options['ii']) && $options['ii']!=='')  { $gOptions['pn'][$options['ii']]['ck'] = serialize($nxs_gCookiesArr); update_option('NS_SNAutoPoster', $gOptions);  }        \r
+        else foreach ($gOptions['pn'] as $ii=>$gpn) { $result = array_diff($options, $gpn);\r
+          if (!is_array($result) || count($result)<1) { $gOptions['pn'][$ii]['ck'] = serialize($nxs_gCookiesArr); update_option('NS_SNAutoPoster', $gOptions); break; }\r
+        }        \r
+    }    \r
+    //## Process Results\r
+    if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+      if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+    } else {  // ## All Good - log it.\r
+      if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+        else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'postURL'=>$ret['postURL'], 'pDate'=>date('Y-m-d H:i:s'))); \r
+        $extInfo .= ' | <a href="'.$ret['postURL'].'" target="_blank">Post Link</a>';  nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+    } //prr($ret);\r
+    //## Return Result\r
+    if ($ret['isPosted']=='1') return 200; else return print_r($ret, true);     \r
+  }\r
+}  \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/rd.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/rd.api.php
new file mode 100644 (file)
index 0000000..afed8bf
--- /dev/null
@@ -0,0 +1,67 @@
+<?php    \r
+//## NextScripts Twitter Connection Class\r
+\r
+/* \r
+1. Options\r
+\r
+nName - Nickname of the account [Optional] (Presentation purposes only - No affect on functionality)\r
+rdUName - Reddit User Name\r
+rdPass - Reddit User Passord\r
+rdSubReddit - Name of the Sub-Reddit\r
+postType - A or T - "Attached link" or "Text"\r
+\r
+rdTitleFormat\r
+rdTextFormat\r
+\r
+2. Post Info\r
+\r
+url\r
+title - [up to 300 characters long] - title of the submission\r
+text\r
+\r
+*/\r
+$nxs_snapAPINts[] = array('code'=>'RD', 'lcode'=>'rd', 'name'=>'Reddit');\r
+\r
+if (!class_exists("nxs_class_SNAP_RD")) { class nxs_class_SNAP_RD {\r
+    \r
+    var $ntCode = 'RD';\r
+    var $ntLCode = 'rd';\r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array(); // return false;\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }     \r
+    function doPostToNT($options, $message){ global $nxs_urlLen; $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>'');\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['rdUName']) || trim($options['rdUName'])=='' || !isset($options['rdPass']) || trim($options['rdPass'])=='') { $badOut['Error'] = 'No username/password Found'; return $badOut; }      \r
+      //## Format Post\r
+      if (!empty($message['pTitle'])) $title = $message['pTitle']; else $title = nxs_doFormatMsg($options['rdTitleFormat'], $message); $title = nsTrnc($title, 300);  \r
+      if (!empty($message['pText'])) $text = $message['pText']; else $text = nxs_doFormatMsg($options['rdTextFormat'], $message);       \r
+      //## Make Post            \r
+      $pass = substr($options['rdPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['rdPass'], 5)):$options['rdPass'];   $hdrsArr = '';      \r
+      $loginInfo = doConnectToRD($options['rdUName'], $pass); if (!is_array($loginInfo))  {  $badOut['Error'] = print_r($loginInfo, true)." - ERROR"; return $badOut; }  \r
+      $mh = $loginInfo['mh']; $ck = $loginInfo['ck']; $post = array('uh'=>$mh, 'sr'=>$options['rdSubReddit'], 'title'=>$title, 'save'=>true);      \r
+      if ($options['postType']=='A') { $post['url'] = $message['url']; $post['kind']='link'; $retNum = 16; } else { $post['text'] = $text; $post['kind']='self'; $retNum = 10; }         \r
+      $url = "http://www.reddit.com/api/submit"; $postParams = array( 'method' => 'POST', 'timeout' => 45, 'redirection' => 0, 'extension'=>'json',  'headers' => $hdrsArr, 'body' => $post, 'cookies' => $ck);      \r
+      $response = wp_remote_post($url, $postParams); // prr($postParams); prr($response);\r
+      if (is_wp_error($response)) {  $badOut['Error'] = print_r($response, true)." - ERROR"; return $badOut; } \r
+      $response = json_decode($response['body'], true); $rdNewPostID = 'http://www.reddit.com'; // prr($response);\r
+      \r
+      if (!isset($response['jquery']) || !is_array($response['jquery'])) {  $badOut['Error'] = print_r($response, true)." - ERROR"; return $badOut; } \r
+      $r = $response['jquery']; if (is_array($r[$retNum][3]) && count($r[$retNum][3])>0 && stripos($r[$retNum][3][0], 'http://')!==false) $rdNewPostID = $r[$retNum][3][0];             \r
+      if (isset($r[18]) && is_array($r[18][3]) && count($r[18][3])>0 && stripos($r[18][3][0], 'error.BAD_CAPTCHA')!==false ) {  $badOut['Error'] = "ERROR: Post Rejected. Reddit thinks that you don't have rights to post here"; return $badOut; } \r
+      if (isset($r[18]) && is_array($r[18][3]) && count($r[18][3])>0 && stripos($r[18][3][0], 'error')!==false ) {  $badOut['Error'] = "ERROR: ".$r[18][3][0]; return $badOut; } \r
+      if (is_array($r[$retNum][3]) && count($r[$retNum][3])>0 && stripos($r[$retNum][3][0], 'http://')===false) {  $badOut['Error'] = print_r($r[$retNum][3][0], true)." - ERROR"; return $badOut; } \r
+      if (isset($r[18]) && is_array($r[18][3]) && count($r[18][3])>0 && stripos($r[18][3][0], 'already been submitted')!==false ) $rdNewPostID .= str_ireplace('?already_submitted=true', '', $r[10][3][0]); \r
+      // echo "ID:".$rdNewPostID;\r
+      if ($rdNewPostID!='http://www.reddit.com') {         \r
+         return array('postID'=>$rdNewPostID, 'isPosted'=>1, 'postURL'=>$rdNewPostID, 'pDate'=>date('Y-m-d H:i:s'));          \r
+      } else { $badOut['Error'] .= print_r($tmhOAuth->response['response'], true)." MSG:".print_r($msg, true); \r
+        return $badOut;\r
+      }\r
+      return $badOut;\r
+    }  \r
+    \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/rd.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/rd.php
new file mode 100644 (file)
index 0000000..666ac25
--- /dev/null
@@ -0,0 +1,265 @@
+<?php    \r
+//## NextScripts Reddit Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'RD', 'lcode'=>'rd', 'name'=>'Reddit');\r
+\r
+if (!class_exists("nxs_snapClassRD")) { class nxs_snapClassRD {  \r
+  //#### Show Common Settings\r
+  function showGenNTSettings($ntOpts){  global $nxs_plurl; $ntInfo = array('code'=>'RD', 'lcode'=>'rd', 'name'=>'Reddit', 'defNName'=>'rdUName', 'tstReq' => false); ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php if(!function_exists('doConnectToRD')) {?> Reddit doesn't have a built-in API for automated posts yet.  <br/>You need to get a special <a target="_blank" href="http://www.nextscripts.com/reddit-automated-posting">library module</a> to be able to publish your content to Reddit. \r
+        <?php } else  foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>\r
+          <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />\r
+           <?php } ?>\r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;\r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($mrdo){ $rdo = array('nName'=>'', 'doRD'=>'1', 'rdUName'=>'', 'rdPageID'=>'', 'rdCommID'=>'', 'postType'=>'A', 'rdPass'=>''); $rdo['ntInfo']= array('lcode'=>'rd'); $this->showNTSettings($mrdo, $rdo, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['rdSubReddit'])) $options['rdSubReddit'] = ''; ?>\r
+            <div id="doRD<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">     <input type="hidden" name="apDoSRD<?php echo $ii; ?>" value="0" id="apDoSRD<?php echo $ii; ?>" />      \r
+            \r
+            <?php if(!function_exists('doConnectToRD')) {                \r
+                 nxs_show_noLibWrn('Reddit API Library module NOT found.<br/><br/><span style="color:black;">Reddit does not have a free native API for automated posts yet.</span><br/><br/><span style="font-size: 12px;color:black;">You need to have a special API Library Module to be able to publish your content to Reddit.</span>'); echo "</div>"; return; }; ?>              \r
+                               \r
+            <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/rd16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/setup-installation-reddit-social-networks-auto-poster-wordpress/"><?php $nType="Reddit"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="rd[<?php echo $ii; ?>][nName]" id="rdnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel('rd', $ii, $options['qTLng']); ?>\r
+            \r
+            \r
+          <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+      \r
+            \r
+            <div style="width:100%;"><strong>Reddit Username:</strong> </div><input name="rd[<?php echo $ii; ?>][uName]" id="apRDUName<?php echo $ii; ?>" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['rdUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+            <div style="width:100%;"><strong>Reddit Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="rd[<?php echo $ii; ?>][uPass]" id="apRDPass<?php echo $ii; ?>" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['rdPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['rdPass'], 5)):$options['rdPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>                \r
+            \r
+            <div style="width:100%;"><strong>Subreddit ID:</strong>                         \r
+            Please <a href="#" onclick="nxs_getBrdsOrCats(jQuery('<?php if ($isNew) echo "#nsx_addNT "; ?>#apRDUName<?php echo $ii; ?>').val(),jQuery('<?php if ($isNew) echo "#nsx_addNT "; ?>#apRDPass<?php echo $ii; ?>').val(), 'rd' , '<?php echo $ii; ?>', 'rdSubReddit'); return false;">click here to retrieve your subreddits</a>\r
+            </div>\r
+            <img id="rdLoadingImg<?php echo $ii; ?>" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' /> \r
+            <select name="rd[<?php echo $ii; ?>][rdSubReddit]" id="rdSubReddit<?php echo $ii; ?>">\r
+            <?php if ($options['rdSubRedditsList']!=''){ $gBoards = $options['rdSubRedditsList']; if ( base64_encode(base64_decode($gBoards)) === $gBoards) $gBoards = base64_decode($gBoards); \r
+              if ($options['rdSubReddit']!='') $gBoards = str_replace($options['rdSubReddit'].'"', $options['rdSubReddit'].'" selected="selected"', $gBoards);  echo $gBoards;} else { ?>\r
+              <option value="0">None(Click above to retrieve your subreddits)</option>\r
+            <?php } ?>\r
+            </select>\r
+            \r
+            <br/><br/>              \r
+            <?php /* <input name="rd[<?php echo $ii; ?>][rdSubReddit]" id="apRDPage" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['rdSubReddit'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  */ ?>\r
+            <i style="color: #580000;">Please do not try to post to subredits that you do not own. Reddit is very serious about it's policy that prohibits sharing your own links. You will loose posting privileges and you account will be <b>banned</b> if you post to public subreddits. </i>\r
+            <br/>  <br/>  \r
+            \r
+            <div id="altFormat" style="">\r
+  <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> (<a href="#" id="rdTitleFormat<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('rdTitleFormat<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div>\r
+              <input name="rd[<?php echo $ii; ?>][rdTitleFormat]" id="rdTitleFormat<?php echo $ii; ?>" style="width: 50%;" value="<?php if ($isNew) echo "%TITLE%"; else _e(apply_filters('format_to_edit', htmlentities($options['rdTitleFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?>"  onfocus="mxs_showFrmtInfo('rdTitleFormat<?php echo $ii; ?>');" /><?php nxs_doShowHint("rdTitleFormat".$ii); ?>\r
+            </div><br/> \r
+            \r
+     <div style="width:100%;"><strong id="altFormatText">Post Type:</strong></div>                      \r
+      <div style="margin-left: 10px;">\r
+        <input type="radio" name="rd[<?php echo $ii; ?>][postType]" value="A" <?php if ( !isset($options['postType']) || $options['postType'] == '' || $options['postType'] == 'A') echo 'checked="checked"'; ?> /> <?php _e('Link Post', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+        <br/>\r
+        <input type="radio" name="rd[<?php echo $ii; ?>][postType]" value="T" <?php if ($options['postType'] == 'T') echo 'checked="checked"'; ?> /> <?php _e('Text Post', 'social-networks-auto-poster-facebook-twitter-g'); ?> - <i><?php _e('set the text format below', 'social-networks-auto-poster-facebook-twitter-g'); ?></i>\r
+     </div><br/>\r
+                      \r
+            <div id="altFormat" style="margin-left: 20px;">\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="rdTextFormat<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('rdTextFormat<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)\r
+              </div>\r
+              \r
+              <textarea cols="150" rows="3" id="rd<?php echo $ii; ?>SNAPformat" name="rd[<?php echo $ii; ?>][rdTextFormat]" style="width:51%;max-width: 650px;" onfocus="jQuery('#rd<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apRDMsgFrmt<?php echo $ii; ?>');"><?php if ($isNew) _e("New post (%TITLE%) has been published on %SITENAME%", 'social-networks-auto-poster-facebook-twitter-g'); else _e(apply_filters('format_to_edit', htmlentities($options['rdTextFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea>\r
+              \r
+              <?php nxs_doShowHint("rdTextFormat".$ii); ?>\r
+            </div><br/>          \r
+            \r
+            \r
+            <?php if ($isNew) { ?> <input type="hidden" name="rd[<?php echo $ii; ?>][apDoRD]" value="1" id="apDoNewRD<?php echo $ii; ?>" /> <?php } ?>\r
+            <?php if ($options['rdPass']!='') { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('RD', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>              <?php } \r
+            ?>\r
+            </div>\r
+            \r
+            <?php /* ######################## Advanced Tab ####################### */ ?>\r
+    <?php if (!$isNew) { ?>  <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+   <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); \r
+      nxs_showRepostSettings($nt, $ii, $options); ?>\r
+            \r
+            \r
+    </div>  <?php } ?> <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div>\r
+            \r
+            </div><?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = 'RD'; $lcode = 'rd'; \r
+    foreach ($post as $ii => $pval){     \r
+      if (!empty($pval['uName']) && !empty($pval['uPass'])){ if (!isset($options[$ii])) $options[$ii] = array();      \r
+        if (isset($pval['uName']))   $options[$ii]['rdUName'] = trim($pval['uName']);\r
+        if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);\r
+        if (isset($pval['uPass']))    $options[$ii]['rdPass'] = 'n5g9a'.nsx_doEncode($pval['uPass']); else $options[$ii]['rdPass'] = '';  \r
+        \r
+        if (empty($options[$ii]['rdSubRedditsList'])) { $pass = substr($options[$ii]['rdPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options[$ii]['rdPass'], 5)):$options[$ii]['rdPass'];\r
+           $loginInfo = doConnectToRD($options[$ii]['rdUName'], $pass); if (is_array($loginInfo))  { \r
+               $options[$ii]['rdSubRedditsList'] = doGetSubredditsFromRD();\r
+           }  \r
+        }\r
+        \r
+        if (isset($pval['rdSubReddit'])) $options[$ii]['rdSubReddit'] = trim($pval['rdSubReddit']);          \r
+        \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+                      \r
+        if (isset($pval['postType']))   $options[$ii]['postType'] = $pval['postType'];         \r
+        if (isset($pval['rdTitleFormat'])) $options[$ii]['rdTitleFormat'] = trim($pval['rdTitleFormat']);\r
+        if (isset($pval['rdTextFormat'])) $options[$ii]['rdTextFormat'] = trim($pval['rdTextFormat']);\r
+        \r
+        if (isset($pval['apDoRD']))      $options[$ii]['doRD'] = $pval['apDoRD']; else $options[$ii]['doRD'] = 0; \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }  \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){global $nxs_plurl; $post_id = $post->ID; $nt = 'rd'; $ntU = 'RD'; \r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapRD', true));  if (!empty($pMeta) && is_array($pMeta)) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]); \r
+        $doRD = $ntOpt['doRD'] && (is_array($pMeta) || $ntOpt['catSel']!='1');   \r
+        $isAvailRD =  $ntOpt['rdUName']!='' && $ntOpt['rdPass']!='';   $rdMsgFormat = htmlentities($ntOpt['rdTextFormat'], ENT_COMPAT, "UTF-8");      $rdMsgTFormat = htmlentities($ntOpt['rdTitleFormat'], ENT_COMPAT, "UTF-8");      \r
+        $rdPostType = $ntOpt['postType'];\r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2">\r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvailRD) { ?><input class="nxsGrpDoChb" value="1" id="doRD<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="rd[<?php echo $ii; ?>][doRD]" <?php if ((int)$doRD == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="rd[<?php echo $ii; ?>][doRD]" value="<?php echo $doRD;?>"> <?php } ?> <?php } ?>\r
+      \r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/rd16.png);">Reddit - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvailRD) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToRD_repostButton" id="rePostToRD_button" value="<?php _e('Repost to Reddit', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php } ?>\r
+                    \r
+                    <?php  if (is_array($pMeta) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) { \r
+                        \r
+                        ?> <span id="pstdRD<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+                      <a style="font-size: 10px;" href="<?php echo $pMeta[$ii]['pgID']; ?>" target="_blank"><?php $nType="Reddit"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>                \r
+                \r
+                <?php if (!$isAvailRD) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your Reddit Account to AutoPost to Reddit</b></td></tr>\r
+                <?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>rd" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> />\r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>                \r
+                </td></tr> <?php } ?>\r
+                \r
+                \r
+       <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Title Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+        <td><input value="<?php echo $rdMsgTFormat ?>" type="text" name="rd[<?php echo $ii; ?>][SNAPformatT]" style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apRDMsgTFrmt<?php echo $ii; ?>');"/><?php nxs_doShowHint("apRDMsgTFrmt".$ii, '', '58'); ?></td></tr>  \r
+                \r
+       <tr><th scope="row" style="text-align:right; width:150px; vertical-align:top; padding-top: 0px; padding-right:10px;"> <?php _e('Post Type:', 'social-networks-auto-poster-facebook-twitter-g') ?> </th><td>             \r
+        <input type="radio" name="rd[<?php echo $ii; ?>][postType]" value="A" <?php if ( !isset($rdPostType) || $rdPostType == '' || $rdPostType == 'A') echo 'checked="checked"'; ?> /><?php _e('Link Post', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+        <br/>\r
+      <input type="radio" name="rd[<?php echo $ii; ?>][postType]" value="T" <?php if ($rdPostType == 'T') echo 'checked="checked"'; ?> /> <?php _e('Text Post', 'social-networks-auto-poster-facebook-twitter-g') ?><br/>               \r
+     </td></tr>\r
+     \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top;  padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th><td>                \r
+                \r
+                <textarea cols="150" rows="1" id="rd<?php echo $ii; ?>SNAPformat" name="rd[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#rd<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apRDMsgFrmt<?php echo $ii; ?>');"><?php echo $rdMsgFormat ?></textarea>                \r
+                \r
+                </td></tr>\r
+           <?php } \r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = ''; \r
+    if (isset($pMeta['SNAPformat'])) $optMt['rdTextFormat'] = $pMeta['SNAPformat'];  if (isset($pMeta['SNAPformatT'])) $optMt['rdTitleFormat'] = $pMeta['SNAPformatT'];  \r
+    if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse']; \r
+    if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+    if (isset($pMeta['postType'])) $optMt['postType'] = $pMeta['postType'];\r
+    if (isset($pMeta['doRD'])) $optMt['doRD'] = $pMeta['doRD'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doRD'] = 0; } \r
+    if (isset($pMeta['SNAPincludeRD']) && $pMeta['SNAPincludeRD'] == '1' ) $optMt['doRD'] = 1;  \r
+    return $optMt;\r
+  }  \r
+}}\r
+if (!function_exists("nxs_rePostToRD_ajax")) {\r
+  function nxs_rePostToRD_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+    foreach ($options['rd'] as $ii=>$two) if ($ii==$_POST['nid']) {   $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['rdPageID'].$two['rdUName']==$_POST['nid']) {  \r
+      $rdpo =  get_post_meta($postID, 'snapRD', true); $rdpo =  maybe_unserialize($rdpo);// prr($rdpo);\r
+      if (is_array($rdpo) && isset($rdpo[$ii]) && is_array($rdpo[$ii])){ $ntClInst = new nxs_snapClassRD(); $two = $ntClInst->adjMetaOpt($two, $rdpo[$ii]); } \r
+      $result = nxs_doPublishToRD($postID, $two); if ($result == 200) die("Successfully sent your post to Reddit."); else die($result);        \r
+    }    \r
+  }\r
+}  \r
+if (!function_exists("nxs_doPublishToRD")) { //## Second Function to Post to RD\r
+  function nxs_doPublishToRD($postID, $options){ $ntCd = 'RD'; $ntCdL = 'rd'; $ntNm = 'Reddit'; if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));       \r
+      $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+      $logNT = '<span style="color:#800000">Reddit</span> - '.$options['nName'];      \r
+      $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+      $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName'])); \r
+      if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {  \r
+           nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'); return;\r
+        }\r
+      }       \r
+      $message = array('message'=>'', 'link'=>'', 'imageURL'=>'', 'videoURL'=>''); \r
+      \r
+      if ($postID=='0') { echo "Testing ... <br/><br/>"; $message['description'] = 'Test Post, Description';  $message['title'] = 'Test Post - Title';  $message['url'] = home_url();    \r
+      } else { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));  $post = get_post($postID); if(!$post) return; \r
+        $rdPostType = $options['postType']; \r
+        $options['rdTitleFormat'] = nsFormatMessage($options['rdTitleFormat'], $postID);  $options['rdTextFormat'] = nsFormatMessage($options['rdTextFormat'], $postID); // prr($msg); echo $postID;\r
+        $extInfo = ' | PostID: '.$postID." - ".$post->post_title;\r
+        $options = nxs_getURL($options, $postID, $addParams); $urlToGo = $options['urlToUse'];     \r
+        $message = array('message'=>$options['rdTextFormat'], 'url'=>$urlToGo, 'title'=>$options['rdTitleFormat']);\r
+      }            \r
+      //## Actual Post\r
+      $ntToPost = new nxs_class_SNAP_RD(); $ret = $ntToPost->doPostToNT($options, $message); // echo "~~~"; prr($ret); echo "+++";\r
+      //## Process Results\r
+      if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+         if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+      } else {  // ## All Good - log it.\r
+        if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+          else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'pDate'=>date('Y-m-d H:i:s'))); \r
+          $extInfo .= ' | <a href="'.$ret['postURL'].'" target="_blank">Post Link</a>'; nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+      }\r
+      //## Return Result\r
+      if ($ret['isPosted']=='1') return 200; else return print_r($ret, true);      \r
+      \r
+  } \r
+}  \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/sc.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/sc.api.php
new file mode 100644 (file)
index 0000000..0686213
--- /dev/null
@@ -0,0 +1,67 @@
+<?php    \r
+//## NextScripts App.net Connection Class\r
+\r
+/* \r
+1. Options\r
+\r
+nName - Nickname of the account [Optional] (Presentation purposes only - No affect on functionality)\r
+rdUName - Reddit User Name\r
+rdPass - Reddit User Passord\r
+rdSubReddit - Name of the Sub-Reddit\r
+postType - A or T - "Attached link" or "Text"\r
+\r
+rdTitleFormat\r
+rdTextFormat\r
+\r
+2. Post Info\r
+\r
+url\r
+title - [up to 300 characters long] - title of the submission\r
+text\r
+\r
+*/\r
+$nxs_snapAPINts[] = array('code'=>'SC', 'lcode'=>'sc', 'name'=>'Scoop.It');\r
+\r
+if (!class_exists("nxs_class_SNAP_SC")) { class nxs_class_SNAP_SC {\r
+    \r
+    var $ntCode = 'SC';\r
+    var $ntLCode = 'sc';\r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array(); // return false;\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }\r
+\r
+    function doPostToNT($options, $message){ global $nxs_urlLen; $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>'');\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['accessToken']) || trim($options['accessToken'])=='') { $badOut['Error'] = 'Not Authorized'; return $badOut; }      \r
+      if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      //## Format Post\r
+      if (!empty($message['pText'])) $text = $message['pText']; else $text = nxs_doFormatMsg($options['msgFrmt'], $message);\r
+      if (!empty($message['pTitle'])) $msgT = $message['pTitle']; else $msgT = nxs_doFormatMsg($options['msgTFrmt'], $message); \r
+      //## Make Post            \r
+      if (isset($message['imageURL'])) $imgURL = trim(nxs_getImgfrOpt($message['imageURL'], $options['imgSize'])); else $imgURL = '';  $postType = $options['postType'];       \r
+      \r
+      require_once('apis/scOAuth.php');   $tum_oauth = new wpScoopITOAuth($options['appKey'], $options['appSec'], $options['accessToken'], $options['accessTokenSec']);\r
+      $tiID = $tum_oauth->makeReq('http://www.scoop.it/api/1/topic', array('urlName'=>$options['topicURL']));  \r
+      if (!empty($tiID) && is_array($tiID) && !empty($tiID['topic']) && !empty($tiID['topic']['id'])) $tiID = $tiID['topic']['id']; else { $badOut['Error'] .= print_r($tiID, true); return $badOut; }\r
+      $postArr = array('action'=>'create', 'title'=>$msgT, 'content'=>$text, 'url'=>$postType=='A'?$message['url']:'', 'imageUrl'=>(($postType=='I' || $postType=='A') && !empty($imgURL))?$imgURL:'', 'topicId'=>$tiID);  \r
+      $postinfo = $tum_oauth->makeReq('http://www.scoop.it/api/1/post', $postArr, 'POST'); // prr($postinfo);\r
+      \r
+      if (is_array($postinfo) && isset($postinfo['post'])) { $apNewPostID = $postinfo['post']['id']; $apNewPostURL = $postinfo['post']['scoopUrl']; \r
+        if ($options['inclTags']=='1') { $postArr = array('action'=>'edit', 'tag'=>$message['tags'], 'id'=>$apNewPostID);  \r
+          $postinfo = $tum_oauth->makeReq('http://www.scoop.it/api/1/post', $postArr, 'POST'); \r
+        }\r
+              \r
+      } $code = $tum_oauth->http_code;\r
+      if (!empty($apNewPostID)) {         \r
+         return array('postID'=>$apNewPostID, 'isPosted'=>1, 'postURL'=>$apNewPostURL, 'pDate'=>date('Y-m-d H:i:s'));          \r
+      } else { $badOut['Error'] .= print_r($postinfo, true)." Code:".$tum_oauth->http_code; \r
+        return $badOut;\r
+      }\r
+      return $badOut;\r
+    }  \r
+    \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/sc.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/sc.php
new file mode 100644 (file)
index 0000000..9f656ca
--- /dev/null
@@ -0,0 +1,306 @@
+<?php    \r
+//## NextScripts App.net Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'SC', 'lcode'=>'sc', 'name'=>'Scoop.It');\r
+\r
+if (!class_exists("nxs_snapClassSC")) { class nxs_snapClassSC { var $ntInfo = array('code'=>'SC', 'lcode'=>'sc', 'name'=>'Scoop.It', 'defNName'=>'', 'tstReq' => true);\r
+  //#### Show Common Settings\r
+  function showGenNTSettings($ntOpts){  global $nxs_plurl, $nxs_snapSetPgURL;  $ntInfo = $this->ntInfo;\r
+    if ( isset($_GET['auth']) && $_GET['auth']==$ntInfo['lcode']){ require_once('apis/scOAuth.php'); $options = $ntOpts[$_GET['acc']];\r
+              \r
+              $consumer_key = $options['appKey']; $consumer_secret = $options['appSec'];\r
+              $callback_url = $nxs_snapSetPgURL."&auth=".$ntInfo['lcode']."a&acc=".$_GET['acc'];\r
+             \r
+              $tum_oauth = new wpScoopITOAuth($consumer_key, $consumer_secret); \r
+              $request_token = $tum_oauth->getReqToken($callback_url); \r
+              $options['oAuthToken'] = $request_token['oauth_token'];\r
+              $options['oAuthTokenSecret'] = $request_token['oauth_token_secret'];\r
+\r
+              //prr($tum_oauth); prr($options); die();\r
+              \r
+              switch ($tum_oauth->http_code) { case 200: $url = 'http://www.scoop.it/oauth/authorize?oauth_token='.$options['oAuthToken']; \r
+                $optionsG = get_option('NS_SNAutoPoster'); $optionsG[$ntInfo['lcode']][$_GET['acc']] = $options;  update_option('NS_SNAutoPoster', $optionsG);\r
+                echo '<br/><br/>All good?! Redirecting ..... <script type="text/javascript">window.location = "'.$url.'"</script>'; break; \r
+                default: echo '<br/><b style="color:red">Could not connect to ScoopIT. Refresh the page or try again later.</b>'; die();\r
+              }\r
+              die();\r
+            }\r
+    if ( isset($_GET['auth']) && $_GET['auth']==$ntInfo['lcode'].'a'){ require_once('apis/scOAuth.php'); $options = $ntOpts[$_GET['acc']];\r
+              $consumer_key = $options['appKey']; $consumer_secret = $options['appSec'];\r
+            \r
+              $tum_oauth = new wpScoopITOAuth($consumer_key, $consumer_secret, $options['oAuthToken'], $options['oAuthTokenSecret']); //prr($tum_oauth);\r
+              $access_token = $tum_oauth->getAccToken($_GET['oauth_verifier']); prr($access_token);\r
+              $options['accessToken'] = $access_token['oauth_token'];  $options['accessTokenSec'] = $access_token['oauth_token_secret'];              \r
+              $optionsG = get_option('NS_SNAutoPoster'); $optionsG[$ntInfo['lcode']][$_GET['acc']] = $options;  update_option('NS_SNAutoPoster', $optionsG);              \r
+              $tum_oauth = new wpScoopITOAuth($consumer_key, $consumer_secret, $options['accessToken'], $options['accessTokenSec']);               \r
+              $uinfo = $tum_oauth->makeReq('http://www.scoop.it/api/1/profile', ''); \r
+              if (is_array($uinfo) && isset($uinfo['user'])) { $options['appAppUserName'] = $uinfo['user']['name']."(".$uinfo['user']['shortName'].")";                            \r
+                $options['appAppUserID'] = $uinfo['user']['id']; $optionsG = get_option('NS_SNAutoPoster'); $optionsG[$ntInfo['lcode']][$_GET['acc']] = $options;  update_option('NS_SNAutoPoster', $optionsG);\r
+              } //die();\r
+              if (!empty($options['appAppUserID'])) {  echo '<br/><br/>All good?! Redirecting ..... <script type="text/javascript">window.location = "'.$nxs_snapSetPgURL.'"</script>'; break;  die();}\r
+                else die("<span style='color:red;'>ERROR: Authorization Error: <span style='color:darkred; font-weight: bold;'>".print_r($uinfo, true)."</span></span>");              \r
+            }\r
+    \r
+  ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $ntInfo['name']; \r
+          if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['appAppUserID']) && $pbo['appAppUserID']>1)?'1':'';\r
+        ?>\r
+            <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            \r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> /> \r
+            \r
+            <?php } ?>\r
+            \r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?>\r
+          <a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;          \r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($options){ $opts = array('nName'=>'', 'doSC'=>'1', 'appKey'=>'', 'appSec'=>'', 'topicURL'=>'', 'inclTags'=>'1', 'postType'=>'A'); $opts['ntInfo']= $this->ntInfo; $this->showNTSettings($options, $opts, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl, $nxs_snapSetPgURL; $ntInfo = $this->ntInfo; $nt = $ntInfo['lcode']; $ntU = $ntInfo['code']; \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['topicURL'])) $options['topicURL'] = '';     \r
+    if (!isset($options['appKey'])) $options['appKey'] = ''; if (!isset($options['appSec'])) $options['appSec'] = '';  ?>    \r
+            <div id="do<?php echo $ntU; ?><?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">     \r
+            <input type="hidden" value="0" id="apDoS<?php echo $ntU.$ii; ?>" />\r
+            <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/instructions/scoopit-social-networks-auto-poster-setup-installation/"><?php $nType=$ntInfo['name']; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][nName]" id="apnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel($nt, $ii, $options['qTLng']); ?>\r
+            <br/>\r
+                <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+            \r
+            <div style="width:100%;"><strong><?php echo $nType; ?> Consumer Key:</strong> </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][appKey]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['appKey'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+            <div style="width:100%;"><strong><?php echo $nType; ?> Consumer Secret:</strong> </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][appSec]"  style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['appSec'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>                \r
+            <div style="width:100%;"><strong><?php echo $nType; ?> Topic URL:</strong> </div>http://www.scoop.it/t/<input name="<?php echo $nt; ?>[<?php echo $ii; ?>][topicURL]"  style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['topicURL'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>                \r
+              <br/>  \r
+              \r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="msgFrmtT<?php echo $ntU.$ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('msgFrmtT<?php echo $ntU.$ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div>               \r
+              <input name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgTFrmt]" style="width: 50%;" value="<?php if (!empty($options['msgTFrmt'])) _e(apply_filters('format_to_edit', htmlentities($options['msgTFrmt'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); else echo "%TITLE%"; ?>" onfocus="mxs_showFrmtInfo('msgFrmtT<?php echo $ntU.$ii; ?>');" /><?php nxs_doShowHint("msgFrmtT".$ntU.$ii); ?><br/>              \r
+                      \r
+            <div id="altFormat" style="margin-left: 0px;">\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="msgFrmt<?php echo $ntU; ?><?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('msgFrmt<?php echo $ntU; ?><?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)\r
+              </div>\r
+              \r
+              <textarea cols="150" rows="3" id="<?php echo $nt; ?><?php echo $ii; ?>msgFrmt" name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#<?php echo $nt; ?><?php echo $ii; ?>msgFrmt').attr('rows', 6); mxs_showFrmtInfo('msgFrmt<?php echo $ntU.$ii; ?>');"><?php if ($isNew) _e("%EXCERPT% \r\n\r\n%URL%", 'social-networks-auto-poster-facebook-twitter-g'); else _e(apply_filters('format_to_edit', htmlentities($options['msgFrmt'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea><?php nxs_doShowHint("msgFrmt".$ntU.$ii); ?>\r
+            </div>\r
+   \r
+            <p style="margin-bottom: 20px;margin-top: 5px;"><input value="1" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][inclTags]"  <?php if ((int)$options['inclTags'] == 1) echo "checked"; ?> /> \r
+              <strong><?php _e('Post with tags', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong>  <?php _e('Tags from the blogpost will be auto-posted to '.$ntInfo['name'], 'social-networks-auto-poster-facebook-twitter-g'); ?>                                                               \r
+            </p>\r
+            \r
+            <div style="width:100%;"><strong id="altFormatText">Post Type:</strong></div>                      \r
+            <div style="margin-left: 10px;">\r
+              <input type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][postType]" value="T" <?php if ($options['postType'] == 'T') echo 'checked="checked"'; ?> /> <?php _e('Text Post', 'social-networks-auto-poster-facebook-twitter-g'); ?> - <i><?php _e('just text message', 'social-networks-auto-poster-facebook-twitter-g'); ?></i><br/>                    \r
+              <input type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][postType]" value="I" <?php if ($options['postType'] == 'I') echo 'checked="checked"'; ?> /> <?php _e('Image Post', 'social-networks-auto-poster-facebook-twitter-g'); ?> - <i><?php _e('big image with text message', 'social-networks-auto-poster-facebook-twitter-g'); ?></i><br/>\r
+              <input type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][postType]" value="A" <?php if ( !isset($options['postType']) || $options['postType'] == '' || $options['postType'] == 'A') echo 'checked="checked"'; ?> /> <?php _e('Add blogpost to message as an attachment', 'social-networks-auto-poster-facebook-twitter-g'); ?><br/>\r
+            </div>\r
+   \r
+            <br/><br/>\r
+            <?php  if($options['appKey']=='') { ?>\r
+            <b><?php _e('Authorize Your '.$ntInfo['name'].' Account', 'social-networks-auto-poster-facebook-twitter-g'); ?></b> <?php _e('Please click "Update Settings" to be able to Authorize your account.', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+            <?php } else { if(isset($options['appAppUserID']) && $options['appAppUserID']>0) { ?>\r
+            <?php _e('Your '.$ntInfo['name'].' Account has been authorized.', 'social-networks-auto-poster-facebook-twitter-g'); ?> User ID: <?php _e(apply_filters('format_to_edit', htmlentities($options['appAppUserID'].' - '.$options['appAppUserName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>.\r
+            <?php _e('You can', 'social-networks-auto-poster-facebook-twitter-g'); ?> Re- <?php } ?>            \r
+            <a href="<?php echo $nxs_snapSetPgURL;?>&auth=<?php echo $nt; ?>&acc=<?php echo $ii; ?>">Authorize Your <?php echo $ntInfo['name']; ?> Account</a> \r
+            \r
+            <?php if (!isset($options['appAppUserID']) || $options['appAppUserID']<1) { ?> <div class="blnkg">&lt;=== <?php _e('Authorize your account', 'social-networks-auto-poster-facebook-twitter-g'); ?> ===</div> <?php }?>\r
+            <?php } ?>\r
+            <br/><br/>            \r
+            \r
+            <?php if ($isNew) { ?> <input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][apDo<?php echo $ntU; ?>]" value="1" id="apDoNew<?php echo $ntU; ?><?php echo $ii; ?>" /> <?php } ?>\r
+            <?php if (isset($options['appAppUserID']) && $options['appAppUserID']>0) { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('<?php echo $ntU; ?>', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>              <?php } \r
+            ?>\r
+    \r
+     </div>\r
+      <?php /* ######################## Tools Tab ####################### */ ?>\r
+    <?php if (!$isNew) { ?><div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">    \r
+    <?php nxs_showCatTagsCTFilters($nt, $ii, $options);\r
+          nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);\r
+          nxs_showRepostSettings($nt, $ii, $options); ?>      \r
+    </div> <?php } ?>       <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div>\r
+            \r
+            \r
+            </div><?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = $this->ntInfo['code']; \r
+    foreach ($post as $ii => $pval){ \r
+      if (isset($pval['appKey']) && $pval['appKey']!=''){ if (!isset($options[$ii])) $options[$ii] = array();\r
+        \r
+        if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+        if (isset($pval['nName']))  $options[$ii]['nName'] = trim($pval['nName']);  \r
+        \r
+        if (isset($pval['appKey'])) $options[$ii]['appKey'] = trim($pval['appKey']);        \r
+        if (isset($pval['appSec'])) $options[$ii]['appSec'] = trim($pval['appSec']);        \r
+        if (isset($pval['topicURL'])) $options[$ii]['topicURL'] = trim($pval['topicURL']);                  \r
+        \r
+                \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';                                 \r
+        \r
+        if (isset($pval['postType'])) $options[$ii]['postType'] = $pval['postType'];         \r
+        if (isset($pval['inclTags'])) $options[$ii]['inclTags'] = trim($pval['inclTags']); else $options[$ii]['inclTags'] = 0;\r
+        if (isset($pval['msgFrmt'])) $options[$ii]['msgFrmt'] = trim($pval['msgFrmt']);        \r
+        if (isset($pval['msgTFrmt'])) $options[$ii]['msgTFrmt'] = trim($pval['msgTFrmt']);        \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }  \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = $this->ntInfo['lcode']; $ntU = $this->ntInfo['code'];\r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snap'.$ntU, true));  \r
+        if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii])) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]);  if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = '';\r
+        $doIT = $ntOpt['do'.$ntU] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse']; \r
+        $isAvail = $ntOpt['appKey']!='' && $ntOpt['appSec']!=''; $msgFormat = htmlentities($ntOpt['msgFrmt'], ENT_COMPAT, "UTF-8");    $msgFormatT = htmlentities($ntOpt['msgTFrmt'], ENT_COMPAT, "UTF-8"); \r
+        $postType = $ntOpt['postType'];         \r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2">\r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvail) { ?><input class="nxsGrpDoChb" value="1" id="do<?php echo $ntU.$ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][do<?php echo $ntU; ?>]" <?php if ((int)$doIT == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][do<?php echo $ntU; ?>]" value="<?php echo $doIT;?>"> <?php } ?> <?php } ?>\r
+      \r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>16.png);"><?php echo $this->ntInfo['name']; ?> - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvail) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostTo<?php echo $ntU; ?>_repostButton" id="rePostTo<?php echo $ntU; ?>_button" value="<?php _e('Repost to '.$this->ntInfo['name'], 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php  } ?>\r
+                    \r
+                    <?php  if (is_array($pMeta) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) { \r
+                        \r
+                        ?> <span id="pstd<?php echo $ntU; ?><?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+                      <a style="font-size: 10px;" href="<?php echo $pMeta[$ii]['postURL']; ?>" target="_blank"><?php $nType=$this->ntInfo['name']; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>                \r
+                \r
+                <?php if (!$isAvail) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your <?php echo $this->ntInfo['name']; ?> Account to AutoPost to <?php echo $this->ntInfo['name']; ?></b></td></tr>\r
+                <?php }  else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>ap" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> /> \r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+                </td></tr> <?php } ?>\r
+     \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Title Format:', 'NS_SPAP') ?></th>\r
+                  <td><input value="<?php echo $msgFormatT; ?>" type="text" name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgTFrmt]" style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('msgFrmtT<?php echo $nt.$ii; ?>');"/><?php nxs_doShowHint("msgFrmtT".$nt.$ii, '', '58'); ?></td></tr>           \r
+     \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top;  padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th><td>                \r
+                \r
+                <textarea cols="150" rows="1" id="<?php echo $nt.$ii; ?>msgFrmt" name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgFrmt]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#<?php echo $nt.$ii; ?>msgFrmt').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('msgFrmt<?php echo $nt.$ii; ?>');"><?php echo $msgFormat ?></textarea> <?php nxs_doShowHint("msgFrmt".$nt.$ii, '', '58'); ?>\r
+                \r
+                </td></tr>\r
+                \r
+                <tr><th scope="row" style="text-align:right; width:150px; vertical-align:top; padding-top: 0px; padding-right:10px;"> <?php _e('Post Type:', 'social-networks-auto-poster-facebook-twitter-g') ?> <br/></th><td>     \r
+        <input type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][postType]" value="T" <?php if ($postType == 'T') echo 'checked="checked"'; ?> /> <?php _e('Text Post', 'social-networks-auto-poster-facebook-twitter-g') ?>  - <i><?php _e('just text message', 'social-networks-auto-poster-facebook-twitter-g') ?></i><br/>\r
+        <input type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][postType]" value="I" <?php if ($postType == 'I') echo 'checked="checked"'; ?> /> <?php _e('Post as "Image post"', 'social-networks-auto-poster-facebook-twitter-g') ?> - <i><?php _e('big image with text message', 'social-networks-auto-poster-facebook-twitter-g') ?></i><br/>             \r
+        <input type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][postType]" value="A" <?php if ( !isset($postType) || $postType == '' || $postType == 'A') echo 'checked="checked"'; ?> /><?php _e('Text Post with "attached" blogpost', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+     </td></tr>\r
+                \r
+                 <?php /* ## Select Image & URL ## */ nxs_showImgToUseDlg($nt, $ii, $imgToUse);  ?>\r
+       <?php } \r
+\r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = ''; \r
+    if (isset($pMeta['doSC'])) $optMt['doSC'] = $pMeta['doSC'] == 1?1:0; else { if (isset($pMeta['msgFormat'])) $optMt['doSC'] = 0; } \r
+    \r
+    if (isset($pMeta['msgFrmt'])) $optMt['msgFrmt'] = $pMeta['msgFrmt']; if (isset($pMeta['msgTFrmt'])) $optMt['msgTFrmt'] = $pMeta['msgTFrmt'];\r
+    if (isset($pMeta['postType'])) $optMt['postType'] = $pMeta['postType'];\r
+    \r
+    if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];  if (isset($pMeta['urlToUse'])) $optMt['urlToUse'] = $pMeta['urlToUse'];  \r
+    if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+    if (isset($pMeta['SNAPincludeSC']) && $pMeta['SNAPincludeSC'] == '1' ) $optMt['doSC'] = 1;  \r
+    return $optMt;\r
+  }  \r
+}}\r
+if (!function_exists("nxs_rePostToSC_ajax")) {\r
+  function nxs_rePostToSC_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+    foreach ($options['sc'] as $ii=>$two) if ($ii==$_POST['nid']) {   $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['apPageID'].$two['apUName']==$_POST['nid']) {  \r
+      $appo =  get_post_meta($postID, 'snapSC', true); $appo =  maybe_unserialize($appo);// prr($appo);\r
+      if (is_array($appo) && isset($appo[$ii]) && is_array($appo[$ii])){ $ntClInst = new nxs_snapClassSC(); $two = $ntClInst->adjMetaOpt($two, $appo[$ii]); } \r
+      $result = nxs_doPublishToSC($postID, $two); if ($result == 200) die("Successfully sent your post to Scoop.It. "); else die($result);        \r
+    }    \r
+  }\r
+}  \r
+if (!function_exists("nxs_doPublishToSC")) { //## Post to SC. // V3 - imgToUse - Done, class_SNAP_AP - Done, New Format - Done\r
+  function nxs_doPublishToSC($postID, $options){ global $plgn_NS_SNAutoPoster; $ntCd = 'SC'; $ntCdL = 'sc'; $ntNm = 'Scoop.It'; if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+      $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));   \r
+      if (empty($options['imgToUse'])) $options['imgToUse'] = ''; if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+      $logNT = '<span style="color:#800000">Scoop.It</span> - '.$options['nName'];      \r
+      $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+      if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {  \r
+           nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$uqID); return;\r
+        }\r
+      }       \r
+      $message = array('message'=>'', 'link'=>'', 'imageURL'=>'', 'videoURL'=>''); \r
+      \r
+      if ($postID=='0') { echo "Testing ... <br/><br/>"; $message['description'] = 'Test Post, Description';  $message['title'] = 'Test Post - Title';  $message['url'] = home_url();    \r
+      } else { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));  $post = get_post($postID); if(!$post) return; \r
+        $postType = $options['postType']; $isNoImg = false; $tags = '';\r
+        \r
+        $options['msgFrmt'] = nsFormatMessage($options['msgFrmt'], $postID, $addParams); $options['msgTFrmt'] = nsFormatMessage($options['msgTFrmt'], $postID, $addParams);\r
+        \r
+        $tggs = array(); if ($options['inclTags']=='1'){ $t = wp_get_post_tags($postID); $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = $tggs; }        \r
+                \r
+        if ($postType=='A') if (trim($options['imgToUse'])!='') $imgURL = $options['imgToUse']; else $imgURL = nxs_getPostImage($postID, 'medium');  \r
+        if ($postType=='I') if (trim($options['imgToUse'])!='') $imgURL = $options['imgToUse']; else $imgURL = nxs_getPostImage($postID, 'full');      \r
+        if (preg_match("/noImg.\.png/i", $imgURL)) { $imgURL = ''; $isNoImg = true; }\r
+        \r
+        //## MyURL - URLToGo code\r
+        $options = nxs_getURL($options, $postID, $addParams); $urlToGo = $options['urlToUse']; $message = array('url'=>$urlToGo, 'imageURL'=>$imgURL, 'noImg'=>$isNoImg, 'tags'=>$tags);                 \r
+        $extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?$post->post_title:''); \r
+      }            \r
+      //## Actual Post\r
+      $ntToPost = new nxs_class_SNAP_SC(); $ret = $ntToPost->doPostToNT($options, $message); //prr($ret);\r
+      //## Process Results\r
+      if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+         if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+      } else {  // ## All Good - log it.\r
+        if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+          else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'postURL'=>$ret['postURL'], 'pDate'=>date('Y-m-d H:i:s'))); \r
+           $extInfo .= ' | <a href="'.$ret['postURL'].'" target="_blank">Post Link</a>'; nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+      }\r
+      //## Return Result\r
+      if ($ret['isPosted']=='1') return 200; else return print_r($ret, true);      \r
+      \r
+  } \r
+}  \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/st.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/st.api.php
new file mode 100644 (file)
index 0000000..2a2a9a7
--- /dev/null
@@ -0,0 +1,319 @@
+<?php    \r
+//## NextScripts SETT Connection Class \r
+\r
+$nxs_snapAPINts[] = array('code'=>'ST', 'lcode'=>'st', 'name'=>'SETT');\r
+\r
+if (!function_exists("nxs_getSTHeaders")) {  function nxs_getSTHeaders($ref, $org='', $post=false, $aj=false){ $hdrsArr = array(); \r
+ $hdrsArr['Cache-Control']='max-age=0'; $hdrsArr['Connection']='keep-alive'; $hdrsArr['Referer']=$ref;\r
+ $hdrsArr['User-Agent']='Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.22 Safari/537.36'; \r
+ if($post==='j') $hdrsArr['Content-Type']='application/json;charset=UTF-8'; elseif($post===true) $hdrsArr['Content-Type']='application/x-www-form-urlencoded';\r
+ if($aj===true) $hdrsArr['X-Requested-With']='XMLHttpRequest';  if ($org!='') $hdrsArr['Origin']=$org; \r
+ $hdrsArr['Accept']='text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';// $hdrsArr['DNT']='1';\r
+ if (function_exists('gzdeflate')) $hdrsArr['Accept-Encoding']='gzip,deflate,sdch'; \r
+ $hdrsArr['Accept-Language']='en-US,en;q=0.8'; return $hdrsArr; \r
+}}\r
+\r
+if (!function_exists("doPostToSETT")) { function doPostToSETT(){} }\r
+\r
+if (!class_exists('nxsAPI_ST')){class nxsAPI_ST{ var $ck = array();  var $debug = false;\r
+    function headers($ref, $org='', $type='GET', $aj=false){  $hdrsArr = array(); \r
+      $hdrsArr['Cache-Control']='max-age=0'; $hdrsArr['Connection']='keep-alive'; $hdrsArr['Referer']=$ref;\r
+      $hdrsArr['User-Agent']='Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.22 Safari/537.36'; \r
+      if($type=='JSON') $hdrsArr['Content-Type']='application/json;charset=UTF-8'; elseif($type=='POST') $hdrsArr['Content-Type']='application/x-www-form-urlencoded';\r
+      if($aj===true) $hdrsArr['X-Requested-With']='XMLHttpRequest';  if ($org!='') $hdrsArr['Origin']=$org; \r
+      if ($type=='GET') $hdrsArr['Accept']='text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'; else $hdrsArr['Accept']='*/*';\r
+      if (function_exists('gzdeflate')) $hdrsArr['Accept-Encoding']='gzip,deflate,sdch'; \r
+      $hdrsArr['Accept-Language']='en-US,en;q=0.8'; return $hdrsArr;         \r
+    }\r
+    function makeSlug($str){ $str = strtolower($str); $str = preg_replace('/[^a-zA-Z0-9]/i',' ', $str); $str = trim($str); $str = preg_replace('/\s+/', ' ', $str); $str = preg_replace('/\s+/', '-', $str); return $str;}\r
+    function check(){ $ck = $this->ck; $sslverify = false; if (!empty($ck) && is_array($ck)) { $hdrsArr = $this->headers('https://sett.com'); if ($this->debug) echo "[ST] Checking....;<br/>\r\n";\r
+        $rep = nxs_remote_get('http://sett.com/', array('headers' => $hdrsArr, 'httpversion' => '1.1', 'cookies' => $ck, 'sslverify'=>$sslverify)); \r
+        if (is_nxs_error($rep)) return false; $ck = $rep['cookies']; $contents = $rep['body']; //if ($this->debug) prr($contents);\r
+        return stripos($contents, 'data-url="')!==false;\r
+      } else return false;\r
+    }\r
+    function connect($u,$p){ $badOut = 'Error: '; \r
+      //## Check if alrady IN\r
+      if (!$this->check()){ if ($this->debug) echo "[ST] NO Saved Data;<br/>\r\n"; $sslverify = false;  $llURL = 'https://sett.com/login.php?email='.urlencode($u).'&pw='.urlencode($p).'&remember=on&undefined=Log+in';\r
+        $hdrsArr = $this->headers('http://sett.com/'); $rep = nxs_remote_get('http://sett.com/', array('headers' => $hdrsArr, 'httpversion' => '1.1', 'sslverify'=>$sslverify));\r
+        if (is_nxs_error($rep)) {  $badOut = "ERROR (Login Form): ".print_r($rep, true); return $badOut; } if ($rep['response']['code']!='200') { $badOut = "ERROR (Login Form): ".print_r($rep, true); return $badOut; }\r
+        $ck = $rep['cookies'];  $rep = nxs_remote_get($llURL, array('headers' => $hdrsArr, 'cookies' => $ck, 'httpversion' => '1.1', 'sslverify'=>$sslverify)); \r
+        if (is_nxs_error($rep)) {  $badOut = print_r($rep, true); if (stripos($badOut, 'Operation timed out')!==false) return "Invalid login email!"; else return "ERROR (Login Form 2): ".$badOut;  } \r
+        if ($rep['response']['code']!='200') { $badOut = "ERROR (Login Form 2): ".print_r($rep, true); return $badOut; } //prr($rep);\r
+        if ($rep['response']['code']=='200') { $content = $rep['body']; if (stripos($content, '{"user":{"')!==false) { $ck = $rep['cookies']; $this->ck = $ck; $loginArr = json_decode($content, true); /* prr($loginArr); */  return false;}\r
+          if (stripos($content, '{"errors":[')!==false) { $loginArr = json_decode($content, true); $err = $loginArr['errors'][0]['title']; return "Error: ".$err." | \r\n<br/>\r\n".print_r($loginArr, true); }\r
+        } return "ERROR (Login): ".$badOut.print_r($rep, true);\r
+      } else { if ($this->debug) echo "[TH] Saved Data is OK;<br/>\r\n"; return false; }\r
+    }\r
+    function post($post){ $ck = $this->ck; $sslverify = false; $oneTime = '0R4qFyHCMAYYclyZQFNYrOkq4uy4mN5'; $enText = nxs_AesCtr::encrypt($post['text'], $oneTime, 256); $blogID = '';\r
+      $hdrsArr = $this->headers('http://sett.com/'); $rep = nxs_remote_get('http://sett.com/'.$post['toURL'], array('headers' => $hdrsArr, 'timeout' => 45, 'cookies' => $ck, 'httpversion' => '1.1', 'sslverify'=>$sslverify));\r
+      if (is_nxs_error($rep)) {  $badOut = "ERROR (Blog URL): ".print_r($rep, true); return $badOut; } $content = $rep['body']; \r
+      if (stripos($content, 'window.site_id =')!==false) $blogID = trim(CutFromTo($content, 'window.site_id =', ';')); if (empty($blogID)) return "ERROR (NO Blog ID found): ";\r
+    \r
+    //if ($_GET('page')=='NextScripts_SNAP.php') prr($admURL);\r
+    \r
+      $hdrsArr = $this->headers('http://sett.com', 'http://sett.com', 'POST'); $flds = array('text'=>$enText);\r
+      $advSet = array('headers' => $hdrsArr, 'httpversion' => '1.1', 'sslverify'=>$sslverify, 'timeout' => 45, 'redirection' => 0, 'cookies' => $ck, 'body' => $flds); //prr($advSet);\r
+      $rep = nxs_remote_post('http://sett.com/storetext.php', $advSet); if (is_nxs_error($rep)) {  $badOut = "ERROR (Post Post):".print_r($rep, true); return $badOut; } \r
+      if (stripos($rep['body'], '{"id":')!==false) { $textPush = json_decode($rep['body'], true); } else {  $badOut = "ERROR (Post Post):".print_r($rep, true); return $badOut; } \r
+      $pURL = 'https://sett.com/newpost.php?autosave=0&context=&is_html=&offset=&one_time=&parent_uid=&promote=&site=&submit_visible=1&to=&uid=&title='.urlencode($post['title']).'&url='.$this->makeSlug($post['title']).'&category=&allow_comments=1&allow_promoting=1&allow_indexing=1&subscribe=1&context=false&is_html=false&offset=-4&parent_uid=&promote=1&site_id='.$blogID.'&type=post&uid=&one_time='.$oneTime.'&text_id='.$textPush['id'].'&text_hash='.$textPush['hash']; $ck=nxsClnCookies($ck);\r
+      $hdrsArr = $this->headers('http://sett.com/'.$post['toURL']); $rep = nxs_remote_get($pURL, array('headers' => $hdrsArr, 'timeout' => 45, 'cookies' => $ck, 'httpversion' => '1.1', 'sslverify'=>$sslverify));\r
+      if (is_nxs_error($rep)) { $badOut = "ERROR (Post Info): ".print_r($rep, true); return $badOut; }       \r
+      if ($rep['response']['code']=='200') { $content = $rep['body']; \r
+        if (stripos($content, '{"errors":[')!==false) { $loginArr = json_decode($content, true); $err = $loginArr['errors'][0]['title']; return "Error: ".$err." | \r\n<br/>\r\n".print_r($loginArr, true); }\r
+      }\r
+      \r
+      if (stripos($rep['body'],'{"uid":')!==false){$content = json_decode($rep['body'], true); return array('isPosted'=>'1', 'postID'=>$content['uid'], 'postURL'=>'http://sett.com/'.$post['toURL']."/".$content['uid'], 'pDate'=>date('Y-m-d H:i:s'));}\r
+      return 'Error: '.print_r($rep, true); \r
+    }    \r
+}}\r
+\r
+if (!class_exists("nxs_class_SNAP_ST")) { class nxs_class_SNAP_ST {\r
+    \r
+    var $ntCode = 'ST';\r
+    var $ntLCode = 'st';\r
+    \r
+    function createFile($imgURL) {\r
+      $remImgURL = urldecode($imgURL); $urlParced = pathinfo($remImgURL); $remImgURLFilename = $urlParced['basename']; \r
+      $imgData = wp_remote_get($remImgURL); if (is_wp_error($imgData)) { $badOut['Error'] = print_r($imgData, true)." - ERROR"; return $badOut; }          \r
+      $imgData = $imgData['body'];\r
+      $tmp=array_search('uri', @array_flip(stream_get_meta_data($GLOBALS[mt_rand()]=tmpfile())));  \r
+      if (!is_writable($tmp)) return "Your temporary folder or file (file - ".$tmp.") is not witable. Can't upload images to Flickr";\r
+      rename($tmp, $tmp.='.png'); register_shutdown_function(create_function('', "unlink('{$tmp}');"));       \r
+      file_put_contents($tmp, $imgData); if (!$tmp) return 'You must specify a path to a file'; if (!file_exists($tmp)) return 'File path specified does not exist';\r
+      if (!is_readable($tmp)) return 'File path specified is not readable';      \r
+      //  $data['name'] = basename($tmp);\r
+      return "@$tmp";\r
+      \r
+    }\r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array(); // return false;\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }\r
+    \r
+    function doPostToNT($options, $message){ global $nxs_urlLen; $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>'');\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['uPass']) || trim($options['uPass'])=='') { $badOut['Error'] = 'Not Authorized'; return $badOut; }      \r
+      if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      //## Format Post\r
+      if (!empty($message['pText'])) $text = $message['pText']; else $text = nxs_doFormatMsg($options['msgFrmt'], $message); \r
+      if (!empty($message['pTitle'])) $msgT = $message['pTitle']; else $msgT = nxs_doFormatMsg($options['msgTFrmt'], $message);\r
+      //## Make Post            \r
+      if (isset($message['imageURL'])) $imgURL = trim(nxs_getImgfrOpt($message['imageURL'], $options['imgSize'])); else $imgURL = '';       \r
+      //## Make Post   \r
+      if (!empty($options['ck'])) $ck = maybe_unserialize($options['ck']); $pass = substr($options['uPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['uPass'], 5)):$options['uPass'];\r
+      $nt = new nxsAPI_ST(); $nt->debug = false; if (!empty($ck)) $nt->ck = $ck; $loginErr = $nt->connect($options['uName'], $pass); \r
+      if (!$loginErr) { $post = array('url'=>$message['url'], 'toURL'=>$options['mgzURL'], 'imgURL'=>$imgURL, 'title'=>$msgT, 'text'=>$text ); $ret = $nt->post($post);         \r
+        if (is_array($ret)) { $ret['ck'] = $nt->ck; return $ret;  } else return print_r($ret, true);\r
+      } else return print_r($loginErr, true);      \r
+    }      \r
+}}\r
+\r
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */\r
+/*  AES implementation in PHP                                                                     */\r
+/*    (c) Chris Veness 2005-2011 www.movable-type.co.uk/scripts                                   */\r
+/*    Right of free use is granted for all commercial or non-commercial use providing this        */\r
+/*    copyright notice is retainded. No warranty of any form is offered.                          */\r
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */\r
+if (!class_exists('nxs_Aes')) { class nxs_Aes {\r
+  public static function cipher($input, $w) {    // main cipher function [�5.1]\r
+    $Nb = 4;                 // block size (in words): no of columns in state (fixed at 4 for AES)\r
+    $Nr = count($w)/$Nb - 1; // no of rounds: 10/12/14 for 128/192/256-bit keys\r
+  \r
+    $state = array();  // initialise 4xNb byte-array 'state' with input [�3.4]\r
+    for ($i=0; $i<4*$Nb; $i++) $state[$i%4][floor($i/4)] = $input[$i];\r
+  \r
+    $state = self::addRoundKey($state, $w, 0, $Nb);\r
+  \r
+    for ($round=1; $round<$Nr; $round++) {  // apply Nr rounds\r
+      $state = self::subBytes($state, $Nb);\r
+      $state = self::shiftRows($state, $Nb);\r
+      $state = self::mixColumns($state, $Nb);\r
+      $state = self::addRoundKey($state, $w, $round, $Nb);\r
+    }\r
+  \r
+    $state = self::subBytes($state, $Nb);\r
+    $state = self::shiftRows($state, $Nb);\r
+    $state = self::addRoundKey($state, $w, $Nr, $Nb);\r
+  \r
+    $output = array(4*$Nb);  // convert state to 1-d array before returning [�3.4]\r
+    for ($i=0; $i<4*$Nb; $i++) $output[$i] = $state[$i%4][floor($i/4)];\r
+    return $output;\r
+  }\r
+  private static function addRoundKey($state, $w, $rnd, $Nb) {  // xor Round Key into state S [�5.1.4]\r
+    for ($r=0; $r<4; $r++) {\r
+      for ($c=0; $c<$Nb; $c++) $state[$r][$c] ^= $w[$rnd*4+$c][$r];\r
+    }\r
+    return $state;\r
+  }\r
+  private static function subBytes($s, $Nb) {    // apply SBox to state S [�5.1.1]\r
+    for ($r=0; $r<4; $r++) {\r
+      for ($c=0; $c<$Nb; $c++) $s[$r][$c] = self::$sBox[$s[$r][$c]];\r
+    }\r
+    return $s;\r
+  }\r
+  private static function shiftRows($s, $Nb) {    // shift row r of state S left by r bytes [�5.1.2]\r
+    $t = array(4);\r
+    for ($r=1; $r<4; $r++) {\r
+      for ($c=0; $c<4; $c++) $t[$c] = $s[$r][($c+$r)%$Nb];  // shift into temp copy\r
+      for ($c=0; $c<4; $c++) $s[$r][$c] = $t[$c];           // and copy back\r
+    }          // note that this will work for Nb=4,5,6, but not 7,8 (always 4 for AES):\r
+    return $s;  // see fp.gladman.plus.com/cryptography_technology/rijndael/aes.spec.311.pdf \r
+  }\r
+  private static function mixColumns($s, $Nb) {   // combine bytes of each col of state S [�5.1.3]\r
+    for ($c=0; $c<4; $c++) {\r
+      $a = array(4);  // 'a' is a copy of the current column from 's'\r
+      $b = array(4);  // 'b' is a�{02} in GF(2^8)\r
+      for ($i=0; $i<4; $i++) {\r
+        $a[$i] = $s[$i][$c];\r
+        $b[$i] = $s[$i][$c]&0x80 ? $s[$i][$c]<<1 ^ 0x011b : $s[$i][$c]<<1;\r
+      }\r
+      // a[n] ^ b[n] is a�{03} in GF(2^8)\r
+      $s[0][$c] = $b[0] ^ $a[1] ^ $b[1] ^ $a[2] ^ $a[3]; // 2*a0 + 3*a1 + a2 + a3\r
+      $s[1][$c] = $a[0] ^ $b[1] ^ $a[2] ^ $b[2] ^ $a[3]; // a0 * 2*a1 + 3*a2 + a3\r
+      $s[2][$c] = $a[0] ^ $a[1] ^ $b[2] ^ $a[3] ^ $b[3]; // a0 + a1 + 2*a2 + 3*a3\r
+      $s[3][$c] = $a[0] ^ $b[0] ^ $a[1] ^ $a[2] ^ $b[3]; // 3*a0 + a1 + a2 + 2*a3\r
+    }\r
+    return $s;\r
+  }\r
+  public static function keyExpansion($key) {  // generate Key Schedule from Cipher Key [�5.2]\r
+    $Nb = 4;              // block size (in words): no of columns in state (fixed at 4 for AES)\r
+    $Nk = count($key)/4;  // key length (in words): 4/6/8 for 128/192/256-bit keys\r
+    $Nr = $Nk + 6;        // no of rounds: 10/12/14 for 128/192/256-bit keys\r
+  \r
+    $w = array();\r
+    $temp = array();\r
+  \r
+    for ($i=0; $i<$Nk; $i++) {\r
+      $r = array($key[4*$i], $key[4*$i+1], $key[4*$i+2], $key[4*$i+3]);\r
+      $w[$i] = $r;\r
+    }\r
+  \r
+    for ($i=$Nk; $i<($Nb*($Nr+1)); $i++) {\r
+      $w[$i] = array();\r
+      for ($t=0; $t<4; $t++) $temp[$t] = $w[$i-1][$t];\r
+      if ($i % $Nk == 0) {\r
+        $temp = self::subWord(self::rotWord($temp));\r
+        for ($t=0; $t<4; $t++) $temp[$t] ^= self::$rCon[$i/$Nk][$t];\r
+      } else if ($Nk > 6 && $i%$Nk == 4) {\r
+        $temp = self::subWord($temp);\r
+      }\r
+      for ($t=0; $t<4; $t++) $w[$i][$t] = $w[$i-$Nk][$t] ^ $temp[$t];\r
+    }\r
+    return $w;\r
+  }\r
+  private static function subWord($w) {    // apply SBox to 4-byte word w\r
+    for ($i=0; $i<4; $i++) $w[$i] = self::$sBox[$w[$i]];\r
+    return $w;\r
+  }\r
+  private static function rotWord($w) {    // rotate 4-byte word w left by one byte\r
+    $tmp = $w[0];\r
+    for ($i=0; $i<3; $i++) $w[$i] = $w[$i+1];\r
+    $w[3] = $tmp;\r
+    return $w;\r
+  }\r
+  private static $sBox = array(\r
+    0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5,0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76,\r
+    0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0,0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0,\r
+    0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc,0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15,\r
+    0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a,0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75,\r
+    0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0,0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84,\r
+    0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b,0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf,\r
+    0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85,0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8,\r
+    0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5,0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2,\r
+    0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17,0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73,\r
+    0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88,0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb,\r
+    0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c,0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79,\r
+    0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9,0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08,\r
+    0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6,0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a,\r
+    0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e,0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e,\r
+    0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94,0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf,\r
+    0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68,0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16);\r
+  private static $rCon = array( \r
+    array(0x00, 0x00, 0x00, 0x00),\r
+    array(0x01, 0x00, 0x00, 0x00),\r
+    array(0x02, 0x00, 0x00, 0x00),\r
+    array(0x04, 0x00, 0x00, 0x00),\r
+    array(0x08, 0x00, 0x00, 0x00),\r
+    array(0x10, 0x00, 0x00, 0x00),\r
+    array(0x20, 0x00, 0x00, 0x00),\r
+    array(0x40, 0x00, 0x00, 0x00),\r
+    array(0x80, 0x00, 0x00, 0x00),\r
+    array(0x1b, 0x00, 0x00, 0x00),\r
+    array(0x36, 0x00, 0x00, 0x00) ); \r
+}  }\r
+if (!class_exists('nxs_AesCtr')) { class nxs_AesCtr extends nxs_Aes {\r
+  public static function encrypt($plaintext, $password, $nBits) {\r
+    $blockSize = 16;  // block size fixed at 16 bytes / 128 bits (Nb=4) for AES\r
+    if (!($nBits==128 || $nBits==192 || $nBits==256)) return '';  // standard allows 128/192/256 bit keys\r
+    // note PHP (5) gives us plaintext and password in UTF8 encoding!\r
+    \r
+    // use AES itself to encrypt password to get cipher key (using plain password as source for  \r
+    // key expansion) - gives us well encrypted key\r
+    $nBytes = $nBits/8;  // no bytes in key\r
+    $pwBytes = array();\r
+    for ($i=0; $i<$nBytes; $i++) $pwBytes[$i] = ord(substr($password,$i,1)) & 0xff;\r
+    $key = nxs_Aes::cipher($pwBytes, nxs_Aes::keyExpansion($pwBytes));\r
+    $key = array_merge($key, array_slice($key, 0, $nBytes-16));  // expand key to 16/24/32 bytes long \r
+  \r
+    // initialise 1st 8 bytes of counter block with nonce (NIST SP800-38A �B.2): [0-1] = millisec, \r
+    // [2-3] = random, [4-7] = seconds, giving guaranteed sub-ms uniqueness up to Feb 2106\r
+    $counterBlock = array();\r
+    $nonce = floor(microtime(true)*1000);   // timestamp: milliseconds since 1-Jan-1970\r
+    $nonceMs = $nonce%1000;\r
+    $nonceSec = floor($nonce/1000);\r
+    $nonceRnd = floor(rand(0, 0xffff));\r
+    \r
+    for ($i=0; $i<2; $i++) $counterBlock[$i]   = self::urs($nonceMs,  $i*8) & 0xff;\r
+    for ($i=0; $i<2; $i++) $counterBlock[$i+2] = self::urs($nonceRnd, $i*8) & 0xff;\r
+    for ($i=0; $i<4; $i++) $counterBlock[$i+4] = self::urs($nonceSec, $i*8) & 0xff;\r
+    \r
+    // and convert it to a string to go on the front of the ciphertext\r
+    $ctrTxt = '';\r
+    for ($i=0; $i<8; $i++) $ctrTxt .= chr($counterBlock[$i]);\r
+  \r
+    // generate key schedule - an expansion of the key into distinct Key Rounds for each round\r
+    $keySchedule = nxs_Aes::keyExpansion($key);\r
+    //print_r($keySchedule);\r
+    \r
+    $blockCount = ceil(strlen($plaintext)/$blockSize);\r
+    $ciphertxt = array();  // ciphertext as array of strings\r
+    \r
+    for ($b=0; $b<$blockCount; $b++) {\r
+      // set counter (block #) in last 8 bytes of counter block (leaving nonce in 1st 8 bytes)\r
+      // done in two stages for 32-bit ops: using two words allows us to go past 2^32 blocks (68GB)\r
+      for ($c=0; $c<4; $c++) $counterBlock[15-$c] = self::urs($b, $c*8) & 0xff;\r
+      for ($c=0; $c<4; $c++) $counterBlock[15-$c-4] = self::urs($b/0x100000000, $c*8);\r
+  \r
+      $cipherCntr = nxs_Aes::cipher($counterBlock, $keySchedule);  // -- encrypt counter block --\r
+  \r
+      // block size is reduced on final block\r
+      $blockLength = $b<$blockCount-1 ? $blockSize : (strlen($plaintext)-1)%$blockSize+1;\r
+      $cipherByte = array();\r
+      \r
+      for ($i=0; $i<$blockLength; $i++) {  // -- xor plaintext with ciphered counter byte-by-byte --\r
+        $cipherByte[$i] = $cipherCntr[$i] ^ ord(substr($plaintext, $b*$blockSize+$i, 1));\r
+        $cipherByte[$i] = chr($cipherByte[$i]);\r
+      }\r
+      $ciphertxt[$b] = implode('', $cipherByte);  // escape troublesome characters in ciphertext\r
+    }\r
+  \r
+    // implode is more efficient than repeated string concatenation\r
+    $ciphertext = $ctrTxt . implode('', $ciphertxt);\r
+    $ciphertext = base64_encode($ciphertext);\r
+    return $ciphertext;\r
+  }  \r
+  private static function urs($a, $b) {\r
+    $a &= 0xffffffff; $b &= 0x1f;  // (bounds check)\r
+    if ($a&0x80000000 && $b>0) {   // if left-most bit set\r
+      $a = ($a>>1) & 0x7fffffff;   //   right-shift one bit & clear left-most bit\r
+      $a = $a >> ($b-1);           //   remaining right-shifts\r
+    } else {                       // otherwise\r
+      $a = ($a>>$b);               //   use normal right-shift\r
+    } \r
+    return $a; \r
+  }\r
+}  }\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/st.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/st.php
new file mode 100644 (file)
index 0000000..c7c255f
--- /dev/null
@@ -0,0 +1,226 @@
+<?php    \r
+//## NextScripts sett.com Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'ST', 'lcode'=>'st', 'name'=>'SETT');\r
+\r
+if (!class_exists("nxs_snapClassST")) { class nxs_snapClassST { var $ntInfo = array('code'=>'ST', 'lcode'=>'st', 'name'=>'SETT', 'defNName'=>'', 'tstReq' => false);\r
+  //#### Show Common Settings\r
+  function showGenNTSettings($ntOpts){  global $nxs_plurl, $nxs_snapSetPgURL;  $ntInfo = $this->ntInfo;\r
+    $fMsg = 'SETT doesn\'t have a built-in API for automated posts yet. <br/>You need to get a special <a target="_blank" href="http://www.nextscripts.com/api/thoughts-automated-posting/">API library</a> to be able to publish your content to SETT.';\r
+    $ntParams = array('ntInfo'=>$ntInfo, 'nxs_plurl'=>$nxs_plurl, 'ntOpts'=>$ntOpts, 'chkField'=>'appAppUserID', 'checkFunc' => array('funcName'=>'doPostToSETT', 'msg'=>$fMsg)); nxs_showListRow($ntParams);  \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($options){ $opts = array('nName'=>'', 'doST'=>'1', 'uName'=>'', 'postType'=>'A', 'uPass'=>'', 'mgzURL'=>'', 'inclTags'=>'1', 'defImg'=>''); $opts['ntInfo']= $this->ntInfo; $this->showNTSettings($options, $opts, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl, $nxs_snapSetPgURL; $ntInfo = $this->ntInfo; $nt = $ntInfo['lcode']; $ntU = $ntInfo['code']; \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['mgzURL'])) $options['mgzURL'] = '';      ?>    \r
+            <div id="do<?php echo $ntU; ?><?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">     \r
+            <input type="hidden" value="0" id="apDoS<?php echo $ntU.$ii; ?>" />\r
+            \r
+            <?php if(!function_exists('doPostToSETT')) {?><span style="color:#580000; font-size: 16px;"><br/><br/>\r
+            <b><?php _e('SETT API Library not found', 'social-networks-auto-poster-facebook-twitter-g'); ?></b>\r
+             <br/><br/> <?php _e('SETT doesn\'t have a built-in API for automated posts yet.', 'social-networks-auto-poster-facebook-twitter-g'); ?> <br/><?php _e('<br/><br/>You need to get a special <a target="_blank" href="http://www.nextscripts.com/api/thoughts-automated-posting/"><b>API Library Module</b></a> to be able to publish your content to SETT.', 'social-networks-auto-poster-facebook-twitter-g'); ?></span></div>\r
+            <?php return; }; ?>\r
+            \r
+            <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/instructions/sett-social-networks-auto-poster-setup-installation/"><?php $nType=$ntInfo['name']; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][nName]" id="apnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel($nt, $ii, $options['qTLng']); ?>\r
+            <br/>\r
+                <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+            \r
+            <div style="width:100%;"><strong><?php echo $nType; ?> Login/Email:</strong> </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][uName]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['uName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+            <div style="width:100%;"><strong><?php echo $nType; ?> Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="<?php echo $nt; ?>[<?php echo $ii; ?>][uPass]" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['uPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['uPass'], 5)):$options['uPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>  \r
+                                     \r
+            <div style="width:100%;"><strong><?php echo $nType; ?> Blog URL:</strong> </div>http://sett.com/<input name="<?php echo $nt; ?>[<?php echo $ii; ?>][mgzURL]"  style="width: 20%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['mgzURL'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+             <br/>\r
+   \r
+   <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="msgFrmtT<?php echo $ntU.$ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('msgFrmtT<?php echo $ntU.$ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div>               \r
+              <input name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgTFrmt]" style="width: 50%;" value="<?php if (!empty($options['msgTFrmt'])) _e(apply_filters('format_to_edit', htmlentities($options['msgTFrmt'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); else echo "%TITLE%"; ?>" onfocus="mxs_showFrmtInfo('msgFrmtT<?php echo $ntU.$ii; ?>');" /><?php nxs_doShowHint("msgFrmtT".$ntU.$ii); ?><br/> \r
+   \r
+                      \r
+            <div id="altFormat" style="margin-left: 0px;">\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="msgFrmt<?php echo $ntU; ?><?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('msgFrmt<?php echo $ntU; ?><?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)\r
+              </div>              \r
+              <textarea cols="150" rows="3" id="<?php echo $nt; ?><?php echo $ii; ?>msgFrmt" name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#<?php echo $nt; ?><?php echo $ii; ?>msgFrmt').attr('rows', 6); mxs_showFrmtInfo('msgFrmt<?php echo $ntU.$ii; ?>');"><?php if ($isNew) _e("%FULLTEXT% \r\n\r\n<a href=".'"%URL%"'.">Source</a>", 'social-networks-auto-poster-facebook-twitter-g'); else _e(apply_filters('format_to_edit', htmlentities($options['msgFrmt'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea><?php nxs_doShowHint("msgFrmt".$ntU.$ii); ?>\r
+            </div>\r
+           \r
+         <br/>     \r
+            \r
+            <?php if ($isNew) { ?> <input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][apDo<?php echo $ntU; ?>]" value="1" id="apDoNew<?php echo $ntU; ?><?php echo $ii; ?>" /> <?php } ?>\r
+            <?php if (!empty($options['uPass'])) { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('<?php echo $ntU; ?>', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>              <?php } \r
+            ?>\r
+    \r
+     </div>\r
+      <?php /* ######################## Tools Tab ####################### */ ?>\r
+    <?php if (!$isNew) { ?><div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">    \r
+    <?php nxs_showCatTagsCTFilters($nt, $ii, $options);\r
+          nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);\r
+          nxs_showRepostSettings($nt, $ii, $options); ?>      \r
+    </div> <?php } ?>       <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div>\r
+            \r
+            \r
+            </div><?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = $this->ntInfo['code']; \r
+    foreach ($post as $ii => $pval){ \r
+      if (!empty($pval['uName']) && !empty($pval['uPass'])){ if (!isset($options[$ii])) $options[$ii] = array();\r
+        \r
+        if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+        if (isset($pval['nName']))  $options[$ii]['nName'] = trim($pval['nName']);  \r
+        \r
+        if (isset($pval['uName'])) $options[$ii]['uName'] = trim($pval['uName']);        \r
+        if (isset($pval['uPass']))    $options[$ii]['uPass'] = 'n5g9a'.nsx_doEncode($pval['uPass']); else $options[$ii]['uPass'] = '';  \r
+        if (isset($pval['mgzURL'])) $options[$ii]['mgzURL'] = trim($pval['mgzURL']);     \r
+                \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';                                 \r
+                \r
+        if (isset($pval['msgFrmt'])) $options[$ii]['msgFrmt'] = trim($pval['msgFrmt']);        \r
+        if (isset($pval['msgTFrmt'])) $options[$ii]['msgTFrmt'] = trim($pval['msgTFrmt']);        \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }  \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = $this->ntInfo['lcode']; $ntU = $this->ntInfo['code'];\r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snap'.$ntU, true));  \r
+        if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii])) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]);  if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = ''; \r
+        $doIT = $ntOpt['do'.$ntU] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse']; if (empty($ntOpt['urlToUse'])) $ntOpt['urlToUse'] = '';  $urlToUse = $ntOpt['urlToUse'];\r
+        $isAvail = $ntOpt['uPass']!='' && $ntOpt['uName']!=''; $msgFormat = htmlentities($ntOpt['msgFrmt'], ENT_COMPAT, "UTF-8"); $msgFormatT = htmlentities($ntOpt['msgTFrmt'], ENT_COMPAT, "UTF-8"); \r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2"> \r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvail) { ?> <input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][do<?php echo $ntU; ?>]" value="<?php echo ($post->post_status == "publish")?$doIT:'0';?>">\r
+        <input class="nxsGrpDoChb" value="1" id="do<?php echo $ntU.$ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][do<?php echo $ntU; ?>]" <?php if ((int)$doIT == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php } ?>\r
+      \r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>16.png);"><?php echo $this->ntInfo['name']; ?> - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvail) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostTo<?php echo $ntU; ?>_repostButton" id="rePostTo<?php echo $ntU; ?>_button" value="<?php _e('Repost to '.$this->ntInfo['name'], 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php  } ?>\r
+                    \r
+                    <?php  if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) { \r
+                        \r
+                        ?> <span id="pstd<?php echo $ntU; ?><?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+                      <a style="font-size: 10px;" href="<?php echo $pMeta[$ii]['postURL']; ?>" target="_blank"><?php $nType=$this->ntInfo['name']; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>                \r
+                \r
+                <?php if (!$isAvail) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your <?php echo $this->ntInfo['name']; ?> Account to AutoPost to <?php echo $this->ntInfo['name']; ?></b></td></tr>\r
+                <?php }  else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>ap" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> /> \r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+                </td></tr> <?php } ?>\r
+     \r
+     <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Title Format:', 'NS_SPAP') ?></th>\r
+                  <td><input value="<?php echo $msgFormatT; ?>" type="text" name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgTFrmt]" style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('msgFrmtT<?php echo $nt.$ii; ?>');"/><?php nxs_doShowHint("msgFrmtT".$nt.$ii, '', '58'); ?></td></tr>\r
+     \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top;  padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th><td>                \r
+                \r
+                <textarea cols="150" rows="1" id="<?php echo $nt.$ii; ?>msgFrmt" name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgFrmt]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#<?php echo $nt.$ii; ?>msgFrmt').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('msgFrmt<?php echo $nt.$ii; ?>');"><?php echo $msgFormat ?></textarea> <?php nxs_doShowHint("msgFrmt".$nt.$ii, '', '58'); ?>\r
+                \r
+                </td></tr>                \r
+                \r
+                 <?php /* ## Select Image & URL ## */ nxs_showImgToUseDlg($nt, $ii, $imgToUse);  nxs_showURLToUseDlg($nt, $ii, $urlToUse); ?>\r
+       <?php } \r
+\r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = ''; \r
+    if (isset($pMeta['doST'])) $optMt['doST'] = $pMeta['doST'] == 1?1:0; \r
+    \r
+    if (isset($pMeta['msgFrmt'])) $optMt['msgFrmt'] = $pMeta['msgFrmt'];  if (isset($pMeta['msgTFrmt'])) $optMt['msgTFrmt'] = $pMeta['msgTFrmt'];    \r
+          \r
+    if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];  if (isset($pMeta['urlToUse'])) $optMt['urlToUse'] = $pMeta['urlToUse'];  \r
+    if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+    if (isset($pMeta['SNAPincludeST']) && $pMeta['SNAPincludeST'] == '1' ) $optMt['doST'] = 1;  \r
+    return $optMt;\r
+  }  \r
+}}\r
+if (!function_exists("nxs_rePostToST_ajax")) {\r
+  function nxs_rePostToST_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+    foreach ($options['st'] as $ii=>$two) if ($ii==$_POST['nid']) {   $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['apPageID'].$two['apUName']==$_POST['nid']) {  \r
+      $appo =  get_post_meta($postID, 'snapST', true); $appo =  maybe_unserialize($appo);// prr($appo);\r
+      if (is_array($appo) && isset($appo[$ii]) && is_array($appo[$ii])){ $ntClInst = new nxs_snapClassST(); $two = $ntClInst->adjMetaOpt($two, $appo[$ii]); } \r
+      $result = nxs_doPublishToST($postID, $two); if ($result == 200) die("Successfully sent your post to SETT. "); else die($result);        \r
+    }    \r
+  }\r
+}  \r
+if (!function_exists("nxs_doPublishToST")) { //## Post to ST. // V3 - imgToUse - Done, class_SNAP_AP - Done, New Format - Done\r
+  function nxs_doPublishToST($postID, $options){ global $plgn_NS_SNAutoPoster; $ntCd = 'ST'; $ntCdL = 'st'; $ntNm = 'SETT'; if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+      $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));   \r
+      if (empty($options['imgToUse'])) $options['imgToUse'] = ''; if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+      $logNT = '<span style="color:#800000">SETT</span> - '.$options['nName'];      \r
+      $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+      if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {  \r
+           nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$uqID); return;\r
+        }\r
+      }       \r
+      $message = array('message'=>'', 'link'=>'', 'imageURL'=>'', 'videoURL'=>'', 'announce'=>''); \r
+          \r
+      if ($postID=='0') { echo "Testing ... <br/><br/>"; $message['description'] = 'Test Post, Description';  $message['title'] = 'Test Post - Title';  $message['url'] = home_url();  $message['tags']='';\r
+        if (!empty($options['defImg'])) $imgURL = $options['defImg']; else $imgURL ="http://direct.gtln.us/img/nxs/NXS-Lama.jpg";    $message['imageURL'] = $imgURL;\r
+      } else { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));  $post = get_post($postID); if(!$post) return; \r
+        $isNoImg = false; $tags = '';\r
+        \r
+        $options['msgFrmt'] = nsFormatMessage($options['msgFrmt'], $postID, $addParams); $options['msgTFrmt'] = nsFormatMessage($options['msgTFrmt'], $postID, $addParams); // $postType = $options['postType'];\r
+        \r
+        //$tggs = array(); if ($options['inclTags']=='1'){ $t = wp_get_post_tags($postID); $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = '"'.implode('" "',$tggs).'"'; }\r
+        \r
+        if (trim($options['imgToUse'])!='') $imgURL = $options['imgToUse']; else $imgURL = nxs_getPostImage($postID, 'full');   if (preg_match("/noImg.\.png/i", $imgURL)) { $imgURL = ''; $isNoImg = true; }\r
+        \r
+        //## MyURL - URLToGo code\r
+        $options = nxs_getURL($options, $postID, $addParams); $urlToGo = $options['urlToUse']; $message = array('url'=>$urlToGo, 'imageURL'=>$imgURL, 'noImg'=>$isNoImg);                 \r
+        $extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?$post->post_title:''); \r
+      }            \r
+      //## Actual Post\r
+      $ntToPost = new nxs_class_SNAP_ST(); $ret = $ntToPost->doPostToNT($options, $message); //prr($ret);\r
+      //## Save Session\r
+      if (empty($options['ck'])) $options['ck'] = '';\r
+      if (!empty($ret) && is_array($ret) && !empty($ret['ck']) && !empty($ret['ck']) && serialize($ret['ck'])!=$options['ck']) { global $plgn_NS_SNAutoPoster;  $gOptions = $plgn_NS_SNAutoPoster->nxs_options; // prr($gOptions['pn']);\r
+        if (isset($options['ii']) && $options['ii']!=='')  { $gOptions[$ntCdL][$options['ii']]['ck'] = serialize($ret['ck']); update_option('NS_SNAutoPoster', $gOptions);  }        \r
+        else foreach ($gOptions[$ntCdL] as $ii=>$gpn) { $result = array_diff($options, $gpn);\r
+          if (!is_array($result) || count($result)<1) { $gOptions[$ntCdL][$ii]['ck'] = serialize($ret['ck']); $plgn_NS_SNAutoPoster->nxs_options = $gOptions; update_option('NS_SNAutoPoster', $gOptions); break; }\r
+        }        \r
+      } \r
+      //## Process Results\r
+      if (!is_array($ret) || empty($ret['isPosted']) || $ret['isPosted']!='1') { //## Error \r
+         if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+      } else {  // ## All Good - log it.\r
+        if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+          else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'postURL'=>$ret['postURL'], 'pDate'=>date('Y-m-d H:i:s'))); \r
+            $extInfo .= ' | <a href="'.$ret['postURL'].'" target="_blank">Post Link</a>'; nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); \r
+          }\r
+      }\r
+      //## Return Result\r
+      if (!empty($ret['isPosted']) && $ret['isPosted']=='1') return 200; else return print_r($ret, true);      \r
+      \r
+  } \r
+}  \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/su.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/su.api.php
new file mode 100644 (file)
index 0000000..0857d27
--- /dev/null
@@ -0,0 +1,110 @@
+<?php    \r
+//## NextScripts FriendFeed Connection Class\r
+$nxs_snapAPINts[] = array('code'=>'SU', 'lcode'=>'su', 'name'=>'StumbleUpon');\r
+\r
+if (!class_exists("nxs_class_SNAP_SU")) { class nxs_class_SNAP_SU {\r
+    \r
+    var $ntCode = 'SU';\r
+    var $ntLCode = 'su';     \r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array();\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }    \r
+    function nxs_getSUHeaders($ref, $post=false, $xhr=true){ $hdrsArr = array(); \r
+      if ($xhr) $hdrsArr['X-Requested-With']='XMLHttpRequest'; \r
+      $hdrsArr['Connection']='keep-alive'; $hdrsArr['Referer']=$ref;\r
+      $hdrsArr['User-Agent']='Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)';\r
+      if($post) $hdrsArr['Content-Type']='application/x-www-form-urlencoded'; \r
+      if ($xhr) $hdrsArr['Accept']='application/json, text/javascript, */*; q=0.01'; else $hdrsArr['Accept']='text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';\r
+      $hdrsArr['Origin']='http://www.stumbleupon.com';\r
+      if (function_exists('gzdeflate')) $hdrsArr['Accept-Encoding']='gzip,deflate,sdch'; $hdrsArr['Accept-Language']='en-US,en;q=0.8'; $hdrsArr['Accept-Charset']='ISO-8859-1,utf-8;q=0.7,*;q=0.3'; return $hdrsArr;\r
+    }\r
+    function nxs_doCheckSU(){ global $nxs_suCkArray; $hdrsArr = $this->nxs_getSUHeaders('https://www.stumbleupon.com/submit'); $ckArr = $nxs_suCkArray;   \r
+      $response = wp_remote_get('http://www.stumbleupon.com/submit', array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr, 'cookies' => $ckArr));   \r
+      if (is_wp_error($response)) { nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($response, true), ''); return "Connection ERROR. Please see log";}\r
+      $response['body'] = htmlentities($response['body'], ENT_COMPAT, "UTF-8"); // $response['body'] = htmlentities($response['body']);  prr($response);  die();\r
+      if (isset($response['headers']['location']) && $response['headers']['location']=='/submit/visitor') return 'Bad Saved Login';  \r
+      if ( $response['response']['code']=='200' && stripos($response['body'], 'Add a New Page')!==false){     \r
+        /*echo "You are IN"; */ return false; \r
+      } else return 'No Saved Login';\r
+      return false;  \r
+    }\r
+    function nxs_doConnectToSU($u, $p){ global $nxs_suCkArray; $hdrsArr = $this->nxs_getSUHeaders('https://www.stumbleupon.com/', false, false); //   echo "LOGGIN";\r
+      $response = wp_remote_get('https://www.stumbleupon.com/login', array('headers' => $hdrsArr)); $p = substr($p, 0, 16);      \r
+      if (is_wp_error($response)) { nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($response, true), ''); return "Connection ERROR. Please see log";}\r
+      $contents = $response['body']; $ckArr = $response['cookies']; //$response['body'] = htmlentities($response['body']);  prr($response);    die();       \r
+      $frmTxt = CutFromTo($contents, '<form id="login-form"','</form>'); $md = array(); $flds  = array();  $mids = '';// prr($frmTxt); \r
+      while (stripos($frmTxt, '<input')!==false){ $inpField = trim(CutFromTo($frmTxt,'<input', '>')); $name = trim(CutFromTo($inpField,'name="', '"'));\r
+        if ( stripos($inpField, '"hidden"')!==false && $name!='' && !in_array($name, $md)) { $md[] = $name; $val = trim(CutFromTo($inpField,'value="', '"')); $flds[$name]= $val; $mids .= "&".$name."=".$val;}\r
+        $frmTxt = substr($frmTxt, stripos($frmTxt, '<input')+8);\r
+      } $flds['user'] = $u; $flds['pass'] = $p; $flds['remember'] = 'true'; $flds['nativeSubmit'] = '0'; $flds['_method'] = 'create'; $flds['_output'] = 'Json';    \r
+      $hdrsArr = $this->nxs_getSUHeaders('https://www.stumbleupon.com/login', true, true);\r
+      $r2 = wp_remote_post( 'https://www.stumbleupon.com/login?_nospa=true', array( 'method' => 'POST', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr, 'body' => $flds, 'cookies' => $ckArr));\r
+      if (is_wp_error($r2)) { nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($r2, true), ''); return "Connection ERROR. Please see log";}\r
+      $ckArr = nxsMergeArraysOV($ckArr, $r2['cookies']); //prr($flds); prr($ckArr); prr($r2); prr($ckArr);   \r
+      if (is_array($r2) && !empty($r2['response']['code']) && $r2['response']['code']=='302') { $hdrsArr = $this->nxs_getSUHeaders('https://www.stumbleupon.com/login', false, false); \r
+        $r2 = wp_remote_get( 'https://www.stumbleupon.com/settings/profile/', array( 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr, 'cookies' => $ckArr)); \r
+        if (is_wp_error($r2)) { nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($r2, true), ''); return "Connection ERROR. Please see log";} //prr($r2);\r
+        if (stripos($r2['body'], '<a href="#" class="logout ')!==false) { $nxs_suCkArray = $ckArr; return false; }\r
+      } $resp = json_decode($r2['body'], true);  \r
+      if ($resp['_success']=='1') { $ckArr = nxsMergeArraysOV($ckArr, $r2['cookies']); $nxs_suCkArray = $ckArr; return false; } elseif (isset($resp['_reason'])) { return $resp['_reason']; } else return "ERROR";   \r
+    }\r
+    function nxs_doPostToSU($msg, $lnk, $cat, $tags, $nsfw=false){ global $nxs_suCkArray; $r2 = wp_remote_get($lnk); \r
+      $hdrsArr = $this->nxs_getSUHeaders('https://www.stumbleupon.com/submit', false, false); $ckArr = $nxs_suCkArray;   \r
+      $response = wp_remote_get('https://www.stumbleupon.com/submit', array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr, 'cookies' => $ckArr));   \r
+      if (is_wp_error($response)) return "Connection ERROR. ".print_r($response, true);   $ckArr2 = nxsMergeArraysOV($ckArr, $response['cookies']); //$nxs_suCkArray = $ckArr;\r
+  \r
+      $contents = $response['body']; //$response['body'] = htmlentities($response['body']);  prr($response);   \r
+      //$ckArr = nxsMergeArraysOV($ckArr, $response['cookies']);  \r
+      $hdrsArr = $this->nxs_getSUHeaders('https://www.stumbleupon.com/submit', true);\r
+      $frmTxt = CutFromTo($contents, '<form method="post" id="submit-form"','</form>'); $md = array(); $flds  = array(); $mids = ''; // prr($contents);\r
+      while (stripos($frmTxt, '<input')!==false){ $inpField = trim(CutFromTo($frmTxt,'<input', '>')); $name = trim(CutFromTo($inpField,'name="', '"'));\r
+        if ( stripos($inpField, '"hidden"')!==false && $name!='' && !in_array($name, $md)) { $md[] = $name; $val = trim(CutFromTo($inpField,'value="', '"')); $flds[$name]= $val; $mids .= "&".$name."=".$val;}\r
+        $frmTxt = substr($frmTxt, stripos($frmTxt, '<input')+8);\r
+      } $flds['url'] = $lnk; $flds['review'] = $msg; $flds['tags'] = $cat; $flds['nsfw'] = $nsfw?'true':'false'; $flds['user-tags'] = $tags;  $flds['_output'] = 'Json';  $flds['_method'] = 'create';  $flds['language'] = 'EN'; \r
+    \r
+      $r2 = wp_remote_post('https://www.stumbleupon.com/submit', array('method' => 'POST', 'timeout' => 45, 'redirection' => 0, 'headers' => $hdrsArr, 'body' => $flds, 'cookies' => $ckArr)); \r
+      if (is_wp_error($r2)) return "Connection ERROR. ".print_r($r2, true);  $resp = json_decode($r2['body'], true); \r
+  \r
+      if ( isset($resp['_reason']) && is_array($resp['_reason']) && count($resp['_reason'])>0 && stripos($resp['_reason'][0]['message'], 'Failed to add URL')!==false) { sleep(5);\r
+        $r2 = wp_remote_post('https://www.stumbleupon.com/submit', array('method' => 'POST', 'timeout' => 45, 'redirection' => 0, 'headers' => $hdrsArr, 'body' => $flds, 'cookies' => $ckArr)); \r
+        if (is_wp_error($r2)) return "Connection ERROR. ".print_r($r2, true);$resp = json_decode($r2['body'], true);\r
+      }\r
+  \r
+      if (stripos($resp['_error'], 'Invalid token')!==false) { // In case we got the Wrong Cookies\r
+        $r2 = wp_remote_post('https://www.stumbleupon.com/submit', array('method' => 'POST', 'timeout' => 45, 'redirection' => 0, 'headers' => $hdrsArr, 'body' => $flds, 'cookies' => $ckArr2)); \r
+        if (is_wp_error($r2)) return "Connection ERROR. ".print_r($r2, true); $resp = json_decode($r2['body'], true);\r
+    \r
+        if (stripos($resp['_reason'][0]['message'], 'Failed to add URL')!==false) { sleep(5);\r
+          $r2 = wp_remote_post('https://www.stumbleupon.com/submit', array('method' => 'POST', 'timeout' => 45, 'redirection' => 0, 'headers' => $hdrsArr, 'body' => $flds, 'cookies' => $ckArr2)); \r
+          if (is_wp_error($r2)) return "Connection ERROR. ".print_r($r2, true); $resp = json_decode($r2['body'], true); // prr($flds);  prr($resp); //nxs_addToLogN('SU', 'E', '-=DBG=- '.print_r($resp, true)." - #####", $extInfo);\r
+        }    \r
+      } \r
+  \r
+      if (isset($resp['discovery']['publicid'])) $pageID = $resp['discovery']['publicid']; elseif (isset($resp['discovery']['url']['publicid']))$pageID = $resp['discovery']['url']['publicid'];   \r
+      if ($resp['_success']=='1') { $ckArr = nxsMergeArraysOV($ckArr, $r2['cookies']); $nxs_suCkArray = $ckArr; return array("code"=>"OK", "post_id"=>$pageID); } \r
+        elseif (isset($resp['_reason'])) { $resp['_reason']['NXS_FIELDS'] = $flds; $resp['_reason']['NXS_RESP'] = $resp;  return $resp['_reason']; } else return "ERROR".print_r($resp, true);   \r
+    }\r
+\r
+    function doPostToNT($options, $message){ global $nxs_suCkArray; $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>'');\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['suUName']) || trim($options['suPass'])=='') { $badOut['Error'] = 'Not Configured'; return $badOut; }            \r
+      $pass = (substr($options['suPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['suPass'], 5)):$options['suPass']);      \r
+      //## Format\r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['suMsgFormat'], $message);  $urlToGo = (!empty($message['url']))?$message['url']:''; $tags = $message['tags'];\r
+      \r
+      if (isset($options['suSvC'])) $nxs_suCkArray = maybe_unserialize( $options['suSvC']); $loginError = true;\r
+      if (is_array($nxs_suCkArray)) $loginError = $this->nxs_doCheckSU(); if ($loginError!=false) $loginError = $this->nxs_doConnectToSU($options['suUName'], $pass);       \r
+      if ($loginError!==false) { $badOut['Error'] = print_r($loginError, true)." - BAD USER/PASS"; return $badOut; }  \r
+      \r
+      $ret = $this->nxs_doPostToSU($msg, $urlToGo, $options['suCat'], $tags, $options['nsfw']=='1'); // $extInfo .= "++".$msg."|".$link."|".$options['suCat']."|".$tags."|".$options['nsfw'];      \r
+      \r
+      if ($ret=='OK') $ret = array("code"=>"OK", "post_id"=>'');\r
+      if ( (!is_array($ret)) && $ret!='OK') { $badOut['Error'] .= 'Something went wrong - '.print_r($ret, true);  } \r
+        elseif (isset($ret['code']) && $ret['code']=='OK') return array('isPosted'=>'1', 'postID'=>$ret['post_id'], 'postURL'=>'http://www.stumbleupon.com/content/'.$ret['post_id'].'/comments', 'pDate'=>date('Y-m-d H:i:s')); else $badOut['Error'] .= 'Error - '.print_r($ret, true);\r
+      return $badOut;      \r
+   }    \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/su.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/su.php
new file mode 100644 (file)
index 0000000..2de6d06
--- /dev/null
@@ -0,0 +1,262 @@
+<?php    \r
+//## NextScripts Facebook Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'SU', 'lcode'=>'su', 'name'=>'StumbleUpon');\r
+\r
+if (!class_exists("nxs_snapClassSU")) { class nxs_snapClassSU {\r
+  //#### Show Common Settings\r
+  function showGenNTSettings($ntOpts){  global $nxs_plurl; $ntInfo = array('code'=>'SU', 'lcode'=>'su', 'name'=>'StumbleUpon', 'defNName'=>'suUName', 'tstReq' => false); ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>\r
+          <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />\r
+           <?php } ?>\r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;\r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($mgpo){ $options = array('nName'=>'', 'doSU'=>'1', 'suUName'=>'', 'suInclTags'=>'1', 'suAttch'=>'', 'suPass'=>''); $options['ntInfo']= array('lcode'=>'su'); $this->showNTSettings($mgpo, $options, true);}\r
+  \r
+  function suCats() { return '<option value="A.I.">A.I.</option><option value="AIDS">AIDS</option><option value="Accounting">Accounting</option><option value="Acting">Acting</option><option value="Action Movies">Action Movies</option><option value="Activism">Activism</option><option value="Adult Humor">Adult Humor</option><option value="Advertising">Advertising</option><option value="Africa">Africa</option><option value="African Americans">African Americans</option><option value="Aging">Aging</option><option value="Agriculture">Agriculture</option><option value="Alcoholic Drinks">Alcoholic Drinks</option><option value="Alternative Energy">Alternative Energy</option><option value="Alternative Health">Alternative Health</option><option value="Alternative News">Alternative News</option><option value="Alternative Rock">Alternative Rock</option><option value="Amateur Radio">Amateur Radio</option><option value="Ambient Music">Ambient Music</option><option value="American Football">American Football</option><option value="American History">American History</option><option value="American Lit.">American Lit.</option><option value="Anarchism">Anarchism</option><option value="Anatomy">Anatomy</option><option value="Ancient History">Ancient History</option><option value="Animals">Animals</option><option value="Animation">Animation</option><option value="Anime">Anime</option><option value="Anthropology">Anthropology</option><option value="Antiaging">Antiaging</option><option value="Antiques">Antiques</option><option value="Archaeology">Archaeology</option><option value="Architecture">Architecture</option><option value="Art History">Art History</option><option value="Arthritis">Arthritis</option><option value="Arts">Arts</option><option value="Asia">Asia</option><option value="Asthma">Asthma</option><option value="Astrology/Psychics">Astrology/Psychics</option><option value="Astronomy">Astronomy</option><option value="Atheist/Agnostic">Atheist/Agnostic</option><option value="Audio Equipment">Audio Equipment</option><option value="Australia">Australia</option><option value="Aviation/Aerospace">Aviation/Aerospace</option><option value="BDSM">BDSM</option><option value="Babes">Babes</option><option value="Babies">Babies</option><option value="Badminton">Badminton</option><option value="Ballet">Ballet</option><option value="Banking">Banking</option><option value="Bargains/Coupons">Bargains/Coupons</option><option value="Baseball">Baseball</option><option value="Basketball">Basketball</option><option value="Beauty">Beauty</option><option value="Beer">Beer</option><option value="Beverages">Beverages</option><option value="Bicycling">Bicycling</option><option value="Billiards">Billiards</option><option value="Biographies">Biographies</option><option value="Biology">Biology</option><option value="Biomechanics">Biomechanics</option><option value="Biotech">Biotech</option><option value="Bird Watching">Bird Watching</option><option value="Birds">Birds</option><option value="Bisexual Culture">Bisexual Culture</option><option value="Bisexual Sex">Bisexual Sex</option><option value="Bizarre/Oddities">Bizarre/Oddities</option><option value="Blues music">Blues music</option><option value="Board Games">Board Games</option><option value="Boating">Boating</option><option value="Bodybuilding">Bodybuilding</option><option value="Books">Books</option><option value="Botany">Botany</option><option value="Bowling">Bowling</option><option value="Boxing">Boxing</option><option value="Brain Disorders">Brain Disorders</option><option value="Brazil">Brazil</option><option value="British Literature">British Literature</option><option value="Britpop">Britpop</option><option value="Buddhism">Buddhism</option><option value="Business">Business</option><option value="C.A.D.">C.A.D.</option><option value="Camping">Camping</option><option value="Canada">Canada</option><option value="Cancer">Cancer</option><option value="Canoeing/Kayaking">Canoeing/Kayaking</option><option value="Capitalism">Capitalism</option><option value="Car Parts">Car Parts</option><option value="Card Games">Card Games</option><option value="Career planning">Career planning</option><option value="Caribbean">Caribbean</option><option value="Cars">Cars</option><option value="Cartoons">Cartoons</option><option value="Catholic">Catholic</option><option value="Cats">Cats</option><option value="Celebrities">Celebrities</option><option value="Cell Phones">Cell Phones</option><option value="Celtic Music">Celtic Music</option><option value="Central America">Central America</option><option value="Chaos/Complexity">Chaos/Complexity</option><option value="Cheerleading">Cheerleading</option><option value="Chemical Eng.">Chemical Eng.</option><option value="Chemistry">Chemistry</option><option value="Chess">Chess</option><option value="Children\'s Books">Children\'s Books</option><option value="China">China</option><option value="Christian Music">Christian Music</option><option value="Christianity">Christianity</option><option value="Christmas">Christmas</option><option value="Cigars">Cigars</option><option value="Civil Engineering">Civil Engineering</option><option value="Classic Films">Classic Films</option><option value="Classic Rock">Classic Rock</option><option value="Classical Music">Classical Music</option><option value="Classical Studies">Classical Studies</option><option value="Climbing">Climbing</option><option value="Clothing">Clothing</option><option value="Coffee">Coffee</option><option value="Cognitive Science">Cognitive Science</option><option value="Cold War">Cold War</option><option value="Collecting">Collecting</option><option value="Comedy Movies">Comedy Movies</option><option value="Comic Books">Comic Books</option><option value="Communism">Communism</option><option value="Computer Graphics">Computer Graphics</option><option value="Computer Hardware">Computer Hardware</option><option value="Computer Science">Computer Science</option><option value="Computer Security">Computer Security</option><option value="Computers">Computers</option><option value="Conservative Politics">Conservative Politics</option><option value="Conspiracies">Conspiracies</option><option value="Construction">Construction</option><option value="Consumer Info">Consumer Info</option><option value="Continuing Education">Continuing Education</option><option value="Counterculture">Counterculture</option><option value="Country music">Country music</option><option value="Crafts">Crafts</option><option value="Cricket">Cricket</option><option value="Crime">Crime</option><option value="Crochet">Crochet</option><option value="Cult Films">Cult Films</option><option value="Culture/Ethnicity">Culture/Ethnicity</option><option value="Cyberculture">Cyberculture</option><option value="DJ\'s/Mixing">DJ\'s/Mixing</option><option value="Dance Music">Dance Music</option><option value="Dancing">Dancing</option><option value="Databases">Databases</option><option value="Dating Tips">Dating Tips</option><option value="Daytrading">Daytrading</option><option value="Dentistry">Dentistry</option><option value="Design">Design</option><option value="Desktop Publishing">Desktop Publishing</option><option value="Diabetes">Diabetes</option><option value="Disabilities">Disabilities</option><option value="Disco">Disco</option><option value="Divorce">Divorce</option><option value="Doctors/Surgeons">Doctors/Surgeons</option><option value="Dogs">Dogs</option><option value="Dolls/Puppets">Dolls/Puppets</option><option value="Drama Movies">Drama Movies</option><option value="Drawing">Drawing</option><option value="Drugs">Drugs</option><option value="Drum\'n\'Bass">Drum\'n\'Bass</option><option value="Eastern Studies">Eastern Studies</option><option value="Eating Disorders">Eating Disorders</option><option value="Ecology">Ecology</option><option value="Ecommerce">Ecommerce</option><option value="Economics">Economics</option><option value="Education">Education</option><option value="Electrical Eng.">Electrical Eng.</option><option value="Electronic Devices">Electronic Devices</option><option value="Electronic Parts">Electronic Parts</option><option value="Electronica/IDM">Electronica/IDM</option><option value="Embedded Systems">Embedded Systems</option><option value="Encryption">Encryption</option><option value="Energy Industry">Energy Industry</option><option value="Entertaining Guests">Entertaining Guests</option><option value="Entrepreneurship">Entrepreneurship</option><option value="Environment">Environment</option><option value="Equestrian/Horses">Equestrian/Horses</option><option value="Ergonomics">Ergonomics</option><option value="Erotic Literature">Erotic Literature</option><option value="Ethics">Ethics</option><option value="Ethnic Music">Ethnic Music</option><option value="Europe">Europe</option><option value="Evolution">Evolution</option><option value="Exotic Pets">Exotic Pets</option><option value="Extreme Sports">Extreme Sports</option><option value="Facebook">Facebook</option><option value="Family">Family</option><option value="Fantasy Books">Fantasy Books</option><option value="Fashion">Fashion</option><option value="Feminism">Feminism</option><option value="Fetish Sexuality">Fetish Sexuality</option><option value="Figure Skating">Figure Skating</option><option value="Film Noir">Film Noir</option><option value="Filmmaking">Filmmaking</option><option value="Financial planning">Financial planning</option><option value="Fine Arts">Fine Arts</option><option value="Firefox">Firefox</option><option value="Fish">Fish</option><option value="Fishing">Fishing</option><option value="Fitness">Fitness</option><option value="Flyfishing">Flyfishing</option><option value="Folk music">Folk music</option><option value="Food/Cooking">Food/Cooking</option><option value="For Kids">For Kids</option><option value="Foreign Films">Foreign Films</option><option value="Forensics">Forensics</option><option value="Forestry">Forestry</option><option value="Forums">Forums</option><option value="France">France</option><option value="Funk">Funk</option><option value="Futurism">Futurism</option><option value="Gadgets">Gadgets</option><option value="Gambling">Gambling</option><option value="Gardening">Gardening</option><option value="Gay Culture">Gay Culture</option><option value="Gay Sex">Gay Sex</option><option value="Genealogy">Genealogy</option><option value="Genetics">Genetics</option><option value="Geography">Geography</option><option value="Geoscience">Geoscience</option><option value="Germany">Germany</option><option value="Glaucoma">Glaucoma</option><option value="Golf">Golf</option><option value="Gospel music">Gospel music</option><option value="Goth Culture">Goth Culture</option><option value="Government">Government</option><option value="Graphic Design">Graphic Design</option><option value="Guitar">Guitar</option><option value="Guns">Guns</option><option value="Gymnastics">Gymnastics</option><option value="Hacking">Hacking</option><option value="Health">Health</option><option value="Heart Conditions">Heart Conditions</option><option value="Heavy metal">Heavy metal</option><option value="Hedonism">Hedonism</option><option value="Hentai Anime">Hentai Anime</option><option value="Hiking">Hiking</option><option value="Hinduism">Hinduism</option><option value="HipHop/Rap">HipHop/Rap</option><option value="History">History</option><option value="Hockey">Hockey</option><option value="Home Business">Home Business</option><option value="Home Improvement">Home Improvement</option><option value="Homebrewing">Homebrewing</option><option value="Homemaking">Homemaking</option><option value="Homeschooling">Homeschooling</option><option value="Horror Movies">Horror Movies</option><option value="Hotels">Hotels</option><option value="House music">House music</option><option value="Humanitarianism">Humanitarianism</option><option value="Humanities">Humanities</option><option value="Humor">Humor</option><option value="Hunting">Hunting</option><option value="IT">IT</option><option value="Independent Film">Independent Film</option><option value="India">India</option><option value="Indie Rock/Pop">Indie Rock/Pop</option><option value="Industrial Design">Industrial Design</option><option value="Industrial Music">Industrial Music</option><option value="Instant Messaging">Instant Messaging</option><option value="Insurance">Insurance</option><option value="Int\'l Development">Int\'l Development</option><option value="Interior Design">Interior Design</option><option value="Internet">Internet</option><option value="Internet Tools">Internet Tools</option><option value="Investing">Investing</option><option value="Ipod">Ipod</option><option value="Iraq">Iraq</option><option value="Ireland">Ireland</option><option value="Islam">Islam</option><option value="Israel">Israel</option><option value="Italy">Italy</option><option value="Japan">Japan</option><option value="Java">Java</option><option value="Jazz">Jazz</option><option value="Jewelry">Jewelry</option><option value="Journalism">Journalism</option><option value="Judaism">Judaism</option><option value="Karaoke">Karaoke</option><option value="Kids">Kids</option><option value="Kinesiology">Kinesiology</option><option value="Knitting">Knitting</option><option value="Korea">Korea</option><option value="Landscaping">Landscaping</option><option value="Latin Music">Latin Music</option><option value="Law">Law</option><option value="Learning Disorders">Learning Disorders</option><option value="Lefthanded">Lefthanded</option><option value="Lesbian Culture">Lesbian Culture</option><option value="Lesbian Sex">Lesbian Sex</option><option value="Liberal Politics">Liberal Politics</option><option value="Liberties/Rights">Liberties/Rights</option><option value="Library Resources">Library Resources</option><option value="Lingerie">Lingerie</option><option value="Linguistics">Linguistics</option><option value="Linux/Unix">Linux/Unix</option><option value="Literature">Literature</option><option value="Live Theatre">Live Theatre</option><option value="Logic">Logic</option><option value="Lounge Music">Lounge Music</option><option value="Luxury">Luxury</option><option value="MacOS">MacOS</option><option value="Machinery">Machinery</option><option value="Magic/Illusions">Magic/Illusions</option><option value="Management/HR">Management/HR</option><option value="Manufacturing">Manufacturing</option><option value="Marine Biology">Marine Biology</option><option value="Marketing">Marketing</option><option value="Married Life">Married Life</option><option value="Martial Arts">Martial Arts</option><option value="Matchmaking">Matchmaking</option><option value="Mathematics">Mathematics</option><option value="Mechanical Eng.">Mechanical Eng.</option><option value="Medical Science">Medical Science</option><option value="Medieval History">Medieval History</option><option value="Memorabilia">Memorabilia</option><option value="Men\'s Issues">Men\'s Issues</option><option value="Mental Health">Mental Health</option><option value="Meteorology">Meteorology</option><option value="Mexico">Mexico</option><option value="Microbiology">Microbiology</option><option value="Middle East">Middle East</option><option value="Military">Military</option><option value="Mining/Metallurgy">Mining/Metallurgy</option><option value="Mobile Computing">Mobile Computing</option><option value="Mormon">Mormon</option><option value="Motor Sports">Motor Sports</option><option value="Motorcycles">Motorcycles</option><option value="Movies">Movies</option><option value="Multimedia">Multimedia</option><option value="Music">Music</option><option value="Music Composition">Music Composition</option><option value="Music Instruments">Music Instruments</option><option value="Music Theory">Music Theory</option><option value="Musicals">Musicals</option><option value="Musician Resources">Musician Resources</option><option value="Mutual Funds">Mutual Funds</option><option value="Mystery Novels">Mystery Novels</option><option value="Mythology">Mythology</option><option value="Nanotech">Nanotech</option><option value="Native Americans">Native Americans</option><option value="Nature">Nature</option><option value="Netherlands">Netherlands</option><option value="Network Security">Network Security</option><option value="Neuroscience">Neuroscience</option><option value="New Age">New Age</option><option value="New York">New York</option><option value="News(General)">News(General)</option><option value="Nightlife">Nightlife</option><option value="Nonprofit/Charity">Nonprofit/Charity</option><option value="Nuclear Science">Nuclear Science</option><option value="Nude Art">Nude Art</option><option value="Nursing">Nursing</option><option value="Nutrition">Nutrition</option><option value="Oceania">Oceania</option><option value="Oldies Music">Oldies Music</option><option value="Online Games">Online Games</option><option value="Open Source">Open Source</option><option value="Opera">Opera</option><option value="Operating Systems">Operating Systems</option><option value="Options/Futures">Options/Futures</option><option value="Orthodox">Orthodox</option><option value="Outdoors">Outdoors</option><option value="P2P">P2P</option><option value="PHP">PHP</option><option value="Paganism">Paganism</option><option value="Painting">Painting</option><option value="Paleontology">Paleontology</option><option value="Paranormal">Paranormal</option><option value="Parenting">Parenting</option><option value="Percussion">Percussion</option><option value="Performing Arts">Performing Arts</option><option value="Peripheral Devices">Peripheral Devices</option><option value="Perl">Perl</option><option value="Personal Sites">Personal Sites</option><option value="Petroleum">Petroleum</option><option value="Pets">Pets</option><option value="Pharmacology">Pharmacology</option><option value="Philosophy">Philosophy</option><option value="Photo Gear">Photo Gear</option><option value="Photography">Photography</option><option value="Photoshop">Photoshop</option><option value="Physical Therapy">Physical Therapy</option><option value="Physics">Physics</option><option value="Physiology">Physiology</option><option value="Poetry">Poetry</option><option value="Poker">Poker</option><option value="Political Science">Political Science</option><option value="Politics">Politics</option><option value="Pop music">Pop music</option><option value="Pornography">Pornography</option><option value="Postmodernism">Postmodernism</option><option value="Pregnancy/Birth">Pregnancy/Birth</option><option value="Programming">Programming</option><option value="Protestant">Protestant</option><option value="Proxy">Proxy</option><option value="Psychiatry">Psychiatry</option><option value="Psychology">Psychology</option><option value="Punk Rock">Punk Rock</option><option value="Puzzles">Puzzles</option><option value="Quilting">Quilting</option><option value="Quizzes">Quizzes</option><option value="Quotes">Quotes</option><option value="Racquetball">Racquetball</option><option value="Radio Broadcasts">Radio Broadcasts</option><option value="Rave Culture">Rave Culture</option><option value="Real Estate">Real Estate</option><option value="Recording Gear">Recording Gear</option><option value="Reggae">Reggae</option><option value="Relationships">Relationships</option><option value="Religion">Religion</option><option value="Research">Research</option><option value="Restaurants">Restaurants</option><option value="Restoration">Restoration</option><option value="Robotics">Robotics</option><option value="Rock music">Rock music</option><option value="Rodeo">Rodeo</option><option value="Roleplaying Games">Roleplaying Games</option><option value="Romance Novels">Romance Novels</option><option value="Rugby">Rugby</option><option value="Running">Running</option><option value="Russia">Russia</option><option value="SEO">SEO</option><option value="Sailing">Sailing</option><option value="Satire">Satire</option><option value="Science">Science</option><option value="Science Fiction">Science Fiction</option><option value="Scientology">Scientology</option><option value="Scouting">Scouting</option><option value="Scrapbooking">Scrapbooking</option><option value="Scuba Diving">Scuba Diving</option><option value="Sculpting">Sculpting</option><option value="Search">Search</option><option value="Self Improvement">Self Improvement</option><option value="Semiconductors">Semiconductors</option><option value="Senior Citizens">Senior Citizens</option><option value="Sewing">Sewing</option><option value="Sex Industry">Sex Industry</option><option value="Sex Toys">Sex Toys</option><option value="Sexual Health">Sexual Health</option><option value="Sexuality">Sexuality</option><option value="Shakespeare">Shakespeare</option><option value="Shareware">Shareware</option><option value="Shopping">Shopping</option><option value="Skateboarding">Skateboarding</option><option value="Skiing">Skiing</option><option value="Skydiving">Skydiving</option><option value="Snowboarding">Snowboarding</option><option value="Soap Operas">Soap Operas</option><option value="Soccer">Soccer</option><option value="Socialism">Socialism</option><option value="Sociology">Sociology</option><option value="Software">Software</option><option value="Songwriting">Songwriting</option><option value="Soul/R&amp;B">Soul/R&amp;B</option><option value="Soundtracks">Soundtracks</option><option value="South America">South America</option><option value="Space Exploration">Space Exploration</option><option value="Spain">Spain</option><option value="Spas">Spas</option><option value="Spirituality">Spirituality</option><option value="Sports(General)">Sports(General)</option><option value="Squash">Squash</option><option value="Statistics">Statistics</option><option value="StumbleUpon">StumbleUpon</option><option value="Subculture">Subculture</option><option value="Substance Abuse">Substance Abuse</option><option value="Sufism">Sufism</option><option value="Sunni">Sunni</option><option value="Supercomputing">Supercomputing</option><option value="Surfing">Surfing</option><option value="Survivalist">Survivalist</option><option value="Swimming">Swimming</option><option value="Swingers">Swingers</option><option value="Tattoos/Piercing">Tattoos/Piercing</option><option value="Taxation">Taxation</option><option value="Tea">Tea</option><option value="Techno">Techno</option><option value="Technology">Technology</option><option value="Teen Life">Teen Life</option><option value="Teen Parenting">Teen Parenting</option><option value="Telecom">Telecom</option><option value="Television">Television</option><option value="Tennis">Tennis</option><option value="Terrorism">Terrorism</option><option value="Toys">Toys</option><option value="Track/Field">Track/Field</option><option value="Trains/Railroads">Trains/Railroads</option><option value="Trance">Trance</option><option value="Transexual Sex">Transexual Sex</option><option value="Transportation">Transportation</option><option value="Travel">Travel</option><option value="TripHop/Downtempo">TripHop/Downtempo</option><option value="UFOs">UFOs</option><option value="UK">UK</option><option value="USA">USA</option><option value="University/College">University/College</option><option value="Vegetarian">Vegetarian</option><option value="Video Equipment">Video Equipment</option><option value="Video Games">Video Games</option><option value="Vintage Cars">Vintage Cars</option><option value="Virtual Reality">Virtual Reality</option><option value="Vocal Music">Vocal Music</option><option value="Volleyball">Volleyball</option><option value="Water Sports">Water Sports</option><option value="Web Development">Web Development</option><option value="Webhosting">Webhosting</option><option value="Weblogs">Weblogs</option><option value="Weddings">Weddings</option><option value="Weight Loss">Weight Loss</option><option value="Wicca">Wicca</option><option value="Windows">Windows</option><option value="Windows Dev">Windows Dev</option><option value="Windsurfing">Windsurfing</option><option value="Wine">Wine</option><option value="Women\'s Issues">Women\'s Issues</option><option value="Woodworking">Woodworking</option><option value="Wrestling">Wrestling</option><option value="Writing">Writing</option><option value="Yoga">Yoga</option><option value="Zoology">Zoology</option>'; }\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['nsfw'])) $options['nsfw'] = '';  ?>\r
+            <div id="doSU<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">     <input type="hidden" name="apDoSSU<?php echo $ii; ?>" value="0" id="apDoSSU<?php echo $ii; ?>" />          \r
+            \r
+             <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/su16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/setup-installation-stumbleupon-social-networks-auto-poster-wordpress/"><?php $nType="StumbleUpon"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="su[<?php echo $ii; ?>][nName]" id="sunName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel('su', $ii, $options['qTLng']); ?>\r
+            \r
+              <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+    \r
+            \r
+            <div style="width:100%;"><strong>StumbleUpon Username:</strong> </div><input name="su[<?php echo $ii; ?>][apSUUName]" id="apSUUName" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['suUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+            <div style="width:100%;"><strong>StumbleUpon Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="su[<?php echo $ii; ?>][apSUPass]" id="apSUPass" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['suPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['suPass'], 5)):$options['suPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>                \r
+            \r
+            <?php if ($isNew) { ?> <input type="hidden" name="su[<?php echo $ii; ?>][apDoSU]" value="1" id="apDoNewSU<?php echo $ii; ?>" /> <?php } ?>\r
+            <br/>            \r
+            \r
+            <div id="altFormat" style="">\r
+  <div style="width:100%;"><strong id="altFormatText">StumbleUpon Category:</strong> </div>\r
+  \r
+              <select name="su[<?php echo $ii; ?>][apSUCat]" id="apSUCat<?php echo $ii; ?>"><option value="error" selected="selected" disabled="">Select default StumbleUpon Category</option>\r
+            <?php  $suCats = $this->suCats(); \r
+              if (isset($options['suCat']) && $options['suCat']!='') $suCats = str_replace('"'.$options['suCat'].'"', '"'.$options['suCat'].'" selected="selected"', $suCats);  echo $suCats; \r
+            \r
+             ?>\r
+            </select>\r
+            <input value="1"  id="suInclTags" type="checkbox" name="su[<?php echo $ii; ?>][nsfw]"  <?php if ((int)$options['nsfw'] == 1) echo "checked"; ?> /> <strong>NSFW</strong>\r
+            </div>   \r
+            \r
+            <p style="margin-bottom: 20px;margin-top: 5px;"><input value="1"  id="suInclTags" type="checkbox" name="su[<?php echo $ii; ?>][suInclTags]"  <?php if ((int)$options['suInclTags'] == 1) echo "checked"; ?> /> \r
+              <strong>Post with tags</strong> Tags from the blogpost will be auto posted to StumbleUpon                                \r
+            </p>\r
+            \r
+            <div id="altFormat" style="">\r
+  <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> (<a href="#" id="apSUMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apSUMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div>\r
+              \r
+              <textarea cols="150" rows="3" id="su<?php echo $ii; ?>SNAPformat" name="su[<?php echo $ii; ?>][apSUMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#su<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apSUMsgFrmt<?php echo $ii; ?>');"><?php if ($isNew) echo "%TITLE% - %EXCERPT%"; else _e(apply_filters('format_to_edit', htmlentities($options['suMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea>\r
+              \r
+              \r
+              <?php nxs_doShowHint("apSUMsgFrmt".$ii); ?>\r
+            </div><br/>    \r
+            \r
+            <?php if ($options['suPass']!='') { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('SU', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s' , 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?></a>      \r
+               \r
+            <?php } \r
+            \r
+            ?></div>\r
+            <?php /* ######################## Advanced Tab ####################### */ ?>\r
+  <?php if (!$isNew) { ?>  <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+     <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); \r
+      nxs_showRepostSettings($nt, $ii, $options); ?>\r
+            \r
+            \r
+    </div>  <?php } ?> <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div></div><?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = 'SU'; $lcode = 'su'; \r
+    foreach ($post as $ii => $pval){       \r
+      if (!empty($pval['apSUUName']) && !empty($pval['apSUPass'])){ if (!isset($options[$ii])) $options[$ii] = array();      \r
+      \r
+        $isUPChanged = ((isset($pval['apSUPass']) && isset($options[$ii]['suPass']) && 'n5g9a'.nsx_doEncode($pval['apSUPass'])!=$options[$ii]['suPass']) || !isset($options[$ii]['suPass'])) ||  \r
+           ((isset($pval['apSUUName']) && isset($options[$ii]['suUName']) && $pval['apSUUName']!=$options[$ii]['suUName']) || !isset($options[$ii]['suUName']));\r
+        if ($isUPChanged) $options[$ii]['suSvC'] = '';        \r
+        \r
+        if (isset($pval['apSUUName']))   $options[$ii]['suUName'] = trim($pval['apSUUName']);\r
+        if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);\r
+        if (isset($pval['apSUPass']))    $options[$ii]['suPass'] = 'n5g9a'.nsx_doEncode($pval['apSUPass']); else $options[$ii]['suPass'] = '';  \r
+        if (isset($pval['apSUCat'])) $options[$ii]['suCat'] = trim($pval['apSUCat']);                                                  \r
+        if (isset($pval['suInclTags']))     $options[$ii]['suInclTags'] = $pval['suInclTags']; else $options[$ii]['suInclTags'] = 0;\r
+        if (isset($pval['apSUMsgFrmt'])) $options[$ii]['suMsgFormat'] = trim($pval['apSUMsgFrmt']);             \r
+\r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if (!empty($options[$ii]['catSel']) && $options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+                                             \r
+        if (isset($pval['apDoSU']))      $options[$ii]['doSU'] = $pval['apDoSU']; else $options[$ii]['doSU'] = 0; \r
+        if (isset($pval['nsfw']))      $options[$ii]['nsfw'] = $pval['nsfw']; else $options[$ii]['nsfw'] = 0; \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }  \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID;  $nt = 'su'; $ntU = 'SU'; //prr($post); prr($ntOpts);\r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapSU', true));  if (is_array($pMeta)) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]);  \r
+        $doSU = $ntOpt['doSU'] && (is_array($pMeta) || $ntOpt['catSel']!='1');   \r
+        $isAvailSU =  $ntOpt['suUName']!='' && $ntOpt['suPass']!=''; $suMsgFormat = htmlentities($ntOpt['suMsgFormat'], ENT_COMPAT, "UTF-8"); \r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2">\r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvailSU) { ?><input class="nxsGrpDoChb" value="1" id="doSU<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="su[<?php echo $ii; ?>][doSU]" <?php if ((int)$doSU == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="su[<?php echo $ii; ?>][doSU]" value="<?php echo $doSU;?>"> <?php } ?> <?php } ?>\r
+      \r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/su16.png);">StumbleUpon - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvailSU) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToSU_repostButton" id="rePostToSU_button" value="<?php _e('Repost to StumbleUpon', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php } ?>\r
+                    \r
+                    <?php  if (is_array($pMeta) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) { \r
+                        \r
+                        ?> <span id="pstdSU<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+                      <a style="font-size: 10px;" href="http://www.stumbleupon.com/content/<?php echo $pMeta[$ii]['pgID']; ?>" target="_blank"><?php $nType="Stumbleupon"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                </td></tr>                \r
+                \r
+                <?php if (!$isAvailSU) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your StumbleUpon Account to AutoPost to StumbleUpon</b>\r
+                <?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>su" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> />\r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>                \r
+                </td></tr> <?php } ?>\r
+               \r
+                <tr id="altFormat1" style=""><th scope="row" style="text-align:right; width:60px; padding-right:10px;">Category:</th>\r
+                <td><div id="altFormat" style="">  \r
+              <select name="su[<?php echo $ii; ?>][apSUCat]" id="apSUCat<?php echo $ii; ?>"><option value="error" selected="selected" disabled="">Select default StumbleUpon Category</option>\r
+            <?php  $suCats = $this->suCats();               \r
+              if (isset($ntOpt['suCat']) && $ntOpt['suCat']!='') $suCats = str_replace('"'.$ntOpt['suCat'].'"', '"'.$ntOpt['suCat'].'" selected="selected"', $suCats);  echo $suCats;             \r
+             ?>\r
+            </select> \r
+            <input value="0"  id="sunsfw<?php echo $ii; ?>" type="hidden" name="su[<?php echo $ii; ?>][nsfw]" />\r
+            <input value="1"  id="sunsfw<?php echo $ii; ?>" type="checkbox" name="su[<?php echo $ii; ?>][nsfw]"  <?php if ((int)$ntOpt['nsfw'] == 1) echo "checked"; ?> /> <strong>NSFW</strong>\r
+            \r
+            </div> </td></tr>\r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                <td>                \r
+                <textarea cols="150" rows="1" id="su<?php echo $ii; ?>SNAPformat" name="su[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#su<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apSUMsgFrmt<?php echo $ii; ?>');"><?php echo $suMsgFormat; ?></textarea>\r
+                <?php nxs_doShowHint("apSUMsgFrmt".$ii); ?></td></tr>\r
+                <?php } \r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){  if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = '';  \r
+    if (isset($pMeta['nsfw'])) $optMt['nsfw'] = $pMeta['nsfw']; else $optMt['nsfw'] = 0;\r
+    if (isset($pMeta['SNAPformat'])) $optMt['suMsgFormat'] = $pMeta['SNAPformat']; \r
+    if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];      \r
+    if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+    if (isset($pMeta['apSUCat'])) $optMt['suCat'] = $pMeta['apSUCat'];     \r
+    if (isset($pMeta['doSU'])) $optMt['doSU'] = $pMeta['doSU'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doSU'] = 0; } \r
+    if (isset($pMeta['SNAPincludeSU']) && $pMeta['SNAPincludeSU'] == '1' ) $optMt['doSU'] = 1;\r
+    return $optMt;\r
+  }  \r
+}}\r
+if (!function_exists("nxs_rePostToSU_ajax")) {\r
+  function nxs_rePostToSU_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; $options = get_option('NS_SNAutoPoster');  \r
+    foreach ($options['su'] as $ii=>$two) if ($ii==$_POST['nid']) {   $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['gpPageID'].$two['gpUName']==$_POST['nid']) {  \r
+      $gppo =  get_post_meta($postID, 'snapSU', true); $gppo =  maybe_unserialize($gppo);// prr($gppo);\r
+      if (is_array($gppo) && isset($gppo[$ii]) && is_array($gppo[$ii])){ $ntClInst = new nxs_snapClassSU(); $two = $ntClInst->adjMetaOpt($two, $gppo[$ii]); }\r
+      $result = nxs_doPublishToSU($postID, $two); if ($result == 200) die("Successfully sent your post to StumbleUpon."); else die($result);        \r
+    }    \r
+  }\r
+}  \r
+\r
+if (!function_exists("nxs_doPublishToSU")) { //## Second Function to Post to SU\r
+  function nxs_doPublishToSU($postID, $options){ global $nxs_suCkArray; $ntCd = 'SU'; $ntCdL = 'su'; $ntNm = 'StumbleUpon';    if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+    //$backtrace = debug_backtrace(); nxs_addToLogN('W', 'Enter', $ntCd, 'I am here - '.$ntCd."|".print_r($backtrace, true), ''); \r
+    //if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToSU',  array($postID, $options));   \r
+    $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName'])); \r
+    $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url();     \r
+    \r
+    $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+    $logNT = '<span style="color:#000080">StumbleUpon</span> - '.$options['nName'];      \r
+    $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+    /* Check is still nessesary or redo\r
+    if ($options['reset'] != '1' && $options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {  sleep(5);\r
+         nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$uqID); return;\r
+        }\r
+    }\r
+    */\r
+    $suCat = $options['suCat'];      \r
+    // if (function_exists("get_post_thumbnail_id") ){ $src = wp_get_attachment_image_src(get_post_thumbnail_id($postID), 'thumbnail'); $src = $src[0];}    \r
+    if ($postID=='0') { echo "Testing ... <br/><br/>"; $urlToGo = home_url(); $options['suMsgFormat'] = 'Test Link from '.$urlToGo; } else { $post = get_post($postID); if(!$post) return;\r
+      $options['suMsgFormat'] = nsFormatMessage($options['suMsgFormat'], $postID, $addParams); nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));\r
+      //## MyURL - URLToGo code\r
+      $options = nxs_getURL($options, $postID, $addParams); $urlToGo = $options['urlToUse'];\r
+    } \r
+    $dusername = $options['suUName']; //$link = urlencode($link); $desc = urlencode(substr($msg, 0, 500));      \r
+    if ($options['suInclTags']=='1') { $t = wp_get_post_tags($postID); $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = urlencode(implode(',',$tggs)); $tags = str_replace(' ','+',$tags); } else $tags = '';\r
+    $extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?$post->post_title:'');\r
+    //## Post             \r
+    $message = array('siteName'=>$blogTitle, 'tags'=>$tags, 'url'=>$urlToGo);\r
+    //## Actual Post\r
+    $ntToPost = new nxs_class_SNAP_SU(); $ret = $ntToPost->doPostToNT($options, $message);\r
+    //## Save Session\r
+    if (serialize($nxs_suCkArray)!=$options['suSvC']) { global $plgn_NS_SNAutoPoster;  $gOptions = $plgn_NS_SNAutoPoster->nxs_options;\r
+        if (isset($options['ii']) && $options['ii']!=='')  { $gOptions['su'][$options['ii']]['suSvC'] = serialize($nxs_suCkArray); update_option('NS_SNAutoPoster', $gOptions);  }\r
+        else foreach ($gOptions['su'] as $ii=>$gpn) { $result = array_diff($options, $gpn); \r
+          if (!is_array($result) || count($result)<1) { $gOptions['su'][$ii]['suSvC'] = serialize($nxs_suCkArray); update_option('NS_SNAutoPoster', $gOptions); break; }\r
+        }        \r
+      }  \r
+    //## Process Results\r
+    if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+      if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+    } else {  // ## All Good - log it.\r
+      if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+        else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'postURL'=>$ret['postURL'], 'pDate'=>date('Y-m-d H:i:s'))); \r
+        $extInfo .= ' | <a href="'.$ret['postURL'].'" target="_blank">Post Link</a>'; nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+    } //prr($ret);\r
+    //## Return Result\r
+    if ($ret['isPosted']=='1') return 200; else return print_r($ret, true); \r
+  }\r
+}  \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/tr.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/tr.api.php
new file mode 100644 (file)
index 0000000..04f33ee
--- /dev/null
@@ -0,0 +1,48 @@
+<?php    \r
+//## NextScripts Tumblr Connection Class\r
+$nxs_snapAPINts[] = array('code'=>'TR', 'lcode'=>'tr', 'name'=>'Tumblr');\r
+\r
+if (!class_exists("nxs_class_SNAP_TR")) { class nxs_class_SNAP_TR {\r
+    \r
+    var $ntCode = 'TR';\r
+    var $ntLCode = 'tr';     \r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array();\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }    \r
+    function doPostToNT($options, $message){ $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>''); \r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['trConsKey']) || trim($options['trConsSec'])=='' || empty($options['trAccessTocken'])) { $badOut['Error'] = 'Not Configured'; return $badOut; }                  \r
+      if (!isset($options['postType']) && isset($options['trPostType'])) $options['postType'] = $options['trPostType']; //## Compatibility with v <3.2\r
+      if (empty($options['imgSize'])) $options['imgSize'] = ''; if (empty($message['postDate'])) $message['postDate'] = '';\r
+      if (empty($options['trMsgTFormat'])) $options['trMsgTFormat'] = '%TITLE%'; \r
+      //## Format\r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['trMsgFormat'], $message); \r
+      if (!empty($message['pTitle'])) $msgT = $message['pTitle']; else $msgT = nxs_doFormatMsg($options['trMsgTFormat'], $message);\r
+      \r
+      //## Post    \r
+      $options['trURL'] = trim(str_ireplace('http://', '', $options['trURL'])); if (substr($options['trURL'],-1)=='/') $options['trURL'] = substr($options['trURL'], 0, -1);\r
+      require_once('apis/trOAuth.php'); $consumer_key = $options['trConsKey']; $consumer_secret = $options['trConsSec'];\r
+      $tum_oauth = new TumblrOAuth($consumer_key, $consumer_secret, $options['trAccessTocken']['oauth_token'], $options['trAccessTocken']['oauth_token_secret']); //prr($options);    \r
+    \r
+      $postArr = array('tags'=>$message['tags'], 'date'=>$message['postDate']); if ($options['fillSrcURL']=='1') $postArr['source_url'] = $message['url'];  \r
+      if (isset($message['imageURL'])) $imgURL = trim(nxs_getImgfrOpt($message['imageURL'], $options['imgSize'])); else $imgURL = '';\r
+      // postType\r
+      if ($options['postType']=='I') { $postArr['type'] = 'photo'; $postArr['caption'] = $msg;  $postArr['source'] = $imgURL;       \r
+        if (!isset($options['cImgURL']) || $options['cImgURL']=='' || $options['cImgURL']=='R' ) $postArr['link'] = $message['url']; \r
+          elseif ($options['cImgURL']=='S' ) { $postArr['link'] = $message['url']; $postArr['link'] = nxs_mkShortURL($postArr['link']);} \r
+      } elseif($options['postType']=='U') { $postArr['type'] = 'audio'; $postArr['caption'] = $msg;  $postArr['external_url'] = $aUrl;\r
+      } elseif($options['postType']=='V') { $postArr['type'] = 'video'; $postArr['caption'] = $msg;   \r
+        $embedTxt = '<iframe width="560" height="315" src="http://www.youtube.com/embed/'.$message['videoURL'].'" frameborder="0" allowfullscreen></iframe>';\r
+        $postArr['embed'] = $embedTxt;           \r
+      } else { $postArr['title'] = $msgT; $postArr['type'] = 'text'; $postArr['source'] = $message['url']; $postArr['body'] = $msg; }     \r
+    $postinfo = $tum_oauth->post("http://api.tumblr.com/v2/blog/".$options['trURL']."/post", $postArr); // prr("http://api.tumblr.com/v2/blog/".$options['trURL']."/post");  prr($postinfo);  prr($postArr);    \r
+    $code = $postinfo->meta->status;// echo "XX".print_r($code);  prr($postinfo); // prr($msg); prr($postinfo); echo $code."VVVV"; die("|====");    \r
+    if ($code == 201) { return array('postID'=>$postinfo->response->id, 'isPosted'=>1, 'postURL'=>'http://'.$options['trURL']."/post/".$postinfo->response->id, 'pDate'=>date('Y-m-d H:i:s')); } \r
+      else  $badOut['Error'] .=  $code . " - ".($postinfo->meta->msg).(isset($postinfo->errmsg)?$postinfo->errmsg:'')." | ".print_r($postinfo, true); \r
+    return $badOut;      \r
+   }    \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/tr.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/tr.php
new file mode 100644 (file)
index 0000000..6e8b658
--- /dev/null
@@ -0,0 +1,361 @@
+<?php    \r
+//## NextScripts Facebook Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'TR', 'lcode'=>'tr', 'name'=>'Tumblr');\r
+\r
+if (!class_exists("nxs_snapClassTR")) { class nxs_snapClassTR { var $ntInfo = array('code'=>'TR', 'lcode'=>'tr', 'name'=>'Tumblr', 'defNName'=>'', 'tstReq' => true);\r
+  //#### Show Common Settings  \r
+  function showGenNTSettings($ntOpts){ global $nxs_snapSetPgURL, $nxs_plurl, $nxs_gOptions;  $ntInfo = $this->ntInfo; \r
+   if ( isset($_GET['auth']) && $_GET['auth']=='tr'){ require_once('apis/trOAuth.php'); $options = $ntOpts[$_GET['acc']];\r
+     $consumer_key = $options['trConsKey']; $consumer_secret = $options['trConsSec'];\r
+              $callback_url = $nxs_snapSetPgURL."&auth=tra&acc=".$_GET['acc'];\r
+              $tum_oauth = new TumblrOAuth($consumer_key, $consumer_secret);prr($tum_oauth );\r
+              $request_token = $tum_oauth->getRequestToken($callback_url); echo "####"; prr($request_token);\r
+              $options['trOAuthToken'] = $request_token['oauth_token'];\r
+              $options['trOAuthTokenSecret'] = $request_token['oauth_token_secret'];// prr($tum_oauth ); die();\r
+              switch ($tum_oauth->http_code) { case 200: $url = $tum_oauth->getAuthorizeURL($options['trOAuthToken']); \r
+              if (function_exists('get_option')) $nxs_gOptions = get_option('NS_SNAutoPoster'); if(!empty($nxs_gOptions)) { $nxs_gOptions['tr'][$_GET['acc']] = $options; nxs_settings_save($nxs_gOptions); }\r
+                echo '<script type="text/javascript">window.location = "'.$url.'"</script>'; break; \r
+                default: echo '<br/><b style="color:red">Could not connect to Tumblr. Refresh the page or try again later.</b>'; die();\r
+              }\r
+              die();\r
+            }\r
+   if ( isset($_GET['auth']) && $_GET['auth']=='tra'){ require_once('apis/trOAuth.php'); $options = $ntOpts[$_GET['acc']]; prr($options);\r
+     \r
+              $consumer_key = $options['trConsKey']; $consumer_secret = $options['trConsSec'];  \r
+              $tum_oauth = new TumblrOAuth($consumer_key, $consumer_secret, $options['trOAuthToken'], $options['trOAuthTokenSecret']);\r
+              $options['trAccessTocken'] = $tum_oauth->getAccessToken($_REQUEST['oauth_verifier']); // prr($_GET);  prr($_REQUEST);   prr($options['trAccessTocken']);         \r
+              $tum_oauth = new TumblrOAuth($consumer_key, $consumer_secret, $options['trAccessTocken']['oauth_token'], $options['trAccessTocken']['oauth_token_secret']);               \r
+              if (function_exists('get_option')) $nxs_gOptions = get_option('NS_SNAutoPoster'); if(!empty($nxs_gOptions)) { $nxs_gOptions['tr'][$_GET['acc']] = $options; nxs_settings_save($nxs_gOptions); }\r
+              $userinfo = $tum_oauth->get('http://api.tumblr.com/v2/user/info'); prr($userinfo); prr($tum_oauth);// prr($url); die();\r
+              if (is_array($userinfo->response->user->blogs)) {\r
+                foreach ($userinfo->response->user->blogs as $blog){\r
+                  if (stripos($blog->url, $options['trPgID'])!==false) {  \r
+                     $gGet = $_GET; unset($gGet['auth']); unset($gGet['acc']); unset($gGet['oauth_token']);  unset($gGet['oauth_verifier']); unset($gGet['post_type']);\r
+                     $sturl = explode('?',$nxs_snapSetPgURL); $nxs_snapSetPgURL = $sturl[0].((!empty($gGet))?'?'.http_build_query($gGet):'');  \r
+                     echo '<script type="text/javascript">window.location = "'.$nxs_snapSetPgURL.'"</script>'; die();\r
+                  }\r
+                } prr($userinfo);\r
+                die("<span style='color:red;'>ERROR: Authorized USER don't have access to the specified blog: <span style='color:darkred; font-weight: bold;'>".$options['trPgID']."</span></span>");\r
+              }\r
+   }\r
+    ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('https://','', str_ireplace('http://','', $pbo['trURL'])); \r
+        if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['trOAuthTokenSecret']) && $pbo['trOAuthTokenSecret']!='')?'1':''; ?>\r
+          <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />\r
+           <?php } ?>\r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;\r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($bo){ $po = array('nName'=>'', 'doTR'=>'1', 'trURL'=>'', 'trPgID'=>'', 'trConsKey'=>'', 'trInclTags'=>'1', 'fillSrcURL'=>'1', 'useOrDate'=>'1', 'trInclCats'=>'0', 'cImgURL'=>'R', 'trConsSec'=>'', 'trPostType'=>'T', 'trDefImg'=>'', 'trOAuthTokenSecret'=>'', 'trAccessTocken'=>'', 'trMsgFormat'=>'<p>New Post has been published on %URL%</p><blockquote><p><strong>%TITLE%</strong></p><p><img src=\'%IMG%\'/></p><p>%FULLTEXT%</p></blockquote>', 'trMsgTFormat'=>'New Post has been published on %SITENAME%' );\r
+  $po['ntInfo']= array('lcode'=>'tr'); $this->showNTSettings($bo, $po, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl,$nxs_snapSetPgURL; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = '';  if (!isset($options['fillSrcURL'])) $options['fillSrcURL'] = '0'; if (!isset($options['useOrDate'])) $options['useOrDate'] = '1';\r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['trMsgTFormat'])) $options['trMsgTFormat'] = ''; //prr($options); ?>\r
+    <div id="doTR<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>" style="background-image: url(<?php echo $nxs_plurl; ?>img/tr-bg.png);  background-position:90% 10%;">   <input type="hidden" name="apDoSTR<?php echo $ii; ?>" value="0" id="apDoSTR<?php echo $ii; ?>" />                                     \r
+    <?php if ($isNew) { ?> <input type="hidden" name="tr[<?php echo $ii; ?>][apDoTR]" value="1" id="apDoNewTR<?php echo $ii; ?>" /> <?php } ?>\r
+    \r
+    <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/tr16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/setup-installation-tumblr-social-networks-auto-poster-wordpress/"><?php $nType="Tumblr"; printf( __( 'Detailed %s Installation/Configuration Instructions' , 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?></a></div>\r
+    \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="tr[<?php echo $ii; ?>][nName]" id="trnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel('tr', $ii, $options['qTLng']); ?>\r
+            \r
+             <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+    \r
+    \r
+            \r
+            <div style="width:100%;"><strong>Tumblr URL:</strong> <i>It should be your public URL. (i.e. like <b>http://nextscripts.tumblr.com/</b>, not http://www.tumblr.com/blog/nextscripts</i> </div><input onchange="nxsTRURLVal(<?php echo $ii; ?>);" name="tr[<?php echo $ii; ?>][apTRURL]" id="apTRURL<?php echo $ii; ?>" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['trURL'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><span style="color: #F00000;" id="apTRURLerr<?php echo $ii; ?>"></span>\r
+            <div style="width:100%;"><strong>Tumblr OAuth Consumer Key:</strong> </div><input name="tr[<?php echo $ii; ?>][apTRConsKey]" id="apTRConsKey" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['trConsKey'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />             \r
+            <div style="width:100%;"><strong>Tumblr Secret Key:</strong> </div><input name="tr[<?php echo $ii; ?>][apTRConsSec]" id="apTRConsSec" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['trConsSec'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+            <br/>\r
+            \r
+<div style="width:100%;"><strong id="altFormatText">Default Post Type:</strong></div>                      \r
+<div style="margin-left: 10px;">\r
+    \r
+    <input type="radio" name="tr[<?php echo $ii; ?>][apTRPostType]" value="T" <?php if ($options['trPostType'] != 'I') echo 'checked="checked"'; ?> onchange="nxs_TRSetEnable('T','<?php echo $ii; ?>');" /> Text Post<br/>            \r
+\r
+    <div style="width:100%; margin-left: 15px;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="apTRTMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apTRTMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)  </div><div onblur="jQuery('#apTRMsgFrmt<?php echo $ii; ?>Hint').hide();">\r
+              <input name="tr[<?php echo $ii; ?>][apTRMsgTFrmt]" id="apTRMsgTFrmt<?php echo $ii; ?>" style="margin-left: 15px; width: 50%;" value="<?php if ($options['trMsgTFormat']!='') _e(apply_filters('format_to_edit', htmlentities($options['trMsgTFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); else echo "New Post has been published on %SITENAME%"; ?>"  onfocus="jQuery('#apTRTMsgFrmt<?php echo $ii; ?>Hint').show();"  <?php if ($options['trPostType'] == 'I') echo 'disabled="disabled"'; ?>  /><br/>\r
+              <?php nxs_doShowHint("apTRTMsgFrmt".$ii); ?>\r
+            </div>\r
+            \r
+<input type="radio" name="tr[<?php echo $ii; ?>][apTRPostType]" value="I" <?php if ($options['trPostType'] == 'I') echo 'checked="checked"'; ?> onchange="nxs_TRSetEnable('I','<?php echo $ii; ?>');"/> Image Post\r
+<i>Don't forget to change default "Post Text Format" to prevent duplicate images.</i><br/>\r
+\r
+<div style="width:100%; margin-left: 15px;">\r
+\r
+<strong>Clickthrough URL:</strong> \r
+<p style="margin-bottom: 20px;margin-top: 5px;">\r
+<input type="radio" name="tr[<?php echo $ii; ?>][cImgURL]" value="R" <?php if ( !isset($options['cImgURL']) || $options['cImgURL'] == '' || $options['cImgURL'] == 'R') echo 'checked="checked"'; ?> /> Regular Post URL&nbsp;&nbsp;\r
+<input type="radio" name="tr[<?php echo $ii; ?>][cImgURL]" value="S" <?php if ($options['cImgURL'] == 'S') echo 'checked="checked"'; ?> /> Shortened Post URL&nbsp;&nbsp;\r
+<input type="radio" name="tr[<?php echo $ii; ?>][cImgURL]" value="N" <?php if ($options['cImgURL'] == 'N') echo 'checked="checked"'; ?> /> No Clickthrough URL&nbsp;&nbsp;\r
+</p><strong>Defailt Image to Post:</strong> \r
+            <p style="font-size: 11px; margin: 0px;">If your post is missing "Featured Image" and doesn't have any images in the text body this will be used instead.</p>\r
+            </div><input name="tr[<?php echo $ii; ?>][apTRDefImg]" id="apTRDefImg<?php echo $ii; ?>" style=" margin-left: 15px; width: 30%;" <?php if ($options['trPostType'] != 'I') echo 'disabled="disabled"'; ?> value="<?php _e(apply_filters('format_to_edit', htmlentities($options['trDefImg'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /> \r
+<br/>            \r
+<input type="radio" name="tr[<?php echo $ii; ?>][apTRPostType]" value="U" <?php if ($options['trPostType'] == 'U') echo 'checked="checked"'; ?> /> Audio Post<br/>\r
+<input type="radio" name="tr[<?php echo $ii; ?>][apTRPostType]" value="V" <?php if ($options['trPostType'] == 'V') echo 'checked="checked"'; ?> /> Video Post<br/>            \r
+<i style="">Tip: Your post must contain link to Audio or Video file if you select "Audio Post" or "Video Post" , otherwise it will reverted to the "Text Post"</i>\r
+            <br/><br/>\r
+\r
+</div>            \r
+            \r
+  <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="apTRMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apTRMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>) </div>\r
+              \r
+              \r
+              <textarea cols="150" rows="3" id="tr<?php echo $ii; ?>SNAPformat" name="tr[<?php echo $ii; ?>][apTRMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#tr<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apTRMsgFrmt<?php echo $ii; ?>');"><?php if ($options['trMsgFormat']!='') _e(apply_filters('format_to_edit', htmlentities($options['trMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); else echo htmlentities("<p>New Post has been published on %URL%</p>\r\n<blockquote><p><strong>%TITLE%</strong></p>\r\n<p><img src=\"%IMG%\"/></p><p>%FULLTEXT%</p></blockquote>"); ?></textarea>\r
+              \r
+              <br/>\r
+               <?php nxs_doShowHint("apTRMsgFrmt".$ii); ?>\r
+               \r
+              \r
+              <p style="margin-bottom: 20px;margin-top: 5px;">                                 \r
+              \r
+              <input value="1" type="checkbox" name="tr[<?php echo $ii; ?>][fillSrcURL]"  <?php if ((int)$options['fillSrcURL'] == 1) echo "checked"; ?> /> \r
+              <strong>Fill "Source URL"</strong> Will fill Tumblr's "Source URL" with post URL or defined URL.\r
+              \r
+              <br/><input value="1" type="checkbox" name="tr[<?php echo $ii; ?>][useOrDate]"  <?php if ((int)$options['useOrDate'] == 1) echo "checked"; ?> /> \r
+              <strong>Keep Original Post Date</strong> Will post to Tumblr with original date of the post \r
+              \r
+              <br/><input value="1" type="checkbox" name="tr[<?php echo $ii; ?>][trInclTags]"  <?php if ((int)$options['trInclTags'] == 1) echo "checked"; ?> /> \r
+              <strong>Post with tags.</strong> Tags from the blogpost will be auto posted to Tumblr                                \r
+              \r
+              <br/><input value="1" type="checkbox" name="tr[<?php echo $ii; ?>][trInclCats]"  <?php if ((int)$options['trInclCats'] == 1) echo "checked"; ?> /> \r
+              <strong>Post categories as tags.</strong> Categories from the blogpost will be auto posted to Tumblr as tags                                \r
+            </p>\r
+              \r
+              <?php \r
+            if($options['trConsSec']=='') { ?>\r
+            <b>Authorize Your Tumblr Account</b>. Please save your settings and come back here to Authorize your account.\r
+            <?php } else { if(isset($options['trAccessTocken']) && isset($options['trAccessTocken']['oauth_token_secret']) && $options['trAccessTocken']['oauth_token_secret']!=='') { ?>\r
+            Your Tumblr Account has been authorized. Blog ID: <?php _e(apply_filters('format_to_edit', htmlentities($options['trPgID'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>. \r
+            You can Re- <?php } ?>            \r
+            <a href="<?php echo $nxs_snapSetPgURL.(stripos($nxs_snapSetPgURL, '?')!==false?'&':'?');?>auth=tr&acc=<?php echo $ii; ?>">Authorize Your Tumblr Account</a> \r
+              <?php if (!isset($options['trOAuthTokenSecret']) || $options['trOAuthTokenSecret']=='') { ?> <div class="blnkg">&lt;=== Authorize your account ===</div> <?php } ?>            \r
+            <?php }  ?>            \r
+            \r
+            \r
+            <?php if( isset($options['trOAuthTokenSecret']) && $options['trOAuthTokenSecret']!='') { ?>\r
+            \r
+            <br/><br/><b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('TR', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s' , 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?></a>  <br/><br/>\r
+            <?php }?>\r
+            \r
+            </div>\r
+      <?php /* ######################## Advanced Tab ####################### */ ?>\r
+    <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+    <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); \r
+      nxs_showRepostSettings($nt, $ii, $options); ?>\r
+            \r
+            \r
+    </div>  <?php } ?> <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div>\r
+            \r
+        </div>\r
+        <?php\r
+      \r
+      \r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){  $code = $this->ntInfo['code'];\r
+    foreach ($post as $ii => $pval){\r
+      if (isset($pval['apTRConsKey']) && $pval['apTRConsSec']!='') { if (!isset($options[$ii])) $options[$ii] = array();\r
+        \r
+                if (isset($pval['apTRURL']))  {   $options[$ii]['trURL'] = trim($pval['apTRURL']);  if ( substr($options[$ii]['trURL'], 0, 4)!='http' )  $options[$ii]['trURL'] = 'http://'.$options[$ii]['trURL'];\r
+                  $trPgID = $options[$ii]['trURL']; if (substr($trPgID, -1)=='/') $trPgID = substr($trPgID, 0, -1);  $trPgID = substr(strrchr($trPgID, "/"), 1);\r
+                  $options[$ii]['trPgID'] = $trPgID; //echo $fbPgID;\r
+                }\r
+                if (substr($options[$ii]['trURL'], -1)!='/') $options[$ii]['trURL'] .= '/';;\r
+                if (isset($pval['apDoTR']))         $options[$ii]['doTR'] = $pval['apDoTR']; else $options[$ii]['doTR'] = 0;\r
+                if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);\r
+                if (isset($pval['apTRConsKey']))    $options[$ii]['trConsKey'] = trim($pval['apTRConsKey']);\r
+                if (isset($pval['apTRConsSec']))    $options[$ii]['trConsSec'] = trim($pval['apTRConsSec']);                                \r
+                if (isset($pval['apTRMsgFrmt']))    $options[$ii]['trMsgFormat'] = trim($pval['apTRMsgFrmt']);                                \r
+                if (isset($pval['apTRMsgTFrmt']))   $options[$ii]['trMsgTFormat'] = trim($pval['apTRMsgTFrmt']);   \r
+                if (isset($pval['trInclTags']))     $options[$ii]['trInclTags'] = $pval['trInclTags']; else $options[$ii]['trInclTags'] = 0;\r
+                if (isset($pval['fillSrcURL']))     $options[$ii]['fillSrcURL'] = $pval['fillSrcURL']; else $options[$ii]['fillSrcURL'] = 0;               \r
+                if (isset($pval['useOrDate']))      $options[$ii]['useOrDate'] = $pval['useOrDate']; else $options[$ii]['useOrDate'] = 0;               \r
+                \r
+                if (isset($pval['trInclCats']))     $options[$ii]['trInclCats'] = $pval['trInclCats']; else $options[$ii]['trInclCats'] = 0;\r
+                if (isset($pval['apTRPostType']))   $options[$ii]['trPostType'] = trim($pval['apTRPostType']);   \r
+                if (isset($pval['cImgURL']))        $options[$ii]['cImgURL'] = trim($pval['cImgURL']);   \r
+                \r
+                if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+                if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';                \r
+                \r
+                if (isset($pval['apTRDefImg']))     $options[$ii]['trDefImg'] = trim($pval['apTRDefImg']);   \r
+                \r
+                $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+                if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+                if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+                if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      }  elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  } \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'tr'; $ntU = 'TR';\r
+    foreach($ntOpts as $ii=>$ntOpt)  {$pMeta = maybe_unserialize(get_post_meta($post_id, 'snapTR', true)); // prr($ntOpts); echo "~~~~~~~~~~~~~~~~"; prr($pMeta); echo "#######";\r
+       if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii])) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]);\r
+       if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = ''; if (empty($ntOpt['urlToUse'])) $ntOpt['urlToUse'] = '';  if (empty($ntOpt['trMsgTFormat'])) $ntOpt['trMsgTFormat'] = '';\r
+       $doTR = $ntOpt['doTR'] && (is_array($pMeta) || (is_array($pMeta) || $ntOpt['catSel']!='1'));  $imgToUse = $ntOpt['imgToUse'];  $urlToUse = $ntOpt['urlToUse']; \r
+       $isAvailTR =  isset($ntOpt['trAccessTocken']) && isset($ntOpt['trAccessTocken']['oauth_token_secret']) && $ntOpt['trAccessTocken']['oauth_token_secret']!=='';          \r
+       $trMsgFormat = htmlentities($ntOpt['trMsgFormat'], ENT_COMPAT, "UTF-8");  $trMsgTFormat = htmlentities($ntOpt['trMsgTFormat'], ENT_COMPAT, "UTF-8");\r
+      ?>  \r
+      \r
+ <tr><th style="text-align:left;" colspan="2">\r
+ <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvailTR) { ?><input class="nxsGrpDoChb" value="1" id="doTR<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="tr[<?php echo $ii; ?>][doTR]" <?php if ((int)$doTR == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="tr[<?php echo $ii; ?>][doTR]" value="<?php echo $doTR;?>"> <?php } ?> <?php } ?>\r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/tr16.png);">Tumblr - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>) </div></th><td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvailTR) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;"Z type="button" class="button" name="rePostToTR_repostButton" id="rePostToTR_button" value="<?php _e('Repost to Tumblr', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php } ?>\r
+                    \r
+                    <?php if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) {                         \r
+                        ?> <span id="pstdTR<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+                      <a style="font-size: 10px;" href="<?php echo $ntOpt['trURL']; ?>post/<?php echo $pMeta[$ii]['pgID']; ?>" target="_blank"><?php $nType="Tumblr"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>\r
+                <?php if (!$isAvailTR) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup and authorize your Tumblr Account to AutoPost to Tumblr</b>\r
+                <?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>tr" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> />\r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>                \r
+                </td></tr> <?php } ?>\r
+                         \r
+                <tr id="altFormat1" style=""><th scope="row" style="text-align:right; width:60px; padding-right:10px;">\r
+                <input type="radio" name="tr[<?php echo $ii; ?>][apTRPostType]" value="T" <?php if ($ntOpt['trPostType'] != 'I') echo 'checked="checked"'; ?>  /> <br/>                \r
+                </th>\r
+                <td><b><?php _e('Text Post. Title Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></b>&nbsp;<input value="<?php echo $trMsgTFormat ?>" type="text" name="tr[<?php echo $ii; ?>][SNAPTformat]" style="width:270px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apTRTMsgFrmt<?php echo $ii; ?>');"/>\r
+                 <?php nxs_doShowHint("apTRTMsgFrmt".$ii); ?> </td></tr>\r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" style="text-align:right; width:60px; padding-right:10px;">\r
+                <input type="radio" name="tr[<?php echo $ii; ?>][apTRPostType]" value="I" <?php if ($ntOpt['trPostType'] == 'I') echo 'checked="checked"'; ?>  />  <br/>                \r
+                </th>\r
+                <td><b>Image Post</b>&nbsp;&nbsp;&nbsp;&nbsp;\r
+                <input type="radio" name="tr[<?php echo $ii; ?>][apTRPostType]" value="V" <?php if ($ntOpt['trPostType'] == 'V') echo 'checked="checked"'; ?>  /> <b>Video Post</b> <?php nxs_doShowHint("apTRTMsgFrmt".$ii); ?> &nbsp;&nbsp;&nbsp;&nbsp;\r
+                <input type="radio" name="tr[<?php echo $ii; ?>][apTRPostType]" value="U" <?php if ($ntOpt['trPostType'] == 'U') echo 'checked="checked"'; ?>  /> <b>Audio Post</b> <?php nxs_doShowHint("apTRTMsgFrmt".$ii); ?> \r
+                </td></tr>\r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                <td>                \r
+                <textarea cols="150" rows="1" id="tr<?php echo $ii; ?>SNAPformat" name="tr[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#tr<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apTRMsgFrmt<?php echo $ii; ?>');"><?php echo $trMsgFormat; ?></textarea>\r
+                <?php nxs_doShowHint("apTRMsgFrmt".$ii); ?></td></tr>\r
+                \r
+                <?php /* ## Select Image & URL ## */ nxs_showImgToUseDlg($nt, $ii, $imgToUse); nxs_showURLToUseDlg($nt, $ii, $urlToUse); ?>  \r
+                               \r
+   <?php } \r
+    }\r
+      \r
+  }\r
+\r
+  \r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else $optMt['isPosted'] = '';\r
+     if (isset($pMeta['SNAPformat'])) $optMt['trMsgFormat'] = $pMeta['SNAPformat'];  if (isset($pMeta['SNAPTformat'])) $optMt['trMsgTFormat'] = $pMeta['SNAPTformat']; \r
+     if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse']; if (isset($pMeta['urlToUse'])) $optMt['urlToUse'] = $pMeta['urlToUse']; \r
+     if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+     if (isset($pMeta['apTRPostType'])) $optMt['trPostType'] = $pMeta['apTRPostType']; \r
+     if (isset($pMeta['AttachPost'])) $optMt['trAttch'] = $pMeta['AttachPost'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['trAttch'] = 0; }\r
+     if (isset($pMeta['doTR'])) $optMt['doTR'] = $pMeta['doTR'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doTR'] = 0; }\r
+     if (isset($pMeta['SNAPincludeTR']) && $pMeta['SNAPincludeTR'] == '1' ) $optMt['doTR'] = 1;  \r
+     return $optMt;\r
+  }\r
+}}\r
+\r
+if (!function_exists("nxs_rePostToTR_ajax")) { function nxs_rePostToTR_ajax() {  check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; \r
+    $options = get_option('NS_SNAutoPoster');  foreach ($options['tr'] as $ii=>$po) if ($ii==$_POST['nid']) {   $po['ii'] = $ii; $po['pType'] = 'aj'; \r
+      $mpo =  get_post_meta($postID, 'snapTR', true); $mpo =  maybe_unserialize($mpo); \r
+      if (is_array($mpo) && isset($mpo[$ii]) && is_array($mpo[$ii]) ){ $ntClInst = new nxs_snapClassTR();  $po = $ntClInst->adjMetaOpt($po, $mpo[$ii]);  } \r
+      $result = nxs_doPublishToTR($postID, $po); if ($result == 200 || $result == 201) die("Your post has been successfully sent to Tumblr."); else { echo $result; die(); }\r
+    }    \r
+  }\r
+}\r
+\r
+if (!function_exists("nxs_doPublishToTR")) { //## Second Function to Post to TR\r
+  function nxs_doPublishToTR($postID, $options){ $ntCd = 'TR'; $ntCdL = 'tr'; $ntNm = 'Tumblr';   global $plgn_NS_SNAutoPoster; $ytUrl = ''; $imgURL = ''; \r
+    if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+    //if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToTR',  array($postID, $options));    \r
+    if (empty($options['imgToUse'])) $options['imgToUse'] = ''; if (empty($options['urlToUse'])) $options['urlToUse'] = '';  \r
+    if (empty($options['trMsgTFormat'])) $options['trMsgTFormat'] = '';   if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+    $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));\r
+    \r
+    $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url();     \r
+    $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+    $logNT = '<span style="color:#014A76">Tumblr</span> - '.$options['nName'];\r
+    $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+    if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') { \r
+         nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$options['pType']); return;\r
+        }\r
+    }  \r
+    //## Format\r
+    if ($postID=='0') { echo "Testing ... <br/><br/>"; $options['trMsgFormat'] = 'Test Post from '.$blogTitle;  $msgT = 'Test Post from '.$blogTitle; $options['trPostType']='T'; \r
+      $postDate = gmdate("Y-m-d H:i:s")." GMT"; $tags = ''; $urlToGo = ''; \r
+    } else{ $post = get_post($postID); if(!$post) return;  $options['trMsgFormat'] = nsFormatMessage($options['trMsgFormat'], $postID, $addParams); \r
+      $options['trMsgTFormat'] = nsFormatMessage($options['trMsgTFormat'], $postID, $addParams);  nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));   \r
+      \r
+      $tggs = array();   \r
+      if ($options['trInclTags']=='1'){ $t = wp_get_post_tags($postID); $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = implode(',', $tggs); }        \r
+      if ($options['trInclCats']=='1'){ $t = wp_get_post_categories($postID); foreach($t as $c){ $cat = get_category($c); $tggs[] = $cat->name; }  $tags = implode(',', $tggs); }    \r
+      $postDate = (($options['useOrDate']=='1' && $post->post_date_gmt!='0000-00-00 00:00:00')?$post->post_date_gmt:gmdate("Y-m-d H:i:s", strtotime($post->post_date)))." GMT";  //## Adds date to Tumblr post. Thanks to Kenneth Lecky\r
+    \r
+      if($options['trPostType']=='V') { $vids = nsFindVidsInPost($post); if (count($vids)>0) $ytUrl = $vids[0]; if (trim($ytUrl)=='') $options['trPostType']='T'; }\r
+      if($options['trPostType']=='U') { $aud = nsFindAudioInPost($post); if (count($aud)>0) $aUrl = $aud[0]; if (trim($aUrl)=='') $options['trPostType']='T'; }\r
+      if($options['trPostType']=='I') {  if (trim($options['imgToUse'])!='') $imgURL = $options['imgToUse']; else $imgURL = nxs_getPostImage($postID, 'large', $options['trDefImg']);  \r
+        if (preg_match("/noImg.\.png/i", $imgURL)) $imgURL = '';  if (trim($imgURL)=='') $options['trPostType']='T'; \r
+      }\r
+      //## MyURL - URLToGo code\r
+      $options = nxs_getURL($options, $postID, $addParams); $urlToGo = $options['urlToUse'];       \r
+    }   \r
+    $extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?$post->post_title:'').' |'.$options['pType'];        \r
+    //## Post             \r
+    $message = array('siteName'=>$blogTitle, 'imageURL'=>$imgURL, 'tags'=>$tags, 'url'=>$urlToGo, 'postDate'=>$postDate, 'videoURL'=>$ytUrl); // prr($message); prr($options); die();\r
+    //## Actual Post\r
+    $ntToPost = new nxs_class_SNAP_TR(); $ret = $ntToPost->doPostToNT($options, $message);     \r
+    //## Process Results\r
+    if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+      if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+    } else {  // ## All Good - log it.\r
+      if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+        else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'postURL'=>$ret['postURL'], 'pDate'=>date('Y-m-d H:i:s'))); nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+    } //prr($ret);\r
+    //## Return Result\r
+    if ($ret['isPosted']=='1') return 200; else return print_r($ret, true); \r
+  }\r
+}\r
+\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/tw.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/tw.api.php
new file mode 100644 (file)
index 0000000..49d3cca
--- /dev/null
@@ -0,0 +1,60 @@
+<?php    \r
+//## NextScripts Twitter Connection Class\r
+$nxs_snapAPINts[] = array('code'=>'TW', 'lcode'=>'tw', 'name'=>'Twitter');\r
+\r
+if (!class_exists("nxs_class_SNAP_TW")) { class nxs_class_SNAP_TW {\r
+    \r
+    var $ntCode = 'TW';\r
+    var $ntLCode = 'tw';\r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array(); // return false;\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }\r
+    function doPostToNT($options, $message){ global $nxs_urlLen; $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>''); \r
+      if (!function_exists('nxs_remote_get') && function_exists('wp_remote_get')) { function nxs_remote_get($url){return wp_remote_get($url);} }\r
+      if (!function_exists('is_nxs_error') && function_exists('is_wp_error')) { function is_nxs_error($a){return is_wp_error($a);} }\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['twAccToken']) || trim($options['twAccToken'])=='') { $badOut['Error'] = 'No Auth Token Found'; return $badOut; }\r
+      if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      //## Old Settings Fix\r
+      if ($options['attchImg']=='1') $options['attchImg'] = 'large'; if ($options['attchImg']=='0') $options['attchImg'] = false;\r
+      if (isset($message['img']) && is_string($message['img']) ) $img = trim($message['img']); else $img = ''; \r
+      //## Format Post\r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['twMsgFormat'], $message);  \r
+      if ($options['attchImg']!=false) { if (isset($message['imageURL'])) $imgURL = trim(nxs_getImgfrOpt($message['imageURL'], $options['imgSize'])); else $imgURL = ''; }\r
+      if (empty($imgURL) && $img=='') $options['attchImg'] = false;   \r
+      //## Make Post\r
+      //$options['attchImg']='1'; $imgURL = 'http://ecx.images-amazon.com/images/I/41caE5Uc5ML._AA160_.jpg';\r
+      $hdrsArr['User-Agent']='Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0'; $advSet=array('headers'=>$hdrsArr,'httpversion'=>'1.1','timeout'=>45,'sslverify'=>false);\r
+      //$msg = $message['message']; $imgURL = trim($message['imageURL']); $img = trim($message['img']); $nxs_urlLen = $message['urlLength'];           \r
+      if ($options['attchImg']!=false && $img=='' && $imgURL!='' ) { $imgURL = str_replace(' ', '%20', $imgURL);\r
+        if( ini_get('allow_url_fopen') ) { if (getimagesize($imgURL)!==false) { $img = nxs_remote_get($imgURL, $advSet); if(is_nxs_error($img)) $options['attchImg'] = false; else $img = $img['body']; } else $options['attchImg'] = false; } \r
+          else { $img = nxs_remote_get($imgURL, $advSet); if(is_nxs_error($img)) $options['attchImg'] = false; elseif (isset($img['body'])&& trim($img['body'])!='') $img = $img['body'];  else $options['attchImg'] = false; }   \r
+      }  \r
+      if ($options['attchImg']!=false && $img!='') $twLim = 118; else $twLim = 140; \r
+      \r
+      require_once ('apis/tmhOAuth.php'); if ($nxs_urlLen>0) { $msg = nsTrnc($msg, $twLim-22+$nxs_urlLen); } else $msg = nsTrnc($msg, $twLim); //prr($msg); die('TTWWW');\r
+      if (substr($msg, 0, 1)=='@') $msg = ' '.$msg; //prr(urlencode($msg));  $msg = html_entity_decode($msg);  prr(urlencode($msg));   die();  \r
+      $tmhOAuth = new NXS_tmhOAuth(array( 'consumer_key' => $options['twConsKey'], 'consumer_secret' => $options['twConsSec'], 'user_token' => $options['twAccToken'], 'user_secret' => $options['twAccTokenSec']));      \r
+      if ($options['attchImg']!=false && $img!='') $params_array =array( 'media[]' => $img, 'status' => $msg); else $params_array = array('status' =>$msg);\r
+      if (!empty($options['in_reply_to_id'])) $params_array['in_reply_to_status_id'] = $options['in_reply_to_id'];      \r
+      if ($options['attchImg']!=false && $img!='') $code = $tmhOAuth -> request('POST', 'https://api.twitter.com/1.1/statuses/update_with_media.json', $params_array, true, true);    \r
+        else $code = $tmhOAuth->request('POST', $tmhOAuth->url('1.1/statuses/update'), $params_array); //prr($msg);\r
+        \r
+      if ( $code=='403' && stripos($tmhOAuth->response['response'], 'User is over daily photo limit')!==false && $options['attchImg']!=false && $img!='') { \r
+         $badOut['Error'] .= "User is over daily photo limit. Will post without image\r\n"; $code = $tmhOAuth->request('POST', $tmhOAuth->url('1.1/statuses/update'), array('status' =>$msg));\r
+      }        \r
+      if ($code == 200){\r
+         $twResp = json_decode($tmhOAuth->response['response'], true);  if (is_array($twResp) && isset($twResp['id_str'])) $twNewPostID = $twResp['id_str'];  \r
+         if (is_array($twResp) && isset($twResp['user'])) $twPageID = $twResp['user']['screen_name'];\r
+         return array('postID'=>$twNewPostID, 'isPosted'=>1, 'postURL'=>'https://twitter.com/'.$twPageID.'/status/'.$twNewPostID, 'pDate'=>date('Y-m-d H:i:s'));          \r
+      } else { $badOut['Error'] .= "Resp: ".print_r($tmhOAuth->response['response'], true)."| Error: ".print_r($tmhOAuth->response['error'], true)."| MSG: ".print_r($msg, true); \r
+        return $badOut;\r
+      }\r
+      return $badOut;\r
+    }  \r
+    \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/tw.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/tw.php
new file mode 100644 (file)
index 0000000..460ffdc
--- /dev/null
@@ -0,0 +1,378 @@
+<?php    \r
+//## NextScripts Twitter Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'TW', 'lcode'=>'tw', 'name'=>'Twitter');\r
+\r
+if (!class_exists("nxs_snapClassTW")) { class nxs_snapClassTW {\r
+  //#### Show Common Settings  \r
+  function showGenNTSettings($ntOpts){  global $nxs_plurl; $ntInfo = array('code'=>'TW', 'lcode'=>'tw', 'name'=>'Twitter', 'defNName'=>'dlUName', 'tstReq' => true); \r
+    $ntParams = array('ntInfo'=>$ntInfo, 'nxs_plurl'=>$nxs_plurl, 'ntOpts'=>$ntOpts, 'chkField'=>'twAccTokenSec'); nxs_showListRow($ntParams);     \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($mtwo){ $options = array('nName'=>'', 'doTW'=>'1', 'twURL'=>'', 'twConsKey'=>'', 'twMsgFormat'=>'%TITLE% - %URL%', 'twConsSec'=>'', 'twAccToken'=>'', 'twAccTokenSec'=>'', 'attchImg'=>0, 'twAttch'=>'', 'twAccTokenSec'=>''); \r
+    $options['ntInfo']= array('lcode'=>'tw'); $this->showNTSettings($mtwo, $options, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){ global $nxs_plurl, $plgn_NS_SNAutoPoster; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); $tmzFrmt = _x('Y-m-d G:i:s', 'timezone date format');\r
+    if (!isset($plgn_NS_SNAutoPoster)) $gOptions = array(); else $gOptions = $plgn_NS_SNAutoPoster->nxs_options;  \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['riComments'])) $options['riComments'] = '';  if (!isset($options['riCommentsAA'])) $options['riCommentsAA'] = ''; if (!isset($options['riCommentsM'])) $options['riCommentsM'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = '';  ?>\r
+    \r
+    <div id="doTW<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>" >   <input type="hidden" name="apDoSTW<?php echo $ii; ?>" value="0" id="apDoSTW<?php echo $ii; ?>" />      \r
+    \r
+     <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/tw16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/setup-installation-twitter-social-networks-auto-poster-wordpress/"><?php $nType="Twitter"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+    \r
+    <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input type="text" name="tw[<?php echo $ii; ?>][nName]" id="twnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+    <?php echo nxs_addQTranslSel('tw', $ii, $options['qTLng']); ?>\r
+    <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/tw-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+    \r
+    <div class="nxs_tls_lbl"><strong>Your Twitter URL:</strong> </div><input type="text" name="tw[<?php echo $ii; ?>][apTWURL]" id="apTWURL" style="width: 40%;border: 1px solid #ACACAC;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['twURL'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+    <div class="nxs_tls_lbl"><strong>Your Twitter API Key:</strong> </div><input type="text" name="tw[<?php echo $ii; ?>][apTWConsKey]" id="apTWConsKey" style="width: 40%; border: 1px solid #ACACAC;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['twConsKey'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  \r
+    <div class="nxs_tls_lbl"><strong>Your Twitter API Secret:</strong> </div><input type="text" name="tw[<?php echo $ii; ?>][apTWConsSec]" id="apTWConsSec" style="width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['twConsSec'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+    <div class="nxs_tls_lbl"><strong>Your Access Token:</strong> </div><input type="text" name="tw[<?php echo $ii; ?>][apTWAccToken]" id="apTWAccToken" style="width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['twAccToken'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+    <div class="nxs_tls_lbl"><strong>Your Access Token Secret:</strong> </div><input type="text" name="tw[<?php echo $ii; ?>][apTWAccTokenSec]" id="apTWAccTokenSec" style="width: 40%;" value="<?php  _e(apply_filters('format_to_edit', htmlentities($options['twAccTokenSec'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+    <?php if ($isNew) { ?> <input type="hidden" name="tw[<?php echo $ii; ?>][apDoTW]" value="1" id="apDoNewTW<?php echo $ii; ?>" /> <?php } ?>\r
+    <br/><br/>\r
+    <p style="margin: 0px;"><input value="1"  id="apLIAttch" type="checkbox" name="tw[<?php echo $ii; ?>][attchImg]"  <?php if ((int)$options['attchImg'] == 1) echo "checked"; ?> /> <strong><?php _e('Attach Image to Twitter Post', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong></p>\r
+    <br/>\r
+    <strong id="altFormatText"><?php _e('Message text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong><br/>\r
+    \r
+    <textarea cols="150" rows="3" id="tw<?php echo $ii; ?>SNAPformat" name="tw[<?php echo $ii; ?>][apTWMsgFrmt]"  style="width:51%;max-width: 610px;" onfocus="jQuery('#tw<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apTWMsgFrmt<?php echo $ii; ?>');"><?php _e(apply_filters('format_to_edit', htmlentities($options['twMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?></textarea>    <?php nxs_doShowHint("apTWMsgFrmt".$ii); ?> \r
+    \r
+    \r
+     <?php nxs_doShowHint("apTWMsgFrmt".$ii, '<br/><br/><b>%TAGS% and %CATS% will be posted as hashtags. <br/>Please remember that Twitter takes only 140 characters.</b>'); ?>\r
+    \r
+  \r
+               \r
+    <?php if($options['twAccTokenSec']!='') { ?> \r
+      <br/><br/><b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <?php if (!isset($options['twOK']) || $options['twOK']!='1') { ?> <div class="blnkg">=== Submit Test Post to Complete ===&gt;</div> <?php } ?> <a href="#" class="NXSButton" onclick="testPost('TW', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s' , 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?></a> <br/>\r
+      <?php }?>\r
+      \r
+      \r
+      </div>\r
+      <?php /* ######################## Tools Tab ####################### */ ?>\r
+  <?php if (!$isNew) { ?>   <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+      \r
+   <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+         nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);  ?>    \r
+    \r
+   <div class="nxs_tls_cpt"><?php _e('Auto Import of Replies and Mentions:', 'social-networks-auto-poster-facebook-twitter-g'); ?></div>\r
+   <div class="nxs_tls_bd">\r
+   <div class="nxs_tls_sbInfo"><?php _e('Plugin could grab Replies and Mentions from Twitter and import them as Wordpress Comments', 'social-networks-auto-poster-facebook-twitter-g'); ?></div>\r
+   <?php if ( !empty($gOptions['riActive']) && $gOptions['riActive'] == '1' ) { ?>\r
+   <input value="1" id="riC<?php echo $ii; ?>" <?php if (trim($options['riComments'])=='1') echo "checked"; ?> type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][riComments]"/> <b><?php _e('Import Twitter Replies', 'social-networks-auto-poster-facebook-twitter-g'); ?></b>\r
+   <br/>\r
+   <input value="1" id="riCM<?php echo $ii; ?>" <?php if (trim($options['riCommentsM'])=='1') echo "checked"; ?> type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][riCommentsM]"/> <b><?php _e('Import Twitter Mentions', 'social-networks-auto-poster-facebook-twitter-g'); ?></b>\r
+   <br/> \r
+   <input value="1" id="riCA<?php echo $ii; ?>" <?php if (trim($options['riCommentsAA'])=='1') echo "checked"; ?> type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][riCommentsAA]"/> <b><?php _e('Auto-approve imported comments', 'social-networks-auto-poster-facebook-twitter-g'); ?></b>\r
+   <?php } else { echo "<br/>"; _e('Please activate the "Comments Import" from SNAP Settings Tab', 'social-networks-auto-poster-facebook-twitter-g'); } ?>   \r
+   </div>\r
+   \r
+  <?php nxs_showRepostSettings($nt, $ii, $options); ?>\r
+   \r
+    </div>   <?php } ?>\r
+    </div><br/>      \r
+     \r
+      <div class="submitX nxclear" style="padding-bottom: 0px;"> \r
+      <input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+      <?php /*\r
+      <input type="button" id="svBtn<?php echo $nt.$ii ?>" onclick="nxs_svSet('<?php echo $nt; ?>', '<?php echo $ii; ?>')" class="button-primary" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+      <div id="nxsSaveLoadingImg<?php echo $nt.$ii; ?>" class="doneMsg">Saving.....</div> <div id="doneMsg<?php echo $nt.$ii; ?>" class="doneMsg">Done</div>\r
+      */ ?>\r
+    </div>\r
+    \r
+    </div>\r
+    <?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = 'TW'; $lcode = 'tw'; \r
+    foreach ($post as $ii => $pval){ \r
+      if (isset($pval['apTWURL']) && $pval['apTWURL']!='') { if (!isset($options[$ii])) $options[$ii] = array();\r
+        if (isset($pval['apDoTW']))         $options[$ii]['doTW'] = $pval['apDoTW']; else $options[$ii]['doTW'] = 0;\r
+        if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);\r
+        if (isset($pval['apTWURL']))        $options[$ii]['twURL'] = trim($pval['apTWURL']);  if ( substr($options[$ii]['twURL'], 0, 4)!='http' )  $options[$ii]['twURL'] = 'http://'.$options[$ii]['twURL'];\r
+        if (isset($pval['apTWConsKey']))    $options[$ii]['twConsKey'] = trim($pval['apTWConsKey']);\r
+        if (isset($pval['apTWConsSec']))    $options[$ii]['twConsSec'] = trim($pval['apTWConsSec']);                                \r
+        if (isset($pval['apTWAccToken']))   $options[$ii]['twAccToken'] = trim($pval['apTWAccToken']);                \r
+        \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if (isset($options[$ii]['catSel']) && $options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+        \r
+        if (isset($pval['riComments']))      $options[$ii]['riComments'] = $pval['riComments']; else $options[$ii]['riComments'] = 0;\r
+        if (isset($pval['riCommentsM']))     $options[$ii]['riCommentsM'] = $pval['riCommentsM']; else $options[$ii]['riCommentsM'] = 0;\r
+        if (isset($pval['riCommentsAA']))    $options[$ii]['riCommentsAA'] = $pval['riCommentsAA']; else $options[$ii]['riCommentsAA'] = 0;\r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);\r
+        \r
+        if (isset($pval['apTWAccTokenSec']))$options[$ii]['twAccTokenSec'] = trim($pval['apTWAccTokenSec']);                                \r
+        if (isset($pval['apTWMsgFrmt']))    $options[$ii]['twMsgFormat'] = trim($pval['apTWMsgFrmt']);\r
+        if (isset($pval['attchImg'])) $options[$ii]['attchImg'] = $pval['attchImg']; else $options[$ii]['attchImg'] = 0;                \r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }    \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'tw'; $ntU = 'TW';\r
+    foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapTW', true)); if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii])) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]); \r
+         if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = ''; if (empty($ntOpt['urlToUse'])) $ntOpt['urlToUse'] = '';          \r
+         $doTW = $ntOpt['doTW'] && (is_array($pMeta) || ($ntOpt['catSel']!='1' && empty($ntOpt['tagsSel']))); $imgToUse = $ntOpt['imgToUse']; \r
+         $isAvailTW =  $ntOpt['twURL']!='' && $ntOpt['twConsKey']!='' && $ntOpt['twConsSec']!='' && $ntOpt['twAccToken']!=''; $twMsgFormat = htmlentities($ntOpt['twMsgFormat'], ENT_COMPAT, "UTF-8");   $isAttchImg = $ntOpt['attchImg'];    \r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2">\r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvailTW) { ?><input class="nxsGrpDoChb" value="1" id="doTW<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="tw[<?php echo $ii; ?>][doTW]" <?php if ((int)$doTW == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="tw[<?php echo $ii; ?>][doTW]" value="<?php echo $doTW;?>"> <?php } ?> <?php } ?>\r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/tw16.png);">Twitter - <?php _e('autopost to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)\r
+      </div></th><td><?php //## Only show RePost button if the post is "published"\r
+      if ($post->post_status == "publish" && $isAvailTW) { ?>\r
+                    <input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToTW_repostButton" id="rePostToTW_button" value="<?php _e('Repost to Twitter', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+    \r
+    <?php if ($ntOpt['riComments']=='1' && (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) && $pMeta[$ii]['pgID']!='' ) ) { ?>\r
+       <input alt="<?php echo $ii; ?>" style="float: right; " onclick="return false;" type="button" class="button" name="riToTW_repostButton" id="riToTW_button" value="<?php _e('Import Replies/Mentions from Twitter', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+    <?php }  } ?>\r
+                    <?php  if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID'])) { ?> <span style="float: right;padding-top: 4px; padding-right: 10px;">\r
+                      <a id="pstdTW<?php echo $ii; ?>" style="font-size: 10px;" href="<?php echo $ntOpt['twURL'].'/status/'.$pMeta[$ii]['pgID'];  ?>" target="_blank"><?php $nType="Twitter"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                </td></tr>\r
+                \r
+                <?php if (!$isAvailTW) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your Twitter Account to AutoPost to Twitter</b>\r
+                <?php }else {  if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="tw[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>tw" type="checkbox" name="tw[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> /> \r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+                </td></tr> <?php } ?>\r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"><?php _e('Message Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                <td><textarea cols="150" rows="2" id="tw<?php echo $ii; ?>SNAPformat" name="tw[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#tw<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apTWMsgFrmt<?php echo $ii; ?>');"><?php echo $twMsgFormat ?></textarea>                \r
+                </td></tr>\r
+                \r
+<tr><th scope="row" style="text-align:right; width:150px; vertical-align:top; padding-top: 5px; padding-right:10px;">\r
+                 <input value="0"  type="hidden" name="tw[<?php echo $ii; ?>][attchImg]"/>\r
+                 <input value="1" type="checkbox" name="tw[<?php echo $ii; ?>][attchImg]"  <?php if ((int)$isAttchImg == 1) echo "checked"; ?> /> </th><td><strong>Attach Image to Twitter Post</strong></td> </tr>                  \r
+                 \r
+                   <?php /* ## Select Image & URL ## */ nxs_showImgToUseDlg($nt, $ii, $imgToUse); ?>\r
+                 \r
+       <?php } \r
+    } \r
+  }\r
+  //#### \r
+  function adjMetaOpt($optMt, $pMeta){  if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else $optMt['isPosted'] = '';       \r
+     if (isset($pMeta['SNAPformat'])) $optMt['twMsgFormat'] = $pMeta['SNAPformat'];  \r
+     if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];      \r
+     if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+     if (isset($pMeta['attchImg'])) $optMt['attchImg'] = $pMeta['attchImg'] == 1?1:0; else { if (isset($pMeta['attchImg'])) $optMt['attchImg'] = 0; } \r
+     if (isset($pMeta['doTW'])) $optMt['doTW'] = $pMeta['doTW'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doTW'] = 0; } \r
+     if (isset($pMeta['SNAPincludeTW']) && $pMeta['SNAPincludeTW'] == '1' ) $optMt['doTW'] = 1; // <2.6 Compatibility fix    \r
+     return $optMt;\r
+  }\r
+}}\r
+\r
+if (!function_exists("nxs_getBackTWCommentsList")) { function nxs_getBackTWCommentsList($options) { \r
+  require_once ('apis/tmhOAuth.php'); $tmhOAuth = new NXS_tmhOAuth(array( 'consumer_key' => $options['twConsKey'], 'consumer_secret' => $options['twConsSec'], 'user_token' => $options['twAccToken'], 'user_secret' => $options['twAccTokenSec']));\r
+  $code = $tmhOAuth->request('GET', $tmhOAuth->url('1.1/statuses/mentions_timeline')); \r
+  if ($code=='200' && isset($tmhOAuth->response['response']) ) { $tweets = json_decode($tmhOAuth->response['response'], true); if (is_array($tweets)) return $tweets; } return false; \r
+}}\r
+\r
+if (!function_exists("nxs_getBackTWComments")) { function nxs_getBackTWComments($postID, $options, $po, $twList) { $impCmnts = get_post_meta($postID, 'snapImportedComments', true);  \r
+    if(!is_array($impCmnts)) $impCmnts = array(); $twsToImp = array(); $lastID = '';\r
+    //## Do Replies\r
+    foreach ($twList as $tw) if ($tw['in_reply_to_status_id_str'] == $po['pgID']) $twsToImp[] = $tw;\r
+    if (is_array($twsToImp) && count($twsToImp)>0)\r
+      foreach ($twsToImp as $comment){ $cid = $comment['id_str']; if (trim($cid)=='' || in_array('twxcw'.$cid, $impCmnts)) continue; else $impCmnts[] = 'twxcw'.$cid;  // prr($impCmnts);\r
+        $commentdata = array( 'comment_post_ID' => $postID, 'comment_author' => $comment['user']['name'], 'comment_agent' => "SNAP||".str_ireplace('_normal.','_bigger.',$comment['user']['profile_image_url_https']), \r
+          'comment_author_email' => $comment['user']['screen_name'].'@twitter.com', 'comment_author_url' => 'http://twitter.com/'.$comment['user']['screen_name'], \r
+          'comment_content' => str_ireplace('@'.$comment['in_reply_to_screen_name'],'', $comment['text']), 'comment_date_gmt' => date('Y-m-d H:i:s', strtotime( $comment['created_at'] ) ), 'comment_type' => '');\r
+        nxs_postNewComment($commentdata, $options['riCommentsAA']=='1'); $ci++;\r
+      }     \r
+      \r
+    //## Do mentions.\r
+    require_once ('apis/tmhOAuth.php'); $tmhOAuth = new NXS_tmhOAuth(array( 'consumer_key' => $options['twConsKey'], 'consumer_secret' => $options['twConsSec'], 'user_token' => $options['twAccToken'], 'user_secret' => $options['twAccTokenSec']));    \r
+    if (isset($options['urlToUse']) && trim($options['urlToUse'])!='') $urlToSrch = $options['urlToUse']; else $urlToSrch = get_permalink($postID);     \r
+    $code = $tmhOAuth->request('GET', $tmhOAuth->url('1.1/search/tweets'), array('rpp'=>'100', 'since_id'=>$lastID, 'q'=> urlencode($urlToSrch)));       \r
+    if ($code=='200' && isset($tmhOAuth->response['response']) ) { $tweets = json_decode($tmhOAuth->response['response'], true); //prr($tweets);\r
+     if (is_array($tweets) && is_array($tweets['statuses'])) {    \r
+      foreach ($tweets['statuses'] as $comment){ $cid = $comment['id_str']; if (trim($cid)=='' || in_array('twxcw'.$cid, $impCmnts) || $cid==$po['pgID']) continue; else $impCmnts[] = 'twxcw'.$cid;  // prr($impCmnts);\r
+        $commentdata = array( 'comment_post_ID' => $postID, 'comment_author' => $comment['user']['name'], 'comment_author_email' =>  $comment['user']['screen_name'].'@twitter.com', \r
+          'comment_agent' => "SNAP||".str_ireplace('_normal.','_bigger.',$comment['user']['profile_image_url_https']), \r
+          'comment_author_url' => 'http://twitter.com/'.$comment['user']['screen_name'], 'comment_content' => $comment['text'], 'comment_date_gmt' => date('Y-m-d H:i:s', strtotime( $comment['created_at'] ) ), 'comment_type' => '');\r
+        nxs_postNewComment($commentdata, $options['riCommentsAA']=='1'); $ci++;\r
+      }\r
+    }}\r
+    delete_post_meta($postID, 'snapImportedComments'); add_post_meta($postID, 'snapImportedComments', $impCmnts ); \r
+    if ( isset($_POST['id']) && $_POST['id']!='') printf( _n('%d comment has been imported.', '%d comments has been imported.', $ci, 'social-networks-auto-poster-facebook-twitter-g'), $ci );\r
+}}\r
+\r
+if (!function_exists("nxs_rePostToTW_ajax")) {\r
+  function nxs_rePostToTW_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; $options = get_option('NS_SNAutoPoster');  \r
+    foreach ($options['tw'] as $ii=>$nto) if ($ii==$_POST['nid']) {   $nto['ii'] = $ii;  $nto['pType'] = 'aj';\r
+      $twpo =  get_post_meta($postID, 'snapTW', true); $twpo =  maybe_unserialize($twpo); // prr($ii); prr($nto); prr($twpo); die();\r
+      if (is_array($twpo) && isset($twpo[$ii]) && is_array($twpo[$ii]) && isset($twpo[$ii]['SNAPformat']) ) { $ntClInst = new nxs_snapClassTW(); $nto = $ntClInst->adjMetaOpt($nto, $twpo[$ii]);}       \r
+      if (isset($_POST['ri']) && $_POST['ri']=='1') { $twList = nxs_getBackTWCommentsList($nto);  nxs_getBackTWComments($postID, $nto, $twpo[$ii], $twList); die(); } else {\r
+        $result = nxs_doPublishToTW($postID, $nto); if ($result == 200) {$options['tw'][$ii]['twOK']=1;  update_option('NS_SNAutoPoster', $options); } if ($result == 200) die("Successfully sent your post to Twitter."); else die($result);\r
+      }\r
+    }\r
+  }\r
+} \r
+\r
+if (!function_exists("nxs_doPublishToTW")) { //## Second Function to Post to TW \r
+  function nxs_doPublishToTW($postID, $options){ $ntCd = 'TW'; $ntCdL = 'tw'; $ntNm = 'Twitter'; $imgData = ''; $imgURL = ''; global $plgn_NS_SNAutoPoster, $nxs_urlLen; $nxs_urlLen = 0;\r
+    if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+    //$backtrace = debug_backtrace(); nxs_addToLogN('W', 'Error', $logNT, 'I am here - '.$ntCd."|".print_r($backtrace, true), ''); \r
+    //if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToTW',  array($postID, $options));\r
+    $gOptions = $plgn_NS_SNAutoPoster->nxs_options; if (!empty($gOptions['nxsHTSpace'])) $htS = $gOptions['nxsHTSpace']; else $htS = '';\r
+    $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));\r
+    $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+    $logNT = '<span style="color:#00FFFF">Twitter</span> - '.$options['nName']; \r
+    $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+    if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') { \r
+         nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$options['pType']); return;\r
+        }\r
+    }  \r
+    $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url(); $uln = 0; $extInfo = ' | PostID: '.$postID;    \r
+    if ($options['attchImg']=='1') { if (!empty($options['imgToUse'])) $imgURL = $options['imgToUse']; else $imgURL = nxs_getPostImage($postID);  if (preg_match("/noImg.\.png/i", $imgURL)) $imgURL = '';  \r
+      if(trim($imgURL)=='') $options['attchImg'] = 0; else { $imgURL = str_replace(' ', '%20', $imgURL);\r
+        $hdrsArr['User-Agent']='Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0'; $advSet=array('headers'=>$hdrsArr,'httpversion'=>'1.1','timeout'=>45,'sslverify'=>false);              \r
+        $imgData = wp_remote_get($imgURL, $advSet); \r
+        if(is_wp_error($imgData) || empty($imgData['body']) || (!empty($imgData['headers']['content-length']) && (int)$imgData['headers']['content-length']<200)) { $options['attchImg'] = 0; \r
+          nxs_addToLogN('E','Error',$logNT,'Could not get image ('.$imgURL.'), will post without it - Error:'.print_r($imgData, true), $extInfo); \r
+        } else $imgData = $imgData['body']; \r
+      }      \r
+    } if ($options['attchImg']=='1' && $imgData!='') $twLim = 117; else $twLim = 140;    \r
+    if ($postID=='0') { echo "Testing ... <br/><br/>"; $msg = 'Test Post from '.nsTrnc($blogTitle, $twLim - 24)." - ".rand(1, 155); $uln = nxs_strLen($msg);}  \r
+     else{ $post = get_post($postID); if(!$post) return; $twMsgFormat = $options['twMsgFormat'];  nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));    \r
+        $extInfo = ' | PostID: '.$postID." - ".$post->post_title.' |'.$options['pType'];        \r
+        if (stripos($twMsgFormat, '%URL%')!==false || stripos($twMsgFormat, '%SURL%')!==false) $twLim = $twLim - 22; \r
+        if (stripos($twMsgFormat, '%AUTHORNAME%')!==false) { $aun = $post->post_author;  $aun = get_the_author_meta('display_name', $aun ); $twLim = $twLim - nxs_strLen($aun); } \r
+        \r
+        $noRepl = str_ireplace("%TITLE%", "", $twMsgFormat); $noRepl = str_ireplace("%SITENAME%", "", $noRepl); $noRepl = str_ireplace("%URL%", "", $noRepl);$noRepl = str_ireplace("%RAWEXCERPT%", "", $noRepl); \r
+        $noRepl = str_ireplace("%SURL%", "", $noRepl);$noRepl = str_ireplace("%TEXT%", "", $noRepl);$noRepl = str_ireplace("%FULLTEXT%", "", $noRepl);$noRepl = str_ireplace("%EXCERPT%", "", $noRepl);\r
+        $noRepl = str_ireplace("%ANNOUNCE%", "", $noRepl); $noRepl = str_ireplace("%AUTHORNAME%", "", $noRepl);  $noRepl = str_ireplace("%TAGS%", "", $noRepl); $noRepl = str_ireplace("%CATS%", "", $noRepl);        \r
+        $noRepl = preg_replace('/%H?C(F|T)-[a-zA-Z0-9_]+%/', '', $noRepl); $twLim = $twLim - nxs_strLen($noRepl);// prr($noRepl);\r
+        \r
+        $pTitle = nxs_doQTrans($post->post_title);\r
+        if ($post->post_excerpt!="") $exrText = nxs_doQTrans($post->post_excerpt); else $exrText= nxs_doQTrans($post->post_content); \r
+        $pText = (empty($gOptions['brokenCntFilters']))?apply_filters('the_content', $exrText):$exrText;      \r
+        $pRawText = nxs_doQTrans($post->post_content); $pFullText = (empty($gOptions['brokenCntFilters']))?apply_filters('the_content', $pRawText):$pRawText;    \r
+        if (stripos($twMsgFormat, '%TAGS%')!==false || stripos($twMsgFormat, '%HTAGS%')!==false) {\r
+          $t = wp_get_object_terms($postID, 'product_tag'); if ( empty($t) || is_wp_error($pt) || !is_array($t) ) $t = wp_get_post_tags($postID);\r
+          $tggs = array(); foreach ($t as $tagA) { $frmTag =  trim(str_replace(' ', $htS, preg_replace('/[^a-zA-Z0-9\p{L}\p{N}\s]/u', '', trim(ucwords(str_ireplace('&','',str_ireplace('&amp;','',$tagA->name)))))));\r
+              if (preg_match('/\b'.$frmTag.'\b/iu', $pTitle)) $pTitle = trim(preg_replace('/\b'.$frmTag.'\b/iu', '#'.$frmTag, $pTitle)); \r
+              if (preg_match('/\b'.$frmTag.'\b/iu', $pFullText)) $pFullText = trim(preg_replace('/\b'.$frmTag.'\b/iu', '#'.$frmTag, $pFullText)); \r
+              if (preg_match('/\b'.$frmTag.'\b/iu', $pText)) $pText = trim(preg_replace('/\b'.$frmTag.'\b/iu', '#'.$frmTag, $pText)); \r
+              if (preg_match('/\b'.$frmTag.'\b/iu', $pRawText)) $pRawText = trim(preg_replace('/\b'.$frmTag.'\b/iu', '#'.$frmTag, $pRawText)); \r
+              if ( ((stripos($twMsgFormat, '%TITLE%')!==false) && preg_match('/\b'.$frmTag.'\b/i', $pTitle)) ||\r
+                   ((stripos($twMsgFormat, '%TEXT%')!==false) && preg_match('/\b'.$frmTag.'\b/i', $pText)) ||\r
+                   ((stripos($twMsgFormat, '%EXCERPT%')!==false) && preg_match('/\b'.$frmTag.'\b/i', $pText)) ||\r
+                   ((stripos($twMsgFormat, '%RAWEXCERPT%')!==false) && preg_match('/\b'.$frmTag.'\b/i', $pText)) ||\r
+                   ((stripos($twMsgFormat, '%ANNOUNCE%')!==false) && preg_match('/\b'.$frmTag.'\b/i', $pText)) ||\r
+                   ((stripos($twMsgFormat, '%FULLTEXT%')!==false) && preg_match('/\b'.$frmTag.'\b/i', $pFullText)) ||\r
+                   ((stripos($twMsgFormat, '%RAWTEXT%')!==false) && preg_match('/\b'.$frmTag.'\b/i', $pRawText)) ) {} else $tggs[] = '#'.$frmTag;\r
+          } $tags = implode(' ', $tggs); $tgsTwLim = $twLim-20; $tags = nsTrnc($tags, $tgsTwLim, " ", ""); $twMsgFormat = str_ireplace("%TAGS%", $tags, $twMsgFormat);  $twMsgFormat = str_ireplace("%HTAGS%", $tags, $twMsgFormat);\r
+          $twLim = $twLim - nxs_strLen($tags);\r
+        } \r
+        if (stripos($twMsgFormat, '%CATS%')!==false || stripos($twMsgFormat, '%HCATS%')!==false) {\r
+          $t = wp_get_post_categories($postID); $ctts = array();  foreach($t as $c){ $cat = get_category($c); //$frmTag =  trim(str_replace(' ','', str_replace('  ',' ',str_ireplace('&','&amp;',trim(ucwords($cat->name)))))); prr($frmTag);\r
+          $frmTag =  trim(str_replace(' ',$htS,preg_replace('/[^a-zA-Z0-9\p{L}\p{N}\s]/u', '', trim(ucwords(str_ireplace('&','',str_ireplace('&amp;','',$cat->name)))))));\r
+          if (stripos($pTitle, $cat->name)!==false) $pTitle = str_ireplace($cat->name, '#'.$frmTag, $pTitle); elseif (stripos($pTitle, $frmTag)!==false) $pTitle = str_ireplace($frmTag, '#'.$frmTag, $pTitle); \r
+              if (stripos($pText, $cat->name)!==false) $pText = str_ireplace($cat->name, '#'.$frmTag, $pText); elseif (stripos($pText, $frmTag)!==false) $pText = str_ireplace($frmTag, '#'.$frmTag, $pText); \r
+              if (stripos($pFullText, $cat->name)!==false) $pFullText = str_ireplace($cat->name, '#'.$frmTag, $pFullText); elseif (stripos($pFullText, $frmTag)!==false) $pFullText = str_ireplace($frmTag, '#'.$frmTag, $pFullText); \r
+              if (stripos($pRawText, $cat->name)!==false) $pRawText = str_ireplace($cat->name, '#'.$frmTag, $pRawText); elseif (stripos($pRawText, $frmTag)!==false) $pRawText = str_ireplace($frmTag, '#'.$frmTag, $pRawText); \r
+              if ( ((stripos($twMsgFormat, '%TITLE%')!==false) && (stripos($pTitle, $cat->name)!==false || stripos($pTitle, $frmTag)!==false)) ||\r
+                   ((stripos($twMsgFormat, '%TEXT%')!==false) && (stripos($pText, $cat->name)!==false || stripos($pText, $frmTag)!==false)) ||\r
+                   ((stripos($twMsgFormat, '%EXCERPT%')!==false) && (stripos($pText, $cat->name)!==false || stripos($pText, $frmTag)!==false)) ||\r
+                   ((stripos($twMsgFormat, '%RAWEXCERPT%')!==false) && (stripos($exrText, $cat->name)!==false || stripos($exrText, $frmTag)!==false)) ||\r
+                   ((stripos($twMsgFormat, '%ANNOUNCE%')!==false) && (stripos($pText, $cat->name)!==false || stripos($pText, $frmTag)!==false)) ||\r
+                   ((stripos($twMsgFormat, '%FULLTEXT%')!==false) && (stripos($pFullText, $cat->name)!==false || stripos($pFullText, $frmTag)!==false)) ||\r
+                   ((stripos($twMsgFormat, '%RAWTEXT%')!==false) && (stripos($pRawText, $cat->name)!==false || stripos($pRawText, $frmTag)!==false)) ) {} else $ctts[] = '#'.$frmTag; \r
+          } $cats = implode(' ',$ctts); $tgsTwLim = $twLim-20; $cats = nsTrnc($cats, $tgsTwLim, " ", ""); $twMsgFormat = str_ireplace("%CATS%", $cats, $twMsgFormat);  $twMsgFormat = str_ireplace("%HCATS%", $cats, $twMsgFormat);\r
+          $twLim = $twLim - nxs_strLen($cats);\r
+        } \r
+        if (preg_match('/%H?CT-[a-zA-Z0-9_]+%/', $twMsgFormat)) { $msgA = explode('%CT', str_ireplace("%HCT", "%CT", $twMsgFormat)); $mout = '';\r
+          foreach ($msgA as $mms) { \r
+            if (substr($mms, 0, 1)=='-' && stripos($mms, '%')!==false) { $mGr=CutFromTo($mms,'-','%'); $cfItem=wp_get_post_terms($postID,$mGr,array("fields" => "names"));  \r
+              if (is_nxs_error($cfItem)) {nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.$mGr.'|'.print_r($cfItem, true), $extInfo);  } else { $tggs = array(); \r
+                foreach ($cfItem as $frmTag) { \r
+                  $frmTag =  trim(str_replace(' ', $htS, preg_replace('/[^a-zA-Z0-9\p{L}\p{N}\s]/u', '', trim(ucwords(str_ireplace('&','',str_ireplace('&amp;','',$frmTag)))))));  $tggs[] = '#'.$frmTag; \r
+                } $cfItem = implode(' ',$tggs); $twLim = $twLim - nxs_strLen($cfItem); $mms=str_ireplace("-".$mGr."%",$cfItem,$mms);               \r
+              }\r
+            } $mout.=$mms; \r
+          } $twMsgFormat = $mout; \r
+        } \r
+        $twMsgFormat = str_ireplace("  ", " ", $twMsgFormat);\r
+        if (stripos($twMsgFormat, '%TITLE%')!==false) { if (stripos($pTitle, '.co.uk')!==false) $twLim = $twLim - 14;\r
+           if (stripos($pTitle, '.com')!==false) $twLim = $twLim - 16; if (stripos($pTitle, '.net')!==false) $twLim = $twLim - 16; if (stripos($pTitle, '.org')!==false) $twLim = $twLim - 16;\r
+           \r
+           $pTitle = html_entity_decode(strip_tags($pTitle), ENT_NOQUOTES, 'UTF-8'); //$ttlTwLim = $twLim-20;                      \r
+           $ttlTwLim = $twLim;\r
+           $pTitle = nsTrnc($pTitle, $ttlTwLim); $twMsgFormat = str_ireplace("%TITLE%", $pTitle, $twMsgFormat); $twLim = $twLim - nxs_strLen($pTitle); \r
+        } \r
+        if (stripos($twMsgFormat, '%SITENAME%')!==false) {\r
+          $siteTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); $siteTitle = nsTrnc($siteTitle, $twLim); $twMsgFormat = str_ireplace("%SITENAME%", $siteTitle, $twMsgFormat); $twLim = $twLim - nxs_strLen($siteTitle);\r
+        }     \r
+        if (stripos($twMsgFormat, '%TEXT%')!==false) {          \r
+          $pText = nsTrnc(strip_tags(strip_shortcodes($pText)), 140, " ", "..."); \r
+          $pText = nsTrnc($pText, $twLim); $twMsgFormat = str_ireplace("%TEXT%", $pText, $twMsgFormat); $twLim = $twLim - nxs_strLen($pText);\r
+        } \r
+        if (stripos($twMsgFormat, '%EXCERPT%')!==false) {          \r
+          $pText = nsTrnc(strip_tags(strip_shortcodes($pText)), 140, " ", "..."); \r
+          $pText = nsTrnc($pText, $twLim); $twMsgFormat = str_ireplace("%EXCERPT%", $pText, $twMsgFormat); $twLim = $twLim - nxs_strLen($pText);\r
+        } \r
+        if (stripos($twMsgFormat, '%ANNOUNCE%')!==false) {          \r
+          $pText = nsTrnc(strip_tags(strip_shortcodes($pText)), 140, " ", "..."); \r
+          $pText = nsTrnc($pText, $twLim); $twMsgFormat = str_ireplace("%ANNOUNCE%", $pText, $twMsgFormat); $twLim = $twLim - nxs_strLen($pText);\r
+        } \r
+        if (stripos($twMsgFormat, '%RAWEXCERPT%')!==false) {          \r
+          $exrText = nsTrnc(strip_tags(strip_shortcodes($exrText)), 140, " ", "..."); \r
+          $exrText = nsTrnc($exrText, $twLim); $twMsgFormat = str_ireplace("%RAWEXCERPT%", $exrText, $twMsgFormat); $twLim = $twLim - nxs_strLen($exrText);\r
+        } \r
+        if (stripos($twMsgFormat, '%FULLTEXT%')!==false) {\r
+           $pFullText = nsTrnc(strip_tags($pFullText), $twLim); $twMsgFormat = str_ireplace("%FULLTEXT%", $pFullText, $twMsgFormat); $twLim = $twLim - nxs_strLen($pFullText);\r
+        }          \r
+        if (stripos($twMsgFormat, '%RAWTEXT%')!==false) {\r
+           $pRawText = nsTrnc(strip_tags($pRawText), $twLim); $twMsgFormat = str_ireplace("%RAWTEXT%", $pRawText, $twMsgFormat); $twLim = $twLim - nxs_strLen($pRawText);\r
+        }  \r
+        $msg = nsFormatMessage($twMsgFormat, $postID, $addParams); \r
+    } \r
+    $msg = str_replace('&amp;#039;', "'", $msg);  $msg = str_replace('&#039;', "'", $msg);  $msg = str_replace('#039;', "'", $msg);  $msg = str_replace('#039', "'", $msg);\r
+    $msg = str_replace('&amp;#8217;', "'", $msg); $msg = str_replace('&#8217;', "'", $msg); $msg = str_replace('#8217;', "'", $msg); $msg = str_replace('#8217', "'", $msg);\r
+    $msg = str_replace('&amp;#8220;', '"', $msg); $msg = str_replace('&#8220;', '"', $msg); $msg = str_replace('#8220;', '"', $msg); $msg = str_replace('#8220', "'", $msg);\r
+    $msg = str_replace('&amp;#8221;', '"', $msg); $msg = str_replace('&#8221;', '"', $msg); $msg = str_replace('#8221;', '"', $msg); $msg = str_replace('#8221', "'", $msg);\r
+    $msg = str_replace('&amp;#8212;', '-', $msg); $msg = str_replace('&#8212;', '-', $msg); $msg = str_replace('#8212;', '-', $msg); $msg = str_replace('#8212', "-", $msg); \r
+    \r
+    $msg = nxs_decodeEntitiesFull($msg);\r
+    \r
+    $message = array('message'=>$msg, 'img'=>$imgData, 'urlLength'=>$nxs_urlLen);  $options['twMsgFormat'] = $msg;  \r
+    \r
+    //## This meta field is created by the indieweb taxonomy plugin - by David Peach\r
+    $response = get_post_meta( $postID, 'response', true ); if (!empty($response)) { $reply_url = $response['url']; if (!empty($reply_url) && strpos($reply_url, 'twitter.com')) {\r
+      $explode_at_domain = explode('twitter.com/', $reply_url); $twitter_path = end($explode_at_domain); $exploded_path = explode('/', $twitter_path); $options['in_reply_to_id'] = end($exploded_path);          \r
+    }}  //prr($options);\r
+    //## Actual Post\r
+    $ntToPost = new nxs_class_SNAP_TW(); $ret = $ntToPost->doPostToNT($options, $message);\r
+           \r
+    //## Process Results\r
+    if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+         if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+    } else {  // ## All Good - log it.\r
+      if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+        else  { nxs_addToRI($postID); nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'pDate'=>date('Y-m-d H:i:s'))); \r
+        $extInfo .= ' | <a href="'.$ret['postURL'].'" target="_blank">Post Link</a>';  nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+    }\r
+    //## Return Result\r
+    if ($ret['isPosted']=='1') return 200; else return print_r($ret, true);    \r
+  }\r
+}\r
+\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/vb.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/vb.api.php
new file mode 100644 (file)
index 0000000..11eeb73
--- /dev/null
@@ -0,0 +1,105 @@
+<?php    \r
+//## NextScripts FriendFeed Connection Class\r
+$nxs_snapAPINts[] = array('code'=>'VB', 'lcode'=>'vb', 'name'=>'vBulletin');\r
+\r
+if (!class_exists("nxs_class_SNAP_VB")) { class nxs_class_SNAP_VB {\r
+    \r
+    var $ntCode = 'VB';\r
+    var $ntLCode = 'vb';     \r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array();\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }    \r
+    function nxs_getVBHeaders($ref, $post=false){ $hdrsArr = array(); \r
+      $hdrsArr['X-Requested-With']='XMLHttpRequest'; $hdrsArr['Connection']='keep-alive'; $hdrsArr['Referer']=$ref;\r
+      $hdrsArr['User-Agent']='Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.22 Safari/537.11';\r
+      if($post) $hdrsArr['Content-Type']='application/x-www-form-urlencoded'; \r
+      $hdrsArr['Accept']='application/json, text/javascript, */*; q=0.01'; \r
+      if (function_exists('gzdeflate')) $hdrsArr['Accept-Encoding']='gzip,deflate,sdch'; $hdrsArr['Accept-Language']='en-US,en;q=0.8'; $hdrsArr['Accept-Charset']='ISO-8859-1,utf-8;q=0.7,*;q=0.3'; return $hdrsArr;\r
+    }\r
+    function nxs_doCheckVB($url){ global $nxs_vbCkArray; $hdrsArr = $this->nxs_getVBHeaders($url); $ckArr = $nxs_vbCkArray;   \r
+      $response = wp_remote_get($url, array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr, 'cookies' => $ckArr));   \r
+      if (stripos($response['body'],'logouthash=')===false) return 'Bad Saved Login';  \r
+      if ( stripos($response['body'], 'usercp.php')!==false && stripos($response['body'], 'logouthash')!==false){ /*echo "You are IN"; */ return false; \r
+      } else return 'No Saved Login';\r
+      return false;  \r
+    }\r
+    function nxs_doConnectToVB($u, $p, $url){ global $nxs_vbCkArray; $hdrsArr = $this->nxs_getVBHeaders($url); $mids = '';//   echo "LOGGIN";\r
+      $response = wp_remote_get($url, array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr, 'cookies' => '')); if(is_wp_error($response)) return "Invalid Connection. ".print_r($response, true);\r
+      $contents = $response['body']; //$response['body'] = htmlentities($response['body']);  prr($response);    die();\r
+      $ckArr = $response['cookies']; $mdhashLoc = stripos($contents, 'md5hash(vb_login_password');\r
+      if ($mdhashLoc===false) return "No VB found";\r
+      $frmTxt = CutFromTo($contents, 'md5hash(vb_login_password','</form>'); $md = array(); $flds  = array();\r
+      while (stripos($frmTxt, '<input')!==false){ $inpField = trim(CutFromTo($frmTxt,'<input', '>')); $name = trim(CutFromTo($inpField,'name="', '"'));\r
+        if ( stripos($inpField, '"hidden"')!==false && $name!='' && !in_array($name, $md)) { $md[] = $name; $val = trim(CutFromTo($inpField,'value="', '"')); $flds[$name]= $val; $mids .= "&".$name."=".$val;}\r
+        $frmTxt = substr($frmTxt, stripos($frmTxt, '<input')+8);\r
+      } $flds['vb_login_username'] = $u; $flds['vb_login_md5password'] = md5($p);  $flds['vb_login_md5password_utf'] = md5($p); $flds['cookieuser'] = '1'; $flds['do'] = 'login'; \r
+    \r
+      // $logURL = substr($contents, $mdhashLoc-250, 250); $logURL = CutFromTo($logURL, 'action="', '"');          \r
+      if (stripos($contents, 'base href="')!==false) $baseURL = trim(CutFromTo($contents,'base href="', '"')); else { $uarr = explode('/',$url);  $dd = $uarr[count($uarr)-1]; $baseURL = str_replace($dd, '', $url);}\r
+      $hdrsArr = $this->nxs_getVBHeaders($url, true);\r
+      $r2 = wp_remote_post( $baseURL.'login.php?do=login', array( 'method' => 'POST', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr, 'body' => $flds, 'cookies' => $ckArr)); // prr($r2);\r
+      if (stripos($r2['body'],'exec_refresh()')!==false) { $ckArr = nxsMergeArraysOV($ckArr, $r2['cookies']); $nxs_vbCkArray = $ckArr; return false; } else return "Bad Username/Password";\r
+    }    \r
+    function nxs_doPostToVB($url, $subj, $msg, $lnk, $tags){ global $nxs_vbCkArray; $hdrsArr = $this->nxs_getVBHeaders($url); $ckArr = $nxs_vbCkArray; $mids='';\r
+      $response = wp_remote_get($url, array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr, 'cookies' => $ckArr));   \r
+      if(is_wp_error($response)) return "Invalid Connection. ".print_r($response, true);\r
+      $contents = $response['body']; // $response['body'] = htmlentities($response['body']);  prr($response);    die();\r
+      if (stripos($contents, 'base href="')!==false) $baseURL = trim(CutFromTo($contents,'base href="', '"')); else { $uarr = explode('/',$url); $dd = $uarr[count($uarr)-1]; $baseURL = str_replace($dd, '', $url);}\r
+      if (stripos($contents, 'newthread.php?do=newthread')!==false) $mdd='t'; elseif (stripos($contents, 'newreply.php?')!==false) $mdd='p'; else return "No Thread/Post Controls found";\r
+  \r
+      if ($mdd=='t'){ $fid = CutFromTo($contents, 'newthread.php?do=newthread','"'); // echo  $baseURL.'newthread.php?do=newthread'.str_replace('&amp;','&',$fid);\r
+        $response = wp_remote_get( $baseURL.'newthread.php?do=newthread'.str_replace('&amp;','&',$fid), array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr, 'cookies' => $ckArr)); $contents = $response['body'];\r
+        $frmTxt = CutFromTo($contents, 'newthread.php?do=postthread','</form>'); $md = array(); $flds  = array(); //prr($frmTxt);\r
+        while (stripos($frmTxt, '<input')!==false){ $inpField = trim(CutFromTo($frmTxt,'<input', '>')); $name = trim(CutFromTo($inpField,'name="', '"')); \r
+          if ( stripos($inpField, '"hidden"')!==false && $name!='' && !in_array($name, $md)) { $md[] = $name; $val = trim(CutFromTo($inpField,'value="', '"')); $flds[$name]= $val; $mids .= "&".$name."=".$val;}\r
+          $frmTxt = substr($frmTxt, stripos($frmTxt, '<input')+8);\r
+        }  $flds['subject'] = $subj; $flds['message'] = $msg; $flds['message_backup'] = $msg; $flds['wysiwyg'] = '1'; $flds['do'] = 'postthread'; $flds['taglist'] = $tags;  $flds['parseurl'] = '1';  $flds['sbutton'] = 'Submit+New+Thread';  \r
+        $smURL = $baseURL.'newthread.php?do=postthread'.str_replace('&amp;','&',$fid);\r
+      } //prr($flds);\r
+      if ($mdd=='p'){ $fid = CutFromTo($contents, 'newreply.php?do=newreply','"');\r
+        $response = wp_remote_get( $baseURL.'newreply.php?do=newreply'.str_replace('&amp;','&',$fid), array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr, 'cookies' => $ckArr)); $contents = $response['body'];\r
+        $frmTxt = CutFromTo($contents, 'newreply.php?do=postreply','</form>'); $md = array(); $flds  = array(); //prr($frmTxt);\r
+    \r
+        while (stripos($frmTxt, '<input')!==false){ $inpField = trim(CutFromTo($frmTxt,'<input', '>')); $name = trim(CutFromTo($inpField,'name="', '"')); \r
+          if ( stripos($inpField, '"hidden"')!==false && $name!='' && !in_array($name, $md)) { $md[] = $name; $val = trim(CutFromTo($inpField,'value="', '"')); $flds[$name]= $val; $mids .= "&".$name."=".$val;}\r
+          $frmTxt = substr($frmTxt, stripos($frmTxt, '<input')+8);\r
+        }  $flds['title'] = $subj; $flds['message'] = $msg; $flds['message_backup'] = $msg; $flds['wysiwyg'] = '1'; $flds['do'] = 'postreply';  $flds['parseurl'] = '1';  $flds['sbutton'] = 'Submit+Reply';  \r
+        $smURL = $baseURL.'newreply.php?do=postreply'.str_replace('&amp;','&',$fid);\r
+      } //prr($flds);\r
+      $r2 = wp_remote_post( $smURL, array( 'method' => 'POST', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr, 'body' => $flds, 'cookies' => $ckArr));\r
+        // prr($r2['response']);  prr(htmlentities($r2['body'])); $r2['body'] = ''; prr($r2); die();\r
+      if(is_wp_error($r2)) return "Invalid Connection. ".print_r($r2, true);  \r
+      if (stripos($r2['body'], 'tag can only be ')!==false) { $lgLim =  trim(CutFromTo($r2['body'], 'tag can only be ',' characters')); $flds['taglist'] = substr($flds['taglist'], 0, $lgLim); \r
+        $r2 = wp_remote_post( $smURL, array( 'method' => 'POST', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr, 'body' => $flds, 'cookies' => $ckArr));\r
+      }\r
+      if(is_wp_error($r2)) return "Invalid Connection. ".print_r($r2, true);  \r
+      if (stripos($r2['body'], 'errorblock')!==false) return trim(strip_tags( CutFromTo($r2['body'], 'errorblock','</div>')));\r
+      if (stripos($r2['body'], 'exec_refresh()')!==false && stripos($r2['body'], 'blockrow restore">')!==false) return trim(strip_tags( CutFromTo($r2['body'], 'blockrow restore">','</p>')));\r
+      if (stripos($r2['body'], '<error>')!==false) return trim(strip_tags( CutFromTo($r2['body'], '<error>','</error>')));\r
+      if ( $r2['response']['code']=='302' || $r2['response']['code']=='303') { return array("code"=>"OK", "post_id"=>$r2['headers']['location']); }\r
+      if (stripos($r2['body'], '<newpostid>')!==false || stripos($r2['body'], 'postbit postid="')!==false ) return 'OK';\r
+      return "Something wrong - Error: ".print_r($r2, true);  \r
+    }\r
+    \r
+    function doPostToNT($options, $message){ $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>''); global $nxs_vbCkArray; \r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['vbUName']) || trim($options['vbPass'])=='') { $badOut['Error'] = 'Not Configured'; return $badOut; }            \r
+      $pass = (substr($options['vbPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['vbPass'], 5)):$options['vbPass']);      \r
+      //## Format\r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['vbMsgFormat'], $message); \r
+      if (!empty($message['pTitle'])) $msgT = $message['pTitle']; else $msgT = nxs_doFormatMsg($options['vbMsgTFormat'], $message);\r
+      $urlToGo = (!empty($message['url']))?$message['url']:''; \r
+      //## Post\r
+      if (isset($options['vbSvC'])) $nxs_vbCkArray = maybe_unserialize( $options['vbSvC']); $loginError = true;\r
+      if (is_array($nxs_vbCkArray)) $loginError = $this->nxs_doCheckVB( $options['vbURL']); if ($loginError!==false) $loginError = $this->nxs_doConnectToVB( $options['vbUName'], $pass, $options['vbURL']); \r
+      if ($loginError!==false) return "ERROR - BAD USER/PASS - ".print_r($loginError, true);      \r
+      $ret = $this->nxs_doPostToVB($options['vbURL'], $msgT, $msg, $urlToGo, $message['tags']);      \r
+      \r
+      if ( (!is_array($ret)) && $ret!='OK') $badOut['Error'] .= 'Something went wrong - '.print_r($ret, true); else return array('postID'=>$ret['post_id'], 'isPosted'=>1, 'postURL'=>$ret['post_id'], 'pDate'=>date('Y-m-d H:i:s'));       \r
+      return $badOut;      \r
+   }    \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/vb.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/vb.php
new file mode 100644 (file)
index 0000000..63951bd
--- /dev/null
@@ -0,0 +1,250 @@
+<?php    \r
+//## NextScripts Facebook Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'VB', 'lcode'=>'vb', 'name'=>'vBulletin');\r
+\r
+if (!class_exists("nxs_snapClassVB")) { class nxs_snapClassVB {\r
+  //#### Show Common Settings\r
+  function showGenNTSettings($ntOpts){  global $nxs_plurl; $ntInfo = array('code'=>'VB', 'lcode'=>'vb', 'name'=>'vBulletin', 'defNName'=>'vbUName', 'tstReq' => false); ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>\r
+          <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />\r
+           <?php } ?>\r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;\r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($mgpo){ $options = array('nName'=>'', 'doVB'=>'1', 'vbUName'=>'', 'vbInclTags'=>'1', 'vbAttch'=>'', 'vbURL'=>'', 'vbPass'=>''); $options['ntInfo']= array('lcode'=>'vb'); $this->showNTSettings($mgpo, $options, true);}\r
+  \r
+  \r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = '';  ?>\r
+            <div id="doVB<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">     <input type="hidden" name="apDoSVB<?php echo $ii; ?>" value="0" id="apDoSVB<?php echo $ii; ?>" />          \r
+            \r
+             <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/vb16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/setup-installation-vbulletin-social-networks-auto-poster-wordpress/"><?php $nType="vBulletin"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="vb[<?php echo $ii; ?>][nName]" id="vbnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel('vb', $ii, $options['qTLng']); ?>\r
+            \r
+              <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+    \r
+            \r
+            <div id="altFormat" style="">\r
+  <div style="width:100%;"><strong id="altFormatText">vBulletin URL:</strong> <span style="font-size: 11px; margin: 0px;">Could be Forum URL or Thread URL. Either new thread of new post will be created.</span></div>\r
+                <input name="vb[<?php echo $ii; ?>][apVBURL]" id="apVBURL" style="width: 60%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['vbURL'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/> \r
+            \r
+            </div>   \r
+            \r
+            <div style="width:100%;"><strong>vBulletin Username:</strong> </div><input name="vb[<?php echo $ii; ?>][apVBUName]" id="apVBUName" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['vbUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+            <div style="width:100%;"><strong>vBulletin Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="vb[<?php echo $ii; ?>][apVBPass]" id="apVBPass" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['vbPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['vbPass'], 5)):$options['vbPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>                \r
+            \r
+            <?php if ($isNew) { ?> <input type="hidden" name="vb[<?php echo $ii; ?>][apDoVB]" value="1" id="apDoNewVB<?php echo $ii; ?>" /> <?php } ?>\r
+            <br/>            \r
+            \r
+            \r
+            \r
+            <p style="margin-bottom: 20px;margin-top: 5px;"><input value="1"  id="vbInclTags" type="checkbox" name="vb[<?php echo $ii; ?>][vbInclTags]"  <?php if ((int)$options['vbInclTags'] == 1) echo "checked"; ?> /> \r
+              <strong>Post with tags</strong> Tags from the blogpost will be auto posted to vBulletin                                \r
+            </p>\r
+            \r
+            <div id="altFormat" style="">\r
+  <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> (<a href="#" id="apVBMsgTFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apVBMsgTFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div>\r
+                           \r
+              <textarea cols="150" rows="3" id="vb<?php echo $ii; ?>SNAPformat" name="vb[<?php echo $ii; ?>][apVBMsgTFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#vb<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apVBMsgTFrmt<?php echo $ii; ?>');"><?php if ($isNew) echo "%TITLE%"; else _e(apply_filters('format_to_edit', htmlentities($options['vbMsgTFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea>                            \r
+              \r
+              <?php nxs_doShowHint("apVBMsgTFrmt".$ii); ?>\r
+              </div><br/> \r
+            \r
+            <div id="altFormat" style="">\r
+  <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> (<a href="#" id="apVBMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apVBMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div>\r
+              <input name="vb[<?php echo $ii; ?>][apVBMsgFrmt]" id="apVBMsgFrmt" style="width: 50%;" value="<?php if ($isNew) echo "%EXCERPT%"; else _e(apply_filters('format_to_edit', htmlentities($options['vbMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?>"  onfocus="mxs_showFrmtInfo('apVBMsgFrmt<?php echo $ii; ?>');" /><?php nxs_doShowHint("apVBMsgFrmt".$ii); ?>\r
+            </div><br/>    \r
+            \r
+            <?php if ($options['vbPass']!='') { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('VB', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>      \r
+               \r
+            <?php } \r
+            \r
+            ?></div>\r
+            <?php /* ######################## Advanced Tab ####################### */ ?>\r
+    <?php if (!$isNew) { ?>  <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+   <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); \r
+      nxs_showRepostSettings($nt, $ii, $options); ?>\r
+            \r
+            \r
+    </div>  <?php } ?> <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div></div><?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = 'VB'; $lcode = 'vb'; \r
+    foreach ($post as $ii => $pval){       \r
+      if (!empty($pval['apVBUName']) && !empty($pval['apVBPass'])){ if (!isset($options[$ii])) $options[$ii] = array();\r
+        if (isset($pval['apVBUName']))   $options[$ii]['vbUName'] = trim($pval['apVBUName']);\r
+        if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);\r
+        if (isset($pval['apVBPass']))    $options[$ii]['vbPass'] = 'n5g9a'.nsx_doEncode($pval['apVBPass']); else $options[$ii]['vbPass'] = '';  \r
+        if (isset($pval['apVBURL'])) $options[$ii]['vbURL'] = trim($pval['apVBURL']);                                                  \r
+        \r
+        if (isset($pval['vbInclTags']))     $options[$ii]['vbInclTags'] = $pval['vbInclTags']; else $options[$ii]['vbInclTags'] = 0;\r
+        if (isset($pval['apVBMsgTFrmt'])) $options[$ii]['vbMsgTFormat'] = trim($pval['apVBMsgTFrmt']);\r
+        if (isset($pval['apVBMsgFrmt'])) $options[$ii]['vbMsgFormat'] = trim($pval['apVBMsgFrmt']);\r
+        \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+        \r
+        if (isset($pval['apDoVB']))      $options[$ii]['doVB'] = $pval['apDoVB']; else $options[$ii]['doVB'] = 0; \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }  \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'vb'; $ntU = 'VB';\r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapVB', true));   if (is_array($pMeta)) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]); \r
+        $doVB = $ntOpt['doVB'] && (is_array($pMeta) || $ntOpt['catSel']!='1');   \r
+        $isAvailVB =  $ntOpt['vbUName']!='' && $ntOpt['vbPass']!=''; $vbMsgFormat = htmlentities($ntOpt['vbMsgFormat'], ENT_COMPAT, "UTF-8"); $vbMsgTFormat = htmlentities($ntOpt['vbMsgTFormat'], ENT_COMPAT, "UTF-8");      \r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2">\r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvailVB) { ?><input class="nxsGrpDoChb" value="1" id="doVB<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="vb[<?php echo $ii; ?>][doVB]" <?php if ((int)$doVB == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="vb[<?php echo $ii; ?>][doVB]" value="<?php echo $doVB;?>"> <?php } ?> <?php } ?>\r
+      \r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/vb16.png);">vBulletin - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvailVB) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToVB_repostButton" id="rePostToVB_button" value="<?php _e('Repost to vBulletin', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php } ?>\r
+                    \r
+                    <?php  if (is_array($pMeta) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) { $wpURL = str_ireplace('/xmlrpc.php', '', $ntOpt['vbURL']);\r
+                        if (substr($wpURL, -1)=='/') $wpURL = substr($wpURL, 0, -1);  $wpURL = $wpURL."/";\r
+                        ?> <span id="pstdVB<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+          <a style="font-size: 10px;" href="<?php echo $pMeta[$ii]['pgID']; ?>" target="_blank"><?php $nType="vBulletin"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>                \r
+                \r
+                <?php if (!$isAvailVB) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your vBulletin Account to AutoPost to vBulletin</b>\r
+                <?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>vb" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> />\r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>                \r
+                </td></tr> <?php } ?>\r
+               \r
+       <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+        <td><input value="<?php echo $vbMsgTFormat ?>" type="text" name="vb[<?php echo $ii; ?>][SNAPformatT]"  style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apVBMsgTFrmt<?php echo $ii; ?>');"/><?php nxs_doShowHint("apVBMsgTFrmt".$ii); ?></td></tr>\r
+                \r
+      <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+        <td>        \r
+        <textarea cols="150" rows="1" id="vb<?php echo $ii; ?>SNAPformat" name="vb[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#vb<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apVBMsgFrmt<?php echo $ii; ?>');"><?php echo $vbMsgFormat; ?></textarea>\r
+        <?php nxs_doShowHint("apVBMsgFrmt".$ii); ?></td></tr>\r
+                <?php } \r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){  if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = '';\r
+     if (isset($pMeta['SNAPformat'])) $optMt['vbMsgFormat'] = $pMeta['SNAPformat']; \r
+     if (isset($pMeta['SNAPformatT'])) $optMt['vbMsgTFormat'] = $pMeta['SNAPformatT'];\r
+     if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];      \r
+     if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+     if (isset($pMeta['doVB'])) $optMt['doVB'] = $pMeta['doVB'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doVB'] = 0; } \r
+     if (isset($pMeta['SNAPincludeVB']) && $pMeta['SNAPincludeVB'] == '1' ) $optMt['doVB'] = 1;  \r
+     return $optMt;\r
+  }  \r
+}}\r
+if (!function_exists("nxs_rePostToVB_ajax")) {\r
+  function nxs_rePostToVB_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; $options = get_option('NS_SNAutoPoster');  \r
+    foreach ($options['vb'] as $ii=>$two) if ($ii==$_POST['nid']) {   $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['gpPageID'].$two['gpUName']==$_POST['nid']) {  \r
+      $gppo =  get_post_meta($postID, 'snapVB', true); $gppo =  maybe_unserialize($gppo);// prr($gppo);\r
+      if (is_array($gppo) && isset($gppo[$ii]) && is_array($gppo[$ii])){ $ntClInst = new nxs_snapClassVB(); $two = $ntClInst->adjMetaOpt($two, $gppo[$ii]); }\r
+      $result = nxs_doPublishToVB($postID, $two); if ($result == 200) die("Successfully sent your post to vBulletin."); else die($result);        \r
+    }    \r
+  }\r
+}  \r
+\r
+if (!function_exists("nxs_doPublishToVB")) { //## Second Function to Post to VB\r
+  function nxs_doPublishToVB($postID, $options){ global $nxs_vbCkArray, $plgn_NS_SNAutoPoster; $ntCd = 'VB'; $ntCdL = 'vb'; $ntNm = 'vBulletin';\r
+    if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+    //if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToVB',  array($postID, $options));  \r
+    $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url(); \r
+    $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));\r
+    \r
+    $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+    $logNT = '<span style="color:#000080">vBulletin</span> - '.$options['nName'];      \r
+    $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+    if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {  sleep(5);\r
+         nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$uqID); return;\r
+        }\r
+    } \r
+  \r
+      \r
+      if ($postID=='0') { echo "Testing ... <br/><br/>"; $urlToGo = home_url(); $options['vbMsgFormat'] = 'Test Message from '.$urlToGo;  $options['vbMsgTFormat'] = 'Test Link from '.$urlToGo; } \r
+        else { $post = get_post($postID); nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1')); \r
+          $options['vbMsgFormat'] = nsFormatMessage($options['vbMsgFormat'], $postID, $addParams); $options['vbMsgTFormat'] = nsFormatMessage($options['vbMsgTFormat'], $postID, $addParams);\r
+          //## MyURL - URLToGo code\r
+          if (!isset($options['urlToUse']) || trim($options['urlToUse'])=='') $myurl =  trim(get_post_meta($postID, 'snap_MYURL', true)); if ($myurl!='') $options['urlToUse'] = $myurl;\r
+          if (isset($options['urlToUse']) && trim($options['urlToUse'])!='') { $urlToGo = $options['urlToUse']; $options['useFBGURLInfo'] = true; } else $urlToGo = get_permalink($postID);      \r
+          $gOptions = $plgn_NS_SNAutoPoster->nxs_options; $addURLParams = trim($gOptions['addURLParams']);  if($addURLParams!='') $urlToGo .= (strpos($urlToGo,'?')!==false?'&':'?').$addURLParams;\r
+      }\r
+      $dusername = $options['vbUName']; //$link = urlencode($link); $desc = urlencode(substr($msg, 0, 500));      \r
+      $extInfo = ' | PostID: '.$postID." - ".(!empty($post) && is_object($post)?$post->post_title:'');\r
+      \r
+      //## Message & Format                 \r
+      if ($options['vbInclTags']=='1') { $t = wp_get_post_tags($postID); $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = (implode(', ',$tggs)); /* $tags = str_replace(' ','+',$tags); */ } else $tags = '';\r
+      $message = array('siteName'=>$blogTitle, 'tags'=>$tags);    \r
+      //## Actual Post\r
+      $ntToPost = new nxs_class_SNAP_VB(); $ret = $ntToPost->doPostToNT($options, $message);\r
+      //## Save Session\r
+      if (empty($options['vkSvC']) || serialize($nxs_vbCkArray)!=$options['vbSvC']) { global $plgn_NS_SNAutoPoster;  $gOptions = $plgn_NS_SNAutoPoster->nxs_options;\r
+        if (isset($options['ii']) && $options['ii']!=='')  { $gOptions['vb'][$options['ii']]['vbSvC'] = serialize($nxs_vbCkArray); update_option('NS_SNAutoPoster', $gOptions);  }\r
+        else foreach ($gOptions['vb'] as $ii=>$gpn) { $result = array_diff($options, $gpn); \r
+          if (!is_array($result) || count($result)<1) { $gOptions['vb'][$ii]['vbSvC'] = serialize($nxs_vbCkArray); update_option('NS_SNAutoPoster', $gOptions); break; }\r
+        }        \r
+      }\r
+      //## Process Results\r
+      if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+        if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+      } else {  // ## All Good - log it.\r
+        if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+          else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'pDate'=>date('Y-m-d H:i:s'))); nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+      }\r
+      //## Return Result\r
+      if ($ret['isPosted']=='1') return 200; else return print_r($ret, true); \r
+  }\r
+}  \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/vk.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/vk.api.php
new file mode 100644 (file)
index 0000000..06d8e2b
--- /dev/null
@@ -0,0 +1,92 @@
+<?php    \r
+//## NextScripts FriendFeed Connection Class\r
+$nxs_snapAPINts[] = array('code'=>'VK', 'lcode'=>'vk', 'name'=>'vKontakte(VK)');\r
+\r
+if (!class_exists("nxs_class_SNAP_VK")) { class nxs_class_SNAP_VK {\r
+    \r
+    var $ntCode = 'VK';\r
+    var $ntLCode = 'vk';     \r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array();\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }    \r
+    function nxs_uplImgtoVK($imgURL, $options){\r
+      $postUrl = 'https://api.vkontakte.ru/method/photos.getWallUploadServer?gid='.(str_replace('-','',$options['pgIntID'])).'&access_token='.$options['vkAppAuthToken'];\r
+      $response = wp_remote_get($postUrl); $thumbUploadUrl = $response['body'];    \r
+      if (!empty($thumbUploadUrl)) { $thumbUploadUrlObj = json_decode($thumbUploadUrl); $VKuploadUrl = $thumbUploadUrlObj->response->upload_url; }   // prr($thumbUploadUrlObj); echo "UURL=====-----";\r
+      if (!empty($VKuploadUrl)) {    \r
+        // if (stripos($VKuploadUrl, '//pu.vkontakte.ru/c')!==false) { $c = 'c'.CutFromTo($VKuploadUrl, '.ru/c', '/'); $VKuploadUrl = str_ireplace('/pu.','/'.$c.'.',str_ireplace($c.'/','',$VKuploadUrl)); }\r
+        $remImgURL = urldecode($imgURL); $urlParced = pathinfo($remImgURL); $remImgURLFilename = $urlParced['basename']; $imgData = wp_remote_get($remImgURL); $imgData = $imgData['body'];        \r
+        $tmp=array_search('uri', @array_flip(stream_get_meta_data($GLOBALS[mt_rand()]=tmpfile())));  \r
+        if (!is_writable($tmp)) return "Your temporary folder or file (file - ".$tmp.") is not writable. Can't upload image to VK";\r
+        rename($tmp, $tmp.='.png'); register_shutdown_function(create_function('', "unlink('{$tmp}');"));       \r
+        file_put_contents($tmp, $imgData); \r
+      \r
+        $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $VKuploadUrl); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r
+        global $nxs_skipSSLCheck; if ($nxs_skipSSLCheck===true) curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\r
+        \r
+        if (function_exists('curl_file_create')) { $file  = curl_file_create($tmp); curl_setopt($ch, CURLOPT_POSTFIELDS, array('photo' => $file)); } \r
+          else curl_setopt($ch, CURLOPT_POSTFIELDS, array('photo' => '@' . $tmp));\r
+\r
+        $response = curl_exec($ch); $errmsg = curl_error($ch); curl_close($ch); //prr($response);\r
+        \r
+        $uploadResultObj = json_decode($response); // prr($response); //prr($uploadResultObj);\r
+      \r
+        if (!empty($uploadResultObj->server) && !empty($uploadResultObj->photo) && !empty($uploadResultObj->hash)) {\r
+          $postUrl = 'https://api.vkontakte.ru/method/photos.saveWallPhoto?server='.$uploadResultObj->server.'&photo='.$uploadResultObj->photo.'&hash='.$uploadResultObj->hash.'&gid='.(str_replace('-','',$options['pgIntID'])).'&access_token='.$options['vkAppAuthToken'];\r
+          $response = wp_remote_get($postUrl);            \r
+          $resultObject = json_decode($response['body']); //prr($resultObject);\r
+          if (isset($resultObject) && isset($resultObject->response[0]->id)) { return $resultObject->response[0]; } else { return false; }\r
+        }\r
+      }\r
+    }\r
+    function doPostToNT($options, $message){ $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>''); global $nxs_vkCkArray; //prr($message); die();\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      if ((!isset($options['uName']) || trim($options['uPass'])=='') && (!isset($options['vkAppAuthToken']) || trim($options['vkAppAuthToken'])==''))  { $badOut['Error'] = 'Not Configured'; return $badOut; }            \r
+      $pass = (substr($options['uPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['uPass'], 5)):$options['uPass']);            \r
+      //## Format\r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['msgFrmt'], $message); $urlToGo = (!empty($message['url']))?$message['url']:'';\r
+      \r
+      $postType = $options['postType']; //$link = urlencode($link); $desc = urlencode(substr($msg, 0, 500));      \r
+  \r
+      if (isset($message['imageURL'])) $imgURL = trim(nxs_getImgfrOpt($message['imageURL'], $options['imgSize'])); else $imgURL = '';\r
+      $msgOpts = array(); $msgOpts['uid'] =  $options['vkPgID']; // if ($link!='') $msgOpts['link'] = $link;            \r
+      if (!empty($message['videoURL']) && $postType=="I") { $postType='A';  $urlToGo=$message['videoURL']; $msgOpts['vID'] = $vids[0]; }  \r
+      if ($postType=='I' && trim($imgURL)=='') $postType='T';  $msgOpts['type'] = $postType;   \r
+      if (function_exists('nxs_doPostToVK') && $postType=='A' && $urlToGo!='') { \r
+        //## Login\r
+        if (isset($options['vkSvC'])) $nxs_vkCkArray = maybe_unserialize( $options['vkSvC']); $loginError = true; \r
+        if (is_array($nxs_vkCkArray)) $loginError = nxs_doCheckVK(); if ($loginError!=false)  { \r
+           if (!empty($options['vkPh'])) { $replArr = explode(' ... ', $options['vkPhReq']); $ph = $options['vkPh'];           \r
+             $ln = strlen($replArr[0]); if (substr($ph,0,$ln)==$replArr[0]) $ph = substr($ph,$ln);           \r
+             $ln = strlen($replArr[1]); $mln = -$ln;  if (substr($ph,$mln)==$replArr[1]) $ph = substr($ph,$ln,$mln);\r
+           } else $ph = '';  $loginError = nxs_doConnectToVK($options['uName'], $pass, $ph); \r
+        }  //       prr($loginError);\r
+        if ($loginError!==false) { if (stripos($loginError, 'Phone verification required:')!==false) return $loginError; else return "ERROR - BAD USER/PASS - ".print_r($loginError, true); }\r
+        //## Post        \r
+        $msgOpts['url'] = $urlToGo; $msgOpts['urlTitle'] = $message['urlTitle']; $msgOpts['urlDesc'] = $message['urlDescr']; $msgOpts['imgURL'] = $imgURL; //prr($msgOpts);\r
+        $ret = nxs_doPostToVK($msg, $options['url'], $msgOpts);   \r
+        if (is_array($ret) && !empty($ret['code']) && $ret['code']=='OK') return array('postID'=>$ret['post_id'], 'isPosted'=>1, 'postURL'=>'http://vk.com/wall'.$ret['post_id'], 'pDate'=>date('Y-m-d H:i:s')); \r
+          else $badOut .= 'ERROR: '.print_r($ret, true);\r
+      } //prr($postType);\r
+      \r
+      if ($postType=='I') { $imgUpld = $this->nxs_uplImgtoVK($imgURL, $options); if (is_object($imgUpld)) { $imgID = $imgUpld->id; $atts[] = $imgID; } else  $badOut['Error'] .= '-=ERROR=- '.print_r($imgUpld, true); }\r
+      if ($postType!='A') { if( $options['addBackLink']=='1') $atts[] = $urlToGo;       \r
+        if (is_array($atts)) $atts = implode(',', $atts);\r
+        \r
+        $postUrl = 'https://api.vkontakte.ru/method/wall.post';\r
+        $postArr = array('owner_id'=>$options['pgIntID'], 'access_token'=>$options['vkAppAuthToken'], 'from_group'=>'1', 'message'=>$msg, 'attachment'=>$atts);\r
+        $response = wp_remote_post($postUrl, array('body' => $postArr)); \r
+        if ( is_wp_error($response) || (is_object($response) && (isset($response->errors))) || (is_array($response) && stripos($response['body'],'"error":')!==false )) { \r
+           $badOut['Error'] .= 'Error: '. print_r($response, true);\r
+        } else { $respJ = json_decode($response['body'], true);  $ret = $options['pgIntID'].'_'.$respJ['response']['post_id'];   }\r
+          \r
+      }                                \r
+      if (isset($ret) && $ret!='') return array('postID'=>$ret, 'isPosted'=>1, 'postURL'=>'http://vk.com/wall'.$ret, 'pDate'=>date('Y-m-d H:i:s'), 'err'=>$badOut['Error']);       \r
+      return $badOut;      \r
+   }    \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/vk.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/vk.php
new file mode 100644 (file)
index 0000000..0f35640
--- /dev/null
@@ -0,0 +1,376 @@
+<?php    \r
+//## NextScripts vKontakte(VK) Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'VK', 'lcode'=>'vk', 'name'=>'vKontakte(VK)');\r
+\r
+if (!class_exists("nxs_snapClassVK")) { class nxs_snapClassVK {\r
+  //#### Show Common Settings  \r
+  function showGenNTSettings($ntOpts){  global $nxs_plurl; $ntInfo = array('code'=>'VK', 'lcode'=>'vk', 'name'=>'vKontakte(VK)', 'defNName'=>'', 'tstReq' => false); ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('https://vk.com','', str_ireplace('http://vk.com','', $pbo['url'])); ?>\r
+          <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />\r
+           <?php } ?>\r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;\r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($mNTo){ $nto = array('nName'=>'', 'doVK'=>'1', 'url'=>'', 'vkAppID'=>'', 'imgUpl'=>'1', 'addBackLink'=>'1', 'vkPostType'=>'T', 'msgAFormat'=>'', 'attch'=>'1', 'vkPgID'=>'', 'vkAppAuthUser'=>'', 'msgFrmt'=>'New post has been published on %SITENAME%' ); $nto['ntInfo']= array('lcode'=>'vk'); $this->showNTSettings($mNTo, $nto, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt);\r
+    if ((int)$options['attch']==0 && (!isset($options['trPostType']) || $options['trPostType']=='')) $options['trPostType'] = 'T';  if (!isset($options['uName '])) $options['uName '] = ''; if (!isset($options['uPass'])) $options['uPass'] = ''; \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['uName'])) $options['uName'] = '';  if (!isset($options['postType'])) $options['postType'] = ''; ?>\r
+    \r
+    <div id="doVK<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>" style="background-image: url(<?php echo $nxs_plurl; ?>img/vk-bg.png);  background-position:90% 10%;">   <input type="hidden" name="apDoSVK<?php echo $ii; ?>" value="0" id="apDoSVK<?php echo $ii; ?>" />                                \r
+    <?php if ($isNew) { ?>    <input type="hidden" name="vk[<?php echo $ii; ?>][apDoVK]" value="1" id="apDoNewVK<?php echo $ii; ?>" /> <?php } ?>\r
+    \r
+     <div class="nsx_iconedTitle" style="float: right; max-width: 322px; text-align: right; background-image: url(<?php echo $nxs_plurl; ?>img/vk16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/setup-installation-vkontakte-social-networks-auto-poster-wordpress/"><?php $nType="vKontakte"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a><br/>\r
+     <span style="font-size: 10px;">Please use URL <em style="font-size: 10px; color:#CB4B16;">http://<?php echo $_SERVER["SERVER_NAME"] ?></em> and domain <em style="font-size: 10px; color:#CB4B16;"><?php echo $_SERVER["SERVER_NAME"] ?></em> in your vKontakte(VK) App</span>\r
+     \r
+     </div>\r
+    \r
+    <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="vk[<?php echo $ii; ?>][nName]" id="vknName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+    <?php echo nxs_addQTranslSel('vk', $ii, $options['qTLng']); ?>\r
+    \r
+     <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+    \r
+    \r
+    \r
+    <div style="width:100%;"><strong>vKontakte(VK) URL:</strong> </div>\r
+    <p style="font-size: 11px; margin: 0px;"><?php _e('Could be your vKontakte(VK) Profile or vKontakte(VK) Group Page', 'social-networks-auto-poster-facebook-twitter-g'); ?></p>\r
+    <input name="vk[<?php echo $ii; ?>][url]" id="apurl" style="width: 50%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['url'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+    \r
+    <div style="width:100%; margin-top: 15px; margin-bottom: 5px;"><b style="font-size: 14px;" >VK API</b> <?php _e('(It could be used for "Text" and "Image" posts)', 'social-networks-auto-poster-facebook-twitter-g'); ?></div>\r
+    \r
+    <div style="width:100%; margin-left: 15px;">\r
+    \r
+    <div style="width:100%;"><strong>vKontakte(VK) Application ID:</strong> <a href="http://vk.com/editapp?act=create" target="_blank"><?php _e('[Create VK App]', 'social-networks-auto-poster-facebook-twitter-g'); ?></a> <a href="http://vk.com/apps?act=settings" target="_blank"><?php _e('[Manage VK Apps]', 'social-networks-auto-poster-facebook-twitter-g'); ?></a> </div> \r
+    <input name="vk[<?php echo $ii; ?>][apVKAppID]" id="apVKAppID" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['vkAppID'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  \r
+    <br/>\r
+    <?php  if($options['vkAppID']=='') { ?>\r
+            <?php _e('<b>Authorize Your vKontakte(VK) Account</b>. Please click "Update Settings" to be able to Authorize your account.', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+            <?php } else { if(isset($options['vkAppAuthUser']) && $options['vkAppAuthUser']>0) { ?>\r
+            <?php _e('Your vKontakte(VK) Account has been authorized.'); ?> User ID: <?php _e(apply_filters('format_to_edit', htmlentities($options['vkAppAuthUser'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>.\r
+            <?php _e('You can', 'social-networks-auto-poster-facebook-twitter-g'); ?> Re- <?php } ?>      \r
+            <a target="_blank" href="http://api.vkontakte.ru/oauth/authorize?client_id=<?php echo $options['vkAppID'];?>&scope=offline,wall,photos,pages&redirect_uri=http://api.vkontakte.ru/blank.html&display=page&response_type=token<?php '&auth=vk&acc='.$ii;?>">Authorize Your vKontakte(VK) Account</a>                  \r
+            <?php if (!isset($options['vkAppAuthUser']) || $options['vkAppAuthUser']<1) { ?> <div class="blnkg">&lt;=== <?php _e('Authorize your account', 'social-networks-auto-poster-facebook-twitter-g'); ?> ===</div> <?php } ?>\r
+            \r
+            <div style="width:100%;"><strong>vKontakte(VK) Auth Response:</strong> </div><input name="vk[<?php echo $ii; ?>][apVKAuthResp]" style="width: 50%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['apVKAuthResp'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/><br/>\r
+            \r
+            <?php } ?>\r
+            \r
+    </div>      \r
+    \r
+    <div style="width:100%; margin-bottom: 5px;"><b style="font-size: 14px;" >NextScripts VK API</b> <?php _e('(It could be used for "Text with attached link" posts)', 'social-networks-auto-poster-facebook-twitter-g'); ?></div>\r
+    \r
+    <div style="width:100%; margin-left: 15px;">\r
+      <?php if( function_exists("nxs_doPostToVK")) { ?>    \r
+         <div style="width:100%;"><strong>vKontakte(VK) Email:</strong> </div><input name="vk[<?php echo $ii; ?>][uName]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['uName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  \r
+         <div style="width:100%;"><strong>vKontakte(VK) Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="vk[<?php echo $ii; ?>][uPass]" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['uPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['uPass'], 5)):$options['uPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />    \r
+         <?php if( isset($options['vkPhReq'])) { if (empty($options['vkPh'])) $options['vkPh'] =''; ?>     \r
+           <div style="width:100%;"><strong>vKontakte(VK) Phone Number (<?php _e(apply_filters('format_to_edit', htmlentities($options['vkPhReq'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>) :</strong> </div><input name="vk[<?php echo $ii; ?>][vkPh]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['vkPh'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /> \r
+         <?php } ?>\r
+      <?php } else { ?> **** <?php _e('Please upgrade the plugin to "PRO" get NextScripts VK API', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php } ?>\r
+    </div>\r
+    <br/>      \r
+    <div id="altFormat">\r
+      <div style="width:100%;"><strong id="altFormatText"><?php _e('Message text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="msgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('msgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div>        \r
+                \r
+         <textarea cols="150" rows="3" id="vkmsgFrmt<?php echo $ii; ?>" name="vk[<?php echo $ii; ?>][msgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#vk<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('msgFrmt<?php echo $ii; ?>');"><?php _e(apply_filters('format_to_edit', htmlentities($options['msgFrmt'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?></textarea>\r
+        \r
+        <?php nxs_doShowHint("msgFrmt".$ii); ?><br/>\r
+    </div>\r
+    <div >\r
+    <input value="1" type="checkbox" name="vk[<?php echo $ii; ?>][addBackLink]"  <?php if (isset($options['addBackLink']) && (int)$options['addBackLink'] == 1) echo "checked"; ?> /> <?php _e('Add backlink to the post', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+    </div>\r
+       <br/>\r
+      <div style="width:100%;"><strong id="altFormatText">Post Type:</strong> &lt;-- (<a id="showShAtt" onmouseout="hidePopShAtt('<?php echo $ii; ?>VKX');" onmouseover="showPopShAtt('<?php echo $ii; ?>VKX', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php _e('What\'s the difference?', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>) </div>                      \r
+<div style="margin-left: 10px;">\r
+        \r
+        <input type="radio" name="vk[<?php echo $ii; ?>][postType]" value="T" <?php if ($options['postType'] == 'T') echo 'checked="checked"'; ?> /> <?php _e('Text Post', 'social-networks-auto-poster-facebook-twitter-g'); ?> - <i><?php _e('just text message', 'social-networks-auto-poster-facebook-twitter-g'); ?></i><br/>                    \r
+        <input type="radio" name="vk[<?php echo $ii; ?>][postType]" value="I" <?php if ($options['postType'] == 'I') echo 'checked="checked"'; ?> /> <?php _e('Image Post', 'social-networks-auto-poster-facebook-twitter-g'); ?> - <i><?php _e('big image with text message', 'social-networks-auto-poster-facebook-twitter-g'); ?></i><br/>\r
+        <input type="radio"  <?php if( !function_exists("nxs_doPostToVK")) { ?> disabled="disabled" <?php } ?> name="vk[<?php echo $ii; ?>][postType]" value="A" <?php if ( !isset($options['postType']) || $options['postType'] == '' || $options['postType'] == 'A') echo 'checked="checked"'; ?> /> <span <?php if( !function_exists("nxs_doPostToVK")) { ?>style="color:#C0C0C0;"<?php } ?> ><?php _e('Text Post with "attached" link', 'social-networks-auto-poster-facebook-twitter-g'); ?></span><br/>\r
+   <?php if( function_exists("nxs_doPostToVK")) { ?>\r
+<div style="width:100%; margin-left: 15px;"><strong><?php _e('Link attachment type:', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;</strong> \r
+    <div style="margin-bottom: 5px; margin-left: 10px; "><input value="1"  id="apattchAsVid" type="checkbox" name="vk[<?php echo $ii; ?>][attchAsVid]"  <?php if (isset($options['attchAsVid']) && (int)$options['attchAsVid'] == 1) echo "checked"; ?> /> \r
+      <?php _e('<strong>If post has video use it as an attachment thumbnail.</strong> <i>Video will be used for an attachment thumbnail instead of featured image. Only Youtube is supported at this time.</i>', 'social-networks-auto-poster-facebook-twitter-g'); ?><br/>\r
+     \r
+    </div>\r
+     <strong><?php _e('Attachment Text Format:', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong><br/> \r
+      <input value="1"  id="apVKMsgAFrmtA<?php echo $ii; ?>" <?php if (trim($options['msgAFormat'])=='') echo "checked"; ?> onchange="if (jQuery(this).is(':checked')) { jQuery('#apVKMsgAFrmtDiv<?php echo $ii; ?>').hide(); jQuery('#apVKMsgAFrmt<?php echo $ii; ?>').val(''); }else jQuery('#apVKMsgAFrmtDiv<?php echo $ii; ?>').show();" type="checkbox" name="vk[<?php echo $ii; ?>][msgAFormat]"/> <strong><?php _e('Auto', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong>\r
+      <i> - <?php _e('Recommended. Info from SEO Plugins will be used, then post excerpt, then post text', 'social-networks-auto-poster-facebook-twitter-g'); ?> </i><br/>\r
+      <div id="apVKMsgAFrmtDiv<?php echo $ii; ?>" style="<?php if ($options['msgAFormat']=='') echo "display:none;"; ?>" >&nbsp;&nbsp;&nbsp; <?php _e('Set your own format:', 'social-networks-auto-poster-facebook-twitter-g'); ?><input name="vk[<?php echo $ii; ?>][msgAFormat]" id="apVKMsgAFrmt<?php echo $ii; ?>" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['msgAFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/></div>\r
+</div><br/>\r
+\r
+<?php } ?>\r
+   </div><br/>  \r
+<div class="popShAtt" style="z-index: 9999" id="popShAtt<?php echo $ii; ?>VKX"><h3>vKontakte(VK) Post Types</h3><img src="<?php echo $nxs_plurl; ?>img/vkPostTypesDiff6.png" width="600" height="257" alt="vKontakte(VK) Post Types"/></div>\r
+\r
+              \r
+            <?php if ($options['vkPgID']!='') {?><div style="width:100%;"><strong>Your vKontakte(VK) Page ID:</strong> <?php _e(apply_filters('format_to_edit', htmlentities($options['vkPgID'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?> </div><?php } ?>\r
+            \r
+            <?php  if(isset($options['vkAppAuthUser']) && $options['vkAppAuthUser']>0) { ?>\r
+            \r
+            <br/><br/><b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('VK','<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>         \r
+            <?php }?>\r
+            \r
+            </div>\r
+      <?php /* ######################## Advanced Tab ####################### */ ?>\r
+   <?php if (!$isNew) { ?>   <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+   <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); \r
+      nxs_showRepostSettings($nt, $ii, $options); ?>\r
+            \r
+            \r
+    </div>  <?php } ?> <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div>\r
+            \r
+          </div>        \r
+        <?php\r
+      \r
+  } \r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = 'VK'; $lcode = 'vk'; \r
+    foreach ($post as $ii => $pval){ \r
+      if (isset($pval['apVKAppID']) && $pval['apVKAppID']!='') { if (!isset($options[$ii])) $options[$ii] = array();\r
+        if (isset($pval['apDoVK']))         $options[$ii]['doVK'] = $pval['apDoVK']; else $options[$ii]['doVK'] = 0;\r
+        if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);\r
+        if (isset($pval['apVKAppID']))      $options[$ii]['vkAppID'] = trim($pval['apVKAppID']);                \r
+        \r
+        if (isset($pval['uName']))      $options[$ii]['uName'] = trim($pval['uName']);                                \r
+        if (isset($pval['uPass']))    $options[$ii]['uPass'] = 'n5g9a'.nsx_doEncode($pval['uPass']); else $options[$ii]['uPass'] = '';   \r
+        if (isset($pval['vkPh']))      $options[$ii]['vkPh'] = trim($pval['vkPh']);               \r
+        \r
+        \r
+        if (isset($pval['apVKAuthResp']))  {   $options[$ii]['apVKAuthResp'] = trim($pval['apVKAuthResp']); \r
+          $options[$ii]['vkAppAuthToken'] = trim( CutFromTo($pval['apVKAuthResp'].'&', 'access_token=','&')); \r
+          $options[$ii]['vkAppAuthUser'] = trim( CutFromTo($pval['apVKAuthResp']."&", 'user_id=','&')); \r
+          $hdrsArr = nxs_getVKHeaders($pval['url']);\r
+          $response = wp_remote_get($pval['url'], array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 0,  'headers' => $hdrsArr)); \r
+          if (is_wp_error($response)) { echo "ERROR: <br/>"; prr($response); return;} $contents = $response['body']; $contents = utf8_decode($contents);    \r
+          if (stripos($contents, '"group_id":')!==false) { $options[$ii]['pgIntID'] =  '-'.CutFromTo($contents, '"group_id":', ','); $type='all'; }  \r
+          if (stripos($contents, '"public_id":')!==false) { $options[$ii]['pgIntID'] =  '-'.CutFromTo($contents, '"public_id":', ','); $type='all'; }  \r
+          if (stripos($contents, '"user_id":')!==false) {   $options[$ii]['pgIntID'] =  CutFromTo($contents, '"user_id":', ','); $type='own'; }  \r
+        }\r
+        \r
+        \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+        \r
+        if (isset($pval['postType']))     $options[$ii]['postType'] = trim($pval['postType']);\r
+        if (isset($pval['attch']))      $options[$ii]['attch'] = $pval['attch']; else $options[$ii]['attch'] = 0;\r
+        if (isset($pval['attchAsVid'])) $options[$ii]['attchAsVid'] = $pval['attchAsVid']; else $options[$ii]['attchAsVid'] = 0;\r
+        \r
+        if (isset($pval['apVKImgUpl']))     $options[$ii]['imgUpl'] = $pval['apVKImgUpl']; else $options[$ii]['imgUpl'] = 0;\r
+        if (isset($pval['addBackLink']))     $options[$ii]['addBackLink'] = $pval['addBackLink']; else $options[$ii]['addBackLink'] = 0;\r
+        \r
+        if (isset($pval['msgFrmt']))    $options[$ii]['msgFrmt'] = trim($pval['msgFrmt']); \r
+        if (isset($pval['msgAFormat']))    $options[$ii]['msgAFormat'] = trim($pval['msgAFormat']); \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+                \r
+        if (isset($pval['url']))  {  $options[$ii]['url'] = trim($pval['url']);   if ( substr($options[$ii]['url'], 0, 4)!='http' )  $options[$ii]['url'] = 'http://'.$options[$ii]['url'];\r
+          $vkPgID = $options[$ii]['url']; if (substr($vkPgID, -1)=='/') $vkPgID = substr($vkPgID, 0, -1);  $vkPgID = substr(strrchr($vkPgID, "/"), 1); \r
+          if (strpos($vkPgID, '?')!==false) $vkPgID = substr($vkPgID, 0, strpos($vkPgID, '?')); \r
+          $options[$ii]['vkPgID'] = $vkPgID; //echo $vkPgID;\r
+          if (strpos($options[$ii]['url'], '?')!==false) $options[$ii]['url'] = substr($options[$ii]['url'], 0, strpos($options[$ii]['url'], '?'));// prr($pval); prr($options[$ii]); // die();\r
+        }                  \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  } \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'vk'; $ntU = 'VK';\r
+    foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapVK', true));  if (is_array($pMeta)) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]); \r
+        if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = ''; if (empty($ntOpt['urlToUse'])) $ntOpt['urlToUse'] = '';\r
+        $doVK = $ntOpt['doVK'] && (is_array($pMeta) || $ntOpt['catSel']!='1');  $imgToUse = $ntOpt['imgToUse'];  $urlToUse = $ntOpt['urlToUse']; \r
+        $isAvailVK =  $ntOpt['url']!='' && $ntOpt['vkAppID']!='' || $ntOpt['uPass']!=''; $isAttachVK = $ntOpt['attch']; $msgFrmt = htmlentities($ntOpt['msgFrmt'], ENT_COMPAT, "UTF-8"); $postType = $ntOpt['postType']; \r
+      ?>\r
+      <tr><th style="text-align:left;" colspan="2"> \r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>      \r
+        <?php if ($isAvailVK) { ?><input class="nxsGrpDoChb" value="1" id="doVK<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="vk[<?php echo $ii; ?>][doVK]" <?php if ((int)$doVK == 1) echo 'checked="checked" title="def"';  ?> /> \r
+        <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="vk[<?php echo $ii; ?>][doVK]" value="<?php echo $doVK;?>"> <?php } ?> <?php } ?>      \r
+        <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/vk16.png);">vKontakte(VK) - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th>\r
+        <td><?php //## Only show RePost button if the post is "published"\r
+        if ($post->post_status == "publish" && $isAvailVK) { ?>\r
+          <input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToVK_repostButton" id="rePostToVK_button" value="<?php _e('Repost to vKontakte(VK)', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+        <?php  } ?>\r
+        <?php  if (is_array($pMeta) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID'])) { ?> <span id="pstdVK<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+             <a style="font-size: 10px;" href="http://vk.com/wall<?php echo $pMeta[$ii]['pgID']; ?>" target="_blank"><?php $nType="vKontakte(VK)"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+           </span>\r
+        <?php } ?>\r
+        </td></tr>\r
+          <?php if (!$isAvailVK) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup and Authorize your vKontakte(VK) Account to AutoPost to vKontakte(VK)</b>\r
+          <?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>vk" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> /> \r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+                </td></tr> <?php } ?>\r
+        <tr id="altFormat1" style=""><th scope="row" valign="top" class="nxsTHRow"><?php _e('Message Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+          <td>          \r
+          <textarea cols="150" rows="1" id="vk<?php echo $ii; ?>SNAPformat" name="vk[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#vk<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apVKTMsgFrmt<?php echo $ii; ?>');"><?php echo $msgFrmt; ?></textarea>\r
+          \r
+          <?php nxs_doShowHint("apVKTMsgFrmt".$ii); ?>\r
+            <br/><div ><input value="0" type="hidden" name="vk[<?php echo $ii; ?>][addBackLink]" />\r
+              <input value="1" type="checkbox" name="vk[<?php echo $ii; ?>][addBackLink]"  <?php if (isset($ntOpt['addBackLink']) && (int)$ntOpt['addBackLink'] == 1) echo "checked"; ?> /> <?php _e('Add backlink to the post', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+            </div>\r
+        </td></tr>\r
+        <tr><th scope="row" style="text-align:right; width:150px; vertical-align:top; padding-top: 0px; padding-right:10px;"> <?php _e('Post Type:', 'social-networks-auto-poster-facebook-twitter-g') ?> <br/>\r
+          (<a id="showShAtt" style="font-weight: normal" onmouseout="hidePopShAtt('<?php echo $ii; ?>VKX');" onmouseover="showPopShAtt('<?php echo $ii; ?>VKX', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php _e('What\'s the difference?', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</th><td>     \r
+          <input type="radio" name="vk[<?php echo $ii; ?>][PostType]" value="T" <?php if ($postType == 'T') echo 'checked="checked"'; ?> /> <?php _e('Text Post', 'social-networks-auto-poster-facebook-twitter-g') ?> - <i><?php _e('just text message', 'social-networks-auto-poster-facebook-twitter-g') ?></i><br/>       \r
+          <input type="radio" name="vk[<?php echo $ii; ?>][PostType]" value="I" <?php if ($postType == 'I') echo 'checked="checked"'; ?> /> <?php _e('Image Post', 'social-networks-auto-poster-facebook-twitter-g') ?> - <i><?php _e('big image with text message', 'social-networks-auto-poster-facebook-twitter-g') ?></i>       \r
+          <?php if( function_exists("nxs_doPostToVK")) { ?> <br/> \r
+            <input type="radio" name="vk[<?php echo $ii; ?>][PostType]" value="A" <?php if ( !isset($postType) || $postType == '' || $postType == 'A') echo 'checked="checked"'; ?> /> <?php _e('Text Post with "attached" blogpost', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+          <?php } ?><br/><div class="popShAtt" id="popShAtt<?php echo $ii; ?>VKX"><h3>vKontakte(VK) <?php _e('Post Types', 'social-networks-auto-poster-facebook-twitter-g') ?></h3><img src="<?php echo $nxs_plurl; ?>img/vkPostTypesDiff6.png" width="600" height="257" alt="<?php _e('Post Types', 'social-networks-auto-poster-facebook-twitter-g') ?>"/></div>\r
+        </td></tr>\r
+        \r
+        <?php /* ## Select Image & URL ## */ nxs_showImgToUseDlg($nt, $ii, $imgToUse); nxs_showURLToUseDlg($nt, $ii, $urlToUse); ?>  \r
+        <?php } \r
+    }\r
+      \r
+  }\r
+  \r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = '';\r
+     if (isset($pMeta['SNAPformat'])) $optMt['msgFrmt'] = $pMeta['SNAPformat'];    \r
+     if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse']; if (isset($pMeta['urlToUse'])) $optMt['urlToUse'] = $pMeta['urlToUse']; \r
+     if (isset($pMeta['AttachPost'])) $optMt['attch'] = ($pMeta['AttachPost'] != '')?$pMeta['AttachPost']:0; else { if (isset($pMeta['SNAPformat'])) $optMt['attch'] = 0; } \r
+     if (isset($pMeta['addBackLink'])) $optMt['addBackLink'] = ($pMeta['addBackLink'] != '')?$pMeta['addBackLink']:0; else { if (isset($pMeta['SNAPformat'])) $optMt['addBackLink'] = 0; } \r
+     if (isset($pMeta['PostType'])) $optMt['postType'] = ($pMeta['PostType'] != '')?$pMeta['PostType']:0; else { if (isset($pMeta['SNAPformat'])) $optMt['postType'] = 'T'; } \r
+     if (isset($pMeta['doVK'])) $optMt['doVK'] = $pMeta['doVK'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doVK'] = 0; } \r
+     if (isset($pMeta['SNAPincludeVK']) && $pMeta['SNAPincludeVK'] == '1' ) $optMt['doVK'] = 1;\r
+     return $optMt;\r
+  }\r
+}}\r
+\r
+if (!function_exists("nxs_rePostToVK_ajax")) { function nxs_rePostToVK_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; // $result = nsPublishTo($id, 'VK', true);   \r
+    $options = get_option('NS_SNAutoPoster');  foreach ($options['vk'] as $ii=>$nto) if ($ii==$_POST['nid']) {  $nto['ii'] = $ii; $nto['pType'] = 'aj';\r
+      $ntpo =  get_post_meta($postID, 'snapVK', true); /* echo $postID."|"; echo $fbpo; */ $ntpo =  maybe_unserialize($ntpo); // prr($ntpo); \r
+      if (is_array($ntpo) && isset($ntpo[$ii]) && is_array($ntpo[$ii]) ){ $ntClInst = new nxs_snapClassVK(); $nto = $ntClInst->adjMetaOpt($nto, $ntpo[$ii]); } //prr($nto);\r
+      $result = nxs_doPublishToVK($postID, $nto); if ($result == 200) die("Successfully sent your post to vKontakte(VK)."); else die($result);\r
+    }    \r
+  }\r
+}\r
+\r
+if (!function_exists("nxs_getVKHeaders")) {  function nxs_getVKHeaders($ref, $post=false, $aj=false){ $hdrsArr = array(); \r
+ $hdrsArr['Cache-Control']='no-cache'; $hdrsArr['Connection']='keep-alive'; $hdrsArr['Referer']=$ref;\r
+ $hdrsArr['User-Agent']='Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.45 Safari/537.17';\r
+ if($post===true) $hdrsArr['Content-Type']='application/x-www-form-urlencoded'; \r
+ if($aj===true) $hdrsArr['X-Requested-With']='XMLHttpRequest'; \r
+ $hdrsArr['Accept']='text/html, application/xhtml+xml, */*'; $hdrsArr['DNT']='1';\r
+ if (function_exists('gzdeflate')) $hdrsArr['Accept-Encoding']='gzip,deflate'; $hdrsArr['Accept-Language']='en-US,en;q=0.8'; $hdrsArr['Accept-Charset']='ISO-8859-1,utf-8;q=0.7,*;q=0.3'; return $hdrsArr;\r
+}}\r
+\r
+\r
+\r
+if (!function_exists("nxs_doPublishToVK")) { //## Second Function to Post to VK\r
+  function nxs_doPublishToVK($postID, $options){ global $ShownAds, $nxs_vkCkArray; $ntCd = 'VK'; $ntCdL = 'vk'; $ntNm = 'vKontakte(VK)'; $vidURL = ''; $imgVURL = ''; $dsc = ''; $lng = '';\r
+      if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+      //if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToVK',  array($postID, $options));\r
+      $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));\r
+      if (empty($options['imgToUse'])) $options['imgToUse'] = ''; if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url(); \r
+      \r
+      $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+      $logNT = '<span style="color:#000080">vKontakte</span> - '.$options['nName'];      \r
+      $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+      if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') { \r
+         nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$options['pType']); return;\r
+        }\r
+      }\r
+      \r
+      if ($postID=='0') { echo "Testing ... <br/><br/>"; $urlToGo = home_url(); $msg = 'Test Link from '.$urlToGo; } else { $post = get_post($postID); if(!$post) return;\r
+        $options['msgFrmt'] = nxs_decodeEntitiesFull(strip_tags(nsFormatMessage($options['msgFrmt'], $postID, $addParams))); \r
+        //## MyURL - URLToGo code\r
+        $options = nxs_getURL($options, $postID, $addParams); $urlToGo = $options['urlToUse'];\r
+        nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));\r
+      }       \r
+      $extInfo = ' | PostID: '.$postID." - ".(is_object($post)?$post->post_title:'').' |'.$options['pType'];    \r
+      //## Message & Format                 \r
+      if (trim($options['imgToUse'])!='') $imgURL = $options['imgToUse']; else $imgURL = nxs_getPostImage($postID, 'full'); if (preg_match("/noImg.\.png/i", $imgURL)) $imgURL = '';       \r
+      \r
+      if (function_exists('nxs_doPostToVK')) { $vids = nsFindVidsInPost($post); if (count($vids)>0) {        \r
+          if (strlen($vids[0])==11) { $vidURL = 'http://www.youtube.com/watch?v='.$vids[0]; $imgURL = 'http://img.youtube.com/vi/'.$vids[0].'/maxresdefault.jpg'; } \r
+          if (strlen($vids[0])==8) { $vidURL = 'https://secure.vimeo.com/moogaloop.swf?clip_id='.$vids[0].'&autoplay=1';\r
+            //$mssg['source'] = 'http://player.vimeo.com/video/'.$vids[0]; \r
+            $apiURL = "http://vimeo.com/api/v2/video/".$vids[0].".json?callback=showThumb"; $json = wp_remote_get($apiURL);\r
+            if (!is_wp_error($json)) { $json = $json['body']; $json = str_replace('showThumb(','',$json); $json = str_replace('])',']',$json);  $json = json_decode($json, true); $imgVURL = $json[0]['thumbnail_large']; }           \r
+          }\r
+        }      \r
+      }\r
+      if (!empty($options['attchAsVid']) && $options['attchAsVid']=='1' && trim($imgVURL)!='') $imgURL = $imgVURL; \r
+      \r
+      if ($options['postType']=='A'){\r
+        if (trim($options['msgAFormat'])!='') {$dsc = nsFormatMessage($options['msgAFormat'], $postID, $addParams);} else { \r
+          if (function_exists('aioseop_mrt_fix_meta') && $dsc=='')  $dsc = trim(get_post_meta($postID, '_aioseop_description', true)); \r
+          if (function_exists('wpseo_admin_init') && $dsc=='') $dsc = trim(get_post_meta($postID, '_yoast_wpseo_opengraph-description', true));  \r
+          if (function_exists('wpseo_admin_init') && $dsc=='') $dsc = trim(get_post_meta($postID, '_yoast_wpseo_metadesc', true));      \r
+          if (is_object($post) && $dsc=='') $dsc = trim(apply_filters('the_content', nxs_doQTrans($post->post_excerpt, $lng)));  if ($dsc=='') $dsc = trim(nxs_doQTrans($post->post_excerpt, $lng)); \r
+          if (is_object($post) && $dsc=='') $dsc = trim(apply_filters('the_content', nxs_doQTrans($post->post_content, $lng)));  if ($dsc=='') $dsc = trim(nxs_doQTrans($post->post_content, $lng));  \r
+          if (is_object($post) && $dsc=='') $dsc = get_bloginfo('description'); \r
+        }  $dsc = strip_tags($dsc); $dsc = nxs_decodeEntitiesFull($dsc); $dsc = nsTrnc($dsc, 900, ' ');\r
+      } else $dsc = '';\r
+      \r
+      $message = array('siteName'=>$blogTitle, 'url'=>$urlToGo, 'imageURL'=>$imgURL, 'videoURL'=>$vidURL, 'urlTitle'=>nxs_decodeEntitiesFull(nxs_doQTrans($post->post_title, $lng)), 'urlDescr'=>$dsc);    \r
+      //## Actual Post\r
+      $ntToPost = new nxs_class_SNAP_VK(); $ret = $ntToPost->doPostToNT($options, $message);\r
+      //## Check Phone Req Return            \r
+      if ( is_string($ret) && stripos($ret, 'Phone verification required:')!==false) {  global $plgn_NS_SNAutoPoster;  $gOptions = $plgn_NS_SNAutoPoster->nxs_options;\r
+        $phtext = str_ireplace('Phone verification required: ','',$ret); $ret .= ". Please refresh/reload the SNAP settings page and enter your phone.";\r
+        $gOptions['vk'][$ii]['vkPhReq'] = $phtext; update_option('NS_SNAutoPoster', $gOptions);            \r
+        if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true)." - BAD USER/PASS", $extInfo); return " -= BAD USER/PASS - Phone verification required =- ";\r
+      }       \r
+      //## Save Session\r
+      if (empty($options['vkSvC']) || serialize($nxs_vkCkArray)!=$options['vkSvC']) { global $plgn_NS_SNAutoPoster;  $gOptions = $plgn_NS_SNAutoPoster->nxs_options;\r
+          if (isset($options['ii']) && $options['ii']!=='')  { $gOptions['vk'][$options['ii']]['vkSvC'] = serialize($nxs_vkCkArray); update_option('NS_SNAutoPoster', $gOptions);  }\r
+          else foreach ($gOptions['vk'] as $ii=>$gpn) { $result = array_diff($options, $gpn); \r
+            if (!is_array($result) || count($result)<1) { $gOptions['vk'][$ii]['vkSvC'] = serialize($nxs_vkCkArray); update_option('NS_SNAutoPoster', $gOptions); break; }\r
+          }        \r
+      } \r
+      //## Process Results\r
+      if (is_array($ret) && !empty($ret['err'])) nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+      if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+        if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+      } else {  // ## All Good - log it.\r
+        if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+          else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'pDate'=>date('Y-m-d H:i:s'))); \r
+           $extInfo .= ' | <a href="'.$ret['postURL'].'" target="_blank">Post Link</a>'; nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+      }\r
+      //## Return Result\r
+      if ($ret['isPosted']=='1') return 200; else return print_r($ret, true); \r
+  }\r
+}       \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/wp.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/wp.api.php
new file mode 100644 (file)
index 0000000..adf1a6d
--- /dev/null
@@ -0,0 +1,75 @@
+<?php    \r
+//## NextScripts FriendFeed Connection Class\r
+$nxs_snapAPINts[] = array('code'=>'WP', 'lcode'=>'wp', 'name'=>'WP Based Blog');\r
+\r
+if (!class_exists("nxs_class_SNAP_WP")) { class nxs_class_SNAP_WP {\r
+    \r
+    var $ntCode = 'WP';\r
+    var $ntLCode = 'wp';     \r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array();\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }    \r
+    function nxs_getLJHeaders($up){ $hdrsArr = array(); \r
+      $hdrsArr['Cache-Control']='no-cache'; $hdrsArr['Connection']='keep-alive'; \r
+      $hdrsArr['User-Agent']='SNAP for Wordpress; Ver '.NextScripts_SNAP_Version;\r
+      $hdrsArr['Accept']='text/html, application/xhtml+xml, */*'; $hdrsArr['DNT']='1';\r
+      $hdrsArr['Authorization'] = 'Basic ' . base64_encode("$up");\r
+      if (function_exists('gzdeflate')) $hdrsArr['Accept-Encoding']='gzip,deflate'; $hdrsArr['Accept-Language']='en-US,en;q=0.8'; $hdrsArr['Accept-Charset']='ISO-8859-1,utf-8;q=0.7,*;q=0.3'; return $hdrsArr;\r
+    }\r
+    function doPostToNT($options, $message){ $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>'');\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['wpUName']) || trim($options['wpPass'])=='') { $badOut['Error'] = 'Not Configured'; return $badOut; }            \r
+      $pass = substr($options['wpPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['wpPass'], 5)):$options['wpPass'];      \r
+      if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      //## Format\r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['wpMsgFormat'], $message); \r
+      if (!empty($message['pTitle'])) $msgT = $message['pTitle']; else $msgT = nxs_doFormatMsg($options['wpMsgTFormat'], $message);      \r
+      if (isset($message['imageURL'])) $imgURL = trim(nxs_getImgfrOpt($message['imageURL'], $options['imgSize'])); else $imgURL = '';\r
+      $link = urlencode($message['url']); $ext = substr($msg, 0, 1000);      \r
+      //## Fix missing xmlrpc.php\r
+      if (substr($options['wpURL'], -1)=='/') $options['wpURL'] = substr($options['wpURL'], 0, -1); if (substr($options['wpURL'], -10)!='xmlrpc.php') $options['wpURL'] .= "/xmlrpc.php";     \r
+      //## Post   \r
+      require_once ('apis/xmlrpc-client.php'); $nxsToWPclient = new NXS_XMLRPC_Client($options['wpURL']); $nxsToWPclient->debug = false;\r
+      if ($imgURL!=='' && stripos($imgURL, 'http')!==false) {      \r
+        // $handle = fopen($imgURL, "rb"); $filedata = ''; while (!feof($handle)) {$filedata .= fread($handle, 8192);} fclose($handle);\r
+        $filedata = wp_remote_get($imgURL); if (! is_wp_error($filedata) ) $filedata = $filedata['body']; // echo "AWC?";\r
+        $data = array('name'  => 'image-'.$message['orID'].'.jpg', 'type'  => 'image/jpg', 'bits'  => new NXS_XMLRPC_Base64($filedata), true); \r
+        $status = $nxsToWPclient->query('metaWeblog.newMediaObject', $message['orID'], $options['wpUName'], $pass, $data);  $imgResp = $nxsToWPclient->getResponse();  $gid = $imgResp['id'];\r
+      } else $gid = '';\r
+      \r
+      $params = array(0, $options['wpUName'], $pass, array('software_version')); \r
+      if (!$nxsToWPclient->query('wp.getOptions', $params)) { $ret = 'Something went wrong - '.$nxsToWPclient->getErrorCode().' : '.$nxsToWPclient->getErrorMessage();} else $ret = 'OK';      \r
+      $rwpOpt = $nxsToWPclient->getResponse(); if (!empty($rwpOpt['software_version'])) { $rwpOpt = $rwpOpt['software_version']['value']; $rwpOpt = floatval($rwpOpt); } else $rwpOpt = 0; //prr($rwpOpt);prr($nxsToWPclient);\r
+      //## MAIN Post\r
+      if ($rwpOpt==0) { \r
+        $errMsg = $nxsToWPclient->getErrorMessage(); if ($errMsg!='') $ret = $errMsg; else  $ret = 'XMLRPC is not found or not active. WP admin - Settings - Writing - Enable XML-RPC'; \r
+      } else if ($rwpOpt<3.0)  $ret = 'XMLRPC is too OLD - '.$rwpOpt.' You need at least 3.0'; else {\r
+       \r
+        if ($rwpOpt>3.3){\r
+          $nxsToWPContent = array('title'=>$msgT, 'description'=>$msg, 'post_status'=>'draft', 'mt_excerpt'=>$ext, 'mt_allow_comments'=>1, 'mt_allow_pings'=>1, 'post_type'=>'post', 'mt_keywords'=>$message['tags'], 'categories'=>$message['cats'], 'custom_fields' =>  '');\r
+          $params = array(0, $options['wpUName'], $pass, $nxsToWPContent, true);\r
+          if (!$nxsToWPclient->query('metaWeblog.newPost', $params)) { $ret = 'Something went wrong - '.$nxsToWPclient->getErrorCode().' : '.$nxsToWPclient->getErrorMessage();} else $ret = 'OK';\r
+          $pid = $nxsToWPclient->getResponse();  \r
+       \r
+          if ($gid!='') {      \r
+            $nxsToWPContent = array('post_thumbnail'=>$gid);  $params = array(0, $options['wpUName'], $pass, $pid, $nxsToWPContent, true);      \r
+            if (!$nxsToWPclient->query('wp.editPost', $params)) { $ret = 'Something went wrong - '.$nxsToWPclient->getErrorCode().' : '.$nxsToWPclient->getErrorMessage();} else $ret = 'OK';\r
+          }\r
+          $nxsToWPContent = array('post_status'=>'publish');  $params = array(0, $options['wpUName'], $pass, $pid, $nxsToWPContent, true);      \r
+          if (!$nxsToWPclient->query('wp.editPost', $params)) { $ret = 'Something went wrong - '.$nxsToWPclient->getErrorCode().' : '.$nxsToWPclient->getErrorMessage();} else $ret = 'OK';\r
+        } else {\r
+          $nxsToWPContent = array('title'=>$msgT, 'description'=>$msg, 'post_status'=>'publish', 'mt_allow_comments'=>1, 'mt_allow_pings'=>1, 'post_type'=>'post', 'mt_keywords'=>$message['tags'], 'categories'=>$message['cats'], 'custom_fields' => '');\r
+          $params = array(0, $options['wpUName'], $pass, $nxsToWPContent, true);\r
+          if (!$nxsToWPclient->query('metaWeblog.newPost', $params)) { $ret = 'Something went wrong - '.$nxsToWPclient->getErrorCode().' : '.$nxsToWPclient->getErrorMessage();} else $ret = 'OK';\r
+          $pid = $nxsToWPclient->getResponse();  \r
+        }\r
+      }       \r
+      if ($ret!='OK') $badOut['Error'] .= '-=ERROR=- '.print_r($ret, true); else { \r
+        $wpURL = str_ireplace('/xmlrpc.php','',$options['wpURL']); if(substr($wpURL, -1)=='/') $wpURL=substr($wpURL, 0, -1); $wpURL .= '/?p='.$pid; return array('postID'=>$pid, 'isPosted'=>1, 'postURL'=>$wpURL, 'pDate'=>date('Y-m-d H:i:s'));\r
+      } return $badOut;      \r
+   }    \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/wp.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/wp.php
new file mode 100644 (file)
index 0000000..7463426
--- /dev/null
@@ -0,0 +1,247 @@
+<?php    \r
+//## NextScripts Facebook Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'WP', 'lcode'=>'wp', 'name'=>'WP Based Blog');\r
+\r
+if (!class_exists("nxs_snapClassWP")) { class nxs_snapClassWP {\r
+  //#### Show Common Settings\r
+  function showGenNTSettings($ntOpts){  global $nxs_plurl; $ntInfo = array('code'=>'WP', 'lcode'=>'wp', 'name'=>'WP Based Blog', 'defNName'=>'dlUName', 'tstReq' => false); ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('/xmlrpc.php','', str_ireplace('http://','', str_ireplace('https://','', $pbo['wpURL']))); ?>\r
+          <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />\r
+           <?php } ?>\r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;\r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php \r
+  }   \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($mgpo){ $options = array('nName'=>'', 'doWP'=>'1', 'wpUName'=>'', 'wpPageID'=>'', 'wpAttch'=>'', 'wpPass'=>'', 'wpURL'=>''); $options['ntInfo']= array('lcode'=>'wp'); $this->showNTSettings($mgpo, $options, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){ global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = '';  ?>\r
+            <div id="doWP<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">     <input type="hidden" name="apDoSWP<?php echo $ii; ?>" value="0" id="apDoSWP<?php echo $ii; ?>" />\r
+            \r
+            <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/wp16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/setup-installation-wp-based-social-networks-auto-poster-wordpress/"><?php $nType="Wordpress"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+            \r
+            <?php if ($isNew){ ?> <br/>You can setup any Wordpress based blog with activated XML-RPC support (WP Admin->Settimgs->Writing->Remote Publishing->Check XML-RPC). Wordpress.com and Blog.com supported as well.<br/><br/> <?php } ?> \r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="wp[<?php echo $ii; ?>][nName]" id="wpnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel('wp', $ii, $options['qTLng']); ?> \r
+            \r
+             <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+    \r
+            \r
+            <div style="width:100%;"><strong>XMLRPC URL:</strong> </div><input name="wp[<?php echo $ii; ?>][apWPURL]" id="apWPURL" style="width: 50%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['wpURL'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+            <p style="font-size: 11px; margin: 0px;">Usually its a URL of your Wordpress installation with /xmlrpc.php at the end.<br/> Please use <b style="color: #005800;">https://YourUserName.wordpress.com/xmlrpc.php</b> (replace YourUserName with your user name - for example <i style="color: #005800;">https://nextscripts.wordpress.com/xmlrpc.php</i>) for Wordpress.com blogs. <br/> Please  use <b style="color: #005800;">http://YourUserName.blog.com/xmlrpc.php</b> (replace YourUserName with your user name - for example <i style="color: #005800;">http://nextscripts.blog.com/xmlrpc.php</i> for Blog.com blogs</p>\r
+            \r
+            <div style="width:100%;"><br/><strong>Blog Username:</strong> </div><input name="wp[<?php echo $ii; ?>][apWPUName]" id="apWPUName" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['wpUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+            <div style="width:100%;"><strong>Blog Password:</strong> </div><input name="wp[<?php echo $ii; ?>][apWPPass]" id="apWPPass" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['wpPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['wpPass'], 5)):$options['wpPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>                \r
+            \r
+            <?php if ($isNew) { ?> <input type="hidden" name="wp[<?php echo $ii; ?>][apDoWP]" value="1" id="apDoNewWP<?php echo $ii; ?>" /> <?php } ?>\r
+            \r
+            <br/>\r
+              \r
+            <div id="altFormat" style="">\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong>               \r
+(<a href="#" id="apWPMsgTFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apWPMsgTFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)              \r
+              </div>\r
+  <input name="wp[<?php echo $ii; ?>][apWPMsgTFrmt]" id="apWPMsgTFrmt" style="width: 50%;"  onfocus="mxs_showFrmtInfo('apWPMsgTFrmt<?php echo $ii; ?>');"  value="<?php if ($isNew) echo "%TITLE%"; else _e(apply_filters('format_to_edit', htmlentities($options['wpMsgTFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?>" /> <?php nxs_doShowHint("apWPMsgTFrmt".$ii); ?>\r
+  \r
+            </div>            \r
+            <div id="altFormat" style="">\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong>               \r
+              (<a href="#" id="apWPMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apWPMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)\r
+              </div>\r
+              \r
+    \r
+  <textarea cols="150" rows="3" id="wp<?php echo $ii; ?>SNAPformat" name="wp[<?php echo $ii; ?>][apWPMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#wp<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apWPMsgFrmt<?php echo $ii; ?>');"><?php if ($isNew) echo "%EXCERPT%"; else _e(apply_filters('format_to_edit', htmlentities($options['wpMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea>\r
+  <?php nxs_doShowHint("apWPMsgFrmt".$ii); ?>\r
+  \r
+            </div><br/>    \r
+            \r
+            <?php if ($options['wpPass']!='') { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('WP', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>      \r
+               \r
+            <?php } \r
+            \r
+            ?></div>\r
+            <?php /* ######################## Advanced Tab ####################### */ ?>\r
+  <?php if (!$isNew) { ?>  <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+    <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); \r
+      nxs_showRepostSettings($nt, $ii, $options); ?>\r
+            \r
+            \r
+    </div>  <?php } ?> <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div></div><?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = 'WP'; $lcode = 'wp'; \r
+    foreach ($post as $ii => $pval){ \r
+      if (isset($pval['apWPUName']) && $pval['apWPUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();\r
+        if (isset($pval['apWPURL']))   $options[$ii]['wpURL'] = trim($pval['apWPURL']);   if ( substr($options[$ii]['wpURL'], 0, 4)!='http' )  $options[$ii]['wpURL'] = 'http://'.$options[$ii]['wpURL'];\r
+        if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);\r
+        if (isset($pval['apWPUName']))   $options[$ii]['wpUName'] = trim($pval['apWPUName']);\r
+        if (isset($pval['apWPPass']))    $options[$ii]['wpPass'] = 'n5g9a'.nsx_doEncode($pval['apWPPass']); else $options[$ii]['wpPass'] = '';  \r
+        if (isset($pval['apWPMsgFrmt'])) $options[$ii]['wpMsgFormat'] = trim($pval['apWPMsgFrmt']);                                                  \r
+        if (isset($pval['apWPMsgTFrmt'])) $options[$ii]['wpMsgTFormat'] = trim($pval['apWPMsgTFrmt']);               \r
+        \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+                                           \r
+        if (isset($pval['apDoWP']))      $options[$ii]['doWP'] = $pval['apDoWP']; else $options[$ii]['doWP'] = 0; \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }  \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'wp'; $ntU = 'WP';\r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapWP', true));  if (!empty($pMeta) && is_array($pMeta)) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]); \r
+        if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = ''; if (empty($ntOpt['urlToUse'])) $ntOpt['urlToUse'] = '';\r
+        $doWP = $ntOpt['doWP'] && (is_array($pMeta) || $ntOpt['catSel']!='1');   $imgToUse = $ntOpt['imgToUse'];\r
+        $isAvailWP =  $ntOpt['wpUName']!='' && $ntOpt['wpPass']!=''; $wpMsgFormat = htmlentities($ntOpt['wpMsgFormat'], ENT_COMPAT, "UTF-8"); $wpMsgTFormat = htmlentities($ntOpt['wpMsgTFormat'], ENT_COMPAT, "UTF-8");      \r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2">\r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvailWP) { ?><input class="nxsGrpDoChb" value="1" id="doWP<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="wp[<?php echo $ii; ?>][doWP]" <?php if ((int)$doWP == 1 ) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="wp[<?php echo $ii; ?>][doWP]" value="<?php echo $doWP;?>"> <?php } ?> <?php } ?>\r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/wp16.png);">WP Blog - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvailWP) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToWP_repostButton" id="rePostToWP_button" value="<?php _e('Repost to WP Blog', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php } ?>\r
+                    \r
+                     <?php  if (is_array($pMeta) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) { $wpURL = str_ireplace('/xmlrpc.php', '', $ntOpt['wpURL']);\r
+                        if (substr($wpURL, -1)=='/') $wpURL = substr($wpURL, 0, -1);  $wpURL = $wpURL."/";\r
+                        ?> <span id="pstdWP<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+          <a style="font-size: 10px;" href="<?php echo $wpURL; ?>?p=<?php echo $pMeta[$ii]['pgID']; ?>" target="_blank"><?php $nType="Wordpress Blog"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?> <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>                \r
+                \r
+                <?php if (!$isAvailWP) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your WP Blog Account to AutoPost to WP Blogs</b>\r
+                <?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>wp" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> />\r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>                \r
+                </td></tr> <?php } ?>\r
+                                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"><?php _e('Title Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                <td><input value="<?php echo $wpMsgTFormat ?>" type="text" name="wp[<?php echo $ii; ?>][SNAPformatT]"  style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apWPTMsgFrmt<?php echo $ii; ?>');"/><?php nxs_doShowHint("apWPTMsgFrmt".$ii); ?></td></tr>\r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                <td>               \r
+                <textarea cols="150" rows="1" id="wp<?php echo $ii; ?>SNAPformat" name="wp[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#wp<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apWPMsgFrmt<?php echo $ii; ?>');"><?php echo $wpMsgFormat; ?></textarea>\r
+                <?php nxs_doShowHint("apWPMsgFrmt".$ii); ?></td></tr>\r
+                <?php /* ## Select Image & URL ## */ nxs_showImgToUseDlg($nt, $ii, $imgToUse); ?>\r
+  \r
+  <?php } \r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){  if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else $optMt['isPosted'] = '';\r
+    if (isset($pMeta['SNAPformat'])) $optMt['wpMsgFormat'] = $pMeta['SNAPformat']; \r
+    if (isset($pMeta['SNAPformatT'])) $optMt['wpMsgTFormat'] = $pMeta['SNAPformatT'];  \r
+    if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];      \r
+    if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+    if (isset($pMeta['doWP'])) $optMt['doWP'] = $pMeta['doWP'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doWP'] = 0; } \r
+    if (isset($pMeta['SNAPincludeWP']) && $pMeta['SNAPincludeWP'] == '1' ) $optMt['doWP'] = 1;  \r
+    return $optMt;\r
+  }  \r
+}}\r
+if (!function_exists("nxs_rePostToWP_ajax")) {\r
+  function nxs_rePostToWP_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; $options = get_option('NS_SNAutoPoster');  \r
+    foreach ($options['wp'] as $ii=>$two) if ($ii==$_POST['nid']) {   $two['ii'] = $ii;  $two['pType'] = 'aj';//if ($two['gpPageID'].$two['gpUName']==$_POST['nid']) {  \r
+      $gppo =  get_post_meta($postID, 'snapWP', true); $gppo =  maybe_unserialize($gppo);// prr($gppo);\r
+      if (is_array($gppo) && isset($gppo[$ii]) && is_array($gppo[$ii])){ $ntClInst = new nxs_snapClassWP(); $two = $ntClInst->adjMetaOpt($two, $gppo[$ii]); }\r
+      $result = nxs_doPublishToWP($postID, $two); if ($result == 200) die("Successfully sent your post to WP Blog."); else die($result);        \r
+    }    \r
+  }\r
+}  \r
+\r
+if (!function_exists("nxs_doPublishToWP")) { //## Second Function to Post to WP\r
+  function nxs_doPublishToWP($postID, $options){ $ntCd = 'WP'; $ntCdL = 'wp'; $ntNm = 'WP Based Blog'; global $plgn_NS_SNAutoPoster;\r
+    if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+    //if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToWP',  array($postID, $options));      \r
+    $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url(); \r
+    $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));\r
+    if (empty($options['imgToUse'])) $options['imgToUse'] = ''; if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+    \r
+    $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+    $logNT = '<span style="color:#1A9EE6">WP</span> - '.$options['nName'];\r
+    $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+    if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {  sleep(5);\r
+         nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$uqID); return;\r
+        }\r
+    } \r
+      \r
+      if ($postID=='0') { \r
+          echo "Testing ... <br/><br/>";  $urlToGo = home_url(); $options['wpMsgTFormat'] = 'Test Link from '.$urlToGo; $options['wpMsgFormat'] = 'Test post please ignore'; \r
+      } else { $post = get_post($postID); if(!$post) return; $link = get_permalink($postID); \r
+        $options['wpMsgFormat'] = nsFormatMessage($options['wpMsgFormat'], $postID);  $options['wpMsgTFormat'] = nsFormatMessage($options['wpMsgTFormat'], $postID);              \r
+         //## MyURL - URLToGo code\r
+        if (!isset($options['urlToUse']) || trim($options['urlToUse'])=='') $myurl =  trim(get_post_meta($postID, 'snap_MYURL', true)); if ($myurl!='') $options['urlToUse'] = $myurl;\r
+        if (isset($options['urlToUse']) && trim($options['urlToUse'])!='') { $urlToGo = $options['urlToUse']; $options['useFBGURLInfo'] = true; } else $urlToGo = get_permalink($postID);      \r
+        $gOptions = $plgn_NS_SNAutoPoster->nxs_options; $addURLParams = trim($gOptions['addURLParams']);  if($addURLParams!='') $urlToGo .= (strpos($urlToGo,'?')!==false?'&':'?').$addURLParams;         \r
+        nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1')); \r
+      }\r
+      \r
+      $t = wp_get_post_tags($postID); $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = implode(',',$tggs);      \r
+      $postCats = wp_get_post_categories($postID); $cats = array();  foreach($postCats as $c){ $cat = get_category($c); $cats[] = str_ireplace('&','&amp;',$cat->name); } // $cats = implode(',',$catsA);\r
+            \r
+      $extInfo = ' | PostID: '.$postID." - ".(!empty($post) && is_object($post)?$post->post_title:'');\r
+      \r
+      //## Message & Format           \r
+      if (trim($options['imgToUse'])!='') $imgURL = $options['imgToUse']; else $imgURL = nxs_getPostImage($postID, 'full'); \r
+      $message = array('siteName'=>$blogTitle, 'url'=>$urlToGo, 'imageURL'=>$imgURL, 'tags'=>$tags, 'cats'=>$cats, 'authorName'=>'', 'orID'=>$postID);    \r
+      //## Actual Post\r
+      $ntToPost = new nxs_class_SNAP_WP(); $ret = $ntToPost->doPostToNT($options, $message);\r
+      //## Process Results\r
+      if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+        if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+      } else {  // ## All Good - log it.\r
+        if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+          else  { do_action('nxs_actOnWP', array('postID'=>$postID, 'pgID'=>$ret['postID'], 'wpURL'=>$options['wpURL'], 'ii'=>$ii)); \r
+            nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'pDate'=>date('Y-m-d H:i:s'))); nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); \r
+          }\r
+      }\r
+      //## Return Result\r
+      if ($ret['isPosted']=='1') return 200; else return print_r($ret, true); \r
+  }\r
+}  \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/xi.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/xi.api.php
new file mode 100644 (file)
index 0000000..fb309cd
--- /dev/null
@@ -0,0 +1,65 @@
+<?php    \r
+//## NextScripts XING Connection Class\r
+\r
+/* \r
+1. Options\r
+\r
+nName - Nickname of the account [Optional] (Presentation purposes only - No affect on functionality)\r
+postType - A or T - "Attached link" or "Text"\r
+\r
+2. Post Info\r
+\r
+url\r
+text\r
+\r
+*/\r
+$nxs_snapAPINts[] = array('code'=>'XI', 'lcode'=>'xi', 'name'=>'XING');\r
+\r
+if (!class_exists("nxs_class_SNAP_XI")) { class nxs_class_SNAP_XI {\r
+    \r
+    var $ntCode = 'XI';\r
+    var $ntLCode = 'xi';\r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array(); // return false;\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }\r
+\r
+    function doPostToNT($options, $message){ global $nxs_urlLen; $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>'');\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['accessToken']) || trim($options['accessToken'])=='') { $badOut['Error'] = 'Not Authorized'; return $badOut; }      \r
+      if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      //## Format Post\r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['msgFrmt'], $message);      \r
+      //## Make Post            \r
+      if (isset($message['imageURL'])) $imgURL = trim(nxs_getImgfrOpt($message['imageURL'], $options['imgSize'])); else $imgURL = '';  $postType = $options['postType'];       \r
+      \r
+      require_once('apis/scOAuth.php');   $tum_oauth = new wpScoopITOAuth($options['appKey'], $options['appSec'], $options['accessToken'], $options['accessTokenSec']);\r
+      $tum_oauth->baseURL = 'https://api.xing.com'; \r
+      \r
+      $msg = str_replace('&amp;#039;', "'", $msg);  $msg = str_replace('&#039;', "'", $msg);  $msg = str_replace('#039;', "'", $msg);  $msg = str_replace('#039', "'", $msg);\r
+      $msg = str_replace('&amp;#8217;', "'", $msg); $msg = str_replace('&#8217;', "'", $msg); $msg = str_replace('#8217;', "'", $msg); $msg = str_replace('#8217', "'", $msg);\r
+      $msg = str_replace('&amp;#8220;', '"', $msg); $msg = str_replace('&#8220;', '"', $msg); $msg = str_replace('#8220;', '"', $msg); $msg = str_replace('#8220', "'", $msg);\r
+      $msg = str_replace('&amp;#8221;', '"', $msg); $msg = str_replace('&#8221;', '"', $msg); $msg = str_replace('#8221;', '"', $msg); $msg = str_replace('#8221', "'", $msg);\r
+      $msg = str_replace('&amp;#8212;', '-', $msg); $msg = str_replace('&#8212;', '-', $msg); $msg = str_replace('#8212;', '-', $msg); $msg = str_replace('#8212', "-", $msg); \r
+      \r
+      if ($postType=='A') { $postArr = array('uri'=> urlencode($message['url']), 'text'=>nsTrnc($msg, 420)); \r
+        $postinfo = $tum_oauth->makeReq('https://api.xing.com/v1/users/me/share/link', $postArr, 'POST'); \r
+      } else { $postArr = array('message'=>nsTrnc($msg, 420), 'id'=>$options['appAppUserID']); \r
+        $postinfo = $tum_oauth->makeReq('https://api.xing.com/v1/users/'.$options['appAppUserID'].'/status_message', $postArr, 'POST'); // prr($postinfo);\r
+      }\r
+      \r
+      $code = $tum_oauth->http_code; if ($code=='201') { if (!empty($postinfo) && is_array($postinfo) && !empty($postinfo['ids']) && !empty($postinfo['ids'][0])) $apNewPostID = $postinfo['ids'][0]; \r
+        $np = explode('_',$apNewPostID); $apNewPostURL = 'https://www.xing.com/feedy/stories/'.$np[0]; \r
+      } else {$apNewPostID = ''; $apNewPostURL = 'https://www.xing.com/profile/'.$options['appPGUserName'].'/activities'; }\r
+      if (!empty($apNewPostID) || $code=='201') {         \r
+         return array('postID'=>$apNewPostID, 'isPosted'=>1, 'postURL'=>$apNewPostURL, 'pDate'=>date('Y-m-d H:i:s'));          \r
+      } else { $badOut['Error'] .= print_r($postinfo, true)." Code:".$tum_oauth->http_code; \r
+        return $badOut;\r
+      }\r
+      return $badOut;\r
+    }  \r
+    \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/xi.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/xi.php
new file mode 100644 (file)
index 0000000..2a4c10e
--- /dev/null
@@ -0,0 +1,303 @@
+<?php    \r
+//## NextScripts App.net Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'XI', 'lcode'=>'xi', 'name'=>'XING');\r
+\r
+if (!class_exists("nxs_snapClassXI")) { class nxs_snapClassXI { var $ntInfo = array('code'=>'XI', 'lcode'=>'xi', 'name'=>'XING', 'defNName'=>'', 'tstReq' => true);\r
+  //#### Show Common Settings\r
+  function showGenNTSettings($ntOpts){  global $nxs_plurl, $nxs_snapSetPgURL,  $nxs_gOptions;  $ntInfo = $this->ntInfo;\r
+    if ( isset($_GET['auth']) && $_GET['auth']==$ntInfo['lcode']){ require_once('apis/scOAuth.php'); $options = $ntOpts[$_GET['acc']];\r
+              \r
+              $consumer_key = $options['appKey']; $consumer_secret = $options['appSec'];\r
+              $callback_url = $nxs_snapSetPgURL."&auth=".$ntInfo['lcode']."a&acc=".$_GET['acc'];\r
+             \r
+              $tum_oauth = new wpScoopITOAuth($consumer_key, $consumer_secret); \r
+              $tum_oauth->baseURL = 'https://api.xing.com'; $tum_oauth->request_token_path = '/v1/request_token';\r
+              \r
+              $request_token = $tum_oauth->getReqToken($callback_url); \r
+              $options['oAuthToken'] = $request_token['oauth_token'];\r
+              $options['oAuthTokenSecret'] = $request_token['oauth_token_secret'];\r
+\r
+              prr($tum_oauth); prr($options); //die();\r
+              \r
+              switch ($tum_oauth->http_code) { case 201: case 200: $url = 'https://api.xing.com/v1/authorize?oauth_token='.$options['oAuthToken'];                 \r
+                if (function_exists('get_option')) $nxs_gOptions = get_option('NS_SNAutoPoster'); if(!empty($nxs_gOptions)){$nxs_gOptions[$ntInfo['lcode']][$_GET['acc']] = $options; nxs_settings_save($nxs_gOptions);}\r
+                echo '<br/><br/>All good?! Redirecting ..... <script type="text/javascript">window.location = "'.$url.'"</script>'; break; \r
+                default: echo '<br/><b style="color:red">Could not connect to XING. Refresh the page or try again later.</b>'; die();\r
+              }\r
+              die();\r
+            }\r
+    if ( isset($_GET['auth']) && $_GET['auth']==$ntInfo['lcode'].'a'){ require_once('apis/scOAuth.php'); $options = $ntOpts[$_GET['acc']];\r
+              $consumer_key = $options['appKey']; $consumer_secret = $options['appSec'];\r
+            \r
+              $tum_oauth = new wpScoopITOAuth($consumer_key, $consumer_secret, $options['oAuthToken'], $options['oAuthTokenSecret']); //prr($tum_oauth);\r
+              $tum_oauth->baseURL = 'https://api.xing.com'; $tum_oauth->access_token_path = '/v1/access_token';\r
+              \r
+              $access_token = $tum_oauth->getAccToken($_GET['oauth_verifier']); prr($access_token);\r
+              $options['accessToken'] = $access_token['oauth_token'];  $options['accessTokenSec'] = $access_token['oauth_token_secret'];              \r
+              $optionsG = get_option('NS_SNAutoPoster'); $optionsG[$ntInfo['lcode']][$_GET['acc']] = $options;  update_option('NS_SNAutoPoster', $optionsG);              \r
+              \r
+              $tum_oauth = new wpScoopITOAuth($consumer_key, $consumer_secret, $options['accessToken'], $options['accessTokenSec']);               \r
+              $uinfo = $tum_oauth->makeReq('https://api.xing.com/v1/users/me', ''); prr($uinfo);\r
+              if (is_array($uinfo) && isset($uinfo['users']) && isset($uinfo['users'][0]) && is_array($uinfo['users'][0])) { $uinfo = $uinfo['users'][0]; $options['appPGUserName'] = $uinfo['page_name'];\r
+                $options['appAppUserName'] = $uinfo['display_name']."(".$uinfo['page_name'].")"; $options['appAppUserID'] = $uinfo['id']; \r
+                if (function_exists('get_option')) $nxs_gOptions = get_option('NS_SNAutoPoster'); if(!empty($nxs_gOptions)){$nxs_gOptions[$ntInfo['lcode']][$_GET['acc']] = $options; nxs_settings_save($nxs_gOptions);}               \r
+              } //prr($options); die();\r
+              if (!empty($options['appAppUserID'])) {  echo '<br/><br/>All good?! Redirecting ..... <script type="text/javascript">window.location = "'.$nxs_snapSetPgURL.'"</script>'; break;  die();}\r
+                else die("<span style='color:red;'>ERROR: Authorization Error: <span style='color:darkred; font-weight: bold;'>".print_r($uinfo, true)."</span></span>");              \r
+            }\r
+    \r
+  ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $ntInfo['name']; \r
+          if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['appAppUserID']) && $pbo['appAppUserID']>1)?'1':'';\r
+        ?>\r
+            <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            \r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> /> \r
+            \r
+            <?php } ?>\r
+            \r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?>\r
+          <a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;          \r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($options){ $opts = array('nName'=>'', 'doXI'=>'1', 'appKey'=>'', 'appSec'=>'', 'topicURL'=>'', 'inclTags'=>'1', 'postType'=>'A'); $opts['ntInfo']= $this->ntInfo; $this->showNTSettings($options, $opts, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl, $nxs_snapSetPgURL; $ntInfo = $this->ntInfo; $nt = $ntInfo['lcode']; $ntU = $ntInfo['code']; \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['topicURL'])) $options['topicURL'] = '';     \r
+    if (!isset($options['appKey'])) $options['appKey'] = ''; if (!isset($options['appSec'])) $options['appSec'] = '';  ?>    \r
+            <div id="do<?php echo $ntU; ?><?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">     \r
+            <input type="hidden" value="0" id="apDoS<?php echo $ntU.$ii; ?>" />\r
+            <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/instructions/setup-installation-xing-social-networks-auto-poster/"><?php $nType=$ntInfo['name']; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][nName]" id="apnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel($nt, $ii, $options['qTLng']); ?>\r
+            <br/>\r
+                <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+            \r
+            <div style="width:100%;"><strong><?php echo $nType; ?> Consumer Key:</strong> </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][appKey]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['appKey'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+            <div style="width:100%;"><strong><?php echo $nType; ?> Consumer Secret:</strong> </div><input name="<?php echo $nt; ?>[<?php echo $ii; ?>][appSec]"  style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['appSec'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>                \r
+            \r
+              <br/>  \r
+                                    \r
+            <div id="altFormat" style="margin-left: 0px;">\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Message Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="msgFrmt<?php echo $ntU; ?><?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('msgFrmt<?php echo $ntU; ?><?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)\r
+              </div>\r
+              \r
+              <textarea cols="150" rows="3" id="<?php echo $nt; ?><?php echo $ii; ?>msgFrmt" name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#<?php echo $nt; ?><?php echo $ii; ?>msgFrmt').attr('rows', 6); mxs_showFrmtInfo('msgFrmt<?php echo $ntU.$ii; ?>');"><?php if ($isNew) _e("%EXCERPT% \r\n\r\n%URL%", 'social-networks-auto-poster-facebook-twitter-g'); else _e(apply_filters('format_to_edit', htmlentities($options['msgFrmt'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea><?php nxs_doShowHint("msgFrmt".$ntU.$ii); ?>\r
+            </div>\r
+   \r
+            <p style="margin-bottom: 20px;margin-top: 5px;"><input value="1" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][inclTags]"  <?php if ((int)$options['inclTags'] == 1) echo "checked"; ?> /> \r
+              <strong><?php _e('Post with tags', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong>  <?php _e('Tags from the blogpost will be auto-posted to '.$ntInfo['name'], 'social-networks-auto-poster-facebook-twitter-g'); ?>                                                               \r
+            </p>\r
+            \r
+            <div style="width:100%;"><strong id="altFormatText">Post Type:</strong></div>                      \r
+            <div style="margin-left: 10px;">\r
+              <input type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][postType]" value="T" <?php if ($options['postType'] == 'T') echo 'checked="checked"'; ?> /> <?php _e('Text Post', 'social-networks-auto-poster-facebook-twitter-g'); ?> - <i><?php _e('just text message', 'social-networks-auto-poster-facebook-twitter-g'); ?></i><br/>                                  \r
+              <input type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][postType]" value="A" <?php if ( !isset($options['postType']) || $options['postType'] == '' || $options['postType'] == 'A') echo 'checked="checked"'; ?> /> <?php _e('Post link to the blogpost', 'social-networks-auto-poster-facebook-twitter-g'); ?><br/>\r
+            </div>\r
+   \r
+            <br/><br/>\r
+            <?php  if($options['appKey']=='') { ?>\r
+            <b><?php _e('Authorize Your '.$ntInfo['name'].' Account', 'social-networks-auto-poster-facebook-twitter-g'); ?></b> <?php _e('Please click "Update Settings" to be able to Authorize your account.', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+            <?php } else { if(isset($options['appAppUserID']) && $options['appAppUserID']>0) { ?>\r
+            <?php _e('Your '.$ntInfo['name'].' Account has been authorized.', 'social-networks-auto-poster-facebook-twitter-g'); ?> User ID: <?php _e(apply_filters('format_to_edit', htmlentities($options['appAppUserID'].' - '.$options['appAppUserName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>.\r
+            <?php _e('You can', 'social-networks-auto-poster-facebook-twitter-g'); ?> Re- <?php } ?>            \r
+            <a href="<?php echo $nxs_snapSetPgURL;?>&auth=<?php echo $nt; ?>&acc=<?php echo $ii; ?>">Authorize Your <?php echo $ntInfo['name']; ?> Account</a> \r
+            \r
+            <?php if (!isset($options['appAppUserID']) || $options['appAppUserID']<1) { ?> <div class="blnkg">&lt;=== <?php _e('Authorize your account', 'social-networks-auto-poster-facebook-twitter-g'); ?> ===</div> <?php }?>\r
+            <?php } ?>\r
+            <br/><br/>            \r
+            \r
+            <?php if ($isNew) { ?> <input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][apDo<?php echo $ntU; ?>]" value="1" id="apDoNew<?php echo $ntU; ?><?php echo $ii; ?>" /> <?php } ?>\r
+            <?php if (isset($options['appAppUserID']) && $options['appAppUserID']>0) { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('<?php echo $ntU; ?>', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>              <?php } \r
+            ?>\r
+    \r
+     </div>\r
+      <?php /* ######################## Tools Tab ####################### */ ?>\r
+    <?php if (!$isNew) { ?><div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">    \r
+    <?php nxs_showCatTagsCTFilters($nt, $ii, $options);\r
+          nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);\r
+          nxs_showRepostSettings($nt, $ii, $options); ?>      \r
+    </div> <?php } ?>       <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div>\r
+            \r
+            \r
+            </div><?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = $this->ntInfo['code']; \r
+    foreach ($post as $ii => $pval){ \r
+      if (isset($pval['appKey']) && $pval['appKey']!=''){ if (!isset($options[$ii])) $options[$ii] = array();\r
+        \r
+        if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+        if (isset($pval['nName']))  $options[$ii]['nName'] = trim($pval['nName']);  \r
+        \r
+        if (isset($pval['appKey'])) $options[$ii]['appKey'] = trim($pval['appKey']);        \r
+        if (isset($pval['appSec'])) $options[$ii]['appSec'] = trim($pval['appSec']);        \r
+        if (isset($pval['topicURL'])) $options[$ii]['topicURL'] = trim($pval['topicURL']);                  \r
+        \r
+                \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';                                 \r
+        \r
+        if (isset($pval['postType'])) $options[$ii]['postType'] = $pval['postType'];         \r
+        if (isset($pval['inclTags'])) $options[$ii]['inclTags'] = trim($pval['inclTags']); else $options[$ii]['inclTags'] = 0;\r
+        if (isset($pval['msgFrmt'])) $options[$ii]['msgFrmt'] = trim($pval['msgFrmt']);        \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }  \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = $this->ntInfo['lcode']; $ntU = $this->ntInfo['code'];\r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snap'.$ntU, true));  \r
+        if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii])) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]);  \r
+        if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = ''; if (empty($ntOpt['urlToUse'])) $ntOpt['urlToUse'] = '';\r
+        $doIT = $ntOpt['do'.$ntU] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse']; $urlToUse = $ntOpt['urlToUse']; \r
+        $isAvail = $ntOpt['appKey']!='' && $ntOpt['appSec']!=''; $msgFormat = htmlentities($ntOpt['msgFrmt'], ENT_COMPAT, "UTF-8");  \r
+        $postType = $ntOpt['postType'];         \r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2">\r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvail) { ?><input class="nxsGrpDoChb" value="1" id="do<?php echo $ntU.$ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][do<?php echo $ntU; ?>]" <?php if ((int)$doIT == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][do<?php echo $ntU; ?>]" value="<?php echo $doIT;?>"> <?php } ?> <?php } ?>\r
+      \r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>16.png);"><?php echo $this->ntInfo['name']; ?> - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvail) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostTo<?php echo $ntU; ?>_repostButton" id="rePostTo<?php echo $ntU; ?>_button" value="<?php _e('Repost to '.$this->ntInfo['name'], 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php  } ?>\r
+                    \r
+                    <?php  if (is_array($pMeta) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['postURL']) ) { \r
+                        \r
+                        ?> <span id="pstd<?php echo $ntU; ?><?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+                      <a style="font-size: 10px;" href="<?php echo $pMeta[$ii]['postURL']; ?>" target="_blank"><?php $nType=$this->ntInfo['name']; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>                \r
+                \r
+                <?php if (!$isAvail) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your <?php echo $this->ntInfo['name']; ?> Account to AutoPost to <?php echo $this->ntInfo['name']; ?></b></td></tr>\r
+                <?php }  else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>ap" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> /> \r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+                </td></tr> <?php } ?>\r
+     \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top;  padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th><td>                \r
+                \r
+                <textarea cols="150" rows="1" id="<?php echo $nt.$ii; ?>msgFrmt" name="<?php echo $nt; ?>[<?php echo $ii; ?>][msgFrmt]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#<?php echo $nt.$ii; ?>msgFrmt').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('msgFrmt<?php echo $nt.$ii; ?>');"><?php echo $msgFormat ?></textarea> <?php nxs_doShowHint("msgFrmt".$nt.$ii, '', '58'); ?>\r
+                \r
+                </td></tr>\r
+                \r
+                <tr><th scope="row" style="text-align:right; width:150px; vertical-align:top; padding-top: 0px; padding-right:10px;"> <?php _e('Post Type:', 'social-networks-auto-poster-facebook-twitter-g') ?> <br/></th><td>     \r
+        <input type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][postType]" value="T" <?php if ($postType == 'T') echo 'checked="checked"'; ?> /> <?php _e('Text Post', 'social-networks-auto-poster-facebook-twitter-g') ?>  - <i><?php _e('just text message', 'social-networks-auto-poster-facebook-twitter-g') ?></i><br/>\r
+        <input type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][postType]" value="A" <?php if ( !isset($postType) || $postType == '' || $postType == 'A') echo 'checked="checked"'; ?> /><?php _e('Text Post with "attached" blogpost', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+     </td></tr>\r
+                \r
+                 <?php /* ## Select Image & URL ## */  nxs_showURLToUseDlg($nt, $ii, $urlToUse);  ?>\r
+       <?php } \r
+\r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = ''; \r
+    if (isset($pMeta['doXI'])) $optMt['doXI'] = $pMeta['doXI'] == 1?1:0; else { if (isset($pMeta['msgFormat'])) $optMt['doXI'] = 0; } \r
+    \r
+    if (isset($pMeta['msgFrmt'])) $optMt['msgFrmt'] = $pMeta['msgFrmt']; \r
+    if (isset($pMeta['postType'])) $optMt['postType'] = $pMeta['postType']; \r
+    \r
+    if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];  if (isset($pMeta['urlToUse'])) $optMt['urlToUse'] = $pMeta['urlToUse'];  \r
+    if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];    \r
+    if (isset($pMeta['SNAPincludeXI']) && $pMeta['SNAPincludeXI'] == '1' ) $optMt['doXI'] = 1;  \r
+    return $optMt;\r
+  }  \r
+}}\r
+if (!function_exists("nxs_rePostToXI_ajax")) {\r
+  function nxs_rePostToXI_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+    foreach ($options['xi'] as $ii=>$two) if ($ii==$_POST['nid']) {   $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['apPageID'].$two['apUName']==$_POST['nid']) {  \r
+      $appo =  get_post_meta($postID, 'snapXI', true); $appo =  maybe_unserialize($appo);// prr($appo);\r
+      if (is_array($appo) && isset($appo[$ii]) && is_array($appo[$ii])){ $ntClInst = new nxs_snapClassXI(); $two = $ntClInst->adjMetaOpt($two, $appo[$ii]); } \r
+      $result = nxs_doPublishToXI($postID, $two); if ($result == 200) die("Successfully sent your post to XING. "); else die($result);        \r
+    }    \r
+  }\r
+}  \r
+if (!function_exists("nxs_doPublishToXI")) { //## Post to XI. // V3 - imgToUse - Done, class_SNAP_AP - Done, New Format - Done\r
+  function nxs_doPublishToXI($postID, $options){ global $plgn_NS_SNAutoPoster; $ntCd = 'XI'; $ntCdL = 'xi'; $ntNm = 'XING'; if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+      $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));   \r
+      if (empty($options['imgToUse'])) $options['imgToUse'] = ''; if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+      $logNT = '<span style="color:#800000">XING</span> - '.$options['nName'];      \r
+      $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+      if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {  \r
+           nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'); return;\r
+        }\r
+      } $message = array('message'=>'', 'link'=>'', 'imageURL'=>'', 'videoURL'=>''); \r
+      \r
+      if ($postID=='0') { echo "Testing ... <br/><br/>"; $message['description'] = 'Test Post, Description';  $message['title'] = 'Test Post - Title';  $message['url'] = home_url(); } \r
+      else { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));  $post = get_post($postID); if(!$post) return; \r
+        $postType = $options['postType']; $isNoImg = false; $tags = '';\r
+        \r
+        $options['msgFrmt'] = nsFormatMessage($options['msgFrmt'], $postID, $addParams); \r
+        \r
+        $tggs = array(); if ($options['inclTags']=='1'){ $t = wp_get_post_tags($postID); $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = $tggs; }        \r
+                \r
+        if ($postType=='A') if (trim($options['imgToUse'])!='') $imgURL = $options['imgToUse']; else $imgURL = nxs_getPostImage($postID, 'medium');  \r
+        if ($postType=='I') if (trim($options['imgToUse'])!='') $imgURL = $options['imgToUse']; else $imgURL = nxs_getPostImage($postID, 'full');      \r
+        if (preg_match("/noImg.\.png/i", $imgURL)) { $imgURL = ''; $isNoImg = true; }\r
+        \r
+        //## MyURL - URLToGo code\r
+        $options = nxs_getURL($options, $postID, $addParams); $urlToGo = $options['urlToUse'];  $message = array('url'=>$urlToGo, 'imageURL'=>$imgURL, 'noImg'=>$isNoImg, 'tags'=>$tags);                 \r
+        $extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?$post->post_title:''); \r
+      }            \r
+      //## Actual Post\r
+      $ntToPost = new nxs_class_SNAP_XI(); $ret = $ntToPost->doPostToNT($options, $message); //prr($ret);\r
+      //## Process Results\r
+      if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+         if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+      } else {  // ## All Good - log it.\r
+        if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+          else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'postURL'=>$ret['postURL'], 'pDate'=>date('Y-m-d H:i:s'))); \r
+           $extInfo .= ' | <a href="'.$ret['postURL'].'" target="_blank">Post Link</a>'; nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+      }\r
+      //## Return Result\r
+      if ($ret['isPosted']=='1') return 200; else return print_r($ret, true);      \r
+      \r
+  } \r
+}  \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/yt.api.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/yt.api.php
new file mode 100644 (file)
index 0000000..55e6759
--- /dev/null
@@ -0,0 +1,30 @@
+<?php    \r
+//## NextScripts FriendFeed Connection Class\r
+$nxs_snapAPINts[] = array('code'=>'YT', 'lcode'=>'yt', 'name'=>'YouTube');\r
+\r
+if (!class_exists("nxs_class_SNAP_YT")) { class nxs_class_SNAP_YT {\r
+    \r
+    var $ntCode = 'YT';\r
+    var $ntLCode = 'yt';     \r
+    \r
+    function doPost($options, $message){ if (!is_array($options)) return false; $out = array();\r
+      foreach ($options as $ii=>$ntOpts) $out[$ii] = $this->doPostToNT($ntOpts, $message);\r
+      return $out;\r
+    }    \r
+    function doPostToNT($options, $message){ $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>'');\r
+      //## Check settings\r
+      if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }      \r
+      if (!isset($options['ytUName']) || trim($options['ytPass'])=='') { $badOut['Error'] = 'Not Configured'; return $badOut; }   $email = $options['ytUName'];         \r
+      $pass = substr($options['ytPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['ytPass'], 5)):$options['ytPass'];                   \r
+      //## Format\r
+      if (!empty($message['pText'])) $msg = $message['pText']; else $msg = nxs_doFormatMsg($options['ytMsgFormat'], $message); \r
+            \r
+      $nt = new nxsAPI_GP(); if(!empty($options['ck'])) $nt->ck = $options['ck'];  $nt->debug = false;  $loginError = $nt->connect($email, $pass, 'YT');     \r
+      if (!$loginError){          \r
+         $result = $nt -> postYT($msg, $options['ytPageID'], $message['videoURL'], $options['ytGPPageID']); \r
+      } else {  $badOut['Error'] = "Login/Connection Error: ". print_r($loginError, true); return $badOut; }       \r
+      if (is_array($result) && $result['isPosted']=='1') nxs_save_glbNtwrks('yt', $options['ii'], $nt->ck, 'ck');\r
+      return $result;  \r
+   }    \r
+}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/yt.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/yt.php
new file mode 100644 (file)
index 0000000..656d879
--- /dev/null
@@ -0,0 +1,229 @@
+<?php    \r
+//## NextScripts Facebook Connection Class\r
+$nxs_snapAvNts[] = array('code'=>'YT', 'lcode'=>'yt', 'name'=>'YouTube');\r
+\r
+if (!class_exists("nxs_snapClassYT")) { class nxs_snapClassYT {\r
+  //#### Show Common Settings\r
+  function showGenNTSettings($ntOpts){  global $nxs_plurl; $ntInfo = array('code'=>'YT', 'lcode'=>'yt', 'name'=>'YouTube', 'defNName'=>'ytUName', 'tstReq' => false); ?>    \r
+    <div class="nxs_box">\r
+      <div class="nxs_box_header"> \r
+        <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+          <?php $cbo = count($ntOpts); ?> \r
+          <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+        </div>\r
+      </div>\r
+      <div class="nxs_box_inside">\r
+        <?php if(!function_exists('doPostToGooglePlus')) {?> YouTube doesn't have a built-in API for automated posts yet. The current <a href="http://developers.google.com/+/api/">YouTube API</a> is "Read Only" and can't be used for posting.  <br/>You need to get a special <a target="_blank" href="http://www.nextscripts.com/google-plus-automated-posting">library module</a> to be able to publish your content to YouTube. \r
+        <?php } else foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>\r
+          <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+            <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+            <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>            \r
+            <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />\r
+           <?php } ?>\r
+            <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+            <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+            <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+          &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;\r
+          <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+          </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php // $pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);             \r
+        }?>\r
+      </div>\r
+    </div> <?php \r
+  }  \r
+  //#### Show NEW Settings Page\r
+  function showNewNTSettings($myto){ $options = array('nName'=>'', 'doYT'=>'1', 'ytUName'=>'', 'ytPageID'=>'', 'ytGPPageID'=>'', 'postType'=>'A', 'ytPass'=>''); $options['ntInfo']= array('lcode'=>'yt'); $this->showNTSettings($myto, $options, true);}\r
+  //#### Show Unit  Settings\r
+  function showNTSettings($ii, $options, $isNew=false){  global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); \r
+    if (!isset($options['nHrs'])) $options['nHrs'] = 0; if (!isset($options['nMin'])) $options['nMin'] = 0;  if (!isset($options['catSel'])) $options['catSel'] = 0;  if (!isset($options['catSelEd'])) $options['catSelEd'] = ''; \r
+    if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['ytGPPageID'])) $options['ytGPPageID'] = '';  ?>\r
+            <div id="doYT<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">     <input type="hidden" name="apDoSYT<?php echo $ii; ?>" value="0" id="apDoSYT<?php echo $ii; ?>" />            \r
+            <?php if(!function_exists('doPostToGooglePlus')) {                \r
+                 nxs_show_noLibWrn('YouTube API Library module NOT found.<br/><br/><span style="color:black;">YouTube does not have a free native API for automated posts yet.</span><br/><br/><span style="font-size: 12px;color:black;">You need to have a special API Library Module to be able to publish your content to YouTube.</span>'); echo "</div>"; return; }; ?>            \r
+            <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/yt16.png);"><a style="font-size: 12px;" target="_blank"  href="http://www.nextscripts.com/instructions/youtube-social-networks-auto-poster-wordpress-setup-installation/"><?php $nType="YouTube"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div>\r
+            \r
+            <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="yt[<?php echo $ii; ?>][nName]" id="ytnName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+            <?php echo nxs_addQTranslSel('yt', $ii, $options['qTLng']); ?>\r
+            \r
+              <br/>\r
+    <ul class="nsx_tabs">\r
+    <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>    \r
+    <?php if (!$isNew) { ?>  <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  <?php } ?>\r
+    </ul>\r
+    <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>\r
+    <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat;  background-position:90% 10%;">\r
+    \r
+            \r
+            <div style="width:100%;"><strong>YouTube(Google) Username:</strong> </div><input name="yt[<?php echo $ii; ?>][apYTUName]" id="apYTUName" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['ytUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />                \r
+            <div style="width:100%;"><strong>YouTube(Google) Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="yt[<?php echo $ii; ?>][apYTPass]" id="apYTPass" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['ytPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['ytPass'], 5)):$options['ytPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  <br/>                \r
+            <p><div style="width:100%;"><strong>YouTube Channel Page URL:</strong> \r
+            \r
+            </div><input name="yt[<?php echo $ii; ?>][apYTPage]" id="apYTPage" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['ytPageID'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /> \r
+            <br/><br/>\r
+            \r
+            <p><div style="width:100%;"><i style="color: gray;"><strong >Google+ Page ID:</strong>&nbsp;Fill this only if you are posting to youTube as your Google+ page. Please leave this empty otherwise.</i>\r
+            \r
+            </div><input name="yt[<?php echo $ii; ?>][ytGPPageID]" id="ytGPPageID" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['ytGPPageID'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /> \r
+            <br/><br/>\r
+            \r
+            <div id="altFormat" style="">\r
+              <div style="width:100%;"><strong id="altFormatText"><?php _e('Message text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="apYTMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apYTMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)\r
+              </div>\r
+              \r
+              <textarea cols="150" rows="3" id="yt<?php echo $ii; ?>SNAPformat" name="yt[<?php echo $ii; ?>][apYTMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#yt<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apYTMsgFrmt<?php echo $ii; ?>');"><?php if ($isNew) _e("New post: %TITLE% - %URL%", 'social-networks-auto-poster-facebook-twitter-g'); else _e(apply_filters('format_to_edit', htmlentities($options['ytMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea>\r
+              \r
+              <?php nxs_doShowHint("apYTMsgFrmt".$ii); ?>\r
+            </div><br/>          \r
+          \r
+            <?php if ($isNew) { ?> <input type="hidden" name="yt[<?php echo $ii; ?>][apDoYT]" value="1" id="apDoNewYT<?php echo $ii; ?>" /> <?php } ?>\r
+            <?php if ($options['ytPass']!='') { ?>\r
+            \r
+            <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('YT', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a>              <?php } \r
+            ?></div>\r
+            <?php /* ######################## Advanced Tab ####################### */ ?>\r
+   <?php if (!$isNew) { ?>   <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">\r
+    \r
+   <?php nxs_showCatTagsCTFilters($nt, $ii, $options); \r
+      nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); \r
+      nxs_showRepostSettings($nt, $ii, $options); ?>\r
+            \r
+            \r
+    </div>     <?php } ?> <?php /* #### End of Tab #### */ ?>\r
+    </div><br/> <?php /* #### End of Tabs #### */ ?>\r
+    \r
+    <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div></div><?php\r
+  }\r
+  //#### Set Unit Settings from POST\r
+  function setNTSettings($post, $options){ $code = 'YT'; $lcode = 'yt'; \r
+    foreach ($post as $ii => $pval){       \r
+      if (!empty($pval['apYTUName']) && !empty($pval['apYTPass'])){ if (!isset($options[$ii])) $options[$ii] = array();\r
+        if (isset($pval['apYTUName']))   $options[$ii]['ytUName'] = trim($pval['apYTUName']);\r
+        if (isset($pval['nName']))          $options[$ii]['nName'] = trim($pval['nName']);\r
+        if (isset($pval['apYTPass']))    $options[$ii]['ytPass'] = 'n5g9a'.nsx_doEncode($pval['apYTPass']); else $options[$ii]['ytPass'] = '';  \r
+        if (isset($pval['apYTPage']))    $options[$ii]['ytPageID'] = trim($pval['apYTPage']);  \r
+        if (isset($pval['ytGPPageID']))    $options[$ii]['ytGPPageID'] = trim($pval['ytGPPageID']);  \r
+        \r
+        if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;\r
+        if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';\r
+                      \r
+        if (isset($pval['postType']))   $options[$ii]['postType'] = $pval['postType'];         \r
+        if (isset($pval['apYTMsgFrmt'])) $options[$ii]['ytMsgFormat'] = trim($pval['apYTMsgFrmt']);                                                  \r
+        if (isset($pval['apDoYT']))      $options[$ii]['doYT'] = $pval['apDoYT']; else $options[$ii]['doYT'] = 0; \r
+        \r
+        $options[$ii] = nxs_adjRpst($options[$ii], $pval);       \r
+        \r
+        if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);\r
+        if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']); \r
+        if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']); \r
+      } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0; \r
+    } return $options;\r
+  }  \r
+  //#### Show Post->Edit Meta Box Settings\r
+  function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'yt'; $ntU = 'YT';\r
+     foreach($ntOpts as $ii=>$ntOpt)  { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapYT', true));  if (is_array($pMeta)) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]); \r
+        $doYT = $ntOpt['doYT'] && (is_array($pMeta) || $ntOpt['catSel']!='1');   \r
+        $isAvailYT =  $ntOpt['ytUName']!='' && $ntOpt['ytPass']!='';   $ytMsgFormat = htmlentities($ntOpt['ytMsgFormat'], ENT_COMPAT, "UTF-8");              \r
+      ?>  \r
+      <tr><th style="text-align:left;" colspan="2">\r
+      <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='')  { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?>\r
+      <?php if (!empty($ntOpt['tagsSelX'])) { ?>  <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?>\r
+      <?php if ($isAvailYT) { ?><input class="nxsGrpDoChb" value="1" id="doYT<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="yt[<?php echo $ii; ?>][doYT]" <?php if ((int)$doYT == 1) echo 'checked="checked" title="def"';  ?> /> \r
+      <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="yt[<?php echo $ii; ?>][doYT]" value="<?php echo $doYT;?>"> <?php } ?> <?php } ?>\r
+      \r
+      <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/yt16.png);">YouTube - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"\r
+                    if ($post->post_status == "publish" && $isAvailYT) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToYT_repostButton" id="rePostToYT_button" value="<?php _e('Repost to YouTube', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+                    <?php } ?>\r
+                    \r
+                    <?php  if (is_array($pMeta) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) { \r
+                        \r
+                        ?> <span id="pstdYT<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">\r
+                      <a style="font-size: 10px;" href="<?php echo $ntOpt['ytPageID']; ?>" target="_blank"><?php $nType="YouTube"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?>  <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>\r
+                    </span><?php } ?>\r
+                    \r
+                </td></tr>                \r
+                \r
+                <?php if (!$isAvailYT) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your YouTube Account to AutoPost to YouTube</b>\r
+                <?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $ntOpt); } ?>\r
+                \r
+                <?php if ($ntOpt['rpstOn']=='1') { ?> \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">\r
+                <input value="0"  type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>yt" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"  <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> />\r
+                </th>\r
+                <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>                \r
+                </td></tr> <?php } ?>\r
+                \r
+                \r
+                <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top;  padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Message Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                <td>\r
+                \r
+                 <?php if (1==1) { ?>\r
+                <textarea cols="150" rows="1" id="yt<?php echo $ii; ?>SNAPformat" name="yt[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('#yt<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apYTMsgFrmt<?php echo $ii; ?>');"><?php echo $ytMsgFormat ?></textarea>\r
+                <?php } else { ?>\r
+                <input value="<?php echo $ytMsgFormat ?>" type="text" name="yt[<?php echo $ii; ?>][SNAPformat]"  style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apYTMsgFrmt<?php echo $ii; ?>');"/><?php nxs_doShowHint("apYTMsgFrmt".$ii); ?>\r
+                <?php } ?>\r
+                \r
+                \r
+                </td></tr>\r
+           <?php } \r
+     }\r
+  }\r
+  //#### Save Meta Tags to the Post\r
+  function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else  $optMt['isPosted'] = ''; \r
+    if (isset($pMeta['SNAPformat'])) $optMt['ytMsgFormat'] = $pMeta['SNAPformat'];\r
+    if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];      \r
+    if (isset($pMeta['timeToRun']))  $optMt['timeToRun'] = $pMeta['timeToRun'];  if (isset($pMeta['rpstPostIncl']))  $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];       \r
+    if (isset($pMeta['postType'])) $optMt['postType'] = $pMeta['postType'];\r
+    if (isset($pMeta['doYT'])) $optMt['doYT'] = $pMeta['doYT'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doYT'] = 0; } \r
+    if (isset($pMeta['SNAPincludeYT']) && $pMeta['SNAPincludeYT'] == '1' ) $optMt['doYT'] = 1;  \r
+    return $optMt;\r
+  }  \r
+}}\r
+if (!function_exists("nxs_rePostToYT_ajax")) {\r
+  function nxs_rePostToYT_ajax() { check_ajax_referer('nxsSsPageWPN');  $postID = $_POST['id']; global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+    foreach ($options['yt'] as $ii=>$two) if ($ii==$_POST['nid']) {   $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['ytPageID'].$two['ytUName']==$_POST['nid']) {  \r
+      $ytpo =  get_post_meta($postID, 'snapYT', true); $ytpo =  maybe_unserialize($ytpo);// prr($ytpo);\r
+      if (is_array($ytpo) && isset($ytpo[$ii]) && is_array($ytpo[$ii])){ $ntClInst = new nxs_snapClassYT(); $two = $ntClInst->adjMetaOpt($two, $ytpo[$ii]); } \r
+      $result = nxs_doPublishToYT($postID, $two); if ($result === 200) die("Successfully sent your post to YouTube."); else die($result);        \r
+    }    \r
+  }\r
+}  \r
+\r
+if (!function_exists("nxs_doPublishToYT")) { //## Second Function to Post to G+\r
+  function nxs_doPublishToYT($postID, $options){ $ntCd = 'YT'; $ntCdL = 'yt'; $ntNm = 'YouTube'; $post = '';  global $nxs_gCookiesArr; $vUrl = '';\r
+      if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));\r
+      // $backtrace = debug_backtrace(); nxs_addToLogN('W', 'Enter', $ntCd, 'I am here - '.$ntCd."|".print_r($backtrace, true), ''); \r
+      //if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToYT',  array($postID, $options));\r
+      $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName'])); \r
+      $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url(); \r
+      if (empty($options['ytGPPageID'])) $options['ytGPPageID'] = ''; // if (empty($options['imgSize'])) $options['imgSize'] = '';\r
+      if(!function_exists('doConnectToGooglePlus2') || !function_exists('doPostToGooglePlus2')) { nxs_addToLogN('E', 'Error', $ntCd, '-=ERROR=- No G+ API Lib Detected', ''); return "No G+ API Lib Detected";}\r
+      $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r
+      $logNT = '<span style="color:#800000">YouTube</span> - '.$options['nName'];      \r
+      $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap);     \r
+      if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r
+        $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') {  sleep(5);\r
+           nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$uqID); return;\r
+        }\r
+      }         \r
+      if ($postID=='0') $options['ytMsgFormat'] = 'Test Post, Please Ignore';  else { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));  $post = get_post($postID); if(!$post) return;\r
+        $options['ytMsgFormat'] = nsFormatMessage($options['ytMsgFormat'], $postID, $addParams);// prr($msg); echo $postID;\r
+      }\r
+      $extInfo = ' | PostID: '.$postID." - ".(is_object($post)?$post->post_title:'');\r
+      \r
+      //## Message & Format                 \r
+      $vids = nsFindVidsInPost($post); if (count($vids)>0) $vUrl = $vids[0];\r
+      $message = array('siteName'=>$blogTitle, 'videoURL'=>$vUrl);    \r
+      //## Actual Post\r
+      $ntToPost = new nxs_class_SNAP_YT(); $ret = $ntToPost->doPostToNT($options, $message);\r
+      //## Process Results\r
+      if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r
+        if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r
+      } else {  // ## All Good - log it.\r
+        if ($postID=='0')  { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r
+          else  { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'pDate'=>date('Y-m-d H:i:s'))); nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r
+      } \r
+      //## Return Result\r
+      if (is_array($ret) && !empty($ret['isPosted']) && $ret['isPosted']=='1') return 200; else return print_r($ret, true);       \r
+  } \r
+}  \r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/nxs_functions_adv.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/nxs_functions_adv.php
new file mode 100644 (file)
index 0000000..1d3cfd6
--- /dev/null
@@ -0,0 +1,231 @@
+<?php\r
+if (!function_exists("nxs_settings_save")) {function nxs_settings_save($options) { update_option('NS_SNAutoPoster',$options); }}\r
+//## Format Message\r
+if (!function_exists("nsFormatMessage")) { function nsFormatMessage($msg, $postID, $addURLParams='', $lng=''){ global $ShownAds, $plgn_NS_SNAutoPoster, $nxs_urlLen; \r
+  $post = get_post($postID); $options = $plgn_NS_SNAutoPoster->nxs_options;   \r
+  if (!empty($options['brokenCntFilters'])) { $msg = str_replace('%FULLTITLE%','%TITLE%',$msg); $msg = str_replace('%PANNOUNCE%','%ANNOUNCE%',$msg); $msg = str_replace('%PANNOUNCER%','%ANNOUNCER%',$msg); \r
+    $msg = str_replace('%EXCERPT%','%RAWEXCERPT%',$msg);  $msg = str_replace('%FULLTEXT%','%RAWTEXT%',$msg);  \r
+  } if (!empty($options['nxsHTSpace'])) $htS = $options['nxsHTSpace']; else $htS = ''; \r
+  if (!empty($options['nxsHTSepar'])) $htSep = $options['nxsHTSepar']; else $htSep = ', '; $htSep = str_replace('_',' ',$htSep); $htSep = str_replace('c',',',$htSep);\r
+  // if ($addURLParams=='' && $options['addURLParams']!='') $addURLParams = $options['addURLParams'];\r
+  $msg = str_replace('%TEXT%','%EXCERPT%',$msg); $msg = str_replace('%RAWEXTEXT%','%RAWEXCERPT%',$msg);\r
+  $msg = stripcslashes($msg); if (isset($ShownAds)) $ShownAdsL = $ShownAds; // $msg = htmlspecialchars(stripcslashes($msg)); \r
+  $msg = nxs_doSpin($msg);\r
+  if (preg_match('/%URL%/', $msg)) { $url = get_permalink($postID); if($addURLParams!='') $url .= (strpos($url,'?')!==false?'&':'?').$addURLParams;  $nxs_urlLen = nxs_strLen($url); $msg = str_ireplace("%URL%", $url, $msg);}\r
+  if (preg_match('/%MYURL%/', $msg)) { $url =  get_post_meta($postID, 'snap_MYURL', true); if($addURLParams!='') $url .= (strpos($url,'?')!==false?'&':'?').$addURLParams;  $nxs_urlLen = nxs_strLen($url); $msg = str_ireplace("%MYURL%", $url, $msg);}// prr($msg);\r
+  if (preg_match('/%SURL%/', $msg)) { $url = get_permalink($postID); if($addURLParams!='') $url .= (strpos($url,'?')!==false?'&':'?').$addURLParams; \r
+    $url = nxs_mkShortURL($url, $postID); $nxs_urlLen = nxs_strLen($url); $msg = str_ireplace("%SURL%", $url, $msg);\r
+  } \r
+  if (preg_match('/%ORID%/', $msg)) { $msg = str_ireplace("%ORID%", $postID, $msg); } \r
+  if (preg_match('/%IMG%/', $msg)) { $imgURL = nxs_getPostImage($postID); $msg = str_ireplace("%IMG%", $imgURL, $msg); } \r
+  if (preg_match('/%TITLE%/', $msg)) { $title = nxs_doQTrans($post->post_title, $lng); $msg = str_ireplace("%TITLE%", $title, $msg); }                    \r
+  if (preg_match('/%FULLTITLE%/', $msg)) { $title = apply_filters('the_title', nxs_doQTrans($post->post_title, $lng));  $msg = str_ireplace("%FULLTITLE%", $title, $msg); }                    \r
+  if (preg_match('/%STITLE%/', $msg)) { $title = nxs_doQTrans($post->post_title, $lng);   $title = substr($title, 0, 115); $msg = str_ireplace("%STITLE%", $title, $msg); }                    \r
+  if (preg_match('/%AUTHORNAME%/', $msg)) { $aun = $post->post_author;  $aun = get_the_author_meta('display_name', $aun );  $msg = str_ireplace("%AUTHORNAME%", $aun, $msg);}                    \r
+  if (preg_match('/%AUTHORTWNAME%/', $msg)) { $aun = $post->post_author;  $aun = get_the_author_meta('twitter', $aun );  $msg = str_ireplace("%AUTHORTWNAME%", $aun, $msg);}                    \r
+  if (preg_match('/%ANNOUNCE%/', $msg)) { $postContent = nxs_doQTrans($post->post_content, $lng);     \r
+    $postContent = strip_tags(strip_shortcodes(str_ireplace('<!--more-->', '#####!--more--!#####', str_ireplace("&lt;!--more--&gt;", '<!--more-->', $postContent))));\r
+    if (stripos($postContent, '#####!--more--!#####')!==false) { $postContentEx = explode('#####!--more--!#####',$postContent); $postContent = $postContentEx[0]; }    \r
+      else $postContent = nsTrnc($postContent, $options['anounTagLimit'], ' ', '');  $msg = str_ireplace("%ANNOUNCE%", $postContent, $msg);\r
+  }  \r
+  if (preg_match('/%PANNOUNCE%/', $msg)) { $postContent = apply_filters('the_content', nxs_doQTrans($post->post_content, $lng));\r
+    $postContent = strip_tags(strip_shortcodes(str_ireplace('<!--more-->', '#####!--more--!#####', str_ireplace("&lt;!--more--&gt;", '<!--more-->', $postContent))));\r
+    if (stripos($postContent, '#####!--more--!#####')!==false) { $postContentEx = explode('#####!--more--!#####',$postContent); $postContent = $postContentEx[0]; }    \r
+      else $postContent = nsTrnc($postContent, $options['anounTagLimit'], ' ', '');  $msg = str_ireplace("%PANNOUNCE%", $postContent, $msg);\r
+  } \r
+  if (preg_match('/%ANNOUNCER%/', $msg)) { $postContent = nxs_doQTrans($post->post_content, $lng);     \r
+    $postContent = strip_tags(strip_shortcodes(str_ireplace('<!--more-->', '#####!--more--!#####', str_ireplace("&lt;!--more--&gt;", '<!--more-->', $postContent))));\r
+    if (stripos($postContent, '#####!--more--!#####')!==false) { $postContentEx = explode('#####!--more--!#####',$postContent); $postContent = $postContentEx[1]; }    \r
+      else $postContent = str_replace(nsTrnc($postContent, $options['anounTagLimit'], ' ', ''), '', $postContent);  $msg = str_ireplace("%ANNOUNCER%", $postContent, $msg);\r
+  }  \r
+  if (preg_match('/%PANNOUNCER%/', $msg)) { $postContent = apply_filters('the_content', nxs_doQTrans($post->post_content, $lng));\r
+    $postContent = strip_tags(strip_shortcodes(str_ireplace('<!--more-->', '#####!--more--!#####', str_ireplace("&lt;!--more--&gt;", '<!--more-->', $postContent))));\r
+    if (stripos($postContent, '#####!--more--!#####')!==false) { $postContentEx = explode('#####!--more--!#####',$postContent); $postContent = $postContentEx[1]; }    \r
+      else $postContent = str_replace(nsTrnc($postContent, $options['anounTagLimit'], ' ', ''), '', $postContent);  $msg = str_ireplace("%PANNOUNCER%", $postContent, $msg);\r
+  } \r
+  if (preg_match('/%EXCERPT%/', $msg)) {      \r
+    if ($post->post_excerpt!="") $excerpt = strip_tags(strip_shortcodes(apply_filters('the_content', nxs_doQTrans($post->post_excerpt, $lng)))); \r
+      else $excerpt= nsTrnc(strip_tags(strip_shortcodes(apply_filters('the_content', nxs_doQTrans($post->post_content, $lng)))), 300, " ", "..."); \r
+    $msg = str_ireplace("%EXCERPT%", $excerpt, $msg);\r
+  }  \r
+  if (preg_match('/%RAWEXCERPT%/', $msg)) {      \r
+    if ($post->post_excerpt!="") $excerpt = strip_tags(strip_shortcodes(nxs_doQTrans($post->post_excerpt, $lng))); else $excerpt= nsTrnc(strip_tags(strip_shortcodes(nxs_doQTrans($post->post_content, $lng))), 300, " ", "..."); \r
+    $msg = str_ireplace("%RAWEXCERPT%", $excerpt, $msg);\r
+  }\r
+  if (preg_match('/%RAWEXCERPTHTML%/', $msg)) { \r
+      if ($post->post_excerpt!="") $excerpt = strip_shortcodes(nxs_doQTrans($post->post_excerpt, $lng)); else $excerpt= nsTrnc(strip_tags(strip_shortcodes(nxs_doQTrans($post->post_content, $lng))), 300, " ", "..."); \r
+       $msg = str_ireplace("%RAWEXCERPTHTML%", $excerpt, $msg);\r
+  }\r
+  if (preg_match('/%TAGS%/', $msg)) { $t = wp_get_object_terms($postID, 'product_tag'); if ( empty($t) || is_wp_error($pt) || !is_array($t) ) $t = wp_get_post_tags($postID);\r
+    $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = implode(', ',$tggs); $msg = str_ireplace("%TAGS%", $tags, $msg);\r
+  }\r
+  if (preg_match('/%CATS%/', $msg)) { $t = wp_get_post_categories($postID); $cats = array();  foreach($t as $c){ $cat = get_category($c); $cats[] = str_ireplace('&','&amp;',$cat->name); } \r
+          $ctts = implode(', ',$cats); $msg = str_ireplace("%CATS%", $ctts, $msg);\r
+  }\r
+  if (preg_match('/%HCATS%/', $msg)) { $t = wp_get_post_categories($postID); $cats = array();  \r
+    foreach($t as $c){ $cat = get_category($c);  $cats[] = "#".trim(str_replace(' ',$htS, str_replace('  ', ' ', trim(str_ireplace('&','',str_ireplace('&amp;','',$cat->name)))))); } \r
+    $ctts = implode($htSep,$cats); $msg = str_ireplace("%HCATS%", $ctts, $msg);\r
+  }  \r
+  if (preg_match('/%HTAGS%/', $msg)) { $t = wp_get_object_terms($postID, 'product_tag'); if ( empty($t) || is_wp_error($pt) || !is_array($t) ) $t = wp_get_post_tags($postID);\r
+    $tggs = array(); foreach ($t as $tagA){$tggs[] = "#".trim(str_replace(' ', $htS, preg_replace('/[^a-zA-Z0-9\p{L}\p{N}\s]/u', '', trim(nxs_ucwords(str_ireplace('&','',str_ireplace('&amp;','',$tagA->name)))))));} \r
+    $tags = implode($htSep,$tggs); $msg = str_ireplace("%HTAGS%", $tags, $msg);\r
+  } \r
+  if (preg_match('/%+CF-[a-zA-Z0-9-_]+%/', $msg)) { $msgA = explode('%CF', $msg); $mout = '';\r
+    foreach ($msgA as $mms) { \r
+        if (substr($mms, 0, 1)=='-' && stripos($mms, '%')!==false) { $mGr = CutFromTo($mms, '-', '%'); $cfItem =  get_post_meta($postID, $mGr, true);  $mms = str_ireplace("-".$mGr."%", $cfItem, $mms); } $mout .= $mms; \r
+    } $msg = $mout; \r
+  }  \r
+  $mm = array(); if (preg_match_all('/%H?CT-[a-zA-Z0-9_]+%/', $msg, $mm)) { $msgA = explode('%CT', str_ireplace("%HCT", "%CT", $msg)); $mout = ''; $i = 0;\r
+    foreach ($msgA as $mms) { \r
+      if (substr($mms, 0, 1)=='-' && stripos($mms, '%')!==false){ $h = strpos($mm[0][$i],'%HCT-')!==false; $i++; $mGr=CutFromTo($mms,'-','%'); $cfItem=wp_get_post_terms($postID,$mGr,array("fields"=>"names"));\r
+        if (is_nxs_error($cfItem)) {nxs_addToLogN('E', 'Error', 'MSG', '-=ERROR=- '.$mGr.'|'.print_r($cfItem, true), '');  $mms=str_ireplace("-".$mGr."%",'',$mms);   } else { $tggs = array(); \r
+          foreach ($cfItem as $frmTag) { if ($h) $frmTag = trim(str_replace(' ', $htS, preg_replace('/[^a-zA-Z0-9\p{L}\p{N}\s]/u', '', trim(nxs_ucwords(str_ireplace('&','',str_ireplace('&amp;','',$frmTag)))))));\r
+              $tggs[] = ($h?'#':'').$frmTag; \r
+          } $cfItem = implode(' ',$tggs); $mms=str_ireplace("-".$mGr."%",$cfItem,$mms);    \r
+        }\r
+      } $mout.=$mms;  \r
+    } $msg = $mout; \r
+  }\r
+  if (preg_match('/%FULLTEXT%/', $msg)) { $postContent = apply_filters('the_content', nxs_doQTrans($post->post_content, $lng)); $msg = str_ireplace("%FULLTEXT%", $postContent, $msg);}                    \r
+  if (preg_match('/%RAWTEXT%/', $msg)) { $postContent = nxs_doQTrans($post->post_content, $lng); $msg = str_ireplace("%RAWTEXT%", $postContent, $msg);}\r
+  if (preg_match('/%SITENAME%/', $msg)) { $siteTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); $msg = str_ireplace("%SITENAME%", $siteTitle, $msg);}      \r
+  if (isset($ShownAds)) $ShownAds = $ShownAdsL; // FIX for the quick-adsense plugin\r
+  return trim($msg);\r
+}}\r
+\r
+if (!function_exists("nxs_mbConvertCaseUTF8var")){ function nxs_mbConvertCaseUTF8var($s) { $arr = preg_split("//u", $s, -1, PREG_SPLIT_NO_EMPTY); $result = ""; $mode = false; \r
+  foreach ($arr as $char) { $res = preg_match('/\\p{Mn}|\\p{Me}|\\p{Cf}|\\p{Lm}|\\p{Sk}|\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Sk}|\\p{Cs}/u', $char) == 1; \r
+    if ($mode) { if (!$res)$mode = false; } elseif ($res) { $mode = true; $char = mb_convert_case($char, MB_CASE_TITLE, "UTF-8"); } $result .= $char; \r
+  } return $result; \r
+}} \r
+if (!function_exists("nxs_ucwords")){ function nxs_ucwords($str) { if (function_exists("mb_convert_case")) return nxs_mbConvertCaseUTF8var($str); else return ucwords($str); }}\r
+\r
+if (!function_exists("nxs_getURL")){ function nxs_getURL($options, $postID, $addURLParams='') { global $plgn_NS_SNAutoPoster; $gOptions = $plgn_NS_SNAutoPoster->nxs_options; \r
+  if (!isset($options['urlToUse']) || trim($options['urlToUse'])=='') $myurl =  trim(get_post_meta($postID, 'snap_MYURL', true));\r
+  $ssl = (!empty($gOptions['ht']) && $gOptions['ht'] == ord('h')); if (!empty($myurl)) $options['urlToUse'] = $myurl;\r
+  if ((isset($options['urlToUse']) && trim($options['urlToUse'])!='') || $ssl) { $options['atchUse'] = 'F'; } else $options['urlToUse'] = get_permalink($postID);      \r
+  $options['urlToUse'] = $ssl?$gOptions['useSSLCert']:$options['urlToUse']; // $addURLParams = trim($gOptions['addURLParams']);  \r
+  if($addURLParams!='') $options['urlToUse'] .= (strpos($options['urlToUse'],'?')!==false?'&':'?').$addURLParams;  $forceSURL = trim(get_post_meta($postID, '_snap_forceSURL', true));\r
+  if (empty($forceSURL)) $forceSURL = !empty($options['forceSURL']); else $forceSURL = $forceSURL =='1'; if (!empty($options['suUName'])) $forceSURL = false; //## SU does not allow Shorteners\r
+  if ($forceSURL) $options['urlToUse'] = nxs_mkShortURL($options['urlToUse'], $postID); return $options;\r
+}}\r
+\r
+if (!function_exists('nxs_showListRow')){function nxs_showListRow($ntParams) { $ntInfo = $ntParams['ntInfo']; $nxs_plurl = $ntParams['nxs_plurl']; $ntOpts = $ntParams['ntOpts'];  ?>\r
+          <div class="nxs_box">\r
+            <div class="nxs_box_header"> \r
+              <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?>\r
+              <?php $cbo = count($ntOpts); ?> \r
+              <?php if ($cbo>1){ ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?>\r
+              </div>\r
+            </div>\r
+            <div class="nxs_box_inside">            \r
+            <?php if(!empty($ntParams['checkFunc']) &&  !function_exists($ntParams['checkFunc']['funcName'])) echo $ntParams['checkFunc']['msg']; else foreach ($ntOpts as $indx=>$pbo){  if (trim($pbo['nName']=='')) $pbo['nName'] = $ntInfo['name']; \r
+              if (empty($pbo[$ntInfo['lcode'].'OK'])) $pbo[$ntInfo['lcode'].'OK'] = !empty($pbo[$ntParams['chkField']])?'1':''; ?>\r
+              <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />\r
+              <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && ((isset($pbo['catSel']) && (int)$pbo['catSel'] == 1)||(!empty($pbo['tagsSel'])))) { ?> <input type="radio" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>\r
+                <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />             \r
+                <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />             \r
+              <?php } ?>       \r
+              <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ",")+1)."]*" ?></span><?php } ?>\r
+              <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>\r
+              <strong><?php  _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>\r
+              &nbsp;&nbsp;<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php  _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==&gt;</b><?php } ?>\r
+              <a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php  _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;          \r
+              <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php  _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>\r
+              </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div>\r
+            <?php } ?>\r
+            </div>\r
+          </div> <?php            \r
+        }\r
+}\r
+\r
+if (!function_exists("nxs_get_admin_url")) { function nxs_get_admin_url($path=''){ //## Workaround for some buggy 'admin hiding' plugins.\r
+  $admURL = admin_url($path); if (substr($admURL, 0, 4)!='http') { $admURL = admin_url($path, 'https'); $admURL = str_ireplace('https://', 'http://', $admURL);} return $admURL;\r
+}}\r
+//## Process Spin \r
+if (!function_exists("nxs_spinRecursion")) { function nxs_spinRecursion(&$txt, $startCh) { global $nxs_spin_lCh, $nxs_spin_rCh, $nxs_spin_splCh; $startPos = $startCh;\r
+  while ($startCh++ < strlen($txt)) {\r
+    if (substr($txt, $startCh, strlen($nxs_spin_lCh)) == $nxs_spin_lCh)  $txt = nxs_spinRecursion($txt, $startCh);\r
+    elseif (substr($txt, $startCh, strlen($nxs_spin_rCh)) == $nxs_spin_rCh) {\r
+      $tmpTxt = substr($txt, $startPos+strlen($nxs_spin_lCh), ($startCh - $startPos)-strlen($nxs_spin_rCh));\r
+      $toRepl = nxs_spinReplace($tmpTxt); $txt = str_replace($nxs_spin_lCh.$tmpTxt.$nxs_spin_rCh, $toRepl, $txt);\r
+    }\r
+  } return $txt;\r
+}}\r
+if (!function_exists("nxs_spinReplace")) { function nxs_spinReplace($txt) { global $nxs_spin_splCh; $txt = explode($nxs_spin_splCh, $txt);  $out = $txt[mt_rand(0,count($txt)-1)]; return $out; }}\r
+if (!function_exists("nxs_doSpin")) { function nxs_doSpin($msg){  global $nxs_spin_lCh, $nxs_spin_rCh, $nxs_spin_splCh;\r
+    $nxs_spin_lCh = '{'; $nxs_spin_rCh='}'; $nxs_spin_splCh='|'; $msg = nxs_spinRecursion($msg, -1); return $msg;\r
+}}\r
+\r
+if (!function_exists("nxs_getImgfrOpt")) { function nxs_getImgfrOpt($imgOpts, $defSize=''){ if (!is_array($imgOpts)) return $imgOpts;// prr($imgOpts);\r
+   if ($defSize!='' && isset($imgOpts[$defSize]) && trim($imgOpts[$defSize])!='') return $imgOpts[$defSize];\r
+   if (isset($imgOpts['large']) && trim($imgOpts['large'])!='') return $imgOpts['large'];\r
+   if (isset($imgOpts['original']) && trim($imgOpts['original'])!='') return $imgOpts['original'];\r
+   if (isset($imgOpts['thumb']) && trim($imgOpts['thumb'])!='') return $imgOpts['thumb'];\r
+   if (isset($imgOpts['medium']) && trim($imgOpts['medium'])!='') return $imgOpts['medium'];\r
+}}\r
+\r
+if (!function_exists("nxs_memCheck")) { function nxs_memCheck() { global $nxs_snapThisPageUrl;  $mLimit = (int) ini_get('memory_limit'); $mLimit = empty($mLimit) ? __('N/A') :$mLimit . __(' MByte');\r
+  $mUsage = function_exists('memory_get_usage') ? round(memory_get_usage() / 1024 / 1024, 2) : 0; $mUsage = empty($mUsage) ? __('N/A') : $mUsage . __(' MByte'); ?>\r
+    <div><strong><?php _e('PHP Version'); ?></strong>: <span><?php echo PHP_VERSION; ?>;&nbsp;</span>\r
+      <strong><?php _e('Memory limit'); ?></strong>: <span><?php echo $mLimit; ?>; &nbsp;</span>\r
+      <strong><?php _e('Memory usage'); ?></strong>: <span><?php echo $mUsage; ?>; &nbsp;</span>\r
+      &nbsp;&nbsp;<a target="_blank" href="<?php echo $nxs_snapThisPageUrl; ?>&do=test">Check HTTPS/SSL</a>\r
+      &nbsp;&nbsp;<a target="_blank" href="<?php echo $nxs_snapThisPageUrl; ?>&do=crtest">Show Cron Test Results</a>\r
+    </div> <?php\r
+}}\r
+//## Check SSL Sec\r
+if (!function_exists("nxsCheckSSLCurl")){function nxsCheckSSLCurl($url){\r
+  $ch = curl_init($url); $headers = array(); $headers[] = 'Accept: text/html, application/xhtml+xml, */*'; $headers[] = 'Cache-Control: no-cache';\r
+  $headers[] = 'Connection: Keep-Alive'; $headers[] = 'Accept-Language: en-us';  curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\r
+  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"); \r
+  $content = curl_exec($ch); $err = curl_errno($ch); $errmsg = curl_error($ch); if ($err!=0) return array('errNo'=>$err, 'errMsg'=>$errmsg); else return false;\r
+}}\r
+if (!function_exists("nxs_cron_check")){function nxs_cron_check() { if (stripos($_SERVER["REQUEST_URI"], 'wp-cron.php')!==false) {  \r
+  $cronCheckArray = get_option('NXS_cronCheck'); if (empty($cronCheckArray)) $cronCheckArray = array('cronCheckStartTime'=>time(), 'cronChecks'=>array());    \r
+  if (($cronCheckArray['cronCheckStartTime']+900)>time()) {  ( $offset = get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );\r
+    $cronCheckArray['cronChecks'][] = '['.date_i18n('Y-m-d H:i:s', $_SERVER["REQUEST_TIME"]+$offset).'] - WP Cron called from '.$_SERVER["REMOTE_ADDR"].' ('.$_SERVER["HTTP_USER_AGENT"].')';\r
+    //nxs_addToLogN('S', 'Cron Check', '', 'WP Cron called from '.$_SERVER["REMOTE_ADDR"].' ('.$_SERVER["HTTP_USER_AGENT"].')', date_i18n('Y-m-d H:i:s', $_SERVER["REQUEST_TIME"]+$offset));\r
+  } elseif (empty($cronCheckArray['status']) &&  is_array($cronCheckArray['cronChecks'])) $cronCheckArray['status'] = (count($cronCheckArray['cronChecks'])<17 && count($cronCheckArray['cronChecks'])>1)?1:0;\r
+  update_option("NXS_cronCheck", $cronCheckArray);    \r
+}}}\r
+\r
+function nxs_show_noLibWrn($msg){ ?> <div style="border: 2px solid darkred; padding: 25px 15px 15px 15px; margin: 3px; background-color: #fffaf0;"> \r
+            <span style="font-size: 16px; color:darkred;"><?php echo $msg ?></span>&nbsp;<a href="http://www.nextscripts.com/faq/third-party-libraries-autopost-google-pinterest/" target="_blank">More info about third party libraries.</a><br/><hr/> <div style="font-size: 16px; color:#005800; font-weight: bold; margin-top: 12px; margin-bottom: 7px;">You can get API library from NextScripts.</div>\r
+            <div style="padding-bottom: 5px;"><a href="http://www.nextscripts.com/snap-api/">SNAP API Libarary</a> adds autoposting to:</div> <span class="nxs_txtIcon nxs_ti_gp">Google+</span>, <span class="nxs_txtIcon nxs_ti_pn">Pinterest</span>, <span class="nxs_txtIcon nxs_ti_rd">Reddit</span>, <span class="nxs_txtIcon nxs_ti_bg">Blogger</span>,&nbsp;&nbsp;<span class="nxs_txtIcon nxs_ti_yt">YouTube</span>,&nbsp;&nbsp;<span class="nxs_txtIcon nxs_ti_fp">Flipboard</span>, <span class="nxs_txtIcon nxs_ti_li">LinkedIn Company Pages and Groups</span><br><br>          \r
+            All NextScripts SNAP API libraries are included and automatically installed with the  <a href="http://www.nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts/" target="_blank">"Pro" (Multiaccount) Edition of the SNAP plugin</a>. Pro version upgrade also adds the ability to configure more then one account for each social network and some addidional features.<br><br>\r
+            <div align="center"><a target="_blank" href="http://www.nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts/#getit" class="NXSButton" id="nxs_snapUPG">Get SNAP Pro Plugin with SNAP API</a></div>\r
+            <div style="font-size: 10px; margin-top: 20px;">*If you already have API, please follow instructions from the readme.txt file.</div>\r
+          </div> <?php \r
+}\r
+\r
+if (!function_exists("nxs_save_glbNtwrks")) { function nxs_save_glbNtwrks($nt, $ii, $ntOptsOrVal, $field='', $networks='')  { if (empty($networks)) {\r
+    if (class_exists('NS_SNAutoPoster')) { global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) $plgn_NS_SNAutoPoster = new nxs_SNAP(); $networks = $plgn_NS_SNAutoPoster->nxs_options; } \r
+      elseif (function_exists("nxs_settings_open")) $networks = nxs_settings_open();\r
+  } if(!empty($field)) $networks[$nt][$ii][$field] = $ntOptsOrVal; else $networks[$nt][$ii] = $ntOptsOrVal; nxs_save_ntwrksOpts($networks);   \r
+  if (isset($plgn_NS_SNAutoPoster)) $plgn_NS_SNAutoPoster->nxs_options = $networks;\r
+}}\r
+\r
+if (!function_exists("nxs_save_ntwrksOpts")) { function nxs_save_ntwrksOpts($networks) { if (function_exists('nxs_settings_save')) nxs_settings_save($networks);\r
+  if (function_exists('get_option')) { if (!empty($networks)) update_option('NS_SNAutoPoster', $networks);  }    \r
+}}\r
+\r
+function nxs_toolbar_link_to_mypage( $wp_admin_bar ) {\r
+    $args = array(\r
+        'id'    => 'snap-post',\r
+        'title' => '<span style="font-weight:bold; color:#2ecc2e;">{SNAP} </span> New Post to Social Networks',\r
+        'parent' => 'new-content',\r
+        'href'  => '#',        \r
+        'meta'  => array( 'class' => 'my-toolbar-page', 'onclick'  => 'nxs_showNewPostFrom();return false;' )\r
+    );\r
+    $wp_admin_bar->add_node( $args );\r
+}\r
+\r
+if (!function_exists('nxs_remote_request')){function nxs_remote_request($url, $args = array()) { return wp_remote_request($url, $args); }}\r
+if (!function_exists('nxs_remote_get')){function nxs_remote_get($url, $args = array()) { return wp_remote_get($url, $args); }}\r
+if (!function_exists('nxs_remote_post')){function nxs_remote_post($url, $args = array()) { return wp_remote_post($url, $args); }}\r
+if (!function_exists('nxs_remote_head')){function nxs_remote_head($url, $args = array()) { return wp_remote_head($url, $args); }}\r
+if (!function_exists('is_nxs_error')){function is_nxs_error($thing) { return is_wp_error($thing); }}\r
+if (!function_exists('nxs_parse_args')){function nxs_parse_args($args, $defaults='') { return wp_parse_args($args, $defaults); }}\r
+\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/nxs_snap_class.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/nxs_snap_class.php
new file mode 100644 (file)
index 0000000..1774611
--- /dev/null
@@ -0,0 +1,963 @@
+<?php\r
+//## Define SNAutoPoster class\r
+if (!class_exists("NS_SNAutoPoster")) {\r
+    class NS_SNAutoPoster {//## General Functions         \r
+        var $dbOptionsName = "NS_SNAutoPoster";       \r
+        var $nxs_options = ""; var $nxs_ntoptions = ""; var $sMode = array('s'=>'S', 'l'=>'F', 'u'=>'O', 'a'=>'S'); \r
+        \r
+        function __construct() {  load_plugin_textdomain('social-networks-auto-poster-facebook-twitter-g', FALSE, substr(dirname( plugin_basename( __FILE__ ) ), 0, -4).'/lang/'); $this->nxs_options = $this->getAPOptions(); } \r
+        //## Constructor\r
+        function NS_SNAutoPoster() { }\r
+        //## Initialization function\r
+        function init() { $this->nxs_options = $this->getAPOptions(); }\r
+        //## Administrative Functions\r
+        //## Options loader function\r
+        function getAPOptions() { global $nxs_isWPMU, $blog_id; $dbMUOptions = array();  \r
+            //## Some Default Values            \r
+            //$options = array('nsOpenGraph'=>1);            \r
+            $dbOptions = get_option($this->dbOptionsName);  $dbOptions['ver'] = 306;  $this->nxs_ntoptions = get_site_option($this->dbOptionsName); $nxs_UPPath = 'nxs-snap-pro-upgrade'; \r
+            $dir = plugin_dir_path( __FILE__ ); $dir = explode('social-networks-auto-poster-facebook-twitter-g', $dir); $dir = $dir[0]; \r
+            $pf = $dir.$nxs_UPPath.'/'.$nxs_UPPath.'.php'; if (file_exists($pf) && !function_exists('nxs_getInitAdd') ) require_once $pf;          \r
+            if ($nxs_isWPMU && $blog_id>1) { global $wpdb;  switch_to_blog(1); //$dbMUOptions = get_option($this->dbOptionsName);  \r
+              $row = $wpdb->get_row("SELECT option_value from ".$wpdb->options." WHERE option_name='NS_SNAutoPoster'"); if ( is_object( $row ) ) $dbMUOptions = maybe_unserialize($row->option_value);\r
+              if (function_exists('nxs_getInitAdd')) nxs_getInitAdd($dbMUOptions); restore_current_blog(); \r
+              $dbOptions['lk'] = $dbMUOptions['lk']; $dbOptions['ukver'] = $dbMUOptions['ukver']; $dbOptions['uklch'] = $dbMUOptions['uklch']; $dbOptions['uk'] = $dbMUOptions['uk'];\r
+            }            \r
+            if (!empty($dbOptions) && is_array($dbOptions)) foreach ($dbOptions as $key => $option) if (trim($key)!='') $options[$key] = $option; \r
+            if ( (!$nxs_isWPMU || $blog_id==1) && function_exists('nxs_getInitAdd')) nxs_getInitAdd($options); \r
+            if (!empty($options['uk'])) $options['uk']='API'; if (defined('NXSAPIVER') && (empty($options['ukver']) || $options['ukver']!=NXSAPIVER)){$options['ukver']=NXSAPIVER; update_option($this->dbOptionsName, $options);}            \r
+            if (!empty($options['ukver']) && $options['ukver'] == nsx_doDecode('q234t27414r2q2')) $options['ht'] = 104;\r
+            $options['isMA'] = function_exists('nxs_doSMAS1') && isset($options['lk']) && isset($options['uk']) && $options['uk']!='';   \r
+            $options['isMU'] = function_exists('showSNAP_WPMU_OptionsPageExt') && isset($options['lk']) && isset($options['uk']) && $options['uk']!='';   \r
+            $options['isMUx'] = function_exists('showSNAP_WPMU_OptionsPageExtX') && isset($options['lk']) && isset($options['uk']) && $options['uk']!=''; //  prr($options);\r
+            if (isset($options['skipSSLSec'])) $nxs_skipSSLCheck = $options['skipSSLSec']; $options['useSSLCert'] = nsx_doDecode('8416o4u5d4p2o22646060474k5b4t2a4u5s4');\r
+            if(!empty($options['K1']) && $options['K1']=='1') $options = array('isMA'=>false);            \r
+            \r
+            $liGRP = 0; if (!empty($options) && !empty($options['li'])) foreach ($options['li'] as $lii) if (!empty($lii['grpID'])) $liGRP++;\r
+            if ($liGRP>0) {\r
+              if (!function_exists("nxs_noLiGrps")) { function nxs_noLiGrps() { global $nxs_snapThisPageUrl; echo '<div class="error"><p><b>Message from NextScripts SNAP Plugin for Wordpress</b></p><p><a target="_blank" href="https://developer.linkedin.com/support/developer-program-transition">LinkedIn has discontinued support for groups</a> from it\'s free native API. You have  LinkedIn group accounts configured. Please switch those accounts to NextScipts API or remove them</p></div>'; } add_action( 'admin_notices', 'nxs_noLiGrps' ); }\r
+            } \r
+            $bgFree = 0; if ( (!class_exists('nxsAPI_GP')) && !empty($options) && !empty($options['bg']) ) foreach ($options['bg'] as $lii) if (!empty($lii['bgUName']) && empty($lii['APIKey'])) $bgFree++;\r
+            if ($bgFree>0) {\r
+              if (!function_exists("nxs_noBGFree")) { function nxs_noBGFree() { global $nxs_snapThisPageUrl; echo '<div class="error"><p><b>Message from NextScripts SNAP Plugin for Wordpress</b></p><p><a target="_blank" href="https://developers.google.com/identity/protocols/AuthForInstalledApps">Blogger has discontinued support for "ClientLogin"</a> authentication method that SNAP was using for several years.   You have Blogger accounts configured. Please either remove those accounts and re-setup with oAuth authentication method or get <a href="'.$nxs_snapThisPageUrl.'">Premium NextScipts API</a></p></div>'; } add_action( 'admin_notices', 'nxs_noBGFree' ); }\r
+            }           \r
+            return $options;\r
+        }\r
+  \r
+        function showSNAP_WPMU_OptionsPage(){ global $nxs_snapAvNts, $nxs_snapThisPageUrl, $nxsOne, $wpdb, $nxs_isWPMU; $nxsOne = ''; $options = $this->nxs_options; \r
+          $this->NS_SNAP_ShowPageTop();  \r
+          if ($nxs_isWPMU && function_exists('showSNAP_WPMU_OptionsPageExt')) { showSNAP_WPMU_OptionsPageExt($this); } elseif ($nxs_isWPMU && function_exists('showSNAP_WPMU_OptionsPageExtX')) { ?>          \r
+              <br/><br/><b style="font-size:16px; line-height:24px; color:red;">You are running SNAP <?php echo $options['isMA']?'Single Site Pro':'Free'; ?> <br/> </b>               \r
+              This version does not fully support Wordpress Multisite (ex Wordpress MU) Advanced Features. SNAP is available for all sites/blogs in your networks and each individual blog admin can setup and manage it.\r
+              <br/>Please upgrade to <a href="http://www.nextscripts.com/social-networks-auto-poster-pro-for-wpmu/" target="_blank"> SNAP For Wordpress Multisite</a> if you need advanced Super Admin management of SNAP for sites/blogs in your networks. Please see <a href="http://www.nextscripts.com/social-networks-auto-poster-pro-for-wpmu/" target="_blank">here</a> for more info              \r
+              <br/><br/>Please <a href="http://www.nextscripts.com/contact-us/" target="_blank"> contact us</a> if you got the SNAP PRO before Oct 1st, 2012. You may be eligible for upgrade discount.              \r
+               <br/><br/>               \r
+               <?php return;\r
+          } elseif ( !$options['isMA']) { \r
+               ?> <br/><br/><b style="font-size:16px; line-height:24px; color:red;">You are running SNAP <?php echo $options['isMA']?'Single Site Pro':'Free'; ?> <br/> This version does not support Wordpress Multisite (ex Wordpress MU). <br/>Please upgrade to <a href="http://www.nextscripts.com/social-networks-auto-poster-pro-for-wpmu/" target="_blank"> SNAP Pro for Wordpress Multisite</a></b> \r
+               <br/><br/><hr/>\r
+               <h3>FAQ:</h3> <b>Question:</b> I am not running Wordpress Multisite! Why I am seeing this?<br/><b>Answer:</b>               \r
+               Your Wordpress is configured to run as a Wordpress Multisite. Please open your wp-config.php and change: <br/><br/>\r
+define('WP_ALLOW_MULTISITE', true);<br/>to<br/>define('WP_ALLOW_MULTISITE', false);<br/><br/>and<br/><br/>define('MULTISITE', true);<br/>to<br/>define('MULTISITE', false);<br/><br/>\r
+<b>Question:</b> I am running Wordpress Multisite, but I need SNAP on one blog only? Can I use it?<br/><b>Answer:</b>We are sorry, but it is not possible to run "SNAP Free" on Wordpress Multisite. You need to either upgrade plugin to "SNAP Pro" to run it on one blog or to "SNAP Pro for WPNU" to run it on all blogs or disable Wordpress Multisite.          \r
+<br/><br/><hr/>     \r
+               <?php return; \r
+          } else {\r
+               ?> <br/><b style="font-size:16px; line-height:24px; color:red;">You are running SNAP <?php echo $options['isMA']?'Single Site Pro':'Free'; ?> <br/> This version does not fully support Wordpress Multisite (ex Wordpress MU).</b> <br/>\r
+               \r
+               <br/><span style="font-size: 16px;"> You can use SNAP for your main blog only. <a href="<?php echo nxs_get_admin_url(); ?>options-general.php?page=NextScripts_SNAP.php">Click here to setup it.</a></span><br/><br/>\r
+               \r
+               <span style="font-size: 12px; font-weight: bold;">Please upgrade to <a href="http://www.nextscripts.com/social-networks-auto-poster-pro-for-wpmu/" target="_blank"> SNAP Pro for Wordpress Multisite</a> to get all features:  </span>              \r
+               <br/>\r
+- All Blogs/Sites autopost to networks configured by Super Admin    <br/>\r
+- Each Blog/Site Admin can configure and auto-post to it's own networks  <br/>  \r
+- Super Admin can enable/disable auto-posting for each site and the whole network<br/>\r
+- Super Admin can also manage/setup/disable/override SNAP settings for each Blog/Site.<br/>\r
+               \r
+               <br/>\r
+               <?php return; \r
+          }\r
+        }\r
+        \r
+        function showSNAutoPosterOptionsPage() { global $nxs_snapAvNts, $nxs_snapThisPageUrl, $nxsOne, $nxs_plurl, $nxs_isWPMU, $nxs_tpWMPU; $cst=strrev('enifed'); $nxsOne = ''; $options = $this->nxs_options; $trrd=0;\r
+          //if($acid==1) $options = $this->nxs_options;  else { switch_to_blog($acid); $options = $this->getAPOptions(); }\r
+          if (function_exists('nxs_doSMAS2')) { $rf = new ReflectionFunction('nxs_doSMAS2'); $trrd++; $rff = $rf->getFileName(); if (stripos($rff, "'d code")===false) $cst(chr(100).$trrd,$trrd); }\r
+          //## Import Settings            \r
+          if (isset($_POST['upload_NS_SNAutoPoster_settings'])) { if (get_magic_quotes_gpc() || $_POST['nxs_mqTest']=="\'") {array_walk_recursive($_POST, 'nsx_stripSlashes');}  array_walk_recursive($_POST, 'nsx_fixSlashes');             \r
+            $secCheck =  wp_verify_nonce($_POST['nxsChkUpl_wpnonce'], 'nxsChkUpl');\r
+            if ($secCheck!==false && isset($_FILES['impFileSettings_button']) && is_uploaded_file($_FILES['impFileSettings_button']['tmp_name'])) { $fileData = trim(file_get_contents($_FILES['impFileSettings_button']['tmp_name']));\r
+              while (substr($fileData, 0,1)!=='a') $fileData = substr($fileData, 1);              \r
+              $uplOpt = maybe_unserialize($fileData); if (is_array($uplOpt) && isset($uplOpt['imgNoCheck'])) { $options = $uplOpt; $this->nxs_options = $options;  update_option($this->dbOptionsName, $options); } else { ?><div class="error" id="message"><p><strong>Incorrect Import file.</div><?php } \r
+            } \r
+          }\r
+          //## Save Settings\r
+          if (isset($_POST['nxsMainFromElementAccts']) || isset($_POST['nxsMainFromSupportFld'])) { check_ajax_referer('nxsSsPageWPN'); \r
+            if (get_magic_quotes_gpc() || (!empty($_POST['nxs_mqTest']) && $_POST['nxs_mqTest']=="\'")) {array_walk_recursive($_POST, 'nsx_stripSlashes');}  array_walk_recursive($_POST, 'nsx_fixSlashes'); \r
+            //## Load Networks Settings update_NS_SNAutoPoster_settings\r
+            $acctsInfoPost = $_POST['nxsMainFromElementAccts']; unset($_POST['nxsMainFromElementAccts']);  $acctsInfo = array();  \r
+            $acctsInfo = NXS_parseQueryStr($acctsInfoPost); // prr($acctsInfo);\r
+            \r
+            foreach ($nxs_snapAvNts as $avNt) if (isset($acctsInfo[$avNt['lcode']])) { $clName = 'nxs_snapClass'.$avNt['code']; if (!isset($options[$avNt['lcode']])) $options[$avNt['lcode']] = array(); \r
+              $ntClInst = new $clName(); $ntOpt = $ntClInst->setNTSettings($acctsInfo[$avNt['lcode']], $options[$avNt['lcode']]); $options[$avNt['lcode']] = $ntOpt;\r
+            }           \r
+            if (isset($_POST['apCats']))      $options['apCats'] = $_POST['apCats'];                \r
+            if (isset($_POST['nxsHTDP']))     $options['nxsHTDP'] = $_POST['nxsHTDP'];                \r
+            if (isset($_POST['ogImgDef']))    $options['ogImgDef'] = $_POST['ogImgDef'];\r
+            if (isset($_POST['featImgLoc']))  $options['featImgLoc'] = $_POST['featImgLoc'];            \r
+            if (isset($_POST['anounTagLimit']))  $options['anounTagLimit'] = $_POST['anounTagLimit'];                        \r
+            if (isset($_POST['nxsHTSpace']))  $options['nxsHTSpace'] = $_POST['nxsHTSpace']; else $options['nxsHTSpace'] = "";\r
+            if (isset($_POST['nxsHTSepar']))  $options['nxsHTSepar'] = $_POST['nxsHTSepar']; else $options['nxsHTSepar'] = "c_";\r
+            if (isset($_POST['featImgLocPrefix']))  $options['featImgLocPrefix'] = $_POST['featImgLocPrefix'];\r
+            if (isset($_POST['featImgLocArrPath']))  $options['featImgLocArrPath'] = $_POST['featImgLocArrPath'];\r
+            if (isset($_POST['featImgLocRemTxt']))  $options['featImgLocRemTxt'] = $_POST['featImgLocRemTxt'];\r
+            \r
+            if (isset($_POST['extDebug']))   $options['extDebug'] = $_POST['extDebug'];  else $options['extDebug'] = 0;\r
+            if (isset($_POST['numLogRows']))  $options['numLogRows'] = $_POST['numLogRows'];\r
+            \r
+            if (isset($_POST['errNotifEmailCB']))   $options['errNotifEmailCB'] = 1;  else $options['errNotifEmailCB'] = 0;\r
+            if (isset($_POST['errNotifEmail']))$options['errNotifEmail'] = $_POST['errNotifEmail']; \r
+            \r
+            if (isset($_POST['forceBrokenCron']))   $options['forceBrokenCron'] = 1;  else $options['forceBrokenCron'] = 0;            \r
+            \r
+            if (isset($_POST['nxsURLShrtnr']))$options['nxsURLShrtnr'] = $_POST['nxsURLShrtnr']; \r
+            if (isset($_POST['bitlyUname']))  $options['bitlyUname'] = $_POST['bitlyUname']; \r
+            if (isset($_POST['bitlyAPIKey'])) $options['bitlyAPIKey'] = $_POST['bitlyAPIKey']; \r
+            \r
+            if (isset($_POST['adflyUname']))  $options['adflyUname'] = $_POST['adflyUname']; \r
+            if (isset($_POST['adflyAPIKey'])) $options['adflyAPIKey'] = $_POST['adflyAPIKey']; \r
+            if (isset($_POST['adflyDomain'])) $options['adflyDomain'] = $_POST['adflyDomain']; \r
+            \r
+            if (isset($_POST['YOURLSKey'])) $options['YOURLSKey'] = $_POST['YOURLSKey']; \r
+            if (isset($_POST['YOURLSURL'])) $options['YOURLSURL'] = $_POST['YOURLSURL'];\r
+            \r
+            \r
+            if (isset($_POST['xcoAPIKey'])) $options['xcoAPIKey'] = $_POST['xcoAPIKey']; \r
+            if (isset($_POST['clkimAPIKey'])) $options['clkimAPIKey'] = $_POST['clkimAPIKey']; \r
+            if (isset($_POST['postAPIKey'])) $options['postAPIKey'] = $_POST['postAPIKey'];             \r
+            \r
+            if (isset($_POST['gglAPIKey'])) $options['gglAPIKey'] = $_POST['gglAPIKey'];                         \r
+            \r
+            if ($options['nxsURLShrtnr']=='B' && (trim($_POST['bitlyAPIKey'])=='' || trim($_POST['bitlyAPIKey'])=='')) $options['nxsURLShrtnr'] = 'G';            \r
+            if ($options['nxsURLShrtnr']=='Y' && (trim($_POST['YOURLSKey'])=='' || trim($_POST['YOURLSURL'])=='')) $options['nxsURLShrtnr'] = 'G';\r
+            if ($options['nxsURLShrtnr']=='A' && (trim($_POST['adflyAPIKey'])=='' || trim($_POST['adflyAPIKey'])=='')) $options['nxsURLShrtnr'] = 'G';            \r
+            \r
+            if ($options['nxsURLShrtnr']=='C' && trim($_POST['clkimAPIKey'])=='') $options['nxsURLShrtnr'] = 'G';\r
+            if ($options['nxsURLShrtnr']=='P' && trim($_POST['postAPIKey'])=='') $options['nxsURLShrtnr'] = 'G';            \r
+            if ($options['nxsURLShrtnr']=='X' && trim($_POST['xcoAPIKey'])=='') $options['nxsURLShrtnr'] = 'G';            \r
+            \r
+            \r
+            if (isset($_POST['forceSURL']))   $options['forceSURL'] = 1;  else $options['forceSURL'] = 0;\r
+                       \r
+            if (isset($_POST['brokenCntFilters']))   $options['brokenCntFilters'] = 1;  else $options['brokenCntFilters'] = 0;\r
+            \r
+            if (isset($_POST['nsOpenGraph']))   $options['nsOpenGraph'] = $_POST['nsOpenGraph']; else $options['nsOpenGraph'] = 0;                \r
+            if (isset($_POST['imgNoCheck']))   $options['imgNoCheck'] = 0;  else $options['imgNoCheck'] = 1;\r
+            if (isset($_POST['useForPages']))  $options['useForPages'] = 1;  else $options['useForPages'] = 0;\r
+                        \r
+            if (isset($_POST['showPrxTab']))   $options['showPrxTab'] = 1;  else $options['showPrxTab'] = 0;\r
+            if (isset($_POST['useRndProxy']))   $options['useRndProxy'] = 1;  else $options['useRndProxy'] = 0;\r
+            \r
+            if (isset($_POST['prxList'])) $options['prxList'] = $_POST['prxList']; \r
+            if (isset($_POST['addURLParams'])) $options['addURLParams'] = $_POST['addURLParams']; \r
+            \r
+            if (isset($_POST['riActive']))   $options['riActive'] = 1;  else $options['riActive'] = 0;\r
+            if (isset($_POST['riHowManyPostsToTrack'])) $options['riHowManyPostsToTrack'] = $_POST['riHowManyPostsToTrack'];             \r
+            \r
+            if (isset($_POST['useUnProc']))   $options['useUnProc'] = $_POST['useUnProc']; else $options['useUnProc'] = 0;    \r
+            if (!empty($_POST['nxsCPTSeld']) && is_array($_POST['nxsCPTSeld'])) $cpTypes = $_POST['nxsCPTSeld']; else $cpTypes = array();  $options['nxsCPTSeld'] = serialize($cpTypes); \r
+            if (isset($_POST['post_category']))  { $pk = $_POST['post_category']; if (!is_array($pk)) { $pk = urldecode($pk); parse_str($pk); } \r
+              remove_action( 'get_terms', 'order_category_by_id', 10); $cIds = get_terms( 'category', array('fields' => 'ids', 'get' => 'all') );              \r
+              if(is_array($pk) && $cIds) $options['exclCats'] = serialize(array_diff($cIds, $pk)); else $options['exclCats'] = '';\r
+            }  //prr($options['exclCats']);\r
+            if (!isset($_POST['whoCanSeeSNAPBox'])) $_POST['whoCanSeeSNAPBox'] = array(); $_POST['whoCanSeeSNAPBox'][] = 'administrator';            \r
+            if (isset($_POST['whoCanSeeSNAPBox'])) $options['whoCanSeeSNAPBox'] = $_POST['whoCanSeeSNAPBox']; \r
+            if (!isset($_POST['whoCanMakePosts'])) $_POST['whoCanMakePosts'] = array(); $_POST['whoCanMakePosts'][] = 'administrator';            \r
+            if (isset($_POST['whoCanMakePosts'])) $options['whoCanMakePosts'] = $_POST['whoCanMakePosts']; \r
+            \r
+            if (isset($_POST['skipSecurity'])) $options['skipSecurity'] = 1;  else $options['skipSecurity'] = 0;        \r
+            \r
+            if (isset($_POST['quLimit'])) $options['quLimit'] = 1;  else $options['quLimit'] = 0;\r
+            \r
+            //## Query has been activated\r
+              $isTimeChanged = ((isset($_POST['quDays']) && isset($options['quDays']) && $_POST['quDays']!=$options['quDays']) || !isset($options['quDays'])) ||  \r
+                ((isset($_POST['quHrs']) && isset($options['quHrs']) && $_POST['quHrs']!=$options['quHrs']) || !isset($options['quHrs'])) || \r
+                ((isset($_POST['quMins']) && isset($options['quMins']) && $_POST['quMins']!=$options['quMins']) || !isset($options['quMins']));\r
+              \r
+              if (isset($_POST['nxsOverLimit'])) $options['nxsOverLimit'] = $_POST['nxsOverLimit']; \r
+              if (isset($_POST['quLimitRndMins'])) $options['quLimitRndMins'] = $_POST['quLimitRndMins'];           \r
+              if (isset($_POST['quDays'])) $options['quDays'] = $_POST['quDays']; \r
+              if (isset($_POST['quHrs'])) $options['quHrs'] = $_POST['quHrs']; \r
+              if (isset($_POST['quMins'])) $options['quMins'] = $_POST['quMins'];               \r
+            \r
+              if ($isTimeChanged)  { $currTime = time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); \r
+                $pstEvrySec = $options['quDays']*86400+$options['quHrs']*3600+$options['quMins']*60;  $options['quNxTime'] = $currTime + $pstEvrySec; \r
+              }\r
+            \r
+            \r
+            if (isset($_POST['rpstActive'])) $options['rpstActive'] = 1;  else $options['rpstActive'] = 0;           \r
+            \r
+            \r
+            if ($nxs_isWPMU && (!isset($options['suaMode'])||$options['suaMode'] == '')) $options['suaMode'] = $nxs_tpWMPU; \r
+            $editable_roles = get_editable_roles(); foreach ( $editable_roles as $roleX => $details ) {$role = get_role($roleX); $role->remove_cap('see_snap_box');  $role->remove_cap('make_snap_posts');  }\r
+            \r
+            foreach ($options['whoCanSeeSNAPBox'] as $uRole) { $role = get_role($uRole); $role->add_cap('see_snap_box'); $role->add_cap('make_snap_posts'); }            \r
+            foreach ($options['whoCanMakePosts'] as $uRole) { $role = get_role($uRole); $role->add_cap('make_snap_posts'); }            \r
+            \r
+            update_option($this->dbOptionsName, $options); $this->nxs_options = $options;\r
+            ?><div class="updated"><p><strong><?php _e("Settings Updated.", 'social-networks-auto-poster-facebook-twitter-g');?></strong></p></div><?php        \r
+          }  \r
+          $isNoNts = true; foreach ($nxs_snapAvNts as $avNt) if (isset($options[$avNt['lcode']]) && is_array($options[$avNt['lcode']]) && count($options[$avNt['lcode']])>0) {$isNoNts = false; break;}      \r
+          remove_action( 'get_terms', 'order_category_by_id', 10); $category_ids = get_terms( 'category', array('fields' => 'ids', 'get' => 'all') );\r
+          if(isset($options['exclCats'])) $pk = maybe_unserialize($options['exclCats']); else $pk = '';\r
+if ( is_array($category_ids) && is_array($pk) && count($category_ids) == count($pk)) { ?>\r
+  <div class="error" id="message"><p><strong>All your categories are excluded from auto-posting.</strong> Nothing will be auto-posted. Please Click "Settings Tab" and select some categories.</div>\r
+<?php }\r
+          \r
+          if(!$nxs_isWPMU) $this->NS_SNAP_ShowPageTop();  ?>\r
+            Please see the <a target="_blank" href="http://www.nextscripts.com/installation-of-social-networks-auto-poster-for-wordpress">detailed installation/configuration instructions</a> (will open in a new tab)<br/>\r
+            <?php if(!isset($options['hideTopTip']) || (int)$options['hideTopTip'] != 1) { /* ?>\r
+            <div id="nxs_TopTip" class="nxsInfoMsg" style="font-size: 11px; margin-left: 3px; max-width: 1100px; display: block; font-style: italic; margin-bottom: 5px;">Tip: If autoposting works when you click "Test" buttons, but is not working when you publish new posts, try to switch from "Scheduled" to "Immediately" in the Plugin Settings->Other Settings->How to make auto-posts. \r
+              <span style="float: right;"><a style="text-decoration: none" href="#" onclick="nxs_hideTip('nxs_TopTip'); return false;">[Hide]</a></span>\r
+            </div>                       \r
+            <?php */ } else { ?><br/><?php } ?>\r
+            \r
+                  <?php  ?>\r
+           \r
+<ul class="nsx_tabs">\r
+    <li><a href="#nsx_tab1">Your Social Networks Accounts</a></li>\r
+    <li><a href="#nsx_tab2"><?php _e('Settings', 'social-networks-auto-poster-facebook-twitter-g') ?></a></li>\r
+    <?php if ((function_exists("nxs_showPRXTab")) && (int)$options['showPrxTab'] == 1) { ?> <li><a href="#nsx_tab5">Proxies</a></li> <?php } ?>\r
+    <li><a href="#nsx_tab3">Log/History</a></li>\r
+    <li><a href="#nsx_tab4">Help/Support</a></li>\r
+    <li><a class="ab-item" href="#nsx_tab5"><span style="font-weight:bold; font-size: 16px; color:#2ecc2e;">&rArr;</span> New Post to Social Networks</a></li>    \r
+    \r
+</ul>\r
+\r
+<div class="nsx_tab_container">\r
+\r
+    <div id="nsx_tab1" class="nsx_tab_content">\r
+    <form method="post" id="nsStForm" action=""> <input style="display:none" type="text" name="nxs_fk_UserName" id="nxs_FakeUserNameToBePreFilledByChrome"/>\r
+    <input style="display:none" name="nxs_fk_password" type="password" id="nxs_FakePasswordToBePreFilledByChrome"/>\r
+    <a href="#" class="NXSButton" id="nxs_snapAddNew">Add new account</a> <div class="nxsInfoMsg"><img style="position: relative; top: 8px;" alt="Arrow" src="<?php echo $nxs_plurl; ?>img/arrow_l_green_c1.png"/> You can add Facebook, Twitter, Google+, Pinterest, LinkedIn, Tumblr, Blogger/Blogspot, Delicious, etc accounts</div><br/><br/>\r
+          <div id="nxs_spPopup"><span class="nxspButton bClose"><span>X</span></span>Add New Network: <select onchange="doShowFillBlockX(this.value);" id="nxs_ntType"><option value =""></option>\r
+           <?php foreach ($nxs_snapAvNts as $avNt) { if (!isset($options[$avNt['lcode']]) || count($options[$avNt['lcode']])==0) $mt=0; else $mt = 1+max(array_keys($options[$avNt['lcode']]));\r
+              echo '<option value ="'.$avNt['code'].$mt.'">'.$avNt['name'].'</option>'; \r
+           } ?>\r
+           </select>           \r
+           <div id="nsx_addNT">\r
+             <?php  foreach ($nxs_snapAvNts as $avNt) { $clName = 'nxs_snapClass'.$avNt['code']; $ntClInst = new $clName(); \r
+             if (!isset($options[$avNt['lcode']]) || count($options[$avNt['lcode']])==0) { $ntClInst->showNewNTSettings(0); } else { \r
+                 $mt = 1+max(array_keys($options[$avNt['lcode']])); if (function_exists('getNSXOption') && function_exists('nxs_doSMAS1')) nxs_doSMAS1($ntClInst, $mt); else nxs_doSMAS($avNt['name'], $avNt['code'].$mt);             \r
+             }}  ?>           \r
+           </div>\r
+           \r
+           </div>\r
+           \r
+           <div class="popShAtt" id="popOnlyCat"><?php _e('Filters are "ON". Only selected categories/tags will be autoposted to this account. Click "Show Settings->Advanced" to change', 'social-networks-auto-poster-facebook-twitter-g'); ?></div>\r
+           <div class="popShAtt" id="popReActive"><?php _e('Reposter is activated for this account', 'social-networks-auto-poster-facebook-twitter-g'); ?></div>\r
+           \r
+           <div id="showCatSel" style="display: none;background-color: #fff; width: 300px; padding: 25px;"><span class="nxspButton bClose"><span>X</span></span><?php _e('Select Categories', 'social-networks-auto-poster-facebook-twitter-g'); ?>: \r
+                    <div id="fbSelCatsGLB" class="categorydivInd" style="padding-left: 15px; background-color: #fff;"> \r
+       <a href="#" onclick="nxs_chAllCatsL(1, 'fbSelCatsGLB'); return false;">Check all</a> &nbsp;|&nbsp; <a href="#" onclick="nxs_chAllCatsL(0, 'fbSelCatsGLB'); return false;">UnCheck all</a>\r
+          <div id="category-all" class="tabs-panel"> <input type="hidden" id="tmpCatSelNT" name="tmpCatSelNT" value="" />\r
+          <?php $num_cats  = wp_count_terms('category'); if ($num_cats>1000) echo "Sorry, You have too many categories - (".$num_cats.') to show the list. Please use "Tags and Custom Taxonomies" field with category|category_slug format'; else { ?>\r
+            <ul id="categorychecklist" class="list:category categorychecklist form-no-clear">\r
+                <?php                 \r
+                     $args = array( 'descendants_and_self' => 0, 'selected_cats' => '', 'taxonomy' => 'category', 'checked_ontop' => false); if (function_exists('wp_terms_checklist')) wp_terms_checklist(0, $args ); \r
+                     /* //## Show Hierarcical custom taxonomies as categories.\r
+                     $args = array('hierarchical' => true, 'public'   => true, '_builtin' => false );  $output = 'names';  $operator = 'and'; $taxonomies = get_taxonomies( $args, $output, $operator ); \r
+                     if ( $taxonomies ) foreach ( $taxonomies  as $taxonomy ) { ?> <b><br/>&nbsp;&nbsp;<?php _e($taxonomy, 'social-networks-auto-poster-facebook-twitter-g'); ?></b><br/> <?php\r
+                       $args = array( 'descendants_and_self' => 0, 'selected_cats' => '', 'taxonomy' => $taxonomy, 'checked_ontop' => false); if (function_exists('wp_terms_checklist')) wp_terms_checklist(0, $args );     \r
+                     } \r
+                     */               \r
+                ?>\r
+            </ul> <?php } ?>\r
+          </div>  \r
+       </div>    <div class="submitX"><input type="button" id="" class="button-primary" name="btnSelCats" onclick="nxs_doSetSelCats( jQuery('#tmpCatSelNT').val() ); jQuery('#showCatSel').bPopup().close();" value="Select Categories" /></div>\r
+           </div>\r
+            <?php \r
+           foreach ($nxs_snapAvNts as $avNt) { $clName = 'nxs_snapClass'.$avNt['code']; $ntClInst = new $clName();\r
+              if ( isset($options[$avNt['lcode']]) && count($options[$avNt['lcode']])>0) { $ntClInst->showGenNTSettings($options[$avNt['lcode']]); } // else $ntClInst->showNewNTSettings(0);\r
+           }\r
+           if ($isNoNts) { ?><br/><br/><br/>You don't have any configured social networks yet. Please click "Add new account" button.<br/><br/>\r
+           <input onclick="jQuery('#impFileSettings_button').click(); return false;" type="button" class="button" name="impSettings_repostButton" id="impSettings_button"  value="<?php _e('Import Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" />     \r
+         <?php } else {?>   \r
+             \r
+           <div style="float: right; padding: 1.5em;">\r
+           \r
+            <input onclick="nxs_expSettings(); return false;" type="button" class="button" name="expSettings_repostButton" id="expSettings_button"  value="<?php _e('Export Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+            <input onclick="jQuery('#impFileSettings_button').click(); return false;" type="button" class="button" name="impSettings_repostButton" id="impSettings_button"  value="<?php _e('Import Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" />            \r
+           </div>\r
+           <input value="'" type="hidden" name="nxs_mqTest" /> \r
+           <div class="submitX"><input type="submit" id="nxs-button-primary-submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div>\r
+           \r
+           <?php } ?>   \r
+    </form>          \r
+    </div> <!-- END TAB -->\r
+    \r
+    <div id="nsx_tab2" class="nsx_tab_content">  <script type="text/javascript">setTimeout( function(){ document.getElementById( "nsStFormMisc" ).reset();},5);</script>\r
+    <form method="post" id="nsStFormMisc" action="<?php echo $nxs_snapThisPageUrl?>">    <input type="hidden" name="nxsMainFromElementAccts" id="nxsMainFromElementAccts" value="" />\r
+    \r
+    \r
+    \r
+       <input type="hidden" name="_wpnonce" id="_wpnonce" value="" /> <input type="hidden" name="nxsMainFromSupportFld" id="nxsMainFromSupportFld" value="1" />\r
+     <!-- ##################### OTHER #####################-->            \r
+\r
+     <!-- How to make auto-posts? --> \r
+            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php _e('How to make auto-posts?', 'social-networks-auto-poster-facebook-twitter-g') ?> &lt;-- (<a id="showShAttIS" onmouseover="showPopShAtt('IS', event);" onmouseout="hidePopShAtt('IS');"  onclick="return false;" class="underdash" href="#"><?php _e('What\'s the difference?', 'social-networks-auto-poster-facebook-twitter-g') ?></a>)</h3></div>\r
+         <div class="popShAtt" id="popShAttIS">\r
+        <h3><?php _e('The difference between "Immediately" and "Scheduled"', 'social-networks-auto-poster-facebook-twitter-g') ?></h3>\r
+        <?php _e('<b>"Immediately"</b> - Once you click "Publish" button plugin starts pushing your update to configured social networks. At this time you need to wait and look at the turning circle. Some APIs are pretty slow, so you have to wait and wait and wait until all updates are posted and page released back to you.', 'social-networks-auto-poster-facebook-twitter-g') ?><br/><br/>\r
+        <?php _e('<b>"Scheduled"</b> - Releases the page immediately back to you, so you can proceed with something else and it schedules all auto-posting jobs to your WP-Cron. This is much faster and much more efficient, but it could not work if your WP-Cron is disabled or broken.', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+      </div>\r
+             <div class="nxs_box_inside"> \r
+             \r
+              <div class="itemDiv">\r
+               <input type="radio" name="nxsHTDP" value="I" <?php if (isset($options['nxsHTDP']) && $options['nxsHTDP']=='I') echo 'checked="checked"'; ?> /> <b><?php _e('Publish Immediately', 'social-networks-auto-poster-facebook-twitter-g') ?></b>  - <i><?php _e('No WP Cron will be used. Choose if WP Cron is disabled or broken on your website', 'social-networks-auto-poster-facebook-twitter-g') ?></i><br/>\r
+              </div>  \r
+              \r
+              <div class="itemDiv">\r
+              <input type="radio" name="nxsHTDP" value="S" <?php if (!isset($options['nxsHTDP']) || $options['nxsHTDP']=='S') echo 'checked="checked"'; ?> /> <b><?php _e('Use WP Cron to Schedule autoposts', 'social-networks-auto-poster-facebook-twitter-g') ?></b> - <i><?php _e('Recommended for most sites. Faster Performance - requires working WP Cron', 'social-networks-auto-poster-facebook-twitter-g') ?></i><br/> <?php /* ?>\r
+                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="runNXSCron" value="1"> <b><?php _e('Try to process missed "Scheduled" posts.', 'social-networks-auto-poster-facebook-twitter-g') ?></b> <i><?php _e('Usefull when WP Cron is disabled or broken, but can cause some short perfomance issues and duplicates. It is <b>highly</b> recomended to setup a proper cron job of fix WP Cron instead', 'social-networks-auto-poster-facebook-twitter-g') ?></i>. <?php */ ?>\r
+              </div>         \r
+              \r
+              <div class="itemDiv">\r
+              <div style="margin-left: 20px;">\r
+              \r
+              <?php $cr = get_option('NXS_cronCheck'); if (!empty($cr) && is_array($cr) && isset($cr['status']) && $cr['status']=='0') { ?> <span style="color: red"> *** <?php _e('Your WP Cron is not working correctly. This feature may not work properly, and might cause duplicate postings and stability problems.<br/> Please see the test results and recommendations here:', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+     &nbsp;-&nbsp;<a target="_blank" href="<?php global $nxs_snapThisPageUrl; echo $nxs_snapThisPageUrl; ?>&do=crtest">WP Cron Test Results</a></span> <br/>\r
+            <?php  } ?>\r
+              \r
+              <input type="checkbox" name="quLimit" value="1" <?php if (isset($options['quLimit']) && $options['quLimit']=='1') echo 'checked="checked"'; ?> /> <b><?php _e('Limit autoposting speed', 'social-networks-auto-poster-facebook-twitter-g') ?></b> - <i><?php _e('Recommended for busy sites with a lot of new posts.', 'social-networks-auto-poster-facebook-twitter-g') ?> </i><br/> \r
+              <div style="margin-left: 10px;">\r
+              Do not autopost more than one post per network every <input name="quDays" style="width: 24px;" value="<?php echo isset($options['quDays'])?$options['quDays']:'0'; ?>" /> Days,&nbsp;&nbsp;\r
+              <input name="quHrs" style="width: 24px;" value="<?php echo isset($options['quHrs'])?$options['quHrs']:'0'; ?>" /> Hours,&nbsp;&nbsp;\r
+              <input name="quMins" style="width: 24px;" value="<?php echo isset($options['quMins'])?$options['quMins']:'3'; ?>" /> Minutes.\r
+                <div style="margin-left: 10px;">\r
+                 <b><?php _e('Randomize posting time &#177;', 'social-networks-auto-poster-facebook-twitter-g'); ?> </b>\r
+     <input type="text" name="quLimitRndMins" style="width: 35px;" value="<?php echo isset($options['quLimitRndMins'])?$options['quLimitRndMins']:'2'; ?>" />&nbsp;<?php _e('Minutes', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+                </div>\r
+                 \r
+                 <div style="margin-left: 10px;">\r
+                 <?php _e('What to do with the rest of the posts if there are more posts then daily limit?', 'social-networks-auto-poster-facebook-twitter-g'); ?><br/>\r
+                    <input type="radio" name="nxsOverLimit" value="D" <?php if (!isset($options['nxsOverLimit']) || $options['nxsOverLimit']=='D') echo 'checked="checked"'; ?> /> <b><?php _e('Skip/Discard/Don\'t Autopost ', 'social-networks-auto-poster-facebook-twitter-g') ?></b><br/>\r
+                    <input type="radio" name="nxsOverLimit" value="S" <?php if (isset($options['nxsOverLimit']) && $options['nxsOverLimit']=='S') echo 'checked="checked"'; ?> /> <b><?php _e('Schedule for tomorrow', 'social-networks-auto-poster-facebook-twitter-g') ?></b>  - <i><?php _e('Not recommended, may cause significant delays', 'social-networks-auto-poster-facebook-twitter-g') ?></i><br/>\r
+                 </div>\r
+              </div>\r
+              </div>\r
+              </div>                          \r
+              \r
+              \r
+           </div></div>\r
+     <!-- #### Who can see auto-posting options on the "New Post" pages? ##### --> \r
+            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php _e('User Privileges/Security', 'social-networks-auto-poster-facebook-twitter-g') ?></h3></div>\r
+             <div class="nxs_box_inside"> \r
+              <div class="itemDiv">\r
+              \r
+             <input value="set" id="skipSecurity" name="skipSecurity"  type="checkbox" <?php if (!empty($options['skipSecurity']) && (int)$options['skipSecurity'] == 1) echo "checked"; ?> />  <b><?php _e('Skip User Security Verification.', 'social-networks-auto-poster-facebook-twitter-g') ?></b>     \r
+             <span style="font-size: 11px; margin-left: 1px;"><?php _e('NOT Recommended, but useful in some situations. This will allow autoposting for everyone even for the non-existent users.', 'social-networks-auto-poster-facebook-twitter-g') ?></span>  \r
+              \r
+              <h4><?php _e('Who can make autoposts without seeing any auto-posting options?', 'social-networks-auto-poster-facebook-twitter-g') ?></h4>\r
+              \r
+              <?php $editable_roles = get_editable_roles(); if (!isset($options['whoCanMakePosts']) || !is_array($options['whoCanMakePosts'])) $options['whoCanMakePosts'] = array(); \r
+\r
+    foreach ( $editable_roles as $role => $details ) { $name = translate_user_role($details['name'] ); echo '<input type="checkbox" '; \r
+        if (in_array($role, $options['whoCanMakePosts']) || $role=='administrator') echo ' checked="checked" '; if ($role=='administrator') echo '  disabled="disabled" ';\r
+        echo 'name="whoCanMakePosts[]" value="'.esc_attr($role).'"> '.$name; \r
+        if ($role=='administrator') echo ' - Somebody who has access to all the administration features';\r
+        if ($role=='editor') echo " - Somebody who can publish and manage posts and pages as well as manage other users' posts, etc. ";\r
+        if ($role=='author') echo ' - Somebody who can publish and manage their own posts ';\r
+        if ($role=='contributor') echo ' - Somebody who can write and manage their posts but not publish them';\r
+        if ($role=='subscriber') echo ' - Somebody who can only manage their profile';        \r
+        echo '<br/>';    \r
+    } ?>\r
+    \r
+     <h4><?php _e('Who can see auto-posting options on the "New Post" and "Edit Post" pages and make autoposts?', 'social-networks-auto-poster-facebook-twitter-g') ?></h4>\r
+              \r
+              <?php $editable_roles = get_editable_roles(); if (!isset($options['whoCanSeeSNAPBox']) || !is_array($options['whoCanSeeSNAPBox'])) $options['whoCanSeeSNAPBox'] = array(); \r
+\r
+    foreach ( $editable_roles as $role => $details ) { $name = translate_user_role($details['name'] ); echo '<input type="checkbox" '; \r
+        if (in_array($role, $options['whoCanSeeSNAPBox']) || $role=='administrator') echo ' checked="checked" '; if ($role=='administrator' || $role=='subscriber') echo '  disabled="disabled" ';\r
+        echo 'name="whoCanSeeSNAPBox[]" value="'.esc_attr($role).'"> '.$name; \r
+        if ($role=='administrator') echo ' - Somebody who has access to all the administration features';\r
+        if ($role=='editor') echo " - Somebody who can publish and manage posts and pages as well as manage other users' posts, etc. ";\r
+        if ($role=='author') echo ' - Somebody who can publish and manage their own posts ';\r
+        if ($role=='contributor') echo ' - Somebody who can write and manage their posts but not publish them';\r
+        if ($role=='subscriber') echo ' - Somebody who can only manage their profile';        \r
+        echo '<br/>';    \r
+    } ?>\r
+    \r
+    \r
+    \r
+    \r
+              </div>\r
+              \r
+           </div></div>        \r
+     <!-- #### Include/Exclude Wordpress Pages and Custom Post Types ##### --> \r
+           <div class="nxs_box"> <div class="nxs_box_header"><h3><?php _e('Include/Exclude Wordpress Pages and Custom Post Types', 'social-networks-auto-poster-facebook-twitter-g') ?></h3></div>                          \r
+             <div class="nxs_box_inside"> \r
+             <div class="itemDiv"> \r
+              <input value="set" id="useForPages" name="useForPages"  type="checkbox" <?php if (!empty($options['useForPages'])&&(int)$options['useForPages'] == 1) echo "checked"; ?> />  <b><?php _e('Use for Wordpress Pages', 'social-networks-auto-poster-facebook-twitter-g') ?></b>     \r
+             <span style="font-size: 11px; margin-left: 1px;"><?php _e('Show the SNAP metabox and auto-post for pages, not just posts.', 'social-networks-auto-poster-facebook-twitter-g') ?></span>  \r
+             </div>\r
+              <div class="itemDiv"><b><br/><?php _e('Custom Post Types:', 'social-networks-auto-poster-facebook-twitter-g') ?></b>              \r
+              <span style="font-size: 11px; margin-left: 1px;"><?php _e('Please select "Custom Post Types" that you would like to be autoposted to your social networks', 'social-networks-auto-poster-facebook-twitter-g') ?> </span> <br/>\r
+              <?php $nxsOne = base64_encode("v=".$nxsOne);\r
+              $args=array('public'=>true, '_builtin'=>false);  $output = 'names';  $operator = 'and';  $post_types = array(); if (function_exists('get_post_types')) $post_types=get_post_types($args, $output, $operator); \r
+              if (!empty($options['nxsCPTSeld'])) $nxsCPTSeld = unserialize($options['nxsCPTSeld']); else $nxsCPTSeld = array_keys($post_types);\r
+              \r
+             ?> <div class="taxonomydiv"><div class="tabs-panel" style="padding: 10px;"><input type="hidden" name="nxsCPTSeld[]" value="0" /> <?php //prr($nxsCPTSeld); prr($post_types); prr($_POST['nxsCPTSeld']);              \r
+             foreach ($post_types as $cptID=>$cptName){ if (in_array($cptID, $nxsCPTSeld)) $dCh = ' checked="checked" '; else $dCh = "";\r
+              ?><input type="checkbox" name="nxsCPTSeld[]" value="<?php echo esc_attr($cptID); ?>"<?php echo $dCh ?>>&nbsp;<?php echo $cptName ?><br/> <?php\r
+             }\r
+            ?></div></div>        \r
+              </div>               \r
+           </div></div>            \r
+     <!-- #### Categories to Include/Exclude: ##### --> \r
+            <script type="text/javascript"> function nxs_chAllCats(ch){ jQuery("form input:checkbox[name='post_category[]']").attr('checked', ch==1);}\r
+     (function($) { $(function() {\r
+       jQuery('.button-primary[name="update_NS_SNAutoPoster_settings"]').bind('click', function(e) { var str = jQuery('input[name="post_category[]"]').serialize(); jQuery('div.categorydivInd').replaceWith('<input type="hidden" name="pcInd" value="" />'); \r
+         str = str.replace(/post_category/g, "pk"); jQuery('div.categorydiv').replaceWith('<input type="hidden" name="post_category" value="'+str+'" />');  \r
+     }); }); })(jQuery); </script>                 \r
+            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php _e('Categories to Include/Exclude:', 'social-networks-auto-poster-facebook-twitter-g') ?></h3></div>\r
+             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php _e('Each blogpost will be autoposted to all categories selected below. All categories are selected by default. \r
+              <b>Uncheck</b> categories that you would like <b>NOT</b> to auto-post by default. Assigning the unchecked category to the new blogpost will turn off auto-posting to all configured networks.', 'social-networks-auto-poster-facebook-twitter-g') ?> </span> <br/>\r
+              <div class="itemDiv">\r
+              <a href="#" onclick="nxs_chAllCats(1); return false;">Check all</a> &nbsp;|&nbsp; <a href="#" onclick="nxs_chAllCats(0); return false;">UnCheck all</a>\r
+\r
+ <div id="taxonomy-category" class="categorydiv">\r
+        <div id="category-all" class="tabs-panel"><input type='hidden' name='post_category[]' value='0' /> \r
+        <?php $num_cats  = wp_count_terms('category'); if ($num_cats>1000) echo "Sorry, You have too many categories - ".$num_cats; else { ?>\r
+            <ul id="categorychecklist" class="list:category categorychecklist form-no-clear">\r
+                <?php if(isset($options['exclCats'])) $pk = maybe_unserialize($options['exclCats']); else $pk = '';  \r
+                  if (is_array($pk) && count($pk)>0 ) $selCats = array_diff($category_ids, $pk); else $selCats = $category_ids;            \r
+                  $args = array( 'descendants_and_self' => 0, 'selected_cats' => $selCats, 'taxonomy' => 'category', 'checked_ontop' => false);    \r
+                  if (function_exists('wp_terms_checklist')) wp_terms_checklist(0, $args ); \r
+                ?>\r
+            </ul> <?php } ?>\r
+        </div>  \r
+    </div>\r
+              </div>              \r
+           </div></div>    \r
+     <!-- ##################### URL Shortener #####################-->\r
+            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php _e('URL Shortener', 'social-networks-auto-poster-facebook-twitter-g') ?></h3></div>\r
+            <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;">Please use %SURL% in "Message Format" to get shortened urls or check "Force Shortened Links". </span> <br/>\r
+              <!-- <div class="itemDiv">\r
+              <input type="radio" name="nxsURLShrtnr" value="G" <?php if (!isset($options['nxsURLShrtnr']) || $options['nxsURLShrtnr']=='' || $options['nxsURLShrtnr']=='G') echo 'checked="checked"'; ?> /> <b>gd.is</b> (Default) - fast, simple, free, no configuration nessesary.            \r
+              </div> -->\r
+              <div class="itemDiv">\r
+              \r
+     <input type="checkbox" name="forceSURL" value="1" <?php if (isset($options['forceSURL']) && $options['forceSURL']=='1') echo 'checked="checked"'; ?> /> <b><?php _e('Force Shortened Links', 'social-networks-auto-poster-facebook-twitter-g') ?></b>\r
+     <br/><br/>         \r
+              <input type="radio" name="nxsURLShrtnr" value="O" <?php if (!isset($options['nxsURLShrtnr']) || (isset($options['nxsURLShrtnr']) && ($options['nxsURLShrtnr']=='O' || $options['nxsURLShrtnr']=='G'))) echo 'checked="checked"'; ?> /> <b>goo.gl</b>  - <i> Enter goo.gl <a target="_blank" href="https://developers.google.com/url-shortener/v1/getting_started#APIKey">API Key</a> below [Optional]</i><br/>\r
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;goo.gl&nbsp;&nbsp;API Key:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="gglAPIKey" style="width: 20%;" value="<?php if (isset($options['gglAPIKey'])) _e(apply_filters('format_to_edit',$options['gglAPIKey']), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+              </div>\r
+              \r
+              <?php if (function_exists('wp_get_shortlink')) { ?><div class="itemDiv">\r
+              <input type="radio" name="nxsURLShrtnr" value="W" <?php if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr']=='W')  echo 'checked="checked"'; ?> /> <b>Wordpress Built-in Shortener</b> (wp.me if you use Jetpack)<br/> \r
+              </div><?php } ?>\r
+              <!-- ## bitly ##-->\r
+              <div class="itemDiv">\r
+              <input type="radio" name="nxsURLShrtnr" value="B" <?php if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr']=='B') echo 'checked="checked"'; ?> /> <b>bit.ly</b>  - <i>Enter bit.ly username and <a target="_blank" href="http://bitly.com/a/your_api_key">API Key</a> below</i><br/>\r
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bit.ly Username: <input name="bitlyUname" style="width: 20%;" value="<?php if (isset($options['bitlyUname'])) _e(apply_filters('format_to_edit',$options['bitlyUname']), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bit.ly&nbsp;&nbsp;API Key:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="bitlyAPIKey" style="width: 20%;" value="<?php if (isset($options['bitlyAPIKey'])) _e(apply_filters('format_to_edit',$options['bitlyAPIKey']), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+              </div>\r
+              \r
+              <!-- ## u.to ##-->\r
+              <div class="itemDiv">\r
+                <input type="radio" name="nxsURLShrtnr" value="U" <?php if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr']=='U') echo 'checked="checked"'; ?> /> <b>u.to</b>  <i>Simple and anonymous (no accounts, no stats) use only, No additional configuration required.</i>\r
+              </div>\r
+              \r
+              <!-- ## x.co ##-->\r
+              <div class="itemDiv">\r
+              <input type="radio" name="nxsURLShrtnr" value="X" <?php if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr']=='X') echo 'checked="checked"'; ?> /> <b>x.co</b>  - <i>Enter x.co <a target="_blank" href="http://app.x.co/Settings.aspx">API Key</a> below. You can get API key from your x.co settings page: <a target="_blank" href="http://app.x.co/Settings.aspx">http://app.x.co/Settings.aspx</a>.</i><br/>              \r
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x.co&nbsp;&nbsp;API Key:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="xcoAPIKey" style="width: 20%;" value="<?php if (isset($options['xcoAPIKey'])) _e(apply_filters('format_to_edit',$options['xcoAPIKey']), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+              </div>\r
+              <!-- ## clk.im ##-->\r
+              <div class="itemDiv">\r
+              <input type="radio" name="nxsURLShrtnr" value="C" <?php if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr']=='C') echo 'checked="checked"'; ?> /> <b>clk.im</b>  - <i>Enter clk.im <a target="_blank" href="http://clk.im/apikey">API Key</a> below. You can get API key from your clk.im page: <a target="_blank" href="http://clk.im/apikey">http://clk.im/apikey</a>. Please see the "Developers/Publishers" section on the right</i><br/>              \r
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clk.im&nbsp;&nbsp;API Key:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="clkimAPIKey" style="width: 20%;" value="<?php if (isset($options['clkimAPIKey'])) _e(apply_filters('format_to_edit',$options['clkimAPIKey']), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+              </div>\r
+              <!-- ## po.st ##-->\r
+              <div class="itemDiv">\r
+              <input type="radio" name="nxsURLShrtnr" value="P" <?php if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr']=='P') echo 'checked="checked"'; ?> /> <b>po.st</b>  - <i>Enter po.st <a target="_blank" href="https://re.po.st/partner/campaigns">API Key</a> below. You can get API key from your "Campaigns" page: <a target="_blank" href="https://re.po.st/partner/campaigns">https://re.po.st/partner/campaigns</a></i><br/>\r
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;po.st&nbsp;&nbsp;API Key:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="postAPIKey" style="width: 20%;" value="<?php if (isset($options['postAPIKey'])) _e(apply_filters('format_to_edit',$options['postAPIKey']), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+              </div>\r
+              \r
+              <div class="itemDiv">\r
+              <input type="radio" name="nxsURLShrtnr" value="A" <?php if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr']=='A') echo 'checked="checked"'; ?> /> <b>adf.ly</b>  - <i>Enter adf.ly user ID and <a target="_blank" href="https://adf.ly/publisher/tools#tools-api">API Key</a> below</i><br/>\r
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adf.ly User ID: <input name="adflyUname" style="width: 20%;" value="<?php if (isset($options['bitlyUname'])) _e(apply_filters('format_to_edit',$options['adflyUname']), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adf.ly&nbsp;&nbsp;API Key:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="adflyAPIKey" style="width: 20%;" value="<?php if (isset($options['adflyAPIKey'])) _e(apply_filters('format_to_edit',$options['adflyAPIKey']), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+             <div style="width:100%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adf.ly Domain: <select name="adflyDomain" id="adflyDomain">\r
+            <?php  $adflyDomains = '<option value="adf.ly">adf.ly</option><option value="q.gs">q.gs</option>';\r
+              if (isset($options['adflyDomain']) && $options['adflyDomain']!='') $adflyDomains = str_replace($options['adflyDomain'].'"', $options['adflyDomain'].'" selected="selected"', $adflyDomains);  echo $adflyDomains; \r
+            ?>\r
+            </select> <i>Please note that j.gs is not availabe for API use.</i> </div>\r
+              </div>\r
+              \r
+              <div class="itemDiv">\r
+              <input type="radio" name="nxsURLShrtnr" value="Y" <?php if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr']=='Y')  echo 'checked="checked"'; ?> /> <b>YOURLS (Your Own URL Shortener)</b> - \r
+            &nbsp;<i>YOURLS API URL - usually sonething like http://yourdomain.cc/yourls-api.php; YOURLS API Secret Signature Token can be found in your YOURLS Admin Panel-&gt;Tools</i><br/>\r
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;YOURLS API URL: <input name="YOURLSURL" style="width: 19.4%;" value="<?php if (isset($options['YOURLSURL'])) _e(apply_filters('format_to_edit',$options['YOURLSURL']), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/>\r
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;YOURLS API Secret Signature Token:&nbsp;&nbsp;&nbsp;<input name="YOURLSKey" style="width: 13%;" value="<?php if (isset($options['YOURLSKey'])) _e(apply_filters('format_to_edit',$options['YOURLSKey']), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+              </div>\r
+              \r
+            </div></div>\r
+            \r
+            <!-- ##################### Auto-Import comments from Social Networks #####################-->\r
+            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php _e('Auto-Import comments from Social Networks', 'social-networks-auto-poster-facebook-twitter-g') ?><span class="nxs_newLabel">[<?php _e('New', 'social-networks-auto-poster-facebook-twitter-g') ?>]</span></h3></div>\r
+             <div class="nxs_box_inside"> \r
+             \r
+             <?php $cr = get_option('NXS_cronCheck'); if (!empty($cr) && is_array($cr) && isset($cr['status']) && $cr['status']=='0') { ?> <span style="color: red"> *** <?php _e('Your WP Cron is not working correctly. This feature may not work properly, and might cause duplicate postings and stability problems.<br/> Please see the test results and recommendations here:', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+     &nbsp;-&nbsp;<a target="_blank" href="<?php global $nxs_snapThisPageUrl; echo $nxs_snapThisPageUrl; ?>&do=crtest">WP Cron Test Results</a></span> <br/>\r
+            <?php  } ?>             \r
+             \r
+             <span style="font-size: 11px; margin-left: 1px;">Plugin will automatically grab the comments posted on Social Networks and insert them as "Comments to your post". Plugin will check for the new comments every hour. </span> <br/>\r
+              <div class="itemDiv">\r
+              <input value="set" id="riActive" name="riActive"  type="checkbox" <?php if (!empty($options['riActive']) && (int)$options['riActive'] == 1) echo "checked"; ?> /> \r
+              <strong>Enable "Comments Import"</strong>\r
+              </div>\r
+              <div class="itemDiv">\r
+             <strong style="font-size: 12px; margin: 10px; margin-left: 1px;">How many posts should be tracked:</strong>\r
+<input name="riHowManyPostsToTrack" style="width: 50px;" value="<?php if (isset($options['riHowManyPostsToTrack'])) _e(apply_filters('format_to_edit', $options['riHowManyPostsToTrack']), 'social-networks-auto-poster-facebook-twitter-g'); else echo "10"; ?>" /> <br/>\r
+              \r
+             <span style="font-size: 11px; margin-left: 1px;">Setting two many will degrade your website's performance. 10-20 posts are recommended</span> \r
+              </div>\r
+              \r
+           </div></div>\r
+           \r
+     <!-- ##################### Additional URL Parameters #####################-->   \r
+            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php _e('Additional URL Parameters', 'social-networks-auto-poster-facebook-twitter-g') ?> <span class="nxs_newLabel">[<?php _e('New', 'social-networks-auto-poster-facebook-twitter-g') ?>]</span></h3></div>\r
+             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php _e('Will be added to backlinks.', 'social-networks-auto-poster-facebook-twitter-g') ?> </span> <br/>\r
+              <div class="itemDiv">\r
+                <b><?php _e('Additional URL Parameters:', 'social-networks-auto-poster-facebook-twitter-g') ?></b>  <input name="addURLParams" style="width: 800px;" value="<?php if (isset($options['addURLParams'])) _e(apply_filters('format_to_edit', $options['addURLParams']), 'social-networks-auto-poster-facebook-twitter-g'); ?>" />\r
+              </div>               \r
+             <span style="font-size: 11px; margin-left: 1px;"> <?php _e('You can use %NTNAME% for social network name, %NTCODE% for social network two-letter code, %ACCNAME% for account name,  %POSTID% for post ID,  %POSTTITLE% for post title, %SITENAME% for website name. <b>Any text must be URL Encoded</b><br/>Example: utm_source=%NTCODE%&utm_medium=%ACCNAME%&utm_campaign=SNAP%2Bfrom%2B%SITENAME%', 'social-networks-auto-poster-facebook-twitter-g') ?></span> \r
+           </div></div>   \r
+           \r
+           <!-- ##### HashTag Settings ##### --> \r
+            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php _e('Auto-HashTags Settings', 'social-networks-auto-poster-facebook-twitter-g') ?></h3></div>\r
+             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php _e('How to generate hashtags if tag is longer then one word', 'social-networks-auto-poster-facebook-twitter-g') ?> </span> <br/>\r
+              <div class="itemDiv">\r
+              <b><?php _e('Replace spaces in hashtags with ', 'social-networks-auto-poster-facebook-twitter-g') ?></b> <select name="nxsHTSpace" id="nxsHTSpace">\r
+              <option <?php if (empty($options['nxsHTSpace'])) echo "selected" ?> value="">Nothing</option>\r
+              <option <?php if (!empty($options['nxsHTSpace']) && $options['nxsHTSpace']=='_') echo "selected" ?> value ="_">_ (Underscore)</option>\r
+              <option <?php if (!empty($options['nxsHTSpace']) && $options['nxsHTSpace']=='-') echo "selected" ?> value ="-">- (Dash)</option>\r
+              </select>\r
+              </div>              \r
+               <span style="font-size: 11px; margin-left: 1px;"><?php _e('How to separate hashtags', 'social-networks-auto-poster-facebook-twitter-g') ?> </span> <br/>\r
+              <div class="itemDiv">\r
+              <b><?php _e('Separate hashtags with ', 'social-networks-auto-poster-facebook-twitter-g') ?></b> <select name="nxsHTSepar" id="nxsHTSepar">\r
+              <option <?php if (!empty($options['nxsHTSepar']) && $options['nxsHTSepar']=='_') echo "selected" ?> value ="_">[ ] Space</option>\r
+              <option <?php if (empty($options['nxsHTSepar']) || $options['nxsHTSepar']=='c_') echo "selected" ?> value="c_">[, ] Comma and Space</option>\r
+              <option <?php if (!empty($options['nxsHTSepar']) && $options['nxsHTSepar']=='c') echo "selected" ?> value ="c">[,] Comma</option>              \r
+              </select>\r
+              </div>              \r
+           </div></div>\r
+           \r
+            <!-- ##### ANOUNCE TAG ##### --> \r
+            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php _e('%ANNOUNCE% tag settings', 'social-networks-auto-poster-facebook-twitter-g') ?></h3></div>\r
+             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php _e('Plugin will take text untill the &lt;!--more--&gt; tag. Please specify how many characters should it get if &lt;!--more--&gt; tag is not found', 'social-networks-auto-poster-facebook-twitter-g') ?> </span> <br/>\r
+              <div class="itemDiv">\r
+              <b><?php _e('How many characters:', 'social-networks-auto-poster-facebook-twitter-g') ?></b> <input name="anounTagLimit" style="width: 100px;" value="<?php if (isset($options['anounTagLimit'])) _e(apply_filters('format_to_edit',$options['anounTagLimit']), 'social-networks-auto-poster-facebook-twitter-g'); else echo "300"; ?>" />              \r
+              </div>              \r
+           </div></div>  \r
+                           \r
+     <!-- ##################### Open Graph #####################-->\r
+            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php _e('"Open Graph" Tags', 'social-networks-auto-poster-facebook-twitter-g') ?></h3></div>\r
+             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php _e('This is simple and useful implementation of "Open Graph" Tags, as this option will only add tags needed for "Auto Posting". If you use other specialized plugins, uncheck this option.', 'social-networks-auto-poster-facebook-twitter-g') ?> </span> <br/>\r
+              <div class="itemDiv">\r
+              <input value="1" id="nsOpenGraph" name="nsOpenGraph"  type="checkbox" <?php if (!empty($options['nsOpenGraph']) && (int)$options['nsOpenGraph'] == 1) echo "checked"; ?> /> <b><?php _e('Add Open Graph Tags', 'social-networks-auto-poster-facebook-twitter-g') ?></b>\r
+              </div>                           \r
+              <div class="itemDiv">\r
+             <b><?php _e('Default Image URL for og:image tag:', 'social-networks-auto-poster-facebook-twitter-g') ?></b> \r
+            <input name="ogImgDef" style="width: 30%;" value="<?php if (isset($options['ogImgDef'])) _e(apply_filters('format_to_edit',$options['ogImgDef']), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+              </div>             \r
+           </div></div>    \r
+            <!-- #### "Featured" Image ##### --> \r
+            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php _e('Advanced "Featured" Image Settings', 'social-networks-auto-poster-facebook-twitter-g') ?></h3></div>\r
+             <div class="nxs_box_inside"> \r
+              <div class="itemDiv">\r
+              <input value="set" id="imgNoCheck" name="imgNoCheck"  type="checkbox" <?php /* ## Reversed Intentionally!!! */ if (empty($options['imgNoCheck']) || (int)$options['imgNoCheck'] != 1) echo "checked"; ?> /> <strong>Verify "Featured" Image</strong>               \r
+              <br/><span style="font-size: 11px; margin-left: 1px;"><?php _e('Advanced Setting. Uncheck only if you are 100% sure that your images are valid or if you have troubles with image verification.', 'social-networks-auto-poster-facebook-twitter-g') ?> </span> <br/>\r
+              </div>\r
+              \r
+               <div class="itemDiv">\r
+             <input value="1" id="useUnProc" name="useUnProc"  type="checkbox" <?php if (isset($options['useUnProc']) && (int)$options['useUnProc'] == 1) echo "checked"; ?> /> \r
+             <b><?php _e('Use advanced image finder', 'social-networks-auto-poster-facebook-twitter-g') ?></b>\r
+              <br/>              \r
+             <span style="font-size: 11px; margin-left: 1px;"> <?php _e('Check this if your images could be found only in the fully processed posts. <br/>This feature could interfere with some plugins using post processing functions incorrectly. Your site could become messed up, have troubles displaying content or start giving you "ob_start() [ref.outcontrol]: Cannot use output buffering in output buffering display handlers" errors.', 'social-networks-auto-poster-facebook-twitter-g') ?></span> \r
+              </div>  \r
+              \r
+           </div></div>        \r
+    \r
+      <!-- ##### Alternative "Featured Image" location ##### --> \r
+            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php _e('Alternative "Featured Image" location', 'social-networks-auto-poster-facebook-twitter-g') ?></h3></div>\r
+             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php _e('Plugin uses standard Wordpress "Featured Image" by default. If your theme stores "Featured Image" in the custom field, please enter the name of it. Use prefix if your custom field has only partial location.', 'social-networks-auto-poster-facebook-twitter-g') ?> </span> <br/>\r
+              <div class="itemDiv">\r
+              <b><?php _e('Custom field name:', 'social-networks-auto-poster-facebook-twitter-g') ?></b> <input name="featImgLoc" style="width: 200px;" value="<?php if (isset($options['featImgLoc'])) _e(apply_filters('format_to_edit',$options['featImgLoc']), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+              <br/>              \r
+             <span style="font-size: 11px; margin-left: 1px;"><?php _e('Set the name of the custom field that contains image info', 'social-networks-auto-poster-facebook-twitter-g') ?></span> \r
+              </div>\r
+              <div class="itemDiv">\r
+             <b><?php _e('Custom field Array Path:', 'social-networks-auto-poster-facebook-twitter-g') ?></b> <input name="featImgLocArrPath" style="width: 200px;" value="<?php if (isset($options['featImgLocArrPath'])) _e(apply_filters('format_to_edit',$options['featImgLocArrPath']), 'social-networks-auto-poster-facebook-twitter-g') ?>" /> \r
+              <br/>              \r
+             <span style="font-size: 11px; margin-left: 1px;">[<?php _e('Optional', 'social-networks-auto-poster-facebook-twitter-g') ?>] <?php _e('If your custom field contain an array, please enter the path to the image field. For example: [\'images\'][\'image\']', 'social-networks-auto-poster-facebook-twitter-g') ?></span> \r
+              </div>\r
+              <div class="itemDiv">\r
+             <b><?php _e('Custom field Image Prefix:', 'social-networks-auto-poster-facebook-twitter-g') ?></b> <input name="featImgLocPrefix" style="width: 200px;" value="<?php if (isset($options['featImgLocPrefix'])) _e(apply_filters('format_to_edit',$options['featImgLocPrefix']), 'social-networks-auto-poster-facebook-twitter-g') ?>" /> \r
+              <br/>              \r
+             <span style="font-size: 11px; margin-left: 1px;">[<?php _e('Optional', 'social-networks-auto-poster-facebook-twitter-g') ?>] <?php _e('If your custom field contain only the last part of the image path, please enter the prefix', 'social-networks-auto-poster-facebook-twitter-g') ?></span> \r
+              </div>\r
+              \r
+              <div class="itemDiv">\r
+             <b><?php _e('Custom field Image text to remove:', 'social-networks-auto-poster-facebook-twitter-g') ?></b> <input name="featImgLocRemTxt" style="width: 200px;" value="<?php if (isset($options['featImgLocRemTxt'])) _e(apply_filters('format_to_edit',$options['featImgLocRemTxt']), 'social-networks-auto-poster-facebook-twitter-g') ?>" /> \r
+              <br/>              \r
+             <span style="font-size: 11px; margin-left: 1px;">[<?php _e('Optional', 'social-networks-auto-poster-facebook-twitter-g') ?>] <?php _e('If your custom field contain the last part of the image path that need to be removed, please enter it here', 'social-networks-auto-poster-facebook-twitter-g') ?></span> \r
+              </div>\r
+              \r
+           </div></div>    \r
+           \r
+            <!-- ##### Ext Debug/Report Settings ##### --> \r
+            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php _e('Debug/Report Settings', 'social-networks-auto-poster-facebook-twitter-g') ?></h3></div>\r
+             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php _e('Debug/Report Settings', 'social-networks-auto-poster-facebook-twitter-g') ?> </span> <br/>\r
\r
+             <div class="itemDiv">\r
+              <input value="1" id="brokenCntFilters" name="brokenCntFilters"  type="checkbox" <?php if (isset($options['brokenCntFilters']) && (int)$options['brokenCntFilters'] == 1) echo "checked"; ?> /> \r
+              <strong>My Content Filters (<i>apply_filters('the_content'</i>) are broken, don't use them</strong>\r
+               - <span style="font-size: 11px; margin-left: 1px;"><?php _e('Some third party plugin break content filters. Check this if some networks do not post silently(without any errors in the log). This will make %EXCERPT% work as %RAWEXCERPT%, %FULLTEXT% as %RAWTEXT%, etc... ', 'social-networks-auto-poster-facebook-twitter-g') ?></span>               \r
+              <br/>                             \r
+              </div> \r
\r
+             <div class="itemDiv">\r
+             <b><?php _e('How many log records show?', 'social-networks-auto-poster-facebook-twitter-g') ?></b> <input name="numLogRows" style="width: 200px;" value="<?php if (isset($options['numLogRows'])) _e(apply_filters('format_to_edit',$options['numLogRows']), 'social-networks-auto-poster-facebook-twitter-g'); else echo "250"; ?>" /> \r
+              </div>\r
+              <div class="itemDiv"><input value="1" name="dbg[cron]"  type="checkbox" <?php if (isset($options['dbg']['cron']) && (int)$options['dbg']['cron'] == 1) echo "checked"; ?> /> <?php _e('Log Cron Events', 'social-networks-auto-poster-facebook-twitter-g') ?> - <span style="font-size: 11px; margin-left: 1px;"><?php _e('All WP Cron requests will be logged. Please check this if you have any issues with scheduling, delayed postings, reposter, etc..', 'social-networks-auto-poster-facebook-twitter-g') ?> </span></div>\r
+              \r
+              <div class="itemDiv">\r
+               <strong>Log/History Info Level</strong><select name="extDebug" id="extDebug">\r
+                <option <?php if (!empty($options['extDebug']) && $options['extDebug']=='2') echo "selected" ?> value ="2">Minimal</option>\r
+                <option <?php if (empty($options['extDebug'])) echo "selected" ?> value="0">Normal</option>              \r
+                <option <?php if (!empty($options['extDebug']) && $options['extDebug']=='1') echo "selected" ?> value ="1">Extended/Debug</option>\r
+              </select> <br/>\r
+              \r
+              <?php _e('Minimal', 'social-networks-auto-poster-facebook-twitter-g') ?> - <span style="font-size: 11px; margin-left: 1px;"><?php _e('Only important action info will be added to the log. "Debug", "Skipped", informational info will be ignored.', 'social-networks-auto-poster-facebook-twitter-g') ?> </span> <br/>\r
+              <?php _e('Normal', 'social-networks-auto-poster-facebook-twitter-g') ?> - <span style="font-size: 11px; margin-left: 1px;"><?php _e('All info except extended debug queryies will be added to the log.', 'social-networks-auto-poster-facebook-twitter-g') ?> </span> <br/>\r
+              <?php _e('Extended/Debug', 'social-networks-auto-poster-facebook-twitter-g') ?> - <span style="font-size: 11px; margin-left: 1px;"><?php _e('Advanced Setting. Extended debug Info will be added to the log.', 'social-networks-auto-poster-facebook-twitter-g') ?> </span> <br/>\r
+              </div>\r
+              \r
+              <div class="itemDiv">\r
+              <input value="set" id="errNotifEmailCB" name="errNotifEmailCB"  type="checkbox" <?php if (isset($options['errNotifEmailCB']) && (int)$options['errNotifEmailCB'] == 1) echo "checked"; ?> /> \r
+              <strong>Send Email notification for errors</strong>\r
+               - <span style="font-size: 11px; margin-left: 1px;"><?php _e('Send Email notification for all autoposting errors. No more then one email per hour will be sent.', 'social-networks-auto-poster-facebook-twitter-g') ?></span>               \r
+              <br/>               \r
+              <div style="margin-left: 18px;">\r
+              <b><?php _e('Email:', 'social-networks-auto-poster-facebook-twitter-g') ?></b> <input name="errNotifEmail" style="width: 200px;" value="<?php if (isset($options['errNotifEmail'])) _e(apply_filters('format_to_edit',$options['errNotifEmail']), 'social-networks-auto-poster-facebook-twitter-g') ?>" />\r
+              <span style="font-size: 11px; margin-left: 1px;"><?php _e('wp_mail will be used. Some email providers (gmail, hotmail) might have problems getting such mail', 'social-networks-auto-poster-facebook-twitter-g') ?> </span> <br/>\r
+              </div>\r
+              </div>\r
+              \r
+              <?php $cr = get_option('NXS_cronCheck'); if (!empty($cr) && is_array($cr) && isset($cr['status']) && $cr['status']=='0') { ?> \r
+                <div class="itemDiv">             \r
+             <span style="color: red"> *** <?php _e('Your WP Cron is not working correctly.', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+     &nbsp;-&nbsp;<a target="_blank" href="<?php global $nxs_snapThisPageUrl; echo $nxs_snapThisPageUrl; ?>&do=crtest">WP Cron Test Results</a></span> <br/>\r
+             \r
+              <input value="set" id="forceBrokenCron" name="forceBrokenCron"  type="checkbox" <?php if (isset($options['forceBrokenCron']) && (int)$options['forceBrokenCron'] == 1) echo "checked"; ?> /> \r
+              <strong>Enable Cron functions even if WP Cron is not working correctly.</strong>\r
+               <br/><span style="color:red; font-weight: bold;"><?php _e('I understand that this could cause duplicate postings as well as perfomance and stability problems.', 'social-networks-auto-poster-facebook-twitter-g') ?></span> - \r
+               <span style="margin-left: 1px; color:red;"><?php _e('Please do not check this unless you absolutely sure that you know what are you doing.', 'social-networks-auto-poster-facebook-twitter-g') ?></span>\r
+               <br/><span style="margin-left: 1px; color:#005800;"><?php _e('Setting up WP Cron correctly will be much better solution:', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+                 <a href="http://www.nextscripts.com/tutorials/wp-cron-scheduling-tasks-in-wordpress/" target="_blank">WP-Cron: Scheduling Tasks in WordPress</a>\r
+               </span>\r
+               \r
+               \r
+               \r
+               </div>              \r
+             <?php  } ?> \r
+              \r
+           </div></div>               \r
+    \r
+           \r
+     \r
+     <?php if (function_exists("nxs_showPRXTab")) { ?>          \r
+      <h3 style="font-size: 14px; margin-bottom: 2px;">Show "Proxies" Tab</h3>             \r
+        <p style="margin: 0px;margin-left: 5px;"><input value="set" id="showPrxTab" name="showPrxTab"  type="checkbox" <?php if ((int)$options['showPrxTab'] == 1) echo "checked"; ?> /> \r
+          <strong>Show "Proxies" Tab</strong> <span style="font-size: 11px; margin-left: 1px;">Advanced Setting. Check to enable "Proxies" tab where you can setup autoposting proxies.</span>            \r
+        </p>    \r
+      <?php } ?>       \r
+           \r
+      <div class="submitX"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div>           \r
+      </form>\r
+    </div>\r
+    \r
+    <?php if ((function_exists("nxs_showPRXTab")) && (int)$options['showPrxTab'] == 1) {  nxs_showPRXTab($options);  } ?>\r
+    <div id="nsx_tab3" class="nsx_tab_content"> \r
+    <div style="width:760px;">\r
+    <a href="#" style="float: right" onclick="nxs_rfLog();return false;" class="NXSButton" id="nxs_clearLog">Refresh</a>\r
+    \r
+    Showing last 150 records <a href="#" onclick="nxs_clLog();return false;" class="NXSButton" id="nxs_clearLog">Clear Log</a><br/><br/>    \r
+      <div style="overflow: auto; border: 1px solid #999; width: 920px; height: 600px; font-size: 11px;" class="logDiv" id="nxslogDiv">\r
+        <?php //$logInfo = maybe_unserialize(get_option('NS_SNAutoPosterLog')); \r
+        $logInfo = nxs_getnxsLog();\r
+        if (is_array($logInfo)) \r
+          foreach (array_reverse($logInfo) as $logline) { \r
+            if ($logline['type']=='E') $actSt = "color:#FF0000;"; elseif ($logline['type']=='M') $actSt = "color:#585858;"; elseif ($logline['type']=='BG') $actSt = "color:#008000; font-weight:bold;";\r
+              elseif ($logline['type']=='I') $actSt = "color:#0000FF;"; elseif ($logline['type']=='W') $actSt = "color:#DB7224;"; elseif ($logline['type']=='BI') $actSt = "color:#0000FF; font-weight:bold;"; \r
+              elseif ($logline['type']=='GR') $actSt = "color:#008080;"; elseif ($logline['type']=='S') $actSt = "color:#005800; font-weight:bold;"; else $actSt = "color:#585858;";              \r
+            if ($logline['type']=='E') $msgSt = "color:#FF0000;"; elseif ($logline['type']=='BG') $msgSt = "color:#008000; font-weight:bold;"; else $msgSt = "color:#585858;";                            \r
+            if ($logline['nt']!='') $ntInfo = ' ['.$logline['nt'].'] '; else $ntInfo = '';           \r
+            echo '<snap style="color:#008000">['.$logline['date'].']</snap> - <snap style="'.$actSt.'">['.$logline['act'].']</snap>'.$ntInfo.'-  <snap style="'.$msgSt.'">'.$logline['msg'].'</snap> '.$logline['extInfo'].'<br/>'; \r
+          } ?>\r
+      </div>        \r
+      <?php $quPosts = maybe_unserialize(get_option('NSX_PostsQuery')); if (!is_array($quPosts)) $quPosts = array(); if (count($quPosts)>0) { ?>\r
+      <br/>Query:<br/>\r
+      <div style="overflow: auto; border: 1px solid #999; width: 920px; height: 200px; font-size: 11px;" class="logDiv" id="nxsQUDiv">\r
+      <?php \r
+        $pstEvrySec = $options['quDays']*86400+$options['quHrs']*3600+$options['quMins']*60; $offSet = ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );  $currTime = time() + $offSet;\r
+        if (count($quPosts)>0) { $nxTime = (isset($options['quNxTime']) && (int)$options['quNxTime']>0)?$options['quNxTime']:($currTime+$pstEvrySec); \r
+          echo  "<snap style='color:#008000;'>Current Time:</snap> ".date_i18n('Y-m-d H:i', $currTime)." | <snap style='color:#000080;'>Next Shedulled Time:</snap> ~".date_i18n('Y-m-d H:i', $nxTime)."  |  <snap style='color:#580058;'>Last Post made from query:</snap> ".date_i18n('Y-m-d H:i', $options['quLastShTime'])."<br/>----====== Query:<br/>";\r
+          foreach ($quPosts as $spostID){  $pst = get_post($spostID);  echo $spostID." - ".$pst->post_title."<br/>";}\r
+        }\r
+\r
+\r
+      ?>\r
+      </div>\r
+      <?php } ?>\r
+      \r
+    </div>        \r
+    </div>\r
+    \r
+    <div id="nsx_tab4" class="nsx_tab_content"> \r
+     \r
+     <div style="max-width:1000px;"> \r
+     \r
+<h3> Setup/Installation/Configuration Instructions   </h3>\r
+\r
+<?php nxs_memCheck(); ?><br/>\r
+\r
+     <table style="max-width:1000px"><tr><td valign="top" width="250">\r
+     \r
+   <div style="margin:0 25px 0 0; line-height: 24px;">   \r
+\r
+<a style="background-image:url(<?php echo $nxs_plurl; ?>img/led/application_form.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/installation-of-social-networks-auto-poster-for-wordpress/">Plugin Setup/Installation</a>\r
+<br/>\r
+&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php echo $nxs_plurl; ?>img/led/facebook.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-facebook-social-networks-auto-poster-wordpress/">  Facebook </a>\r
+<br/>\r
+&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php echo $nxs_plurl; ?>img/led/twitter.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-twitter-social-networks-auto-poster-wordpress/">  Twitter </a>\r
+<br/>\r
+&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php echo $nxs_plurl; ?>img/led/googleplus.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-google-plus-social-networks-auto-poster-wordpress/"> Google+ </a>\r
+<br>\r
+&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php echo $nxs_plurl; ?>img/led/pinterest.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-pinterest-social-networks-auto-poster-wordpress/">  Pinterest</a>\r
+<br>\r
+&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php echo $nxs_plurl; ?>img/led/tumblr.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-tumblr-social-networks-auto-poster-wordpress/">  Tumblr </a>\r
+<br>\r
+&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php echo $nxs_plurl; ?>img/led/linkedin.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-linkedin-social-networks-auto-poster-wordpress/">  LinkedIn </a>\r
+<br>\r
+&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php echo $nxs_plurl; ?>img/led/blogger.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-blogger-social-networks-auto-poster-wordpress/">  Blogger </a>\r
+<br>\r
+&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php echo $nxs_plurl; ?>img/led/delicious.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-delicious-social-networks-auto-poster-wordpress/"> Delicious </a>\r
+<br>\r
+&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php echo $nxs_plurl; ?>img/led/blogcom.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-wp-based-social-networks-auto-poster-wordpress/"> Wordpress.com/Blog.com</a>\r
+<br/><br/>\r
+<a style="font-weight: normal; font-size: 16px; line-height: 24px;" target="_blank" href="http://www.nextscripts.com/faq">FAQ</a><br/>\r
+<a style="font-weight: normal; font-size: 16px; line-height: 24px;" target="_blank" href="http://www.nextscripts.com/troubleshooting-social-networks-auto-poster">Troubleshooting FAQ</a>\r
+\r
+</div>\r
+\r
+</td>\r
+<td  valign="top" style="font-size: 14px;">\r
+<h3 style="margin-top: 0px;">Have questions/suggestions?</h3>\r
+<a style="font-weight: normal; font-size: 18px; line-height: 24px;" target="_blank" href="http://www.nextscripts.com/contact-us">===&gt; Contact us &lt;===</a> <br/>\r
+<h3 style="margin-top: 20px;">Have troubles/problems/found a bug?</h3>\r
+<a style="font-weight: normal; font-size: 18px; line-height: 24px;" target="_blank" href="http://www.nextscripts.com/support">===&gt; Open support ticket &lt;===</a>\r
+\r
+\r
+<h3 style="margin-top: 30px;">Like the Plugin? Would you like to support developers?</h3>\r
+<div style="line-height: 24px;">\r
+<b>Here is what you can do:</b><br/>\r
+<?php if(function_exists('doPostToGooglePlus')) { ?><s><?php } ?><img src="<?php echo $nxs_plurl; ?>img/snap-icon12.png"/> Get the <a href="http://www.nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts/#getit">"Pro" Edition</a>. You will be able to add several accounts for each network as well as post to Google+, Pinterest and LinkedIn company pages.<?php if(function_exists('doPostToGooglePlus')) { ?></s> <i>Done! Thank you!</i><?php } ?><br/>\r
+<img src="<?php echo $nxs_plurl; ?>img/snap-icon12.png"/> Rate the plugin 5 stars at <a href="http://wordpress.org/extend/plugins/social-networks-auto-poster-facebook-twitter-g/">wordpress.org page</a>.<br/>\r
+<img src="<?php echo $nxs_plurl; ?>img/snap-icon12.png"/> <a href="<?php echo nxs_get_admin_url(); ?>post-new.php">Write a blogpost</a> about the plugin and don't forget to auto-post this blogpost to all your social networks ;-).<br/>\r
+</div>\r
+</td></tr></table>\r
+   \r
+   <br/><br/>\r
+   <h3>Solutions for the most common problems: <a style="font-weight: normal; font-size: 16px; line-height: 24px;" target="_blank" href="http://www.nextscripts.com/troubleshooting-social-networks-auto-poster">Troubleshooting FAQ</a> </h3>\r
+   \r
+   \r
+  </div> </div> \r
+  \r
+  <div id="nsx_tab5" class="nsx_tab_content"><?php nxs_showNewPostForm($options); ?>  </div>\r
+</div>     \r
+            <div class="popShAtt" id="popShAttRPST1"><div class="nxs_tls_sbInfo2"><?php _e('Set random delays around your interval time, to make your posts appear more human', 'social-networks-auto-poster-facebook-twitter-g'); ?></div></div>\r
+           <form method="post" enctype="multipart/form-data"  id="nsStFormUpl" action="<?php echo $nxs_snapThisPageUrl?>">\r
+              <input type="file" accept="text/plain" onchange="jQuery('#nsStFormUpl').submit();" id="impFileSettings_button" name="impFileSettings_button" style="display: block; visibility: hidden; width: 1px; height: 0;" size="chars">\r
+              <input type="hidden" value="1" name="upload_NS_SNAutoPoster_settings" /> <input value="'" type="hidden" name="nxs_mqTest" />  <?php wp_nonce_field( 'nxsChkUpl', 'nxsChkUpl_wpnonce' ); ?> \r
+           </form>\r
+           <br/>&nbsp;<br/> <?php\r
+        }\r
+        function showSNAutoPosterOptionsPagex() { global $nxs_snapAvNts, $nxs_snapThisPageUrl, $nxsOne, $nxs_plurl, $nxs_isWPMU; $nxsOne = ''; $options = $this->nxs_options; ?>            \r
+            <br/><br/><br/>This version of the plugin is not compatible with <b>Wordpress Multisite Edition</b>. Please contact your Network Admin for the upgrade. <?php }\r
+        \r
+        function NS_SNAP_ShowPageTop(){  global $nxs_snapAvNts, $nxs_snapThisPageUrl, $nxsOne, $nxs_plurl, $nxs_isWPMU, $nxs_skipSSLCheck; $nxsOne = ''; $cstIt=0; $options = $this->nxs_options; \r
+        \r
+          if ($_GET['page']=='NextScripts_SNAP.php' && isset($_GET['do']) && $_GET['do']=='h'){ nxs_do_this_hourly(); die(); }\r
+          if ($_GET['page']=='NextScripts_SNAP.php' && isset($_GET['do']) && $_GET['do']=='q'){ nxs_do_post_from_query(); die(); }           \r
+          if (function_exists('nxs_doSMAS5')) { $rf = new ReflectionFunction('nxs_doSMAS5'); $cstIt++; $rff = $rf->getFileName(); }\r
+          $nxsOne = NextScripts_SNAP_Version; if (defined('NXSAPIVER')) $nxsOne .= " (<span id='nxsAPIUpd'>API</span> Version: ".NXSAPIVER.")"; ?>\r
+           <div style="float:right; padding-top: 10px; padding-right: 10px;">\r
+              <div style="float:right; text-align: center;"><a target="_blank" href="http://www.nextscripts.com"><img src="<?php echo $nxs_plurl; ?>img/Next_Scripts_Logo2.1-HOR-100px.png"></a><br/>\r
+              <a style="font-weight: normal; font-size: 16px; line-height: 24px;" target="_blank" href="http://www.nextscripts.com/support">[<?php  _e('Contact support', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a> \r
+              <?php if(!$options['isMA']) { ?><br/> <span style="color:#800000;"><?php _e('Ready to to Upgrade to Multiple Accounts Edition<br/> and get Google+ and Pinterest Auto-Posting?', 'social-networks-auto-poster-facebook-twitter-g'); ?></span>\r
+              <?php if(function_exists('nxsDoLic_ajax')) { ?> <br/><a style="font-weight: normal; font-size: 12px; line-height: 24px;" target="_blank" id="showLic" href="#">[<?php  _e('Enter your Activation Key', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>&nbsp;&nbsp;&nbsp;&nbsp; <?php } ?>\r
+              <a target="_blank" href="http://www.nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts#getit">[<?php  _e('Get It here', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>  <?php } ?>\r
+              </div>\r
+              <div id="showLicForm"><span class="nxspButton bClose"><span>X</span></span><div style="position: absolute; right: 10px; top:10px; font-size: 34px; font-weight: lighter;"><?php  _e('Activation', 'social-networks-auto-poster-facebook-twitter-g'); ?></div>\r
+              <br/><br/>\r
+              <h3><?php  _e('Multiple Accounts Edition and Google+ and Pinterest Auto-Posting', 'social-networks-auto-poster-facebook-twitter-g'); ?></h3><br/><?php  _e('You can find your key on this page', 'social-networks-auto-poster-facebook-twitter-g'); ?>: <a href="http://www.nextscripts.com/mypage">http://www.nextscripts.com/mypage</a>\r
+                <br/><br/> <?php _e('Enter your Key', 'social-networks-auto-poster-facebook-twitter-g'); ?>:  <input name="eLic" id="eLic"  style="width: 50%;"/>\r
+                <input type="button" class="button-primary" name="eLicDo" onclick="doLic();" value="Enter" />\r
+                <br/><br/><?php _e('Your plugin will be automatically upgraded', 'social-networks-auto-poster-facebook-twitter-g'); ?>. <?php wp_nonce_field( 'doLic', 'doLic_wpnonce' ); ?>\r
+              </div>              \r
+           </div> \r
+\r
+                    \r
+           <div class=wrap><h2><?php _e('Next Scripts: Social Networks Auto Poster Options', 'social-networks-auto-poster-facebook-twitter-g'); ?></h2> <?php _e('Plugin Version', 'social-networks-auto-poster-facebook-twitter-g'); ?>: <span style="color:#008000;font-weight: bold;"><?php echo $nxsOne; ?></span> <?php if($options['isMA']) { ?> [Pro - Multiple Accounts Edition]&nbsp;&nbsp;<?php } else {?>\r
+           <span style="color:#800000; font-weight: bold;">[Single Accounts Edition]</span>\r
+           <?php if(!$nxs_isWPMU) { ?>\r
+            - <a target="_blank" href="http://www.nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts"><?php _e('Get', 'social-networks-auto-poster-facebook-twitter-g'); ?> PRO - Multiple Accounts Edition</a><br/><br/>\r
+            \r
+           <?php _e('Here you can setup "Social Networks Auto Poster".', 'social-networks-auto-poster-facebook-twitter-g'); ?><br/> <?php _e('You can start by clicking "Add new account" button and choosing the Social Network you would like to add.', 'social-networks-auto-poster-facebook-twitter-g'); ?><?php }} ?><br/> \r
+           <?php  $disabled_functions = @ini_get('disable_functions');\r
+           if (!function_exists('curl_init')) {  \r
+               echo ("<br/><b style='font-size:16px; color:red;'>Error: No CURL Found</b> - <i style='font-size:12px; color:red;'>Social Networks AutoPoster needs the CURL PHP extension. Please install it or contact your hosting company to install it.</i><br/><br/>"); \r
+           }\r
+           if (stripos($disabled_functions, 'curl_exec')!==false) {  \r
+               echo ("<br/><b style='font-size:16px; color:red;'>curl_exec function is disabled in php.ini</b> - <i style='font-size:12px; color:red;'>Social Networks AutoPoster needs the CURL PHP extension. Please enable it or contact your hosting company to enable it.</i><br/><br/>"); \r
+           }\r
+           if (!empty($rff) && stripos($rff, "'d code")===false) { $options[chr(75).$cstIt] = $cstIt; update_option($this->dbOptionsName, $options); $this->nxs_options = $options; } \r
+           if (!isset($options['skipSSLSec'])) { $err = nxsCheckSSLCurl('https://www.google.com'); \r
+             if ($err!==false && $err['errNo']=='60') { $nxs_skipSSLCheck = true; $options['skipSSLSec'] = true; } else { $nxs_skipSSLCheck = false; $options['skipSSLSec'] = false; } \r
+             update_option($this->dbOptionsName, $options); $this->nxs_options = $options;\r
+           }\r
+           \r
+           /*\r
+           if ((defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE==true) || (defined('MULTISITE') &&  MULTISITE==true) ) { \r
+               echo "<br/><br/><br/><b style=\"font-size:16px; color:red;\">Sorry, we do not support Multiuser Wordpress at this time</b>"; return; \r
+           }\r
+           */\r
+           ?>\r
+           \r
+<?php if (function_exists('yoast_analytics')) { $plgnsLink = nxs_get_admin_url().'/plugins.php' ?>\r
+  <div class="error" id="message"><p><strong><?php _e('You have Google Analytics Plugin installed and activated.', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> <?php _e('This plugin hijacks the authorization workflow.', 'social-networks-auto-poster-facebook-twitter-g'); ?> \r
+  <?php printf( __( 'Please temporary <a href="%s">deactivate</a> Google Analytics plugin, do all authorizations and then activate it back.', 'social-networks-auto-poster-facebook-twitter-g' ), $plgnsLink ); ?></div>\r
+<?php }  \r
+        }\r
+        \r
+        function NS_SNAP_SavePostMetaTags($id) { global $nxs_snapAvNts, $plgn_NS_SNAutoPoster;            \r
+          if (!empty($_POST['nxs_snapPostOptions'])) { $NXS_POSTX = $_POST['nxs_snapPostOptions']; $NXS_POST = array(); $NXS_POST = NXS_parseQueryStr($NXS_POSTX); } else $NXS_POST = $_POST;\r
+          if (count($NXS_POST)<1 || !isset($NXS_POST["snapEdIT"]) || empty($NXS_POST["snapEdIT"])) return; \r
+          if (get_magic_quotes_gpc() || (!empty($_POST['nxs_mqTest']) && $_POST['nxs_mqTest']=="\'")){ array_walk_recursive($NXS_POST, 'nsx_stripSlashes'); }  array_walk_recursive($NXS_POST, 'nsx_fixSlashes');  \r
+          if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; //  echo "| NS_SNAP_SavePostMetaTags - ".$id." |";\r
+          $post = get_post($id); if ($post->post_type=='revision' && $post->post_status=='inherit' && $post->post_parent!='0') return; // prr($NXS_POST);          \r
+          if (empty($NXS_POST["useSURL"])) $NXS_POST["useSURL"] = '2'; delete_post_meta($id, '_snap_forceSURL'); add_post_meta($id, '_snap_forceSURL', $NXS_POST["useSURL"]);  \r
+          delete_post_meta($id, 'snap_MYURL'); add_post_meta($id, 'snap_MYURL', $NXS_POST["urlToUse"]);    delete_post_meta($id, 'snapEdIT'); add_post_meta($id, 'snapEdIT', '1' );            \r
+          $snap_isAutoPosted = get_post_meta($id, 'snap_isAutoPosted', true); if ($snap_isAutoPosted=='1' &&  $post->post_status=='future') { delete_post_meta($id, 'snap_isAutoPosted'); add_post_meta($id, 'snap_isAutoPosted', '2'); }\r
+          foreach ($nxs_snapAvNts as $avNt) { // echo "--------------------------------------------";  prr($avNt);          \r
+              if (isset($options[$avNt['lcode']]) && count($options[$avNt['lcode']])>0 && isset($NXS_POST[$avNt['lcode']]) && count($NXS_POST[$avNt['lcode']])>0) { $savedMeta = maybe_unserialize(get_post_meta($id, 'snap'.$avNt['code'], true)); \r
+              if(is_array($NXS_POST[$avNt['lcode']])) { $ii=0;\r
+                  foreach ($NXS_POST[$avNt['lcode']] as $pst ) {  // echo "###########";  prr($pst);\r
+                    if (is_array($pst) && empty( $pst['do'.$avNt['code']]) && empty($NXS_POST[$avNt['lcode']][$ii]['do'.$avNt['code']])) $NXS_POST[$avNt['lcode']][$ii]['do'.$avNt['code']] = 0; $ii++;\r
+                  }\r
+              } $newMeta = $NXS_POST[$avNt['lcode']];  \r
+              if (is_array($savedMeta) && is_array($newMeta)) $newMeta = nxsMergeArraysOV($savedMeta, $newMeta); // echo "#####~~~~~~~~~ ".$id."| snap".$avNt['code']; prr($savedMeta); echo "||"; prr($newMeta);// $newMeta = 'AAA';\r
+              delete_post_meta($id, 'snap'.$avNt['code']); add_post_meta($id, 'snap'.$avNt['code'], str_replace('\\','\\\\',serialize($newMeta)));   \r
+              }\r
+            }        //    die();\r
+          // prr($_POST);\r
+        }\r
+        \r
+        function NS_SNAP_AddPostMetaTags() { global $post, $nxs_snapAvNts, $plgn_NS_SNAutoPoster; $post_id = $post; if (is_object($post_id))  $post_id = $post_id->ID; \r
+          if (!is_object($post) || empty($post->post_status)) $post = get_post($post_id);\r
+          if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+          ?>\r
+          <style type="text/css">div#popShAtt {display: none; position: absolute; width: 600px; padding: 10px; background: #eeeeee; color: #000000; border: 1px solid #1a1a1a; font-size: 90%; }\r
+.underdash {border-bottom: 1px #21759B dashed; text-decoration:none;}\r
+.underdash a:hover {border-bottom: 1px #21759B dashed}\r
+</style>\r
+\r
+       <div id="NXS_MetaFields" class="NXSpostbox">  <input value="'" type="hidden" name="nxs_mqTest" /> <input value="" type="hidden" id="nxs_snapPostOptions" name="nxs_snapPostOptions" />\r
+          <div id="NXS_MetaFieldsIN" class="NXSpostbox">\r
+       <?php /* ################## WHAT URL to USE */ ###################### ?>\r
+          <div style="text-align: left; font-size: 14px; " class="showURL">\r
+          <div class="inside" style="border: 1px #E0E0E0 solid; padding: 5px;"><div id="postftfp">\r
+          <b>URL to use for links, attachments and %MYURL%:&nbsp;</b>     <a href="#" onclick="nxs_doResetPostSettings('<?php echo $post_id; ?>'); return false;" style="float:right;">Reset all SNAP data</a>\r
+          <input type="checkbox" class="isAutoURL" <?php  $forceSURL = get_post_meta($post_id, '_snap_forceSURL', true); \r
+            if (empty($forceSURL) && !empty($options['forceSURL']) || $forceSURL=='1') { ?>checked="checked"<?php } ?>  id="useSURL" name="useSURL" value="1"/> <?php _e('Shorten URL', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+          &nbsp;&nbsp;&nbsp;  \r
+          <input type="checkbox" class="isAutoURL" <?php $urlToUse = get_post_meta($post_id, 'snap_MYURL', true); \r
+            if ($urlToUse=='') { ?>checked="checked"<?php } ?>  id="isAutoURL-" name="isAutoURL" value="A"/> <?php _e('Auto', 'social-networks-auto-poster-facebook-twitter-g'); ?> - <i><?php _e('Post URL will be used', 'social-networks-auto-poster-facebook-twitter-g'); ?></i>\r
+                  \r
+                    <div class="nxs_prevURLDiv" <?php if (trim($urlToUse)=='') { ?> style="display:none;"<?php } ?> id="isAutoURLFld-">\r
+                      &nbsp;&nbsp;&nbsp;<?php _e('URL:', 'social-networks-auto-poster-facebook-twitter-g') ?> <input size="90" type="text" name="urlToUse" value="<?php echo $urlToUse ?>" id="URLToUse" /> \r
+                    </div>\r
+          </div></div></div>\r
+          \r
+\r
+          <div id="NXS_MetaFieldsBox" class="postbox"> \r
+          <div class="inside"><div id="postftfp">           \r
+           \r
+          \r
+          <input value="1" type="hidden" name="snapEdIT" />   \r
+          <div class="popShAtt" style="width: 200px;" id="popShAttSV"><?php _e('If you made any changes to the format, please "Update" the post before reposting', 'social-networks-auto-poster-facebook-twitter-g'); ?></div>\r
+          <?php if($post->post_status != "publish" ) { ?>\r
+          <div style="float: right;">   <input type="hidden" id="nxsLockIt" value="0" />       \r
+          <a href="#" onclick="jQuery('#nxsLockIt').val('1'); jQuery('.nxsGrpDoChb').attr('checked','checked'); return false;"><?php  _e('Check All', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>&nbsp;<a href="#" onclick="jQuery('#nxsLockIt').val('1');jQuery('.nxsGrpDoChb').removeAttr('checked'); return false;"><?php _e('Uncheck All', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>\r
+          </div>\r
+          <?php } ?>\r
+        \r
+          <table style="margin-bottom:40px; clear:both;" width="100%" border="0"><?php\r
+          foreach ($nxs_snapAvNts as $avNt) { $clName = 'nxs_snapClass'.$avNt['code']; \r
+             if ( isset($avNt['lcode']) && isset($options[$avNt['lcode']]) && count($options[$avNt['lcode']])>0) { $ntClInst = new $clName(); $ntClInst->showEdPostNTSettings($options[$avNt['lcode']], $post); }\r
+          }\r
+         ?></table>\r
+         \r
+         <div id="showSetTime" style="display: none;background-color: #fff; width: 350px; padding: 25px;"><span class="nxspButton bClose"><span>X</span></span>\r
+           \r
+           Set Time: (Current Time: <?php echo date_i18n('Y-m-d H:i'); ?> ) <div id="nxs_timestampdiv" class="hide-if-js" style="display: block;"><div class="timestamp-wrap"><select id="nxs_mm" name="nxs_mm">\r
+            <option value="1" <?php if (date_i18n('n')=='1') echo 'selected="selected"' ?>>01-Jan</option> <option value="2" <?php if (date_i18n('n')=='2') echo 'selected="selected"' ?>>02-Feb</option> \r
+            <option value="3" <?php if (date_i18n('n')=='3') echo 'selected="selected"' ?>>03-Mar</option> <option value="4" <?php if (date_i18n('n')=='4') echo 'selected="selected"' ?>>04-Apr</option> \r
+            <option value="5" <?php if (date_i18n('n')=='5') echo 'selected="selected"' ?>>05-May</option> <option value="6" <?php if (date_i18n('n')=='6') echo 'selected="selected"' ?>>06-Jun</option> \r
+            <option value="7" <?php if (date_i18n('n')=='7') echo 'selected="selected"' ?>>07-Jul</option> <option value="8" <?php if (date_i18n('n')=='8') echo 'selected="selected"' ?>>08-Aug</option> \r
+            <option value="9" <?php if (date_i18n('n')=='9') echo 'selected="selected"' ?>>09-Sep</option> <option value="10" <?php if (date_i18n('n')=='10') echo 'selected="selected"' ?>>10-Oct</option>\r
+            <option value="11" <?php if (date_i18n('n')=='11') echo 'selected="selected"' ?>>11-Nov</option> <option value="12" <?php if (date_i18n('n')=='12') echo 'selected="selected"' ?>>12-Dec</option> </select>\r
+            \r
+<input type="text" id="nxs_jj" name="nxs_jj" value="<?php echo date_i18n('d'); ?>" size="2" maxlength="2" autocomplete="off">, <input type="text" id="nxs_aa" name="nxs_aa" value="<?php echo date_i18n('Y'); ?>" size="4" maxlength="4" autocomplete="off"> @ <input type="text" id="nxs_hh" name="nxs_hh" value="<?php echo date_i18n('H'); ?>" size="2" maxlength="2" autocomplete="off"> : <input type="text" id="nxs_mn" name="nxs_mn" value="<?php echo date_i18n('i'); ?>" size="2" maxlength="2" autocomplete="off"></div><input type="hidden" id="nxs_ss" name="nxs_ss" value="58">\r
+<p>\r
+<a href="#" class="button bClose" onclick="var tid = jQuery('#nxs_timeID').val(); var tmTxt = nxs_makeTimeTxt(); var d=new Date(tmTxt);  var tm = d.getTime() / 1000; jQuery('#'+tid+'timeToRunTxt').html(tmTxt);  jQuery('#'+tid+'timeToRun').val(tm); return false;">OK</a>\r
+<a href="#" class="bClose">Cancel</a>\r
+<input type="hidden"  id="nxs_timeID" value="" />\r
+</p>\r
+</div>\r
+\r
+           \r
+           </div>\r
+         \r
+         </div></div></div> </div> </div> <?php \r
+        }\r
+        //## Add MetaBox to Post->Edit\r
+        function NS_SNAP_addCustomBoxes() { add_meta_box( 'NS_SNAP_AddPostMetaTags',  __( 'NextScripts: Social Networks Auto Poster - Post Options', 'social-networks-auto-poster-facebook-twitter-g' ), array($this, 'NS_SNAP_AddPostMetaTags'), 'post' );\r
+          global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+          \r
+          if ($options['useForPages']=='1') add_meta_box( 'NS_SNAP_AddPostMetaTags',  __( 'NextScripts: Social Networks Auto Poster - Post Options', 'social-networks-auto-poster-facebook-twitter-g' ), array($this, 'NS_SNAP_AddPostMetaTags'), 'page' );\r
+          \r
+          $args=array('public'=>true, '_builtin'=>false);  $output = 'names';  $operator = 'and';  $post_types = array(); if (function_exists('get_post_types')) $post_types=get_post_types($args, $output, $operator);           \r
+          if ((isset($options['nxsCPTSeld'])) && $options['nxsCPTSeld']!='') $nxsCPTSeld = unserialize($options['nxsCPTSeld']); else $nxsCPTSeld = array_keys($post_types);  // prr($nxsCPTSeld); prr($post_types);\r
+          foreach ($post_types as $cptID=>$cptName) if (in_array($cptID, $nxsCPTSeld)){ \r
+              add_meta_box( 'NS_SNAP_AddPostMetaTags',  __('NextScripts: Social Networks Auto Poster - Post Options', 'social-networks-auto-poster-facebook-twitter-g'), array($this, 'NS_SNAP_AddPostMetaTags'), $cptID );\r
+          }    \r
+        }\r
+    }\r
+}\r
+\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/js/js.js b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/js/js.js
new file mode 100644 (file)
index 0000000..3dc3099
--- /dev/null
@@ -0,0 +1,226 @@
+jQuery(document).ready(function() { \r
+  if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) { //## Chrome Autofill is evil\r
+    jQuery(window).load(function(){\r
+        jQuery('input:-webkit-autofill').each(function(){ var text =jQuery(this).val(); var name = jQuery(this).attr('name'); jQuery(this).after(this.outerHTML).remove(); jQuery('input[name=' + name + ']').val(text);});\r
+    });\r
+  }  \r
+  //jQuery( "input[onchange^='nxs_doShowWarning']" ).prop("indeterminate", true).css( "-webkit-appearance", "checkbox" );  \r
+  //jQuery( "input[onchange^='nxs_doShowWarning']" ).prop("indeterminate", true).css("background", "#D0D0D0").css("border-color", "#999");    \r
+  //## Submit Serialized Form - avoid Max.Vars limit.\r
+  jQuery('#nsStFormMisc').submit(function() { var dataA = jQuery('#nsStForm').serialize(); jQuery('#nxsMainFromElementAccts').val(dataA); jQuery('#_wpnonce').val(jQuery('input#nxsSsPageWPN_wpnonce').val()); });\r
+  jQuery('#nsStForm').submit(function() { jQuery('#nsStFormMisc').submit(); return false; });  \r
+  var nxs_isPrevirew = false;   \r
+  jQuery('#post-preview').click(function(event) { nxs_isPrevirew = true; });  \r
+  jQuery('#post').submit(function(event) { if (nxs_isPrevirew == true) return;  jQuery('body').append('<form id="nxs_tempForm"></form>'); jQuery("#NXS_MetaFieldsIN").appendTo("#nxs_tempForm");  \r
+      var nxsmf = jQuery('#nxs_tempForm').serialize();  jQuery( "#NXS_MetaFieldsIN" ).remove(); jQuery('#nxs_snapPostOptions').val(nxsmf); //alert(nxsmf);  alert(jQuery('#nxs_snapPostOptions').val()); return false; \r
+  });  \r
+  \r
+  \r
+  \r
+});\r
+\r
+\r
+\r
+(function($) {\r
+  $(function() {\r
+     jQuery('#nxs_snapAddNew').bind('click', function(e) { e.preventDefault(); jQuery('#nxs_spPopup').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [65, 50]}); });\r
+     jQuery('#showLic').bind('click', function(e) { e.preventDefault(); jQuery('#showLicForm').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false]}); });                                 \r
+     /* // Will move it here later for better compatibility\r
+     jQuery('.button-primary[name="update_NS_SNAutoPoster_settings"]').bind('click', function(e) { var str = jQuery('input[name="post_category[]"]').serialize(); jQuery('div.categorydivInd').replaceWith('<input type="hidden" name="pcInd" value="" />'); \r
+       str = str.replace(/post_category/g, "pk"); jQuery('div.categorydiv').replaceWith('<input type="hidden" name="post_category" value="'+str+'" />');  \r
+     });\r
+     */\r
+  });\r
+})(jQuery);\r
+\r
+function nxs_showNewPostFrom() { jQuery('#nxs_popupDiv').bPopup({ modalClose: false, speed: 450, transition: 'slideDown', contentContainer:'#nxs_popupDivCont', loadUrl: 'admin-ajax.php', 'loadData': { "action": "nxs_snap_aj", "nxsact":"getNewPostDlg", "_wpnonce":jQuery('input#nxsSsPageWPN_wpnonce').val() }, loadCallback: function(){ jQuery("#nxsNPLoader").hide();  }, onClose: function(){ jQuery("#nxsNPLoader").show(); }, opacity: 0.6, follow: [false, false]});  }\r
+\r
+function nxs_doNP(){ jQuery("#nxsNPLoaderPost").show(); var mNts = []; jQuery('input[name=nxsNPNts]:checked').each(function(i){ mNts[i] = jQuery(this).val(); });\r
+  jQuery.post(ajaxurl,{action: 'nxs_snap_aj',"nxsact":"doNewPost", mText: jQuery('#nxsNPText').val(), mTitle: jQuery('#nxsNPTitle').val(), mType: jQuery('input[name=nxsNPType]:checked').val(), mLink: jQuery('#nxsNPLink').val(), mImg: jQuery('#nxsNPImg').val(), mNts: mNts, nxs_mqTest:"'", _wpnonce: jQuery('#nxsSsPageWPN_wpnonce').val()}, function(j){  jQuery("#nxsNPResult").html(j); jQuery("#nxsNPLoaderPost").hide(); jQuery("#nxsNPCloseBt").val('Close'); }, "html")     \r
+}\r
+\r
+function nxs_updtRdBtn(idd){\r
+    jQuery('#rbtn'+idd).attr('type', 'checkbox'); //alert('rbtn'+idd);\r
+}\r
+\r
+//## Functions\r
+function nxs_doResetPostSettings(pid){    \r
+  jQuery.post(ajaxurl,{action: 'nxs_delPostSettings', pid: pid, _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val()}, function(j){  window.location = window.location.href.split("#")[0]; }, "html")     \r
+}\r
+function nxs_expSettings(){\r
+  jQuery.generateFile({ filename: 'nx-snap-settings.txt', content: jQuery('input#nxsSsPageWPN_wpnonce').val(), script: 'admin-ajax.php'});\r
+}\r
+// AJAX Functions\r
+function nxs_getPNBoards(u,p,ii){ jQuery("#pnLoadingImg"+ii).show();\r
+  jQuery.post(ajaxurl,{u:u,p:p,ii:ii, nxs_mqTest:"'", action: 'getBoards', id: 0, _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val()}, function(j){ \r
+    if (j.indexOf("option")<1) alert(j); else jQuery("select#apPNBoard"+ii).html(j); jQuery("#pnLoadingImg"+ii).hide();\r
+  }, "html")\r
+}\r
+function getGPCats(u,p,ii,c){ jQuery("#gpLoadingImg"+ii).show();\r
+  jQuery.post(ajaxurl,{u:u,p:p,c:c,ii:ii, nxs_mqTest:"'", action: 'getGPCats', id: 0, _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val()}, function(j){ var options = '';\r
+    jQuery("select#apGPCCats"+ii).html(j); jQuery("#gpLoadingImg"+ii).hide();\r
+  }, "html")\r
+}\r
+function getWLBoards(u,p,ii){ jQuery("#wlLoadingImg"+ii).show();\r
+  jQuery.post(ajaxurl,{u:u,p:p,ii:ii, nxs_mqTest:"'", action: 'getWLBoards', id: 0, _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val()}, function(j){ var options = '';\r
+    jQuery("select#apWLBoard"+ii).html(j); jQuery("#wlLoadingImg"+ii).hide();\r
+  }, "html")\r
+}\r
+function nxs_getBrdsOrCats(u,p,ty,ii,fName){ jQuery("#"+ty+"LoadingImg"+ii).show();\r
+  jQuery.post(ajaxurl,{u:u,p:p,ii:ii,ty:ty, nxs_mqTest:"'", action: 'nxs_getBrdsOrCats', id: 0, _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val()}, function(j){ var options = '';\r
+    jQuery("select#"+fName+ii).html(j); jQuery("#"+ty+"LoadingImg"+ii).hide();\r
+  }, "html")\r
+}\r
+\r
+\r
+function nxs_setRpstAll(t,ed,ii){ jQuery("#nxsLoadingImg"+t+ii).show(); var lpid = jQuery('#'+t+ii+'SetLPID').val();\r
+  jQuery.post(ajaxurl,{t:t,ed:ed,ii:ii, nxs_mqTest:"'", action: 'SetRpstAll', id: 0, lpid:lpid, _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val()}, function(j){ var options = '';\r
+    alert('OK. Done.'); jQuery("#nxsLoadingImg"+t+ii).hide();\r
+  }, "html")\r
+}\r
+\r
+function nxs_fillTime(dd){ var d=new Date(dd); jQuery('#nxs_aa').val(d.getFullYear()); jQuery('#nxs_mm').val(d.getMonth()+1); jQuery('#nxs_jj').val(d.getDate()); jQuery('#nxs_hh').val(d.getHours()); jQuery('#nxs_mn').val(d.getMinutes()); }\r
+function nxs_makeTimeTxt(){ var m=new Array();m[0]="January";m[1]="February";m[2]="March";m[3]="April";m[4]="May";m[5]="June";m[6]="July";m[7]="August";m[8]="September";m[9]="October";m[10]="November";m[11]="December";  \r
+    return m[jQuery('#nxs_mm').val()-1]+', '+jQuery('#nxs_jj').val()+' '+jQuery('#nxs_aa').val()+' '+jQuery('#nxs_hh').val()+':'+jQuery('#nxs_mn').val()+':00'; \r
+}\r
+\r
+//## Select/Unselect Categories\r
+function nxs_chAllCatsL(ch, divID){ jQuery("#"+divID+" input:checkbox[name='post_category[]']").attr('checked', ch==1); }\r
+function nxs_markCats(cats){ var catsA = cats.split(',');\r
+  jQuery("#showCatSel input:checkbox[name='post_category[]']").each(function(index) { jQuery(this).attr('checked', jQuery.inArray(jQuery(this).val(), catsA)>-1);  });    \r
+}\r
+function nxs_doSetSelCats(nt, idNum){ var scc = ''; var sccA = []; \r
+  jQuery("#showCatSel input:checkbox[name='post_category[]']").each(function(index) {  if(jQuery(this).is(":checked")) sccA.push(jQuery(this).val()); });\r
+  var sccL = sccA.length; if (sccL>0) scc = sccA.join(",");  jQuery('#nxs_SC_'+nt).val(scc); jQuery('#nxs_SCA_'+nt).html('Selected ['+sccL+']');\r
+}\r
+\r
+function nxs_showPopUpInfo(pid, e){ if (!jQuery('div#'+pid).is(":visible")) jQuery('div#'+pid).show().css('top', e.pageY+5).css('left', e.pageX+25).appendTo('body'); }\r
+function nxs_hidePopUpInfo(pid){ jQuery('div#'+pid).hide(); }\r
+\r
+function showPopShAtt(imid, e){ if (!jQuery('div#popShAtt'+imid).is(":visible")) jQuery('div#popShAtt'+imid).show().css('top', e.pageY+5).css('left', e.pageX+25).appendTo('body'); }\r
+function hidePopShAtt(imid){ jQuery('div#popShAtt'+imid).hide(); }\r
+function doSwitchShAtt(att, idNum){\r
+  if (att==1) { if (jQuery('#apFBAttch'+idNum).is(":checked")) {jQuery('#apFBAttchShare'+idNum).prop('checked', false);}} else {if( jQuery('#apFBAttchShare'+idNum).is(":checked")) jQuery('#apFBAttch'+idNum).prop('checked', false);}\r
+}      \r
+      \r
+function doShowHideAltFormat(){ if (jQuery('#NS_SNAutoPosterAttachPost').is(':checked')) { \r
+  jQuery('#altFormat').css('margin-left', '20px'); jQuery('#altFormatText').html('Post Announce Text:'); } else {jQuery('#altFormat').css('margin-left', '0px'); jQuery('#altFormatText').html('Post Text Format:');}\r
+}\r
+function nxs_doShowWarning(blID, num, bl, ii){ var idnum = bl+ii; \r
+  if (blID.is(':checked')) { var cnf =  confirm("You have active filters. You have "+num+" categories or tags selected. \n\r This will reset all filters. \n\r Would you like to continue?");   \r
+  if (cnf==true) { if (jQuery('#catSelA'+idnum).length) jQuery('#catSelA'+idnum).prop('checked', true); else {\r
+      jQuery('#nsStForm').append('<input type="hidden" id="catSelA'+idnum+'" name="'+bl.toLowerCase()+'['+ii+'][catSel]" value="X" />');\r
+  } } else { blID.prop('checked', false); }\r
+}}\r
+function doShowHideBlocks(blID){ /* alert('#do'+blID+'Div'); */ if (jQuery('#apDo'+blID).is(':checked')) jQuery('#do'+blID+'Div').show(); else jQuery('#do'+blID+'Div').hide();}\r
+function doShowHideBlocks1(blID, shhd){ if (shhd==1) jQuery('#do'+blID+'Div').show(); else jQuery('#do'+blID+'Div').hide();}            \r
+function doShowHideBlocks2(blID){ if (jQuery('#apDoS'+blID).val()=='0') { jQuery('#do'+blID+'Div').show(); jQuery('#do'+blID+'A').text('[Hide Settings]'); jQuery('#apDoS'+blID).val('1'); } \r
+  else { jQuery('#do'+blID+'Div').hide(); jQuery('#do'+blID+'A').text('[Show Settings]'); jQuery('#apDoS'+blID).val('0'); }\r
+}\r
+\r
+function doGetHideNTBlock(bl,ii){ if (jQuery('#apDoS'+bl+ii).length<1 || jQuery('#apDoS'+bl+ii).val()=='0') { \r
+    if (jQuery('#do'+bl+ii+'Div').length<1) {  jQuery("#"+bl+ii+"LoadingImg").show();\r
+      jQuery.post(ajaxurl,{nxsact:'getNTset',nt:bl,ii:ii,action:'nxs_snap_aj', _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val()}, function(j){ var options = '';\r
+        //## check is filters were reset\r
+        //var filtersReset = jQuery('#catSelA'+bl+ii).length && jQuery('#catSelA'+bl+ii).val() == 'X'; if (filtersReset) jQuery('#catSelA'+bl+ii).remove();\r
+        //## Show data\r
+        jQuery('#nxsNTSetDiv'+bl+ii).html(j); nxs_doTabsInd('#nxsNTSetDiv'+bl+ii); jQuery("#"+bl+ii+"LoadingImg").hide(); jQuery('#do'+bl+ii+'Div').show(); jQuery('#do'+bl+ii+'AG').text('[Hide Settings]'); jQuery('#apDoS'+bl+ii).val('1');        \r
+        if (jQuery('#rbtn'+bl.toLowerCase()+ii).attr('type') != 'checkbox') jQuery('#rbtn'+bl.toLowerCase()+ii).attr('type', 'checkbox');          \r
+        // if (filtersReset) jQuery('#catSelA'+bl+ii).prop('checked', true);\r
+      }, "html")\r
+    } else { jQuery('#do'+bl+ii+'Div').show(); jQuery('#do'+bl+ii+'AG').text('[Hide Settings]'); jQuery('#apDoS'+bl+ii).val('1'); }\r
+  } else { jQuery('#do'+bl+ii+'Div').hide(); jQuery('#do'+bl+ii+'AG').text('[Show Settings]'); jQuery('#apDoS'+bl+ii).val('0'); }\r
+}\r
+\r
+function nxs_showHideBlock(iid, iclass){jQuery('.'+iclass).hide(); jQuery('#'+iid).show();}\r
+            \r
+function doShowFillBlock(blIDTo, blIDFrm){ jQuery('#'+blIDTo).html(jQuery('#do'+blIDFrm+'Div').html());}\r
+function doCleanFillBlock(blIDFrm){ jQuery('#do'+blIDFrm+'Div').html('');}\r
+            \r
+function doShowFillBlockX(blIDFrm){ jQuery('.clNewNTSets').hide(); jQuery('#do'+blIDFrm+'Div').show(); }\r
+            \r
+function doDelAcct(nt, blID, blName){  var answer = confirm("Remove "+blName+" account?");\r
+  if (answer){ var data = { action: 'nsDN', id: 0, nt: nt, id: blID, _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val()}; \r
+    jQuery.post(ajaxurl, data, function(response) {  window.location = window.location.href.split("#")[0];  });\r
+  }           \r
+}      \r
+\r
+function callAjSNAP(data, label) { \r
+  var style = "position: fixed; display: none; z-index: 1000; top: 50%; left: 50%; background-color: #E8E8E8; border: 1px solid #555; padding: 15px; width: 350px; min-height: 80px; margin-left: -175px; margin-top: -40px; text-align: center; vertical-align: middle;";\r
+  jQuery('body').append("<div id='test_results' style='" + style + "'></div>");\r
+  jQuery('#test_results').html("<p>Sending update to "+label+"</p>" + "<p><img src='http://gtln.us/img/misc/ajax-loader-med.gif' /></p>");\r
+  jQuery('#test_results').show();            \r
+  jQuery.post(ajaxurl, data, function(response) { if (response=='') response = 'Message Posted';\r
+    jQuery('#test_results').html('<p> ' + response + '</p>' +'<input type="button" class="button" name="results_ok_button" id="results_ok_button" value="OK" />');\r
+    jQuery('#results_ok_button').click(remove_results);\r
+  });            \r
+}\r
+function remove_results() { jQuery("#results_ok_button").unbind("click");jQuery("#test_results").remove();\r
+  if (typeof document.body.style.maxHeight == "undefined") { jQuery("body","html").css({height: "auto", width: "auto"}); jQuery("html").css("overflow","");}\r
+  document.onkeydown = "";document.onkeyup = "";  return false;\r
+}\r
+\r
+function mxs_showHideFrmtInfo(hid){\r
+  if(!jQuery('#'+hid+'Hint').is(':visible')) mxs_showFrmtInfo(hid); else {jQuery('#'+hid+'Hint').hide(); jQuery('#'+hid+'HintInfo').html('Show format info');}\r
+}\r
+function mxs_showFrmtInfo(hid){\r
+  jQuery('#'+hid+'Hint').show(); jQuery('#'+hid+'HintInfo').html('Hide format info'); \r
+}\r
+function nxs_clLog(){\r
+  jQuery.post(ajaxurl,{action: 'nxs_clLgo', id: 0, _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val()}, function(j){ var options = '';                    \r
+    jQuery("#nxslogDiv").html('');\r
+  }, "html")\r
+}\r
+function nxs_rfLog(){\r
+  jQuery.post(ajaxurl,{action: 'nxs_rfLgo', id: 0, _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val()}, function(j){ var options = '';                    \r
+    jQuery("#nxslogDiv").html(j);\r
+  }, "html")\r
+}\r
+function nxs_prxTest(){  jQuery('#nxs_pchAjax').show();\r
+  jQuery.post(ajaxurl,{action: 'nxs_prxTest', id: 0, _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val()}, function(j){ var options = '';                    \r
+    jQuery('#nxs_pchAjax').hide(); jQuery("#prxList").html(j);  \r
+  }, "html")\r
+}\r
+function nxs_prxGet(){  jQuery('#nxs_pchAjax').show();\r
+  jQuery.post(ajaxurl,{action: 'nxs_prxGet', id: 0, _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val()}, function(j){ var options = '';                    \r
+    jQuery('#nxs_pchAjax').hide(); jQuery("#prxList").html(j);  \r
+  }, "html")\r
+}\r
+function nxs_TRSetEnable(ptype, ii){\r
+  if (ptype=='I'){ jQuery('#apTRMsgTFrmt'+ii).attr('disabled', 'disabled'); jQuery('#apTRDefImg'+ii).removeAttr('disabled'); } \r
+    else { jQuery('#apTRDefImg'+ii).attr('disabled', 'disabled');  jQuery('#apTRMsgTFrmt'+ii).removeAttr('disabled'); }                \r
+}\r
+function nxsTRURLVal(ii){ var val = jQuery('#apTRURL'+ii).val(); var srch = val.toLowerCase().indexOf('http://www.tumblr.com/blog/');\r
+  if (srch>-1) { jQuery('#apTRURL'+ii).css({"background-color":"#FFC0C0"}); jQuery('#apTRURLerr'+ii).html('<br/>Incorrect URL: Please note that URL of your Tumblr Blog should be your public URL. (i.e. like http://nextscripts.tumblr.com/, not http://www.tumblr.com/blog/nextscripts'); } else { jQuery('#apTRURL'+ii).css({"background-color":"#ffffff"}); jQuery('#apTRURLerr'+ii).text(''); }            \r
+}\r
+\r
+function nxs_hideTip(id){  \r
+  jQuery.post(ajaxurl,{action: 'nxs_hideTip', id: id, _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val()}, function(j){ var options = '';                    \r
+     jQuery('#'+id).hide(); \r
+  }, "html")\r
+}\r
+\r
+function nxs_actDeActTurnOff(objId){ if (jQuery('#'+objId).val()!='1') jQuery('#'+objId+'xd').show(); else jQuery('#'+objId+'xd').hide();}\r
+\r
+//## Export File\r
+(function(jQuery){ jQuery.generateFile = function(options){ options = options || {};\r
+        if(!options.script || !options.filename || !options.content){\r
+            throw new Error("Please enter all the required config options!");\r
+        }\r
+        var iframe = jQuery('<iframe>',{ width:1, height:1, frameborder:0, css:{ display:'none' } }).appendTo('body');\r
+        var formHTML = '<form action="" method="post"><input type="hidden" name="filename" /><input type="hidden" name="_wpnonce" /><input type="hidden" name="action" value="nxs_getExpSettings" /></form>';\r
+        setTimeout(function(){\r
+            var body = (iframe.prop('contentDocument') !== undefined) ? iframe.prop('contentDocument').body : iframe.prop('document').body;    // IE\r
+            body = jQuery(body); body.html(formHTML); var form = body.find('form');\r
+            form.attr('action',options.script);\r
+            form.find('input[name=filename]').val(options.filename);            \r
+            form.find('input[name=_wpnonce]').val(options.content);\r
+            form.submit();\r
+        },50);\r
+    };\r
+})(jQuery);\r
+\r
+/*================================================================================\r
+ * @name: bPopup * @author: (c)Bjoern Klinggaard (twitter@bklinggaard) * @version: 0.9.4.min\r
+ ================================================================================*/\r
+ (function(b){b.fn.bPopup=function(z,F){function K(){a.contentContainer=b(a.contentContainer||c);switch(a.content){case "iframe":var h=b('<iframe class="b-iframe" '+a.iframeAttr+"></iframe>");h.appendTo(a.contentContainer);r=c.outerHeight(!0);s=c.outerWidth(!0);A();h.attr("src",a.loadUrl);k(a.loadCallback);break;case "image":A();b("<img />").load(function(){k(a.loadCallback);G(b(this))}).attr("src",a.loadUrl).hide().appendTo(a.contentContainer);break;default:A(),b('<div class="b-ajax-wrapper"></div>').load(a.loadUrl,a.loadData,function(){k(a.loadCallback);G(b(this))}).hide().appendTo(a.contentContainer)}}function A(){a.modal&&b('<div class="b-modal '+e+'"></div>').css({backgroundColor:a.modalColor,position:"fixed",top:0,right:0,bottom:0,left:0,opacity:0,zIndex:a.zIndex+t}).appendTo(a.appendTo).fadeTo(a.speed,a.opacity);D();c.data("bPopup",a).data("id",e).css({left:"slideIn"==a.transition||"slideBack"==a.transition?"slideBack"==a.transition?g.scrollLeft()+u:-1*(v+s):l(!(!a.follow[0]&&m||f)),position:a.positionStyle||"absolute",top:"slideDown"==a.transition||"slideUp"==a.transition?"slideUp"==a.transition?g.scrollTop()+w:x+-1*r:n(!(!a.follow[1]&&p||f)),"z-index":a.zIndex+t+1}).each(function(){a.appending&&b(this).appendTo(a.appendTo)});H(!0)}function q(){a.modal&&b(".b-modal."+c.data("id")).fadeTo(a.speed,0,function(){b(this).remove()});a.scrollBar||b("html").css("overflow","auto");b(".b-modal."+e).unbind("click");g.unbind("keydown."+e);d.unbind("."+e).data("bPopup",0<d.data("bPopup")-1?d.data("bPopup")-1:null);c.undelegate(".bClose, ."+a.closeClass,"click."+e,q).data("bPopup",null);H();return!1}function G(h){var b=h.width(),e=h.height(),d={};a.contentContainer.css({height:e,width:b});e>=c.height()&&(d.height=c.height());b>=c.width()&&(d.width=c.width());r=c.outerHeight(!0);s=c.outerWidth(!0);D();a.contentContainer.css({height:"auto",width:"auto"});d.left=l(!(!a.follow[0]&&m||f));d.top=n(!(!a.follow[1]&&p||f));c.animate(d,250,function(){h.show();B=E()})}function L(){d.data("bPopup",t);c.delegate(".bClose, ."+a.closeClass,"click."+e,q);a.modalClose&&b(".b-modal."+e).css("cursor","pointer").bind("click",q);M||!a.follow[0]&&!a.follow[1]||d.bind("scroll."+e,function(){B&&c.dequeue().animate({left:a.follow[0]?l(!f):"auto",top:a.follow[1]?n(!f):"auto"},a.followSpeed,a.followEasing)}).bind("resize."+e,function(){w=y.innerHeight||d.height();u=y.innerWidth||d.width();if(B=E())clearTimeout(I),I=setTimeout(function(){D();c.dequeue().each(function(){f?b(this).css({left:v,top:x}):b(this).animate({left:a.follow[0]?l(!0):"auto",top:a.follow[1]?n(!0):"auto"},a.followSpeed,a.followEasing)})},50)});a.escClose&&g.bind("keydown."+e,function(a){27==a.which&&q()})}function H(b){function d(e){c.css({display:"block",opacity:1}).animate(e,a.speed,a.easing,function(){J(b)})}switch(b?a.transition:a.transitionClose||a.transition){case "slideIn":d({left:b?l(!(!a.follow[0]&&m||f)):g.scrollLeft()-(s||c.outerWidth(!0))-C});break;case "slideBack":d({left:b?l(!(!a.follow[0]&&m||f)):g.scrollLeft()+u+C});break;case "slideDown":d({top:b?n(!(!a.follow[1]&&p||f)):g.scrollTop()-(r||c.outerHeight(!0))-C});break;case "slideUp":d({top:b?n(!(!a.follow[1]&&p||f)):g.scrollTop()+w+C});break;default:c.stop().fadeTo(a.speed,b?1:0,function(){J(b)})}}function J(b){b?(L(),k(F),a.autoClose&&setTimeout(q,a.autoClose)):(c.hide(),k(a.onClose),a.loadUrl&&(a.contentContainer.empty(),c.css({height:"auto",width:"auto"})))}function l(a){return a?v+g.scrollLeft():v}function n(a){return a?x+g.scrollTop():x}function k(a){b.isFunction(a)&&a.call(c)}function D(){x=p?a.position[1]:Math.max(0,(w-c.outerHeight(!0))/2-a.amsl);v=m?a.position[0]:(u-c.outerWidth(!0))/2;B=E()}function E(){return w>c.outerHeight(!0)&&u>c.outerWidth(!0)}b.isFunction(z)&&(F=z,z=null);var a=b.extend({},b.fn.bPopup.defaults,z);a.scrollBar||b("html").css("overflow","hidden");var c=this,g=b(document),y=window,d=b(y),w=y.innerHeight||d.height(),u=y.innerWidth||d.width(),M=/OS 6(_\d)+/i.test(navigator.userAgent),C=200,t=0,e,B,p,m,f,x,v,r,s,I;c.close=function(){a=this.data("bPopup");e="__b-popup"+d.data("bPopup")+"__";q()};return c.each(function(){b(this).data("bPopup")||(k(a.onOpen),t=(d.data("bPopup")||0)+1,e="__b-popup"+t+"__",p="auto"!==a.position[1],m="auto"!==a.position[0],f="fixed"===a.positionStyle,r=c.outerHeight(!0),s=c.outerWidth(!0),a.loadUrl?K():A())})};b.fn.bPopup.defaults={amsl:50,appending:!0,appendTo:"body",autoClose:!1,closeClass:"b-close",content:"ajax",contentContainer:!1,easing:"swing",escClose:!0,follow:[!0,!0],followEasing:"swing",followSpeed:500,iframeAttr:'scrolling="no" frameborder="0"',loadCallback:!1,loadData:!1,loadUrl:!1,modal:!0,modalClose:!0,modalColor:"#000",onClose:!1,onOpen:!1,opacity:0.7,position:["auto","auto"],positionStyle:"absolute",scrollBar:!0,speed:250,transition:"fadeIn",transitionClose:!1,zIndex:999997}})(jQuery);
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-es_ES.mo b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-es_ES.mo
new file mode 100644 (file)
index 0000000..aa77783
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-es_ES.mo differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-es_ES.po b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-es_ES.po
new file mode 100644 (file)
index 0000000..47021e2
--- /dev/null
@@ -0,0 +1,768 @@
+# Copyright (C) 2013 NextScripts: Social Networks Auto-Poster
+# This file is distributed under the same license as the NextScripts: Social Networks Auto-Poster package.
+msgid ""
+msgstr ""
+"Project-Id-Version: NextScripts: Social Networks Auto-Poster 2.6.0\n"
+"Report-Msgid-Bugs-To: http://wordpress.org/tag/social-networks-auto-poster-"
+"facebook-twitter-g\n"
+"POT-Creation-Date: 2013-01-24 19:11:08+00:00\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"PO-Revision-Date: 2013-11-19 13:36+0100\n"
+"Last-Translator: jelena kovacevic <jecajeca260@gmail.com>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"X-Generator: Poedit 1.5.5\n"
+
+#: inc-cl/bg.php:12 inc-cl/di.php:13 inc-cl/dl.php:12 inc-cl/fb.php:44
+#: inc-cl/gp.php:12 inc-cl/li.php:61 inc-cl/lj.php:12 inc-cl/pk.php:50
+#: inc-cl/pn.php:12 inc-cl/su.php:12 inc-cl/tr.php:40 inc-cl/tw.php:12
+#: inc-cl/vb.php:12 inc-cl/vk.php:12 inc-cl/wp.php:12
+msgid "accounts"
+msgstr "cuentas"
+
+#: inc-cl/bg.php:19 inc-cl/di.php:20 inc-cl/dl.php:19 inc-cl/fb.php:52
+#: inc-cl/gp.php:20 inc-cl/li.php:70 inc-cl/lj.php:19 inc-cl/pk.php:58
+#: inc-cl/pn.php:20 inc-cl/su.php:19 inc-cl/tr.php:48 inc-cl/tw.php:19
+#: inc-cl/vb.php:19 inc-cl/vk.php:19 inc-cl/wp.php:19
+msgid "Auto-publish to"
+msgstr "Auto publicar en"
+
+#: inc-cl/bg.php:20 inc-cl/di.php:21 inc-cl/dl.php:20 inc-cl/fb.php:53
+#: inc-cl/gp.php:21 inc-cl/li.php:71 inc-cl/lj.php:20 inc-cl/pk.php:59
+#: inc-cl/pn.php:21 inc-cl/su.php:20 inc-cl/tr.php:49 inc-cl/tw.php:20
+#: inc-cl/vb.php:20 inc-cl/vk.php:20 inc-cl/wp.php:20
+msgid "Attention requred. Unfinished setup"
+msgstr "Atención requerida. Instalación no terminada."
+
+#: inc-cl/bg.php:20 inc-cl/di.php:21 inc-cl/dl.php:20 inc-cl/fb.php:53
+#: inc-cl/gp.php:21 inc-cl/li.php:71 inc-cl/lj.php:20 inc-cl/pk.php:59
+#: inc-cl/pn.php:21 inc-cl/su.php:20 inc-cl/tr.php:49 inc-cl/tw.php:20
+#: inc-cl/vb.php:20 inc-cl/vk.php:20 inc-cl/wp.php:20
+msgid "Show Settings"
+msgstr "Mostrar Configuración"
+
+#: inc-cl/bg.php:21 inc-cl/di.php:22 inc-cl/dl.php:21 inc-cl/fb.php:54
+#: inc-cl/gp.php:22 inc-cl/li.php:72 inc-cl/lj.php:21 inc-cl/pk.php:60
+#: inc-cl/pn.php:22 inc-cl/su.php:21 inc-cl/tr.php:50 inc-cl/tw.php:21
+#: inc-cl/vb.php:21 inc-cl/vk.php:21 inc-cl/wp.php:21
+msgid "Remove Account"
+msgstr "Eliminar Cuenta"
+
+#: inc-cl/bg.php:36 inc-cl/di.php:36 inc-cl/dl.php:33 inc-cl/fb.php:70
+#: inc-cl/gp.php:37 inc-cl/li.php:86 inc-cl/lj.php:33 inc-cl/pk.php:73
+#: inc-cl/pn.php:41 inc-cl/su.php:35 inc-cl/tr.php:63 inc-cl/tw.php:33
+#: inc-cl/vb.php:35 inc-cl/vk.php:35 inc-cl/wp.php:33
+msgid "Detailed %s Installation/Configuration Instructions"
+msgstr "Instrucciones de Instalación/Configuración %s detalladas"
+
+#: inc-cl/bg.php:38 inc-cl/di.php:38 inc-cl/dl.php:35 inc-cl/fb.php:75
+#: inc-cl/gp.php:39 inc-cl/li.php:88 inc-cl/lj.php:36 inc-cl/pk.php:75
+#: inc-cl/pn.php:42 inc-cl/su.php:37 inc-cl/tr.php:65 inc-cl/tw.php:35
+#: inc-cl/vb.php:37 inc-cl/vk.php:40 inc-cl/wp.php:37
+msgid "Account Nickname"
+msgstr "Apodo de Cuenta"
+
+#: inc-cl/bg.php:38 inc-cl/di.php:38 inc-cl/dl.php:35 inc-cl/fb.php:75
+#: inc-cl/gp.php:39 inc-cl/li.php:88 inc-cl/lj.php:36 inc-cl/pk.php:75
+#: inc-cl/pn.php:42 inc-cl/su.php:37 inc-cl/tr.php:65 inc-cl/tw.php:35
+#: inc-cl/vb.php:37 inc-cl/vk.php:40 inc-cl/wp.php:37
+msgid "Just so you can easely identify it"
+msgstr "Solo para que pueda identificarla fácilmente"
+
+#: inc-cl/bg.php:43 inc-cl/di.php:43 inc-cl/dl.php:39 inc-cl/fb.php:80
+#: inc-cl/gp.php:43 inc-cl/li.php:92 inc-cl/lj.php:40 inc-cl/pk.php:79
+#: inc-cl/pn.php:46 inc-cl/su.php:41 inc-cl/tr.php:69 inc-cl/tw.php:39
+#: inc-cl/vb.php:41 inc-cl/vk.php:45 inc-cl/wp.php:41
+msgid "Categories"
+msgstr "Categorías"
+
+#: inc-cl/bg.php:47 inc-cl/di.php:47 inc-cl/dl.php:43 inc-cl/fb.php:84
+#: inc-cl/gp.php:47 inc-cl/li.php:96 inc-cl/lj.php:44 inc-cl/pk.php:83
+#: inc-cl/pn.php:50 inc-cl/su.php:45 inc-cl/tr.php:73 inc-cl/tw.php:43
+#: inc-cl/vb.php:45 inc-cl/vk.php:49 inc-cl/wp.php:45
+msgid "Only selected categories will be autoposted to this account"
+msgstr "Solo las categorías seleccionadas serán auto posteadas en esta cuenta"
+
+#: inc-cl/bg.php:55
+msgid ""
+"Log to your Blogger management panel and look at the URL of your blog: "
+"http://www.blogger.com/blogger.g?blogID=8959085979163812093#allposts. Your "
+"Blog ID will be: 8959085979163812093"
+msgstr ""
+"Autentíquese en su panel de gestión del Blogger y mire la URL de su blog: "
+"http://www.blogger.com/blogger.g?blogID=8959085979163812093#allposts. Su ID "
+"del Blog será: 8959085979163812093"
+
+#: inc-cl/bg.php:59 inc-cl/di.php:64 inc-cl/dl.php:54 inc-cl/lj.php:53
+#: inc-cl/tr.php:87 inc-cl/vb.php:68 inc-cl/wp.php:60
+msgid "Post Title Format"
+msgstr "Formato del Título del Post"
+
+#: inc-cl/bg.php:59 inc-cl/bg.php:64 inc-cl/di.php:64 inc-cl/di.php:69
+#: inc-cl/dl.php:54 inc-cl/dl.php:60 inc-cl/fb.php:94 inc-cl/gp.php:63
+#: inc-cl/lj.php:53 inc-cl/lj.php:57 inc-cl/pk.php:105 inc-cl/pn.php:76
+#: inc-cl/su.php:72 inc-cl/tr.php:87 inc-cl/tr.php:115 inc-cl/vb.php:68
+#: inc-cl/vb.php:73 inc-cl/vk.php:89
+msgid "Show format info"
+msgstr "Mostrar información del formato"
+
+#: inc-cl/bg.php:64 inc-cl/di.php:69 inc-cl/dl.php:60 inc-cl/lj.php:57
+#: inc-cl/pk.php:105 inc-cl/su.php:72 inc-cl/tr.php:115 inc-cl/vb.php:73
+#: inc-cl/wp.php:64
+msgid "Post Text Format"
+msgstr "Formato del Texto del Post"
+
+#: inc-cl/bg.php:72 inc-cl/di.php:60
+msgid "Post with tags"
+msgstr "Post con etiquetas"
+
+#: inc-cl/bg.php:72
+msgid "Tags from the blogpost will be auto-posted to Blogger/Blogspot"
+msgstr "Las etiquetas del blogpost serán auto posteadas a Blogger/Blogspot"
+
+#: inc-cl/bg.php:77 inc-cl/di.php:75 inc-cl/dl.php:66 inc-cl/fb.php:144
+#: inc-cl/gp.php:81 inc-cl/li.php:168 inc-cl/lj.php:63 inc-cl/pk.php:123
+#: inc-cl/pn.php:84 inc-cl/su.php:78 inc-cl/tr.php:138 inc-cl/tw.php:63
+#: inc-cl/vb.php:79 inc-cl/vk.php:123 inc-cl/wp.php:70
+msgid "Test your settings"
+msgstr "Pruebe su configuración"
+
+#: inc-cl/bg.php:77
+msgid "Submit Test Post to Complete"
+msgstr "Envíe un Post de Prueba a %s"
+
+#: inc-cl/bg.php:77 inc-cl/di.php:75 inc-cl/dl.php:66 inc-cl/fb.php:144
+#: inc-cl/gp.php:81 inc-cl/li.php:168 inc-cl/lj.php:63 inc-cl/pk.php:123
+#: inc-cl/pn.php:84 inc-cl/su.php:78 inc-cl/tr.php:138 inc-cl/tw.php:63
+#: inc-cl/vb.php:79 inc-cl/vk.php:123 inc-cl/wp.php:70
+msgid "Submit Test Post to %s"
+msgstr "Enviar mensaje de prueba a% s"
+
+#: inc-cl/bg.php:80 inc-cl/di.php:76 inc-cl/dl.php:70 inc-cl/fb.php:146
+#: inc-cl/gp.php:82 inc-cl/li.php:173 inc-cl/lj.php:67 inc-cl/pk.php:125
+#: inc-cl/pn.php:87 inc-cl/su.php:82 inc-cl/tr.php:140 inc-cl/tw.php:65
+#: inc-cl/vb.php:83 inc-cl/vk.php:125 inc-cl/wp.php:74
+#: social-networks-auto-poster-facebook-twitter-g.php:227
+#: social-networks-auto-poster-facebook-twitter-g.php:380
+msgid "Update Settings"
+msgstr "Actualizar Configuración"
+
+#: inc-cl/bg.php:119 inc-cl/di.php:107 inc-cl/dl.php:99 inc-cl/fb.php:195
+#: inc-cl/gp.php:117 inc-cl/li.php:212 inc-cl/lj.php:95 inc-cl/pk.php:166
+#: inc-cl/pn.php:119 inc-cl/su.php:113 inc-cl/tr.php:184 inc-cl/tw.php:98
+#: inc-cl/vb.php:115 inc-cl/vk.php:185 inc-cl/wp.php:103
+msgid "publish to"
+msgstr "publicar a"
+
+#: inc-cl/bg.php:121
+msgid "Repost to Blogger"
+msgstr "Re Postear en el Blogger"
+
+#: inc-cl/bg.php:126 inc-cl/di.php:112 inc-cl/dl.php:105 inc-cl/fb.php:202
+#: inc-cl/gp.php:124 inc-cl/li.php:218 inc-cl/lj.php:101 inc-cl/pk.php:172
+#: inc-cl/pn.php:125 inc-cl/su.php:120 inc-cl/tr.php:190 inc-cl/tw.php:103
+#: inc-cl/vb.php:122 inc-cl/vk.php:191 inc-cl/wp.php:110
+msgid "Posted on"
+msgstr "Posteado en"
+
+#: inc-cl/bg.php:130
+msgid "Setup your Blogger Account to AutoPost to Blogger"
+msgstr "Configure su Cuenta Blogger para Auto Postear en el Blogger"
+
+#: inc-cl/bg.php:132 inc-cl/di.php:117 inc-cl/dl.php:113 inc-cl/lj.php:109
+#: inc-cl/wp.php:118
+msgid "Title Format:"
+msgstr "Formato del Título:"
+
+#: inc-cl/bg.php:134 inc-cl/fb.php:232 inc-cl/gp.php:141 inc-cl/li.php:229
+#: inc-cl/tw.php:109 inc-cl/vk.php:197
+msgid "Message Format:"
+msgstr "Formato del Mensaje:"
+
+#: inc-cl/di.php:60
+msgid "Tags from the blogpost will be auto posted to Diigo"
+msgstr "Las etiquetas desde el blogpost serán auto posteadas a Diigo"
+
+#: inc-cl/di.php:108
+msgid "Repost to Diigo"
+msgstr "Re Postear a Diigo"
+
+#: inc-cl/di.php:119 inc-cl/dl.php:116 inc-cl/lj.php:112 inc-cl/pk.php:190
+#: inc-cl/su.php:138 inc-cl/tr.php:211 inc-cl/vb.php:130 inc-cl/vb.php:133
+#: inc-cl/wp.php:121
+msgid "Text Format:"
+msgstr "Formato del Texto:"
+
+#: inc-cl/dl.php:100
+msgid "Repost to Delicious"
+msgstr "Repostear a Delicious"
+
+#: inc-cl/fb.php:89
+msgid "Could be your Facebook Profile, Facebook Page, Facebook Group"
+msgstr ""
+"Pudiera ser su Perfil de Facebook, Página de Facebook, Grupo de Facebook"
+
+#: inc-cl/fb.php:94 inc-cl/gp.php:63 inc-cl/li.php:159 inc-cl/pn.php:76
+#: inc-cl/tw.php:56 inc-cl/vk.php:89
+msgid "Message text Format"
+msgstr "Formato del texto del Mensaje"
+
+#: inc-cl/fb.php:98 inc-cl/fb.php:107 inc-cl/fb.php:115 inc-cl/fb.php:217
+#: inc-cl/fb.php:221 inc-cl/gp.php:67 inc-cl/gp.php:133 inc-cl/vk.php:96
+#: inc-cl/vk.php:204
+msgid "What's the difference?"
+msgstr "¿Cuál es la diferencia?"
+
+#: inc-cl/fb.php:101 inc-cl/fb.php:219 inc-cl/gp.php:73 inc-cl/vk.php:99
+#: inc-cl/vk.php:205
+msgid "Text Post"
+msgstr "Postear el Texto"
+
+#: inc-cl/fb.php:101 inc-cl/fb.php:219 inc-cl/gp.php:73 inc-cl/gp.php:136
+#: inc-cl/vk.php:99 inc-cl/vk.php:205
+msgid "just text message"
+msgstr "sólo mensaje de texto"
+
+#: inc-cl/fb.php:103 inc-cl/fb.php:220 inc-cl/vk.php:206
+msgid "Image Post"
+msgstr "Post de la Imagen"
+
+#: inc-cl/fb.php:103 inc-cl/fb.php:220 inc-cl/gp.php:74 inc-cl/gp.php:137
+#: inc-cl/vk.php:100 inc-cl/vk.php:206
+msgid "big image with text message"
+msgstr "imagen grande con mensaje de texto"
+
+#: inc-cl/fb.php:104
+msgid "Upload Images to"
+msgstr "Subir Imágenes a"
+
+#: inc-cl/fb.php:105
+msgid "App Album"
+msgstr "Álbum de la App"
+
+#: inc-cl/fb.php:105 inc-cl/fb.php:113 inc-cl/fb.php:224
+msgid "or"
+msgstr "o"
+
+#: inc-cl/fb.php:107
+msgid "Timeline"
+msgstr "Línea de Tiempo"
+
+#: inc-cl/fb.php:110 inc-cl/vk.php:101
+msgid "Text Post with \"attached\" link"
+msgstr "Post de Texto con enlace \"adjunto\""
+
+#: inc-cl/fb.php:112
+msgid "Link attachment type"
+msgstr "Tipo de enlace del adjunto "
+
+#: inc-cl/fb.php:113 inc-cl/fb.php:224
+msgid "Share a link to your blogpost"
+msgstr "Compartir un enlace en su blogpost"
+
+#: inc-cl/fb.php:115 inc-cl/fb.php:226
+msgid "Attach your blogpost"
+msgstr "Adjuntar su blogpost"
+
+#: inc-cl/fb.php:116
+msgid "If post has video use it as an attachment thumbnail."
+msgstr "Si el post tiene video usarlo como una imagen en miniatura adjunta."
+
+#: inc-cl/fb.php:116
+msgid ""
+"Video will be used for an attachment thumbnail instead of featured image. "
+"Only Youtube is supported at this time."
+msgstr ""
+"El video será utilizado para una imagen en miniatura adjunta en vez de una "
+"imagen principal. Hasta el momento solamente Youtube es soportado."
+
+#: inc-cl/fb.php:118
+msgid "Attachment Text Format"
+msgstr "Formato del Texto del Adjunto"
+
+#: inc-cl/fb.php:119 inc-cl/vk.php:109
+msgid "Auto"
+msgstr "Auto"
+
+#: inc-cl/fb.php:120 inc-cl/vk.php:110
+msgid ""
+"Recommended. Info from SEO Plugins will be used, then post excerpt, then "
+"post text"
+msgstr ""
+"Recomendado. La información de los Plugins de SEO será posteada, luego los "
+"extractos de post, luego los textos de post"
+
+#: inc-cl/fb.php:121
+msgid "Set your own format"
+msgstr "Modifique su propio formato"
+
+#: inc-cl/fb.php:125
+msgid "Where to upload Images"
+msgstr "Dónde subir las imágenes"
+
+#: inc-cl/fb.php:125
+msgid "(App Album)"
+msgstr "(App Álbum)"
+
+#: inc-cl/fb.php:125
+msgid ""
+"Facebook automatically creates an album for your app. Images will be grouped "
+"there as in any regular album."
+msgstr ""
+"Facebook crea automáticamente los álbumes para tus aplicaciones. Las "
+"imágenes se pueden agrupar en un álbum regular"
+
+#: inc-cl/fb.php:125
+msgid "(Timeline)"
+msgstr "(Línea de Tiempo)"
+
+#: inc-cl/fb.php:125
+msgid ""
+"Images will be posted to the special \"Wall/Timeline\" album and won't be "
+"grouped. \"Wall/Timeline\" album must exist. It's created when first image "
+"posted to timeline manually."
+msgstr ""
+"Las imágenes se publicarán en el álbum especial \"Camino/Línea de Tiempo\" y "
+"no serán agrupadas. El álbum \"Camino/Línea de Tiempo\" debe existir. Se "
+"crea cuando usted fijó por primera vez esta imagen de la línea de tiempo de "
+"forma manual."
+
+#: inc-cl/fb.php:126 inc-cl/fb.php:228
+msgid "Two ways of attaching post on Facebook"
+msgstr "Dos formas de adjuntar un post en Facebook"
+
+#: inc-cl/fb.php:127 inc-cl/fb.php:229
+msgid "Facebook Post Types"
+msgstr "Tipos de Post de Facebook "
+
+#: inc-cl/fb.php:133
+msgid "Authorize Your Facebook Account"
+msgstr "Cuenta de Facebook autorizada"
+
+#: inc-cl/fb.php:133
+msgid "Please click \"Update Settings\" to be able to Authorize your account."
+msgstr ""
+"Por favor haga clic \"Update Settings\" para habilitar su cuenta autorizada"
+
+#: inc-cl/fb.php:135
+msgid "Your Facebook Account has been authorized."
+msgstr "Su cuenta de Facebook ha sido autorizada"
+
+#: inc-cl/fb.php:136 inc-cl/vk.php:68
+msgid "You can"
+msgstr "Usted puede"
+
+#: inc-cl/fb.php:138 inc-cl/vk.php:71
+msgid "Authorize your account"
+msgstr "Su cuenta está autorizada"
+
+#: inc-cl/fb.php:139
+msgid "If you get Facebook message:"
+msgstr "Si usted obtiene un mensaje de Facebook:"
+
+#: inc-cl/fb.php:139
+msgid ""
+"please make sure that domain name in your Facebook App matches your website "
+"domain exactly. Please note that www. and non www. versions are different "
+"domains."
+msgstr ""
+"Por favor, asegúrese de que el nombre de dominio en su aplicación de "
+"Facebook corresponda a su dominio del sitio web. Tenga en cuenta que las "
+"versiones www. y no www. son de dominios diferentes."
+
+#: inc-cl/fb.php:196
+msgid "Repost to Facebook"
+msgstr "Re postear en Facebook"
+
+#: inc-cl/fb.php:216 inc-cl/vk.php:203
+msgid "Post Type:"
+msgstr "Tipo de Post:"
+
+#: inc-cl/fb.php:221 inc-cl/gp.php:138 inc-cl/vk.php:208
+msgid "Text Post with \"attached\" blogpost"
+msgstr "Post de Texto con blogpost \"attached\""
+
+#: inc-cl/fb.php:223 inc-cl/vk.php:103
+msgid "Link attachment type:"
+msgstr "Tipo de link adjuntado:"
+
+#: inc-cl/fb.php:327
+msgid "OK - Message Posted, please see your Facebook Page"
+msgstr "OK - Mensaje Posteado, por favor revise su página de Facebook"
+
+#: inc-cl/gp.php:34
+msgid "Google+ API Library not found"
+msgstr "La librería del API de Google+ no se encuentra"
+
+#: inc-cl/gp.php:35
+msgid "Google+ doesn't have a built-in API for automated posts yet."
+msgstr "Google+ no tiene todavía una API integrada de mensajes automatizados "
+
+#: inc-cl/gp.php:35
+msgid ""
+"The current <a target=\"_blank\" href=\"http://developers.google.com/+/api/"
+"\">Google+ API</a> is \"Read Only\" and can't be used for posting.  <br/><br/"
+">You need to get a special <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/google-plus-automated-posting\"><b>API Library Module</b></"
+"a> to be able to publish your content to Google+."
+msgstr ""
+"La actual <a target=\"_blank\" href=\"http://developers.google.com/+/api/"
+"\">Google+ API</a> es de \"Solo Lectura\" y no puede ser usada para postear. "
+"<br/><br/>Usted necesita obtener un <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/google-plus-automated-posting\"><b>Módulo de la Librería del "
+"API</b></a> especial para poder publicar su contenido en Google+."
+
+#: inc-cl/gp.php:53
+msgid "Leave Empty to publish to your profile or community"
+msgstr "Dejar en blanco para publicar en su perfil o comunidad"
+
+#: inc-cl/gp.php:54
+msgid "Leave Empty to publish to your profile or community."
+msgstr "Dejar en blanco para publicar en su perfil o comunidad."
+
+#: inc-cl/gp.php:57 inc-cl/gp.php:58
+msgid "Leave Empty to publish to your profile or page"
+msgstr "Dejar en blanco para publicar en su perfil o página"
+
+#: inc-cl/gp.php:74
+msgid "Google+ Image Post"
+msgstr "Post de imágen de Google+"
+
+#: inc-cl/gp.php:75
+msgid "Add blogpost to Google+ message as an attachment"
+msgstr "Añadir a los mensajes de Google+ un blogpost como un archivo adjunto"
+
+#: inc-cl/gp.php:76 inc-cl/gp.php:139
+msgid "Google+ Post Types"
+msgstr "Tipos de Post de Google+"
+
+#: inc-cl/gp.php:118 inc-cl/gp.php:132 inc-cl/gp.php:136
+msgid "Repost to Google+"
+msgstr "Re postear a Google+"
+
+#: inc-cl/gp.php:137
+msgid "Post to Google+ as \"Image post\""
+msgstr "Re postear a Google+ como "
+
+#: inc-cl/gp.php:186
+msgid "OK - Message Posted, please see your Google+ Page"
+msgstr "OK - Mensaje posteado, por favor revise la página de Google+"
+
+#: inc-cl/li.php:213
+msgid "Repost to LinkedIn"
+msgstr "Re postear a LinkedIn"
+
+#: inc-cl/lj.php:34
+msgid "You can setup LiveJournal blog."
+msgstr "Usted puede configurar el blog LiveJournal."
+
+#: inc-cl/lj.php:51
+msgid "Post Title and Post Text Formats"
+msgstr "Formatos del Título y del Texto del Post"
+
+#: inc-cl/lj.php:96
+msgid "Repost to LiveJournal"
+msgstr "Re postear a LiveJournal"
+
+#: inc-cl/pk.php:167
+msgid "Repost to Plurk"
+msgstr "Re postear a Plurk"
+
+#: inc-cl/pn.php:120
+msgid "Repost to Pinterest"
+msgstr "Re postear a Pinterest"
+
+#: inc-cl/pn.php:142
+msgid "Text Message Format:"
+msgstr "Formato del Mensaje de Texto"
+
+#: inc-cl/su.php:114
+msgid "Repost to StumbleUpon"
+msgstr "Re postear a StumbleUpon"
+
+#: inc-cl/tr.php:185
+msgid "Repost to Tumblr"
+msgstr "Re postear a Tumblr"
+
+#: inc-cl/tr.php:200
+msgid "Text Post. Title Format:"
+msgstr "Post de Texto. Formato del Título:"
+
+#: inc-cl/tw.php:100
+msgid "Repost to Twitter"
+msgstr "Re postear a Twitter"
+
+#: inc-cl/vb.php:116
+msgid "Repost to vBulletin"
+msgstr "Repostear vBulletin"
+
+#: inc-cl/vk.php:54
+msgid "Could be your vKontakte(VK) Profile or vKontakte(VK) Group Page"
+msgstr "Pudiera ser su Perfil vKontakte(VK) o su Página de Grupo vKontakte(VK)"
+
+#: inc-cl/vk.php:57
+msgid "(It could be used for \"Text\" and \"Image\" posts)"
+msgstr "(Podría ser utilizado para posts de \"Texto\" e \"Imagen\")"
+
+#: inc-cl/vk.php:61
+msgid "[Create VK App]"
+msgstr "[Crear App VK]"
+
+#: inc-cl/vk.php:61
+msgid "[Manage VK Apps]"
+msgstr "[Administrar los Apps VK]"
+
+#: inc-cl/vk.php:65
+msgid ""
+"<b>Authorize Your vKontakte(VK) Account</b>. Please click \"Update Settings"
+"\" to be able to Authorize your account."
+msgstr ""
+"<b>Su cuenta vKontakte(VK) está autorizada</b>. Por favor haga clic en "
+"\"Actualizar Configuración\" para poder actualizar su cuenta."
+
+#: inc-cl/vk.php:67
+msgid "Your vKontakte(VK) Account has been authorized."
+msgstr "Su cuenta vKontakte(VK) ha sido autorizada."
+
+#: inc-cl/vk.php:79
+msgid "(It could be used for \"Text with attached link\" posts)"
+msgstr "(Podría ser utilizado para posts \"Texto con enlace adjunto\")"
+
+#: inc-cl/vk.php:85
+msgid "Please upgrade the plugin to \"PRO\" get NextScripts VK API"
+msgstr ""
+"Por favor actualice el plugin a \"PRO\" para obtener el NextScripts VK API"
+
+#: inc-cl/vk.php:93 inc-cl/vk.php:200
+msgid "Add backlink to the post"
+msgstr "Adicionar al backlink del post"
+
+#: inc-cl/vk.php:100
+msgid "mage Post"
+msgstr "Post mage"
+
+#: inc-cl/vk.php:105
+msgid ""
+"<strong>If post has video use it as an attachment thumbnail.</strong> "
+"<i>Video will be used for an attachment thumbnail instead of featured image. "
+"Only Youtube is supported at this time.</i>"
+msgstr ""
+"<strong>Si su post utiliza un video con un archivo adjunto en miniatura</"
+"strong> <i>El video será utilizado para colocar la miniatura en lugar de la "
+"imagen principal. En estos momentos solo se admite Youtube.</i>"
+
+#: inc-cl/vk.php:108
+msgid "Attachment Text Format:"
+msgstr "Adjuntar el Formato del Texto:"
+
+#: inc-cl/vk.php:111
+msgid "Set your own format:"
+msgstr "Modificar su propio formato:"
+
+#: inc-cl/vk.php:188
+msgid "Repost to vKontakte(VK)"
+msgstr "Re postear a Vkontakte (VK)"
+
+#: inc-cl/vk.php:209
+msgid "Post Types"
+msgstr "Tipos de Post"
+
+#: inc-cl/wp.php:104
+msgid "Repost to WP Blog"
+msgstr "Repostear al Blog WP "
+
+#: nxs_functions.php:156
+msgid "Wrong key, please contact support"
+msgstr ""
+"Llave incorrecta, por favor póngase en contacto con el servicio de soporte"
+
+#: nxs_functions.php:243
+msgid "Inserts the Your Blog/Site Name"
+msgstr "Inserte el nombre de su Sitio de Blog "
+
+#: nxs_functions.php:243
+msgid "Inserts the Title of your post"
+msgstr "Inserte el título de su post"
+
+#: nxs_functions.php:243
+msgid "Inserts the URL of your post"
+msgstr "Inserte la URL de su post"
+
+#: nxs_functions.php:243
+msgid "Inserts the <b>Shortened URL</b> of your post"
+msgstr "Inserte la<b>URL Acortada</b> de su post"
+
+#: nxs_functions.php:243
+msgid "Inserts the featured image"
+msgstr "Inserte una imagen principal"
+
+#: nxs_functions.php:243
+msgid "Inserts the excerpt of your post"
+msgstr "Inserte el extracto de su mensaje"
+
+#: nxs_functions.php:243
+msgid "Inserts the body(text) as typed"
+msgstr "Inserte el texto del cuerpo como se escribió"
+
+#: nxs_functions.php:243
+msgid "Inserts the processed body(text) of your post"
+msgstr "Inserte el cuerpo transformado (texto) en su post"
+
+#: nxs_functions.php:243
+msgid "Inserts the author's name"
+msgstr "Inserte el nombre del autor"
+
+#: nxs_functions.php:247
+msgid ""
+"You already have %s configured.  This plugin supports only one %s account. "
+"<br/><br/> Please consider getting <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts"
+"\">Multiple Accounts Edition</a> if you would like to add another %s account "
+"for auto-posting."
+msgstr ""
+"Usted ya tiene %s configurado. Este plugin soporta solo una %s cuenta. <br/"
+"><br/> Por favor considere conseguir<a target=\"_blank\" href=\"http://www."
+"nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts\">La "
+"Edición de Multiples Cuentas</a> si desea añadir otra cuenta %s para la auto-"
+"publicación."
+
+#: social-networks-auto-poster-facebook-twitter-g.php:163
+msgid "Settings Updated."
+msgstr "Configuración Actualizada."
+
+#: social-networks-auto-poster-facebook-twitter-g.php:223
+msgid "Export Settings"
+msgstr "Exportar Configuración"
+
+#: social-networks-auto-poster-facebook-twitter-g.php:224
+msgid "Import Settings"
+msgstr "Importar Configuración"
+
+#: social-networks-auto-poster-facebook-twitter-g.php:520
+msgid "Contact support"
+msgstr "Contactar el soporte"
+
+#: social-networks-auto-poster-facebook-twitter-g.php:521
+msgid ""
+"Ready to to Upgrade to Multiple Accounts Edition<br/> and get Google+ and "
+"Pinterest Auto-Posting?"
+msgstr "¿Listo para actualizar a la Edición de "
+
+#: social-networks-auto-poster-facebook-twitter-g.php:522
+msgid "Enter your Activation Key"
+msgstr "Entre su Llave de Activación"
+
+#: social-networks-auto-poster-facebook-twitter-g.php:523
+msgid "Get It here"
+msgstr "Consígalo aquí"
+
+#: social-networks-auto-poster-facebook-twitter-g.php:525
+msgid "Activation"
+msgstr "Activación"
+
+#: social-networks-auto-poster-facebook-twitter-g.php:527
+msgid "Multiple Accounts Edition and Google+ and Pinterest Auto-Posting"
+msgstr "Edición de Cuentas Múltiples y Google+ y Pinterest Auto-Posting"
+
+#: social-networks-auto-poster-facebook-twitter-g.php:527
+msgid "You can find your key on this page"
+msgstr "Usted puede encontrar su llave en esta página"
+
+#: social-networks-auto-poster-facebook-twitter-g.php:528
+msgid "Enter your Key"
+msgstr "Entre su Llave"
+
+#: social-networks-auto-poster-facebook-twitter-g.php:530
+msgid "Your plugin will be automatically upgraded"
+msgstr "Su plugin se actualizará automáticamente"
+
+#: social-networks-auto-poster-facebook-twitter-g.php:535
+msgid "Next Scripts: Social Networks Auto Poster Options"
+msgstr "Próximos Scripts: Social Networks Auto Poster Options"
+
+#: social-networks-auto-poster-facebook-twitter-g.php:535
+msgid "Plugin Version"
+msgstr "Versión del Plugin"
+
+#: social-networks-auto-poster-facebook-twitter-g.php:538
+msgid "Get"
+msgstr "Obtener"
+
+#: social-networks-auto-poster-facebook-twitter-g.php:540
+msgid "Here you can setup \"Social Networks Auto Poster\"."
+msgstr "Aqui puede configurar\"Social Networks Auto Poster\"."
+
+#: social-networks-auto-poster-facebook-twitter-g.php:540
+msgid ""
+"You can start by clicking \"Add new account\" button and choosing the Social "
+"Network you would like to add."
+msgstr ""
+"Usted puede comenzar haciendo clic en el botón\"Add new account\"y "
+"seleccionar la Red Social que desea adicionar."
+
+#: social-networks-auto-poster-facebook-twitter-g.php:553
+msgid "You have Google Analytics Plugin installed and activated."
+msgstr "Usted debe tener instalado y activado el Plugin Google Analytics"
+
+#: social-networks-auto-poster-facebook-twitter-g.php:553
+msgid "This plugin hijacks the authorization workflow."
+msgstr "Este plugin toma el flujo de trabajo de la autorización workflow."
+
+#: social-networks-auto-poster-facebook-twitter-g.php:554
+msgid ""
+"Please temporary <a href=\"%s\">deactivate</a> Google Analytics plugin, do "
+"all authorizations and then activate it back."
+msgstr ""
+"Por favor <a href=\"%s\">desactive</a> temporalmente el plugin de Google "
+"Analytics, cambie todos los permisos y vuelva a activarlos"
+
+#: social-networks-auto-poster-facebook-twitter-g.php:585
+msgid ""
+"If you made any changes to the format, please \"Update\" the post before "
+"reposting, "
+msgstr ""
+"Si usted hizo algunos cambios en el formato por favor \"Update\"el post "
+"antes de re postear"
+
+#: social-networks-auto-poster-facebook-twitter-g.php:588
+msgid "Check All"
+msgstr "Seleccionar todos"
+
+#: social-networks-auto-poster-facebook-twitter-g.php:588
+msgid "Uncheck All"
+msgstr "Deseleccionar todos"
+
+#: social-networks-auto-poster-facebook-twitter-g.php:598
+#: social-networks-auto-poster-facebook-twitter-g.php:601
+#: social-networks-auto-poster-facebook-twitter-g.php:606
+msgid "NextScripts: Social Networks Auto Poster - Post Options"
+msgstr "Próximos Scripts: Social Networks Auto Poster - Post "
+
+#: social-networks-auto-poster-facebook-twitter-g.php:692
+msgid "Settings"
+msgstr "Configuración"
+
+#. Plugin Name of the plugin/theme
+msgid "NextScripts: Social Networks Auto-Poster"
+msgstr "Próximos Scripts: Social Networks Auto-Poster"
+
+#. Plugin URI of the plugin/theme
+msgid "http://www.nextscripts.com/social-networks-auto-poster-for-wordpress"
+msgstr "http://www.nextscripts.com/social-networks-auto-poster-for-wordpress"
+
+#. Description of the plugin/theme
+msgid ""
+"This plugin automatically publishes posts from your blog to multiple "
+"accounts on Facebook, Twitter, and Google+ profiles and/or pages."
+msgstr ""
+"Este plugin publica posts automáticamente desde su blog a cuentas múltiples "
+"en Facebook, Twitter, y perfiles de Google+ y/o páginas."
+
+#. Author of the plugin/theme
+msgid "Next Scripts"
+msgstr "Próximos Scripts"
+
+#. Author URI of the plugin/theme
+msgid "http://www.nextscripts.com"
+msgstr "http://www.nextscripts.com"
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-pt_BR.mo b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-pt_BR.mo
new file mode 100644 (file)
index 0000000..38a9285
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-pt_BR.mo differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-pt_BR.po b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-pt_BR.po
new file mode 100644 (file)
index 0000000..2e4152f
--- /dev/null
@@ -0,0 +1,1721 @@
+# Copyright (C) 2013 NextScripts: Social Networks Auto-Poster
+# This file is distributed under the same license as the NextScripts: Social Networks Auto-Poster package.
+msgid ""
+msgstr ""
+"Project-Id-Version: NextScripts: Social Networks Auto-Poster 2.6.0\n"
+"Report-Msgid-Bugs-To: http://wordpress.org/tag/social-networks-auto-poster-"
+"facebook-twitter-g\n"
+"POT-Creation-Date: 2013-11-19 17:49:49+00:00\n"
+"PO-Revision-Date: 2013-11-21 22:27-0300\n"
+"Last-Translator: Leonardo Kfoury <lkmdias@gmail.com>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.5.7\n"
+"Language: pt_BR\n"
+
+#: NextScripts_SNAP.php:218 inc/nxs_snap_class.php:218
+msgid "Settings"
+msgstr "Configurações"
+
+#: NextScripts_SNAP.php:312
+msgid "NXS Reposter"
+msgstr "NXS Reposter"
+
+#: inc/nxs_functions_adv.php:94 inc/nxs_functions_adv.php:95
+msgid "N/A"
+msgstr "N/A"
+
+#: inc/nxs_functions_adv.php:94 inc/nxs_functions_adv.php:95
+msgid " MByte"
+msgstr " MByte"
+
+#: inc/nxs_functions_adv.php:96
+msgid "PHP Version"
+msgstr "Versão do PHP"
+
+#: inc/nxs_functions_adv.php:97
+msgid "Memory limit"
+msgstr "Limite de Memória"
+
+#: inc/nxs_functions_adv.php:98
+msgid "Memory usage"
+msgstr "Uso da Memória"
+
+#: inc/nxs_snap_class.php:199
+msgid "Settings Updated."
+msgstr "Atualizar Configurações"
+
+#: inc/nxs_snap_class.php:243 inc-cl/ap.php:109 inc-cl/bg.php:98
+#: inc-cl/da.php:92 inc-cl/di.php:94 inc-cl/dl.php:86 inc-cl/fb.php:176
+#: inc-cl/ff.php:85 inc-cl/gp.php:114 inc-cl/ip.php:86 inc-cl/li.php:212
+#: inc-cl/lj.php:96 inc-cl/pk.php:140 inc-cl/pn.php:113 inc-cl/rd.php:115
+#: inc-cl/su.php:99 inc-cl/tr.php:159 inc-cl/vb.php:99 inc-cl/vk.php:145
+#: inc-cl/wp.php:96 inc-cl/yt.php:89
+msgid "Only selected categories will be autoposted to this account"
+msgstr ""
+"Apenas as Categorias selecionadas serão Publicadas Automaticamente para esta "
+"conta."
+
+#: inc/nxs_snap_class.php:244
+msgid "Reposter is activated for this account"
+msgstr "Reposter está ativado para esta conta"
+
+#: inc/nxs_snap_class.php:261 inc/nxs_snap_class.php:267
+msgid "Import Settings"
+msgstr "Importar Configurações"
+
+#: inc/nxs_snap_class.php:266
+msgid "Export Settings"
+msgstr "Exportar Configurações"
+
+#: inc/nxs_snap_class.php:270 inc/nxs_snap_class.php:587 inc-cl/ap.php:118
+#: inc-cl/bg.php:109 inc-cl/da.php:106 inc-cl/di.php:105 inc-cl/dl.php:97
+#: inc-cl/fb.php:202 inc-cl/ff.php:96 inc-cl/gp.php:125 inc-cl/ip.php:97
+#: inc-cl/li.php:223 inc-cl/lj.php:107 inc-cl/pk.php:151 inc-cl/pn.php:124
+#: inc-cl/rd.php:129 inc-cl/su.php:110 inc-cl/tr.php:170 inc-cl/tw.php:105
+#: inc-cl/vb.php:110 inc-cl/vk.php:156 inc-cl/wp.php:107 inc-cl/yt.php:100
+msgid "Update Settings"
+msgstr "Atualizar Configurações"
+
+#: inc/nxs_snap_class.php:282
+msgid "How to make auto-posts?"
+msgstr "Como fazer Publicações Automáticas?"
+
+#: inc/nxs_snap_class.php:282 inc-cl/fb.php:108 inc-cl/fb.php:117
+#: inc-cl/fb.php:125 inc-cl/fb.php:299 inc-cl/fb.php:303 inc-cl/gp.php:88
+#: inc-cl/gp.php:196 inc-cl/vk.php:106 inc-cl/vk.php:255
+msgid "What's the difference?"
+msgstr "Qual a diferença?"
+
+#: inc/nxs_snap_class.php:284
+msgid "The difference between \"Immediately\" and \"Scheduled\""
+msgstr "A diferença entre\"Imediatamente \" e \"Programada\""
+
+#: inc/nxs_snap_class.php:285
+msgid ""
+"<b>\"Immediately\"</b> - Once you click \"Publish\" button plugin starts "
+"pushing your update to configured social networks. At this time you need to "
+"wait and look at the turning circle. Some APIs are pretty slow, so you have "
+"to wait and wait and wait until all updates are posted and page released "
+"back to you."
+msgstr ""
+"<b>\"Imediatamente\"</b> - Logo que você clicar no botão \"Publicar\" o "
+"Plugin vai começar o envio para a atualização em suas Redes Sociais "
+"configuradas. Neste momento você precisa esperar e observar o percurso do "
+"envio. Algumas APIs são muito lentas, então você precisa esperar, esperar e "
+"esperar, até que todas as atualizações sejam publicadas e a página possa "
+"então ser liberada e voltar para você."
+
+#: inc/nxs_snap_class.php:286
+msgid ""
+"<b>\"Scheduled\"</b> - Releases the page immediately back to you, so you can "
+"proceed with something else and it schedules all auto-posting jobs to your "
+"WP-Cron. This is much faster and much more efficient, but it could not work "
+"if your WP-Cron is disabled or broken."
+msgstr ""
+"<b>\"Programada\"</b> - Libera a página imediatamente de volta para você, "
+"para que você possa prosseguir com outra tarefa.  E o Plugin agenda todas as "
+"tarefas das Publicações Automáticas em seu WP-Cron. Isto é muito mais rápido "
+"e muito mais eficiente, mas não poderia funcionar se o seu WP-Cron está "
+"desativado ou quebrado."
+
+#: inc/nxs_snap_class.php:290
+msgid "Publish Immediately"
+msgstr "Publicar <b>Imediatamente</b>"
+
+#: inc/nxs_snap_class.php:290
+msgid ""
+"No WP Cron will be used. Choose if WP Cron is disabled or broken on your "
+"website"
+msgstr ""
+"O WP Cron não será usado. Escolha se o WP Cron está desativado ou quebrado "
+"em seu website"
+
+#: inc/nxs_snap_class.php:294
+msgid "Use WP Cron to Schedule autoposts"
+msgstr "Use WP Cron para agendar as Publicações Automáticas"
+
+#: inc/nxs_snap_class.php:294
+msgid ""
+"Recommended for most sites. Faster Performance - requires working WP Cron"
+msgstr ""
+"Recomendado para a maioria dos sites. Desempenho mais rápido - requer "
+"trabalhar com o WP Cron"
+
+#: inc/nxs_snap_class.php:299
+msgid "Proper setup for WP Cron is REQURED for this feature to work."
+msgstr ""
+"A configuração adequada para o WP Cron é requerida para que esse recurso "
+"funcione."
+
+#: inc/nxs_snap_class.php:299
+msgid "Please see here for the proper WP Cron setup tutorial"
+msgstr ""
+"Por favor, veja aqui o Tutorial de Instalação para o correto funcionamento "
+"do WP Cron"
+
+#: inc/nxs_snap_class.php:300
+msgid "Limit autoposting speed"
+msgstr "Limite de Velocidade das Publicações Automáticas"
+
+#: inc/nxs_snap_class.php:300
+msgid "Recommended for busy sites with a lot of new posts."
+msgstr "Recomendado para sites ocupados com muitas tarefas novas."
+
+#: inc/nxs_snap_class.php:306 nxs_functions.php:756
+msgid "Randomize posting time &#177;"
+msgstr "Tempo de Randomização da Publicação &#177;"
+
+#: inc/nxs_snap_class.php:307 nxs_functions.php:753 nxs_functions.php:757
+msgid "Minutes"
+msgstr "Minutos"
+
+#: inc/nxs_snap_class.php:311
+msgid ""
+"What to do with the rest of the posts if there are more posts then daily "
+"limit?"
+msgstr ""
+"O que fazer com o resto das Publicações, se já houver ultrapassado o limite "
+"diário para publicações?"
+
+#: inc/nxs_snap_class.php:312
+msgid "Skip/Discard/Don't Autopost "
+msgstr "Pular/Descartar/Não Publicar"
+
+#: inc/nxs_snap_class.php:313
+msgid "Schedule for tomorrow"
+msgstr "Programar para amanhã"
+
+#: inc/nxs_snap_class.php:313
+msgid "Not recommended, may cause significant delays"
+msgstr "Não é recomendado, pode causar atrasos significativos"
+
+#: inc/nxs_snap_class.php:322
+msgid "User Privileges/Security"
+msgstr "Privilégios/Segurança do Usuário"
+
+#: inc/nxs_snap_class.php:326
+msgid "Skip User Security Verification."
+msgstr "Pular a Verificação de Segurança do usuário."
+
+#: inc/nxs_snap_class.php:327
+msgid ""
+"NOT Recommended, but useful in some situations. This will allow autoposting "
+"for everyone even for the non-existent users."
+msgstr ""
+"Não é recomendado, mas é útil em algumas situações. Isso permitirá as "
+"publicações automáticas para todos, mesmo para os usuários que não existem."
+
+#: inc/nxs_snap_class.php:329
+msgid "Who can make autoposts without seeing any auto-posting options?"
+msgstr "Quem pode fazer as Publicações Automáticas e verificar as Opções?"
+
+#: inc/nxs_snap_class.php:344
+msgid ""
+"Who can see auto-posting options on the \"New Post\" and \"Edit Post\" pages "
+"and make autoposts?"
+msgstr ""
+"Quem pode ver as Opções de Publicações Automáticas nas páginas de \"Novo Post"
+"\"  Editar e fazer Publicações Automáticas?"
+
+#: inc/nxs_snap_class.php:366
+msgid "Include/Exclude Wordpress Pages and Custom Post Types"
+msgstr "Incluir/Excluir Páginas e tipos de Posts padrão do Wordpress"
+
+#: inc/nxs_snap_class.php:369
+msgid "Use for Wordpress Pages"
+msgstr "Usar para Páginas do Wordpress"
+
+#: inc/nxs_snap_class.php:370
+msgid "Show the SNAP metabox and auto-post for pages, not just posts."
+msgstr ""
+"Exibir a Caixa Meta e Publicações Automáticas do SNAP para as páginas, não "
+"apenas Posts."
+
+#: inc/nxs_snap_class.php:372
+msgid "Custom Post Types:"
+msgstr "Tipos de Posts Personalizados:"
+
+#: inc/nxs_snap_class.php:373
+msgid ""
+"Please select \"Custom Post Types\" that you would like to be autoposted to "
+"your social networks"
+msgstr ""
+"Por favor, selecione os \"Tipos de Post Personalizados\" que você gostaria "
+"que fossem Publicados Automaticamente para suas redes sociais"
+
+#: inc/nxs_snap_class.php:391
+msgid "Categories to Include/Exclude:"
+msgstr "Categorias para Incluir/Excluir "
+
+#: inc/nxs_snap_class.php:392
+msgid ""
+"Each blogpost will be autoposted to all categories selected below. All "
+"categories are selected by default. \r\n"
+"              <b>Uncheck</b> categories that you would like <b>NOT</b> to "
+"auto-post by default. Assigning the uncheked category to the new blogpost "
+"will turn off auto-posting to all configured networks."
+msgstr ""
+"Cada Publicação, dentre as Categorias Selecionadas abaixo, será publicada "
+"automaticamente. Todas as categorias são selecionadas por padrão. \r\n"
+"              <b>Desmarque</b> as Categorias que você <b>NÃO</b> quer que "
+"sejam publicadas automaticamente por padrão. As Categorias desmarcadas terão "
+"desligadas as \"Publicações Automáticas\" para todas as Redes configuradas."
+
+#: inc/nxs_snap_class.php:411
+msgid "URL Shortener"
+msgstr "Código Curto \"shortcode\" do URL"
+
+#: inc/nxs_snap_class.php:452
+msgid "Auto-Import comments from Social Networks"
+msgstr "Importar Automaticamente os Comentários para as Redes Sociais"
+
+#: inc/nxs_snap_class.php:452 inc/nxs_snap_class.php:468
+msgid "New"
+msgstr "Novo"
+
+#: inc/nxs_snap_class.php:468
+msgid "Additional URL Parameters"
+msgstr "Parâmetros adicionais do URL"
+
+#: inc/nxs_snap_class.php:469
+msgid "Will be added to backlinks."
+msgstr "Serão adicionados para backlinks."
+
+#: inc/nxs_snap_class.php:471
+msgid "Additional URL Parameters:"
+msgstr "Parâmetros adicionais do URL"
+
+#: inc/nxs_snap_class.php:473
+msgid ""
+"You can use %NTNAME% for social network name, %NTCODE% for social network "
+"two-letter code, %ACCNAME% for account name,  %POSTID% for post ID,  "
+"%POSTTITLE% for post title, %SITENAME% for website name. <b>Any text must be "
+"URL Encoded</b><br/>Example: utm_source=%NTCODE%&utm_medium=%ACCNAME"
+"%&utm_campaign=SNAP%2Bfrom%2B%SITENAME%"
+msgstr ""
+"Você pode usar %NTNAME% para o Nome da Rede Social, %NTCODE% para a Rede "
+"Social em código de duas letras, %ACCNAME% para o Nome da Conta,  %POSTID% "
+"para o ID da Post,  %POSTTITLE% para o Título do Post, %SITENAME% para o "
+"Nome do Site. <b>Qualquer texto deve ser URL codificado</b><br/>Exemplo: "
+"utm_source=%NTCODE%&utm_medium=%ACCNAME%&utm_campaign=SNAP%2Bfrom%2B%SITENAME"
+"%"
+
+#: inc/nxs_snap_class.php:477
+msgid "Auto-HashTags Settings"
+msgstr "Configurações de \"hashtags\" Automáticas"
+
+#: inc/nxs_snap_class.php:478
+msgid "How to generate hashtags if tag is longer then one word"
+msgstr ""
+"Como gerar as \"hashtags\" se for maior que as Tags depois de cada palavra"
+
+#: inc/nxs_snap_class.php:480
+msgid "Replace spaces in hashtags with "
+msgstr "Substituir os espaços nas \"hashtags\" com"
+
+#: inc/nxs_snap_class.php:489
+msgid "%ANNOUNCE% tag settings"
+msgstr "%ANNOUNCE% Configurações do Trecho "
+
+#: inc/nxs_snap_class.php:490
+msgid ""
+"Plugin will take text untill the &lt;!--more--&gt; tag. Please specify how "
+"many characters should it get if &lt;!--more--&gt; tag is not found"
+msgstr ""
+"O Plugin publicará o texto até a marcação &lt;!--mais--&gt;. Por favor, "
+"especifique o número de caracteres que deve ser publicado se a marcação "
+"&lt;!--mais--&gt; não for encontrada"
+
+#: inc/nxs_snap_class.php:492
+msgid "How many characters:"
+msgstr "Quantos caracteres:"
+
+#: inc/nxs_snap_class.php:497
+msgid "\"Open Graph\" Tags"
+msgstr "Tags \"Open Graph\" "
+
+#: inc/nxs_snap_class.php:498
+msgid ""
+"This is simple and useful implementation of \"Open Graph\" Tags, as this "
+"option will only add tags needed for \"Auto Posting\". If you use other "
+"specialized plugins, uncheck this option."
+msgstr ""
+"Esta é uma implementação simples e útil para as Marcações (Tags) do \"Open "
+"Graph\", esta opção só irá adicionar \"Tags\" necessárias para as "
+"\"Publicações Automáticas\". Se você usa outros plugins especializados, "
+"desmarque esta opção."
+
+#: inc/nxs_snap_class.php:500
+msgid "Add Open Graph Tags"
+msgstr "Adicionar as Marcações (Tags) do \"Open Graph\""
+
+#: inc/nxs_snap_class.php:503
+msgid "Default Image URL for og:image tag:"
+msgstr "URL da Imagem Padrão para a Tag \"og:image\":"
+
+#: inc/nxs_snap_class.php:508
+msgid "Advanced \"Featured\" Image Settings"
+msgstr "Configurações Avançadas da Imagem de \"Destaque\""
+
+#: inc/nxs_snap_class.php:512
+msgid ""
+"Advanced Setting. Uncheck only if you are 100% sure that your images are "
+"valid or if you have troubles with image verification."
+msgstr ""
+"Desmarque a opção somente se você tem certeza de que suas imagens são "
+"válidas ou se você tem problemas com a verificação de imagem."
+
+#: inc/nxs_snap_class.php:517
+msgid "Use advanced image finder"
+msgstr "Usar o Localizador Avançado de Imagem"
+
+#: inc/nxs_snap_class.php:519
+msgid ""
+"Check this if your images could be found only in the fully processed posts. "
+"<br/>This feature could interfere with some plugins using post processing "
+"functions incorrectly. Your site could become messed up, have troubles "
+"displaying content or start giving you \"ob_start() [ref.outcontrol]: Cannot "
+"use output buffering in output buffering display handlers\" errors."
+msgstr ""
+"Marque esta opção se as imagens podem ser encontradas nos Posts totalmente "
+"processados. <br/>Este recurso pode interferir com alguns plugins que "
+"utilizam funções de pós-processamento de forma incorreta. Seu site pode "
+"ficar confuso, ter problemas ao exibir conteúdos ou começar a mostrar "
+"mensagens de \"ERRO \"ob_start() [ref.outcontrol]: Não é possível usar o "
+"buffer de saída, na saída de manipuladores de exibição de buffer\" (Cannot "
+"use output buffering in output buffering display handlers)."
+
+#: inc/nxs_snap_class.php:525
+msgid "Alternative \"Featured Image\" location"
+msgstr "Local Alternativo da \"Imagem de Destaque\""
+
+#: inc/nxs_snap_class.php:526
+msgid ""
+"Plugin uses standard Wordpress \"Featured Image\" by default. If your theme "
+"stores \"Featured Image\" in the custom field, please enter the name of it. "
+"Use prefix if your custom field has only partial location."
+msgstr ""
+"O Pligin usa o Padrão do Wordpress \"Imagem de Destaque\" por padrão. Se seu "
+"Tema tem a \"Imagem de Destaque\" em campo personalizado, por favor, digite "
+"o nome do mesmo. Use o prefixo se o seu campo personalizado só tem uma "
+"localização parcial."
+
+#: inc/nxs_snap_class.php:528
+msgid "Custom field name:"
+msgstr "Nome do Campo Personalizado:"
+
+#: inc/nxs_snap_class.php:530
+msgid "Set the name of the custom field that contains image info"
+msgstr "Defina o nome do campo personalizado que contém a informação da imagem"
+
+#: inc/nxs_snap_class.php:533
+msgid "Custom field Array Path:"
+msgstr "Caminho \"Matriz\" do Campo Personalizado:"
+
+#: inc/nxs_snap_class.php:535 inc/nxs_snap_class.php:540
+msgid "Optional"
+msgstr "Opcional"
+
+#: inc/nxs_snap_class.php:535
+msgid ""
+"If your custom field contain an array, please enter the path to the image "
+"field. For example: ['images']['image']"
+msgstr ""
+"Se o seu Campo Personalizado contém uma Matriz, por favor, digite o caminho "
+"correto para o campo da imagem. Por exemplo: ['imagens'] ['imagem']"
+
+#: inc/nxs_snap_class.php:538
+msgid "Custom field Image Prefix:"
+msgstr "Campo Personalizado do Prefixo da Imagem:"
+
+#: inc/nxs_snap_class.php:540
+msgid ""
+"If your custom field contain only the last part of the image path, please "
+"enter the prefix"
+msgstr ""
+"Se o campo personalizado contém somente a última parte do caminho da imagem, "
+"por favor, digite o prefixo"
+
+#: inc/nxs_snap_class.php:545 inc/nxs_snap_class.php:546
+msgid "Debug/Report Settings"
+msgstr "Configurações Depurar(Debug)/Relatório"
+
+#: inc/nxs_snap_class.php:549
+msgid "How many log records keep?"
+msgstr "Manter quantos Registros de \"Log\"?"
+
+#: inc/nxs_snap_class.php:558
+msgid "Minimal"
+msgstr "Mínimo"
+
+#: inc/nxs_snap_class.php:558
+msgid ""
+"Only important action info will be added to the log. \"Debug\", \"Skipped\", "
+"informational info will be ignored."
+msgstr ""
+"Somente as ações e informações importantes serão adicionada ao \"Log\". "
+"\"Depurar\", \"Ignorado\",  e Informativos serão ignorados."
+
+#: inc/nxs_snap_class.php:559
+msgid "Normal"
+msgstr "Normal"
+
+#: inc/nxs_snap_class.php:559
+msgid "All info except extended debug queryies will be added to the log."
+msgstr ""
+"Todas as informações, exceto depuração estendida e \"queryies\" serão "
+"adicionadas ao Log."
+
+#: inc/nxs_snap_class.php:560
+msgid "Extended/Debug"
+msgstr "Depuração/Estendida"
+
+#: inc/nxs_snap_class.php:560
+msgid "Advanced Setting. Extended debug Info will be added to the log."
+msgstr ""
+"Configurações Avançadas. As informações da Depuração Estendida serão "
+"adicionadas ao Log."
+
+#: inc/nxs_snap_class.php:566
+msgid ""
+"Send Email notification for all autoposting errors. No more then one email "
+"per hour will be sent."
+msgstr ""
+"Enviar notificação por Email para todos os erros de Publicações Automáticas. "
+"Então será enviado um e-mail por hora e não mais."
+
+#: inc/nxs_snap_class.php:569
+msgid "Email:"
+msgstr "E-mail:"
+
+#: inc/nxs_snap_class.php:570
+msgid ""
+"wp_mail will be used. Some email providers (gmail, hotmail) might have "
+"problems getting such mail"
+msgstr ""
+"O wp_mail será usado. Alguns provedores de e-mail (gmail, hotmail) podem ter "
+"problemas para receber tais e-mails"
+
+#: inc/nxs_snap_class.php:722
+msgid ""
+"Set random delays around your interval time, to make your posts appear more "
+"human"
+msgstr ""
+"Definir atrasos aleatórios em torno do seu intervalo de tempo, para fazer "
+"seus posts aparecem mais \"humano\" menos automatizados"
+
+#: inc/nxs_snap_class.php:742
+msgid "Contact support"
+msgstr "Contactar o Suporte"
+
+#: inc/nxs_snap_class.php:743
+msgid ""
+"Ready to to Upgrade to Multiple Accounts Edition<br/> and get Google+ and "
+"Pinterest Auto-Posting?"
+msgstr ""
+"Está Pronto para Atualizar para a Edição de Múltiplas Contas<br/> e ter "
+"Publicações Automáticas para o Google+ e para o Pinterest?"
+
+#: inc/nxs_snap_class.php:744
+msgid "Enter your Activation Key"
+msgstr "Digite sua Chave de Ativação"
+
+#: inc/nxs_snap_class.php:745
+msgid "Get It here"
+msgstr "Comprá-lo aqui"
+
+#: inc/nxs_snap_class.php:747
+msgid "Activation"
+msgstr "Ativação"
+
+#: inc/nxs_snap_class.php:749
+msgid "Multiple Accounts Edition and Google+ and Pinterest Auto-Posting"
+msgstr ""
+"Edição de Múltiplas Contas para \"Publicações Automáticas\" para o Google+ e "
+"o Pinterest"
+
+#: inc/nxs_snap_class.php:749
+msgid "You can find your key on this page"
+msgstr "Você pode encontrar sua chave nesta página"
+
+#: inc/nxs_snap_class.php:750
+msgid "Enter your Key"
+msgstr "Insira sua chave"
+
+#: inc/nxs_snap_class.php:752
+msgid "Your plugin will be automatically upgraded"
+msgstr "O seu Plugin será atualizado automaticamente"
+
+#: inc/nxs_snap_class.php:757
+msgid "Next Scripts: Social Networks Auto Poster Options"
+msgstr "Next Scripts: Social Networks Auto Poster - Opções"
+
+#: inc/nxs_snap_class.php:757
+msgid "Plugin Version"
+msgstr "Versão do Plugin"
+
+#: inc/nxs_snap_class.php:760
+msgid "Get"
+msgstr "Comprar"
+
+#: inc/nxs_snap_class.php:762
+msgid "Here you can setup \"Social Networks Auto Poster\"."
+msgstr "Aqui você pode configurar o \"Social Networks Auto Poster\"."
+
+#: inc/nxs_snap_class.php:762
+msgid ""
+"You can start by clicking \"Add new account\" button and choosing the Social "
+"Network you would like to add."
+msgstr ""
+"Você pode começar clicando no botão \"Adicionar Nova Conta\" e escolher a "
+"Rede Social que você gostaria de adicionar."
+
+#: inc/nxs_snap_class.php:778
+msgid "You have Google Analytics Plugin installed and activated."
+msgstr "Você tem o Google Analytics Plugin instalado e ativado."
+
+#: inc/nxs_snap_class.php:778
+msgid "This plugin hijacks the authorization workflow."
+msgstr "Este plugin captura a Autorização e o Fluxo de Trabalho."
+
+#: inc/nxs_snap_class.php:779
+msgid ""
+"Please temporary <a href=\"%s\">deactivate</a> Google Analytics plugin, do "
+"all authorizations and then activate it back."
+msgstr ""
+"Por favor, <a href=\"%s\">desative</a> temporariamente o Plugin do Google "
+"Analytics, para poder fazer todas as autorizações e, em seguida, volte a "
+"ativá-lo."
+
+#: inc/nxs_snap_class.php:820 inc-cl/fb.php:135 inc-cl/li.php:179
+#: inc-cl/vk.php:119 nxs_functions.php:675 nxs_functions.php:685
+msgid "Auto"
+msgstr "Automático"
+
+#: inc/nxs_snap_class.php:820
+msgid "Post URL will be used"
+msgstr "O URL da Publicação será utilizado"
+
+#: inc/nxs_snap_class.php:823 nxs_functions.php:688
+msgid "URL:"
+msgstr "URL:"
+
+#: inc/nxs_snap_class.php:833
+msgid ""
+"If you made any changes to the format, please \"Update\" the post before "
+"reposting"
+msgstr ""
+"Se você tiver feito alterações no formato, por favor, \"Atualize\" a "
+"publicação antes de republicar"
+
+#: inc/nxs_snap_class.php:836
+msgid "Check All"
+msgstr "Marcar Tudo"
+
+#: inc/nxs_snap_class.php:836
+msgid "Uncheck All"
+msgstr "Desmarcar Tudo"
+
+#: inc/nxs_snap_class.php:870 inc/nxs_snap_class.php:873
+#: inc/nxs_snap_class.php:878
+msgid "NextScripts: Social Networks Auto Poster - Post Options"
+msgstr "NextScripts: Social Networks Auto Poster - Opções das Publicações"
+
+#: inc-cl/ap.php:27 inc-cl/bg.php:12 inc-cl/da.php:12 inc-cl/di.php:13
+#: inc-cl/dl.php:12 inc-cl/fb.php:47 inc-cl/ff.php:12 inc-cl/gp.php:12
+#: inc-cl/ip.php:12 inc-cl/li.php:71 inc-cl/lj.php:12 inc-cl/pk.php:50
+#: inc-cl/pn.php:12 inc-cl/rd.php:12 inc-cl/su.php:12 inc-cl/tr.php:40
+#: inc-cl/tw.php:12 inc-cl/vb.php:12 inc-cl/vk.php:12 inc-cl/wp.php:12
+#: inc-cl/yt.php:12
+msgid "accounts"
+msgstr "contas"
+
+#: inc-cl/ap.php:38 inc-cl/bg.php:21 inc-cl/da.php:22 inc-cl/di.php:22
+#: inc-cl/dl.php:21 inc-cl/fb.php:57 inc-cl/ff.php:21 inc-cl/gp.php:22
+#: inc-cl/ip.php:21 inc-cl/li.php:82 inc-cl/lj.php:21 inc-cl/pk.php:60
+#: inc-cl/pn.php:22 inc-cl/rd.php:22 inc-cl/su.php:21 inc-cl/tr.php:50
+#: inc-cl/tw.php:21 inc-cl/vb.php:21 inc-cl/vk.php:21 inc-cl/wp.php:21
+#: inc-cl/yt.php:22
+msgid "Auto-publish to"
+msgstr "Publicar Automaticamente para"
+
+#: inc-cl/ap.php:39 inc-cl/bg.php:22 inc-cl/da.php:23 inc-cl/di.php:23
+#: inc-cl/dl.php:22 inc-cl/ff.php:22 inc-cl/gp.php:23 inc-cl/ip.php:22
+#: inc-cl/li.php:83 inc-cl/lj.php:22 inc-cl/pk.php:61 inc-cl/pn.php:23
+#: inc-cl/rd.php:23 inc-cl/su.php:22 inc-cl/tr.php:51 inc-cl/vb.php:22
+#: inc-cl/vk.php:22 inc-cl/wp.php:22 inc-cl/yt.php:23
+msgid "Attention requred. Unfinished setup"
+msgstr "Atenção! Instalação inacabada."
+
+#: inc-cl/ap.php:39 inc-cl/bg.php:22 inc-cl/da.php:23 inc-cl/di.php:23
+#: inc-cl/dl.php:22 inc-cl/fb.php:58 inc-cl/ff.php:22 inc-cl/gp.php:23
+#: inc-cl/ip.php:22 inc-cl/li.php:83 inc-cl/lj.php:22 inc-cl/pk.php:61
+#: inc-cl/pn.php:23 inc-cl/rd.php:23 inc-cl/su.php:22 inc-cl/tr.php:51
+#: inc-cl/tw.php:22 inc-cl/vb.php:22 inc-cl/vk.php:22 inc-cl/wp.php:22
+#: inc-cl/yt.php:23
+msgid "Show Settings"
+msgstr "Exibir Configurações"
+
+#: inc-cl/ap.php:40 inc-cl/bg.php:23 inc-cl/da.php:24 inc-cl/di.php:24
+#: inc-cl/dl.php:23 inc-cl/fb.php:59 inc-cl/ff.php:23 inc-cl/gp.php:24
+#: inc-cl/ip.php:23 inc-cl/li.php:84 inc-cl/lj.php:23 inc-cl/pk.php:62
+#: inc-cl/pn.php:24 inc-cl/rd.php:24 inc-cl/su.php:23 inc-cl/tr.php:52
+#: inc-cl/tw.php:23 inc-cl/vb.php:23 inc-cl/vk.php:23 inc-cl/wp.php:23
+#: inc-cl/yt.php:24
+msgid "Remove Account"
+msgstr "Remover Conta"
+
+#: inc-cl/ap.php:55 inc-cl/bg.php:41 inc-cl/da.php:43 inc-cl/di.php:40
+#: inc-cl/dl.php:37 inc-cl/fb.php:81 inc-cl/ff.php:38 inc-cl/gp.php:41
+#: inc-cl/ip.php:37 inc-cl/li.php:100 inc-cl/lj.php:37 inc-cl/pk.php:77
+#: inc-cl/pn.php:46 inc-cl/rd.php:44 inc-cl/su.php:39 inc-cl/tr.php:68
+#: inc-cl/tw.php:41 inc-cl/vb.php:39 inc-cl/vk.php:40 inc-cl/wp.php:37
+#: inc-cl/yt.php:41
+msgid "Detailed %s Installation/Configuration Instructions"
+msgstr "Detalhado %s Instruções de Instalação/Configuração"
+
+#: inc-cl/ap.php:57 inc-cl/bg.php:43 inc-cl/da.php:45 inc-cl/di.php:42
+#: inc-cl/dl.php:39 inc-cl/fb.php:86 inc-cl/ff.php:40 inc-cl/gp.php:43
+#: inc-cl/ip.php:39 inc-cl/li.php:102 inc-cl/lj.php:40 inc-cl/pk.php:79
+#: inc-cl/pn.php:47 inc-cl/rd.php:46 inc-cl/su.php:41 inc-cl/tr.php:70
+#: inc-cl/tw.php:43 inc-cl/vb.php:41 inc-cl/vk.php:45 inc-cl/wp.php:41
+#: inc-cl/yt.php:43
+msgid "Account Nickname"
+msgstr "Apelido da conta"
+
+#: inc-cl/ap.php:57 inc-cl/bg.php:43 inc-cl/da.php:45 inc-cl/di.php:42
+#: inc-cl/dl.php:39 inc-cl/fb.php:86 inc-cl/ff.php:40 inc-cl/gp.php:43
+#: inc-cl/ip.php:39 inc-cl/li.php:102 inc-cl/lj.php:40 inc-cl/pk.php:79
+#: inc-cl/pn.php:47 inc-cl/rd.php:46 inc-cl/su.php:41 inc-cl/tr.php:70
+#: inc-cl/tw.php:43 inc-cl/vb.php:41 inc-cl/vk.php:45 inc-cl/wp.php:41
+#: inc-cl/yt.php:43
+msgid "Just so you can easily identify it"
+msgstr "(Só para que você possa facilmente identificá-la)"
+
+#: inc-cl/ap.php:61 inc-cl/bg.php:49 inc-cl/da.php:51 inc-cl/di.php:47
+#: inc-cl/dl.php:44 inc-cl/fb.php:91 inc-cl/ff.php:45 inc-cl/gp.php:47
+#: inc-cl/ip.php:44 inc-cl/li.php:107 inc-cl/lj.php:45 inc-cl/pk.php:84
+#: inc-cl/pn.php:52 inc-cl/rd.php:52 inc-cl/su.php:46 inc-cl/tr.php:75
+#: inc-cl/tw.php:47 inc-cl/vb.php:46 inc-cl/vk.php:50 inc-cl/wp.php:46
+#: inc-cl/yt.php:48
+msgid "Account Info"
+msgstr "Informações da Conta"
+
+#: inc-cl/ap.php:62 inc-cl/bg.php:50 inc-cl/da.php:52 inc-cl/di.php:48
+#: inc-cl/dl.php:45 inc-cl/fb.php:92 inc-cl/ff.php:46 inc-cl/gp.php:48
+#: inc-cl/ip.php:45 inc-cl/li.php:108 inc-cl/lj.php:46 inc-cl/pk.php:85
+#: inc-cl/pn.php:53 inc-cl/rd.php:53 inc-cl/su.php:47 inc-cl/tr.php:76
+#: inc-cl/tw.php:48 inc-cl/vb.php:47 inc-cl/vk.php:51 inc-cl/wp.php:47
+#: inc-cl/yt.php:49
+msgid "Advanced"
+msgstr "Avançado"
+
+#: inc-cl/ap.php:72 inc-cl/da.php:68 inc-cl/rd.php:91
+msgid "Text Format"
+msgstr "Formato de texto"
+
+#: inc-cl/ap.php:72 inc-cl/bg.php:64 inc-cl/bg.php:69 inc-cl/da.php:63
+#: inc-cl/da.php:68 inc-cl/di.php:68 inc-cl/di.php:73 inc-cl/dl.php:58
+#: inc-cl/dl.php:64 inc-cl/fb.php:103 inc-cl/ff.php:64 inc-cl/gp.php:80
+#: inc-cl/ip.php:58 inc-cl/ip.php:64 inc-cl/lj.php:70 inc-cl/lj.php:74
+#: inc-cl/pk.php:109 inc-cl/pn.php:91 inc-cl/rd.php:79 inc-cl/rd.php:91
+#: inc-cl/su.php:76 inc-cl/tr.php:93 inc-cl/tr.php:119 inc-cl/vb.php:72
+#: inc-cl/vb.php:80 inc-cl/vk.php:96 inc-cl/wp.php:65 inc-cl/wp.php:72
+#: inc-cl/yt.php:68
+msgid "Show format info"
+msgstr "Exibir as informações do Formato"
+
+#: inc-cl/ap.php:75
+msgid "New post (%TITLE%) has been published on %SITENAME% - %URL%"
+msgstr "Nova Publicação (%TITLE%) foi publicada em %SITENAME% - %URL%"
+
+#: inc-cl/ap.php:80
+msgid "Attach Image to App.net Post"
+msgstr "Anexar a imagem à Publicação \"App.net\""
+
+#: inc-cl/ap.php:83
+msgid "Authorize Your App.Net Account"
+msgstr "Autorizar a sua Conta ao \"App.net\""
+
+#: inc-cl/ap.php:83 inc-cl/fb.php:153
+msgid "Please click \"Update Settings\" to be able to Authorize your account."
+msgstr ""
+"Por favor, clique em \"Atualizar Configurações\" para poder autorizar a sua "
+"conta."
+
+#: inc-cl/ap.php:85
+msgid "Your App.Net Account has been authorized."
+msgstr "Sua conta \"App.Net\" foi autorizada."
+
+#: inc-cl/ap.php:86 inc-cl/fb.php:156 inc-cl/vk.php:73
+msgid "You can"
+msgstr "Você pode"
+
+#: inc-cl/ap.php:88 inc-cl/fb.php:158 inc-cl/vk.php:75
+msgid "Authorize your account"
+msgstr "Autorizar a sua conta"
+
+#: inc-cl/ap.php:89
+msgid "If you get App.Net message:"
+msgstr "Se você receber a mensagem do \"App.net\":"
+
+#: inc-cl/ap.php:89
+msgid ""
+"please make sure that domain name in your App.Net App matches your website "
+"domain exactly. Please note that www. and non www. versions are different "
+"domains."
+msgstr ""
+"por favor, certifique-se de que o nome de domínio em seu \"App.net\" "
+"corresponde exatamente ao domínio do seu site . Por favor, note que com o "
+"www. e sem o www. são considerados domínios diferentes."
+
+#: inc-cl/ap.php:97 inc-cl/bg.php:86 inc-cl/da.php:80 inc-cl/di.php:83
+#: inc-cl/dl.php:73 inc-cl/fb.php:164 inc-cl/ff.php:72 inc-cl/gp.php:102
+#: inc-cl/ip.php:73 inc-cl/li.php:197 inc-cl/lj.php:86 inc-cl/pk.php:129
+#: inc-cl/pn.php:101 inc-cl/rd.php:103 inc-cl/su.php:86 inc-cl/tr.php:147
+#: inc-cl/tw.php:70 inc-cl/vb.php:86 inc-cl/vk.php:133 inc-cl/wp.php:83
+#: inc-cl/yt.php:79
+msgid "Test your settings"
+msgstr "Teste suas configurações"
+
+#: inc-cl/ap.php:97 inc-cl/bg.php:86 inc-cl/da.php:80 inc-cl/di.php:83
+#: inc-cl/dl.php:73 inc-cl/fb.php:164 inc-cl/ff.php:72 inc-cl/gp.php:102
+#: inc-cl/ip.php:73 inc-cl/li.php:197 inc-cl/lj.php:86 inc-cl/pk.php:129
+#: inc-cl/pn.php:101 inc-cl/rd.php:103 inc-cl/su.php:86 inc-cl/tr.php:147
+#: inc-cl/tw.php:70 inc-cl/vb.php:86 inc-cl/vk.php:133 inc-cl/wp.php:83
+#: inc-cl/yt.php:79
+msgid "Submit Test Post to %s"
+msgstr "Enviar Publicação de teste para %s"
+
+#: inc-cl/ap.php:104 inc-cl/ap.php:105 inc-cl/bg.php:93 inc-cl/bg.php:94
+#: inc-cl/da.php:87 inc-cl/da.php:88 inc-cl/di.php:89 inc-cl/di.php:90
+#: inc-cl/dl.php:81 inc-cl/dl.php:82 inc-cl/fb.php:171 inc-cl/fb.php:172
+#: inc-cl/ff.php:80 inc-cl/ff.php:81 inc-cl/gp.php:109 inc-cl/gp.php:110
+#: inc-cl/ip.php:81 inc-cl/ip.php:82 inc-cl/li.php:207 inc-cl/li.php:208
+#: inc-cl/lj.php:91 inc-cl/lj.php:92 inc-cl/pk.php:135 inc-cl/pk.php:136
+#: inc-cl/pn.php:108 inc-cl/pn.php:109 inc-cl/rd.php:110 inc-cl/rd.php:111
+#: inc-cl/su.php:94 inc-cl/su.php:95 inc-cl/tr.php:154 inc-cl/tr.php:155
+#: inc-cl/tw.php:78 inc-cl/tw.php:80 inc-cl/vb.php:94 inc-cl/vb.php:95
+#: inc-cl/vk.php:140 inc-cl/vk.php:141 inc-cl/wp.php:91 inc-cl/wp.php:92
+#: inc-cl/yt.php:84 inc-cl/yt.php:85
+msgid "Categories"
+msgstr "Categorias:"
+
+#: inc-cl/ap.php:160 inc-cl/bg.php:155 inc-cl/da.php:145 inc-cl/di.php:143
+#: inc-cl/dl.php:132 inc-cl/fb.php:263 inc-cl/ff.php:134 inc-cl/gp.php:169
+#: inc-cl/ip.php:132 inc-cl/li.php:272 inc-cl/lj.php:149 inc-cl/pk.php:198
+#: inc-cl/pn.php:166 inc-cl/rd.php:177 inc-cl/su.php:152 inc-cl/tr.php:224
+#: inc-cl/vb.php:148 inc-cl/vk.php:225 inc-cl/wp.php:143 inc-cl/yt.php:137
+msgid "publish to"
+msgstr "Publicar em"
+
+#: inc-cl/ap.php:161
+msgid "Repost to App.Net"
+msgstr "Republicar no \"App.net\""
+
+#: inc-cl/ap.php:167 inc-cl/bg.php:162 inc-cl/da.php:152 inc-cl/di.php:148
+#: inc-cl/dl.php:138 inc-cl/fb.php:276 inc-cl/ff.php:140 inc-cl/gp.php:176
+#: inc-cl/ip.php:138 inc-cl/li.php:278 inc-cl/lj.php:155 inc-cl/pk.php:204
+#: inc-cl/pn.php:172 inc-cl/rd.php:184 inc-cl/su.php:159 inc-cl/tr.php:230
+#: inc-cl/tw.php:157 inc-cl/vb.php:155 inc-cl/vk.php:231 inc-cl/wp.php:150
+#: inc-cl/yt.php:144
+msgid "Posted on"
+msgstr "Publicado em"
+
+#: inc-cl/ap.php:180 inc-cl/bg.php:174 inc-cl/da.php:165 inc-cl/di.php:159
+#: inc-cl/dl.php:151 inc-cl/fb.php:288 inc-cl/ff.php:157 inc-cl/gp.php:192
+#: inc-cl/ip.php:151 inc-cl/li.php:290 inc-cl/lj.php:168 inc-cl/pk.php:216
+#: inc-cl/pn.php:185 inc-cl/rd.php:197 inc-cl/su.php:171 inc-cl/tr.php:242
+#: inc-cl/tw.php:169 inc-cl/vb.php:168 inc-cl/vk.php:243 inc-cl/wp.php:163
+#: inc-cl/yt.php:157
+msgid "Include in \"Auto-Reposting\" to this network."
+msgstr "Incluir esta Rede nas \"Publicações Automáticas\""
+
+#: inc-cl/ap.php:184 inc-cl/da.php:172 inc-cl/di.php:164 inc-cl/dl.php:158
+#: inc-cl/ip.php:158 inc-cl/lj.php:174 inc-cl/pk.php:230 inc-cl/rd.php:210
+#: inc-cl/su.php:186 inc-cl/tr.php:259 inc-cl/vb.php:171 inc-cl/vb.php:174
+#: inc-cl/wp.php:169
+msgid "Text Format:"
+msgstr "Formato de texto:"
+
+#: inc-cl/bg.php:60
+msgid ""
+"Log to your Blogger management panel and look at the URL of your blog: "
+"http://www.blogger.com/blogger.g?blogID=8959085979163812093#allposts. Your "
+"Blog ID will be: 8959085979163812093"
+msgstr ""
+"Acesse o painel de administração do seu Blogger e veja o URL do seu blog: "
+"http://www.blogger.com/blogger.g?blogID=8959085979163812093#allposts. Seu ID "
+"do Blog será: 8959085979163812093"
+
+#: inc-cl/bg.php:64 inc-cl/da.php:63 inc-cl/di.php:68 inc-cl/dl.php:58
+#: inc-cl/ip.php:58 inc-cl/lj.php:70 inc-cl/rd.php:79 inc-cl/tr.php:93
+#: inc-cl/vb.php:72 inc-cl/wp.php:64
+msgid "Post Title Format"
+msgstr "Formato do Título da Publicação"
+
+#: inc-cl/bg.php:69 inc-cl/di.php:73 inc-cl/dl.php:64 inc-cl/ff.php:64
+#: inc-cl/ip.php:64 inc-cl/lj.php:74 inc-cl/pk.php:109 inc-cl/su.php:76
+#: inc-cl/tr.php:119 inc-cl/vb.php:80 inc-cl/wp.php:71
+msgid "Post Text Format"
+msgstr "Formato do Texto da Publicação"
+
+#: inc-cl/bg.php:77
+msgid "HTML is allowed"
+msgstr "Pode ser usado HTML."
+
+#: inc-cl/bg.php:81 inc-cl/di.php:64
+msgid "Post with tags"
+msgstr "Tags da Publicação"
+
+#: inc-cl/bg.php:81
+msgid "Tags from the blogpost will be auto-posted to Blogger/Blogspot"
+msgstr ""
+"As Tags do blogpost serão automaticamente enviadas para Blogger/Blogspot"
+
+#: inc-cl/bg.php:86
+msgid "Submit Test Post to Finish Configuration"
+msgstr "Enviar uma Publicação de teste para concluir a configuração"
+
+#: inc-cl/bg.php:157
+msgid "Repost to Blogger"
+msgstr "Republicar no Blogger"
+
+#: inc-cl/bg.php:166
+msgid "Setup your Blogger Account to AutoPost to Blogger"
+msgstr ""
+"Configure sua conta do Blogger para Publicar Automaticamente para o Blogger"
+
+#: inc-cl/bg.php:177 inc-cl/da.php:169 inc-cl/di.php:162 inc-cl/dl.php:155
+#: inc-cl/ff.php:161 inc-cl/ip.php:155 inc-cl/lj.php:171 inc-cl/rd.php:201
+#: inc-cl/wp.php:166
+msgid "Title Format:"
+msgstr "Formato do título:"
+
+#: inc-cl/bg.php:179 inc-cl/fb.php:315 inc-cl/gp.php:215 inc-cl/li.php:297
+#: inc-cl/tw.php:172 inc-cl/vk.php:245 inc-cl/yt.php:161
+msgid "Message Format:"
+msgstr "Formato de Mensagem:"
+
+#: inc-cl/da.php:39
+msgid "deviantART API Library not found"
+msgstr "Biblioteca de API \"deviantART\" não foi encontrada"
+
+#: inc-cl/da.php:40
+msgid "deviantART doesn't have a built-in API for automated posts yet."
+msgstr ""
+"A \"deviantART\" ainda não tem uma API inserida para mensagens automatizadas."
+
+#: inc-cl/da.php:40
+msgid ""
+"<br/>You need to get a special <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/deviantart-automated-posting\"><b>API Library Module</b></a> "
+"to be able to publish your content to deviantART."
+msgstr ""
+"<br/>Você precisa ter um<a target=\"_blank\" href=\"http://www.nextscripts."
+"com/deviantart-automated-posting\"><b> Módulo de Livraria API </b></"
+"a>especial para poder publicar o seu conteúdo para deviantART."
+
+#: inc-cl/da.php:71
+msgid "%FULLTEXT%"
+msgstr "%FULLTEXT%"
+
+#: inc-cl/da.php:96 inc-cl/rd.php:119 nxs_functions.php:482
+msgid "Posting Delay"
+msgstr "Publicado com retardo \"delay\""
+
+#: inc-cl/da.php:146
+msgid "Repost to deviantART"
+msgstr "Republicar no deviantART"
+
+#: inc-cl/di.php:64
+msgid "Tags from the blogpost will be auto posted to Diigo"
+msgstr "Tags do blog/site serão Publicadas Automaticamente para o Diigo"
+
+#: inc-cl/di.php:144
+msgid "Repost to Diigo"
+msgstr "Republicar no Digo"
+
+#: inc-cl/dl.php:133
+msgid "Repost to Delicious"
+msgstr "Republicar para o Delicious"
+
+#: inc-cl/fb.php:58 inc-cl/tw.php:22
+msgid "Attention required. Unfinished setup"
+msgstr "Atenção! Instalação inacabada."
+
+#: inc-cl/fb.php:68 inc-cl/gp.php:83 inc-cl/rd.php:94
+msgid "New post (%TITLE%) has been published on %SITENAME%"
+msgstr "Nova Publicação (%TITLE%) foi feita em %SITENAME%"
+
+#: inc-cl/fb.php:70 inc-cl/tw.php:33
+msgctxt "timezone date format"
+msgid "Y-m-d G:i:s"
+msgstr "d-m-Y G:i:s"
+
+#: inc-cl/fb.php:82
+msgid "Please use in your Facebook App:"
+msgstr "Por favor, use a sua App Facebook:"
+
+#: inc-cl/fb.php:98
+msgid "Could be your Facebook Profile, Facebook Page, Facebook Group"
+msgstr "Pode ser seu Perfil no Facebook, Página, ou Grupo no Facebook"
+
+#: inc-cl/fb.php:103 inc-cl/gp.php:80 inc-cl/li.php:167 inc-cl/pn.php:91
+#: inc-cl/tw.php:62 inc-cl/vk.php:96 inc-cl/yt.php:68
+msgid "Message text Format"
+msgstr "Formato do texto da Publicação"
+
+#: inc-cl/fb.php:111 inc-cl/fb.php:301 inc-cl/gp.php:94 inc-cl/gp.php:199
+#: inc-cl/rd.php:87 inc-cl/rd.php:207 inc-cl/vk.php:109 inc-cl/vk.php:256
+msgid "Text Post"
+msgstr "Texto da Publicação"
+
+#: inc-cl/fb.php:111 inc-cl/fb.php:301 inc-cl/gp.php:94 inc-cl/gp.php:199
+#: inc-cl/vk.php:109 inc-cl/vk.php:256
+msgid "just text message"
+msgstr "apenas a mensagem de texto"
+
+#: inc-cl/fb.php:113 inc-cl/fb.php:302 inc-cl/vk.php:110 inc-cl/vk.php:257
+msgid "Image Post"
+msgstr "Imagem da Publicação"
+
+#: inc-cl/fb.php:113 inc-cl/fb.php:302 inc-cl/gp.php:95 inc-cl/gp.php:200
+#: inc-cl/vk.php:110 inc-cl/vk.php:257
+msgid "big image with text message"
+msgstr "Imagem Grande para o texto da Mensagem "
+
+#: inc-cl/fb.php:114
+msgid "Upload Images to"
+msgstr "Enviar imagens para"
+
+#: inc-cl/fb.php:115
+msgid "App Album"
+msgstr "Álbum de Aplicativos"
+
+#: inc-cl/fb.php:115 inc-cl/fb.php:123 inc-cl/fb.php:306
+msgid "or"
+msgstr "ou"
+
+#: inc-cl/fb.php:117
+msgid "Timeline"
+msgstr "Linha do Tempo"
+
+#: inc-cl/fb.php:120 inc-cl/vk.php:111
+msgid "Text Post with \"attached\" link"
+msgstr "Texto da Publicação com link \"anexado\""
+
+#: inc-cl/fb.php:122
+msgid "Link attachment type"
+msgstr "Tipo de link de anexo"
+
+#: inc-cl/fb.php:123 inc-cl/fb.php:306
+msgid "Share a link to your blogpost"
+msgstr "Compartilhar um link para seu blogpost"
+
+#: inc-cl/fb.php:125 inc-cl/fb.php:308
+msgid "Attach your blogpost"
+msgstr "Anexar seu blogpost"
+
+#: inc-cl/fb.php:126
+msgid "If post has video use it as an attachment thumbnail."
+msgstr ""
+"Se a Publicação tem um vídeo anexo usá-lo como miniatura (thumbnail) como "
+"anexo."
+
+#: inc-cl/fb.php:126
+msgid ""
+"Video will be used for an attachment thumbnail instead of featured image. "
+"Only Youtube is supported at this time."
+msgstr ""
+"O vídeo será usado para uma miniatura em vez da imagem em destaque anexa. "
+"Apenas YouTube é suportado neste momento."
+
+#: inc-cl/fb.php:129
+msgid "Let Facebook fill the link info"
+msgstr "Deixar o Facebook preencher as informações do link"
+
+#: inc-cl/fb.php:130
+msgid ""
+"Recommended. Facebook will automatically take attached/shared link info from "
+"OG: tags or other sources."
+msgstr ""
+"Recomendado. O Facebook terá automaticamente as informações sobre vínculos "
+"(links)Anexada/Compartilhado do \"OG:tags\" ou de outras fontes."
+
+#: inc-cl/fb.php:134 inc-cl/li.php:178
+msgid "Attachment Text Format"
+msgstr "Formato do Texto do anexo"
+
+#: inc-cl/fb.php:136 inc-cl/li.php:180 inc-cl/vk.php:120
+msgid ""
+"Recommended. Info from SEO Plugins will be used, then post excerpt, then "
+"post text"
+msgstr ""
+"Recomendado. Informações de Plugins de SEO serão usadas, publicar o Resumo, "
+"e depois  o Texto"
+
+#: inc-cl/fb.php:137 inc-cl/li.php:181
+msgid "Set your own format"
+msgstr "Definir seu próprio formato."
+
+#: inc-cl/fb.php:143
+msgid "Where to upload Images"
+msgstr "Onde fazer o envio de imagens"
+
+#: inc-cl/fb.php:143
+msgid "(App Album)"
+msgstr "(Álbum de Aplicativos)"
+
+#: inc-cl/fb.php:143
+msgid ""
+"Facebook automatically creates an album for your app. Images will be grouped "
+"there as in any regular album."
+msgstr ""
+"O Facebook cria automaticamente um álbum para suas imagens de Aplicativos, "
+"que serão agrupadas lá como em qualquer álbum usual."
+
+#: inc-cl/fb.php:143
+msgid "(Timeline)"
+msgstr "(Linha do Tempo)"
+
+#: inc-cl/fb.php:143
+msgid ""
+"Images will be posted to the special \"Wall/Timeline\" album and won't be "
+"grouped. \"Wall/Timeline\" album must exist. It's created when first image "
+"posted to timeline manually."
+msgstr ""
+"As imagens serão publicadas no álbum especial \"Mural/Linha do Tempo\" e não "
+"serão agrupadas. O Álbum \"Mural/Linha do Tempo\" deve existir. É criado "
+"quando a primeira imagem for publicada à Linha do Tempo manualmente."
+
+#: inc-cl/fb.php:144 inc-cl/fb.php:310
+msgid "Two ways of attaching post on Facebook"
+msgstr "Duas formas de anexar a Publicação no Facebook"
+
+#: inc-cl/fb.php:145 inc-cl/fb.php:311
+msgid "Facebook Post Types"
+msgstr "Tipos de Publicação no Facebook"
+
+#: inc-cl/fb.php:153
+msgid "Authorize Your Facebook Account"
+msgstr "Autorizar a sua conta do Facebook"
+
+#: inc-cl/fb.php:155
+msgid "Your Facebook Account has been authorized."
+msgstr "Sua conta do Facebook foi autorizada."
+
+#: inc-cl/fb.php:159
+msgid "If you get Facebook message:"
+msgstr "Se você receber a mensagem do Facebook:"
+
+#: inc-cl/fb.php:159
+msgid ""
+"please make sure that domain name in your Facebook App matches your website "
+"domain exactly. Please note that www. and non www. versions are different "
+"domains."
+msgstr ""
+"certifique-se de que o nome de domínio em seu Aplicativos Facebook "
+"corresponde exatamente ao domínio do seu site . Por favor, note que com o "
+"www. e sem o www. são considerados domínios diferentes."
+
+#: inc-cl/fb.php:182
+msgid "Facebook Comments:"
+msgstr "Comentários do Facebook:"
+
+#: inc-cl/fb.php:184
+msgid ""
+"Plugin could grab comments from Facebook and import them as Wordpress "
+"Comments"
+msgstr ""
+"O Plugin pode pegar os comentários do Facebook e importá-los como "
+"comentários do Wordpress"
+
+#: inc-cl/fb.php:187
+msgid "Import Facebook Comments"
+msgstr "Importar os Comentários do Facebook"
+
+#: inc-cl/fb.php:190 inc-cl/tw.php:97
+msgid "Auto-approve imported comments"
+msgstr "Aprovar automaticamente os Comentários importados"
+
+#: inc-cl/fb.php:192 inc-cl/tw.php:98
+msgid "Please activate the \"Comments Import\" from SNAP Settings Tab"
+msgstr ""
+"Por favor, ative o \"Importar Comentários\" na Guia de Configurações do SNAP"
+
+#: inc-cl/fb.php:266
+msgid "Repost to Facebook"
+msgstr "Republicar no Facebook"
+
+#: inc-cl/fb.php:268
+msgid "Import Comments from Facebook"
+msgstr "Importar os Comentários do Facebook"
+
+#: inc-cl/fb.php:298 inc-cl/gp.php:195 inc-cl/rd.php:204 inc-cl/vk.php:254
+msgid "Post Type:"
+msgstr "Tipo de Publicação:"
+
+#: inc-cl/fb.php:303 inc-cl/gp.php:201 inc-cl/vk.php:259
+msgid "Text Post with \"attached\" blogpost"
+msgstr "Texto da Publicação com Post do Blog \"anexado\""
+
+#: inc-cl/fb.php:305 inc-cl/vk.php:113
+msgid "Link attachment type:"
+msgstr "Tipo de Link do Anexo"
+
+#: inc-cl/fb.php:367 inc-cl/tw.php:228
+msgid "%d comment has been imported."
+msgstr "%d Comentário(s) importado(s)"
+
+#: inc-cl/ff.php:67
+msgid "Attach Image to FriendFeed Post"
+msgstr "Anexar imagem à Publicação do FriendFeed"
+
+#: inc-cl/ff.php:135
+msgid "Repost to FriendFeed"
+msgstr "Republicar no FriendFeed"
+
+#: inc-cl/gp.php:38
+msgid "Google+ API Library not found"
+msgstr "Biblioteca de API do Google+ não encontrada"
+
+#: inc-cl/gp.php:39
+msgid "Google+ doesn't have a built-in API for automated posts yet."
+msgstr "Google ainda não tem uma API inserida para mensagens automatizadas."
+
+#: inc-cl/gp.php:39
+msgid ""
+"The current <a target=\"_blank\" href=\"http://developers.google.com/+/api/"
+"\">Google+ API</a> is \"Read Only\" and can't be used for posting.  <br/><br/"
+">You need to get a special <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/google-plus-automated-posting\"><b>API Library Module</b></"
+"a> to be able to publish your content to Google+."
+msgstr ""
+"A atual <a target=\"_blank\" href=\"http://developers.google.com/+/api/"
+"\">API Google+ </a> está configurada como \"Somente leitura\" não pode ser "
+"usada para a publicação. <br/><br/>Você precisa ter uma <a target=\"_blank\" "
+"href=\"http://www.nextscripts.com/google-plus-automated-posting"
+"\"><b>Biblioteca ou módulo de API especial</b></a> para poder publicar o seu "
+"conteúdo no Google+"
+
+#: inc-cl/gp.php:57
+msgid "Leave Empty to publish to your profile or community"
+msgstr "Deixar vazio para publicar no seu perfil ou comunidade"
+
+#: inc-cl/gp.php:58
+msgid "Leave Empty to publish to your profile or community."
+msgstr "Deixar vazio para publicar no seu perfil ou comunidade."
+
+#: inc-cl/gp.php:61 inc-cl/gp.php:62
+msgid "Leave Empty to publish to your profile or page"
+msgstr "Deixar vazio para publicar em seu perfil ou página"
+
+#: inc-cl/gp.php:65
+msgid "Retrieve Categories and Page Names"
+msgstr "Recuperar Categorias e Nomes de Página"
+
+#: inc-cl/gp.php:95
+msgid "Google+ Image Post"
+msgstr "Imagem da Publicação no Google+"
+
+#: inc-cl/gp.php:96
+msgid "Add blogpost to Google+ message as an attachment"
+msgstr "Adicionar Post do Blog para publicar no Google+ como um anexo"
+
+#: inc-cl/gp.php:97 inc-cl/gp.php:202
+msgid "Google+ Post Types"
+msgstr "Tipos de Publicação para o Google+"
+
+#: inc-cl/gp.php:170
+msgid "Repost to Google+"
+msgstr "Republicar no Google+"
+
+#: inc-cl/gp.php:185
+msgid "Autopost has been schedulled for"
+msgstr "Publicação Automática está programada para"
+
+#: inc-cl/gp.php:200
+msgid "Post to Google+ as \"Image post\""
+msgstr "Publicar no Google+ como \"Imagem do Post\""
+
+#: inc-cl/ip.php:133
+msgid "Repost to Instapaper"
+msgstr "Republicar no Instapaper"
+
+#: inc-cl/li.php:187
+msgid "Message title Format (Groups Only)"
+msgstr "Formato de Título da Publicação (Apenas para grupos)"
+
+#: inc-cl/li.php:273
+msgid "Repost to LinkedIn"
+msgstr "Republicar no LinkedIn"
+
+#: inc-cl/li.php:302
+msgid "Title Format (Groups Only):"
+msgstr "Formato do Título (Apenas para grupos):"
+
+#: inc-cl/lj.php:38
+msgid "You can setup LiveJournal blog."
+msgstr "Você pode configurar o blog no LiveJournal."
+
+#: inc-cl/lj.php:68
+msgid "Post Title and Post Text Formats"
+msgstr "Título e Formatos de Texto da Publicação "
+
+#: inc-cl/lj.php:82
+msgid "Post with tags."
+msgstr "Publicação com Tags"
+
+#: inc-cl/lj.php:82
+msgid "Tags from the blogpost will be auto posted to LiveJournal"
+msgstr "Tags do blogpost serão Publicadas Automáticamente para o LiveJournal"
+
+#: inc-cl/lj.php:150
+msgid "Repost to LiveJournal"
+msgstr "Republicar no LiveJournal"
+
+#: inc-cl/pk.php:199
+msgid "Repost to Plurk"
+msgstr "Republicar no Plurk"
+
+#: inc-cl/pn.php:87
+msgid "If post has a video use it instead of image"
+msgstr "Se a Publicação tem um vídeo, usá-lo em vez da imagem"
+
+#: inc-cl/pn.php:87
+msgid ""
+"Video will be pinned instead of featured image. Only Youtube is supported at "
+"this time."
+msgstr ""
+"O vídeo será usado em vez da imagem em destaque anexa. Apenas Youtube é "
+"suportado neste momento."
+
+#: inc-cl/pn.php:167
+msgid "Repost to Pinterest"
+msgstr "Republicar no Pinterest"
+
+#: inc-cl/pn.php:197
+msgid "Text Message Format:"
+msgstr "Formato do Texto da Mensagem:"
+
+#: inc-cl/rd.php:39
+msgid "Reddit API Library not found"
+msgstr "Biblioteca de API do Reddit não foi encontrada"
+
+#: inc-cl/rd.php:40
+msgid "Reddit doesn't have a built-in API for automated posts yet."
+msgstr "Reddit ainda não tem uma API inserida para mensagens automatizadas."
+
+#: inc-cl/rd.php:40
+msgid ""
+"<br/>You need to get a special <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/reddit-automated-posting\"><b>API Library Module</b></a> to "
+"be able to publish your content to Reddit."
+msgstr ""
+"<br/>Você precisa ter um<a target=\"_blank\" href=\"http://www.nextscripts."
+"com/reddit-automated-posting\"><b> Módulo de Livraria API </b></a>especial "
+"para poder publicar o seu conteúdo para o Reddit."
+
+#: inc-cl/rd.php:85 inc-cl/rd.php:205
+msgid "Link Post"
+msgstr "Link da Publicação"
+
+#: inc-cl/rd.php:87
+msgid "set the text format below"
+msgstr "definir o formato de texto abaixo"
+
+#: inc-cl/rd.php:178
+msgid "Repost to Reddit"
+msgstr "Republicar no Blogger"
+
+#: inc-cl/su.php:153
+msgid "Repost to StumbleUpon"
+msgstr "Republicar no StumbleUpon"
+
+#: inc-cl/tr.php:225
+msgid "Repost to Tumblr"
+msgstr "Republicar no Tumblr"
+
+#: inc-cl/tr.php:248
+msgid "Text Post. Title Format:"
+msgstr "Texto da Publicação. Formato do Título:"
+
+#: inc-cl/tw.php:60
+msgid "Attach Image to Twitter Post"
+msgstr "Anexar a imagem ao Post do Twitter"
+
+#: inc-cl/tw.php:79
+msgid "Only selected categories will be autoposted to this account."
+msgstr ""
+"Apenas as Categorias selecionadas terão as Publicadas Automáticas para esta "
+"conta"
+
+#: inc-cl/tw.php:89
+msgid "Auto Import of Replies and Mentions:"
+msgstr "Importação Automática de Respostas e Menções:"
+
+#: inc-cl/tw.php:91
+msgid ""
+"Plugin could grab Replies and Mentions from Twitter and import them as "
+"Wordpress Comments"
+msgstr ""
+"O Plugin pode pegar as Respostas e Menções do Twitter e importá-las como "
+"Comentários do Wordpress"
+
+#: inc-cl/tw.php:93
+msgid "Import Twitter Replies"
+msgstr "Importar Respostas do Twitter"
+
+#: inc-cl/tw.php:95
+msgid "Import Twitter Mentions"
+msgstr "Importar Menções do Twitter"
+
+#: inc-cl/tw.php:148
+msgid "autopost to"
+msgstr "Publicar Automaticamente em"
+
+#: inc-cl/tw.php:151
+msgid "Repost to Twitter"
+msgstr "Republicar no Twitter"
+
+#: inc-cl/tw.php:154
+msgid "Import Replies/Mentions from Twitter"
+msgstr "Importar Respostas/Menções do Twitter"
+
+#: inc-cl/vb.php:149
+msgid "Repost to vBulletin"
+msgstr "Republicar no vBulletin"
+
+#: inc-cl/vk.php:59
+msgid "Could be your vKontakte(VK) Profile or vKontakte(VK) Group Page"
+msgstr "Poderia ser seu Perfil vKontakte(VK) ou Página de Grupo vKontakte(VK) "
+
+#: inc-cl/vk.php:62
+msgid "(It could be used for \"Text\" and \"Image\" posts)"
+msgstr "(Poderia ser usado para \"Texto\" e \"Imagem\" publicadas)"
+
+#: inc-cl/vk.php:66
+msgid "[Create VK App]"
+msgstr "[Criar Aplicativos VK]"
+
+#: inc-cl/vk.php:66
+msgid "[Manage VK Apps]"
+msgstr "[Gerenciar Aplicativos VK]"
+
+#: inc-cl/vk.php:70
+msgid ""
+"<b>Authorize Your vKontakte(VK) Account</b>. Please click \"Update Settings"
+"\" to be able to Authorize your account."
+msgstr ""
+"<b>Autorizar a Conta vKontakte(VK)</ b>. Por favor, clique em \"Atualizar "
+"Configurações\" para poder autorizar sua conta."
+
+#: inc-cl/vk.php:72
+msgid "Your vKontakte(VK) Account has been authorized."
+msgstr "Sua Conta vKontakte(VK) foi autorizada."
+
+#: inc-cl/vk.php:83
+msgid "(It could be used for \"Text with attached link\" posts)"
+msgstr "(Poderia ser usado como \"Texto com Link Anexado\" para publicação)"
+
+#: inc-cl/vk.php:92
+msgid "Please upgrade the plugin to \"PRO\" get NextScripts VK API"
+msgstr ""
+"Por favor, atualize o Plugin para a versão \"Pro\" do API NextScripts VK"
+
+#: inc-cl/vk.php:103 inc-cl/vk.php:251
+msgid "Add backlink to the post"
+msgstr "Adicionar Link de Retorno (backlink) para a Publicação"
+
+#: inc-cl/vk.php:115
+msgid ""
+"<strong>If post has video use it as an attachment thumbnail.</strong> "
+"<i>Video will be used for an attachment thumbnail instead of featured image. "
+"Only Youtube is supported at this time.</i>"
+msgstr ""
+"<strong>Se a Publicação tem um vídeo de anexo.</strong> <i>Ele será usado "
+"como miniatura em vez da imagem anexa em destaque. Apenas Youtube é "
+"suportado</i>"
+
+#: inc-cl/vk.php:118
+msgid "Attachment Text Format:"
+msgstr "Formato de Texto do Anexo?"
+
+#: inc-cl/vk.php:121
+msgid "Set your own format:"
+msgstr "Defina o seu próprio formato:"
+
+#: inc-cl/vk.php:228
+msgid "Repost to vKontakte(VK)"
+msgstr "Republicar no vKontakte(VK)"
+
+#: inc-cl/vk.php:260
+msgid "Post Types"
+msgstr "Tipos de Publicação"
+
+#: inc-cl/wp.php:144
+msgid "Repost to WP Blog"
+msgstr "Republicar em Blog WP"
+
+#: inc-cl/yt.php:38
+msgid "YouTube API Library not found"
+msgstr "Biblioteca de API do YouTube não encontrada"
+
+#: inc-cl/yt.php:39
+msgid "YouTube doesn't have a built-in API for automated posts yet."
+msgstr ""
+"O YouTube ainda não tem uma API inserida para Publicações Automatizadas."
+
+#: inc-cl/yt.php:39
+msgid ""
+"The current <a target=\"_blank\" href=\"http://developers.google.com/+/api/"
+"\">YouTube API</a> is \"Read Only\" and can't be used for posting.  <br/><br/"
+">You need to get a special <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/google-plus-automated-posting\"><b>API Library Module</b></"
+"a> to be able to publish your content to YouTube."
+msgstr ""
+"A atual <a target=\"_blank\" href=\"http://developers.google.com/+/api/"
+"\">API Google+ </a> está configurada como \"Somente leitura\" não pode ser "
+"usada para a publicação. <br/><br/>Você precisa ter uma <a target=\"_blank\" "
+"href=\"http://www.nextscripts.com/google-plus-automated-posting"
+"\"><b>Biblioteca ou módulo de API especial</b></a> para poder publicar o seu "
+"conteúdo no Google+"
+
+#: inc-cl/yt.php:71
+msgid "New post: %TITLE% - %URL%"
+msgstr "Nova Publicação: %TITLE% - %URL%"
+
+#: inc-cl/yt.php:138
+msgid "Repost to YouTube"
+msgstr "Republicar no YouTube"
+
+#: nxs_functions.php:284
+msgid "Wrong key, please contact support"
+msgstr "Chave errada, por favor, contacte o suporte"
+
+#: nxs_functions.php:390
+msgid "Inserts the Title of the post"
+msgstr "Inserir o Título da sua Publicação"
+
+#: nxs_functions.php:390
+msgid "Inserts the URL of the post"
+msgstr "Inserir o URL da sua Publicação"
+
+#: nxs_functions.php:390
+msgid "Inserts the <b>shortened URL</b> of your post"
+msgstr "Inserir o <b>URL Curto</b> da sua Publicação"
+
+#: nxs_functions.php:390
+msgid "Inserts the featured image URL"
+msgstr "Inserir o URL da imagem de destaque"
+
+#: nxs_functions.php:390
+msgid "Inserts the excerpt of the post (processed)"
+msgstr "Inserir o Resumo da sua Publicação (processada)"
+
+#: nxs_functions.php:390
+msgid "Inserts the excerpt of the post (as typed)"
+msgstr "Inserir o Resumo da Publicação (como digitado)"
+
+#: nxs_functions.php:390
+msgid ""
+"Inserts the text till the &lt;!--more--&gt; tag or first N words of the post"
+msgstr ""
+"Inserir o Texto até a marcação &lt;!--more--&gt; ou as primeiras \"X\" "
+"palavras da Publicação"
+
+#: nxs_functions.php:390
+msgid "Inserts the processed body(text) of the post"
+msgstr "Inserir o Conteúdo (texto) processado da Publicação"
+
+#: nxs_functions.php:390
+msgid "Inserts the body(text) of the post as typed"
+msgstr "Inserir o Corpo (texto) processado da Publicação"
+
+#: nxs_functions.php:390
+msgid "Inserts post tags"
+msgstr "Inserir as Tags da Publicação"
+
+#: nxs_functions.php:390
+msgid "Inserts post categories"
+msgstr "Inserir a Categoria da Publicação"
+
+#: nxs_functions.php:390
+msgid "Inserts post tags as hashtags"
+msgstr "Inserir as Tags e \"hashtags\" da Publicação"
+
+#: nxs_functions.php:390
+msgid "Inserts post categories as hashtags"
+msgstr "Inserir as \"hashtags\" das Categorias da Publicação"
+
+#: nxs_functions.php:390
+msgid "Inserts the author's name"
+msgstr "Inserir o Nome do Autor"
+
+#: nxs_functions.php:390
+msgid "Inserts the the Blog/Site name"
+msgstr "Inserir o Nome do Blog/Site"
+
+#: nxs_functions.php:394
+msgid ""
+"You already have %s configured.  This plugin supports only one %s account. "
+"<br/><br/> Please consider getting <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts"
+"\">Multiple Accounts Edition</a> if you would like to add another %s account "
+"for auto-posting."
+msgstr ""
+"Você já tem %s configurado. Este plugin suporta apenas uma %s Conta. <br/"
+"><br/> Por favor considerar a obtenção de <a target=\"_blank\" href=\"http://"
+"www.nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts"
+"\">Edição para Múltiplas Contas</a> Se você quiser adicionar %s contas de "
+"auto-publicações."
+
+#: nxs_functions.php:674
+msgid "Image(s) to use:"
+msgstr "Imagem(ns) a serem utilizadas:"
+
+#: nxs_functions.php:676
+msgid "Show all"
+msgstr "Mostrar tudo"
+
+#: nxs_functions.php:684
+msgid "URL to use:"
+msgstr "URL a ser utilizado:"
+
+#: nxs_functions.php:685
+msgid "Post URL or globally defined URL will be used"
+msgstr "URL da Publicação ou o URL definido globalmente a ser utilizada"
+
+#: nxs_functions.php:689
+msgid ""
+"This will trigger \"Network will decide attachment info\". Image and other "
+"settings will be ignored."
+msgstr ""
+"Isso fará com que a \"Rede Social defina as informações anexadas\". Imagens "
+"e outras configurações serão ignoradas."
+
+#: nxs_functions.php:744
+msgid "Auto Reposting"
+msgstr "Rapublicar Automaticamente:"
+
+#: nxs_functions.php:744
+msgid "[Instructions]"
+msgstr "[Instruções]"
+
+#: nxs_functions.php:747
+msgid "Plugin could autorepost existing posts"
+msgstr "O Plugin pode Republicar Automaticamente as Publicações existentes"
+
+#: nxs_functions.php:749
+msgid "Repost existing posts every"
+msgstr "Republicar as Publicações existentes"
+
+#: nxs_functions.php:751 nxs_functions.php:786 nxs_functions.php:787
+msgid "Days"
+msgstr "Dias"
+
+#: nxs_functions.php:752
+msgid "Hours"
+msgstr "Horas"
+
+#: nxs_functions.php:760
+msgid "Repost ONLY previously unautoposted posts"
+msgstr "Repubplicar SÓ as Publicações anteriormente não publicadas"
+
+#: nxs_functions.php:764
+msgid "Repost: (Choose Posts, Pages, Custom Post Types)"
+msgstr ""
+"Republicar (Escolha Publicações \"Posts\", Páginas, Tipos de Publicações "
+"Personalizadas)"
+
+#: nxs_functions.php:774
+msgid "Get posts"
+msgstr "Receber Publicações"
+
+#: nxs_functions.php:782
+msgid "from"
+msgstr "de"
+
+#: nxs_functions.php:783
+msgid "to"
+msgstr "para"
+
+#: nxs_functions.php:786
+msgid "Older then"
+msgstr "Mais antigos"
+
+#: nxs_functions.php:787
+msgid "and Newer then"
+msgstr "e mais recente"
+
+#: nxs_functions.php:794
+msgid "[Set All Existing Posts to \"Enabled for Repost\"]"
+msgstr ""
+"[Definir todas as Publicações Existentes como \"Habilitadas\" para "
+"Republicar]"
+
+#: nxs_functions.php:795
+msgid "[Set All Existing Posts to \"Disabled for Repost\"]"
+msgstr ""
+"[Definir todas as Publicações Existentes como \"Desabilitadas\" para "
+"Republicar]"
+
+#: nxs_functions.php:798
+msgid "Last post"
+msgstr "Última Publicação"
+
+#: nxs_functions.php:798
+msgid "was re-posted on:"
+msgstr "Republicado em:"
+
+#: nxs_functions.php:799
+msgid "Next post will be ~"
+msgstr "Próxima Publicação será ~"
+
+#: nxs_functions.php:800
+msgid "[Reset]"
+msgstr "[Redefinir]"
+
+#: nxs_functions.php:802
+msgid "Set \"Last re-posted post ID\" to:"
+msgstr "Dfinir \"ID da Última Republicação\" para:"
+
+#: nxs_functions.php:803
+msgid "[Set]"
+msgstr "[Definir]"
+
+#~ msgid "Submit Test Post to Complete"
+#~ msgstr "Enviar Publicação de teste para completar"
+
+#~ msgid "OK - Message Posted, please see your Facebook Page"
+#~ msgstr "OK - mensagem publicada, por favor, consulte sua Página no Facebook"
+
+#~ msgid "OK - Message Posted, please see your Google+ Page"
+#~ msgstr "OK - mensagem publicada, por favor, consulte sua Página no Google+"
+
+#~ msgid "mage Post"
+#~ msgstr "Publicação Curinga"
+
+#~ msgid "NextScripts: Social Networks Auto-Poster"
+#~ msgstr "NextScripts: Social Networks Auto-Poster"
+
+#~ msgid "http://www.nextscripts.com/social-networks-auto-poster-for-wordpress"
+#~ msgstr ""
+#~ "http://www.nextscripts.com/social-networks-auto-poster-for-wordpress"
+
+#~ msgid ""
+#~ "This plugin automatically publishes posts from your blog to multiple "
+#~ "accounts on Facebook, Twitter, and Google+ profiles and/or pages."
+#~ msgstr ""
+#~ "Este plugin publica automaticamente Posts, Perfis e/ou Páginas do seu "
+#~ "Blog/Site para várias contas no Facebook, Twitter, Google+."
+
+#~ msgid "Next Scripts"
+#~ msgstr "Próximos Scripts"
+
+#~ msgid "http://www.nextscripts.com"
+#~ msgstr "http://www.nextscripts.com"
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-ru_RU.mo b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-ru_RU.mo
new file mode 100644 (file)
index 0000000..0d1f14e
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-ru_RU.mo differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-ru_RU.po b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-ru_RU.po
new file mode 100644 (file)
index 0000000..7c9382f
--- /dev/null
@@ -0,0 +1,1662 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: SNAP\n"
+"POT-Creation-Date: 2013-10-29 17:35-0500\n"
+"PO-Revision-Date: 2013-11-18 14:04-0500\n"
+"Last-Translator: Mike <mike@okapy.net>\n"
+"Language-Team: \n"
+"Language: Russian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.5.7\n"
+
+#: NextScripts_SNAP.php:269 inc/nxs_snap_class.php:219
+msgid "Settings"
+msgstr "Настройки"
+
+#: NextScripts_SNAP.php:360
+msgid "NXS Reposter"
+msgstr "NXS Reposter"
+
+#: nxs_functions.php:283
+msgid "Wrong key, please contact support"
+msgstr "Неправильный ключ, пожалуйста, обратитесь в службу поддержки"
+
+#: nxs_functions.php:389
+msgid "Inserts the Title of the post"
+msgstr "Вставляет Название записи"
+
+#: nxs_functions.php:389
+msgid "Inserts the URL of the post"
+msgstr "Вставляет ссылку на запись"
+
+#: nxs_functions.php:389
+msgid "Inserts the <b>shortened URL</b> of your post"
+msgstr "Вставляет <b>короткую ссылку<b> вашей записи"
+
+#: nxs_functions.php:389
+msgid "Inserts the featured image URL"
+msgstr "Вставляет ссылку на миниатюру записи"
+
+#: nxs_functions.php:389
+msgid "Inserts the excerpt of the post (processed)"
+msgstr "Вставляет цитату поста (преобразованную)"
+
+#: nxs_functions.php:389
+msgid "Inserts the excerpt of the post (as typed)"
+msgstr "Вставляет цитату поста (непреобразованную)"
+
+#: nxs_functions.php:389
+msgid ""
+"Inserts the text till the &lt;!--more--&gt; tag or first N words of the post"
+msgstr "Вставляет текст до тега &lt;!--more--&gt; или первые N слов записи"
+
+#: nxs_functions.php:389
+msgid "Inserts the processed body(text) of the post"
+msgstr "Вставляет преоразованный текст записи"
+
+#: nxs_functions.php:389
+msgid "Inserts the body(text) of the post as typed"
+msgstr "Вставляет текст непреобразованной записи"
+
+#: nxs_functions.php:389
+msgid "Inserts post tags"
+msgstr "Вставляет таги записи"
+
+#: nxs_functions.php:389
+msgid "Inserts post categories"
+msgstr "Вставляет категории записи"
+
+#: nxs_functions.php:389
+msgid "Inserts post tags as hashtags"
+msgstr "Вставляет таги записи в виде hashtags"
+
+#: nxs_functions.php:389
+msgid "Inserts post categories as hashtags"
+msgstr "Вставляет категории записи в виде hashtags"
+
+#: nxs_functions.php:389
+msgid "Inserts the author's name"
+msgstr "Вставляет имя автора"
+
+#: nxs_functions.php:389
+msgid "Inserts the the Blog/Site name"
+msgstr "Вставляет имя Блога/сайта"
+
+#: nxs_functions.php:393
+#, php-format
+msgid ""
+"You already have %s configured.  This plugin supports only one %s account. "
+"<br/><br/> Please consider getting <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts"
+"\">Multiple Accounts Edition</a> if you would like to add another %s account "
+"for auto-posting."
+msgstr ""
+"У вас уже %s сконфигурирован. Этот плагин поддерживает только один %s  "
+"аккаунт. <br/><br/> Чтобы добавить дополнительные аккаунты в авто-постер, "
+"Вам необходимо приобрести <a target=\"_blank\" href=\"http://www.nextscripts."
+"com/social-networks-auto-poster-for-wp-multiple-accounts\">Multiple Accounts "
+"Edition</a> %s"
+
+#: nxs_functions.php:481 inc-cl/da.php:96 inc-cl/rd.php:108
+msgid "Posting Delay"
+msgstr "Задержка размещения"
+
+#: nxs_functions.php:673
+msgid "Image(s) to use:"
+msgstr "Картинка(и) для использования "
+
+#: nxs_functions.php:674 nxs_functions.php:684 inc/nxs_snap_class.php:827
+#: inc-cl/fb.php:135 inc-cl/li.php:179 inc-cl/vk.php:119
+msgid "Auto"
+msgstr "авто"
+
+#: nxs_functions.php:675
+msgid "Show all"
+msgstr "Показать все"
+
+#: nxs_functions.php:683
+msgid "URL to use:"
+msgstr "Ссылка для использования:"
+
+#: nxs_functions.php:684
+msgid "Post URL or globally defined URL will be used"
+msgstr ""
+"Вставьте ссылку или будет использована ссылка, определенная в настройках"
+
+#: nxs_functions.php:687 inc/nxs_snap_class.php:830
+msgid "URL:"
+msgstr "Ссылка:"
+
+#: nxs_functions.php:688
+msgid ""
+"This will trigger \"Network will decide attachment info\". Image and other "
+"settings will be ignored."
+msgstr ""
+"Это запустит \"Network will decide attachment info\". Картинка и другие "
+"настройки не будут использованы."
+
+#: nxs_functions.php:733
+msgid "Auto Reposting"
+msgstr "Автоматический перепост"
+
+#: nxs_functions.php:733
+msgid "[Instructions]"
+msgstr "[Инструкции]"
+
+#: nxs_functions.php:736
+msgid "Plugin could autorepost existing posts"
+msgstr "Плагин может автоматически делать перепост существующей записи"
+
+#: nxs_functions.php:738
+msgid "Repost existing posts every"
+msgstr "Делать перепост существующей записи каждые"
+
+#: nxs_functions.php:740 nxs_functions.php:764 nxs_functions.php:765
+msgid "Days"
+msgstr "Дней"
+
+#: nxs_functions.php:741
+msgid "Hours"
+msgstr "Часов"
+
+#: nxs_functions.php:742 nxs_functions.php:746 inc/nxs_snap_class.php:307
+msgid "Minutes"
+msgstr "Минут"
+
+#: nxs_functions.php:745 inc/nxs_snap_class.php:306
+msgid "Randomize posting time &#177;"
+msgstr "Размещать случайным образом &#177;"
+
+#: nxs_functions.php:749
+msgid "Repost ONLY previously unautoposted posts"
+msgstr ""
+"Делать перепост ТОЛЬКО те записи, которые не были размещены автоматически"
+
+#: nxs_functions.php:752
+msgid "Get posts"
+msgstr "Получить записи"
+
+#: nxs_functions.php:760
+msgid "from"
+msgstr "от"
+
+#: nxs_functions.php:761
+msgid "to"
+msgstr "к"
+
+#: nxs_functions.php:764
+msgid "Older then"
+msgstr "более поздние чем"
+
+#: nxs_functions.php:765
+msgid "and Newer then"
+msgstr "и более ранние чем"
+
+#: nxs_functions.php:772
+msgid "[Set All Existing Posts to \"Enabled for Repost\"]"
+msgstr "[сделать все существующие записи \"Разрешенными для Перепоста\"]"
+
+#: nxs_functions.php:773
+msgid "[Set All Existing Posts to \"Disabled for Repost\"]"
+msgstr "[сделать все существующие записи \"Неразрешенными для Перепоста\"]"
+
+#: nxs_functions.php:776
+msgid "Last post"
+msgstr "Последняя запись"
+
+#: nxs_functions.php:776
+msgid "was re-posted on:"
+msgstr "был перепощен:"
+
+#: nxs_functions.php:777
+msgid "Next post will be ~"
+msgstr "Следующая запись будет ~"
+
+#: nxs_functions.php:778
+msgid "[Reset]"
+msgstr "[Reset]"
+
+#: nxs_functions.php:780
+msgid "Set \"Last re-posted post ID\" to:"
+msgstr "Установить \"ID последней записи для перепоста \" на:"
+
+#: nxs_functions.php:781
+msgid "[Set]"
+msgstr "[Установить]"
+
+#: inc/nxs_functions_adv.php:90 inc/nxs_functions_adv.php:91
+msgid "N/A"
+msgstr "N/A"
+
+#: inc/nxs_functions_adv.php:90 inc/nxs_functions_adv.php:91
+msgid " MByte"
+msgstr " MByte"
+
+#: inc/nxs_functions_adv.php:92
+msgid "PHP Version"
+msgstr "PHP Version"
+
+#: inc/nxs_functions_adv.php:93
+msgid "Memory limit"
+msgstr "Ограничение памяти"
+
+#: inc/nxs_functions_adv.php:94
+msgid "Memory usage"
+msgstr "Количество использованной памяти"
+
+#: inc/nxs_snap_class.php:200
+msgid "Settings Updated."
+msgstr "Настройки обновлены."
+
+#: inc/nxs_snap_class.php:244 inc-cl/ap.php:109 inc-cl/bg.php:98
+#: inc-cl/da.php:92 inc-cl/di.php:94 inc-cl/dl.php:86 inc-cl/fb.php:176
+#: inc-cl/ff.php:85 inc-cl/gp.php:114 inc-cl/ip.php:86 inc-cl/li.php:212
+#: inc-cl/lj.php:96 inc-cl/pk.php:140 inc-cl/pn.php:113 inc-cl/rd.php:104
+#: inc-cl/su.php:99 inc-cl/tr.php:159 inc-cl/vb.php:99 inc-cl/vk.php:145
+#: inc-cl/wp.php:96 inc-cl/yt.php:89
+msgid "Only selected categories will be autoposted to this account"
+msgstr "Только выбранные категории будут авторазмещены на этом аккаунте"
+
+#: inc/nxs_snap_class.php:245
+msgid "Reposter is activated for this account"
+msgstr "Перепост активирован для этого аккаунта"
+
+#: inc/nxs_snap_class.php:262 inc/nxs_snap_class.php:268
+msgid "Import Settings"
+msgstr "Импортировать настройки"
+
+#: inc/nxs_snap_class.php:267
+msgid "Export Settings"
+msgstr "Экспортировать настройки"
+
+#: inc/nxs_snap_class.php:271 inc/nxs_snap_class.php:587 inc-cl/ap.php:118
+#: inc-cl/bg.php:109 inc-cl/da.php:106 inc-cl/di.php:105 inc-cl/dl.php:97
+#: inc-cl/fb.php:202 inc-cl/ff.php:96 inc-cl/gp.php:125 inc-cl/ip.php:97
+#: inc-cl/li.php:223 inc-cl/lj.php:107 inc-cl/pk.php:151 inc-cl/pn.php:124
+#: inc-cl/rd.php:118 inc-cl/su.php:110 inc-cl/tr.php:170 inc-cl/tw.php:105
+#: inc-cl/vb.php:110 inc-cl/vk.php:156 inc-cl/wp.php:107 inc-cl/yt.php:100
+msgid "Update Settings"
+msgstr "Обновить настройки"
+
+#: inc/nxs_snap_class.php:282
+msgid "How to make auto-posts?"
+msgstr "Как сделать авто-записи?"
+
+#: inc/nxs_snap_class.php:282 inc-cl/fb.php:108 inc-cl/fb.php:117
+#: inc-cl/fb.php:125 inc-cl/fb.php:299 inc-cl/fb.php:303 inc-cl/gp.php:88
+#: inc-cl/gp.php:196 inc-cl/vk.php:106 inc-cl/vk.php:255
+msgid "What's the difference?"
+msgstr "В чем разница?"
+
+#: inc/nxs_snap_class.php:284
+msgid "The difference between \"Immediately\" and \"Scheduled\""
+msgstr "Разница между \"Немедленно\" and \"Запланированно\""
+
+#: inc/nxs_snap_class.php:285
+msgid ""
+"<b>\"Immediately\"</b> - Once you click \"Publish\" button plugin starts "
+"pushing your update to configured social networks. At this time you need to "
+"wait and look at the turning circle. Some APIs are pretty slow, so you have "
+"to wait and wait and wait until all updates are posted and page released "
+"back to you."
+msgstr ""
+"<b>\"Немедленно\"</b> - После нажатия кнопки \"Опубликовать\"б плагин "
+"начинает размещать ваши обновления на настроенные социальные сети. В это "
+"время вам необходимо ждать и смотреть на крутящийся кружок. Некоторые API "
+"довольно медленные, поэтому вам придется ждать, ждать и ждать, пока все "
+"обновления не разместятся, и страница не вернется для использования."
+
+#: inc/nxs_snap_class.php:286
+msgid ""
+"<b>\"Scheduled\"</b> - Releases the page immediately back to you, so you can "
+"proceed with something else and it schedules all auto-posting jobs to your "
+"WP-Cron. This is much faster and much more efficient, but it could not work "
+"if your WP-Cron is disabled or broken."
+msgstr ""
+"<b>\"Запланированно\"</b> - Возвращает страницу для использования "
+"немедленно, таким образом у вас есть возможность продолжать работу, "
+"поскольку все авторазмещения будут сделаны вашим WP-Cron. Этот способ более "
+"эргономичный, но он не будет работать, если ваш WP-Cron отключен или сломан. "
+
+#: inc/nxs_snap_class.php:290
+msgid "Publish Immediately"
+msgstr "Разместить немедленно"
+
+#: inc/nxs_snap_class.php:290
+msgid ""
+"No WP Cron will be used. Choose if WP Cron is disabled or broken on your "
+"website"
+msgstr ""
+"WP Cron не будет использован. Выбрать, если WP Cron отключен или слобман на "
+"вашем сайте"
+
+#: inc/nxs_snap_class.php:294
+msgid "Use WP Cron to Schedule autoposts"
+msgstr "Использовать WP Cron для планирования авторазмещений"
+
+#: inc/nxs_snap_class.php:294
+msgid ""
+"Recommended for most sites. Faster Performance - requires working WP Cron"
+msgstr ""
+"Рекомендуется для большинства сайтов. Для наиболее быстрой работы необходим "
+"работающий WP Cron"
+
+#: inc/nxs_snap_class.php:299
+msgid "Proper setup for WP Cron is REQURED for this feature to work."
+msgstr "Правильная настройка WP Cron необходима, чтобы это работало"
+
+#: inc/nxs_snap_class.php:299
+msgid "Please see here for the proper WP Cron setup tutorial"
+msgstr "Смотрите здесь как правильно настроить WP Cron "
+
+#: inc/nxs_snap_class.php:300
+msgid "Limit autoposting speed"
+msgstr "ограничить скорость авторазмещения"
+
+#: inc/nxs_snap_class.php:300
+msgid "Recommended for busy sites with a lot of new posts."
+msgstr "Рекомендовано для занятых сайтов со множеством новых записей."
+
+#: inc/nxs_snap_class.php:311
+msgid ""
+"What to do with the rest of the posts if there are more posts then daily "
+"limit?"
+msgstr ""
+"Что делать с остальными записями, если записей больше чем дневной лимит?"
+
+#: inc/nxs_snap_class.php:312
+msgid "Skip/Discard/Don't Autopost "
+msgstr "Пропустить/Удалить/Не размещать"
+
+#: inc/nxs_snap_class.php:313
+msgid "Schedule for tomorrow"
+msgstr "Запланировать на завтра"
+
+#: inc/nxs_snap_class.php:313
+msgid "Not recommended, may cause significant delays"
+msgstr "Не рекомендуется, может послужить причиной серьезных задержек"
+
+#: inc/nxs_snap_class.php:322
+msgid "User Privileges/Security"
+msgstr "Привелегии пользователя/Безопасность"
+
+#: inc/nxs_snap_class.php:326
+msgid "Skip User Security Verification."
+msgstr "Пропустить проверку настроек безопасности пользователя."
+
+#: inc/nxs_snap_class.php:327
+msgid ""
+"NOT Recommended, but useful in some situations. This will allow autoposting "
+"for everyone even for the non-existent users."
+msgstr ""
+"Не рекомендуется, но может быть полезным в некоторых ситуациях - позволяет "
+"автопост для всех, даже несуществующих пользователей. "
+
+#: inc/nxs_snap_class.php:329
+msgid "Who can make autoposts without seeing any auto-posting options?"
+msgstr "Кто может делать автопост, не видя настроек?"
+
+#: inc/nxs_snap_class.php:344
+msgid ""
+"Who can see auto-posting options on the \"New Post\" and \"Edit Post\" pages "
+"and make autoposts?"
+msgstr ""
+"Кто может видеть возможности автопоста на страницах  \"Новая запись\" и "
+"\"Отредактировать запись\", и иметь возможность авторазмещения записей?"
+
+#: inc/nxs_snap_class.php:366
+msgid "Include/Exclude Wordpress Pages and Custom Post Types"
+msgstr "Включить/Исключить Wordpress страницы и Произвольные типы записей"
+
+#: inc/nxs_snap_class.php:369
+msgid "Use for Wordpress Pages"
+msgstr "Использовать для Wordpress страниц"
+
+#: inc/nxs_snap_class.php:370
+msgid "Show the SNAP metabox and auto-post for pages, not just posts."
+msgstr "Показать SNAP metabox и автопост для страниц, не только записей. "
+
+#: inc/nxs_snap_class.php:372
+msgid "Custom Post Types:"
+msgstr "Произвольные типы записей:"
+
+#: inc/nxs_snap_class.php:373
+msgid ""
+"Please select \"Custom Post Types\" that you would like to be autoposted to "
+"your social networks"
+msgstr ""
+"Пожалуйста, выберите \"Произвольные типы записей\" которые вы бы хотели "
+"авторазместить в ваши социальные сети"
+
+#: inc/nxs_snap_class.php:391
+msgid "Categories to Include/Exclude:"
+msgstr "Включить/Исключить категории: "
+
+#: inc/nxs_snap_class.php:392
+msgid ""
+"Each blogpost will be autoposted to all categories selected below. All "
+"categories are selected by default. \n"
+"              <b>Uncheck</b> categories that you would like <b>NOT</b> to "
+"auto-post by default. Assigning the uncheked category to the new blogpost "
+"will turn off auto-posting to all configured networks."
+msgstr ""
+"Каждая запись в блоге будет авторазмещена во всех категориях, выбранных "
+"ниже. Все категории выбраны по умолчанию. \n"
+"              <b>Отменить</b> категории, которые вы желаете <b>НЕ</b> "
+"авторазмещать по умолчанию. Выбор отмененной категории для новой записи "
+"блога выключит автопост для всех настроенных сетей. "
+
+#: inc/nxs_snap_class.php:411
+msgid "URL Shortener"
+msgstr "Укорачиватель ссылки"
+
+#: inc/nxs_snap_class.php:452
+msgid "Auto-Import comments from Social Networks"
+msgstr "Автоматически импортировать комментарии из социальных сетей"
+
+#: inc/nxs_snap_class.php:452 inc/nxs_snap_class.php:468
+msgid "New"
+msgstr "Новое"
+
+#: inc/nxs_snap_class.php:468
+msgid "Additional URL Parameters"
+msgstr "Дополнительные параметры ссылки"
+
+#: inc/nxs_snap_class.php:469
+msgid "Will be added to backlinks."
+msgstr "Будет добавлено к обратным ссылкам."
+
+#: inc/nxs_snap_class.php:471
+msgid "Additional URL Parameters:"
+msgstr "Дополнительные параметры ссылки:"
+
+#: inc/nxs_snap_class.php:473
+msgid ""
+"You can use %NTNAME% for social network name, %NTCODE% for social network "
+"two-letter code, %ACCNAME% for account name,  %POSTID% for post ID,  "
+"%POSTTITLE% for post title, %SITENAME% for website name. <b>Any text must be "
+"URL Encoded</b><br/>Example: utm_source=%NTCODE%&utm_medium=%ACCNAME"
+"%&utm_campaign=SNAP%2Bfrom%2B%SITENAME%"
+msgstr ""
+"Вы можете использовать %NTNAME% для имени социальной сети, %NTCODE% для двух-"
+"буквенного кода социальной сети, %ACCNAME% для имени аккаунта, %POSTID% для "
+"ID записи,  %POSTTITLE% для названия записи, %SITENAME% для имени сайта. "
+"<b>Любой текст должен быть в URL кодировке </b><br/>Например: utm_source="
+"%NTCODE%&utm_medium=%ACCNAME%&utm_campaign=SNAP%2Bfrom%2B%SITENAME%"
+
+#: inc/nxs_snap_class.php:477
+msgid "Auto-HashTags Settings"
+msgstr "настройка автоматических хэш-тегов"
+
+#: inc/nxs_snap_class.php:478
+msgid "How to generate hashtags if tag is longer then one word"
+msgstr "Как сгенерировать хэш-теги, если таг больше, чем одно слово"
+
+#: inc/nxs_snap_class.php:480
+msgid "Replace spaces in hashtags with "
+msgstr "Заменить пробелы в хэш-тегах с"
+
+#: inc/nxs_snap_class.php:489
+msgid "%ANNOUNCE% tag settings"
+msgstr "настройка тега %ANNOUNCE% "
+
+#: inc/nxs_snap_class.php:490
+msgid ""
+"Plugin will take text untill the &lt;!--more--&gt; tag. Please specify how "
+"many characters should it get if &lt;!--more--&gt; tag is not found"
+msgstr ""
+"Плагин возьмет текст до тега &lt;!--more--&gt;. Пожалуйста, уточните как "
+"много символов он должен взять, если тег &lt;!--more--&gt; не найден"
+
+#: inc/nxs_snap_class.php:492
+msgid "How many characters:"
+msgstr "Как много символов:"
+
+#: inc/nxs_snap_class.php:497
+msgid "\"Open Graph\" Tags"
+msgstr "\"Open Graph\" теги"
+
+#: inc/nxs_snap_class.php:498
+msgid ""
+"\"Open Graph\" tags are used for generating title, description and preview "
+"image for your Facebook and Google+ posts. This is quite simple "
+"implementation of \"Open Graph\" Tags. This option will only add tags needed "
+"for \"Auto Posting\". If you need something more serious uncheck this and "
+"use other specialized plugins."
+msgstr ""
+"\"Open Graph\" теги используются для генерирования названия, описания и "
+"картинки предпросмотра для ваших Facebook and Google+ записей. Это простое и "
+"полезное использование \"Open Graph\" тегов, т.к эта опция только добавляет "
+"теги, необходимые для \"Auto Posting\". Если вы исползуете другие "
+"специализированные плагины, отмените эту опцию."
+
+#: inc/nxs_snap_class.php:500
+msgid "Add Open Graph Tags"
+msgstr "Добавить \"Open Graph\" теги"
+
+#: inc/nxs_snap_class.php:503
+msgid "Default Image URL for og:image tag:"
+msgstr "Ссылка на артинку по умолчанию og:image tag:"
+
+#: inc/nxs_snap_class.php:508
+msgid "Advanced \"Featured\" Image Settings"
+msgstr "Расширенные  \"Featured\" настройки картинки"
+
+#: inc/nxs_snap_class.php:512
+#, php-format
+msgid ""
+"Advanced Setting. Uncheck only if you are 100% sure that your images are "
+"valid or if you have troubles with image verification."
+msgstr ""
+
+#: inc/nxs_snap_class.php:517
+msgid "Use advanced image finder"
+msgstr "Используйте расширенный поиск картинки"
+
+#: inc/nxs_snap_class.php:519
+msgid ""
+"Check this if your images could be found only in the fully processed posts. "
+"<br/>This feature could interfere with some plugins using post processing "
+"functions incorrectly. Your site could become messed up, have troubles "
+"displaying content or start giving you \"ob_start() [ref.outcontrol]: Cannot "
+"use output buffering in output buffering display handlers\" errors."
+msgstr ""
+"Отметьте, если ваша картинка может быть найдена только в полностью "
+"преобразованной записи.  <br/>Эта функция может вмешиваться в работу "
+"некотрых плагинов, которые используют преобразование записи некорректно. Ваш "
+"сайт может начать выдавать ошибки, терять контент или выдавать ошибку "
+"\"ob_start() [ref.outcontrol]: Cannot use output buffering in output "
+"buffering display handlers\"."
+
+#: inc/nxs_snap_class.php:525
+msgid "Alternative \"Featured Image\" location"
+msgstr "Альтернативное расположение  \"Миниатюры записи\" "
+
+#: inc/nxs_snap_class.php:526
+msgid ""
+"Plugin uses standard Wordpress \"Featured Image\" by default. If your theme "
+"stores \"Featured Image\" in the custom field, please enter the name of it. "
+"Use prefix if your custom field has only partial location."
+msgstr ""
+"Плагин использует стандартную версию Wordpress \"Миниатюра записи\" по "
+"умолчанию. Если ваша тема сохраняет \"Миниатюру записи\" в произвольном "
+"поле, пожалуйста, введите его имя. Используйте префикс, если ваше "
+"произвольное поле имеет только часть адреса."
+
+#: inc/nxs_snap_class.php:528
+msgid "Custom field name:"
+msgstr "Имя произвольного поля:"
+
+#: inc/nxs_snap_class.php:530
+msgid "Set the name of the custom field that contains image info"
+msgstr "Введите имя произольного поля, которое содержит информацию картинки"
+
+#: inc/nxs_snap_class.php:533
+msgid "Custom field Array Path:"
+msgstr "Путь в массиве произвольного поля:"
+
+#: inc/nxs_snap_class.php:535 inc/nxs_snap_class.php:540
+msgid "Optional"
+msgstr "Необязательное"
+
+#: inc/nxs_snap_class.php:535
+msgid ""
+"If your custom field contain an array, please enter the path to the image "
+"field. For example: ['images']['image']"
+msgstr ""
+"Если ваше произвольное поле содержит массив, пожалуйста, введите путь к "
+"картинке в этом массиве. Например:  ['images']['image']"
+
+#: inc/nxs_snap_class.php:538
+msgid "Custom field Image Prefix:"
+msgstr "Префикс произвольного поля картинки:"
+
+#: inc/nxs_snap_class.php:540
+msgid ""
+"If your custom field contain only the last part of the image path, please "
+"enter the prefix"
+msgstr ""
+"Если ваше произвольное поле содержит только последнюю часть пути к картинке, "
+"пожалуйста, введите префикс"
+
+#: inc/nxs_snap_class.php:545 inc/nxs_snap_class.php:546
+msgid "Debug/Report Settings"
+msgstr "Debug/Report настройки "
+
+#: inc/nxs_snap_class.php:549
+msgid "How many log records keep?"
+msgstr "Сколько строчек хранить в журнале?"
+
+#: inc/nxs_snap_class.php:558
+msgid "Minimal"
+msgstr "Минимальное"
+
+#: inc/nxs_snap_class.php:558
+msgid ""
+"Only important action info will be added to the log. \"Debug\", \"Skipped\", "
+"informational info will be ignored."
+msgstr ""
+"Только важная информация о действиях будет добавлена в лог. \"Debug\", "
+"\"Skipped\", а также информационные сведения, добавлены не будут."
+
+#: inc/nxs_snap_class.php:559
+msgid "Normal"
+msgstr "Обычное"
+
+#: inc/nxs_snap_class.php:559
+msgid "All info except extended debug queryies will be added to the log."
+msgstr ""
+"Вся информация, за исключением расширенных debug запросов, будет добавлена в "
+"журнал."
+
+#: inc/nxs_snap_class.php:560
+msgid "Extended/Debug"
+msgstr "Extended/Debug"
+
+#: inc/nxs_snap_class.php:560
+msgid "Advanced Setting. Extended debug Info will be added to the log."
+msgstr ""
+"Продвинутые настройки.  Расширенные debug запросы будут добавлены в журнал."
+
+#: inc/nxs_snap_class.php:566
+msgid ""
+"Send Email notification for all autoposting errors. No more then one email "
+"per hour will be sent."
+msgstr ""
+"Послать email-уведомление обо всех ошибках авто-поста. Все ошибки "
+"объединяются в одно сообщение, не больше чем одно сообщение в час. "
+
+#: inc/nxs_snap_class.php:569
+msgid "Email:"
+msgstr "Email:"
+
+#: inc/nxs_snap_class.php:570
+msgid ""
+"wp_mail will be used. Some email providers (gmail, hotmail) might have "
+"problems getting such mail"
+msgstr ""
+"wp_mail будет использован. Некоторые провайдеры (gmail, hotmail) могут иметь "
+"трудности а получении такого рода сообщений."
+
+#: inc/nxs_snap_class.php:729
+msgid ""
+"Set random delays around your interval time, to make your posts appear more "
+"human"
+msgstr ""
+"Установить случайные задержки между временными интервалами, чтобы записи "
+"выглядели более натурально"
+
+#: inc/nxs_snap_class.php:749
+msgid "Contact support"
+msgstr "Обратиться в поддержку"
+
+#: inc/nxs_snap_class.php:750
+msgid ""
+"Ready to to Upgrade to Multiple Accounts Edition<br/> and get Google+ and "
+"Pinterest Auto-Posting?"
+msgstr ""
+"Готовы перейти на Multiple Accounts Edition (возможность добавлять несколько "
+"аккаунтов),<br/>  а также возможность авто-размещения вGoogle+ и Pinterest?"
+
+#: inc/nxs_snap_class.php:751
+msgid "Enter your Activation Key"
+msgstr "Введите ключ активации"
+
+#: inc/nxs_snap_class.php:752
+msgid "Get It here"
+msgstr "Получить здесь"
+
+#: inc/nxs_snap_class.php:754
+msgid "Activation"
+msgstr "Активация"
+
+#: inc/nxs_snap_class.php:756
+msgid "Multiple Accounts Edition and Google+ and Pinterest Auto-Posting"
+msgstr "Multiple Accounts Edition и авто-размещение в Google+ и Pinterest "
+
+#: inc/nxs_snap_class.php:756
+msgid "You can find your key on this page"
+msgstr "Ваш ключ на этой странице"
+
+#: inc/nxs_snap_class.php:757
+msgid "Enter your Key"
+msgstr "Введите ваш ключ"
+
+#: inc/nxs_snap_class.php:759
+msgid "Your plugin will be automatically upgraded"
+msgstr "Ваш плагин будет автоматически обновлен"
+
+#: inc/nxs_snap_class.php:764
+msgid "Next Scripts: Social Networks Auto Poster Options"
+msgstr "Next Scripts: Social Networks Auto Poster настройки"
+
+#: inc/nxs_snap_class.php:764
+msgid "Plugin Version"
+msgstr "Версия плагина"
+
+#: inc/nxs_snap_class.php:767
+msgid "Get"
+msgstr "Получить"
+
+#: inc/nxs_snap_class.php:769
+msgid "Here you can setup \"Social Networks Auto Poster\"."
+msgstr "Здесь вы можете настроить \"Social Networks Auto Poster\"."
+
+#: inc/nxs_snap_class.php:769
+msgid ""
+"You can start by clicking \"Add new account\" button and choosing the Social "
+"Network you would like to add."
+msgstr ""
+"Начните, нажав на кнопку \"Add new account\" и выбрав социальную сеть, "
+"которую вы бы хотели добавить."
+
+#: inc/nxs_snap_class.php:785
+msgid "You have Google Analytics Plugin installed and activated."
+msgstr "Google Analytics плагин установлен и активирован."
+
+#: inc/nxs_snap_class.php:785
+msgid "This plugin hijacks the authorization workflow."
+msgstr "Этот плагин перехватывает авторизацию потоков. "
+
+#: inc/nxs_snap_class.php:786
+#, php-format
+msgid ""
+"Please temporary <a href=\"%s\">deactivate</a> Google Analytics plugin, do "
+"all authorizations and then activate it back."
+msgstr ""
+"Пожалуйста, временно <a href=\"%s\">деактивируйте</a> Google Analytics "
+"плагин, сделайте все авторизации, а затем активируйте его обратно."
+
+#: inc/nxs_snap_class.php:827
+msgid "Post URL will be used"
+msgstr "ссылка записи будет использована"
+
+#: inc/nxs_snap_class.php:840
+msgid ""
+"If you made any changes to the format, please \"Update\" the post before "
+"reposting"
+msgstr ""
+"Если вы делали какие-либо изменения формата, пожалуйста \"Обновите\" запись "
+"до переразмещения "
+
+#: inc/nxs_snap_class.php:843
+msgid "Check All"
+msgstr "Отметить все"
+
+#: inc/nxs_snap_class.php:843
+msgid "Uncheck All"
+msgstr "Отменить все"
+
+#: inc/nxs_snap_class.php:877 inc/nxs_snap_class.php:880
+#: inc/nxs_snap_class.php:885
+msgid "NextScripts: Social Networks Auto Poster - Post Options"
+msgstr "NextScripts: Social Networks Auto Poster - настройки записи"
+
+#: inc-cl/ap.php:27 inc-cl/bg.php:12 inc-cl/da.php:12 inc-cl/di.php:13
+#: inc-cl/dl.php:12 inc-cl/fb.php:47 inc-cl/ff.php:12 inc-cl/gp.php:12
+#: inc-cl/ip.php:12 inc-cl/li.php:71 inc-cl/lj.php:12 inc-cl/pk.php:50
+#: inc-cl/pn.php:12 inc-cl/rd.php:12 inc-cl/su.php:12 inc-cl/tr.php:40
+#: inc-cl/tw.php:12 inc-cl/vb.php:12 inc-cl/vk.php:12 inc-cl/wp.php:12
+#: inc-cl/yt.php:12
+msgid "accounts"
+msgstr "аккаунты"
+
+#: inc-cl/ap.php:38 inc-cl/bg.php:21 inc-cl/da.php:22 inc-cl/di.php:22
+#: inc-cl/dl.php:21 inc-cl/fb.php:57 inc-cl/ff.php:21 inc-cl/gp.php:22
+#: inc-cl/ip.php:21 inc-cl/li.php:82 inc-cl/lj.php:21 inc-cl/pk.php:60
+#: inc-cl/pn.php:22 inc-cl/rd.php:22 inc-cl/su.php:21 inc-cl/tr.php:50
+#: inc-cl/tw.php:21 inc-cl/vb.php:21 inc-cl/vk.php:21 inc-cl/wp.php:21
+#: inc-cl/yt.php:22
+msgid "Auto-publish to"
+msgstr "Авто-разместить в"
+
+#: inc-cl/ap.php:39 inc-cl/bg.php:22 inc-cl/da.php:23 inc-cl/di.php:23
+#: inc-cl/dl.php:22 inc-cl/ff.php:22 inc-cl/gp.php:23 inc-cl/ip.php:22
+#: inc-cl/li.php:83 inc-cl/lj.php:22 inc-cl/pk.php:61 inc-cl/pn.php:23
+#: inc-cl/rd.php:23 inc-cl/su.php:22 inc-cl/tr.php:51 inc-cl/vb.php:22
+#: inc-cl/vk.php:22 inc-cl/wp.php:22 inc-cl/yt.php:23
+msgid "Attention requred. Unfinished setup"
+msgstr "Внимание. Не закончена установка"
+
+#: inc-cl/ap.php:39 inc-cl/bg.php:22 inc-cl/da.php:23 inc-cl/di.php:23
+#: inc-cl/dl.php:22 inc-cl/fb.php:58 inc-cl/ff.php:22 inc-cl/gp.php:23
+#: inc-cl/ip.php:22 inc-cl/li.php:83 inc-cl/lj.php:22 inc-cl/pk.php:61
+#: inc-cl/pn.php:23 inc-cl/rd.php:23 inc-cl/su.php:22 inc-cl/tr.php:51
+#: inc-cl/tw.php:22 inc-cl/vb.php:22 inc-cl/vk.php:22 inc-cl/wp.php:22
+#: inc-cl/yt.php:23
+msgid "Show Settings"
+msgstr "Показать настройки"
+
+#: inc-cl/ap.php:40 inc-cl/bg.php:23 inc-cl/da.php:24 inc-cl/di.php:24
+#: inc-cl/dl.php:23 inc-cl/fb.php:59 inc-cl/ff.php:23 inc-cl/gp.php:24
+#: inc-cl/ip.php:23 inc-cl/li.php:84 inc-cl/lj.php:23 inc-cl/pk.php:62
+#: inc-cl/pn.php:24 inc-cl/rd.php:24 inc-cl/su.php:23 inc-cl/tr.php:52
+#: inc-cl/tw.php:23 inc-cl/vb.php:23 inc-cl/vk.php:23 inc-cl/wp.php:23
+#: inc-cl/yt.php:24
+msgid "Remove Account"
+msgstr "Удалить аккаунт"
+
+#: inc-cl/ap.php:55 inc-cl/bg.php:41 inc-cl/da.php:43 inc-cl/di.php:40
+#: inc-cl/dl.php:37 inc-cl/fb.php:81 inc-cl/ff.php:38 inc-cl/gp.php:41
+#: inc-cl/ip.php:37 inc-cl/li.php:100 inc-cl/lj.php:37 inc-cl/pk.php:77
+#: inc-cl/pn.php:46 inc-cl/rd.php:44 inc-cl/su.php:39 inc-cl/tr.php:68
+#: inc-cl/tw.php:41 inc-cl/vb.php:39 inc-cl/vk.php:40 inc-cl/wp.php:37
+#: inc-cl/yt.php:41
+#, php-format
+msgid "Detailed %s Installation/Configuration Instructions"
+msgstr "Инструкции детальной %s Установки/Конфигурации "
+
+#: inc-cl/ap.php:57 inc-cl/bg.php:43 inc-cl/da.php:45 inc-cl/di.php:42
+#: inc-cl/dl.php:39 inc-cl/fb.php:86 inc-cl/ff.php:40 inc-cl/gp.php:43
+#: inc-cl/ip.php:39 inc-cl/li.php:102 inc-cl/lj.php:40 inc-cl/pk.php:79
+#: inc-cl/pn.php:47 inc-cl/rd.php:46 inc-cl/su.php:41 inc-cl/tr.php:70
+#: inc-cl/tw.php:43 inc-cl/vb.php:41 inc-cl/vk.php:45 inc-cl/wp.php:41
+#: inc-cl/yt.php:43
+msgid "Account Nickname"
+msgstr "Название аккаунта"
+
+#: inc-cl/ap.php:57 inc-cl/bg.php:43 inc-cl/da.php:45 inc-cl/di.php:42
+#: inc-cl/dl.php:39 inc-cl/fb.php:86 inc-cl/ff.php:40 inc-cl/gp.php:43
+#: inc-cl/ip.php:39 inc-cl/li.php:102 inc-cl/lj.php:40 inc-cl/pk.php:79
+#: inc-cl/pn.php:47 inc-cl/rd.php:46 inc-cl/su.php:41 inc-cl/tr.php:70
+#: inc-cl/tw.php:43 inc-cl/vb.php:41 inc-cl/vk.php:45 inc-cl/wp.php:41
+#: inc-cl/yt.php:43
+msgid "Just so you can easily identify it"
+msgstr "Для упрощения поиска и распознания"
+
+#: inc-cl/ap.php:61 inc-cl/bg.php:49 inc-cl/da.php:51 inc-cl/di.php:47
+#: inc-cl/dl.php:44 inc-cl/fb.php:91 inc-cl/ff.php:45 inc-cl/gp.php:47
+#: inc-cl/ip.php:44 inc-cl/li.php:107 inc-cl/lj.php:45 inc-cl/pk.php:84
+#: inc-cl/pn.php:52 inc-cl/rd.php:52 inc-cl/su.php:46 inc-cl/tr.php:75
+#: inc-cl/tw.php:47 inc-cl/vb.php:46 inc-cl/vk.php:50 inc-cl/wp.php:46
+#: inc-cl/yt.php:48
+msgid "Account Info"
+msgstr "Информация аккаунта"
+
+#: inc-cl/ap.php:62 inc-cl/bg.php:50 inc-cl/da.php:52 inc-cl/di.php:48
+#: inc-cl/dl.php:45 inc-cl/fb.php:92 inc-cl/ff.php:46 inc-cl/gp.php:48
+#: inc-cl/ip.php:45 inc-cl/li.php:108 inc-cl/lj.php:46 inc-cl/pk.php:85
+#: inc-cl/pn.php:53 inc-cl/rd.php:53 inc-cl/su.php:47 inc-cl/tr.php:76
+#: inc-cl/tw.php:48 inc-cl/vb.php:47 inc-cl/vk.php:51 inc-cl/wp.php:47
+#: inc-cl/yt.php:49
+msgid "Advanced"
+msgstr "Расширенные"
+
+#: inc-cl/ap.php:72 inc-cl/da.php:68 inc-cl/rd.php:80
+msgid "Text Format"
+msgstr "Формат текста"
+
+#: inc-cl/ap.php:72 inc-cl/bg.php:64 inc-cl/bg.php:69 inc-cl/da.php:63
+#: inc-cl/da.php:68 inc-cl/di.php:68 inc-cl/di.php:73 inc-cl/dl.php:58
+#: inc-cl/dl.php:64 inc-cl/fb.php:103 inc-cl/ff.php:64 inc-cl/gp.php:80
+#: inc-cl/ip.php:58 inc-cl/ip.php:64 inc-cl/lj.php:70 inc-cl/lj.php:74
+#: inc-cl/pk.php:109 inc-cl/pn.php:91 inc-cl/rd.php:68 inc-cl/rd.php:80
+#: inc-cl/su.php:76 inc-cl/tr.php:93 inc-cl/tr.php:119 inc-cl/vb.php:72
+#: inc-cl/vb.php:80 inc-cl/vk.php:96 inc-cl/wp.php:65 inc-cl/wp.php:72
+#: inc-cl/yt.php:68
+msgid "Show format info"
+msgstr "Показать информацию формата"
+
+#: inc-cl/ap.php:75
+msgid "New post (%TITLE%) has been published on %SITENAME% - %URL%"
+msgstr "Новая запись (%TITLE%) была размещена %SITENAME% - %URL%"
+
+#: inc-cl/ap.php:80
+msgid "Attach Image to App.net Post"
+msgstr "Прикрепить картинку к App.net записи"
+
+#: inc-cl/ap.php:83
+msgid "Authorize Your App.Net Account"
+msgstr "Авторизировать ваш App.Net аккаунт"
+
+#: inc-cl/ap.php:83 inc-cl/fb.php:153
+msgid "Please click \"Update Settings\" to be able to Authorize your account."
+msgstr ""
+"Пожалуйста, нажмите \"обновить настройки\", чтобы авторизировать ваш аккаунт."
+
+#: inc-cl/ap.php:85
+msgid "Your App.Net Account has been authorized."
+msgstr "Ваш App.Net Account был авторизован."
+
+#: inc-cl/ap.php:86 inc-cl/fb.php:156 inc-cl/vk.php:73
+msgid "You can"
+msgstr "Вы можете"
+
+#: inc-cl/ap.php:88 inc-cl/fb.php:158 inc-cl/vk.php:75
+msgid "Authorize your account"
+msgstr "Авторизировать ваш аккаунт"
+
+#: inc-cl/ap.php:89
+msgid "If you get App.Net message:"
+msgstr "Если вы получили App.Net сообщение:"
+
+#: inc-cl/ap.php:89
+msgid ""
+"please make sure that domain name in your App.Net App matches your website "
+"domain exactly. Please note that www. and non www. versions are different "
+"domains."
+msgstr ""
+"Пожалуйста, убедитесь что имя домейна в вашем App.Net App точно совпадает с "
+"домейном вашего сайта. Обратите внимание, что версии www. и non www. "
+"являются разными домейнами."
+
+#: inc-cl/ap.php:97 inc-cl/bg.php:86 inc-cl/da.php:80 inc-cl/di.php:83
+#: inc-cl/dl.php:73 inc-cl/fb.php:164 inc-cl/ff.php:72 inc-cl/gp.php:102
+#: inc-cl/ip.php:73 inc-cl/li.php:197 inc-cl/lj.php:86 inc-cl/pk.php:129
+#: inc-cl/pn.php:101 inc-cl/rd.php:92 inc-cl/su.php:86 inc-cl/tr.php:147
+#: inc-cl/tw.php:70 inc-cl/vb.php:86 inc-cl/vk.php:133 inc-cl/wp.php:83
+#: inc-cl/yt.php:79
+msgid "Test your settings"
+msgstr "Проверить ваши настройки"
+
+#: inc-cl/ap.php:97 inc-cl/bg.php:86 inc-cl/da.php:80 inc-cl/di.php:83
+#: inc-cl/dl.php:73 inc-cl/fb.php:164 inc-cl/ff.php:72 inc-cl/gp.php:102
+#: inc-cl/ip.php:73 inc-cl/li.php:197 inc-cl/lj.php:86 inc-cl/pk.php:129
+#: inc-cl/pn.php:101 inc-cl/rd.php:92 inc-cl/su.php:86 inc-cl/tr.php:147
+#: inc-cl/tw.php:70 inc-cl/vb.php:86 inc-cl/vk.php:133 inc-cl/wp.php:83
+#: inc-cl/yt.php:79
+#, php-format
+msgid "Submit Test Post to %s"
+msgstr "Отправить тестовую запись в %s"
+
+#: inc-cl/ap.php:104 inc-cl/ap.php:105 inc-cl/bg.php:93 inc-cl/bg.php:94
+#: inc-cl/da.php:87 inc-cl/da.php:88 inc-cl/di.php:89 inc-cl/di.php:90
+#: inc-cl/dl.php:81 inc-cl/dl.php:82 inc-cl/fb.php:171 inc-cl/fb.php:172
+#: inc-cl/ff.php:80 inc-cl/ff.php:81 inc-cl/gp.php:109 inc-cl/gp.php:110
+#: inc-cl/ip.php:81 inc-cl/ip.php:82 inc-cl/li.php:207 inc-cl/li.php:208
+#: inc-cl/lj.php:91 inc-cl/lj.php:92 inc-cl/pk.php:135 inc-cl/pk.php:136
+#: inc-cl/pn.php:108 inc-cl/pn.php:109 inc-cl/rd.php:99 inc-cl/rd.php:100
+#: inc-cl/su.php:94 inc-cl/su.php:95 inc-cl/tr.php:154 inc-cl/tr.php:155
+#: inc-cl/tw.php:78 inc-cl/tw.php:80 inc-cl/vb.php:94 inc-cl/vb.php:95
+#: inc-cl/vk.php:140 inc-cl/vk.php:141 inc-cl/wp.php:91 inc-cl/wp.php:92
+#: inc-cl/yt.php:84 inc-cl/yt.php:85
+msgid "Categories"
+msgstr "Категории"
+
+#: inc-cl/ap.php:160 inc-cl/bg.php:155 inc-cl/da.php:145 inc-cl/di.php:143
+#: inc-cl/dl.php:132 inc-cl/fb.php:263 inc-cl/ff.php:134 inc-cl/gp.php:169
+#: inc-cl/ip.php:132 inc-cl/li.php:272 inc-cl/lj.php:149 inc-cl/pk.php:198
+#: inc-cl/pn.php:166 inc-cl/rd.php:159 inc-cl/su.php:152 inc-cl/tr.php:224
+#: inc-cl/vb.php:148 inc-cl/vk.php:225 inc-cl/wp.php:143 inc-cl/yt.php:137
+msgid "publish to"
+msgstr "опубиковать в"
+
+#: inc-cl/ap.php:161
+msgid "Repost to App.Net"
+msgstr "переразместить в App.Net"
+
+#: inc-cl/ap.php:167 inc-cl/bg.php:162 inc-cl/da.php:152 inc-cl/di.php:148
+#: inc-cl/dl.php:138 inc-cl/fb.php:276 inc-cl/ff.php:140 inc-cl/gp.php:176
+#: inc-cl/ip.php:138 inc-cl/li.php:278 inc-cl/lj.php:155 inc-cl/pk.php:204
+#: inc-cl/pn.php:172 inc-cl/rd.php:166 inc-cl/su.php:159 inc-cl/tr.php:230
+#: inc-cl/tw.php:157 inc-cl/vb.php:155 inc-cl/vk.php:231 inc-cl/wp.php:150
+#: inc-cl/yt.php:144
+msgid "Posted on"
+msgstr "Опубликовано в"
+
+#: inc-cl/ap.php:180 inc-cl/bg.php:174 inc-cl/da.php:165 inc-cl/di.php:159
+#: inc-cl/dl.php:151 inc-cl/fb.php:288 inc-cl/ff.php:157 inc-cl/gp.php:192
+#: inc-cl/ip.php:151 inc-cl/li.php:290 inc-cl/lj.php:168 inc-cl/pk.php:216
+#: inc-cl/pn.php:185 inc-cl/rd.php:179 inc-cl/su.php:171 inc-cl/tr.php:242
+#: inc-cl/tw.php:169 inc-cl/vb.php:168 inc-cl/vk.php:243 inc-cl/wp.php:163
+#: inc-cl/yt.php:157
+msgid "Include in \"Auto-Reposting\" to this network."
+msgstr "Включить в \"авто-размещение\" для этой сети."
+
+#: inc-cl/ap.php:184 inc-cl/da.php:172 inc-cl/di.php:164 inc-cl/dl.php:158
+#: inc-cl/ip.php:158 inc-cl/lj.php:174 inc-cl/pk.php:230 inc-cl/rd.php:192
+#: inc-cl/su.php:186 inc-cl/tr.php:259 inc-cl/vb.php:171 inc-cl/vb.php:174
+#: inc-cl/wp.php:169
+msgid "Text Format:"
+msgstr "Формат текста:"
+
+#: inc-cl/ap.php:249 inc-cl/bg.php:240 inc-cl/da.php:226 inc-cl/di.php:220
+#: inc-cl/dl.php:219 inc-cl/fb.php:463 inc-cl/ff.php:219 inc-cl/gp.php:288
+#: inc-cl/ip.php:221 inc-cl/li.php:376 inc-cl/lj.php:232 inc-cl/pk.php:312
+#: inc-cl/pn.php:272 inc-cl/rd.php:245 inc-cl/su.php:259 inc-cl/tr.php:338
+#: inc-cl/tw.php:357 inc-cl/vb.php:246 inc-cl/vk.php:370 inc-cl/wp.php:239
+#: inc-cl/yt.php:226
+msgid "OK - Message Posted, please see your "
+msgstr "Сообщение размещено, пожалуйста, смотрите свой"
+
+#: inc-cl/bg.php:60
+msgid ""
+"Log to your Blogger management panel and look at the URL of your blog: "
+"http://www.blogger.com/blogger.g?blogID=8959085979163812093#allposts. Your "
+"Blog ID will be: 8959085979163812093"
+msgstr ""
+"Залогиньтесь в вашу панель управления Blogger и найдите ссылку вашего блога: "
+"http://www.blogger.com/blogger.g?blogID=8959085979163812093#allposts. ID "
+"вашего блога будет: 8959085979163812093"
+
+#: inc-cl/bg.php:64 inc-cl/da.php:63 inc-cl/di.php:68 inc-cl/dl.php:58
+#: inc-cl/ip.php:58 inc-cl/lj.php:70 inc-cl/rd.php:68 inc-cl/tr.php:93
+#: inc-cl/vb.php:72 inc-cl/wp.php:64
+msgid "Post Title Format"
+msgstr "Формат названия записи"
+
+#: inc-cl/bg.php:69 inc-cl/di.php:73 inc-cl/dl.php:64 inc-cl/ff.php:64
+#: inc-cl/ip.php:64 inc-cl/lj.php:74 inc-cl/pk.php:109 inc-cl/su.php:76
+#: inc-cl/tr.php:119 inc-cl/vb.php:80 inc-cl/wp.php:71
+msgid "Post Text Format"
+msgstr "Формат текста записи"
+
+#: inc-cl/bg.php:77
+msgid "HTML is allowed"
+msgstr "HTML разрешен"
+
+#: inc-cl/bg.php:81 inc-cl/di.php:64
+msgid "Post with tags"
+msgstr "Разместить с тагами"
+
+#: inc-cl/bg.php:81
+msgid "Tags from the blogpost will be auto-posted to Blogger/Blogspot"
+msgstr "Таги из записи блога будут авто-размещены в Blogger/Blogspot"
+
+#: inc-cl/bg.php:86
+msgid "Submit Test Post to Finish Configuration"
+msgstr "отправьте тестовое сообщение чтобы завешить конфигурацию"
+
+#: inc-cl/bg.php:157
+msgid "Repost to Blogger"
+msgstr "Переразместить в Blogger"
+
+#: inc-cl/bg.php:166
+msgid "Setup your Blogger Account to AutoPost to Blogger"
+msgstr "Установите ваш Blogger аккаунт для авто-размещения в Blogger"
+
+#: inc-cl/bg.php:177 inc-cl/da.php:169 inc-cl/di.php:162 inc-cl/dl.php:155
+#: inc-cl/ff.php:161 inc-cl/ip.php:155 inc-cl/lj.php:171 inc-cl/rd.php:183
+#: inc-cl/wp.php:166
+msgid "Title Format:"
+msgstr "Формат заголовка:"
+
+#: inc-cl/bg.php:179 inc-cl/fb.php:315 inc-cl/gp.php:215 inc-cl/li.php:297
+#: inc-cl/tw.php:172 inc-cl/vk.php:245 inc-cl/yt.php:161
+msgid "Message Format:"
+msgstr "Формат сообщения:"
+
+#: inc-cl/da.php:39
+msgid "deviantART API Library not found"
+msgstr "deviantART библиотека API не найдена"
+
+#: inc-cl/da.php:40
+msgid "deviantART doesn't have a built-in API for automated posts yet."
+msgstr ""
+"deviantART пока не имеет встроенной API для автоматизированных размещений."
+
+#: inc-cl/da.php:40
+msgid ""
+"<br/>You need to get a special <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/deviantart-automated-posting\"><b>API Library Module</b></a> "
+"to be able to publish your content to deviantART."
+msgstr ""
+"<br/>Вам нужна специальная <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/deviantart-automated-posting\"><b>API библиотека</b></a> "
+"чтобы публиковать ваши записи в deviantART."
+
+#: inc-cl/da.php:71
+msgid "%FULLTEXT%"
+msgstr "%FULLTEXT%"
+
+#: inc-cl/da.php:146
+msgid "Repost to deviantART"
+msgstr "Переразместить в deviantART"
+
+#: inc-cl/di.php:64
+msgid "Tags from the blogpost will be auto posted to Diigo"
+msgstr "Таг этой записи будет авто-размещен в Diigo"
+
+#: inc-cl/di.php:144
+msgid "Repost to Diigo"
+msgstr "Переразместить Diigo"
+
+#: inc-cl/dl.php:133
+msgid "Repost to Delicious"
+msgstr "Переразместить в Delicious"
+
+#: inc-cl/fb.php:58 inc-cl/tw.php:22
+msgid "Attention required. Unfinished setup"
+msgstr "Внимание. Настройка не закончена"
+
+#: inc-cl/fb.php:68 inc-cl/gp.php:83 inc-cl/rd.php:83
+msgid "New post (%TITLE%) has been published on %SITENAME%"
+msgstr "Новое сообщение (%TITLE%) было размещено на %SITENAME%"
+
+#: inc-cl/fb.php:82
+msgid "Please use in your Facebook App:"
+msgstr "Пожалуйста, используйте в вашем Facebook App:"
+
+#: inc-cl/fb.php:98
+msgid "Could be your Facebook Profile, Facebook Page, Facebook Group"
+msgstr "Может быть ваш Facebook Profile, Facebook Page, Facebook Group"
+
+#: inc-cl/fb.php:103 inc-cl/gp.php:80 inc-cl/li.php:167 inc-cl/pn.php:91
+#: inc-cl/tw.php:62 inc-cl/vk.php:96 inc-cl/yt.php:68
+msgid "Message text Format"
+msgstr "Формат текста сообщения"
+
+#: inc-cl/fb.php:111 inc-cl/fb.php:301 inc-cl/gp.php:94 inc-cl/gp.php:199
+#: inc-cl/rd.php:76 inc-cl/rd.php:189 inc-cl/vk.php:109 inc-cl/vk.php:256
+msgid "Text Post"
+msgstr "Текст записи"
+
+#: inc-cl/fb.php:111 inc-cl/fb.php:301 inc-cl/gp.php:94 inc-cl/gp.php:199
+#: inc-cl/vk.php:109 inc-cl/vk.php:256
+msgid "just text message"
+msgstr "только текст сообщения"
+
+#: inc-cl/fb.php:113 inc-cl/fb.php:302 inc-cl/vk.php:110 inc-cl/vk.php:257
+msgid "Image Post"
+msgstr "Картинка записи"
+
+#: inc-cl/fb.php:113 inc-cl/fb.php:302 inc-cl/gp.php:95 inc-cl/gp.php:200
+#: inc-cl/vk.php:110 inc-cl/vk.php:257
+msgid "big image with text message"
+msgstr "Большая картинка с текстом сообщения"
+
+#: inc-cl/fb.php:114
+msgid "Upload Images to"
+msgstr "Загрузить картинки в"
+
+#: inc-cl/fb.php:115
+msgid "App Album"
+msgstr "App Album"
+
+#: inc-cl/fb.php:115 inc-cl/fb.php:123 inc-cl/fb.php:306
+msgid "or"
+msgstr "или"
+
+#: inc-cl/fb.php:117
+msgid "Timeline"
+msgstr "Timeline"
+
+#: inc-cl/fb.php:120 inc-cl/vk.php:111
+msgid "Text Post with \"attached\" link"
+msgstr "текст записи с \"прикрепленной\" ссылкой"
+
+#: inc-cl/fb.php:122
+msgid "Link attachment type"
+msgstr "тип прикрепленной ссылки"
+
+#: inc-cl/fb.php:123 inc-cl/fb.php:306
+msgid "Share a link to your blogpost"
+msgstr "Поделиться ссылкой на вашу запись"
+
+#: inc-cl/fb.php:125 inc-cl/fb.php:308
+msgid "Attach your blogpost"
+msgstr "прикрепить вашу запись"
+
+#: inc-cl/fb.php:126
+msgid "If post has video use it as an attachment thumbnail."
+msgstr ""
+"Если запись имеет видео, используйте его как прикрепленную миниатюру записи."
+
+#: inc-cl/fb.php:126
+msgid ""
+"Video will be used for an attachment thumbnail instead of featured image. "
+"Only Youtube is supported at this time."
+msgstr ""
+"Видео будет использовано для прикрепленной миниатюры записи вместо картинки. "
+"Только Youtube поддерживается в настоящее время."
+
+#: inc-cl/fb.php:129
+msgid "Let Facebook fill the link info"
+msgstr "Позвольте Facebook самостоятельно заполнить информацию о ссылке"
+
+#: inc-cl/fb.php:130
+msgid ""
+"Recommended. Facebook will automatically take attached/shared link info from "
+"OG: tags or other sources."
+msgstr ""
+"Рекомендуется. Facebook автоматически возьмет информацию о ссылке из OG: "
+"tags или других источников."
+
+#: inc-cl/fb.php:134 inc-cl/li.php:178
+msgid "Attachment Text Format"
+msgstr "Формат прикрепленного текста"
+
+#: inc-cl/fb.php:136 inc-cl/li.php:180 inc-cl/vk.php:120
+msgid ""
+"Recommended. Info from SEO Plugins will be used, then post excerpt, then "
+"post text"
+msgstr ""
+"Рекомендуется. Информация от SEO Plugins будет использована, затем цитата "
+"записи, и только после этого текст записи"
+
+#: inc-cl/fb.php:137 inc-cl/li.php:181
+msgid "Set your own format"
+msgstr "Настройка вашего собственного формата"
+
+#: inc-cl/fb.php:143
+msgid "Where to upload Images"
+msgstr "Куда загрузить картинки"
+
+#: inc-cl/fb.php:143
+msgid "(App Album)"
+msgstr "(App Album)"
+
+#: inc-cl/fb.php:143
+msgid ""
+"Facebook automatically creates an album for your app. Images will be grouped "
+"there as in any regular album."
+msgstr ""
+"Facebook автоматически создает альбом для вашего app. Картинки будут "
+"сгруппированы там как в любом другом альбоме. "
+
+#: inc-cl/fb.php:143
+msgid "(Timeline)"
+msgstr "(Timeline)"
+
+#: inc-cl/fb.php:143
+msgid ""
+"Images will be posted to the special \"Wall/Timeline\" album and won't be "
+"grouped. \"Wall/Timeline\" album must exist. It's created when first image "
+"posted to timeline manually."
+msgstr ""
+"Картинки будут размещены в специальный \"Wall/Timeline\" альбом и не будут "
+"сгруппированы. \"Wall/Timeline\"  должен существовать. Он создается, когда "
+"первая картинка размещается на timeline вручную. "
+
+#: inc-cl/fb.php:144 inc-cl/fb.php:310
+msgid "Two ways of attaching post on Facebook"
+msgstr "Два способа прикрепления записи к сообщению на Facebook"
+
+#: inc-cl/fb.php:145 inc-cl/fb.php:311
+msgid "Facebook Post Types"
+msgstr "Типы сообщений на Facebook"
+
+#: inc-cl/fb.php:153
+msgid "Authorize Your Facebook Account"
+msgstr "Авторизируйте ваш Facebook аккаунт"
+
+#: inc-cl/fb.php:155
+msgid "Your Facebook Account has been authorized."
+msgstr "Ваш Facebook аккаунт был авторизован. "
+
+#: inc-cl/fb.php:159
+msgid "If you get Facebook message:"
+msgstr "Если вы получили Facebook сообщение:"
+
+#: inc-cl/fb.php:159
+msgid ""
+"please make sure that domain name in your Facebook App matches your website "
+"domain exactly. Please note that www. and non www. versions are different "
+"domains."
+msgstr ""
+"Пожалуйста, убедитесь что имя домейна в вашем Facebook App совпадает с "
+"домейном вашего сайта в точности. Пожалуйста, обратите внимание, что версии "
+"www. and non www. являются разными домейнами."
+
+#: inc-cl/fb.php:182
+msgid "Facebook Comments:"
+msgstr "Facebook комментарии:"
+
+#: inc-cl/fb.php:184
+msgid ""
+"Plugin could grab comments from Facebook and import them as Wordpress "
+"Comments"
+msgstr ""
+"Плагин может взять комментарии с Facebook и импортировать их как Wordpress "
+"Comments"
+
+#: inc-cl/fb.php:187
+msgid "Import Facebook Comments"
+msgstr "Импорт Facebook комментариев"
+
+#: inc-cl/fb.php:190 inc-cl/tw.php:97
+msgid "Auto-approve imported comments"
+msgstr "Авто-одобрение импортированных комментариев"
+
+#: inc-cl/fb.php:192 inc-cl/tw.php:98
+msgid "Please activate the \"Comments Import\" from SNAP Settings Tab"
+msgstr "Пожалуйста, автивируйте \"импорт комментариев\"  из SNAP Settings Tab"
+
+#: inc-cl/fb.php:266
+msgid "Repost to Facebook"
+msgstr "Переразместить в Facebook"
+
+#: inc-cl/fb.php:268
+msgid "Import Comments from Facebook"
+msgstr "Импортировать комментарии из Facebook"
+
+#: inc-cl/fb.php:298 inc-cl/gp.php:195 inc-cl/rd.php:186 inc-cl/vk.php:254
+msgid "Post Type:"
+msgstr "Тип записи:"
+
+#: inc-cl/fb.php:303 inc-cl/gp.php:201 inc-cl/vk.php:259
+msgid "Text Post with \"attached\" blogpost"
+msgstr "Текст записи с \"прикрепленной\" записи"
+
+#: inc-cl/fb.php:305 inc-cl/vk.php:113
+msgid "Link attachment type:"
+msgstr "Тип прикрепленной ссылки:"
+
+#: inc-cl/ff.php:67
+msgid "Attach Image to FriendFeed Post"
+msgstr "Прикрепить картинку к FriendFeed записи"
+
+#: inc-cl/ff.php:135
+msgid "Repost to FriendFeed"
+msgstr "Переразместить в FriendFeed"
+
+#: inc-cl/gp.php:38
+msgid "Google+ API Library not found"
+msgstr "Google+ API библиотека не найдена"
+
+#: inc-cl/gp.php:39
+msgid "Google+ doesn't have a built-in API for automated posts yet."
+msgstr ""
+"Google+ в настоящее время не имеет встроенного API для автоматизированных "
+"записей."
+
+#: inc-cl/gp.php:39
+msgid ""
+"The current <a target=\"_blank\" href=\"http://developers.google.com/+/api/"
+"\">Google+ API</a> is \"Read Only\" and can't be used for posting.  <br/><br/"
+">You need to get a special <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/google-plus-automated-posting\"><b>API Library Module</b></"
+"a> to be able to publish your content to Google+."
+msgstr ""
+"Данный <a target=\"_blank\" href=\"http://developers.google.com/+/api/"
+"\">Google+ API</a> в формате \"Read Only\" и не может быть использован для "
+"размещения.  <br/><br/>Вам необходимо приобрести <a target=\"_blank\" href="
+"\"http://www.nextscripts.com/google-plus-automated-posting\"><b>API "
+"библиотеки</b></a> чтобы иметь возсожность публиковать ваши сообщения на "
+"Google+."
+
+#: inc-cl/gp.php:57
+msgid "Leave Empty to publish to your profile or community"
+msgstr ""
+"Оставьте пустым, если хотите опубликовать на ваш профиль или в коммьюнити"
+
+#: inc-cl/gp.php:58
+msgid "Leave Empty to publish to your profile or community."
+msgstr ""
+"Оставьте пустым, если хотите опубликовать на ваш профиль или в коммьюнити"
+
+#: inc-cl/gp.php:61 inc-cl/gp.php:62
+msgid "Leave Empty to publish to your profile or page"
+msgstr "Оставьте пустым, если хотите опубликовать на ваш профиль или страницу"
+
+#: inc-cl/gp.php:65
+msgid "Retrieve Categories and Page Names"
+msgstr "Получить категории и названия страниц"
+
+#: inc-cl/gp.php:95
+msgid "Google+ Image Post"
+msgstr "Google+ картинка записи"
+
+#: inc-cl/gp.php:96
+msgid "Add blogpost to Google+ message as an attachment"
+msgstr "Добавить запись к  Google+ сообщению как прикрепление"
+
+#: inc-cl/gp.php:97 inc-cl/gp.php:202
+msgid "Google+ Post Types"
+msgstr "Типы записей Google+"
+
+#: inc-cl/gp.php:170
+msgid "Repost to Google+"
+msgstr "Переразместить в Google+"
+
+#: inc-cl/gp.php:185
+msgid "Autopost has been schedulled for"
+msgstr "Авто-размещение было запланировано на"
+
+#: inc-cl/gp.php:200
+msgid "Post to Google+ as \"Image post\""
+msgstr "Разместить в Google+как \"картинку\""
+
+#: inc-cl/ip.php:133
+msgid "Repost to Instapaper"
+msgstr "Переразместить в Instapaper"
+
+#: inc-cl/li.php:187
+msgid "Message title Format (Groups Only)"
+msgstr "Формат заголовка сообщения (только для групп)"
+
+#: inc-cl/li.php:273
+msgid "Repost to LinkedIn"
+msgstr "Переразместить в LinkedIn"
+
+#: inc-cl/li.php:302
+msgid "Title Format (Groups Only):"
+msgstr "Формат заголовка (только для групп)"
+
+#: inc-cl/lj.php:38
+msgid "You can setup LiveJournal blog."
+msgstr "Вы можете настроить LiveJournal блог."
+
+#: inc-cl/lj.php:68
+msgid "Post Title and Post Text Formats"
+msgstr "Форматы заголовка сообщения и текста сообщения"
+
+#: inc-cl/lj.php:82
+msgid "Post with tags."
+msgstr "Разместить с тагами."
+
+#: inc-cl/lj.php:82
+msgid "Tags from the blogpost will be auto posted to LiveJournal"
+msgstr "Таги из записи будут авто-размещены в LiveJournal "
+
+#: inc-cl/lj.php:150
+msgid "Repost to LiveJournal"
+msgstr "Переразместить в LiveJournal"
+
+#: inc-cl/pk.php:199
+msgid "Repost to Plurk"
+msgstr "Переразместить в Plurk"
+
+#: inc-cl/pn.php:87
+msgid "If post has a video use it instead of image"
+msgstr "Если запись имеет видео, используйте вместо картинки"
+
+#: inc-cl/pn.php:87
+msgid ""
+"Video will be pinned instead of featured image. Only Youtube is supported at "
+"this time."
+msgstr ""
+"Видео будет использовано вместо миниатюры записи. Только Youtube "
+"поддерживается в настоящее время."
+
+#: inc-cl/pn.php:167
+msgid "Repost to Pinterest"
+msgstr "Переразместить в Pinterest"
+
+#: inc-cl/pn.php:197
+msgid "Text Message Format:"
+msgstr "Формат текста сообщения:"
+
+#: inc-cl/rd.php:39
+msgid "Reddit API Library not found"
+msgstr "Reddit API библиотека не найдена"
+
+#: inc-cl/rd.php:40
+msgid "Reddit doesn't have a built-in API for automated posts yet."
+msgstr "Reddit не имеет встроенного API для автоматизированных записей."
+
+#: inc-cl/rd.php:40
+msgid ""
+"<br/>You need to get a special <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/reddit-automated-posting\"><b>API Library Module</b></a> to "
+"be able to publish your content to Reddit."
+msgstr ""
+"<br/>Вам нужно приобрести специальный <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/reddit-automated-posting\"><b>API библиотеки</b></a> чтобы "
+"получить возможность размещать ваши записи на Reddit."
+
+#: inc-cl/rd.php:74 inc-cl/rd.php:187
+msgid "Link Post"
+msgstr "ссылка записи"
+
+#: inc-cl/rd.php:76
+msgid "set the text format below"
+msgstr "настроить формат текста "
+
+#: inc-cl/rd.php:160
+msgid "Repost to Reddit"
+msgstr "переразместить на Reddit"
+
+#: inc-cl/su.php:153
+msgid "Repost to StumbleUpon"
+msgstr "переразместить на StumbleUpon"
+
+#: inc-cl/tr.php:225
+msgid "Repost to Tumblr"
+msgstr "переразместить на Tumblr"
+
+#: inc-cl/tr.php:248
+msgid "Text Post. Title Format:"
+msgstr "Текст сообщения. Формат заголовка:"
+
+#: inc-cl/tw.php:60
+msgid "Attach Image to Twitter Post"
+msgstr "Прикрепить картинку к сообщению в Twitter"
+
+#: inc-cl/tw.php:79
+msgid "Only selected categories will be autoposted to this account."
+msgstr "Только выбранные категории будут авто-размещены на этот аккаунт."
+
+#: inc-cl/tw.php:89
+msgid "Auto Import of Replies and Mentions:"
+msgstr "Авто-импортирование Ответов и Упоминаний:"
+
+#: inc-cl/tw.php:91
+msgid ""
+"Plugin could grab Replies and Mentions from Twitter and import them as "
+"Wordpress Comments"
+msgstr ""
+"Плагин может собирать Ответы и Упоминания из Twitter и импортировать их как "
+"комментарии Wordpress"
+
+#: inc-cl/tw.php:93
+msgid "Import Twitter Replies"
+msgstr "импортировать Ответы из Twitter"
+
+#: inc-cl/tw.php:95
+msgid "Import Twitter Mentions"
+msgstr "импортировать Упоминания из Twitter"
+
+#: inc-cl/tw.php:148
+msgid "autopost to"
+msgstr "авто-разместить в"
+
+#: inc-cl/tw.php:151
+msgid "Repost to Twitter"
+msgstr "переразместить в Twitter"
+
+#: inc-cl/tw.php:154
+msgid "Import Replies/Mentions from Twitter"
+msgstr "Импортировать Ответы/Упоминания из Twitter"
+
+#: inc-cl/vb.php:149
+msgid "Repost to vBulletin"
+msgstr "Переразместить в vBulletin "
+
+#: inc-cl/vk.php:59
+msgid "Could be your vKontakte(VK) Profile or vKontakte(VK) Group Page"
+msgstr ""
+"Может быть ваш профиль vKontakte(VK) или страница группы vKontakte(VK) "
+
+#: inc-cl/vk.php:62
+msgid "(It could be used for \"Text\" and \"Image\" posts)"
+msgstr "(It could be used for \"Text\" and \"Image\" posts)"
+
+#: inc-cl/vk.php:66
+msgid "[Create VK App]"
+msgstr "[Создать VK App]"
+
+#: inc-cl/vk.php:66
+msgid "[Manage VK Apps]"
+msgstr "[Управлять VK Apps]"
+
+#: inc-cl/vk.php:70
+msgid ""
+"<b>Authorize Your vKontakte(VK) Account</b>. Please click \"Update Settings"
+"\" to be able to Authorize your account."
+msgstr ""
+"<b>авторизовать ваш аккаунт vKontakte(VK)</b>. Пожалуйста, нажмите "
+"\"Обновить настройки\" чтобы получить возможность авторизовать аккаунт."
+
+#: inc-cl/vk.php:72
+msgid "Your vKontakte(VK) Account has been authorized."
+msgstr "Ваш аккаунт vKontakte(VK) был авторизован."
+
+#: inc-cl/vk.php:83
+msgid "(It could be used for \"Text with attached link\" posts)"
+msgstr ""
+"(Это может быть использовано для сообщений \"Текст с прикрепленной ссылкой\")"
+
+#: inc-cl/vk.php:92
+msgid "Please upgrade the plugin to \"PRO\" get NextScripts VK API"
+msgstr ""
+"Чтобы получить NextScripts VK API, пожалуйста, приобретите плагин \"PRO\" "
+
+#: inc-cl/vk.php:103 inc-cl/vk.php:251
+msgid "Add backlink to the post"
+msgstr "Добавьте обратную ссылку к записи"
+
+#: inc-cl/vk.php:115
+msgid ""
+"<strong>If post has video use it as an attachment thumbnail.</strong> "
+"<i>Video will be used for an attachment thumbnail instead of featured image. "
+"Only Youtube is supported at this time.</i>"
+msgstr ""
+"<strong>если запись имеет видео, используйте его как прикрепление.</strong> "
+"<i>Видео будет использовано вместо миниатюры записи. Только Youtube "
+"поддерживается в настоящее время.</i>"
+
+#: inc-cl/vk.php:118
+msgid "Attachment Text Format:"
+msgstr "Формат текста прикрепления:"
+
+#: inc-cl/vk.php:121
+msgid "Set your own format:"
+msgstr "Настроить ваш собственный формат:"
+
+#: inc-cl/vk.php:228
+msgid "Repost to vKontakte(VK)"
+msgstr "переразместить на vKontakte(VK)"
+
+#: inc-cl/vk.php:260
+msgid "Post Types"
+msgstr "Типы сообщений"
+
+#: inc-cl/wp.php:144
+msgid "Repost to WP Blog"
+msgstr "переразместить в WP Blog"
+
+#: inc-cl/yt.php:38
+msgid "YouTube API Library not found"
+msgstr "YouTube API библиотека не найдена"
+
+#: inc-cl/yt.php:39
+msgid "YouTube doesn't have a built-in API for automated posts yet."
+msgstr ""
+"YouTube в настоящее время не имеет встроенного API для автоматизации "
+"сообщений. "
+
+#: inc-cl/yt.php:39
+msgid ""
+"The current <a target=\"_blank\" href=\"http://developers.google.com/+/api/"
+"\">YouTube API</a> is \"Read Only\" and can't be used for posting.  <br/><br/"
+">You need to get a special <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/google-plus-automated-posting\"><b>API Library Module</b></"
+"a> to be able to publish your content to YouTube."
+msgstr ""
+"Настоящий <a target=\"_blank\" href=\"http://developers.google.com/+/api/"
+"\">YouTube API</a> is \"Read Only\" и не может быть использован для "
+"размещения.  <br/><br/>Вам необходимо приобрести <a target=\"_blank\" href="
+"\"http://www.nextscripts.com/google-plus-automated-posting\"><b>API "
+"библиотеки</b></a>чтобы получить возможность публиковать ваши сообщения на "
+"YouTube."
+
+#: inc-cl/yt.php:71
+msgid "New post: %TITLE% - %URL%"
+msgstr "Новая запись: %TITLE% - %URL%"
+
+#: inc-cl/yt.php:138
+msgid "Repost to YouTube"
+msgstr "переразместить на YouTube"
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-tr_TR.mo b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-tr_TR.mo
new file mode 100644 (file)
index 0000000..2548cc5
Binary files /dev/null and b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-tr_TR.mo differ
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-tr_TR.po b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/lang/nxs_snap-tr_TR.po
new file mode 100644 (file)
index 0000000..e14610f
--- /dev/null
@@ -0,0 +1,1717 @@
+# Copyright (C) 2014 
+# This file is distributed under the same license as the  package.
+msgid ""
+msgstr ""
+"Project-Id-Version: NxsSnap\n"
+"Report-Msgid-Bugs-To: http://wordpress.org/tag/social-networks-auto-poster-"
+"facebook-twitter-g\n"
+"POT-Creation-Date: 2014-03-06 23:22:09+00:00\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"PO-Revision-Date: 2014-09-10 03:09+0200\n"
+"Last-Translator: Fatih Mehmet Ekler <fmeseo@gmail.com>\n"
+"Language-Team: Fatih Mehmet Ekler <fmeseo@gmail.com>\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"X-Generator: Poedit 1.5.5\n"
+"Language: tr_TR\n"
+
+#: NextScripts_SNAP.php:242 inc/nxs_snap_class.php:227
+msgid "Settings"
+msgstr "Ayarlar"
+
+#: NextScripts_SNAP.php:338
+msgid "NXS Reposter"
+msgstr "NXS Reposter"
+
+#: NextScripts_SNAP.php:366 inc/nxs_snap_class.php:853
+msgid "Check All"
+msgstr "Hepsini Kontrol Et"
+
+#: NextScripts_SNAP.php:366 inc/nxs_snap_class.php:853
+msgid "Uncheck All"
+msgstr "Işaretini kaldırın Tüm"
+
+#: inc/nxs_functions_adv.php:89 inc/nxs_functions_adv.php:90
+msgid "N/A"
+msgstr "Yok"
+
+#: inc/nxs_functions_adv.php:89 inc/nxs_functions_adv.php:90
+msgid " MByte"
+msgstr " MByte"
+
+#: inc/nxs_functions_adv.php:91
+msgid "PHP Version"
+msgstr "PHP Version"
+
+#: inc/nxs_functions_adv.php:92
+msgid "Memory limit"
+msgstr "Bellek sınırı"
+
+#: inc/nxs_functions_adv.php:93
+msgid "Memory usage"
+msgstr "Bellek kullanımı"
+
+#: inc/nxs_snap_class.php:207
+msgid "Settings Updated."
+msgstr "Ayarlar güncellendi."
+
+#: inc/nxs_snap_class.php:254
+msgid ""
+"Filters are \"ON\". Only selected categories/tags will be autoposted to this "
+"account. Click \"Show Settings->Advanced\" to change"
+msgstr ""
+
+#: inc/nxs_snap_class.php:255
+msgid "Reposter is activated for this account"
+msgstr "Reposter Bu hesap için aktive edilir"
+
+#: inc/nxs_snap_class.php:257
+msgid "Select Categories"
+msgstr "Seç Kategoriler"
+
+#: inc/nxs_snap_class.php:280 inc/nxs_snap_class.php:286
+msgid "Import Settings"
+msgstr "Alma Ayarları"
+
+#: inc/nxs_snap_class.php:285
+msgid "Export Settings"
+msgstr "İhracat Ayarları"
+
+#: inc/nxs_snap_class.php:289 inc/nxs_snap_class.php:634 inc-cl/ap.php:116
+#: inc-cl/bg.php:103 inc-cl/da.php:98 inc-cl/di.php:99 inc-cl/dl.php:92
+#: inc-cl/fb.php:214 inc-cl/ff.php:91 inc-cl/fl.php:149 inc-cl/fp.php:93
+#: inc-cl/gp.php:120 inc-cl/ip.php:92 inc-cl/li.php:235 inc-cl/lj.php:102
+#: inc-cl/pk.php:147 inc-cl/pn.php:119 inc-cl/rd.php:121 inc-cl/sc.php:148
+#: inc-cl/su.php:105 inc-cl/tr.php:165 inc-cl/tw.php:100 inc-cl/vb.php:105
+#: inc-cl/vk.php:151 inc-cl/wp.php:102 inc-cl/yt.php:95
+msgid "Update Settings"
+msgstr "Güncelleme Ayarları"
+
+#: inc/nxs_snap_class.php:301
+msgid "How to make auto-posts?"
+msgstr "Nasıl otomatik mesaj yapmak için?"
+
+#: inc/nxs_snap_class.php:301 inc-cl/fb.php:128 inc-cl/fb.php:137
+#: inc-cl/fb.php:145 inc-cl/fb.php:320 inc-cl/fb.php:324 inc-cl/gp.php:91
+#: inc-cl/gp.php:193 inc-cl/vk.php:109 inc-cl/vk.php:252
+msgid "What's the difference?"
+msgstr "Ne fark var?"
+
+#: inc/nxs_snap_class.php:303
+msgid "The difference between \"Immediately\" and \"Scheduled\""
+msgstr ""
+
+#: inc/nxs_snap_class.php:304
+msgid ""
+"<b>\"Immediately\"</b> - Once you click \"Publish\" button plugin starts "
+"pushing your update to configured social networks. At this time you need to "
+"wait and look at the turning circle. Some APIs are pretty slow, so you have "
+"to wait and wait and wait until all updates are posted and page released "
+"back to you."
+msgstr ""
+
+#: inc/nxs_snap_class.php:305
+msgid ""
+"<b>\"Scheduled\"</b> - Releases the page immediately back to you, so you can "
+"proceed with something else and it schedules all auto-posting jobs to your "
+"WP-Cron. This is much faster and much more efficient, but it could not work "
+"if your WP-Cron is disabled or broken."
+msgstr ""
+
+#: inc/nxs_snap_class.php:310
+msgid "Publish Immediately"
+msgstr "Hemen Yayınla"
+
+#: inc/nxs_snap_class.php:310
+msgid ""
+"No WP Cron will be used. Choose if WP Cron is disabled or broken on your "
+"website"
+msgstr ""
+"Resim WP Cron kullanılacaktır. WP Cron devre dışı veya web sitenizde kırık "
+"ise seçin"
+
+#: inc/nxs_snap_class.php:314
+msgid "Use WP Cron to Schedule autoposts"
+msgstr "Autoposts Çizelge WP Cron kullanın"
+
+#: inc/nxs_snap_class.php:314
+msgid ""
+"Recommended for most sites. Faster Performance - requires working WP Cron"
+msgstr ""
+"Çoğu site için önerilir. Hızlı Performans - WP Cron çalışmayı gerektirir"
+
+#: inc/nxs_snap_class.php:321 inc/nxs_snap_class.php:480
+msgid ""
+"Your WP Cron is not working correctly. This feature may not work properly, "
+"and might cause duplicate postings and stability problems.<br/> Please see "
+"the test results and recommendations here:"
+msgstr ""
+"Sizin WP Cron düzgün çalışmıyor. Bu özellik test sonuçlarını ve öneriler "
+"buraya bakın düzgün çalışmayabilir ve ilanları ve istikrar sorunları "
+"yinelenen neden olabilir <br/>.:"
+
+#: inc/nxs_snap_class.php:325
+msgid "Limit autoposting speed"
+msgstr "Sınır Autoposting hızı"
+
+#: inc/nxs_snap_class.php:325
+msgid "Recommended for busy sites with a lot of new posts."
+msgstr "Yeni mesajların bir çok meşgul siteler için önerilir."
+
+#: inc/nxs_snap_class.php:331 nxs_functions.php:833
+msgid "Randomize posting time &#177;"
+msgstr "Zaman & # 177 ilanıyla Rastgele;"
+
+#: inc/nxs_snap_class.php:332 nxs_functions.php:830 nxs_functions.php:834
+msgid "Minutes"
+msgstr "Dakika"
+
+#: inc/nxs_snap_class.php:336
+msgid ""
+"What to do with the rest of the posts if there are more posts then daily "
+"limit?"
+msgstr ""
+"Daha fazla mesaj sonra günlük limit varsa mesaj kalanı ile ne yapmak gerekir?"
+
+#: inc/nxs_snap_class.php:337
+msgid "Skip/Discard/Don't Autopost "
+msgstr "Sil / autopost etmeyin / Skip "
+
+#: inc/nxs_snap_class.php:338
+msgid "Schedule for tomorrow"
+msgstr "Yarın Takvimi"
+
+#: inc/nxs_snap_class.php:338
+msgid "Not recommended, may cause significant delays"
+msgstr "Tavsiye değil, önemli gecikmelere neden olabilir"
+
+#: inc/nxs_snap_class.php:347
+msgid "User Privileges/Security"
+msgstr "Kullanıcı Ayrıcalıklar / Güvenlik"
+
+#: inc/nxs_snap_class.php:351
+msgid "Skip User Security Verification."
+msgstr "Kullanıcı Güvenliği Doğrulama yap."
+
+#: inc/nxs_snap_class.php:352
+msgid ""
+"NOT Recommended, but useful in some situations. This will allow autoposting "
+"for everyone even for the non-existent users."
+msgstr ""
+"DEĞİL Tavsiye, ancak bazı durumlarda yararlıdır. Bu bile olmayan "
+"kullanıcılar için herkes için Autoposting sağlayacaktır."
+
+#: inc/nxs_snap_class.php:354
+msgid "Who can make autoposts without seeing any auto-posting options?"
+msgstr ""
+"Kim herhangi bir otomatik gönderme seçeneklerini görmeden autoposts "
+"yapabilirsiniz?"
+
+#: inc/nxs_snap_class.php:369
+msgid ""
+"Who can see auto-posting options on the \"New Post\" and \"Edit Post\" pages "
+"and make autoposts?"
+msgstr ""
+
+#: inc/nxs_snap_class.php:391
+msgid "Include/Exclude Wordpress Pages and Custom Post Types"
+msgstr "Wordpress / Sayfalar ve Özel Post Türleri Hariç İçer"
+
+#: inc/nxs_snap_class.php:394
+msgid "Use for Wordpress Pages"
+msgstr "Wordpress Sayfaları için kullanın"
+
+#: inc/nxs_snap_class.php:395
+msgid "Show the SNAP metabox and auto-post for pages, not just posts."
+msgstr "Sayfaları, sadece mesaj için SNAP METABOX ve oto-postayı göster."
+
+#: inc/nxs_snap_class.php:397
+msgid "Custom Post Types:"
+msgstr "Özel Mesaj Tipleri:"
+
+#: inc/nxs_snap_class.php:398
+msgid ""
+"Please select \"Custom Post Types\" that you would like to be autoposted to "
+"your social networks"
+msgstr ""
+
+#: inc/nxs_snap_class.php:416
+msgid "Categories to Include/Exclude:"
+msgstr "Kategoriler dışla / katmak için:"
+
+#: inc/nxs_snap_class.php:417
+msgid ""
+"Each blogpost will be autoposted to all categories selected below. All "
+"categories are selected by default. \r\n"
+"              <b>Uncheck</b> categories that you would like <b>NOT</b> to "
+"auto-post by default. Assigning the uncheked category to the new blogpost "
+"will turn off auto-posting to all configured networks."
+msgstr ""
+
+#: inc/nxs_snap_class.php:436
+msgid "URL Shortener"
+msgstr "URL Kısaltma"
+
+#: inc/nxs_snap_class.php:477
+msgid "Auto-Import comments from Social Networks"
+msgstr "Sosyal Ağlar Auto-İthalat comments"
+
+#: inc/nxs_snap_class.php:477 inc/nxs_snap_class.php:499
+msgid "New"
+msgstr "Yeni"
+
+#: inc/nxs_snap_class.php:499
+msgid "Additional URL Parameters"
+msgstr "Ek URL Parametreleri"
+
+#: inc/nxs_snap_class.php:500
+msgid "Will be added to backlinks."
+msgstr "Geri ilave edilecektir."
+
+#: inc/nxs_snap_class.php:502
+msgid "Additional URL Parameters:"
+msgstr "Ek URL Parametreleri:"
+
+#: inc/nxs_snap_class.php:504
+msgid ""
+"You can use %NTNAME% for social network name, %NTCODE% for social network "
+"two-letter code, %ACCNAME% for account name,  %POSTID% for post ID,  "
+"%POSTTITLE% for post title, %SITENAME% for website name. <b>Any text must be "
+"URL Encoded</b><br/>Example: utm_source=%NTCODE%&utm_medium=%ACCNAME"
+"%&utm_campaign=SNAP%2Bfrom%2B%SITENAME%"
+msgstr ""
+"Sen web sitesi ismi için yazı başlığı,% SITENAME için% sonrası kimliği,% "
+"POSTTITLE için% hesap adı,% POSTID% sosyal ağ iki harfli kod,% ACCNAME% "
+"sosyal ağ adı,% NTCODE için%% NTNAME% kullanabilirsiniz. <B> Herhangi bir "
+"metin URL kodlanmış olmalıdır </ b> <br/> Örnek: utm_source =% NTCODE% & "
+"utm_medium =% ACCNAME% & utm_campaign = SNAP% 2Bfrom% 2B% SITENAME%"
+
+#: inc/nxs_snap_class.php:508
+msgid "Auto-HashTags Settings"
+msgstr "Oto-Hashtags Ayarları"
+
+#: inc/nxs_snap_class.php:509
+msgid "How to generate hashtags if tag is longer then one word"
+msgstr ""
+"Etiket daha sonra uzun bir kelime olup olmadığını Hashtags oluşturmak için "
+"nasıl"
+
+#: inc/nxs_snap_class.php:511
+msgid "Replace spaces in hashtags with "
+msgstr "Ile hashtags boşluklar değiştirin "
+
+#: inc/nxs_snap_class.php:520
+msgid "%ANNOUNCE% tag settings"
+msgstr "%% Etiketi ayarlarınızı ANONS"
+
+#: inc/nxs_snap_class.php:521
+msgid ""
+"Plugin will take text untill the &lt;!--more--&gt; tag. Please specify how "
+"many characters should it get if &lt;!--more--&gt; tag is not found"
+msgstr ""
+"! Eklentisi & lt e kadar metin alacak; - daha - & gt; etiketi. It! Eğer & lt "
+"almalısınız kaç karakter belirtin; - daha - & gt; etiketi bulunamadı"
+
+#: inc/nxs_snap_class.php:523
+msgid "How many characters:"
+msgstr "Kaç karakter:"
+
+#: inc/nxs_snap_class.php:528
+msgid "\"Open Graph\" Tags"
+msgstr ""
+
+#: inc/nxs_snap_class.php:529
+msgid ""
+"This is simple and useful implementation of \"Open Graph\" Tags, as this "
+"option will only add tags needed for \"Auto Posting\". If you use other "
+"specialized plugins, uncheck this option."
+msgstr ""
+
+#: inc/nxs_snap_class.php:531
+msgid "Add Open Graph Tags"
+msgstr "Open Graph Etiketler ekle"
+
+#: inc/nxs_snap_class.php:534
+msgid "Default Image URL for og:image tag:"
+msgstr "Resim etiketi: og için Varsayılan Resim URL:"
+
+#: inc/nxs_snap_class.php:539
+msgid "Advanced \"Featured\" Image Settings"
+msgstr ""
+
+#: inc/nxs_snap_class.php:543
+msgid ""
+"Advanced Setting. Uncheck only if you are 100% sure that your images are "
+"valid or if you have troubles with image verification."
+msgstr ""
+"Gelişmiş Ayar. Eğer görüntü doğrulama ile sorun varsa görüntüler geçerli ya "
+"da% 100 emin iseniz sadece işaretini kaldırın."
+
+#: inc/nxs_snap_class.php:548
+msgid "Use advanced image finder"
+msgstr "Gelişmiş görüntü bulucu kullanın"
+
+#: inc/nxs_snap_class.php:550
+msgid ""
+"Check this if your images could be found only in the fully processed posts. "
+"<br/>This feature could interfere with some plugins using post processing "
+"functions incorrectly. Your site could become messed up, have troubles "
+"displaying content or start giving you \"ob_start() [ref.outcontrol]: Cannot "
+"use output buffering in output buffering display handlers\" errors."
+msgstr ""
+
+#: inc/nxs_snap_class.php:556
+msgid "Alternative \"Featured Image\" location"
+msgstr ""
+
+#: inc/nxs_snap_class.php:557
+msgid ""
+"Plugin uses standard Wordpress \"Featured Image\" by default. If your theme "
+"stores \"Featured Image\" in the custom field, please enter the name of it. "
+"Use prefix if your custom field has only partial location."
+msgstr ""
+
+#: inc/nxs_snap_class.php:559
+msgid "Custom field name:"
+msgstr "Özel alan adı:"
+
+#: inc/nxs_snap_class.php:561
+msgid "Set the name of the custom field that contains image info"
+msgstr "Görüntü bilgisi içeren özel alanın adını ayarlayın"
+
+#: inc/nxs_snap_class.php:564
+msgid "Custom field Array Path:"
+msgstr "Özel alan Dizi Yolu:"
+
+#: inc/nxs_snap_class.php:566 inc/nxs_snap_class.php:571
+msgid "Optional"
+msgstr "Opsiyonel"
+
+#: inc/nxs_snap_class.php:566
+msgid ""
+"If your custom field contain an array, please enter the path to the image "
+"field. For example: ['images']['image']"
+msgstr ""
+"Özel alan bir dizi içeriyorsa, görüntü alanına yolunu girin. Örneğin: "
+"['images'] ['resim']"
+
+#: inc/nxs_snap_class.php:569
+msgid "Custom field Image Prefix:"
+msgstr "Özel alan Resim öneki:"
+
+#: inc/nxs_snap_class.php:571
+msgid ""
+"If your custom field contain only the last part of the image path, please "
+"enter the prefix"
+msgstr ""
+"Özel alan resim yolunun yalnızca son bölümünü içeriyorsa, önek girin lütfen"
+
+#: inc/nxs_snap_class.php:576 inc/nxs_snap_class.php:577
+msgid "Debug/Report Settings"
+msgstr "Debug / Rapor Ayarları"
+
+#: inc/nxs_snap_class.php:580
+msgid "How many log records keep?"
+msgstr "Kaç log kayıtları tutmak?"
+
+#: inc/nxs_snap_class.php:589
+msgid "Minimal"
+msgstr "Minimal"
+
+#: inc/nxs_snap_class.php:589
+msgid ""
+"Only important action info will be added to the log. \"Debug\", \"Skipped\", "
+"informational info will be ignored."
+msgstr ""
+
+#: inc/nxs_snap_class.php:590
+msgid "Normal"
+msgstr "Normal"
+
+#: inc/nxs_snap_class.php:590
+msgid "All info except extended debug queryies will be added to the log."
+msgstr ""
+"Genişletilmiş hata ayıklama queryies hariç tüm bilgileri günlüğüne "
+"eklenecektir."
+
+#: inc/nxs_snap_class.php:591
+msgid "Extended/Debug"
+msgstr "Genişletilmiş / Hata Ayıklama"
+
+#: inc/nxs_snap_class.php:591
+msgid "Advanced Setting. Extended debug Info will be added to the log."
+msgstr ""
+"Gelişmiş Ayar. Genişletilmiş hata ayıklama Bilgisi günlüğüne eklenecektir."
+
+#: inc/nxs_snap_class.php:597
+msgid ""
+"Send Email notification for all autoposting errors. No more then one email "
+"per hour will be sent."
+msgstr ""
+"Tüm Autoposting hataları için e-posta bildirimi gönder. Saatte bir e-posta "
+"gönderilecektir yok daha sonra."
+
+#: inc/nxs_snap_class.php:600
+msgid "Email:"
+msgstr "E-posta:"
+
+#: inc/nxs_snap_class.php:601
+msgid ""
+"wp_mail will be used. Some email providers (gmail, hotmail) might have "
+"problems getting such mail"
+msgstr ""
+"wp_mail kullanılacaktır. Bazı e-posta sağlayıcıları (gmail, hotmail) gibi "
+"mail alma sorunları olabilir"
+
+#: inc/nxs_snap_class.php:607
+msgid "Your WP Cron is not working correctly."
+msgstr "Sizin WP Cron düzgün çalışmıyor."
+
+#: inc/nxs_snap_class.php:612
+msgid ""
+"I understand that this could cause duplicate postings as well as perfomance "
+"and stability problems."
+msgstr ""
+"Ben bu yinelenen kayıtları yanı sıra perfomansı ve kararlılık sorunlarına "
+"neden olabilir anlıyorum."
+
+#: inc/nxs_snap_class.php:613
+msgid ""
+"Please do not check this unless you absolutely sure that you know what are "
+"you doing."
+msgstr ""
+"Eğer ne yaptığınızı biliyor kesinlikle emin sürece bu kontrol etmeyiniz."
+
+#: inc/nxs_snap_class.php:614
+msgid "Setting up WP Cron correctly will be much better solution:"
+msgstr "WP Cron doğru çok daha iyi bir çözüm olacaktır ayarlama:"
+
+#: inc/nxs_snap_class.php:734
+msgid ""
+"Set random delays around your interval time, to make your posts appear more "
+"human"
+msgstr ""
+"Kendi mesajlarınız daha insani görünmesi için sizin aralık zaman etrafa "
+"rastgele gecikmeler ayarlayın"
+
+#: inc/nxs_snap_class.php:754
+msgid "Contact support"
+msgstr "İletişim destek"
+
+#: inc/nxs_snap_class.php:755
+msgid ""
+"Ready to to Upgrade to Multiple Accounts Edition<br/> and get Google+ and "
+"Pinterest Auto-Posting?"
+msgstr ""
+"Birden Fazla Hesabı Sürümü <br/> yükseltme ve Google+ ve Pinterest Otomatik "
+"Gönderme almak için hazır mısınız?"
+
+#: inc/nxs_snap_class.php:756
+msgid "Enter your Activation Key"
+msgstr "Etkinleştirme Anahtarını girin"
+
+#: inc/nxs_snap_class.php:757
+msgid "Get It here"
+msgstr "Burada Get It"
+
+#: inc/nxs_snap_class.php:759
+msgid "Activation"
+msgstr "Aktivasyon"
+
+#: inc/nxs_snap_class.php:761
+msgid "Multiple Accounts Edition and Google+ and Pinterest Auto-Posting"
+msgstr "Çoklu Hesaplar Sürümü ve Google+ ve Pinterest Otomatik Gönderme"
+
+#: inc/nxs_snap_class.php:761
+msgid "You can find your key on this page"
+msgstr "Bu sayfada anahtarı bulabilirsiniz"
+
+#: inc/nxs_snap_class.php:762
+msgid "Enter your Key"
+msgstr "Senin Key girin"
+
+#: inc/nxs_snap_class.php:764
+msgid "Your plugin will be automatically upgraded"
+msgstr "Sizin eklenti otomatik olarak yükseltilecek"
+
+#: inc/nxs_snap_class.php:769
+msgid "Next Scripts: Social Networks Auto Poster Options"
+msgstr "Sonraki Script: Sosyal Ağlar Auto Poster Seçenekleri"
+
+#: inc/nxs_snap_class.php:769
+msgid "Plugin Version"
+msgstr "Plugin Sürüm"
+
+#: inc/nxs_snap_class.php:772
+msgid "Get"
+msgstr "Al"
+
+#: inc/nxs_snap_class.php:774
+msgid "Here you can setup \"Social Networks Auto Poster\"."
+msgstr ""
+
+#: inc/nxs_snap_class.php:774
+msgid ""
+"You can start by clicking \"Add new account\" button and choosing the Social "
+"Network you would like to add."
+msgstr ""
+
+#: inc/nxs_snap_class.php:795
+msgid "You have Google Analytics Plugin installed and activated."
+msgstr "Google Analytics Eklentisi yüklü ve etkinleştirilmiş olması."
+
+#: inc/nxs_snap_class.php:795
+msgid "This plugin hijacks the authorization workflow."
+msgstr "Bu eklenti yetkilendirme iş akışını hijacks."
+
+#: inc/nxs_snap_class.php:796
+msgid ""
+"Please temporary <a href=\"%s\">deactivate</a> Google Analytics plugin, do "
+"all authorizations and then activate it back."
+msgstr ""
+
+#: inc/nxs_snap_class.php:837 inc-cl/fb.php:155 inc-cl/li.php:199
+#: inc-cl/vk.php:122 nxs_functions.php:709 nxs_functions.php:719
+msgid "Auto"
+msgstr "Oto"
+
+#: inc/nxs_snap_class.php:837
+msgid "Post URL will be used"
+msgstr "Mesaj URL kullanılır"
+
+#: inc/nxs_snap_class.php:840 nxs_functions.php:722
+msgid "URL:"
+msgstr "URL:"
+
+#: inc/nxs_snap_class.php:850
+msgid ""
+"If you made any changes to the format, please \"Update\" the post before "
+"reposting"
+msgstr ""
+
+#: inc/nxs_snap_class.php:887 inc/nxs_snap_class.php:890
+#: inc/nxs_snap_class.php:895
+msgid "NextScripts: Social Networks Auto Poster - Post Options"
+msgstr "NextScripts: Sosyal Ağlar Auto Poster - Mesaj Seçenekleri"
+
+#: inc-cl/ap.php:27 inc-cl/bg.php:12 inc-cl/da.php:12 inc-cl/di.php:13
+#: inc-cl/dl.php:12 inc-cl/fb.php:61 inc-cl/ff.php:12 inc-cl/fl.php:53
+#: inc-cl/fp.php:13 inc-cl/gp.php:12 inc-cl/ip.php:12 inc-cl/li.php:87
+#: inc-cl/lj.php:12 inc-cl/pk.php:51 inc-cl/pn.php:12 inc-cl/rd.php:12
+#: inc-cl/sc.php:48 inc-cl/su.php:12 inc-cl/tr.php:40 inc-cl/tw.php:12
+#: inc-cl/vb.php:12 inc-cl/vk.php:12 inc-cl/wp.php:12 inc-cl/yt.php:12
+msgid "accounts"
+msgstr "hesapları"
+
+#: inc-cl/ap.php:44 inc-cl/bg.php:24 inc-cl/da.php:25 inc-cl/di.php:25
+#: inc-cl/dl.php:24 inc-cl/fb.php:74 inc-cl/ff.php:24 inc-cl/fl.php:68
+#: inc-cl/fp.php:30 inc-cl/gp.php:25 inc-cl/ip.php:24 inc-cl/li.php:101
+#: inc-cl/lj.php:24 inc-cl/pk.php:64 inc-cl/pn.php:25 inc-cl/rd.php:25
+#: inc-cl/sc.php:65 inc-cl/su.php:24 inc-cl/tr.php:53 inc-cl/tw.php:24
+#: inc-cl/vb.php:24 inc-cl/vk.php:24 inc-cl/wp.php:24 inc-cl/yt.php:25
+msgid "Auto-publish to"
+msgstr "Otomatik-yayımlamak"
+
+#: inc-cl/ap.php:45 inc-cl/bg.php:25 inc-cl/da.php:26 inc-cl/di.php:26
+#: inc-cl/dl.php:25 inc-cl/ff.php:25 inc-cl/fl.php:69 inc-cl/fp.php:31
+#: inc-cl/gp.php:26 inc-cl/ip.php:25 inc-cl/li.php:102 inc-cl/lj.php:25
+#: inc-cl/pk.php:65 inc-cl/pn.php:26 inc-cl/rd.php:26 inc-cl/sc.php:66
+#: inc-cl/su.php:25 inc-cl/tr.php:54 inc-cl/vb.php:25 inc-cl/vk.php:25
+#: inc-cl/wp.php:25 inc-cl/yt.php:26
+msgid "Attention requred. Unfinished setup"
+msgstr "Dikkat requred. Bitmemiş kurulum"
+
+#: inc-cl/ap.php:46 inc-cl/bg.php:25 inc-cl/da.php:26 inc-cl/di.php:26
+#: inc-cl/dl.php:25 inc-cl/fb.php:76 inc-cl/ff.php:25 inc-cl/fl.php:70
+#: inc-cl/fp.php:32 inc-cl/gp.php:26 inc-cl/ip.php:25 inc-cl/li.php:102
+#: inc-cl/lj.php:25 inc-cl/pk.php:65 inc-cl/pn.php:26 inc-cl/rd.php:26
+#: inc-cl/sc.php:67 inc-cl/su.php:25 inc-cl/tr.php:54 inc-cl/tw.php:25
+#: inc-cl/vb.php:25 inc-cl/vk.php:25 inc-cl/wp.php:25 inc-cl/yt.php:26
+msgid "Show Settings"
+msgstr "Göster Ayarlar"
+
+#: inc-cl/ap.php:47 inc-cl/bg.php:26 inc-cl/da.php:27 inc-cl/di.php:27
+#: inc-cl/dl.php:26 inc-cl/fb.php:77 inc-cl/ff.php:26 inc-cl/fl.php:71
+#: inc-cl/fp.php:33 inc-cl/gp.php:27 inc-cl/ip.php:26 inc-cl/li.php:103
+#: inc-cl/lj.php:26 inc-cl/pk.php:66 inc-cl/pn.php:27 inc-cl/rd.php:27
+#: inc-cl/sc.php:68 inc-cl/su.php:26 inc-cl/tr.php:55 inc-cl/tw.php:26
+#: inc-cl/vb.php:26 inc-cl/vk.php:26 inc-cl/wp.php:26 inc-cl/yt.php:27
+msgid "Remove Account"
+msgstr "Hesap Kaldır"
+
+#: inc-cl/ap.php:62 inc-cl/bg.php:44 inc-cl/da.php:46 inc-cl/di.php:43
+#: inc-cl/dl.php:40 inc-cl/fb.php:101 inc-cl/ff.php:41 inc-cl/fl.php:86
+#: inc-cl/fp.php:53 inc-cl/gp.php:44 inc-cl/ip.php:40 inc-cl/li.php:120
+#: inc-cl/lj.php:40 inc-cl/pk.php:81 inc-cl/pn.php:49 inc-cl/rd.php:47
+#: inc-cl/sc.php:83 inc-cl/su.php:42 inc-cl/tr.php:71 inc-cl/tw.php:44
+#: inc-cl/vb.php:42 inc-cl/vk.php:43 inc-cl/wp.php:40 inc-cl/yt.php:44
+msgid "Detailed %s Installation/Configuration Instructions"
+msgstr "Detaylı %s Kurulum / Yapılandırma Talimatları"
+
+#: inc-cl/ap.php:64 inc-cl/bg.php:46 inc-cl/da.php:48 inc-cl/di.php:45
+#: inc-cl/dl.php:42 inc-cl/fb.php:106 inc-cl/ff.php:43 inc-cl/fl.php:88
+#: inc-cl/fp.php:55 inc-cl/gp.php:46 inc-cl/ip.php:42 inc-cl/li.php:122
+#: inc-cl/lj.php:43 inc-cl/pk.php:83 inc-cl/pn.php:50 inc-cl/rd.php:49
+#: inc-cl/sc.php:85 inc-cl/su.php:44 inc-cl/tr.php:73 inc-cl/tw.php:46
+#: inc-cl/vb.php:44 inc-cl/vk.php:48 inc-cl/wp.php:44 inc-cl/yt.php:46
+msgid "Account Nickname"
+msgstr "Hesap Kullanıcı adı"
+
+#: inc-cl/ap.php:64 inc-cl/bg.php:46 inc-cl/da.php:48 inc-cl/di.php:45
+#: inc-cl/dl.php:42 inc-cl/fb.php:106 inc-cl/ff.php:43 inc-cl/fl.php:88
+#: inc-cl/fp.php:55 inc-cl/gp.php:46 inc-cl/ip.php:42 inc-cl/li.php:122
+#: inc-cl/lj.php:43 inc-cl/pk.php:83 inc-cl/pn.php:50 inc-cl/rd.php:49
+#: inc-cl/sc.php:85 inc-cl/su.php:44 inc-cl/tr.php:73 inc-cl/tw.php:46
+#: inc-cl/vb.php:44 inc-cl/vk.php:48 inc-cl/wp.php:44 inc-cl/yt.php:46
+msgid "Just so you can easily identify it"
+msgstr "Eğer kolayca bulabilirsiniz sadece bu yüzden"
+
+#: inc-cl/ap.php:68 inc-cl/bg.php:52 inc-cl/da.php:54 inc-cl/di.php:50
+#: inc-cl/dl.php:47 inc-cl/fb.php:111 inc-cl/ff.php:48 inc-cl/fl.php:92
+#: inc-cl/fp.php:59 inc-cl/gp.php:50 inc-cl/ip.php:47 inc-cl/li.php:127
+#: inc-cl/lj.php:48 inc-cl/pk.php:88 inc-cl/pn.php:55 inc-cl/rd.php:55
+#: inc-cl/sc.php:89 inc-cl/su.php:49 inc-cl/tr.php:78 inc-cl/tw.php:50
+#: inc-cl/vb.php:49 inc-cl/vk.php:53 inc-cl/wp.php:49 inc-cl/yt.php:51
+msgid "Account Info"
+msgstr "Hesap Bilgileri"
+
+#: inc-cl/ap.php:69 inc-cl/bg.php:53 inc-cl/da.php:55 inc-cl/di.php:51
+#: inc-cl/dl.php:48 inc-cl/fb.php:112 inc-cl/ff.php:49 inc-cl/fl.php:93
+#: inc-cl/fp.php:60 inc-cl/gp.php:51 inc-cl/ip.php:48 inc-cl/li.php:128
+#: inc-cl/lj.php:49 inc-cl/pk.php:89 inc-cl/pn.php:56 inc-cl/rd.php:56
+#: inc-cl/sc.php:90 inc-cl/su.php:50 inc-cl/tr.php:79 inc-cl/tw.php:51
+#: inc-cl/vb.php:50 inc-cl/vk.php:54 inc-cl/wp.php:50 inc-cl/yt.php:52
+msgid "Advanced"
+msgstr "Gelişmiş"
+
+#: inc-cl/ap.php:79 inc-cl/da.php:71 inc-cl/fl.php:107 inc-cl/rd.php:94
+#: inc-cl/sc.php:104
+msgid "Text Format"
+msgstr "Metin Biçimi"
+
+#: inc-cl/ap.php:79 inc-cl/bg.php:67 inc-cl/bg.php:72 inc-cl/da.php:66
+#: inc-cl/da.php:71 inc-cl/di.php:71 inc-cl/di.php:76 inc-cl/dl.php:61
+#: inc-cl/dl.php:67 inc-cl/fb.php:123 inc-cl/ff.php:67 inc-cl/fl.php:103
+#: inc-cl/fl.php:107 inc-cl/fp.php:72 inc-cl/gp.php:83 inc-cl/ip.php:61
+#: inc-cl/ip.php:67 inc-cl/lj.php:73 inc-cl/lj.php:77 inc-cl/pk.php:113
+#: inc-cl/pn.php:94 inc-cl/rd.php:82 inc-cl/rd.php:94 inc-cl/sc.php:100
+#: inc-cl/sc.php:104 inc-cl/su.php:79 inc-cl/tr.php:96 inc-cl/tr.php:122
+#: inc-cl/vb.php:75 inc-cl/vb.php:83 inc-cl/vk.php:99 inc-cl/wp.php:68
+#: inc-cl/wp.php:75 inc-cl/yt.php:71
+msgid "Show format info"
+msgstr "Show formatında bilgi"
+
+#: inc-cl/ap.php:82
+msgid "New post (%TITLE%) has been published on %SITENAME% - %URL%"
+msgstr "New post (% BAŞLIK%)% SITENAME% yayımlanmaktadır -% URL%"
+
+#: inc-cl/ap.php:87
+msgid "Attach Image to App.net Post"
+msgstr "App.net Post Image takın"
+
+#: inc-cl/ap.php:90
+msgid "Authorize Your App.Net Account"
+msgstr "Sizin App.Net Hesap yetkilendirme"
+
+#: inc-cl/ap.php:90 inc-cl/fb.php:173 inc-cl/fl.php:124 inc-cl/sc.php:123
+msgid "Please click \"Update Settings\" to be able to Authorize your account."
+msgstr ""
+
+#: inc-cl/ap.php:92
+msgid "Your App.Net Account has been authorized."
+msgstr "Sizin App.Net Hesap yetkili olmuştur."
+
+#: inc-cl/ap.php:93 inc-cl/fb.php:176 inc-cl/fl.php:127 inc-cl/sc.php:126
+#: inc-cl/vk.php:76
+msgid "You can"
+msgstr ""
+"İşlenmiş data çeşitli formatlarda yollanarak örneğin 3D yazıcılarda "
+"kullanılabilir. "
+
+#: inc-cl/ap.php:95 inc-cl/fb.php:178 inc-cl/fl.php:130 inc-cl/sc.php:129
+#: inc-cl/vk.php:78
+msgid "Authorize your account"
+msgstr "Hesabınızı yetkilendirme"
+
+#: inc-cl/ap.php:96
+msgid "If you get App.Net message:"
+msgstr "Eğer App.Net mesajı alırsanız:"
+
+#: inc-cl/ap.php:96
+msgid ""
+"please make sure that domain name in your App.Net App matches your website "
+"domain exactly. Please note that www. and non www. versions are different "
+"domains."
+msgstr ""
+"App.Net App web sitesi alanı tam olarak eşleşir senin içinde emin etki alanı "
+"adı olun. O www unutmayınız. ve non www. sürümleri farklı etki vardır."
+
+#: inc-cl/ap.php:104 inc-cl/bg.php:89 inc-cl/da.php:83 inc-cl/di.php:86
+#: inc-cl/dl.php:76 inc-cl/fb.php:184 inc-cl/ff.php:75 inc-cl/fl.php:137
+#: inc-cl/fp.php:81 inc-cl/gp.php:105 inc-cl/ip.php:76 inc-cl/li.php:217
+#: inc-cl/lj.php:89 inc-cl/pk.php:133 inc-cl/pn.php:104 inc-cl/rd.php:106
+#: inc-cl/sc.php:136 inc-cl/su.php:89 inc-cl/tr.php:150 inc-cl/tw.php:73
+#: inc-cl/vb.php:89 inc-cl/vk.php:136 inc-cl/wp.php:86 inc-cl/yt.php:82
+msgid "Test your settings"
+msgstr "Ayarlarınızı test"
+
+#: inc-cl/ap.php:104 inc-cl/bg.php:89 inc-cl/da.php:83 inc-cl/di.php:86
+#: inc-cl/dl.php:76 inc-cl/fb.php:184 inc-cl/ff.php:75 inc-cl/fl.php:137
+#: inc-cl/fp.php:81 inc-cl/gp.php:105 inc-cl/ip.php:76 inc-cl/li.php:217
+#: inc-cl/lj.php:89 inc-cl/pk.php:133 inc-cl/pn.php:104 inc-cl/rd.php:106
+#: inc-cl/sc.php:136 inc-cl/su.php:89 inc-cl/tr.php:150 inc-cl/tw.php:73
+#: inc-cl/vb.php:89 inc-cl/vk.php:136 inc-cl/wp.php:86 inc-cl/yt.php:82
+msgid "Submit Test Post to %s"
+msgstr "Için Testi Mesaj Gönder %s"
+
+#: inc-cl/ap.php:160 inc-cl/bg.php:151 inc-cl/da.php:139 inc-cl/di.php:139
+#: inc-cl/dl.php:129 inc-cl/fb.php:284 inc-cl/ff.php:131 inc-cl/fl.php:198
+#: inc-cl/fp.php:138 inc-cl/gp.php:166 inc-cl/ip.php:129 inc-cl/li.php:286
+#: inc-cl/lj.php:146 inc-cl/pk.php:196 inc-cl/pn.php:163 inc-cl/rd.php:171
+#: inc-cl/sc.php:196 inc-cl/su.php:149 inc-cl/tr.php:221 inc-cl/vb.php:145
+#: inc-cl/vk.php:222 inc-cl/wp.php:140 inc-cl/yt.php:134
+msgid "publish to"
+msgstr "yayımlamak"
+
+#: inc-cl/ap.php:161
+msgid "Repost to App.Net"
+msgstr "App.Net için repost"
+
+#: inc-cl/ap.php:167 inc-cl/bg.php:158 inc-cl/da.php:146 inc-cl/di.php:144
+#: inc-cl/dl.php:135 inc-cl/fb.php:297 inc-cl/ff.php:137 inc-cl/fl.php:205
+#: inc-cl/fp.php:145 inc-cl/gp.php:173 inc-cl/ip.php:135 inc-cl/li.php:292
+#: inc-cl/lj.php:152 inc-cl/pk.php:202 inc-cl/pn.php:169 inc-cl/rd.php:178
+#: inc-cl/sc.php:203 inc-cl/su.php:156 inc-cl/tr.php:227 inc-cl/tw.php:154
+#: inc-cl/vb.php:152 inc-cl/vk.php:228 inc-cl/wp.php:147 inc-cl/yt.php:141
+msgid "Posted on"
+msgstr "Yayınlanan"
+
+#: inc-cl/ap.php:180 inc-cl/bg.php:170 inc-cl/da.php:159 inc-cl/di.php:155
+#: inc-cl/dl.php:148 inc-cl/fb.php:309 inc-cl/ff.php:154 inc-cl/fl.php:218
+#: inc-cl/fp.php:158 inc-cl/gp.php:189 inc-cl/ip.php:148 inc-cl/li.php:304
+#: inc-cl/lj.php:165 inc-cl/pk.php:214 inc-cl/pn.php:182 inc-cl/rd.php:191
+#: inc-cl/sc.php:216 inc-cl/su.php:168 inc-cl/tr.php:239 inc-cl/tw.php:166
+#: inc-cl/vb.php:165 inc-cl/vk.php:240 inc-cl/wp.php:160 inc-cl/yt.php:154
+msgid "Include in \"Auto-Reposting\" to this network."
+msgstr ""
+
+#: inc-cl/ap.php:184 inc-cl/da.php:166 inc-cl/di.php:160 inc-cl/dl.php:155
+#: inc-cl/fl.php:224 inc-cl/ip.php:155 inc-cl/lj.php:171 inc-cl/pk.php:228
+#: inc-cl/rd.php:204 inc-cl/sc.php:222 inc-cl/su.php:183 inc-cl/tr.php:256
+#: inc-cl/vb.php:168 inc-cl/vb.php:171 inc-cl/wp.php:166
+msgid "Text Format:"
+msgstr "Metin Biçimi:"
+
+#: inc-cl/bg.php:63
+msgid ""
+"Log to your Blogger management panel and look at the URL of your blog: "
+"http://www.blogger.com/blogger.g?blogID=8959085979163812093#allposts. Your "
+"Blog ID will be: 8959085979163812093"
+msgstr ""
+"Blogger yönetim paneline giriş yapın ve blogunuzun URL bakmak: http://www."
+"blogger.com/blogger.g?blogID=8959085979163812093#allposts. Sizin blog kimlik "
+"olacaktır: 8959085979163812093"
+
+#: inc-cl/bg.php:67 inc-cl/da.php:66 inc-cl/di.php:71 inc-cl/dl.php:61
+#: inc-cl/fl.php:103 inc-cl/ip.php:61 inc-cl/lj.php:73 inc-cl/rd.php:82
+#: inc-cl/sc.php:100 inc-cl/tr.php:96 inc-cl/vb.php:75 inc-cl/wp.php:67
+msgid "Post Title Format"
+msgstr "Mesaj Başlığı Biçimi"
+
+#: inc-cl/bg.php:72 inc-cl/di.php:76 inc-cl/dl.php:67 inc-cl/ff.php:67
+#: inc-cl/ip.php:67 inc-cl/lj.php:77 inc-cl/pk.php:113 inc-cl/su.php:79
+#: inc-cl/tr.php:122 inc-cl/vb.php:83 inc-cl/wp.php:74
+msgid "Post Text Format"
+msgstr "Mesaj Metin Biçimi"
+
+#: inc-cl/bg.php:80
+msgid "HTML is allowed"
+msgstr "HTML izin verilir"
+
+#: inc-cl/bg.php:84 inc-cl/di.php:67 inc-cl/fl.php:114 inc-cl/sc.php:111
+msgid "Post with tags"
+msgstr "Etiketleri ile gönderin"
+
+#: inc-cl/bg.php:84
+msgid "Tags from the blogpost will be auto-posted to Blogger/Blogspot"
+msgstr ""
+"Blogpost gelen Etiketler Blogger / Blogspot için otomatik ilan edilecektir"
+
+#: inc-cl/bg.php:89
+msgid "Submit Test Post to Finish Configuration"
+msgstr "Finish Yapılandırması Testi Mesaj Gönder"
+
+#: inc-cl/bg.php:153
+msgid "Repost to Blogger"
+msgstr "Blogger'a repost"
+
+#: inc-cl/bg.php:162
+msgid "Setup your Blogger Account to AutoPost to Blogger"
+msgstr "Kurulum Blogger'a autopost Blogger Hesabı"
+
+#: inc-cl/bg.php:173 inc-cl/da.php:163 inc-cl/di.php:158 inc-cl/dl.php:152
+#: inc-cl/ff.php:158 inc-cl/fl.php:221 inc-cl/ip.php:152 inc-cl/lj.php:168
+#: inc-cl/rd.php:195 inc-cl/sc.php:219 inc-cl/wp.php:163
+msgid "Title Format:"
+msgstr "Başlık Formatı:"
+
+#: inc-cl/bg.php:175 inc-cl/fb.php:336 inc-cl/gp.php:212 inc-cl/li.php:311
+#: inc-cl/tw.php:169 inc-cl/vk.php:242 inc-cl/yt.php:158
+msgid "Message Format:"
+msgstr "Mesaj Formatı:"
+
+#: inc-cl/da.php:42
+msgid "deviantART API Library not found"
+msgstr "deviantART API Kütüphanesi bulunamadı"
+
+#: inc-cl/da.php:43
+msgid "deviantART doesn't have a built-in API for automated posts yet."
+msgstr "deviantART henüz otomatik mesaj için yerleşik bir API yoktur."
+
+#: inc-cl/da.php:43
+msgid ""
+"<br/>You need to get a special <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/deviantart-automated-posting\"><b>API Library Module</b></a> "
+"to be able to publish your content to deviantART."
+msgstr ""
+"<br/> <b> API Kütüphanesi Modülü </ b özel <a target=\"_blank\" href="
+"\"http://www.nextscripts.com/deviantart-otomatik-posting\"> almak gerekir > "
+"</a> deviantART içerik yayınlamak mümkün."
+
+#: inc-cl/da.php:74
+msgid "%FULLTEXT%"
+msgstr "% FULLTEXT%"
+
+#: inc-cl/da.php:140
+msgid "Repost to deviantART"
+msgstr "DeviantART repost"
+
+#: inc-cl/di.php:67
+msgid "Tags from the blogpost will be auto posted to Diigo"
+msgstr "Blogpost gelen Etiketler oto Diigo ilan edilecektir"
+
+#: inc-cl/di.php:140
+msgid "Repost to Diigo"
+msgstr "Diigo için repost"
+
+#: inc-cl/dl.php:130
+msgid "Repost to Delicious"
+msgstr "Delicious repost"
+
+#: inc-cl/fb.php:75 inc-cl/tw.php:25
+msgid "Attention required. Unfinished setup"
+msgstr "Dikkat gereklidir. Bitmemiş kurulum"
+
+#: inc-cl/fb.php:86 inc-cl/gp.php:86 inc-cl/rd.php:97
+msgid "New post (%TITLE%) has been published on %SITENAME%"
+msgstr "New post (% BAŞLIK%)% SITENAME% yayımlanmaktadır"
+
+#: inc-cl/fb.php:88 inc-cl/tw.php:36
+msgctxt "timezone date format"
+msgid "Y-m-d G:i:s"
+msgstr "Ymd G: i: s"
+
+#: inc-cl/fb.php:102
+msgid "Please use in your Facebook App:"
+msgstr "Facebook App kullanın:"
+
+#: inc-cl/fb.php:118
+msgid "Could be your Facebook Profile, Facebook Page, Facebook Group"
+msgstr "Facebook Profilinizi, Facebook Sayfası, Facebook Grubumuza olabilir"
+
+#: inc-cl/fb.php:123 inc-cl/gp.php:83 inc-cl/li.php:187 inc-cl/pn.php:94
+#: inc-cl/tw.php:65 inc-cl/vk.php:99 inc-cl/yt.php:71
+msgid "Message text Format"
+msgstr "Mesaj metin biçimi"
+
+#: inc-cl/fb.php:131 inc-cl/fb.php:322 inc-cl/gp.php:97 inc-cl/gp.php:196
+#: inc-cl/rd.php:90 inc-cl/rd.php:201 inc-cl/sc.php:116 inc-cl/sc.php:229
+#: inc-cl/vk.php:112 inc-cl/vk.php:253
+msgid "Text Post"
+msgstr "Metin Mesaj"
+
+#: inc-cl/fb.php:131 inc-cl/fb.php:322 inc-cl/gp.php:97 inc-cl/gp.php:196
+#: inc-cl/sc.php:116 inc-cl/sc.php:229 inc-cl/vk.php:112 inc-cl/vk.php:253
+msgid "just text message"
+msgstr "Sadece metin mesajı"
+
+#: inc-cl/fb.php:133 inc-cl/fb.php:323 inc-cl/sc.php:117 inc-cl/vk.php:113
+#: inc-cl/vk.php:254
+msgid "Image Post"
+msgstr "Post Görüntü"
+
+#: inc-cl/fb.php:133 inc-cl/fb.php:323 inc-cl/gp.php:98 inc-cl/gp.php:197
+#: inc-cl/sc.php:117 inc-cl/sc.php:230 inc-cl/vk.php:113 inc-cl/vk.php:254
+msgid "big image with text message"
+msgstr "metin mesajı ile büyük resim"
+
+#: inc-cl/fb.php:134
+msgid "Upload Images to"
+msgstr "Için Görüntüler yükle"
+
+#: inc-cl/fb.php:135
+msgid "App Album"
+msgstr "App Albüm"
+
+#: inc-cl/fb.php:135 inc-cl/fb.php:143 inc-cl/fb.php:327
+msgid "or"
+msgstr "VEYA"
+
+#: inc-cl/fb.php:137
+msgid "Timeline"
+msgstr "Timeline"
+
+#: inc-cl/fb.php:140 inc-cl/vk.php:114
+msgid "Text Post with \"attached\" link"
+msgstr ""
+
+#: inc-cl/fb.php:142
+msgid "Link attachment type"
+msgstr "Bağlantı eki tipi"
+
+#: inc-cl/fb.php:143 inc-cl/fb.php:327
+msgid "Share a link to your blogpost"
+msgstr "Senin blogpost bir link paylaş"
+
+#: inc-cl/fb.php:145 inc-cl/fb.php:329
+msgid "Attach your blogpost"
+msgstr "Senin blogpost takın"
+
+#: inc-cl/fb.php:146
+msgid "If post has video use it as an attachment thumbnail."
+msgstr "Sonrası varsa Video eki küçük resmi olarak kullanabilirsiniz."
+
+#: inc-cl/fb.php:146
+msgid ""
+"Video will be used for an attachment thumbnail instead of featured image. "
+"Only Youtube is supported at this time."
+msgstr ""
+"Video görüntü yerine özellikli bir bağlantı thumbnail için kullanılacaktır. "
+"Sadece Youtube şu anda desteklenir."
+
+#: inc-cl/fb.php:149
+msgid "Let Facebook fill the link info"
+msgstr "Facebook link bilgisini doldurmak izin"
+
+#: inc-cl/fb.php:150
+msgid ""
+"Recommended. Facebook will automatically take attached/shared link info from "
+"OG: tags or other sources."
+msgstr ""
+"Önerilen. Etiketleri veya diğer kaynaklar: Facebook otomatik olarak OG / "
+"paylaşılan bağlantı bilgi ekli alacaktır."
+
+#: inc-cl/fb.php:154 inc-cl/li.php:198
+msgid "Attachment Text Format"
+msgstr "Eklenti Metin Biçimi"
+
+#: inc-cl/fb.php:156 inc-cl/li.php:200 inc-cl/vk.php:123
+msgid ""
+"Recommended. Info from SEO Plugins will be used, then post excerpt, then "
+"post text"
+msgstr ""
+"Önerilen. SEO Eklentileri info, sonra alıntıyı sonrası kullanılır, daha "
+"sonra metni yayınlamak"
+
+#: inc-cl/fb.php:157 inc-cl/li.php:201
+msgid "Set your own format"
+msgstr "Kendi biçimini ayarlamak"
+
+#: inc-cl/fb.php:163
+msgid "Where to upload Images"
+msgstr "Görüntüler yüklemek Nerede"
+
+#: inc-cl/fb.php:163
+msgid "(App Album)"
+msgstr "(App Albüm)"
+
+#: inc-cl/fb.php:163
+msgid ""
+"Facebook automatically creates an album for your app. Images will be grouped "
+"there as in any regular album."
+msgstr ""
+"Facebook otomatik olarak uygulaması için bir albüm oluşturur. Görüntüler "
+"herhangi düzenli bir albüm olarak orada gruplandırılmış olacak."
+
+#: inc-cl/fb.php:163
+msgid "(Timeline)"
+msgstr "(Timeline)"
+
+#: inc-cl/fb.php:163
+msgid ""
+"Images will be posted to the special \"Wall/Timeline\" album and won't be "
+"grouped. \"Wall/Timeline\" album must exist. It's created when first image "
+"posted to timeline manually."
+msgstr ""
+
+#: inc-cl/fb.php:164 inc-cl/fb.php:331
+msgid "Two ways of attaching post on Facebook"
+msgstr "Facebook mesajı takılarak iki yolu"
+
+#: inc-cl/fb.php:165 inc-cl/fb.php:332
+msgid "Facebook Post Types"
+msgstr "Facebook Mesaj Türleri"
+
+#: inc-cl/fb.php:173
+msgid "Authorize Your Facebook Account"
+msgstr "Sizin Facebook Hesabı yetkilendirme"
+
+#: inc-cl/fb.php:175
+msgid "Your Facebook Account has been authorized."
+msgstr "Sizin Facebook Hesabı yetkili olmuştur."
+
+#: inc-cl/fb.php:179
+msgid "If you get Facebook message:"
+msgstr "Eğer Facebook mesajı alırsanız:"
+
+#: inc-cl/fb.php:179
+msgid ""
+"please make sure that domain name in your Facebook App matches your website "
+"domain exactly. Please note that www. and non www. versions are different "
+"domains."
+msgstr ""
+"Facebook App web sitesi alanı tam olarak eşleşir senin içinde emin etki "
+"alanı adı olun. O www unutmayınız. ve non www. sürümleri farklı etki vardır."
+
+#: inc-cl/fb.php:194
+msgid "Facebook Comments:"
+msgstr "Facebook Comments:"
+
+#: inc-cl/fb.php:196
+msgid ""
+"Plugin could grab comments from Facebook and import them as Wordpress "
+"Comments"
+msgstr ""
+"Eklenti Facebook yorumlarına kapmak ve Wordpress Yorumlar gibi bunları ithal "
+"edip"
+
+#: inc-cl/fb.php:199
+msgid "Import Facebook Comments"
+msgstr "İthalat Facebook Comments"
+
+#: inc-cl/fb.php:202 inc-cl/tw.php:92
+msgid "Auto-approve imported comments"
+msgstr "Ithal yorumlar Otomatik onaylama"
+
+#: inc-cl/fb.php:204 inc-cl/tw.php:93
+msgid "Please activate the \"Comments Import\" from SNAP Settings Tab"
+msgstr ""
+
+#: inc-cl/fb.php:287
+msgid "Repost to Facebook"
+msgstr "Facebook repost"
+
+#: inc-cl/fb.php:289
+msgid "Import Comments from Facebook"
+msgstr "Facebook İthalat Yorumlar"
+
+#: inc-cl/fb.php:319 inc-cl/gp.php:192 inc-cl/rd.php:198 inc-cl/sc.php:228
+#: inc-cl/vk.php:251
+msgid "Post Type:"
+msgstr "Mesaj Türü:"
+
+#: inc-cl/fb.php:324 inc-cl/gp.php:198 inc-cl/sc.php:231 inc-cl/vk.php:256
+msgid "Text Post with \"attached\" blogpost"
+msgstr ""
+
+#: inc-cl/fb.php:326 inc-cl/vk.php:116
+msgid "Link attachment type:"
+msgstr "Bağlantı eki türü:"
+
+#: inc-cl/fb.php:391 inc-cl/tw.php:225
+msgid "%d comment has been imported."
+msgid_plural "%d comments has been imported."
+msgstr[0] "%d comment ithal edilmiştir."
+msgstr[1] "%d comment ithal edilmiştir."
+
+#: inc-cl/ff.php:70
+msgid "Attach Image to FriendFeed Post"
+msgstr "FriendFeed Post Image takın"
+
+#: inc-cl/ff.php:132
+msgid "Repost to FriendFeed"
+msgstr "FriendFeed repost"
+
+#: inc-cl/fl.php:110 inc-cl/fp.php:74 inc-cl/sc.php:107
+msgid ""
+"%EXCERPT% \r\n"
+"\r\n"
+"%URL%"
+msgstr ""
+
+#: inc-cl/fp.php:49
+msgid "Flipboard API Library not found"
+msgstr "Flipboard API Kütüphanesi bulunamadı"
+
+#: inc-cl/fp.php:50
+msgid "Flipboard doesn't have a built-in API for automated posts yet."
+msgstr "Flipboard henüz otomatik mesaj için yerleşik bir API yoktur."
+
+#: inc-cl/fp.php:50
+msgid ""
+"<br/><br/>You need to get a special <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/api/flipboard-automated-posting/\"><b>API Library Module</"
+"b></a> to be able to publish your content to Flipboard."
+msgstr ""
+"<br/> özel <a target=\"_blank\" href=\"http://www.nextscripts.com/api/"
+"flipboard-otomatik-posting/\"> almak <b gerekir <br/> > API Kütüphanesi "
+"Modülü </ b> </a> Flipboard için içerik yayınlamak mümkün."
+
+#: inc-cl/fp.php:72
+msgid "Comment Text Format"
+msgstr "Yorum Metin Biçimi"
+
+#: inc-cl/fp.php:161
+msgid "Comment Text Format:"
+msgstr "Text Format Yorum:"
+
+#: inc-cl/gp.php:41
+msgid "Google+ API Library not found"
+msgstr "Google+ API Kütüphanesi bulunamadı"
+
+#: inc-cl/gp.php:42
+msgid "Google+ doesn't have a built-in API for automated posts yet."
+msgstr "Google+ henüz otomatik mesaj için yerleşik bir API yoktur."
+
+#: inc-cl/gp.php:42
+msgid ""
+"The current <a target=\"_blank\" href=\"http://developers.google.com/+/api/"
+"\">Google+ API</a> is \"Read Only\" and can't be used for posting.  <br/><br/"
+">You need to get a special <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/google-plus-automated-posting\"><b>API Library Module</b></"
+"a> to be able to publish your content to Google+."
+msgstr ""
+
+#: inc-cl/gp.php:60
+msgid "Leave Empty to publish to your profile or community"
+msgstr "Profilinize ya da topluma yayımlamak Boş bırakın"
+
+#: inc-cl/gp.php:61
+msgid "Leave Empty to publish to your profile or community."
+msgstr "Profilinize ya da topluma yayımlamak Boş bırakın."
+
+#: inc-cl/gp.php:64 inc-cl/gp.php:65
+msgid "Leave Empty to publish to your profile or page"
+msgstr "Profilinize veya sayfa yayımlamak için Boş bırakın"
+
+#: inc-cl/gp.php:68
+msgid "Retrieve Categories and Page Names"
+msgstr "Kategoriler ve Sayfa Adları Al"
+
+#: inc-cl/gp.php:98
+msgid "Google+ Image Post"
+msgstr "Google+ Post Görüntü"
+
+#: inc-cl/gp.php:99
+msgid "Add blogpost to Google+ message as an attachment"
+msgstr "Ek olarak Google+ mesajı blogpost ekle"
+
+#: inc-cl/gp.php:100 inc-cl/gp.php:199
+msgid "Google+ Post Types"
+msgstr "Google+ Mesaj Türleri"
+
+#: inc-cl/gp.php:167
+msgid "Repost to Google+"
+msgstr "Google+ için Repost"
+
+#: inc-cl/gp.php:182
+msgid "Autopost has been schedulled for"
+msgstr "Autopost için schedulled edilmiştir"
+
+#: inc-cl/gp.php:197
+msgid "Post to Google+ as \"Image post\""
+msgstr ""
+
+#: inc-cl/ip.php:130
+msgid "Repost to Instapaper"
+msgstr "Instapaper repost"
+
+#: inc-cl/li.php:207
+msgid "Message title Format (Groups Only)"
+msgstr "Mesaj başlığı Biçimi (Gruplar Only)"
+
+#: inc-cl/li.php:287
+msgid "Repost to LinkedIn"
+msgstr "LinkedIn repost"
+
+#: inc-cl/li.php:316
+msgid "Title Format (Groups Only):"
+msgstr "Başlık Formatı (Sadece Gruplar):"
+
+#: inc-cl/lj.php:41
+msgid "You can setup LiveJournal blog."
+msgstr "Sen kurulum LiveJournal blogu yapabilirsiniz."
+
+#: inc-cl/lj.php:71
+msgid "Post Title and Post Text Formats"
+msgstr "Mesaj Başlığı ve Post Metin Biçimleri"
+
+#: inc-cl/lj.php:85
+msgid "Post with tags."
+msgstr "Etiketleri ile gönderin."
+
+#: inc-cl/lj.php:85
+msgid "Tags from the blogpost will be auto posted to LiveJournal"
+msgstr "Blogpost gelen Etiketler oto LiveJournal'a ilan edilecektir"
+
+#: inc-cl/lj.php:147
+msgid "Repost to LiveJournal"
+msgstr "LiveJournal'a repost"
+
+#: inc-cl/pk.php:197
+msgid "Repost to Plurk"
+msgstr "Plurk için repost"
+
+#: inc-cl/pn.php:90
+msgid "If post has a video use it instead of image"
+msgstr "Sonrası bir video varsa resmin yerine kullanmak"
+
+#: inc-cl/pn.php:90
+msgid ""
+"Video will be pinned instead of featured image. Only Youtube is supported at "
+"this time."
+msgstr ""
+"Video yerine özellikli görüntünün tutturulmuş olacaktır. Sadece Youtube şu "
+"anda desteklenir."
+
+#: inc-cl/pn.php:164
+msgid "Repost to Pinterest"
+msgstr "Pinterest için repost"
+
+#: inc-cl/pn.php:194
+msgid "Text Message Format:"
+msgstr "Metin Mesajı Formatı:"
+
+#: inc-cl/rd.php:42
+msgid "Reddit API Library not found"
+msgstr "Reddit API Kütüphanesi bulunamadı"
+
+#: inc-cl/rd.php:43
+msgid "Reddit doesn't have a built-in API for automated posts yet."
+msgstr "Reddit henüz otomatik mesaj için yerleşik bir API yoktur."
+
+#: inc-cl/rd.php:43
+msgid ""
+"<br/>You need to get a special <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/reddit-automated-posting\"><b>API Library Module</b></a> to "
+"be able to publish your content to Reddit."
+msgstr ""
+"<br/> <b> API Kütüphanesi Modülü </ b özel <a target=\"_blank\" href="
+"\"http://www.nextscripts.com/reddit-otomatik-posting\"> almak gerekir > </a> "
+"Reddit içerik yayınlamak mümkün."
+
+#: inc-cl/rd.php:88 inc-cl/rd.php:199
+msgid "Link Post"
+msgstr "Bağlantı Mesaj"
+
+#: inc-cl/rd.php:90
+msgid "set the text format below"
+msgstr "Aşağıdaki metin biçimini ayarlamak"
+
+#: inc-cl/rd.php:172
+msgid "Repost to Reddit"
+msgstr "Reddit repost"
+
+#: inc-cl/sc.php:118
+msgid "Add blogpost to message as an attachment"
+msgstr "Eki olarak iletiye blogpost ekle"
+
+#: inc-cl/sc.php:230
+msgid "Post as \"Image post\""
+msgstr ""
+
+#: inc-cl/su.php:150
+msgid "Repost to StumbleUpon"
+msgstr "StumbleUpon repost"
+
+#: inc-cl/tr.php:222
+msgid "Repost to Tumblr"
+msgstr "Tumblr için repost"
+
+#: inc-cl/tr.php:245
+msgid "Text Post. Title Format:"
+msgstr "Mesaj Metin. Başlık Formatı:"
+
+#: inc-cl/tw.php:63
+msgid "Attach Image to Twitter Post"
+msgstr "Twitter Mesaj Resmi takın"
+
+#: inc-cl/tw.php:84
+msgid "Auto Import of Replies and Mentions:"
+msgstr "Otomatik Cevap İthalat ve Mansiyonlar:"
+
+#: inc-cl/tw.php:86
+msgid ""
+"Plugin could grab Replies and Mentions from Twitter and import them as "
+"Wordpress Comments"
+msgstr ""
+"Eklenti Cevaplar kapmak ve Twitter Bahsedilenler ve Wordpress Yorumlar gibi "
+"bunları ithal edip"
+
+#: inc-cl/tw.php:88
+msgid "Import Twitter Replies"
+msgstr "İthalat Twitter Cevaplar"
+
+#: inc-cl/tw.php:90
+msgid "Import Twitter Mentions"
+msgstr "İthalat Twitter Bahsedilenler"
+
+#: inc-cl/tw.php:145
+msgid "autopost to"
+msgstr "için autopost"
+
+#: inc-cl/tw.php:148
+msgid "Repost to Twitter"
+msgstr "Twitter repost"
+
+#: inc-cl/tw.php:151
+msgid "Import Replies/Mentions from Twitter"
+msgstr "İthalat Cevaplar / Twitter 'dan Bahsedilenler"
+
+#: inc-cl/vb.php:146
+msgid "Repost to vBulletin"
+msgstr "Powered için repost"
+
+#: inc-cl/vk.php:62
+msgid "Could be your vKontakte(VK) Profile or vKontakte(VK) Group Page"
+msgstr "Sizin Vkontakte (VK) Profil veya Vkontakte (VK) Grubu Page olabilir"
+
+#: inc-cl/vk.php:65
+msgid "(It could be used for \"Text\" and \"Image\" posts)"
+msgstr ""
+
+#: inc-cl/vk.php:69
+msgid "[Create VK App]"
+msgstr "[VK App Oluştur]"
+
+#: inc-cl/vk.php:69
+msgid "[Manage VK Apps]"
+msgstr "[VK Uygulamaları Yönet]"
+
+#: inc-cl/vk.php:73
+msgid ""
+"<b>Authorize Your vKontakte(VK) Account</b>. Please click \"Update Settings"
+"\" to be able to Authorize your account."
+msgstr ""
+
+#: inc-cl/vk.php:75
+msgid "Your vKontakte(VK) Account has been authorized."
+msgstr "Sizin Vkontakte (VK) Hesap yetkili olmuştur."
+
+#: inc-cl/vk.php:86
+msgid "(It could be used for \"Text with attached link\" posts)"
+msgstr ""
+
+#: inc-cl/vk.php:95
+msgid "Please upgrade the plugin to \"PRO\" get NextScripts VK API"
+msgstr ""
+
+#: inc-cl/vk.php:106 inc-cl/vk.php:248
+msgid "Add backlink to the post"
+msgstr "Yazılan backlink ekle"
+
+#: inc-cl/vk.php:118
+msgid ""
+"<strong>If post has video use it as an attachment thumbnail.</strong> "
+"<i>Video will be used for an attachment thumbnail instead of featured image. "
+"Only Youtube is supported at this time.</i>"
+msgstr ""
+"<Strong> sonrası görüntü bir ek minik resim olarak kullanmak durumunda. </ "
+"Strong> <i> Video yerine özellikli görüntünün bir eki minik için "
+"kullanılacaktır. Sadece Youtube şu anda desteklenmektedir. </ I>"
+
+#: inc-cl/vk.php:121
+msgid "Attachment Text Format:"
+msgstr "Eklenti Metin Biçimi:"
+
+#: inc-cl/vk.php:124
+msgid "Set your own format:"
+msgstr "Kendi biçimini ayarlayın:"
+
+#: inc-cl/vk.php:225
+msgid "Repost to vKontakte(VK)"
+msgstr "Vkontakte için Repost (VK)"
+
+#: inc-cl/vk.php:257
+msgid "Post Types"
+msgstr "Mesaj Türleri"
+
+#: inc-cl/wp.php:141
+msgid "Repost to WP Blog"
+msgstr "WP Blog repost"
+
+#: inc-cl/yt.php:41
+msgid "YouTube API Library not found"
+msgstr "YouTube API Kütüphanesi bulunamadı"
+
+#: inc-cl/yt.php:42
+msgid "YouTube doesn't have a built-in API for automated posts yet."
+msgstr "YouTube henüz otomatik mesaj için yerleşik bir API yoktur."
+
+#: inc-cl/yt.php:42
+msgid ""
+"The current <a target=\"_blank\" href=\"http://developers.google.com/+/api/"
+"\">YouTube API</a> is \"Read Only\" and can't be used for posting.  <br/><br/"
+">You need to get a special <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/google-plus-automated-posting\"><b>API Library Module</b></"
+"a> to be able to publish your content to YouTube."
+msgstr ""
+
+#: inc-cl/yt.php:74
+msgid "New post: %TITLE% - %URL%"
+msgstr "Yeni Mesaj:% BAŞLIK% -% URL%"
+
+#: inc-cl/yt.php:135
+msgid "Repost to YouTube"
+msgstr "YouTube'a repost"
+
+#: nxs_functions.php:272
+msgid "Wrong key, please contact support"
+msgstr "Yanlış anahtar, desteğine başvurun"
+
+#: nxs_functions.php:422
+msgid "Inserts the Title of the post"
+msgstr "Yazının başlığı ekler"
+
+#: nxs_functions.php:422
+msgid "Inserts the URL of the post"
+msgstr "Yazının URL'sini ekler"
+
+#: nxs_functions.php:422
+msgid "Inserts the <b>shortened URL</b> of your post"
+msgstr "</ B> yazının <b> kısaltılmış URL ekler"
+
+#: nxs_functions.php:422
+msgid "Inserts the featured image URL"
+msgstr "Özellikli resim URL'sini ekler"
+
+#: nxs_functions.php:422
+msgid "Inserts the excerpt of the post (processed)"
+msgstr "Yazının alıntı ekler (işlenmiş)"
+
+#: nxs_functions.php:422
+msgid "Inserts the excerpt of the post (as typed)"
+msgstr "(Yazdığınız gibi) yazının alıntı ekler"
+
+#: nxs_functions.php:422
+msgid ""
+"Inserts the text till the &lt;!--more--&gt; tag or first N words of the post"
+msgstr ""
+"! & Lt kadar metni ekler; - daha - & gt; yazının etiket veya birinci N "
+"kelimeler"
+
+#: nxs_functions.php:422
+msgid "Inserts the processed body(text) of the post"
+msgstr "Yazının işlenmiş gövdesini (metin) ekler"
+
+#: nxs_functions.php:422
+msgid "Inserts the body(text) of the post as typed"
+msgstr "Yazdığınız gibi yazının gövdesini (metin) ekler"
+
+#: nxs_functions.php:422
+msgid "Inserts post tags"
+msgstr "Uçlar sonrası etiketleri"
+
+#: nxs_functions.php:422
+msgid "Inserts post categories"
+msgstr "Uçlar kategoriler sonrası"
+
+#: nxs_functions.php:422
+msgid "Inserts post tags as hashtags"
+msgstr "Hashtags gibi post etiketleri ekler"
+
+#: nxs_functions.php:422
+msgid "Inserts post categories as hashtags"
+msgstr "Hashtags olarak Uçlar sonrası kategoriler"
+
+#: nxs_functions.php:422
+msgid "Inserts the author's name"
+msgstr "Yazarın adını ekler"
+
+#: nxs_functions.php:422
+msgid "Inserts the the Blog/Site name"
+msgstr "Blog / Site adını ekler"
+
+#: nxs_functions.php:426
+msgid ""
+"You already have %s configured.  This plugin supports only one %s account. "
+"<br/><br/> Please consider getting <a target=\"_blank\" href=\"http://www."
+"nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts"
+"\">Multiple Accounts Edition</a> if you would like to add another %s account "
+"for auto-posting."
+msgstr ""
+
+#: nxs_functions.php:514
+msgid "Posting Delay"
+msgstr "Gecikmesi Gönderme"
+
+#: nxs_functions.php:516
+msgid "Not Compatible with \"Publish Immediately\""
+msgstr ""
+
+#: nxs_functions.php:708
+msgid "Image(s) to use:"
+msgstr "Resim (ler) kullanmak için:"
+
+#: nxs_functions.php:710
+msgid "Show all"
+msgstr "Tümünü göster"
+
+#: nxs_functions.php:718
+msgid "URL to use:"
+msgstr "URL kullanmak için:"
+
+#: nxs_functions.php:719
+msgid "Post URL or globally defined URL will be used"
+msgstr "Mesaj URL veya global tanımlanmış URL kullanılır"
+
+#: nxs_functions.php:723
+msgid ""
+"This will trigger \"Network will decide attachment info\". Image and other "
+"settings will be ignored."
+msgstr ""
+
+#: nxs_functions.php:788
+msgid "Filter Autoposting by"
+msgstr "Tarafından Autoposting Filtre"
+
+#: nxs_functions.php:790
+msgid "Categories"
+msgstr "Kategoriler"
+
+#: nxs_functions.php:791
+msgid "All"
+msgstr "Tümü"
+
+#: nxs_functions.php:792
+msgid "Selected"
+msgstr "Seçilmiş"
+
+#: nxs_functions.php:794
+msgid "Only selected categories will be autoposted to this account"
+msgstr "Sadece seçilen kategoriler bu hesaba autoposted olacak"
+
+#: nxs_functions.php:796
+msgid "Tags and Custom Taxonomies"
+msgstr "Etiketler ve Özel Taksonomiler"
+
+#: nxs_functions.php:798
+msgid ""
+"Only posts with those tags assigned will be autoposted to this account, you "
+"can include custom taxonomy tags in taxonomy_slug|tag format."
+msgstr ""
+"Etiketi formatında | Bu hesaba autoposted edilecektir atanan etiketleri "
+"Sadece mesaj, sen taxonomy_slug özel taksonomi etiketleri içerebilir."
+
+#: nxs_functions.php:810
+msgid "Auto Reposting"
+msgstr "Otomatik yineden"
+
+#: nxs_functions.php:810
+msgid "[Instructions]"
+msgstr "[Talimatlar]"
+
+#: nxs_functions.php:816
+msgid ""
+"Your WP Cron is not working correctly. Auto Reposting service is active by "
+"force. <br/> This might cause problems. Please see the test results and "
+"recommendations"
+msgstr ""
+"Sizin WP Cron düzgün çalışmıyor. Otomatik yineden hizmet zorla etkindir. <br/"
+"> Bu sorunlara neden olabilir. Test sonuçlarını ve öneriler bakınız"
+
+#: nxs_functions.php:818
+msgid ""
+"Auto Reposting service is Disabled. Your WP Cron is not working correctly. "
+"Please see the test results and recommendations"
+msgstr ""
+"Otomatik yineden hizmet Devre Dışı. Sizin WP Cron düzgün çalışmıyor. Test "
+"sonuçlarını ve öneriler bakınız"
+
+#: nxs_functions.php:824
+msgid "Plugin could autorepost existing posts"
+msgstr "Eklenti mevcut Mesajınızı autorepost olabilir"
+
+#: nxs_functions.php:826
+msgid "Repost existing posts every"
+msgstr "Repost mevcut ileti her"
+
+#: nxs_functions.php:828 nxs_functions.php:864 nxs_functions.php:865
+msgid "Days"
+msgstr "Gün"
+
+#: nxs_functions.php:829
+msgid "Hours"
+msgstr "Saat"
+
+#: nxs_functions.php:837
+msgid "Repost ONLY previously unautoposted posts"
+msgstr "SADECE daha önce unautoposted Mesajları repost"
+
+#: nxs_functions.php:842
+msgid "Repost: (Choose Posts, Pages, Custom Post Types)"
+msgstr "Repost: (Mesaj seçin Sayfalar, Özel Post Çeşitleri)"
+
+#: nxs_functions.php:852
+msgid "Get posts"
+msgstr "Mesaj alın"
+
+#: nxs_functions.php:860
+msgid "from"
+msgstr "(hesaptan)"
+
+#: nxs_functions.php:861
+msgid "to"
+msgstr "(hesaba)"
+
+#: nxs_functions.php:864
+msgid "Older then"
+msgstr "Eski sonra"
+
+#: nxs_functions.php:865
+msgid "and Newer then"
+msgstr "ve Yeni ardından"
+
+#: nxs_functions.php:892
+msgid "Set All Existing Posts to: "
+msgstr "Tüm Mevcut Mesajları ayarlayın: "
+
+#: nxs_functions.php:893
+msgid "[Enabled for Repost]"
+msgstr "[REPOST için Etkin]"
+
+#: nxs_functions.php:894
+msgid "[Disabled for Repost]"
+msgstr "[REPOST Engelli]"
+
+#: nxs_functions.php:895
+msgid ""
+"[Enabled/Disabled for Repost according to Categories/Tags/Taxonomies filters]"
+msgstr ""
+"[REPOST için / Devre Dışı Etkin Kategoriler / Etiketler / Taksonomiler "
+"filtrelere göre]"
+
+#: nxs_functions.php:898
+msgid "Last post"
+msgstr "Son mesaj"
+
+#: nxs_functions.php:898
+msgid "was re-posted on:"
+msgstr "re-yayınlanmıştır:"
+
+#: nxs_functions.php:899
+msgid "Next post will be ~"
+msgstr "Sonraki mesaj olacaktır ~"
+
+#: nxs_functions.php:900
+msgid "[Reset]"
+msgstr "[Reset]"
+
+#: nxs_functions.php:902
+msgid "Set \"Last re-posted post ID\" to:"
+msgstr ""
+
+#: nxs_functions.php:903
+msgid "[Set]"
+msgstr "[Set]"
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/nxs_functions.php b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/nxs_functions.php
new file mode 100644 (file)
index 0000000..a0d87c4
--- /dev/null
@@ -0,0 +1,1298 @@
+<?php\r
+if (!function_exists('prr')){ function prr($str) { echo "<pre>"; print_r($str); echo "</pre>\r\n"; }}        \r
+if (!function_exists('nsx_stripSlashes')){ function nsx_stripSlashes(&$value){$value = stripslashes($value);}}\r
+if (!function_exists('nsx_fixSlashes')){ function nsx_fixSlashes(&$value){ while (strpos($value, '\\\\')!==false) $value = str_replace('\\\\','\\',$value);\r
+   if (strpos($value, "\\'")!==false) $value = str_replace("\\'","'",$value); if (strpos($value, '\\"')!==false) $value = str_replace('\\"','"',$value);\r
+}}\r
+if (!function_exists('CutFromTo')){ function CutFromTo($string, $from, $to){$fstart = stripos($string, $from); $tmp = substr($string,$fstart+strlen($from)); $flen = stripos($tmp, $to);  return substr($tmp,0, $flen);}}\r
+if (!function_exists('nsx_doEncode')){ function nsx_doEncode($string,$key='NSX') { $key = sha1($key); $strLen = strlen($string);$keyLen = strlen($key); $j = 0; $hash = '';\r
+  for ($i = 0; $i < $strLen; $i++) { $ordStr = ord(substr($string,$i,1)); if ($j == $keyLen) $j = 0; $ordKey = ord(substr($key,$j,1)); $j++; $hash .= strrev(base_convert(dechex($ordStr + $ordKey),16,36));} return $hash;\r
+}}\r
+if (!function_exists('nsx_doDecode')){ function nsx_doDecode($string,$key='NSX') { $key = sha1($key); $keyLen = strlen($key); $hash = ''; $sX = str_split($string, 2560);\r
+  foreach($sX as $ss){$j=0; $sA=str_split($ss, 2); foreach($sA as $oS){$oS=hexdec(base_convert(strrev($oS),36,16)); if ($j==$keyLen) $j=0; $oK=ord(substr($key,$j,1)); $j++; $hash.=chr($oS-$oK);}} return $hash;\r
+}}\r
+if (!function_exists('nxs_decodeEntitiesFull')){ function nxs_decodeEntitiesFull($string, $quotes = ENT_COMPAT, $charset = 'utf-8') {\r
+  return html_entity_decode(preg_replace_callback('/&([a-zA-Z][a-zA-Z0-9]+);/', 'nxs_convertEntity', $string), $quotes, $charset); \r
+}}\r
+if (!function_exists('nxs_substr')){ function nxs_substr($str, $start){ preg_match_all("/./su", $str, $ar);\r
+   if(func_num_args() >= 3) { $end = func_get_arg(2); return join("",array_slice($ar[0],$start,$end)); } else return join("",array_slice($ar[0],$start));\r
+}}\r
+if (!function_exists('nxs_strLen')){ function nxs_strLen($str) { return count(str_split(utf8_decode($str))); }}\r
+if (!function_exists('nxs_convertEntity')){ function nxs_convertEntity($matches, $destroy = true) {\r
+  static $table = array('quot' => '&#34;','amp' => '&#38;','lt' => '&#60;','gt' => '&#62;','apos' => '&#39;','OElig' => '&#338;','oelig' => '&#339;','Scaron' => '&#352;','scaron' => '&#353;','Yuml' => '&#376;','circ' => '&#710;','tilde' => '&#732;','ensp' => '&#8194;','emsp' => '&#8195;','thinsp' => '&#8201;','zwnj' => '&#8204;','zwj' => '&#8205;','lrm' => '&#8206;','rlm' => '&#8207;','ndash' => '&#8211;','mdash' => '&#8212;','lsquo' => '&#8216;','rsquo' => '&#8217;','sbquo' => '&#8218;','ldquo' => '&#8220;','rdquo' => '&#8221;','bdquo' => '&#8222;','dagger' => '&#8224;','Dagger' => '&#8225;','permil' => '&#8240;','lsaquo' => '&#8249;','rsaquo' => '&#8250;','euro' => '&#8364;','fnof' => '&#402;','Alpha' => '&#913;','Beta' => '&#914;','Gamma' => '&#915;','Delta' => '&#916;','Epsilon' => '&#917;','Zeta' => '&#918;','Eta' => '&#919;','Theta' => '&#920;','Iota' => '&#921;','Kappa' => '&#922;','Lambda' => '&#923;','Mu' => '&#924;','Nu' => '&#925;','Xi' => '&#926;','Omicron' => '&#927;','Pi' => '&#928;','Rho' => '&#929;','Sigma' => '&#931;','Tau' => '&#932;','Upsilon' => '&#933;','Phi' => '&#934;','Chi' => '&#935;','Psi' => '&#936;','Omega' => '&#937;','alpha' => '&#945;','beta' => '&#946;','gamma' => '&#947;','delta' => '&#948;','epsilon' => '&#949;','zeta' => '&#950;','eta' => '&#951;','theta' => '&#952;','iota' => '&#953;','kappa' => '&#954;','lambda' => '&#955;','mu' => '&#956;','nu' => '&#957;','xi' => '&#958;','omicron' => '&#959;','pi' => '&#960;','rho' => '&#961;','sigmaf' => '&#962;','sigma' => '&#963;','tau' => '&#964;','upsilon' => '&#965;','phi' => '&#966;','chi' => '&#967;','psi' => '&#968;','omega' => '&#969;','thetasym' => '&#977;','upsih' => '&#978;','piv' => '&#982;','bull' => '&#8226;','hellip' => '&#8230;','prime' => '&#8242;','Prime' => '&#8243;','oline' => '&#8254;','frasl' => '&#8260;','weierp' => '&#8472;','image' => '&#8465;','real' => '&#8476;','trade' => '&#8482;','alefsym' => '&#8501;','larr' => '&#8592;','uarr' => '&#8593;','rarr' => '&#8594;','darr' => '&#8595;','harr' => '&#8596;','crarr' => '&#8629;','lArr' => '&#8656;','uArr' => '&#8657;','rArr' => '&#8658;','dArr' => '&#8659;','hArr' => '&#8660;','forall' => '&#8704;','part' => '&#8706;','exist' => '&#8707;','empty' => '&#8709;','nabla' => '&#8711;','isin' => '&#8712;','notin' => '&#8713;','ni' => '&#8715;','prod' => '&#8719;','sum' => '&#8721;','minus' => '&#8722;','lowast' => '&#8727;','radic' => '&#8730;','prop' => '&#8733;','infin' => '&#8734;','ang' => '&#8736;','and' => '&#8743;','or' => '&#8744;','cap' => '&#8745;','cup' => '&#8746;','int' => '&#8747;','there4' => '&#8756;','sim' => '&#8764;','cong' => '&#8773;','asymp' => '&#8776;','ne' => '&#8800;','equiv' => '&#8801;','le' => '&#8804;','ge' => '&#8805;','sub' => '&#8834;','sup' => '&#8835;','nsub' => '&#8836;','sube' => '&#8838;','supe' => '&#8839;','oplus' => '&#8853;','otimes' => '&#8855;','perp' => '&#8869;','sdot' => '&#8901;','lceil' => '&#8968;','rceil' => '&#8969;','lfloor' => '&#8970;','rfloor' => '&#8971;','lang' => '&#9001;','rang' => '&#9002;','loz' => '&#9674;','spades' => '&#9824;','clubs' => '&#9827;','hearts' => '&#9829;','diams' => '&#9830;','nbsp' => '&#160;','iexcl' => '&#161;','cent' => '&#162;','pound' => '&#163;','curren' => '&#164;','yen' => '&#165;','brvbar' => '&#166;','sect' => '&#167;','uml' => '&#168;','copy' => '&#169;','ordf' => '&#170;','laquo' => '&#171;','not' => '&#172;','shy' => '&#173;','reg' => '&#174;','macr' => '&#175;','deg' => '&#176;','plusmn' => '&#177;','sup2' => '&#178;','sup3' => '&#179;','acute' => '&#180;','micro' => '&#181;','para' => '&#182;','middot' => '&#183;','cedil' => '&#184;','sup1' => '&#185;','ordm' => '&#186;','raquo' => '&#187;','frac14' => '&#188;','frac12' => '&#189;','frac34' => '&#190;','iquest' => '&#191;','Agrave' => '&#192;','Aacute' => '&#193;','Acirc' => '&#194;','Atilde' => '&#195;','Auml' => '&#196;','Aring' => '&#197;','AElig' => '&#198;','Ccedil' => '&#199;','Egrave' => '&#200;','Eacute' => '&#201;','Ecirc' => '&#202;','Euml' => '&#203;','Igrave' => '&#204;','Iacute' => '&#205;','Icirc' => '&#206;','Iuml' => '&#207;','ETH' => '&#208;','Ntilde' => '&#209;','Ograve' => '&#210;','Oacute' => '&#211;','Ocirc' => '&#212;','Otilde' => '&#213;','Ouml' => '&#214;','times' => '&#215;','Oslash' => '&#216;','Ugrave' => '&#217;','Uacute' => '&#218;','Ucirc' => '&#219;','Uuml' => '&#220;','Yacute' => '&#221;','THORN' => '&#222;','szlig' => '&#223;','agrave' => '&#224;','aacute' => '&#225;','acirc' => '&#226;','atilde' => '&#227;','auml' => '&#228;','aring' => '&#229;','aelig' => '&#230;','ccedil' => '&#231;','egrave' => '&#232;','eacute' => '&#233;','ecirc' => '&#234;','euml' => '&#235;','igrave' => '&#236;','iacute' => '&#237;','icirc' => '&#238;','iuml' => '&#239;','eth' => '&#240;','ntilde' => '&#241;','ograve' => '&#242;','oacute' => '&#243;','ocirc' => '&#244;','otilde' => '&#245;','ouml' => '&#246;','divide' => '&#247;','oslash' => '&#248;','ugrave' => '&#249;','uacute' => '&#250;','ucirc' => '&#251;','uuml' => '&#252;','yacute' => '&#253;','thorn' => '&#254;','yuml' => '&#255;');\r
+  if (isset($table[$matches[1]])) return $table[$matches[1]];\r
+  // else \r
+  return $destroy ? '' : $matches[0];\r
+}}\r
+if (!function_exists('nxs_decodeEntities')){function nxs_decodeEntities($text) {\r
+    $text= html_entity_decode($text,ENT_QUOTES,"ISO-8859-1"); #NOTE: UTF-8 does not work!\r
+    $text= preg_replace('/&#(\d+);/me',"chr(\\1)",$text); #decimal notation\r
+    $text= preg_replace('/&#x([a-f0-9]+);/mei',"chr(0x\\1)",$text);  #hex notation\r
+    return $text;\r
+}}\r
+if (!function_exists('nsFindImgsInPost')){function nsFindImgsInPost($post, $advImgFnd=false) { global $ShownAds; if (isset($ShownAds)) $ShownAdsL = $ShownAds;  $postImgs = array(); if (!is_object($post)) return;\r
+  if ($advImgFnd) $postCntEx = apply_filters('the_content', $post->post_excerpt); else $postCntEx = $post->post_excerpt;   \r
+  if ($advImgFnd) $postCnt = apply_filters('the_content', $post->post_content); else $postCnt = $post->post_content; \r
+  $postCnt = $postCntEx.$postCnt;\r
+  //$output = preg_match_all( '/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $postCnt, $matches ); if ($output === false){return false;} \r
+  //$postCnt = str_replace("'",'"',$postCnt); $output = preg_match_all( '/src="([^"]*)"/', $postCnt, $matches ); if ($output === false){return false;}\r
+  $postCnt = str_replace("'",'"',$postCnt); $output = preg_match_all( '/< *img[^>]*src *= *["\']?([^"\']*)/i', $postCnt, $matches ); // prr($matches);  \r
+  if ($output === false || $output == 0){ $vids = nsFindVidsInPost($post, $advImgFnd==false); if (count($vids)>0)  $postImgs[] = 'http://img.youtube.com/vi/'.$vids[0].'/0.jpg';  else return false;} \r
+    else { foreach ($matches[1] as $match) { if (!preg_match('/^https?:\/\//', $match ) ) $match = site_url( '/' ) . ltrim( $match, '/' ); $postImgs[] = $match;} if (isset($ShownAds)) $ShownAds = $ShownAdsL; }  \r
+  return $postImgs;\r
+}}\r
+\r
+\r
+if (!function_exists('nsFindAudioInPost')){function nsFindAudioInPost($post, $raw=true) {  //### !!!   $raw=false Breaks ob_start() [ref.outcontrol]: Cannot use output buffering in output buffering display handlers - Investigate\r
+  global $ShownAds; if (isset($ShownAds)) $ShownAdsL = $ShownAds; $postVids = array();\r
+  if (is_object($post)) { if ($raw) $postCnt = $post->post_content; else $postCnt = apply_filters('the_content', $post->post_content); } else $postCnt = $post;\r
+  $regex_pattern = "((https?|ftp|gopher|telnet|file|notes|ms-help):((//)|(\\\\))+[\w\d:#@%/;$()~_?\+-=\\\.&]*\.(mp3|aac|m4a))";\r
+  $output = preg_match_all( $regex_pattern, $postCnt, $matches );  if ($output === false){return false;}    \r
+  foreach ($matches[0] as $match) { $postAu[] = $match; } $postAu = array_unique($postAu); if (isset($ShownAds)) $ShownAds = $ShownAdsL; return $postAu;\r
+}}\r
+if (!function_exists('nsGetYTThumb')){function nsGetYTThumb($yt) {  \r
+  $out = 'http://img.youtube.com/vi/'.$yt.'/maxresdefault.jpg'; $response  = wp_remote_get($out); \r
+  if (is_wp_error($response) || $response['response']['code']!='200' ) { $out = 'http://img.youtube.com/vi/'.$yt.'/sddefault.jpg';  \r
+    $response  = wp_remote_get($out); if (is_wp_error($response) || $response['response']['code']!='200' ) $out = 'http://img.youtube.com/vi/'.$yt.'/0.jpg';\r
+  } return $out;  \r
+}}\r
+if (!function_exists('nsFindVidsInPost')){function nsFindVidsInPost($post, $raw=true) {  //### !!!  $raw=false ## Breaks ob_start() [ref.outcontrol]: Cannot use output buffering in output buffering display handlers - Investigate\r
+  global $ShownAds; if (isset($ShownAds)) $ShownAdsL = $ShownAds; $postVids = array();\r
+  if (is_object($post)) { if ($raw) $postCnt = $post->post_content; else $postCnt = apply_filters('the_content', $post->post_content); } else $postCnt = $post; //prr($postCnt);\r
+  $postCnt = preg_replace('/youtube.com\/vi\/(.*)\/(.*).jpg/isU', "youtube.com/v/$1/", $postCnt);  \r
+  $output = preg_match_all( '@((https?://)?([-\w]+\.[-\w\.]+)+\w(:\d+)?(/([-\w/_\.]*(\?\S+)?)?(#[a-z_.-][a-z0-9+\$_.-]*)?)*)@', $postCnt, $matches ); if ($output === false){return false;} \r
+  foreach ($matches[0] as $match) {  \r
+     $output2 = preg_match_all( '%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"<>&?/ ]{11})%i', $match, $matches2 ); if ($output2 === false){return false;} \r
+     foreach ($matches2[1] as $match2) {  $match2 = trim($match2); if (strlen($match2)==11) $postVids[] = $match2;} \r
+     $output3 = preg_match_all( '/^https?:\/\/(www\.)?vimeo\.com\/(clip\:)?(\d+).*$/', $match, $matches3 );  if ($output3 === false){return false;} \r
+     foreach ($matches3[3] as $match3) {  $match3 = trim($match3); if (strlen($match3)==8 || strlen($match3)==9) $postVids[] = $match3;} \r
+     $output3 = preg_match_all( '#https?://(player\.)?vimeo\.com(/video)?/(\d+)#i', $match, $matches3 );  if ($output3 === false){return false;} \r
+     foreach ($matches3[3] as $match3) {  $match3 = trim($match3); if (strlen($match3)==8 || strlen($match3)==9) $postVids[] = $match3;}      \r
+     $output3 = preg_match_all( '#https?://(www\.)?facebook\.com/video\.php\?v=(\d+)#i', $match, $matches3 ); if ($output3 === false){return false;} \r
+     foreach ($matches3[2] as $match3) {  $match3 = trim($match3); if (strlen($match3)==15) $postVids[] = $match3;} \r
+     $output3 = preg_match_all( '#https?://(www\.)?facebook\.com/video/embed(/)?\?video_id=(\d+)#i', $match, $matches3 ); if ($output3 === false){return false;} \r
+     foreach ($matches3[3] as $match3) {  $match3 = trim($match3); if (strlen($match3)==15) $postVids[] = $match3;} \r
+  }   $postVids = array_unique($postVids); if (isset($ShownAds)) $ShownAds = $ShownAdsL; return $postVids;  \r
+}}\r
+if (!function_exists('nsTrnc')){ function nsTrnc($string, $limit, $break=" ", $pad=" ...") { if(nxs_strLen($string) <= $limit) return $string; if(nxs_strLen($pad) >= $limit) return ''; $string = nxs_substr($string, 0, $limit-nxs_strLen($pad)); \r
+  $brLoc = strripos($string, $break);  if ($brLoc===false) return $string.$pad; else return nxs_substr($string, 0, $brLoc).$pad; \r
+}}\r
+if (!function_exists('nsSubStrEl')){ function nsSubStrEl($string, $length, $end='...'){ if (strlen($string) > $length){ $length -= strlen($end); $string  = substr($string, 0, $length); $string .= $end; } return $string;}}\r
+\r
+if (!function_exists('nxs_snapCleanHTML')){ function nxs_snapCleanHTML($html) { \r
+    $html = preg_replace('/<script\b[^>]*>(.*?)<\/script>/is', "", $html); $html = preg_replace('/<!--(.*)-->/Uis', "", $html); return $html;\r
+}}\r
+if (!function_exists("nxs_getNXSHeaders")) {  function nxs_getNXSHeaders($ref='', $post=false){ $hdrsArr = array(); \r
+ $hdrsArr['Connection']='keep-alive'; $hdrsArr['Referer']=$ref;\r
+ $hdrsArr['User-Agent']='Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.22 Safari/537.11';\r
+ if($post) $hdrsArr['Content-Type']='application/x-www-form-urlencoded'; \r
+ $hdrsArr['Accept']='application/json, text/javascript, */*; q=0.01';  \r
+ if (function_exists('gzdeflate')) $hdrsArr['Accept-Encoding']='gzip,deflate,sdch'; \r
+ $hdrsArr['Accept-Language']='en-US,en;q=0.8'; $hdrsArr['Accept-Charset']='ISO-8859-1,utf-8;q=0.7,*;q=0.3'; return $hdrsArr;\r
+}}\r
+if (!function_exists('nxs_chckRmImage')){function nxs_chckRmImage($url, $chType='head'){ if( ini_get('allow_url_fopen')=='1' && @getimagesize($url)!==false) return true;\r
+  $hdrsArr = nxs_getNXSHeaders(); $nxsWPRemWhat = 'wp_remote_'.$chType; $rsp  = $nxsWPRemWhat($url, array('headers' => $hdrsArr));  \r
+  if(is_wp_error($rsp)) { nxs_addToLogN('E', 'Error', 'IMAGE', '-=ERROR=- Server can\'t access it\'s own images. (Image URL: '.$url.') Most probably it\'s a DNS problem. Please contact your hosting provider. '.serialize($rsp), ''); return false; }\r
+  if (is_array($rsp) && ($rsp['response']['code']=='200' || ( $rsp['response']['code']=='403' &&  $rsp['headers']['server']=='cloudflare-nginx') )) return true; \r
+    else { if ($chType=='head') { return  nxs_chckRmImage($url, 'get'); } else { nxs_addToLogN('E', 'Error', 'IMAGE', '-=ERROR=- Server can\'t access it\'s own images. (Image URL: '.$url.') Most probably it\'s a DNS problem. Please contact your hosting provider. '.serialize($rsp), $url); return false; }\r
+    } \r
+}}\r
+if (!function_exists('nxs_getPostImage')){ function nxs_getPostImage($postID, $size='large', $def='') { $imgURL = '';  global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; $options['sImg'] = (defined('NXSAPIVER') && NXSAPIVER == '2.15.11')?1:0; \r
+  if (empty($options['imgNoCheck']) || $options['imgNoCheck'] != '1') { $indx = rand(0, 2); \r
+    $iTstArr = array('https://www.bing.com/s/a/hpc12.png','https://www.apple.com/global/elements/flags/16x16/usa_2x.png','https://s.yimg.com/rz/l/yahoo_en-US_f_p_142x37.png'); \r
+    $imgURL = $iTstArr[$indx]; $res = nxs_chckRmImage($imgURL); $imgURL = ''; if (!$res) $options['imgNoCheck'] = '1'; } if ($options['sImg']==1) return $options['useSSLCert'].'/logo2.png';\r
+  //## Featured Image from Specified Location\r
+  if ((int)$postID>0 && isset($options['featImgLoc']) && $options['featImgLoc']!=='') {  $afiLoc= get_post_meta($postID, $options['featImgLoc'], true); \r
+    if (is_array($afiLoc) && $options['featImgLocArrPath']!='') { $cPath = $options['featImgLocArrPath'];\r
+      while (strpos($cPath, '[')!==false){ $arrIt = CutFromTo($cPath, '[', ']'); $arrIt = str_replace("'", "", str_replace('"', '', $arrIt)); $afiLoc = $afiLoc[$arrIt]; $cPath = substr($cPath, strpos($cPath, ']'));}    \r
+    } $imgURL = trim($options['featImgLocPrefix']).trim($afiLoc); if ($imgURL!='' && stripos($imgURL, 'http')===false) $imgURL =  home_url().$imgURL;\r
+  }\r
+  if ($imgURL!='' && $options['imgNoCheck']!='1' && nxs_chckRmImage($imgURL)==false) $imgURL = '';  if ($imgURL!='') return $imgURL;\r
+  //## Featured Image\r
+  if ($imgURL=='') { if ((int)$postID>0 && function_exists("get_post_thumbnail_id") && function_exists('has_post_thumbnail') && has_post_thumbnail($postID) ){ \r
+    $imgURL = wp_get_attachment_image_src(get_post_thumbnail_id($postID), $size); $imgURL = $imgURL[0]; if ((trim($imgURL)!='')  && substr($imgURL, 0, 4)!='http') $imgURL = site_url($imgURL);\r
+  }} \r
+  if ($imgURL!='' && $options['imgNoCheck']!='1' && nxs_chckRmImage($imgURL)==false) $imgURL = ''; if ($imgURL!='') return $imgURL;  \r
+  //## plugin/categories-images\r
+  if ((int)$postID>0 && function_exists('z_taxonomy_image_url')) {  $post_categories = wp_get_post_categories( $postID );\r
+    foreach($post_categories as $c){ $cat = get_category( $c );  $imgURL = trim(z_taxonomy_image_url($cat->term_id)); if ($imgURL!='') break; }\r
+    if ($imgURL!='' && substr($imgURL, 0, 4)!='http') {\r
+      $stURL = site_url(); if (substr($stURL, -1)=='/') $stURL = substr($stURL, 0, -1);  if ($imgURL!='') $imgURL = $stURL.$imgURL; \r
+    }\r
+  }\r
+  if ($imgURL!='' && $options['imgNoCheck']!='1' && nxs_chckRmImage($imgURL)==false) $imgURL = ''; if ($imgURL!='') return $imgURL;\r
+  //## YAPB\r
+  if ((int)$postID>0 && class_exists("YapbImage")) { $imgURLObj = YapbImage::getInstanceFromDb($postID); if (is_object($imgURLObj)) $imgURL = $imgURLObj->uri; \r
+    $stURL = site_url(); if (substr($stURL, -1)=='/') $stURL = substr($stURL, 0, -1);  if ($imgURL!='') $imgURL = $stURL.$imgURL; \r
+  }\r
+  if ($imgURL!='' && $options['imgNoCheck']!='1' && nxs_chckRmImage($imgURL)==false) $imgURL = ''; if ($imgURL!='') return $imgURL;\r
+  //## Find Images in Post\r
+  if ((int)$postID>0 && $imgURL=='') {$post = get_post($postID); $imgsFromPost = nsFindImgsInPost($post, $options['useUnProc'] == '1'); if (is_array($imgsFromPost) && count($imgsFromPost)>0) $imgURL = $imgsFromPost[0]; } //echo "##".count($imgsFromPost); prr($imgsFromPost);\r
+  if ($imgURL!='' && $options['imgNoCheck']!='1' && nxs_chckRmImage($imgURL)==false) $imgURL = ''; if ($imgURL!='') return $imgURL;\r
+  //## Attachements\r
+  if ((int)$postID>0 && $imgURL=='') { $attachments = get_posts(array('post_type' => 'attachment', 'posts_per_page' => -1, 'post_parent' => $postID)); \r
+      if (is_array($attachments) && count($attachments)>0 && is_object($attachments[0])) { $imgURL = wp_get_attachment_image_src($attachments[0]->ID, $size); $imgURL = $imgURL[0]; }     \r
+  }\r
+  if ($imgURL!='' && $options['imgNoCheck']!='1' && nxs_chckRmImage($imgURL)==false) $imgURL = ''; if ($imgURL!='') return $imgURL;    \r
+  //## Default\r
+  if (trim($imgURL)=='' && trim($def)=='') $imgURL = $options['ogImgDef']; \r
+  if (trim($imgURL)=='' && trim($def)!='') $imgURL = $def; \r
+\r
+  return $imgURL;\r
+}}\r
+if (!function_exists('nxs_makeURLParams')){ function nxs_makeURLParams($params) {  global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;\r
+    if (!isset($options['addURLParams']) || $options['addURLParams']=='') return false; else $templ = $options['addURLParams'];\r
+    if (preg_match('%NTNAME%', $templ)) $templ = str_ireplace("%NTNAME%", urlencode($params['NTNAME']), $templ);\r
+    if (preg_match('%NTCODE%', $templ)) $templ = str_ireplace("%NTCODE%", urlencode($params['NTCODE']), $templ);\r
+    if (preg_match('%ACCNAME%', $templ)) $templ = str_ireplace("%ACCNAME%", urlencode($params['ACCNAME']), $templ);\r
+    if (preg_match('%POSTID%', $templ)) $templ = str_ireplace("%POSTID%", urlencode($params['POSTID']), $templ);\r
+    if (preg_match('%POSTTITLE%', $templ)) { $post = get_post($params['POSTID']); if (is_object($post)) {$postName = $post->post_title; $templ = str_ireplace("%POSTTITLE%", urlencode($postName), $templ);}}\r
+    if (preg_match('%SITENAME%', $templ)) { $siteTitle = urlencode(htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES)); $templ = str_ireplace("%SITENAME%", $siteTitle, $templ); }\r
+    return $templ;\r
+}}\r
+\r
+function nxs_tiny_mce_before_init($init) { global $tinymce_version; \r
+  if (substr($tinymce_version,0,1)<4) $init['setup'] = "function( ed ) { ed.onChange.add( function( ed, e ) {  nxs_updateGetImgsX( e );   }); }"; else\r
+    $init['setup'] = "function(ed) {ed.on('NodeChange', function(e){nxs_updateGetImgsX(e);});}";     \r
+    return $init;\r
+}\r
+\r
+//## CSS && JS\r
+if (!function_exists("jsPostToSNAP")) { function jsPostToSNAP() {  global $nxs_snapAvNts, $nxs_plurl; ?>\r
+    <script type="text/javascript" >  \r
+    function nxs_updateGetImgsX(e){ }\r
+    jQuery(document).on('change', '#content', function( e ) { nxs_updateGetImgsX( e ); });\r
+    \r
+    function nxs_updateGetImgsXX(e){ \r
+      var targetId = e.target.id; \r
+      var text = 'Kortinko';\r
+      switch ( targetId ) {\r
+         case 'content':\r
+             text = jQuery('#content').val(); \r
+             break;\r
+         case 'tinymce':\r
+             if ( tinymce.activeEditor ) text = tinymce.activeEditor.getContent();\r
+             break;\r
+      }\r
+      jQuery('.nxs_imgPrevList').html( text );\r
+    }    \r
+    function nxs_clPrvImgShow(tIdN){ jQuery("#isAutoImg-"+tIdN).trigger('click'); jQuery("#isAutoImg-"+tIdN).trigger('click');  }    \r
+    function nxs_clPrvImg(id, ii){ jQuery("#imgToUse-"+ii).val(jQuery("#"+id+" img").attr('src')); jQuery(".nxs_prevIDiv"+ii+" .nxs_checkIcon").hide();\r
+      jQuery(".nxs_prevIDiv"+ii).removeClass("nxs_chImg_selDiv"); jQuery(".nxs_prevIDiv"+ii+" img").removeClass("nxs_chImg_selImg"); \r
+      jQuery("#"+id+" img").addClass("nxs_chImg_selImg"); jQuery("#"+id).addClass("nxs_chImg_selDiv"); jQuery("#"+id+" .nxs_checkIcon").show();\r
+    }    \r
+    function nxs_getOriginalWidthOfImg(img_element) { var t = new Image();  t.src = (img_element.getAttribute ? img_element.getAttribute("src") : false) || img_element.src; /* alert(t.src+" | "+t.width); */ return t.width; }        \r
+    function nxs_updateGetImgs(e){ \r
+        var textOut='';\r
+        var tId = e.target.id; \r
+        var tIdN = tId.replace("isAutoImg-", "");\r
+        if ( tinymce.activeEditor ) text = tinymce.activeEditor.getContent(); else text = jQuery('#content').val();                \r
+        jQuery('#NS_SNAP_AddPostMetaTags').append('<div id="nxs_tempDivImgs" style="display: none;"></div>'); jQuery('#nxs_tempDivImgs').append(text);\r
+        var textOutA = new Array(); var currSelImg =  jQuery("#imgToUse-"+tIdN).val();\r
+                \r
+        textOutA.push('http://cdn.gtln.us/img/nxs/noImgC.png');  \r
+        //var fImg = jQuery('.attachment-post-thumbnail').attr('src'); if (fImg!='' && fImg!=undefined) { textOutA.push(fImg); if (currSelImg=='') currSelImg = fImg; }        \r
+        var fImg = jQuery('#set-post-thumbnail > img').attr('src'); if (fImg!='' && fImg!=undefined) { textOutA.push(fImg); if (currSelImg=='') currSelImg = fImg; }        \r
+        var fImg = jQuery('#yapbdiv img').attr('src'); if (fImg!='' && fImg!=undefined) { textOutA.push(fImg); if (currSelImg=='') currSelImg = fImg; }\r
+        \r
+        jQuery('#nxs_tempDivImgs img').each(function(){ var prWidth; prWidth = nxs_getOriginalWidthOfImg(this); if (prWidth!=1) textOutA.push(jQuery(this).attr('src'));  });                \r
+        jQuery('#nxs_tempDivImgs').remove();\r
+        var index;  for (index = 0; index < textOutA.length; ++index) { var isSel = currSelImg == textOutA[index] ? 'nxs_chImg_selImg' : ''; var isSelDisp = currSelImg == textOutA[index] ? 'style="display:block;"' : ''; \r
+          textOut = textOut + '<div class="nxs_prevIDiv'+tIdN+' nxs_prevImagesDiv" id="nxs_idiv'+tIdN+index+'" onclick="nxs_clPrvImg(\'nxs_idiv'+tIdN+index+'\', \''+tIdN+'\');"><img class="nxs_prevImages '+isSel+'" src="'+textOutA[index]+'"><div '+isSelDisp+' class="nxs_checkIcon"><div class="media-modal-icon"></div></div></div>'; \r
+        }\r
+        jQuery('#imgPrevList-'+tIdN).html( textOut );\r
+        if (jQuery('#'+tId).is(":checked")) jQuery('#imgPrevList-'+tIdN).hide(); else {  jQuery('#nxs_'+tIdN+'_idivD').hide(); jQuery('#imgPrevList-'+tIdN).show();  }\r
+        \r
+    }\r
+    \r
+    jQuery(document).on('change', '.isAutoURL', function( e ) {    var tId = e.target.id; var tIdN = tId.replace("isAutoURL-", "");\r
+       if (jQuery('#'+tId).is(":checked")) { jQuery('#isAutoURLFld-'+tIdN).hide(); jQuery('#URLToUse-'+tIdN).val(''); } else { jQuery('#isAutoURLFld-'+tIdN).show(); }\r
+    });    \r
+    jQuery(document).on('change', '.isAutoImg', function( e ) {   \r
+        nxs_updateGetImgs( e );\r
+    });    \r
+    jQuery(document).on('change', '#wp-content-editor-container #conXXtent', function() {\r
+        nxs_updateGetImgs();\r
+    });\r
+    jQuery(document).on('change', '#tinXXymce', function() {\r
+        nxs_updateGetImgs();\r
+    });       \r
+    jQuery(document).ready(function($) {          \r
+    <?php       \r
+      foreach ($nxs_snapAvNts as $avNt) {?>\r
+        jQuery('input#rePostTo<?php echo $avNt['code']; ?>_button').click(function() { var data = { action: 'rePostTo<?php echo $avNt['code']; ?>', id: jQuery('input#post_ID').val(), nid:jQuery(this).attr('alt'), _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val()}; callAjSNAP(data, '<?php echo $avNt['name']; ?>'); });\r
+    <?php } \r
+     foreach ($nxs_snapAvNts as $avNt) {?>\r
+        jQuery('input#riTo<?php echo $avNt['code']; ?>_button').click(function() { var data = { action: 'rePostTo<?php echo $avNt['code']; ?>', id: jQuery('input#post_ID').val(), ri:1, nid:jQuery(this).attr('alt'), _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val()}; callAjSNAP(data, '<?php echo $avNt['name']; ?>'); });\r
+    <?php } ?>\r
+       function callAjSNAP(data, label) { \r
+            var style = "position: fixed; display: none; z-index: 1000; top: 50%; left: 50%; background-color: #E8E8E8; border: 1px solid #555; padding: 15px; width: 350px; min-height: 80px; margin-left: -175px; margin-top: -40px; text-align: center; vertical-align: middle;";\r
+            jQuery('body').append("<div id='test_results' style='" + style + "'></div>");\r
+            jQuery('#test_results').html("<p>Sending update to "+label+"</p>" + "<p><img src='<?php echo $nxs_plurl; ?>img/ajax-loader-med.gif' /></p>");\r
+            jQuery('#test_results').show();            \r
+            jQuery.post(ajaxurl, data, function(response) { if (response=='') response = 'Message Posted';\r
+                jQuery('#test_results').html('<p> ' + response + '</p>' +'<input type="button" class="button" name="results_ok_button" id="results_ok_button" value="OK" />');\r
+                jQuery('#results_ok_button').click(remove_results);\r
+            });            \r
+        }        \r
+        function remove_results() { jQuery("#results_ok_button").unbind("click");jQuery("#test_results").remove();\r
+            if (typeof document.body.style.maxHeight == "undefined") { jQuery("body","html").css({height: "auto", width: "auto"}); jQuery("html").css("overflow","");}\r
+            document.onkeydown = "";document.onkeyup = "";  return false;\r
+        }\r
+    });\r
+    </script>    \r
+    <?php\r
+  }\r
+}\r
+if (!function_exists("nxs_jsPostToSNAP2")){ function nxs_jsPostToSNAP2() { global $nxs_snapAvNts, $nxs_snapThisPageUrl, $plgn_NS_SNAutoPoster, $nxs_plurl; \r
+   if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+?>\r
+            \r
+<script type="text/javascript">   \r
+\r
+ jQuery(function(){\r
+    jQuery("form .categorydiv .selectit input:checkbox").click ( function(){ var nxs_isLocked = jQuery('#nxsLockIt').val(); if (nxs_isLocked=='1') return; \r
+       var thVal = jQuery(this).val();  if (!jQuery(this).is(":checked")) return;        \r
+       \r
+       var arr = [<?php if (!empty($options['exclCats'])) { $xarr = maybe_unserialize($options['exclCats']); if (is_array($xarr)) echo "'".implode("','", $xarr)."'"; } ?>];\r
+       if ( jQuery.inArray(thVal, arr)>-1) jQuery('.nxsGrpDoChb').removeAttr('checked'); else jQuery(".nxsGrpDoChb[title='def']").attr('checked','checked');\r
+       \r
+       jQuery(".nxs_SC").each(function(index) { var cats = jQuery(this).val();  var catsA = cats.split(','); uqID = jQuery(this).attr('id'); uqID = uqID.replace("nxs_SC_", "do", "gi");\r
+         if (jQuery.inArray(thVal, catsA)>-1)  jQuery('#'+uqID).attr('checked','checked')\r
+        // alert( uqID + "|" + catsA +  "|" + thVal);  \r
+       }); \r
+       \r
+       jQuery(".nxs_TG").each(function(index) { var cats = jQuery(this).val();  var catsA = cats.split(','); uqID = jQuery(this).attr('id'); uqID = uqID.replace("nxs_TG_", "do", "gi");\r
+         if (jQuery.inArray(thVal, catsA)>-1)  jQuery('#'+uqID).attr('checked','checked')\r
+        // alert( uqID + "|" + catsA +  "|" + thVal);  \r
+       });        \r
+       \r
+    });\r
+  });\r
+   \r
+  function seFBA(pgID,fbAppID,fbAppSec){ var data = { pgID: pgID, action: 'nsAuthFBSv', _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val()}; \r
+    jQuery.post(ajaxurl, data, function(response) {  \r
+      window.location = "https://www.facebook.com/dialog/oauth?client_id="+fbAppID+"&client_secret="+fbAppSec+"&scope=publish_stream,offline_access,read_stream,manage_pages&redirect_uri=<?php echo $nxs_snapThisPageUrl;?>";\r
+    });                       \r
+  }\r
+  function doLic(){ var lk = jQuery('#eLic').val();  jQuery.post(ajaxurl,{lk:lk, action: 'nxsDoLic', id: 0, _wpnonce: jQuery('input#doLic_wpnonce').val()}, function(j){ \r
+      if (jQuery.trim(j)=='OK') window.location = "<?php echo $nxs_snapThisPageUrl; ?>"; else alert('<?php _e('Wrong key, please contact support', 'social-networks-auto-poster-facebook-twitter-g'); ?>');\r
+    }, "html")\r
+  }\r
+  function testPost(nt, nid){ jQuery(".blnkg").hide(); <?php foreach ($nxs_snapAvNts as $avNt) {?>\r
+    if (nt=='<?php echo $avNt['code']; ?>') { \r
+       var data = { action: 'rePostTo<?php echo $avNt['code']; ?>', id: 0, nid: nid, _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val()}; callAjSNAP(data, '<?php echo $avNt['name']; ?>'); \r
+    }<?php } ?>\r
+  }\r
+  \r
+  function nxs_doTabs(){\r
+    jQuery('#nxsAPIUpd').dblclick(function() { doLic(); });\r
+    //When page loads...\r
+    jQuery(".nsx_tab_content").hide(); //Hide all content\r
+    jQuery("ul.nsx_tabs > li:first-child").addClass("active").show(); //Activate first tab\r
+    jQuery(".nsx_tab_container > .nsx_tab_content:first-child").show(); //Show first tab content\r
+\r
+    //On Click Event\r
+    jQuery("ul.nsx_tabs li").click(function() {\r
+      jQuery(this).parent().children("li").removeClass("active"); //Remove any "active" class\r
+      jQuery(this).addClass("active"); //Add "active" class to selected tab\r
+      jQuery(this).parent().parent().children(".nsx_tab_container").children(".nsx_tab_content").hide(); //Hide all tab content    \r
+      var activeTab = jQuery(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content\r
+      jQuery(activeTab).show(); //Fade in the active ID content\r
+      return false;\r
+    });\r
+      \r
+  }\r
+  \r
+  function nxs_doTabsInd(iid){    \r
+    //When page loads...\r
+    jQuery(iid+" .nsx_tab_content").hide(); //Hide all content\r
+    jQuery(iid+" ul.nsx_tabs > li:first-child").addClass("active").show(); //Activate first tab\r
+    jQuery(iid+" .nsx_tab_container > .nsx_tab_content:first-child").show(); //Show first tab content\r
+\r
+    //On Click Event\r
+    jQuery(iid+" ul.nsx_tabs li").click(function() {\r
+      jQuery(this).parent().children("li").removeClass("active"); //Remove any "active" class\r
+      jQuery(this).addClass("active"); //Add "active" class to selected tab\r
+      jQuery(this).parent().parent().children(".nsx_tab_container").children(".nsx_tab_content").hide(); //Hide all tab content    \r
+      var activeTab = jQuery(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content\r
+      jQuery(activeTab).show(); //Fade in the active ID content\r
+      return false;\r
+    });\r
+      \r
+  }\r
+  \r
+  function nxs_in_array(needle, haystack) { for(var i in haystack) { if(haystack[i] == needle) return true;} return false; }\r
+  \r
\r
+  \r
+  jQuery(document).ready(function() {    nxs_doTabs();\r
+    //## Check for excluded Tags    \r
+    var nxs_curTagsValue = []; jQuery('.the-tags').each(function() {if (jQuery(this).val()!='') nxs_curTagsValue[jQuery(this).attr('id')] = jQuery(this).val(); });\r
+    jQuery(function () { setTimeout(nxs_checkTagsChangesX, 50); });\r
+    \r
+    function nxs_checkTagsChangesX() { var isChanged = false; var nxs_isLocked = jQuery('#nxsLockIt').val(); if (nxs_isLocked=='1') return;\r
+      jQuery('.the-tags').each(function() {       \r
+        currentValue = jQuery( this ).val(); currID = jQuery(this).attr('id');   //   console.log( currID );   \r
+        if ((currentValue) && currentValue != nxs_curTagsValue[currID] && currentValue != '') isChanged = true;\r
+      });          \r
+      if (isChanged) { //## Changed\r
+        jQuery('.the-tags').each(function() { if (jQuery(this).val()!='') nxs_curTagsValue[jQuery(this).attr('id')] = jQuery(this).val(); });\r
+        var nxs_curTagsValueX = ''; var tValX = [];\r
+        jQuery('.the-tags').each(function() { \r
+           var tVals = jQuery( this ).val().toLowerCase().split(","); var tID = jQuery( this ).attr('id').replace("tax-input-",""); \r
+           for(var ii in tVals) tValX.push(tID+"|"+jQuery.trim(tVals[ii])); \r
+        }); //  console.log( tValX );\r
+        jQuery(".nxs_TG").each(function(index) { var cats = jQuery(this).val();  var catsA = cats.split(','); uqID = jQuery(this).attr('id'); uqID = uqID.replace("nxs_TG_", "do", "gi");\r
+          // console.log( uqID ); console.log( JSON.stringify( catsA ) );\r
+        for(var ii in catsA) { var tgVal = jQuery.trim(catsA[ii]).toLowerCase();\r
+          if (tgVal.indexOf("|")<1 && tgVal!="") tgVal = "post_tag|"+tgVal;\r
+          if (tgVal!="" && jQuery.inArray(tgVal, tValX)>-1) {  jQuery('#'+uqID).attr('checked','checked'); }           \r
+        }        \r
+        });\r
+      } setTimeout(nxs_checkTagsChangesX, 50);\r
+    }\r
+    \r
+  });\r
+</script>\r
+\r
+<style type="text/css">\r
+.NXSButton { background-color:#89c403;\r
+    background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #89c403), color-stop(1, #77a809) );\r
+    background:-moz-linear-gradient( center top, #89c403 5%, #77a809 100% );\r
+    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#89c403', endColorstr='#77a809');    \r
+    -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px; border:1px solid #74b807; display:inline-block; color:#ffffff;\r
+    font-family:Trebuchet MS; font-size:12px; font-weight:bold; padding:4px 5px;  text-decoration:none;  text-shadow:1px 1px 0px #528009;\r
+}.NXSButton:hover {color:#ffffff; background-color:#77a809;\r
+    background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #77a809), color-stop(1, #89c403) );\r
+    background:-moz-linear-gradient( center top, #77a809 5%, #89c403 100% );\r
+    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#77a809', endColorstr='#89c403');    \r
+}.NXSButton:active {color:#ffffff; position:relative; top:1px;}.NXSButton:focus {color:#ffffff; position:relative; top:1px;} .nsBigText{font-size: 14px; color: #585858; font-weight: bold; display: inline;}\r
+.NXSButtonB { background-color:#038bc4;\r
+    background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #038bc4), color-stop(1, #096aa8) );\r
+    background:-moz-linear-gradient( center top, #038bc4 5%, #096aa8 100% );\r
+    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#038bc4', endColorstr='#096aa8');    \r
+    -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px; border:1px solid #077cb8; display:inline-block; color:#ffffff;\r
+    font-family:Trebuchet MS; font-size:12px; font-weight:bold; padding:4px 5px;  text-decoration:none;  text-shadow:1px 1px 0px #095d80;\r
+}.NXSButtonB:hover {color:#ffffff; background-color:#096aa8;\r
+    background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #096aa8), color-stop(1, #038bc4) );\r
+    background:-moz-linear-gradient( center top, #096aa8 5%, #038bc4 100% );\r
+    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#096aa8', endColorstr='#038bc4');    \r
+}.NXSButtonB:active {color:#ffffff; position:relative; top:1px;}.NXSButton:focus {color:#ffffff; position:relative; top:1px;} .nsBigText{font-size: 14px; color: #585858; font-weight: bold; display: inline;}\r
+#nxs_ntType {width: 150px;}\r
+#nsx_addNT {width: 600px;}\r
+.nxsInfoMsg{  margin: 1px auto; padding: 3px 10px 3px 5px; border: 1px solid #ffea90;  background-color: #fdfae4; display: inline; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; }\r
+.blnkg{text-decoration:blink; font-size: 17px; color: #0CB107; font-weight: bold; display: inline;}\r
+\r
+div.popShAtt { display: none; position: absolute; width: 600px; padding: 10px; background: #eeeeee; color: #000000; border: 1px solid #1a1a1a; font-size: 90%; }\r
+.underdash {border-bottom: 1px #21759B dashed; text-decoration:none;}\r
+.underdash a:hover {border-bottom: 1px #21759B dashed}\r
+\r
+.nxsTHRow {vertical-align:top; padding-top:6px; text-align:right; width:80px; padding-right:10px;}\r
+\r
+ul.nsx_tabs {margin: 0;padding: 0; margin-top:5px;float: left;list-style: none;height: 32px;border-bottom: 1px solid #999;border-left: 1px solid #999;width: 99%;}\r
+ul.nsx_tabs li {float: left;margin: 0;padding: 0;height: 31px;line-height: 31px;border: 1px solid #999;border-left: none;margin-bottom: -1px;overflow: hidden;position: relative;background: #e0e0e0;}\r
+ul.nsx_tabs li a {text-decoration: none;color: #000; display: block; font-size: 1.2em; padding: 0 20px; border: 1px solid #fff; outline: none;}\r
+ul.nsx_tabs li a:hover { background: #ccc;}\r
+html ul.nsx_tabs li.active, html ul.nsx_tabs li.active a:hover  { background: #fff; border-bottom: 1px solid #fff; }\r
+.nsx_tab_container {border: 1px solid #999; border-top: none; overflow: hidden; clear: both; float: left; width: 99%; background: #fff;}\r
+.nsx_tab_content {padding: 10px;}\r
+\r
+.nxs_tls_cpt{width:100%; padding-bottom: 5px; padding-top: 10px;font-size: 16px; font-weight: bold;}\r
+.nxs_tls_bd{width:100%; padding-left: 10px; padding-bottom: 10px;}\r
+.nxs_tls_sbInfo{font-style: italic; padding-bottom: 10px; padding-top: 2px;}\r
+.nxs_tls_sbInfo2{font-style: italic; padding-left: 10px; padding-bottom: 5px; line-height: 10px; font-size: 11px;}\r
+.nxs_tls_lbl{width:100%;padding-top:7px;padding-bottom:1px;}\r
+.nxsInstrSpan{ font-size: 11px; }\r
+\r
+\r
+.subDiv{margin-left: 15px;}\r
+.nxs_hili {color:#008000;}\r
+.clNewNTSets{width: 800px;}\r
+.nxclear {clear: both;}\r
+\r
+.nxs_icon16 { font-size: 14px; line-height: 18px;\r
+    background-position: 3px 50% !important;\r
+    background-repeat: no-repeat !important;\r
+    display: inline-block;\r
+    padding: 1px 0 1px 23px !important;\r
+}\r
+\r
+.nxs_box{border-color: #DFDFDF; border-radius: 3px 3px 3px 3px; box-shadow: 0 1px 0 #FFFFFF inset; border-style: solid; border-width: 1px; line-height: 1; margin-bottom: 10px; padding: 0; /* max-width: 1080px; */}\r
+.nxs_box_header{border-bottom-color: #DFDFDF; box-shadow: 0 1px 0 #FFFFFF; text-shadow: 0 1px 0 #FFFFFF;font-size: 15px;font-weight: normal;line-height: 1;margin: 0;padding: 6px;\r
+background:#f1f1f1;background-image:-webkit-gradient(linear,left bottom,left top,from(#ececec),to(#f9f9f9));background-image:-webkit-linear-gradient(bottom,#ececec,#f9f9f9);background-image:-moz-linear-gradient(bottom,#ececec,#f9f9f9);background-image:-o-linear-gradient(bottom,#ececec,#f9f9f9);background-image:linear-gradient(to top,#ececec,#f9f9f9)\r
+-moz-user-select: none;border-bottom-style: solid;border-bottom-width: 1px;}\r
+.nxs_box_inside{line-height: 1.4em; padding: 10px;}\r
+.nxs_box_inside input[type=text]{ padding: 5px; height: 24px; border: 1px solid #ACACAC;}\r
+.nxs_box_inside .insOneDiv, #nsx_addNT .insOneDiv{max-width: 1020px; background-color: #f8f9f9; background-repeat: no-repeat; margin: 10px; border: 1px solid #808080; padding: 10px; display:none; overflow: hidden;}\r
+.nxs_box_inside .itemDiv {margin:5px;margin-left:10px;}\r
+.nxs_box_header h3 {font-size: 14px; margin-bottom: 2px; margin-top: 2px;}\r
+.nxs_newLabel {font-size: 11px; color:red; padding-left: 5px; padding-right: 5px;}\r
+\r
+.nxs_prevImagesDiv {border:1px solid #0f3c6d;  width:110px; height:110px; margin:3px; padding:3px; text-align:center; float:left; position: relative;}\r
+.nxs_prevImages {padding:1px; max-height:100px; max-width:100px;}\r
+.nxs_chImg_selDiv {border:1px solid #800000;}\r
+.nxs_chImg_selImg {border:4px solid #800000;}\r
+.nxs_checkIcon{position: absolute;}\r
+\r
+.nxs_checkIcon{display:none; height:24px;width:24px;position:absolute;top:-7px;right:-7px;outline:0;border:1px solid #fff;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,0.4);background:#800000;background-image:-webkit-gradient(linear,left top,left bottom,from(#800000),to(#570000));background-image:-webkit-linear-gradient(top,#800000,#570000);background-image:-moz-linear-gradient(top,#800000,#570000);background-image:-o-linear-gradient(top,#800000,#570000);background-image:linear-gradient(to bottom,#800000,#570000)}\r
+.nxs_checkIcon{ top:-5px; right: -3px; width: 15px; height: 15px; box-shadow:0 0 0 1px #800000;background:#800000;background-image:-webkit-gradient(linear,left top,left bottom,from(#800000),to(#570000));background-image:-webkit-linear-gradient(top,#800000,#570000);background-image:-moz-linear-gradient(top,#800000,#570000);background-image:-o-linear-gradient(top,#800000,#570000);background-image:linear-gradient(to bottom,#800000,#570000)}\r
+.nxs_checkIcon div{background-position:-21px 0; width: 15px; height: 15px;}\r
+/* #nxsDivWrap .postbox .inside {overflow: hidden;}  */\r
+#nxsDivWrap .postbox .description {vertical-align: middle; color: #ACACAC;}  \r
+\r
+.submitX {padding-top: 7px; padding-bottom: 5px;}\r
+\r
+.nxs_txtIcon { margin: 0px; padding-left: 20px; background-repeat: no-repeat;} .nxs_ti_gp {background-image: url('<?php echo $nxs_plurl; ?>img/gp16.png');} \r
+            .nxs_ti_li {background-image: url('<?php echo $nxs_plurl; ?>img/li16.png');}  .nxs_ti_rd {background-image: url('<?php echo $nxs_plurl; ?>img/rd16.png');} \r
+            .nxs_ti_fp {background-image: url('<?php echo $nxs_plurl; ?>img/fp16.png');}  .nxs_ti_yt {background-image: url('<?php echo $nxs_plurl; ?>img/yt16.png');} \r
+            .nxs_ti_bg {background-image: url('<?php echo $nxs_plurl; ?>img/bg16.png');}  .nxs_ti_pn {background-image: url('<?php echo $nxs_plurl; ?>img/pn16.png');} \r
+            \r
+input[readonly]{ background-color:white; }            \r
+</style>\r
+<?php }}\r
+\r
+if (!function_exists('nxs_doShowHint')){ function nxs_doShowHint($t, $ex='', $wdth='79'){ ?>\r
+<div id="<?php echo $t; ?>Hint" class="nxs_FRMTHint" style="font-size: 11px; margin: 2px; margin-top: 0px; padding:7px; border: 1px solid #C0C0C0; width: <?php echo $wdth; ?>%; background: #fff; display: none;"><span class="nxs_hili">%TITLE%</span> - <?php _e('Inserts the Title of the post', 'social-networks-auto-poster-facebook-twitter-g'); ?>, <span class="nxs_hili">%URL%</span> - <?php _e('Inserts the URL of the post', 'social-networks-auto-poster-facebook-twitter-g'); ?>, <span class="nxs_hili">%SURL%</span> - <?php _e('Inserts the <b>shortened URL</b> of your post', 'social-networks-auto-poster-facebook-twitter-g'); ?>, <span class="nxs_hili">%IMG%</span> - <?php _e('Inserts the featured image URL', 'social-networks-auto-poster-facebook-twitter-g'); ?>, <span class="nxs_hili">%EXCERPT%</span> - <?php _e('Inserts the excerpt of the post (processed)', 'social-networks-auto-poster-facebook-twitter-g'); ?>, <span class="nxs_hili">%RAWEXCERPT%</span> - <?php _e('Inserts the excerpt of the post (as typed)', 'social-networks-auto-poster-facebook-twitter-g'); ?>,  <span class="nxs_hili">%ANNOUNCE%</span> - <?php _e('Inserts the text till the &lt;!--more--&gt; tag or first N words of the post', 'social-networks-auto-poster-facebook-twitter-g'); ?>, <span class="nxs_hili">%FULLTEXT%</span> - <?php _e('Inserts the processed body(text) of the post', 'social-networks-auto-poster-facebook-twitter-g'); ?>, <span class="nxs_hili">%RAWTEXT%</span> - <?php _e('Inserts the body(text) of the post as typed', 'social-networks-auto-poster-facebook-twitter-g'); ?>, <span class="nxs_hili">%TAGS%</span> - <?php _e('Inserts post tags', 'social-networks-auto-poster-facebook-twitter-g'); ?>, <span class="nxs_hili">%CATS%</span> - <?php _e('Inserts post categories', 'social-networks-auto-poster-facebook-twitter-g'); ?>, <span class="nxs_hili">%HTAGS%</span> - <?php _e('Inserts post tags as hashtags', 'social-networks-auto-poster-facebook-twitter-g'); ?>, <span class="nxs_hili">%HCATS%</span> - <?php _e('Inserts post categories as hashtags', 'social-networks-auto-poster-facebook-twitter-g'); ?>, <span class="nxs_hili">%AUTHORNAME%</span> - <?php _e('Inserts the author\'s name', 'social-networks-auto-poster-facebook-twitter-g'); ?>, <span class="nxs_hili">%SITENAME%</span> - <?php _e('Inserts the the Blog/Site name', 'social-networks-auto-poster-facebook-twitter-g'); ?>. <?php echo $ex; ?></div>\r
+<?php }}\r
+\r
+if (!function_exists('nxs_doSMAS')){ function nxs_doSMAS($nType, $typeii) { ?><div id="do<?php echo $typeii; ?>Div" class="clNewNTSets" style="margin-left: 10px; display:none; "><div style="font-size: 15px; text-align: center;"><br/><br/>\r
+<?php printf( __( 'You already have %s configured.  This plugin supports only one %s account. <br/><br/> Please consider getting <a target="_blank" href="http://www.nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts">Multiple Accounts Edition</a> if you would like to add another %s account for auto-posting.', 'social-networks-auto-poster-facebook-twitter-g' ), $nType, $nType, $nType );  ?>\r
+</div></div><?php \r
+}}\r
+\r
+if (!function_exists('nxs_snapCleanup')){ function nxs_snapCleanup($options){   global $nxs_snapAvNts; \r
+    foreach ($nxs_snapAvNts as $avNt) { if (!isset($options[$avNt['lcode']]) || count($options[$avNt['lcode']])>1) { $copt = ''; $t = '';\r
+      if (isset($options[$avNt['lcode']]) && is_array($options[$avNt['lcode']])) $copt = array_values( $options[$avNt['lcode']] );  \r
+      $t = (isset($copt[0]) && is_array($copt[0]) && count($copt[0]>2))?$copt[0]:''; $options[$avNt['lcode']] = array(); if ($t!='') $options[$avNt['lcode']][] = $t;\r
+    }}\r
+    return $options;\r
+}}\r
+\r
+if (!function_exists('nxs_html_to_utf8')){ function nxs_html_to_utf8 ($data){return preg_replace("/\\&\\#([0-9]{3,10})\\;/e", 'nxs__html_to_utf8("\\1")', $data); }}\r
+if (!function_exists('nxs__html_to_utf8')){ function nxs__html_to_utf8 ($data){ if ($data > 127){ $i = 5; while (($i--) > 0){\r
+  if ($data != ($a = $data % ($p = pow(64, $i)))){ \r
+    $ret = chr(base_convert(str_pad(str_repeat(1, $i + 1), 8, "0"), 2, 10) + (($data - $a) / $p)); for ($i; $i > 0; $i--) $ret .= chr(128 + ((($data % pow(64, $i)) - ($data % ($p = pow(64, $i - 1)))) / $p)); break; }\r
+  }} else $ret = "&#$data;";\r
+  return $ret;\r
+}}\r
+if (!function_exists("nxs_chArrVar")) { function nxs_chArrVar($arr, $varN, $varV){ return (isset($arr) && is_array($arr) && isset($arr[$varN]) && $arr[$varN]==$varV); }}\r
+    \r
+    \r
+if (!function_exists("nxs_metaMarkAsPosted")) { function nxs_metaMarkAsPosted($postID, $nt, $did, $args=''){ $mpo =  get_post_meta($postID, 'snap'.$nt, true);  $mpo =  maybe_unserialize($mpo);\r
+  //prr($postID); prr('snap'.$nt);  prr($mpo); echo "#####".$postID."|".$nt."|".$did."|".$args;\r
+  if (!is_array($mpo)) $mpo = array(); if (!isset($mpo[$did]) || !is_array($mpo[$did])) $mpo[$did] = array();\r
+  if ($args=='' || ( is_array($args) && isset($args['isPosted']) && $args['isPosted']=='1')) $mpo[$did]['isPosted'] = '1';  \r
+  if (is_array($args) && isset($args['isPrePosted']) && $args['isPrePosted']==1) $mpo[$did]['isPrePosted'] = '1';  \r
+  if (is_array($args) && isset($args['pgID'])) $mpo[$did]['pgID'] = $args['pgID'];  \r
+  if (is_array($args) && isset($args['postURL'])) $mpo[$did]['postURL'] = $args['postURL'];  \r
+  if (is_array($args) && isset($args['pDate'])) $mpo[$did]['pDate'] = $args['pDate'];  \r
+  /*$mpo = mysql_real_escape_string(serialize($mpo)); */ delete_post_meta($postID, 'snap'.$nt); add_post_meta($postID, 'snap'.$nt, str_replace('\\','\\\\', serialize($mpo)));\r
+}}\r
+if (!function_exists('nxs_checkAddLogTable')){ function nxs_checkAddLogTable(){ global $nxs_tpWMPU, $wpdb; if($nxs_tpWMPU=='S') switch_to_blog(1);  \r
+  $installed_ver = get_option( "nxs_log_db_table_version" ); if ($installed_ver=='1.1') return true;\r
+  $table_name = $wpdb->prefix . "nxs_log";\r
+  $sql = "CREATE TABLE $table_name (\r
+    id bigint(20) NOT NULL AUTO_INCREMENT,\r
+    date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\r
+    act VARCHAR(255) DEFAULT '' NOT NULL,\r
+    nt VARCHAR(255) DEFAULT '' NOT NULL,\r
+    type VARCHAR(255) DEFAULT '' NOT NULL,\r
+    msg text NOT NULL,    \r
+    extInfo text NOT NULL,    \r
+    UNIQUE KEY id (id)\r
+  ) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;";\r
+  require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); dbDelta($sql);\r
+  delete_option("nxs_log_db_table_version"); add_option("nxs_log_db_table_version", '1.1');\r
+  if($nxs_tpWMPU=='S') restore_current_blog();\r
+}}\r
+if (!function_exists('nxs_getnxsLog')){ function nxs_getnxsLog(){ global $nxs_tpWMPU, $wpdb; if($nxs_tpWMPU=='S') switch_to_blog(1);  \r
+   $log = $wpdb->get_results( "SELECT * FROM ". $wpdb->prefix . "nxs_log ORDER BY id", ARRAY_A ); if (!is_array($log)) return array(); else return $log;\r
+}}\r
+\r
+if (!function_exists('nxs_addToLog')){ function nxs_addToLog ($type, $action, $nt, $msg=''){ nxs_addToLogN ($type, $action, $nt, $msg); }}\r
+if (!function_exists('nxs_addToLogN')){ function nxs_addToLogN ($type, $action, $nt, $msg, $extInfo=''){ global $nxs_tpWMPU, $wpdb; if($nxs_tpWMPU=='S') switch_to_blog(1); \r
+  global $plgn_NS_SNAutoPoster; if (isset($plgn_NS_SNAutoPoster)) $options = $plgn_NS_SNAutoPoster->nxs_options;  if (!empty($options) && !empty($options['numLogRows'])) $numLogRows = $options['numLogRows']; else $numLogRows = 150;\r
+  //## Skip if Minimal Only Setting\r
+  if (isset($options['extDebug']) && $options['extDebug']=='2' && stripos($action, 'Skipped')!==false ) return; \r
+  \r
+  $logItem = array('date'=>date_i18n('Y-m-d H:i:s'), 'act'=>$action, 'msg'=> strip_tags($msg), 'extInfo'=>$extInfo, 'type'=>$type, 'nt'=>$nt); \r
+  $nxDB = $wpdb->insert( $wpdb->prefix . "nxs_log", $logItem );  $lid = $wpdb->insert_id; $lid = $lid-$numLogRows;\r
+  if ($lid>0) $wpdb->query( 'DELETE FROM '.$wpdb->prefix . 'nxs_log WHERE id<'.$lid );    \r
+  \r
+  if ($type=='E' && (isset($options['errNotifEmailCB']) && (int)$options['errNotifEmailCB'] == 1 && isset($options['errNotifEmail']) && trim($options['errNotifEmail']) != '')) { \r
+    $log = maybe_unserialize(get_option('NSX_LogToEmail')); if (!is_array($log)) $log = array(); $log[] = $logItem; delete_option("NSX_LogToEmail"); add_option("NSX_LogToEmail", $log, '', 'no');\r
+  }\r
+  \r
+  // $nxsDBLog = get_option('NS_SNAutoPosterLog'); $nxsDBLog = maybe_unserialize($nxsDBLog); if(!is_array($nxsDBLog)) $nxsDBLog = array(); $nxsDBLog[] = $logItem; $nxsDBLog = array_slice($nxsDBLog, -150);  \r
+  // $res = update_option('NS_SNAutoPosterLog', ($nxsDBLog));   \r
+  //delete_option('NS_SNAutoPosterLog'); add_option('NS_SNAutoPosterLog', ($nxsDBLog));   \r
+  if($nxs_tpWMPU=='S') restore_current_blog(); \r
+}}\r
+\r
+\r
+\r
+if (!function_exists('nxsMergeArraysOV')){function nxsMergeArraysOV($Arr1, $Arr2){\r
+  foreach($Arr2 as $key => $value) { if(array_key_exists($key, $Arr1) && is_array($value)) $Arr1[$key] = nxsMergeArraysOV($Arr1[$key], $Arr2[$key]); else $Arr1[$key] = $value;} return $Arr1;\r
+}}\r
+\r
+if (!function_exists('nxs_MergeCookieArr')){function nxs_MergeCookieArr($ArrO, $ArrN){ $namesArr = array(); foreach($ArrO as $key => $value) { if (is_object($value)) $namesArr[$key] = $value->name; }             \r
+  foreach($ArrN as $key => $value) { if (is_object($value) && $value->value!='deleted') { $isEx = array_search($value->name, $namesArr); if ($isEx===false) $ArrO[] = $value; else $ArrO[$isEx] = $value;}} return $ArrO;\r
+}}\r
+\r
+if (!function_exists('nxs_addPostingDelaySel')){function nxs_addPostingDelaySel($nt, $ii, $hrs=0, $min=0, $days=0){ \r
+  global $plgn_NS_SNAutoPoster, $nxs_plurl;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; if ($options['nxsHTDP']=='I') return 'Not Compatible with "Publish Immediately"';\r
+  if (function_exists('nxs_doSMAS4')) return nxs_doSMAS4($nt, $ii, $hrs, $min, $days); else return '<br/>';\r
+}}\r
+if (!function_exists('nxs_addPostingDelaySelV3')){function nxs_addPostingDelaySelV3($nt, $ii, $hrs=0, $min=0, $days=0){ \r
+  if (function_exists('nxs_doSMAS4')) { ?> <div class="nxs_tls_cpt"><?php _e('Posting Delay', 'social-networks-auto-poster-facebook-twitter-g'); ?></div>  \r
+    <div class="nxs_tls_bd"><?php  global $plgn_NS_SNAutoPoster, $nxs_plurl;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+      if ($options['nxsHTDP']=='I') _e('Not Compatible with "Publish Immediately"'); else  echo nxs_doSMAS4($nt, $ii, $hrs, $min, $days); ?></div>      \r
+  <?php } else echo '<br/>';\r
+}}\r
\r
+\r
+if (!function_exists("nxs_doQTrans")) { function nxs_doQTrans($txt, $lng=''){ if (!function_exists("qtrans_split") && !function_exists("qtranxf_split")) return $txt; \r
+  $txt = str_ireplace('<3','&lt;3', $txt); $txt = str_ireplace('<(','&lt;(', $txt); //$txt = preg_replace('/\[caption\s[^\]]*\]/', '', $txt);\r
+  $txt = preg_replace('/\[caption[\s]{0,}(.*?)\][\s]{0,}(<a[\s]{0,}.*?<\/a>)[\s]{0,}(.*?)\[\/caption\]/ims', '<p $1> $2 <snap class="wpimgcaption">$3</snap> </p>', $txt); // WP Image with Caption fix\r
+  if (function_exists("qtrans_split") && strpos($txt, '<!--:')!==false ) { $tta = qtrans_split($txt); if ($lng!='') return $tta[$lng]; else return reset($tta); }\r
+  if (function_exists("qtranxf_split") && (strpos($txt, '<!--:')!==false || strpos($txt, '[:')!==false) ){ $tta = qtranxf_split($txt); if ($lng!='') return $tta[$lng]; else return reset($tta); }    \r
+}}\r
+\r
+if (!function_exists('nxs_addQTranslSel')){function nxs_addQTranslSel($nt, $ii, $selLng){  \r
+  if (function_exists('nxs_doSMAS6')) return nxs_doSMAS6($nt, $ii, $selLng); else return '';  \r
+}}\r
+\r
+if (!function_exists("nxs_hideTip_ajax")) { function nxs_hideTip_ajax() {  check_ajax_referer('nxsSsPageWPN');   \r
+   global $plgn_NS_SNAutoPoster, $nxs_plurl;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+   $options['hideTopTip'] = '1';    update_option($plgn_NS_SNAutoPoster->dbOptionsName, $options); $plgn_NS_SNAutoPoster->nxs_options = $options;\r
+}}\r
+\r
+if (!function_exists("nxs_mkShortURL")) { function nxs_mkShortURL($url, $postID=''){ $rurl = '';  global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;\r
+    if ($options['nxsURLShrtnr']=='B' && trim($options['bitlyUname']!='') && trim($options['bitlyAPIKey']!='')) {      \r
+      $response  = wp_remote_get('http://api-ssl.bitly.com/v3/shorten?login='.$options['bitlyUname'].'&apiKey='.$options['bitlyAPIKey'].'&longUrl='.urlencode($url)); \r
+      if (is_wp_error($response)) { nxs_addToLogN('E', 'bit.ly', '', '-=ERROR=- '.print_r($response, true));  return $url; }\r
+      $rtr = json_decode($response['body'],true);\r
+      if ($rtr['status_code']=='200') $rurl = $rtr['data']['url'];\r
+    } //echo "###".$rurl;\r
+    if ($options['nxsURLShrtnr']=='A' && trim($options['adflyUname']!='') && trim($options['adflyAPIKey']!='')) {      \r
+      $response  = wp_remote_get('http://api.adf.ly/api.php?key='.$options['adflyAPIKey'].'&uid='.$options['adflyUname'].'&advert_type=int&domain='.$options['adflyDomain'].'&url='.urlencode($url));       \r
+      if (is_wp_error($response)) {   nxs_addToLogN('E', 'adf.ly', '', '-=ERROR=- '.print_r($response, true));  return $url; }     \r
+      if ( $response['body']!='error')  $rurl = $response['body']; else {  nxs_addToLogN('E', 'adf.ly', '', '-=ERROR=- '.print_r($response, true)); return $url; }\r
+    }\r
+    if ($options['nxsURLShrtnr']=='C' && trim($options['clkimAPIKey']!='')) {    \r
+      $response  = wp_remote_get('http://clk.im/api?api='.$options['clkimAPIKey'].'&url='.urlencode($url));\r
+      if (is_wp_error($response)) { nxs_addToLogN('E', 'clk.im', '', '-=ERROR (SYS)=- '.print_r($response, true)); return $url; }  $r = json_decode($response['body'], true); //prr($r); die();\r
+      if (!is_array($r) || $r['error']!='0') { nxs_addToLogN('E', 'clk.im', '', '-=ERROR (JSON)=- '.print_r($response['body'], true)); return $url; } else $rurl = urldecode($r['short']);\r
+    }\r
+    if ($options['nxsURLShrtnr']=='X' && trim($options['xcoAPIKey']!='')) {    \r
+      $response  = wp_remote_get('http://api.x.co/Squeeze.svc/text/'.$options['xcoAPIKey'].'?url='.urlencode($url)); \r
+      if (is_wp_error($response)) { nxs_addToLogN('E', 'x.co', '', '-=ERROR (SYS)=- '.print_r($response, true)); return $url; }  $r = $response['body'];\r
+      if (empty($r) || stripos($r, 'http://')===false) { nxs_addToLogN('E', 'x.co', '', '-=ERROR (RES)=- '.print_r($r, true)); return $url; } else $rurl = $r;\r
+    }\r
+    \r
+    if ($options['nxsURLShrtnr']=='U') {    \r
+      $flds = array('a'=>'add', 'url'=>$url); $response  = wp_remote_post('http://u.to/', array('body' => $flds)); \r
+      if (is_wp_error($response)) { nxs_addToLogN('E', 'u.to', '', '-=ERROR (SYS)=- '.print_r($response, true)); return $url; }  $r = $response['body'];\r
+      if (empty($r) || stripos($r, "#shurlout').val('")===false) { nxs_addToLogN('E', 'x.co', '', '-=ERROR (RES)=- '.print_r($r, true)); return $url; } else $rurl = CutFromTo($r,"#shurlout').val('","'");\r
+    }\r
+    \r
+    if ($options['nxsURLShrtnr']=='P' && trim($options['postAPIKey']!='')) {      \r
+      $response  = wp_remote_get('http://po.st/api/shorten?longUrl='.urlencode($url).'&apiKey='.$options['postAPIKey']);       \r
+      if (is_wp_error($response)) { nxs_addToLogN('E', 'po.st', '', '-=ERROR (SYS)=- '.print_r($response, true)); return $url; }  $r = json_decode($response['body'], true); \r
+      if (!is_array($r) || $r['status_txt']!='OK') { nxs_addToLogN('E', 'po.st', '', '-=ERROR (JSON)=- '.print_r($response['body'], true)); return $url; } else $rurl = $r['short_url'];\r
+    }\r
+    if ($options['nxsURLShrtnr']=='W' && function_exists('wp_get_shortlink')) { global $post; $post = get_post($postID);  $rurl = wp_get_shortlink($postID, 'post'); }\r
+    if ($options['nxsURLShrtnr']=='Y' && trim($options['YOURLSKey']!='') && trim($options['YOURLSURL']!='')) { $timestamp = time(); $signature = md5( $timestamp . $options['YOURLSKey'] ); \r
+      $flds = array('signature'=>$signature, 'action' => 'shorturl', 'url'=>$url, 'format'=>'json', 'timestamp'=>$timestamp);  \r
+      $response  = wp_remote_post(($options['YOURLSURL']), array('body' => $flds)); \r
+      if (is_wp_error($response)) {  nxs_addToLogN('E', 'goo.gl', '', '-=ERROR=- '.print_r($response, true)); return $url; } \r
+      $rtr = json_decode($response['body'],true);  if (!is_array($rtr) || !isset($rtr['shorturl']) ) {   nxs_addToLogN('E', 'goo.gl', '', '-=ERROR=- '.print_r($response, true));  return $url; }      \r
+      $rurl = $rtr['shorturl'];\r
+    \r
+    }   \r
+    if ($options['nxsURLShrtnr']=='O' || $options['nxsURLShrtnr']=='' || $options['nxsURLShrtnr']=='G') {   \r
+      $response  = wp_remote_post('https://www.googleapis.com/urlshortener/v1/url'.($options['gglAPIKey']!=''?'?key='.$options['gglAPIKey']:''), array('headers' => array('Content-Type'=>'application/json'), 'body' => '{"longUrl": "'.$url.'"}')); \r
+      if (is_wp_error($response)) {   nxs_addToLogN('E', 'goo.gl', '', '-=ERROR=- '.print_r($response, true));  return $url; } \r
+      $rtr = json_decode($response['body'],true); if (!is_array($rtr) || isset($rtr['error']) || !isset($rtr['id']) ) {   nxs_addToLogN('E', 'goo.gl', '', '-=ERROR=- '.print_r($response, true));  return $url; }      \r
+      $rurl = $rtr['id'];\r
+    }    \r
+    //if ($rurl=='') { $response  = wp_remote_get('http://gd.is/gtq/'.$url); if ((is_array($response) && ($response['response']['code']=='200'))) $rurl = $response['body']; }\r
+    if ($rurl!='') $url = $rurl;  return $url;\r
+}}\r
+//## Comments - DISQUS native function has global $post; overwriting $post parameter in the middle of it.\r
+function nxs_dsq_export_wp($nxPost, $comments=null) { global $wpdb, $wp_query, $post; $post = $nxPost;  ob_start(); echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?' . ">\n";?>\r
+  <?php the_generator('export');?><rss version="2.0" xmlns:excerpt="http://wordpress.org/export/<?php echo WXR_VERSION; ?>/excerpt/" xmlns:content="http://purl.org/rss/1.0/modules/content/"\r
+    xmlns:dsq="http://www.disqus.com/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wp="http://wordpress.org/export/<?php echo WXR_VERSION; ?>/">\r
+  <channel>\r
+    <title><?php bloginfo_rss('name'); ?></title><link><?php bloginfo_rss('url') ?></link><pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate>\r
+    <generator>WordPress <?php bloginfo_rss('version'); ?>; Disqus <?php echo DISQUS_VERSION; ?></generator>\r
+  <?php $wp_query->in_the_loop = true; setup_postdata($post); ?>\r
+  <item><title><?php echo apply_filters('the_title_rss', $post->post_title); ?></title><link><?php the_permalink_rss() ?></link>\r
+  <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>\r
+  <dc:creator><?php echo dsq_export_wxr_cdata(get_the_author()); ?></dc:creator>\r
+  <guid isPermaLink="false"><?php the_guid(); ?></guid>\r
+  <content:encoded><?php echo dsq_export_wxr_cdata( apply_filters('the_content_export', $post->post_content) ); ?></content:encoded>\r
+  <dsq:thread_identifier><?php echo dsq_identifier_for_post($post); ?></dsq:thread_identifier>\r
+  <wp:post_id><?php echo $post->ID; ?></wp:post_id>\r
+  <wp:post_date_gmt><?php echo $post->post_date_gmt; ?></wp:post_date_gmt>\r
+  <wp:comment_status><?php echo $post->comment_status; ?></wp:comment_status>\r
+  <?php\r
+  if ( $comments ) { foreach ( $comments as $c ) { ?>\r
+    <wp:comment>\r
+    <wp:comment_id><?php echo $c->comment_ID; ?></wp:comment_id>\r
+    <wp:comment_author><?php echo dsq_export_wxr_cdata($c->comment_author); ?></wp:comment_author>\r
+    <wp:comment_author_email><?php echo $c->comment_author_email; ?></wp:comment_author_email>\r
+    <wp:comment_author_url><?php echo $c->comment_author_url; ?></wp:comment_author_url>\r
+    <wp:comment_author_IP><?php echo $c->comment_author_IP; ?></wp:comment_author_IP>\r
+    <wp:comment_date><?php echo $c->comment_date; ?></wp:comment_date>\r
+    <wp:comment_date_gmt><?php echo $c->comment_date_gmt; ?></wp:comment_date_gmt>\r
+    <wp:comment_content><?php echo dsq_export_wxr_cdata($c->comment_content) ?></wp:comment_content>\r
+    <wp:comment_approved><?php echo $c->comment_approved; ?></wp:comment_approved>\r
+    <wp:comment_type><?php echo $c->comment_type; ?></wp:comment_type>\r
+    <wp:comment_parent><?php echo $c->comment_parent; ?></wp:comment_parent>\r
+    </wp:comment>\r
+  <?php } } // comments ?>\r
+    </item>\r
+  </channel>\r
+  </rss>\r
+  <?php $output = ob_get_clean(); return $output;\r
+}\r
+//## \r
+if (!function_exists("nxs_postNewComment")) { function nxs_postNewComment($cmnt, $aa = false) { $cmnt['comment_post_ID'] = (int) $cmnt['comment_post_ID'];\r
+  $cmnt['comment_parent'] = isset($cmnt['comment_parent']) ? absint($cmnt['comment_parent']) : 0; $ae =  get_option('admin_email');\r
+  //$u = get_user_by( 'email', get_option('admin_email') );   $cmnt['user_id'] = $u->ID; //???\r
+  $u = get_user_by( 'email', $cmnt['comment_author_email'] ); if (!empty($u)) $cmnt['user_id'] = $u->ID; else $cmnt['user_id'] = 0;\r
+\r
+  $parent_status = ( 0 < $cmnt['comment_parent'] ) ? wp_get_comment_status($cmnt['comment_parent']) : ''; \r
+  $cmnt['comment_parent'] = ( 'approved' == $parent_status || 'unapproved' == $parent_status ) ? $cmnt['comment_parent'] : 0;\r
+  $cmnt['comment_author_IP'] = ''; if (empty($cmnt['comment_agent'])) $cmnt['comment_agent'] = 'SNAP'; $cmnt['comment_date'] =  get_date_from_gmt( $cmnt['comment_date_gmt'] );    \r
+  $cmnt = wp_filter_comment($cmnt); if ($aa) $cmnt['comment_approved'] = 1; else $cmnt['comment_approved'] = nxs_wp_allow_comment($cmnt); // echo "INSERT";  prr($cmnt);\r
+  if ( $cmnt['comment_approved'] != 'spam' && $cmnt['comment_approved']>1 ) return $cmnt['comment_approved'];  else  $cmntID = wp_insert_comment($cmnt); \r
+  if (empty($cmntID)) {  nxs_addToLogN('E', 'Error', 'Comments', '-=ERROR=-', print_r($cmnt, true)); return; }\r
+  \r
+  if ( 'spam' !== $cmnt['comment_approved'] ) { if ( '0' == $cmnt['comment_approved'] ) wp_notify_moderator($cmntID); $post = get_post($cmnt['comment_post_ID']);\r
+    if ( get_option('comments_notify') && $cmnt['comment_approved'] && ( ! isset( $cmnt['user_id'] ) || $post->post_author != $cmnt['user_id'] ) ) wp_notify_postauthor($cmntID);  \r
+    global $wpdb, $dsq_api;\r
+    if (isset($dsq_api) && is_object($post)) { $plugins_url = str_replace( 'social-networks-auto-poster-facebook-twitter-g/', '', plugin_dir_path( __FILE__ )); require_once( $plugins_url.'disqus-comment-system/export.php'); \r
+    if (function_exists('dsq_export_wp')) {\r
+      $comments = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_ID = %d", $cmntID) ); \r
+      $wxr = nxs_dsq_export_wp($post, $comments); $response = $dsq_api->import_wordpress_comments($wxr, time()); \r
+    }}\r
+  } \r
+  return $cmntID;\r
+}}\r
+\r
+//#### Native WP Function that has wp_die in the middle of it ?????\r
+function nxs_wp_allow_comment($commentdata) { global $wpdb; extract($commentdata, EXTR_SKIP); \r
+    // Simple duplicate check // expected_slashed ($comment_post_ID, $comment_author, $comment_author_email, $comment_content)\r
+    $dupe = "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND comment_parent = '$comment_parent' AND comment_approved != 'trash' AND ( comment_author = '$comment_author' ";\r
+    if ( $comment_author_email ) $dupe .= "OR comment_author_email = '$comment_author_email' "; $dupe .= ") AND comment_content = '$comment_content' LIMIT 1";\r
+    $dupeID = $wpdb->get_var($dupe); if ( $dupeID ) { do_action( 'comment_duplicate_trigger', $commentdata ); return $dupeID; } \r
+    do_action( 'check_comment_flood', $comment_author_IP, $comment_author_email, $comment_date_gmt );\r
+    if ( ! empty( $user_id ) ) { $user = get_userdata( $user_id ); $post_author = $wpdb->get_var($wpdb->prepare("SELECT post_author FROM $wpdb->posts WHERE ID = %d LIMIT 1", $comment_post_ID)); }\r
+    if ( isset( $user ) && ( $user_id == $post_author || $user->has_cap( 'moderate_comments' ) ) ) { // The author and the admins get respect.\r
+        $approved = 1;\r
+     } else { // Everyone else's comments will be checked.\r
+        if ( check_comment($comment_author, $comment_author_email, $comment_author_url, $comment_content, $comment_author_IP, $comment_agent, $comment_type) ) $approved = 1; else $approved = 0;\r
+        if ( wp_blacklist_check($comment_author, $comment_author_email, $comment_author_url, $comment_content, $comment_author_IP, $comment_agent) ) $approved = 'spam';\r
+    } $approved = apply_filters( 'pre_comment_approved', $approved, $commentdata ); return $approved;\r
+}\r
+\r
+if (!function_exists("ns_get_avatar")) { function ns_get_avatar($avatar, $id_or_email, $size=96, $default='', $alt='') { \r
+    if ( is_object($id_or_email) ) { \r
+      if ($id_or_email->comment_agent=='SNAP' && stripos($id_or_email->comment_author_url, 'facebook.com')!==false) { $fbuID = str_ireplace('@facebook.com','',$id_or_email->comment_author_email);        \r
+        $avatar = "<img alt='{$id_or_email->comment_author}' src='https://graph.facebook.com/v2.3/$fbuID/picture' class='avatar avatar-{$size} photo avatar-default' height='{$size}' width='{$size}' />";              }\r
+      if (stripos($id_or_email->comment_agent, 'SNAP||')!==false && stripos($id_or_email->comment_author_url, 'twitter.com')!==false) { $fbuID = str_ireplace('SNAP||','',$id_or_email->comment_agent);\r
+        $avatar = "<img alt='{$id_or_email->comment_author}' src='{$fbuID}' class='avatar avatar-{$size} photo avatar-default' height='{$size}' width='{$size}' />";        \r
+      }\r
+      \r
+    }\r
+    return $avatar;\r
+}}\r
+\r
+if (!function_exists('nxs_doProcessTags')){ function nxs_doProcessTags($tags){ $tagsA = array(); if (!is_array($tags)) { $tags = explode(',', $tags); \r
+  foreach ($tags as $tg) $tagsA[] = trim($tg); } else $tagsA = $tags; $tagsA = array_unique($tagsA);  $tags = array(); \r
+  foreach ($tagsA as $tg) { $tags['tagsA'][] = $tg; $tags['htagsA'][] = "#".trim(str_replace(' ', '', preg_replace('/[^a-zA-Z0-9\p{L}\p{N}\s]/u', '', trim(ucwords(str_ireplace('&', '', str_ireplace('&amp;','',$tg))))))); } \r
+  $tags['tags'] =  implode(', ', $tags['tagsA']); $tags['htags'] = implode(', ', $tags['htagsA']);\r
+  return $tags;\r
+}}            \r
+if (!function_exists('nxs_doFormatMsg')){ function nxs_doFormatMsg($format, $message, $addURLParams=''){ global $nxs_urlLen; $msg = nxs_doSpin($format);// prr($msg); prr($message);// Make "message default"\r
+  $msgDef = array('title'=>'','announce'=>'','text'=>'','url'=>'','surl'=>'','urlDescr'=>'','urlTitle'=>'','imageURL' => array(),'videoCode'=>'','videoURL'=>'','siteName'=>'','tags'=>'','cats'=>'','authorName'=>'','orID'=>''); $message = array_merge($msgDef, $message);\r
+  if (preg_match('/%URL%/', $msg)) { $url = $message['url']; if($addURLParams!='') $url .= (strpos($url,'?')!==false?'&':'?').$addURLParams;  $nxs_urlLen = nxs_strLen($url); $msg = str_ireplace("%URL%", $url, $msg);}\r
+  if (preg_match('/%SURL%/', $msg)) { \r
+    if (isset($message['surl']) && $message['surl']!='') $url = $message['surl']; else { $url = $message['url']; if($addURLParams!='') $url .= (strpos($url,'?')!==false?'&':'?').$addURLParams; $url = nxs_mkShortURL($url); } \r
+    $nxs_urlLen = nxs_strLen($url); $msg = str_ireplace("%SURL%", $url, $msg);\r
+  }\r
+  if (preg_match('/%IMG%/', $msg)) { if (isset($message['imgURL']) && is_array($message['imgURL'])) { $imgURL = trim($message['imgURL']['large']); if ($imgURL=='') $imgURL = trim($message['imgURL']['medium']);   \r
+      if ($imgURL=='') $imgURL = trim($message['imgURL']['original']); if ($imgURL=='') $imgURL = trim($message['imgURL']['thumb']);\r
+    } elseif (!empty($message['imgURL'])) $imgURL = $message['imgURL']; else $imgURL = '';    $msg = str_ireplace("%IMG%", $imgURL, $msg); \r
+  }\r
+  if (preg_match('/%IMGLARGE%/', $msg)) $msg = str_ireplace("%IMG%", trim($message['imgURL']['large'], $msg));  \r
+  if (preg_match('/%IMGMEDIUM%/', $msg)) $msg = str_ireplace("%IMGMEDIUM%", trim($message['imgURL']['medium'], $msg));  \r
+  if (preg_match('/%IMGTHUMB%/', $msg)) $msg = str_ireplace("%IMGTHUMB%", trim($message['imgURL']['thumb'], $msg));  \r
+  if (preg_match('/%IMGORIGINAL%/', $msg)) $msg = str_ireplace("%IMGORIGINAL%", trim($message['imgURL']['original'], $msg));  \r
+  \r
+  if (preg_match('/%ORID%/', $msg)) $msg = str_ireplace("%ORID%", $message['orID'], $msg);  \r
+  if (preg_match('/%TITLE%/', $msg)) $msg = str_ireplace("%TITLE%", $message['title'], $msg);  \r
+  if (preg_match('/%STITLE%/', $msg)) { $title = substr($message['title'], 0, 115); $msg = str_ireplace("%STITLE%", $title, $msg); }                    \r
+  if (preg_match('/%AUTHORNAME%/', $msg)) $msg = str_ireplace("%AUTHORNAME%", $message['authorName'], $msg);\r
+  if (preg_match('/%SITENAME%/', $msg)) $msg = str_ireplace("%SITENAME%", $message['siteName'], $msg); \r
+  \r
+  if (preg_match('/%ANNOUNCE%/', $msg)) { $sText =  trim($message['announce'])!=''?$message['announce']:nsTrnc($message['description'], 300, " ", "...");  $msg = str_ireplace("%ANNOUNCE%", $sText, $msg); }\r
+  if (preg_match('/%EXCERPT%/', $msg)) { $sText =  trim($message['announce'])!=''?$message['announce']:nsTrnc($message['description'], 300, " ", "...");  $msg = str_ireplace("%EXCERPT%", $sText, $msg); }\r
+  if (preg_match('/%RAWEXCERPT%/', $msg)) { $sText =  trim($message['announce'])!=''?$message['announce']:nsTrnc($message['description'], 300, " ", "...");  $msg = str_ireplace("%RAWEXCERPT%", $sText, $msg); }\r
+  \r
+  if (preg_match('/%TEXT%/', $msg)) $msg = str_ireplace("%TEXT%", $message['description'], $msg);     \r
+  if (preg_match('/%FULLTEXT%/', $msg)) $msg = str_ireplace("%FULLTEXT%", $message['description'], $msg);     \r
+  if (preg_match('/%RAWTEXT%/', $msg)) $msg = str_ireplace("%RAWTEXT%", $message['description'], $msg);     \r
+      \r
+  \r
+  if (preg_match('/%TAGS%/', $msg)) { $tags = nxs_doProcessTags($message['tags']);  $msg = str_ireplace("%TAGS%", $tags['tags'], $msg); }\r
+  if (preg_match('/%HTAGS%/', $msg)) { $tags = nxs_doProcessTags($message['tags']);  $msg = str_ireplace("%HTAGS%", $tags['htags'], $msg); }\r
+  if (preg_match('/%CATS%/', $msg)) { $tags = nxs_doProcessTags($message['cats']);  $msg = str_ireplace("%CATS%", $tags['cats'], $msg); }\r
+  if (preg_match('/%HCATS%/', $msg)) { $tags = nxs_doProcessTags($message['hcats']);  $msg = str_ireplace("%HCATS%", $tags['hcats'], $msg); }\r
+    \r
+  if (preg_match('/%+CF-[a-zA-Z0-9-_]+%/', $msg)) { $msgA = explode('%CF', $msg); $mout = '';\r
+    foreach ($msgA as $mms) { \r
+        if (substr($mms, 0, 1)=='-' && stripos($mms, '%')!==false) { $mGr = CutFromTo($mms, '-', '%'); $cfItem = $message[$mGr]; $mms = str_ireplace("-".$mGr."%", $cfItem, $mms); } $mout .= $mms; \r
+    } $msg = $mout; \r
+  }  \r
+  \r
+  \r
+  \r
+  return trim($msg);\r
+}}\r
+//## Common Dialogs\r
+if (!function_exists('nxs_showImgToUseDlg')){ function nxs_showImgToUseDlg($nt, $ii, $imgToUse, $hide=false){ ?>\r
+ <tr id="altFormatIMG<?php echo $nt.$ii; ?>" style="<?php echo $hide?'display:none;':''; ?>"><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Image(s) to use:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                  <td><input type="checkbox" class="isAutoImg" <?php if ($imgToUse=='') { ?>checked="checked"<?php } ?>  id="isAutoImg-<?php echo $nt; ?><?php echo $ii; ?>" name="<?php echo $nt; ?>[<?php echo $ii; ?>][isAutoImg]" value="A"/> <?php _e('Auto', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+                  <?php if ($imgToUse!='') { ?> <a onclick="nxs_clPrvImgShow('<?php echo $nt; ?><?php echo $ii; ?>');return false;" href="#"><?php _e('Show all', 'social-networks-auto-poster-facebook-twitter-g'); ?></a><br/>  \r
+                    <div class="nxs_prevImagesDiv" id="nxs_<?php echo $nt; ?><?php echo $ii; ?>_idivD"><img class="nxs_prevImages" src="<?php echo $imgToUse; ?>"><div style="display:block;" class="nxs_checkIcon"><div class="media-modal-icon"></div></div></div>\r
+                  <?php } else { ?><br/><?php } ?>\r
+                    <div id="imgPrevList-<?php echo $nt; ?><?php echo $ii; ?>" class="nxs_imgPrevList"></div>  \r
+                    <input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][imgToUse]" value="<?php echo $imgToUse ?>" id="imgToUse-<?php echo $nt; ?><?php echo $ii; ?>" /> \r
+                </td></tr> \r
+<?php }}\r
+if (!function_exists('nxs_showURLToUseDlg')){ function nxs_showURLToUseDlg($nt, $ii, $urlToUse){ ?>\r
+ <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('URL to use:', 'social-networks-auto-poster-facebook-twitter-g') ?></th>\r
+                  <td><input type="checkbox" class="isAutoURL" <?php if ($urlToUse=='') { ?>checked="checked"<?php } ?>  id="isAutoURL-<?php echo $nt; ?><?php echo $ii; ?>" name="<?php echo $nt; ?>[<?php echo $ii; ?>][isAutoURL]" value="A"/> <?php _e('Auto', 'social-networks-auto-poster-facebook-twitter-g'); ?> - <i><?php _e('Post URL or globally defined URL will be used', 'social-networks-auto-poster-facebook-twitter-g'); ?></i>\r
+                  \r
+                    <div class="nxs_prevURLDiv" <?php if (trim($urlToUse)=='') { ?> style="display:none;"<?php } ?> id="isAutoURLFld-<?php echo $nt; ?><?php echo $ii; ?>">\r
+                      &nbsp;&nbsp;&nbsp;<?php _e('URL:', 'social-networks-auto-poster-facebook-twitter-g') ?> <input size="90" type="text" name="<?php echo $nt; ?>[<?php echo $ii; ?>][urlToUse]" value="<?php echo $urlToUse ?>" id="URLToUse-<?php echo $nt; ?><?php echo $ii; ?>" /> \r
+                      <br/><span><?php _e('This will trigger "Network will decide attachment info". Image and other settings will be ignored.', 'social-networks-auto-poster-facebook-twitter-g') ?></span>\r
+                    </div>\r
+                  \r
+                </td></tr> \r
+<?php }}\r
+\r
+//## Tests\r
+function nxs_cURLTestCode($url){  \r
+  $out = 'There is a problem with cURL. You need to contact your server admin or hosting provider. Here is the PHP code to reproduce the problem:<br/><pre style="color:#005800">&lt;?php '."\r\n".' $ch = curl_init(); '."\r\n".' curl_setopt($ch, CURLOPT_URL, "'.$url.'"); '."\r\n".' curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"); '."\r\n".' curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); '."\r\n".' curl_setopt($ch, CURLOPT_TIMEOUT, 10); '."\r\n".' curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); '."\r\n".' $response = curl_exec($ch); '."\r\n".' $errmsg = curl_error($ch); '."\r\n".' $cInfo = curl_getinfo($ch); '."\r\n".' curl_close($ch); '."\r\n".' print_r($errmsg); '."\r\n".' print_r($cInfo); '."\r\n".' print_r($response); '."\r\n".'?&gt;</pre>'; return $out; \r
+}\r
+function nxs_cURLTest($url, $msg, $testText){ echo "<br/>--== Test Requested ... ".$url."<br/>";  $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); \r
+  curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.39 Safari/537.36"); \r
+  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);\r
+  $response = curl_exec($ch); $errmsg = curl_error($ch); $cInfo = curl_getinfo($ch); curl_close($ch); echo "Testing ... ".$url." - ".$cInfo['url']."<br/>";\r
+  if (stripos($response, $testText)!==false) echo "....".$msg." - OK<br/>"; else { echo "....<b style='color:red;'>".$msg." - Problem</b><br/>"; prr($response); prr($errmsg); prr($cInfo); echo nxs_cURLTestCode($url);  }\r
+}\r
+\r
+//## Reposter\r
+function nxs_adjRpst($optionsii, $pval){  if (empty($optionsii['rpstDays'])) $optionsii['rpstDays'] = 0; if (empty($optionsii['rpstHrs'])) $optionsii['rpstHrs'] = 0; if (empty($optionsii['rpstMins'])) $optionsii['rpstMins'] = 0;\r
+    \r
+    $rpstEvrySecEx = $optionsii['rpstDays']*86400+$optionsii['rpstHrs']*3600+$optionsii['rpstMins']*60; $isRpstWasOn = isset($optionsii['rpstOn']) && $optionsii['rpstOn']=='1';\r
+    \r
+    if (isset($pval['rpstOn']))    $optionsii['rpstOn'] = $pval['rpstOn']; else $optionsii['rpstOn'] = 0;\r
+    \r
+    if (isset($pval['rpstDays']))  $optionsii['rpstDays'] = trim($pval['rpstDays']);       \r
+    if (isset($pval['rpstHrs']))   $optionsii['rpstHrs'] = trim($pval['rpstHrs']);     if ((int)$optionsii['rpstHrs']>23) $optionsii['rpstHrs'] = 23;\r
+    if (isset($pval['rpstMins']))  $optionsii['rpstMins'] = trim($pval['rpstMins']);   if ((int)$optionsii['rpstMins']>59) $optionsii['rpstMins'] = 59;    \r
+    if (isset($pval['rpstRndMins']))  $optionsii['rpstRndMins'] = trim($pval['rpstRndMins']);       \r
+    if (isset($pval['rpstPostIncl']))  $optionsii['rpstPostIncl'] = trim($pval['rpstPostIncl']);     \r
+    \r
+    if (isset($pval['rpstStop']))  $optionsii['rpstStop'] = trim($pval['rpstStop']); else $optionsii['rpstStop'] = 'O';      \r
+     \r
+    \r
+    $rpstEvrySecNew = $optionsii['rpstDays']*86400+$optionsii['rpstHrs']*3600+$optionsii['rpstMins']*60;\r
+    $rpstRNDSecs = isset($optionsii['rpstRndMins'])?$optionsii['rpstRndMins']*60:0; if ($rpstRNDSecs>$rpstEvrySecNew) $optionsii['rpstRndMins'] = 0;\r
+    \r
+    if ($rpstEvrySecNew!=$rpstEvrySecEx || (!$isRpstWasOn && $optionsii['rpstOn']=='1')) { $currTime = time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); $optionsii['rpstNxTime'] = $currTime + $rpstEvrySecNew; }\r
+    if (isset($pval['rpstType']))  $optionsii['rpstType'] = trim($pval['rpstType']);       \r
+    if (isset($pval['rpstTimeType']))  $optionsii['rpstTimeType'] = trim($pval['rpstTimeType']);       \r
+    if (isset($pval['rpstFromTime']))  $optionsii['rpstFromTime'] = trim($pval['rpstFromTime']);       \r
+    if (isset($pval['rpstToTime']))  $optionsii['rpstToTime'] = trim($pval['rpstToTime']);       \r
+    if (isset($pval['rpstOLDays']))  $optionsii['rpstOLDays'] = trim($pval['rpstOLDays']);       \r
+    if (isset($pval['rpstNWDays']))  $optionsii['rpstNWDays'] = trim($pval['rpstNWDays']);       \r
+    if (isset($pval['rpstOnlyPUP']))  $optionsii['rpstOnlyPUP'] = trim($pval['rpstOnlyPUP']); else $optionsii['rpstOnlyPUP'] = 0;     \r
+    \r
+    if (isset($pval['nxsCPTSeld']))      $optionsii['nxsCPTSeld'] = serialize($pval['nxsCPTSeld']);              \r
+    \r
+    if (isset($pval['fltrsOn'])) $optionsii['fltrsOn'] = trim($pval['fltrsOn']); else $optionsii['fltrsOn'] = 0;     \r
+    \r
+    if (isset($pval['tagsSel'])) {  $optionsii['tagsSel'] = trim($pval['tagsSel']); $tagsSelX = array(); $tggsSel = explode(',', $optionsii['tagsSel']); \r
+      foreach ($tggsSel as $tggg){ $tggg = trim($tggg); $tagsSelX[] = $tggg;  \r
+        if (stripos($tggg, '|')!==false) { $tgArr =  explode('|', $tggg); $taxonomy = $tgArr[0]; $tgggT = $tgArr[1]; } else { $taxonomy = 'post_tag'; $tgggT = $tggg; } \r
+        $tgArr = get_term_by( 'slug', $tgggT, $taxonomy, ARRAY_A); if (is_array($tgArr)) $tagsSelX[] = $tgArr['term_id'];\r
+      }  $optionsii['tagsSelX'] = implode(',', $tagsSelX); \r
+    }\r
+    if (isset($pval['custTaxSel']))  $optionsii['custTaxSel'] = trim($pval['custTaxSel']);     \r
+        \r
+    if (isset($pval['rpstBtwHrsType']))  $optionsii['rpstBtwHrsType'] = trim($pval['rpstBtwHrsType']);       \r
+    if (isset($pval['rpstBtwHrsT']))  $optionsii['rpstBtwHrsT'] = trim($pval['rpstBtwHrsT']);  if (isset($optionsii['rpstBtwHrsT'])&&(int)$optionsii['rpstBtwHrsT']>23) $optionsii['rpstBtwHrsT'] = 23;         \r
+    if (isset($pval['rpstBtwHrsF']))  $optionsii['rpstBtwHrsF'] = trim($pval['rpstBtwHrsF']);  if (isset($optionsii['rpstBtwHrsF'])&&(int)$optionsii['rpstBtwHrsF']>23) $optionsii['rpstBtwHrsF'] = 23;               \r
+    if (isset($pval['rpstBtwDays']))  $optionsii['rpstBtwDays'] = $pval['rpstBtwDays']; else $optionsii['rpstBtwDays'] = array(); \r
+    return $optionsii;\r
+}\r
+\r
+function nxs_showCatTagsCTFilters($nt, $ii, $options){ global $nxs_snapAvNts, $nxs_plurl; \r
+  if (!isset($options['tagsSel'])) $options['tagsSel'] = ''; if (!isset($options['custTaxSel'])) $options['custTaxSel'] = '';\r
+  ?> <div class="nxs_tls_cpt">\r
+  \r
+  <?php _e('Filter Autoposting by', 'social-networks-auto-poster-facebook-twitter-g'); ?></div>\r
+    <div class="nxs_tls_bd">\r
+    <div style="width:100%;"><strong><?php _e('Categories', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong>\r
+       <input value="0" id="catSelA<?php echo strtoupper($nt); ?><?php echo $ii; ?>" type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSel]" <?php if ((int)$options['catSel'] != 1) echo "checked"; ?> /> <?php _e('All', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+       <input value="1" id="catSelS<?php echo strtoupper($nt); ?><?php echo $ii; ?>" type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSel]" <?php if ((int)$options['catSel'] == 1) echo "checked"; ?> /> <a href="#" style="text-decoration: none;" class="showCats" id="nxs_SCA_<?php echo strtoupper($nt); ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo strtoupper($nt); ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo strtoupper($nt); ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo strtoupper($nt); ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;"><?php _e('Selected', 'social-networks-auto-poster-facebook-twitter-g'); ?><?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>       \r
+       <input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo strtoupper($nt); ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />\r
+    <br/><i><?php _e('Only selected categories will be autoposted to this account', 'social-networks-auto-poster-facebook-twitter-g'); ?></i></div> \r
+    <br/>\r
+    <div style="width:100%;"><strong><?php _e('Tags and Custom Taxonomies', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong>\r
+       <input name="<?php echo $nt; ?>[<?php echo $ii; ?>][tagsSel]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['tagsSel'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />     \r
+    <br/><i><?php _e('Only posts with those tags assigned will be autoposted to this account, you can include custom taxonomy tags in taxonomy_slug|tag format.', 'social-networks-auto-poster-facebook-twitter-g'); ?></i></div> \r
+    <br/>\r
+    </div> <?php\r
+}\r
+\r
+\r
+function nxs_showRepostSettings($nt, $ii, $options){ global $nxs_snapAvNts, $nxs_plurl;   \r
+  if (empty($options['rpstPostIncl'])) $options['rpstPostIncl'] = 0; if (empty($options['rpstPostIncl'])) $options['rpstLastShTime'] = ''; if (empty($options['rpstNxTime'])) $options['rpstNxTime'] = '';\r
+  if (empty($options['rpstLastPostID'])) $options['rpstLastPostID'] = '';\r
+\r
+  ?>\r
+    <div class="nxs_tls_cpt">\r
+   <?php _e('Auto Reposting', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;&nbsp;<span class="nxsInstrSpan"><a href="http://www.nextscripts.com/snap-features/old-posts-auto-reposting/" target="_blank"><?php _e('[Instructions]', 'social-networks-auto-poster-facebook-twitter-g'); ?></a> &nbsp;&nbsp; <b style="color: darkred;">Please note:</b> This feature is depreciated, <a href="http://www.nextscripts.com/blog/old-posts-reposting-no-longer-supported/" target="_blank">no longer supported</a> and will be replaced with something much better in the upcoming ver 3.5 </span>\r
+   </div>\r
+   \r
+   <?php $cr = get_option('NXS_cronCheck'); if (!empty($cr) && is_array($cr) && isset($cr['status']) && $cr['status']=='0') { \r
+      global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) return; $gOptions = $plgn_NS_SNAutoPoster->nxs_options; \r
+       if (isset($gOptions['forceBrokenCron']) && $gOptions['forceBrokenCron'] =='1') { ?> \r
+         <span style="color: red"> <?php _e('Your WP Cron is not working correctly. Auto Reposting service is active by force. <br/> This might cause problems. Please see the test results and recommendations', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+         &nbsp;-&nbsp;<a target="_blank" href="<?php global $nxs_snapThisPageUrl; echo $nxs_snapThisPageUrl; ?>&do=crtest">WP Cron Test Results</a></span>\r
+        <?php } else { ?> <span style="color: red"> <?php _e('Auto Reposting service is Disabled. Your WP Cron is not working correctly. Please see the test results and recommendations', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+     &nbsp;-&nbsp;<a target="_blank" href="<?php global $nxs_snapThisPageUrl; echo $nxs_snapThisPageUrl; ?>&do=crtest">WP Cron Test Results</a></span>\r
+   <?php return; } } ?>\r
+   \r
+   \r
+   <div class="nxs_tls_bd">\r
+     <div class="nxs_tls_sbInfo"><?php _e('Plugin could autorepost existing posts', 'social-networks-auto-poster-facebook-twitter-g'); ?></div>\r
+     <input value="1"  id="riC<?php echo $ii; ?>" <?php if (isset($options['rpstOn']) && trim($options['rpstOn'])=='1') echo "checked"; ?> type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstOn]"/> \r
+       <b><?php _e('Repost existing posts every', 'social-networks-auto-poster-facebook-twitter-g'); ?> </b>\r
+     \r
+     <input type="text" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstDays]" style="width: 35px;" value="<?php echo isset($options['rpstDays'])?$options['rpstDays']:'0'; ?>" />&nbsp;<?php _e('Days', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;&nbsp;\r
+     <input type="text" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstHrs]" style="width: 35px;" value="<?php echo isset($options['rpstHrs'])?$options['rpstHrs']:'2'; ?>" />&nbsp;<?php _e('Hours', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;&nbsp;\r
+     <input type="text" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstMins]" style="width: 35px;" value="<?php echo isset($options['rpstMins'])?$options['rpstMins']:'0'; ?>" />&nbsp;<?php _e('Minutes', 'social-networks-auto-poster-facebook-twitter-g'); ?>     \r
+     <div style="padding-left:10px;padding-top:10px;line-height:30px;"> \r
+     \r
+     <b><?php _e('Randomize posting time &#177;', 'social-networks-auto-poster-facebook-twitter-g'); ?> </b>\r
+     <input type="text" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstRndMins]" style="width: 35px;" value="<?php echo isset($options['rpstRndMins'])?$options['rpstRndMins']:'15'; ?>" onmouseout="hidePopShAtt('RPST1');" onmouseover="showPopShAtt('RPST1', event);" />&nbsp;<?php _e('Minutes', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+     <br/>     \r
+     <input value="1"  id="riOC<?php echo $ii; ?>" <?php if (isset($options['rpstOnlyPUP']) && trim($options['rpstOnlyPUP'])=='1') echo "checked"; ?> type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstOnlyPUP]"/> \r
+       <b><?php _e('Repost ONLY previously unautoposted posts', 'social-networks-auto-poster-facebook-twitter-g'); ?></b>\r
+     <br/>\r
+     <?php $args=array('public'=>true, '_builtin'=>false);  $output = 'names';  $operator = 'and';  $post_types = array(); \r
+     if (function_exists('get_post_types')) $post_types=get_post_types($args, $output, $operator); \r
+       if (!empty($post_types) && is_array($post_types)) { ?>\r
+     <b><?php _e('Repost: (Choose Posts, Pages, Custom Post Types)', 'social-networks-auto-poster-facebook-twitter-g'); ?></b>\r
+     <?php $post_typesIncl = array('post'=>'post', 'page'=>'page'); $post_types = array_merge($post_typesIncl, $post_types);    if ($options['nxsCPTSeld']=='a:1:{i:0;s:1:"0";}') $options['nxsCPTSeld'] = '';\r
+       if (!empty($options['nxsCPTSeld'])) $nxsCPTSeld = unserialize($options['nxsCPTSeld']); else $nxsCPTSeld = array('post');  \r
+             ?> <div class="nxs_box_inside" style="padding: 0px;" > <div class="itemDiv"  style="padding: 0px;"> <div class="taxonomydiv"><div class="tabs-panel" style="padding: 10px;"><input type="hidden" name="nxsCPTSeld[]" value="0" /> <?php //prr($nxsCPTSeld); prr($post_types); prr($_POST['nxsCPTSeld']);              \r
+             foreach ($post_types as $cptID=>$cptName){ if (in_array($cptID, $nxsCPTSeld)) $dCh = ' checked="checked" '; else $dCh = "";\r
+              ?><input type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][nxsCPTSeld][]" value="<?php echo esc_attr($cptID); ?>"<?php echo $dCh ?>>&nbsp;<?php echo $cptName ?><br/> <?php\r
+             }\r
+      ?></div></div> </div> </div>          \r
+     <?php } ?>\r
+     <?php if (function_exists('nxs_doSMAS41')) nxs_doSMAS41($nt, $ii, $options); ?>          \r
+     <b><?php _e('Get posts', 'social-networks-auto-poster-facebook-twitter-g'); ?></b>\r
+       <select id="riS<?php echo $nt; ?><?php echo $ii; ?>" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstType]" onchange="nxs_actDeActTurnOff(jQuery(this).attr('id'));"><?php if (function_exists('nxs_doSMAS42')) nxs_doSMAS42($options); ?>        \r
+        <option value="2" <?php  if (isset($options['rpstType']) && $options['rpstType']=='2') echo 'selected="selected"' ?>>One By One - Old to New</option><option value="3" <?php if (isset($options['rpstType']) && $options['rpstType']=='3') echo 'selected="selected"' ?>>One By One - New to Old</option>\r
+        </select> \r
+      <br/> \r
+      <div style="padding-left: 15px;">\r
+      <input type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstTimeType]" value="D" <?php if (isset($options['rpstTimeType']) && $options['rpstTimeType']=='D') echo 'checked="checked"'; ?> />\r
+      \r
+      <?php _e('from', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;<input type="text" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstFromTime]" style="width: 75px;" value="<?php echo isset($options['rpstFromTime'])?$options['rpstFromTime']:''; ?>" />&nbsp;          \r
+      <?php _e('to', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;<input type="text" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstToTime]" style="width: 75px;" value="<?php echo isset($options['rpstToTime'])?$options['rpstToTime']:''; ?>" />\r
+     <br/>\r
+     <input type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstTimeType]" value="A" <?php if (!isset($options['rpstTimeType']) || $options['rpstTimeType']=='A') echo 'checked="checked"'; ?> />\r
+     <?php _e('Older then', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;<input type="text" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstOLDays]" style="width: 35px;" value="<?php  echo isset($options['rpstOLDays'])?$options['rpstOLDays']:'30'; ?>" />&nbsp;<?php _e('Days', 'social-networks-auto-poster-facebook-twitter-g'); ?>          \r
+     <?php _e('and Newer then', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;<input type="text" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstNWDays]" style="width: 35px;" value="<?php  echo isset($options['rpstNWDays'])?$options['rpstNWDays']:'365'; ?>" />&nbsp;<?php _e('Days', 'social-networks-auto-poster-facebook-twitter-g'); ?>     \r
+     </div>\r
+     <div id="riS<?php echo $nt; ?><?php echo $ii; ?>xd"  style="padding-left: 0px;<?php if (isset($options['rpstType']) && $options['rpstType']=='1') echo "display:none;"; ?>"><b><?php _e('When finished', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>       \r
+         <input type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstStop]" value="O" <?php if (empty($options['rpstStop']) || (isset($options['rpstStop']) && trim($options['rpstStop'])=='O')) echo "checked"; ?>  /> <?php _e('Auto Turn Reposting Off', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+         &nbsp;&nbsp;&nbsp;\r
+         <input type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstStop]" value="W" <?php if (isset($options['rpstStop']) && trim($options['rpstStop'])=='W') echo 'checked="cheXcked"'; ?> /> <?php _e('Wait for new posts', 'social-networks-auto-poster-facebook-twitter-g') ?>\r
+         &nbsp;&nbsp;&nbsp;\r
+         <input type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstStop]" value="R" <?php if (isset($options['rpstStop']) && trim($options['rpstStop'])=='R') echo 'checked="cheTcked"'; ?> /> <?php _e('Loop it. Reset and Start from the begining', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+         </div>\r
+    \r
+     <hr/>\r
+     <strong style="font-size: 12px; margin: 10px; margin-left: 1px;">New posts will be set by default to:</strong>\r
+             <select name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"><option <?php echo !empty($options['rpstPostIncl'])?'selected="selected"':''; ?> value="nxsi<?php echo $ii.$nt; ?>">Enabled for Repost</option>\r
+             <option <?php echo empty($options['rpstPostIncl'])?'selected="selected"':''; ?>  value="0">Disabled for Repost</option></select><br/>\r
+      <div style="padding-left: 15px;"> <img id="nxsLoadingImg<?php echo $nt; ?><?php echo $ii; ?>" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' />       \r
+      \r
+      <?php      \r
+        global $nxs_rpst_older, $nxs_rpst_newer, $nxs_rpst_lastID, $nxs_rpst_lastTime, $nxs_rpst_type, $nxs_rpst_code, $nxs_rpst_NT;  $ntOpts = $options;         \r
+        $currTime = time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );\r
+        if (!empty($ntOpts['nxsCPTSeld'])) $tpArray = maybe_unserialize($ntOpts['nxsCPTSeld']); else $tpArray = 'post';\r
+        if ($ntOpts['rpstType']=='1') $args = array ( 'orderby' => 'rand', 'posts_per_page' => '1', 'post_type' => $tpArray, 'ignore_sticky_posts' => 1, 'post_status' => 'publish', 'suppress_filters' => false ); \r
+        if ($ntOpts['rpstType']=='2') $args = array ( 'posts_per_page' => '1', 'orderby' => 'date ID', 'order'=>'ASC', 'post_type' => $tpArray, 'post_status' => 'publish', 'suppress_filters' => false );\r
+        if ($ntOpts['rpstType']=='3') $args = array ( 'posts_per_page' => '1', 'orderby' => 'date ID', 'order'=>'DESC', 'post_type' => $tpArray, 'post_status' => 'publish', 'suppress_filters' => false );                   \r
+        $rpstToTime = strtotime($ntOpts['rpstToTime']); if ($currTime < $rpstToTime) $rpstToTime = $currTime;\r
+        $rpstFromTime = strtotime($ntOpts['rpstFromTime']); if ($currTime < $rpstFromTime) $rpstFromTime = $currTime;\r
+        if ($ntOpts['rpstTimeType']=='D') { $nxs_rpst_older = ceil(abs($currTime - $rpstToTime) / 86400); $nxs_rpst_newer = ceil(abs($currTime - $rpstFromTime) / 86400);                   \r
+          } else { $nxs_rpst_older = $ntOpts['rpstOLDays']; $nxs_rpst_newer = $ntOpts['rpstNWDays']; } $ggg = $ntOpts['rpstType']=='1'?'Random':($ntOpts['rpstType']=='3'?'New to Old':'Old to New');\r
+        if ($nxs_rpst_newer>5000) $nxs_rpst_newer = 5000;  if ($nxs_rpst_newer<$nxs_rpst_older) $nxs_rpst_older = 0;                 \r
+        $nxs_rpst_code = 'nxsi'.$ii.$nt; $nxs_rpst_NT = strtoupper($nt);\r
+        add_filter( 'posts_join' , 'nxs_custom_posts_join');\r
+        if (isset($ntOpts['rpstOnlyPUP']) && trim($ntOpts['rpstOnlyPUP'])=='1')  {  add_filter( 'posts_where', 'nxs_filter_where_only' ); }\r
+        add_filter( 'posts_where', 'nxs_filter_where' ); $query = new WP_Query( $args ); remove_filter( 'posts_where', 'filter_where' ); \r
+        echo "Total posts included in reposting: ".$query->found_posts;      \r
+      ?><br/>\r
+      \r
+     <?php _e('Set All Existing Posts to: ', 'social-networks-auto-poster-facebook-twitter-g'); ?>\r
+     &nbsp;&nbsp;<span class="nxsInstrSpan"><a href="#" onclick="nxs_setRpstAll('<?php echo $nt; ?>','1','<?php echo $ii; ?>'); return false;"><?php _e('[Enabled for Repost]', 'social-networks-auto-poster-facebook-twitter-g'); ?></a> </span>\r
+     &nbsp;&nbsp;<span class="nxsInstrSpan"><a href="#" onclick="nxs_setRpstAll('<?php echo $nt; ?>','0','<?php echo $ii; ?>'); return false;"><?php _e('[Disabled for Repost]', 'social-networks-auto-poster-facebook-twitter-g'); ?></a> </span>        \r
+     &nbsp;&nbsp;<span class="nxsInstrSpan"><a href="#" onclick="nxs_setRpstAll('<?php echo $nt; ?>','2','<?php echo $ii; ?>'); return false;"><?php _e('[Enabled/Disabled for Repost according to Categories/Tags/Taxonomies filters]', 'social-networks-auto-poster-facebook-twitter-g'); ?></a> </span>        \r
+              \r
+     </div><hr/>\r
+     <b><?php _e('Last post', 'social-networks-auto-poster-facebook-twitter-g'); ?></b>&nbsp;(ID:&nbsp;<?php echo !empty($options['rpstLastPostID'])?$options['rpstLastPostID']:''; ?>)&nbsp;<b><?php _e('was re-posted on:', 'social-networks-auto-poster-facebook-twitter-g'); ?></b>&nbsp;<?php echo $options['rpstLastShTime']>0?date_i18n('Y-m-d H:i', $options['rpstLastShTime']):'Never'; ?>\r
+        &nbsp;&nbsp;<b><?php _e('Next post will be ~', 'social-networks-auto-poster-facebook-twitter-g'); ?></b>&nbsp;<?php echo $options['rpstNxTime']>0?date_i18n('Y-m-d H:i', $options['rpstNxTime']):'Never'; ?> &lt;==\r
+        &nbsp;&nbsp;<span class="nxsInstrSpan"><a href="#" onclick="nxs_setRpstAll('<?php echo $nt; ?>','X','<?php echo $ii; ?>'); return false;"><?php _e('[Reset]', 'social-networks-auto-poster-facebook-twitter-g'); ?></a> </span>\r
+     <br/>\r
+     <b><?php _e('Set "Last re-posted post ID" to:', 'social-networks-auto-poster-facebook-twitter-g'); ?>&nbsp;<input type="text" id="<?php echo $nt; ?><?php echo $ii; ?>SetLPID" style="width: 65px;" value="<?php echo $options['rpstLastPostID']; ?>" />\r
+     &nbsp;&nbsp;<span class="nxsInstrSpan"><a href="#" onclick="nxs_setRpstAll('<?php echo $nt; ?>','L','<?php echo $ii; ?>'); return false;"><?php _e('[Set]', 'social-networks-auto-poster-facebook-twitter-g'); ?></a> </span></b>\r
+     </div>      \r
+   </div>      \r
+    <?php \r
+}\r
+function nxs_custom_posts_join($join){ global $wpdb; $join .= " LEFT JOIN $wpdb->postmeta ON $wpdb->posts.ID = $wpdb->postmeta.post_id "; return $join;}\r
+function nxs_filter_where_only( $where = '' ) { global $wpdb; $where .= " AND ($wpdb->postmeta.meta_key = 'snap_isAutoPosted' AND $wpdb->postmeta.meta_value = '1') "; return $where; }\r
+function nxs_filter_where( $where = '' ) { global $wpdb, $nxs_rpst_older, $nxs_rpst_newer, $nxs_rpst_lastID, $nxs_rpst_lastTime, $nxs_rpst_type, $nxs_rpst_typeONLY, $nxs_rpst_code, $nxs_rpst_NT; \r
+    $where .= " AND post_date > '" . date_i18n('Y-m-d', strtotime('-'.$nxs_rpst_newer.' days')) . " 00:00:00'" . " AND post_date < '" . date_i18n('Y-m-d', strtotime('-'.$nxs_rpst_older.' days')) . " 23:59:59'";    \r
+    $where .= " AND ($wpdb->postmeta.meta_key = 'snap".$nxs_rpst_NT."' AND $wpdb->postmeta.meta_value LIKE '%".$nxs_rpst_code."%') ";\r
+    if ($nxs_rpst_type=='2' && $nxs_rpst_lastID!='') $where .= " AND ( (post_date = '".$nxs_rpst_lastTime."' && ID > ".$nxs_rpst_lastID." ) || post_date > '".$nxs_rpst_lastTime."' )";\r
+    if ($nxs_rpst_type=='3' && $nxs_rpst_lastID!='') $where .= " AND ( (post_date = '".$nxs_rpst_lastTime."' && ID < ".$nxs_rpst_lastID." ) || post_date < '".$nxs_rpst_lastTime."' )";\r
+    if ($nxs_rpst_typeONLY) $where .= " AND ($wpdb->postmeta.meta_key = 'snap_isAutoPosted' AND $wpdb->postmeta.meta_value = '1') ";\r
+    return $where; \r
+}\r
+\r
+function nxs_rePoster(){ global $nxs_snapAvNts,$plgn_NS_SNAutoPoster, $nxs_rpst_older, $nxs_rpst_newer, $nxs_rpst_lastID, $nxs_rpst_lastTime, $nxs_rpst_type, $nxs_rpst_code, $nxs_rpst_NT;   \r
+  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;  $rpstBtwHrsF = 0; $rpstBtwHrsT = 0;\r
+  $currTime = time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );  $hasChanged = false;   \r
+  // if (stripos($_SERVER["REQUEST_URI"], 'wp-cron.php')!==false) nxs_addToLogN('A', 'NXSPoster - Cron', $logNT, '-=Time=- '.$ret. "ERR: ".$currTime, $extInfo);\r
+  if (stripos($_SERVER["REQUEST_URI"], 'wp-cron.php')===false) return false; $warn = true;\r
+  \r
+  foreach ($nxs_snapAvNts as $avNt) {\r
+    if (isset($options[$avNt['lcode']]) && is_array($options[$avNt['lcode']]) && count($options[$avNt['lcode']])>0) { \r
+        foreach ($options[$avNt['lcode']] as $ii=>$ntOpts) { $logNT = '<span style="color:#800000">'.$avNt['name'].'</span> - '.(isset($ntOpts['nName'])?$ntOpts['nName']:'');      \r
+          if (isset($ntOpts['rpstOn']) && $ntOpts['rpstOn']=='1') {    \r
+            //## Calculate Times\r
+            $lastTime = (isset($ntOpts['rpstLastShTime']) && (int)$ntOpts['rpstLastShTime']>0 )?$ntOpts['rpstLastShTime']:$currTime;\r
+            $rpstEvrySec = $ntOpts['rpstDays']*86400+$ntOpts['rpstHrs']*3600+$ntOpts['rpstMins']*60; $rndSec = $ntOpts['rpstRndMins']*60;\r
+            $nxTime = (isset($ntOpts['rpstNxTime']) && (int)$ntOpts['rpstNxTime']>0)?$ntOpts['rpstNxTime']:$currTime+$rpstEvrySec;  \r
+            //## First time? Set the options and get out. \r
+            if (empty($ntOpts['rpstLastShTime'])) {  $ntOpts['rpstLastShTime'] = $currTime; $ntOpts['rpstNxTime'] = $lastTime + $rpstEvrySec + rand(0-$rndSec, $rndSec); \r
+              $options[$avNt['lcode']][$ii] = $ntOpts; update_option($plgn_NS_SNAutoPoster->dbOptionsName, $options); $plgn_NS_SNAutoPoster->nxs_options = $options;  \r
+               nxs_addToLogN('S', 'RE-Poster', $logNT, 'Initialization - First post will be: '.date_i18n('Y-m-d H:i:s', $ntOpts['rpstNxTime']), $extInfo); continue; \r
+            }\r
+            //## Is it time to post?\r
+            if ($nxTime < $currTime) {  $times =  "Requested Time: ".date_i18n('Y-m-d H:i:s', $nxTime)." | Current Time:".date_i18n('Y-m-d H:i:s', $currTime)." | "; \r
+              //## Check if WP Cron is healthy   \r
+              if ($warn) { $cr = get_option('NXS_cronCheck'); $warn = false; if (!empty($cr) && is_array($cr) && isset($cr['status']) && $cr['status']=='0') { global $nxs_snapThisPageUrl;     \r
+                if (isset($options['forceBrokenCron']) && $options['forceBrokenCron'] =='1') \r
+                  nxs_addToLogN('W', 'Re-Poster is active by force. This could cause problems.', $logNT, 'Please see ', '<a target="_blank" href="'.$nxs_snapThisPageUrl.'&do=crtest">WP Cron Test Results</a>|'.$times); \r
+                else { nxs_addToLogN('W', 'Re-Poster is Disabled', $logNT, 'Please see ', '<a target="_blank" href="'.$nxs_snapThisPageUrl.'&do=crtest">WP Cron Test Results</a>|'.$times); return; }\r
+              }} \r
+              \r
+              if (!isset($ntOpts['rpstNxTime']) || (int)$ntOpts['rpstNxTime']<1) $ntOpts['rpstNxTime'] = 0; //prr($ntOpts);            \r
+              //## Check if Day or Hour is excluded\r
+              if (isset($ntOpts['rpstBtwHrsType']) && $ntOpts['rpstBtwHrsType']=='D'){ \r
+                //## Check Days\r
+                if (isset($ntOpts['rpstBtwDays']) && count($ntOpts['rpstBtwDays'])>0 ) $rpstBtwDays = $ntOpts['rpstBtwDays']; else $rpstBtwDays = array();            \r
+                if (is_array($rpstBtwDays) && count($rpstBtwDays)>0) { $currDay = (int)date_i18n('w'); if (!(in_array($currDay, $rpstBtwDays))) { // echo "D :( ";\r
+                  nxs_addToLogN('S', 'RE-Poster', $logNT, 'Skipped - Excluded Day - '.$currDay, $extInfo);  continue;  \r
+                }}\r
+                //## Check Hours\r
+                if (isset($ntOpts['rpstBtwHrsF']) && (int)$ntOpts['rpstBtwHrsF']>0) $rpstBtwHrsF = (int)$ntOpts['rpstBtwHrsF']; else $rpstBtwHrsF = 0;\r
+                if (isset($ntOpts['rpstBtwHrsT']) && (int)$ntOpts['rpstBtwHrsT']>0) $rpstBtwHrsT = (int)$ntOpts['rpstBtwHrsT'];\r
+                if ($rpstBtwHrsT>0) { $currHour = (int)date_i18n('H', $currTime);  //echo "H ".$currHour." ?";\r
+                if ( !( ($rpstBtwHrsF<$rpstBtwHrsT && $currHour<$rpstBtwHrsT && $currHour>=$rpstBtwHrsF) || ($rpstBtwHrsF>$rpstBtwHrsT && $currHour<$rpstBtwHrsF && $currHour>=$rpstBtwHrsT) )) {  //echo "H :( ";\r
+                  nxs_addToLogN('S', 'RE-Poster', $logNT, 'Skipped - Excluded Hour - '.$currHour, $extInfo);  continue;  \r
+                }}\r
+              }\r
+              //## Do Post                \r
+              $hasChanged = true; $nxs_rpst_type = $ntOpts['rpstType'];\r
+              $nxs_rpst_lastID = (isset($ntOpts['rpstLastPostID']) && (int)$ntOpts['rpstLastPostID']>0)?$ntOpts['rpstLastPostID']:($ntOpts['rpstType']=='3'?'90000000':'0');\r
+              $nxs_rpst_lastTime = (!empty($ntOpts['rpstLastPostTime']) && $ntOpts['rpstLastPostTime']!='2050-12-12' && $ntOpts['rpstLastPostTime']!='1975-01-01')?$ntOpts['rpstLastPostTime']:($ntOpts['rpstType']=='3'?'2050-12-12':'1975-01-01');\r
+              if (!empty($ntOpts['nxsCPTSeld'])) $tpArray = maybe_unserialize($ntOpts['nxsCPTSeld']); else $tpArray = 'post';\r
+              //nxs_addToLogN('S', 'pTypes', $logNT, print_r($tpArray, true), $extInfo); // $tpArray = array('post', 'location');\r
+              if ($ntOpts['rpstType']=='1') $args = array ( 'orderby' => 'rand', 'posts_per_page' => '1', 'post_type' => $tpArray, 'ignore_sticky_posts' => 1, 'post_status' => 'publish', 'suppress_filters' => false ); \r
+              if ($ntOpts['rpstType']=='2') $args = array ( 'posts_per_page' => '1', 'orderby' => 'date ID', 'order'=>'ASC', 'post_type' => $tpArray, 'post_status' => 'publish', 'suppress_filters' => false );\r
+              if ($ntOpts['rpstType']=='3') $args = array ( 'posts_per_page' => '1', 'orderby' => 'date ID', 'order'=>'DESC', 'post_type' => $tpArray, 'post_status' => 'publish', 'suppress_filters' => false );                   \r
+              //## Get Post for Reposting\r
+              //   nxs_addToLogN('S', 'pTypes- ARG', $logNT, print_r($args, true), $extInfo);\r
+              $rpstToTime = strtotime($ntOpts['rpstToTime']); if ($currTime < $rpstToTime) $rpstToTime = $currTime;  $rpstFromTime = strtotime($ntOpts['rpstFromTime']); if ($currTime < $rpstFromTime) $rpstFromTime = $currTime;\r
+              if ($ntOpts['rpstTimeType']=='D') { $nxs_rpst_older = ceil(abs($currTime - $rpstToTime) / 86400); \r
+                $nxs_rpst_newer = ceil(abs($currTime - $rpstFromTime) / 86400);                   \r
+              } else { $nxs_rpst_older = $ntOpts['rpstOLDays']; $nxs_rpst_newer = $ntOpts['rpstNWDays']; } $ggg = $ntOpts['rpstType']=='1'?'Random':($ntOpts['rpstType']=='3'?'New to Old':'Old to New');\r
+              if ($nxs_rpst_newer>5000) $nxs_rpst_newer = 5000;  if ($nxs_rpst_newer<$nxs_rpst_older) $nxs_rpst_older = 0;\r
+                $nxs_rpst_code = 'nxsi'.$ii.$avNt['lcode']; $nxs_rpst_NT = strtoupper($avNt['lcode']);\r
+                add_filter( 'posts_join' , 'nxs_custom_posts_join');\r
+                if (isset($ntOpts['rpstOnlyPUP']) && trim($ntOpts['rpstOnlyPUP'])=='1')  {  add_filter( 'posts_where', 'nxs_filter_where_only' ); }\r
+                add_filter( 'posts_where', 'nxs_filter_where' ); $query = new WP_Query( $args ); remove_filter( 'posts_where', 'filter_where' ); // $extInfo = print_r($query, true);                   \r
+                   \r
+                $rpstLastPostID = $query->posts[0]->ID;  $rpstLastPostTime = $query->posts[0]->post_date;  $ntOpts['rpstLastPostTime'] =  ($rpstLastPostTime!='')?$rpstLastPostTime:($ntOpts['rpstType']=='3'?'1985-01-01':'2050-12-12');\r
+                $extInfo = " | Reposting (<b>".$ggg."</b>) POST ID:".$rpstLastPostID. " | Total posts included in reposting: ".$query->found_posts." | Prev Post ID:".$nxs_rpst_lastID ." | ".($options['extDebug']=='1'?"|Query: ".print_r($query->request, true):'');\r
+                   \r
+                //echo "<br/>\r\n".$rpstEvrySec."<br/>\r\n";\r
+                $ntOpts['rpstLastShTime'] = $currTime; $rndTime = rand(0-$rndSec, $rndSec); $ntOpts['rpstNxTime'] = $lastTime + $rpstEvrySec*2 + $rndTime;  \r
+                if ((int)$rpstLastPostID<1) {  \r
+                  $extInfo = " | Reposting (<b>".$ggg."</b>) | Total posts included in reposting: ".$query->found_posts." | ".($options['extDebug']=='1'?"|Query: ".print_r($query->request, true):'');                      \r
+                  if ($ntOpts['rpstType']=='1') nxs_addToLogN('S','Random Re-Posting - Nothing to post',$logNT, $times.'| Last Time:'.date_i18n('Y-m-d H:i:s', $lastTime).' RND Time: '.$rndTime.' - Next Time - '.date_i18n('Y-m-d H:i:s', $ntOpts['rpstNxTime']).")", $extInfo);\r
+                  else { if (!isset($ntOpts['rpstStop']) || (isset($ntOpts['rpstStop']) && trim($ntOpts['rpstStop'])=='O')) { $ntOpts['rpstOn']='0';  \r
+                      nxs_addToLogN('S','RE-Posting',$logNT,'End of Query - Turning Auto-Reposting Off - '.$times.' | Last Time:'.date_i18n('Y-m-d H:i:s', $lastTime).' Next Time - '.date_i18n('Y-m-d H:i:s', $ntOpts['rpstNxTime']).")", $extInfo);\r
+                    } elseif ( trim($ntOpts['rpstStop'])=='W') \r
+                      nxs_addToLogN('S','RE-Posting',$logNT,'(Waiting mode is ON) <b>Nothing to Repost.</b> | '.$times.' | Last Time:'.date_i18n('Y-m-d H:i:s', $lastTime).' Next Time - '.date_i18n('Y-m-d H:i:s', $ntOpts['rpstNxTime']).")", $extInfo);\r
+                    elseif ( trim($ntOpts['rpstStop'])=='R') { $ntOpts['rpstLastPostID'] = ($ntOpts['rpstType']=='3'?'90000000':'0');\r
+                      nxs_addToLogN('S','RE-Posting',$logNT,'(<b>Nothing to Repost.</b> - End of Query - <b>Resetting<b>)  | '.$times.' | Last Time:'.date_i18n('Y-m-d H:i:s', $lastTime).' Next Time - '.date_i18n('Y-m-d H:i:s', $ntOpts['rpstNxTime']).")", $extInfo);                    }\r
+                  }\r
+                } else { $ntOpts['rpstLastPostID'] = $rpstLastPostID;                                      \r
+                  //## Actual Post                     \r
+                  $clName = 'nxs_snapClass'.strtoupper($avNt['lcode']); $pFuncName = 'nxs_doPublishTo'.strtoupper($avNt['lcode']);                     \r
+                  $po =  get_post_meta($rpstLastPostID, 'snap'.strtoupper($avNt['lcode']), true); $po =  maybe_unserialize($po); \r
+                  $ntClInst = new $clName(); $ntOpts['ii'] = $ii; $ntOpts['pType'] = 'aj'; $ntOptsPost = $ntClInst->adjMetaOpt($ntOpts, $po[$ii]); \r
+                  if ($options['extDebug']=='1') $extInfo .= "<br/><br/>NT OPTS: ".print_r($ntOptsPost, true);  if ($options['extDebug']=='1') $extInfo .= "ARGS: <br/><br/>".print_r($args, true);\r
+                  $result = $pFuncName($rpstLastPostID, $ntOptsPost); //if ($result == 200) die("Successfully sent your post to App.Net."); else die($result);                          \r
+                  nxs_addToLogN('S', 'RE-Posting', $logNT, 'OK  | '.$times.' | Previous Time:'.date_i18n('Y-m-d H:i:s', $lastTime).'| Next Shedulled Time - '.date_i18n('Y-m-d H:i:s', $ntOpts['rpstNxTime']).")<br/>", $extInfo);\r
+                }\r
+              } $options[$avNt['lcode']][$ii] = $ntOpts; // prr($ntOpts);\r
+            }\r
+        }      \r
+    }\r
+  } if ($hasChanged) { update_option($plgn_NS_SNAutoPoster->dbOptionsName, $options); $plgn_NS_SNAutoPoster->nxs_options = $options; }\r
+}\r
+\r
+function nxs_chckBrwsr() { $isOK = false; if (empty($_SERVER['HTTP_USER_AGENT'])) return true;\r
+  if (preg_match('/MSIE/i',$_SERVER['HTTP_USER_AGENT'])) $isOK = true;    if (preg_match('/Internet Explorer/i',$_SERVER['HTTP_USER_AGENT'])) $isOK = true;\r
+  if (preg_match('/Firefox/i',$_SERVER['HTTP_USER_AGENT'])) $isOK = true; if (preg_match('/Opera/i',$_SERVER['HTTP_USER_AGENT'])) $isOK = true;\r
+  if (preg_match('/Chrome/i',$_SERVER['HTTP_USER_AGENT'])) $isOK = true;  if (preg_match('/Safari/i',$_SERVER['HTTP_USER_AGENT'])) $isOK = true;\r
+  if (preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone)/i', strtolower($_SERVER['HTTP_USER_AGENT'])) || (!empty($_SERVER['HTTP_ACCEPT']) && strpos(strtolower($_SERVER['HTTP_ACCEPT']),'application/vnd.wap.xhtml+xml')>0) or ((isset($_SERVER['HTTP_X_WAP_PROFILE']) or isset($_SERVER['HTTP_PROFILE'])))) $isOK = false;\r
+  return $isOK;\r
+}\r
+\r
+//## NXS Cron\r
+if (!function_exists("nxs_psCron")) { function nxs_psCron() { if (!is_home() && !is_front_page()) return; if (nxs_chckBrwsr()==false) return;    \r
+   //if (stripos($_SERVER["REQUEST_URI"], 'admin-ajax.php')!==false || stripos($_SERVER["REQUEST_URI"], 'cf_action')!==false || stripos($_SERVER["REQUEST_URI"], 'wp-cron.php')!==false) return;   \r
+   $ltc = get_option('NSX_LastTChecked'); if (empty($ltc)) { add_option("NSX_LastTChecked", time()); return; } if (time()<$ltc+300) return;  $sh =_get_cron_array();  $itmsToPush = array();   \r
+   if (is_array($sh)) foreach ($sh as $evTime => $evDataX) if (is_array($evDataX)) foreach ($evDataX as $evFunc=>$evData) if (strpos($evFunc, 'ns_doPublishTo')!==false) { $chkTime = rand(360, 600); //$chkTime = rand(5, 7);\r
+     if ($evTime>'1359495839' && $evTime<time()-$chkTime) $itmsToPush[] = array('time'=>$evTime);\r
+   } if (count($itmsToPush)<1) return;  \r
+   /*\r
+   $snapIP = get_post_meta($toPush['args'][0], 'snap_mp_'.$toPush['func'], true); \r
+   nxs_addToLogN('S', 'Missed Scheduled Autoposts Found', '', ' - ('.$evTime."&lt;".(time()-$chkTime).') - Trying to Post', '');\r
+   delete_post_meta(); add_post_meta($toPush['args'][0], 'snap_mp_'.$toPush['func'], (time()+300));\r
+   */\r
+   update_option("NSX_LastTChecked", time());\r
+   $cron_url = site_url('wp-cron.php?doing_wp_cron=0'); ?><script type="text/javascript" > jQuery(document).ready(function($) { jQuery.get('<?php echo $cron_url; ?>'); }); </script><?php // die();\r
+   return true;         \r
+}}\r
+\r
+if (!function_exists("nxs_addToRI")) { function nxs_addToRI($postID) { global $plgn_NS_SNAutoPoster;  if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;\r
+  $riPosts = get_option('NS_SNriPosts'); if (!is_array($riPosts)) $riPosts = array();  $options['riHowManyPostsToTrack'] =  (int) $options['riHowManyPostsToTrack'];  if ($options['riHowManyPostsToTrack']==0) return;\r
+  array_unshift($riPosts, $postID);  $riPosts = array_unique($riPosts); $riPosts = array_slice($riPosts, 0, $options['riHowManyPostsToTrack']); update_option('NS_SNriPosts', $riPosts);\r
+}}\r
+\r
+function nxs_activation(){ if (!wp_next_scheduled('nxs_hourly_event')){wp_schedule_event(time(), 'hourly', 'nxs_hourly_event');} if (!wp_next_scheduled('nxs_querypost_event')){wp_schedule_event(time(), 'nxsreposter', 'nxs_querypost_event');}  }\r
+function nxs_do_this_hourly() {  $options = get_option('NS_SNAutoPoster');   \r
+  if (isset($options['errNotifEmailCB']) && (int)$options['errNotifEmailCB'] == 1 && isset($options['errNotifEmail']) && trim($options['errNotifEmail']) != '') { $logToSend = maybe_unserialize(get_option('NSX_LogToEmail')); // echo "SSS"; \r
+//  prr($logToSend);\r
+    if (is_array($logToSend) && count($logToSend)>0) { $to = $options['errNotifEmail']; $subject = "SNAP Error Log for ".$_SERVER["SERVER_NAME"]; $message = print_r($logToSend, true);\r
+      $eml = get_bloginfo('admin_email'); if (trim($eml)=='') $eml = "snap-notify@".str_ireplace('www.','',$_SERVER["SERVER_NAME"]); \r
+      $headers = "From: " . $eml . "\r\n"; $headers .= "Reply-To: ". $eml . "\r\n"; $headers .= "MIME-Version: 1.0\r\n";\r
+      $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $retval = wp_mail($to, $subject, $message, $headers); echo ($to ."|". $subject."|". $message."|". $headers);\r
+      if ($retval == true) nxs_addToLogN( 'S', 'Log sent to email '.$options['errNotifEmail'], 'ALL', count($logToSend).' records sent', '');  \r
+        else nxs_addToLogN( 'ER', '[FALIED] Log sent to email '.$options['errNotifEmail'], 'ALL', count($logToSend).' records were NOT sent', '');  \r
+      delete_option("NSX_LogToEmail");  \r
+  }}  \r
+  $riPosts = get_option('NS_SNriPosts'); if (!is_array($riPosts)) $riPosts = array(); //## Check for Incoming Comments if nessesary.  \r
+  if ($options['riActive'] != 1 || count($riPosts)<1 ) return;\r
+  if (isset($options['extDebug']) && $options['extDebug']=='1') nxs_addToLogN( 'S', 'Comments Import', 'ALL', 'Checking for new comments now...', print_r($riPosts, true));\r
+  //## Facebook\r
+  if (is_array($options['fb'])) foreach ($options['fb'] as $ii=>$fbo) if ($fbo['riComments']=='1') {  $fbo['ii'] = $ii; $fbo['pType'] = 'aj';\r
+    foreach ($riPosts as $postID) {  \r
+      $fbpo =  get_post_meta($postID, 'snapFB', true); $fbpo =  maybe_unserialize($fbpo); \r
+      if (is_array($fbpo) && isset($fbpo[$ii]) && is_array($fbpo[$ii]) && isset($fbpo[$ii]['pgID']) && trim($fbpo[$ii]['pgID'])!=''){ \r
+          $ntClInst = new nxs_snapClassFB(); $fbo = $ntClInst->adjMetaOpt($fbo, $fbpo[$ii]);  nxs_getBackFBComments($postID, $fbo, $fbpo[$ii]);\r
+      }\r
+    }      \r
+  }   \r
+  //## Twitter\r
+  if (is_array($options['tw'])) foreach ($options['tw'] as $ii=>$fbo) if ($fbo['riComments']=='1') {  $fbo['ii'] = $ii; $fbo['pType'] = 'aj'; $twList = nxs_getBackTWCommentsList($fbo); \r
+    foreach ($riPosts as $postID) {  \r
+      $fbpo =  get_post_meta($postID, 'snapTW', true); $fbpo =  maybe_unserialize($fbpo); \r
+      if (is_array($fbpo) && isset($fbpo[$ii]) && is_array($fbpo[$ii])  && isset($fbpo[$ii]['pgID']) && trim($fbpo[$ii]['pgID'])!=''){ \r
+         $ntClInst = new nxs_snapClassTW(); $fbo = $ntClInst->adjMetaOpt($fbo, $fbpo[$ii]); nxs_getBackTWComments($postID, $fbo, $fbpo[$ii], $twList);\r
+      }\r
+    }      \r
+  } \r
+}\r
+\r
+if (!function_exists('nxsClnCookies')){ function nxsClnCookies($ck) { $ckOut = array(); $t =time(); foreach ($ck as $c) { if ($c->value!='deleted' && $c->expires>$t) $ckOut[] = $c; } return $ckOut; }}\r
+\r
+//#### V3 new Query Poster\r
+function nxs_addToPostingQuery($postID){ global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options; \r
+  $quPosts = maybe_unserialize(get_option('NSX_PostsQuery')); if (!is_array($quPosts)) $quPosts = array();  \r
+  if (!in_array($postID, $quPosts)) $quPosts[] = $postID; update_option('NSX_PostsQuery', $quPosts);    \r
+  //## Update Next Post time\r
+  $currTime = time() + 10 + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); $nxTime = !empty($options['quNxTime'])?$options['quNxTime']:0;\r
+  if (empty($nxTime) || $nxTime < $currTime) { $options['quNxTime'] = $currTime; update_option('NS_SNAutoPoster', $options);  $plgn_NS_SNAutoPoster->nxs_options = $options; }\r
+}\r
+function nxs_do_post_from_query() { nxs_cron_check(); // nxs_addToLogN('A', 'Debug info only. - Cron Time', 'X', '', $extInfo);      \r
+  if (stripos($_SERVER["REQUEST_URI"], 'wp-cron.php')!==false) nxs_rePoster(); //## Run Reposter.\r
+  $options = get_option('NS_SNAutoPoster'); $quPosts = maybe_unserialize(get_option('NSX_PostsQuery')); if (!is_array($quPosts)) $quPosts = array();\r
+  if ($options['quLimit'] != '1' || count($quPosts)<1) return;  $currTime = time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );  $hasChanged = false; \r
+  $postToPost = array_shift($quPosts);   \r
+  \r
+  $pstEvrySec = $options['quDays']*86400+$options['quHrs']*3600+$options['quMins']*60; $rndSec = $options['quLimitRndMins']*60;  \r
+  $nxTime = !empty($options['quNxTime'])?$options['quNxTime']:$currTime+$pstEvrySec; \r
+  \r
+  $extInfo = 'Query Time:'.date_i18n('Y-m-d H:i:s', $options['quNxTime'])."|Previous Time:".date_i18n('Y-m-d H:i:s', $options['quLastShTime']);\r
+  \r
+  if (empty($options['quNxTime']) || $nxTime < $currTime) $hasChanged = true;  // Do Post  \r
+       \r
+  if ($hasChanged) { //## Do Post     \r
+    nxs_addToLogN('A', '**POST STARTED** NXSPoster - WP CRON - Post from Query - Post ID: '.$postToPost, '', 'Curr Time: '.date_i18n('Y-m-d H:i:s', $currTime).'~', $extInfo);        \r
+    $options['quLastShTime'] = $currTime; $rndTime = rand(0-$rndSec, $rndSec); $options['quNxTime'] = $currTime + $pstEvrySec + $rndTime;    \r
+    if ($options['nxsOverLimit']=='D') { $dateC = date("d"); $dayN = date("d", $nxTime); if ($dayN!=$dateC) $quPosts = array(); }    \r
+    update_option('NSX_PostsQuery', $quPosts);  update_option('NS_SNAutoPoster', $options);    \r
+    nxs_snapPublishTo($postToPost, '', true);      \r
+    nxs_addToLogN('A', '**POST FINISHED** NXSPoster - WP CRON - Post from Query - Post ID: '.$postToPost, '', '-=Time=- '.$currTime, $extInfo); \r
+  }\r
+}\r
+\r
+class NXS_HtmlFixer { public $dirtyhtml; public $fixedhtml; public $allowed_styles; private $matrix; public $debug; private $fixedhtmlDisplayCode;\r
+    public function __construct() { $this->dirtyhtml = ""; $this->fixedhtml = ""; $this->debug = false; $this->fixedhtmlDisplayCode = ""; $this->allowed_styles = array();}\r
+    public function getFixedHtml($dirtyhtml) { $c = 0; $this->dirtyhtml = $dirtyhtml; $this->fixedhtml = ""; $this->fixedhtmlDisplayCode = ""; if (is_array($this->matrix)) unset($this->matrix); $errorsFound=0;\r
+      while ($c<10) { if ($c>0) $this->dirtyhtml = $this->fixedxhtml; $errorsFound = $this->charByCharJob(); if (!$errorsFound) $c=10;  $this->fixedxhtml=str_replace('<root>','',$this->fixedxhtml); \r
+        $this->fixedxhtml=str_replace('</root>','',$this->fixedxhtml); $this->fixedxhtml = $this->removeSpacesAndBadTags($this->fixedxhtml); $c++;\r
+      } return $this->fixedxhtml;\r
+    }\r
+    private function fixStrToLower($m){ $right = strstr($m, '='); $left = str_replace($right,'',$m); return strtolower($left).$right;}\r
+    private function fixQuotes($s){ $q = "\""; if (!stristr($s,"=")) return $s; $out = $s; preg_match_all("|=(.*)|",$s,$o,PREG_PATTERN_ORDER);\r
+      for ($i = 0; $i< count ($o[1]); $i++) { $t = trim ( $o[1][$i] ) ; $lc=""; if ($t!="") { if ($t[strlen($t)-1]==">") { $lc= ($t[strlen($t)-2].$t[strlen($t)-1])=="/>"  ?  "/>"  :  ">" ; $t=substr($t,0,-1);}\r
+        if (($t[0]!="\"")&&($t[0]!="'")) $out = str_replace( $t, "\"".$t,$out); else $q=$t[0]; if (($t[strlen($t)-1]!="\"")&&($t[strlen($t)-1]!="'")) $out = str_replace( $t.$lc, $t.$q.$lc,$out);\r
+      }} return $out;\r
+    }\r
+    private function fixTag($t){  $t = preg_replace ( array( '/borderColor=([^ >])*/i', '/border=([^ >])*/i' ),  array('',''), $t);\r
+        preg_match_all('/(?:"[^"]*"|\'[^\']*\'|[^"\'\s]+)+/', $t, $ar);  $ar = $ar[0];// prr($ar);\r
+        $nt = ""; for ($i=0;$i<count($ar);$i++) { if (strpos($ar[$i], 'href=\\\\\\"')!==false) {$ar[$i] = str_replace('\\\\\\"','"',$ar[$i]);}\r
+          if (strpos($ar[$i], 'href=\\"')!==false) {$ar[$i] = str_replace('\\"','"',$ar[$i]);} if (strpos($ar[$i], 'href=\"')!==false) {$ar[$i] = str_replace('\"','"',$ar[$i]);}\r
+          $ar[$i]=$this->fixStrToLower($ar[$i]); if (stristr($ar[$i],"=")) $ar[$i] = $this->fixQuotes($ar[$i]); $nt.=$ar[$i]." ";   \r
+        } $nt=preg_replace("/<( )*/i","<",$nt); $nt=preg_replace("/( )*>/i",">",$nt); return trim($nt);\r
+    }\r
+    private function extractChars($tag1,$tag2,$tutto) {  if (!stristr($tutto, $tag1)) return ''; $s=stristr($tutto,$tag1); $s=substr( $s,strlen($tag1)); if (!stristr($s,$tag2)) return '';\r
+        $s1=stristr($s,$tag2); return substr($s,0,strlen($s)-strlen($s1));\r
+    }\r
+    private function mergeStyleAttributes($s) { $x = ""; $temp = ""; $c = 0;\r
+        while(stristr($s,"style=\"")) {$temp = $this->extractChars("style=\"","\"",$s); if ($temp=="") { return preg_replace("/(\/)?>/i","\"\\1>",$s);}\r
+            if ($c==0) $s = str_replace("style=\"".$temp."\"","##PUTITHERE##",$s); $s = str_replace("style=\"".$temp."\"","",$s); if (!preg_match("/;$/i",$temp)) $temp.=";"; $x.=$temp; $c++;\r
+        }\r
+        if (count($this->allowed_styles)>0) { $check=explode(';', $x); $x=""; foreach($check as $chk){ foreach($this->allowed_styles as $as) if(stripos($chk, $as) !== False) { $x.=$chk.';'; break; } }}\r
+        if ($c>0) $s = str_replace("##PUTITHERE##","style=\"".$x."\"",$s);return $s;\r
+    }\r
+    private function fixAutoclosingTags($tag,$tipo=""){ if (in_array( $tipo, array ("img","input","br","hr")) ) { if (!stristr($tag,'/>')) $tag = str_replace('>','/>',$tag ); } return $tag; }\r
+    private function getTypeOfTag($tag) { $tag = trim(preg_replace("/[\>\<\/]/i","",$tag)); $a = explode(" ",$tag); return $a[0];}\r
+    private function checkTree() { $errorsCounter = 0; for ($i=1;$i<count($this->matrix);$i++) { $flag=false;\r
+      if ($this->matrix[$i]["tagType"]=="div") { $parentType = $this->matrix[$this->matrix[$i]["parentTag"]]["tagType"]; if (in_array($parentType, array("p","b","i","font","u","small","strong","em"))) $flag=true; }\r
+      if (in_array( $this->matrix[$i]["tagType"], array( "b", "strong" )) ) {  $parentType = $this->matrix[$this->matrix[$i]["parentTag"]]["tagType"]; if (in_array($parentType, array("b","strong"))) $flag=true; }\r
+      if (in_array( $this->matrix[$i]["tagType"], array ( "i", "em") )) {  $parentType = $this->matrix[$this->matrix[$i]["parentTag"]]["tagType"]; if (in_array($parentType, array("i","em"))) $flag=true; }\r
+      if ($this->matrix[$i]["tagType"]=="p") { $parentType = $this->matrix[$this->matrix[$i]["parentTag"]]["tagType"]; if (in_array($parentType, array("p","b","i","font","u","small","strong","em"))) $flag=true; }\r
+      if ($this->matrix[$i]["tagType"]=="table") { $parentType = $this->matrix[$this->matrix[$i]["parentTag"]]["tagType"]; if (in_array($parentType, array("p","b","i","font","u","small","strong","em","tr","table"))) $flag=true; }\r
+      if ($flag) { $errorsCounter++; if ($this->debug) echo "<div style='color:#ff0000'>Found a <b>".$this->matrix[$i]["tagType"]."</b> tag inside a <b>".htmlspecialchars($parentType)."</b> tag at node $i: MOVED</div>";                \r
+        $swap = $this->matrix[$this->matrix[$i]["parentTag"]]["parentTag"]; if ($this->debug) echo "<div style='color:#ff0000'>Every node that has parent ".$this->matrix[$i]["parentTag"]." will have parent ".$swap."</div>";\r
+        $this->matrix[$this->matrix[$i]["parentTag"]]["tag"]="<!-- T A G \"".$this->matrix[$this->matrix[$i]["parentTag"]]["tagType"]."\" R E M O V E D -->"; $this->matrix[$this->matrix[$i]["parentTag"]]["tagType"]="";\r
+        $hoSpostato=0;for ($j=count($this->matrix)-1;$j>=$i;$j--) { if ($this->matrix[$j]["parentTag"]==$this->matrix[$i]["parentTag"]) { $this->matrix[$j]["parentTag"] = $swap; $hoSpostato=1; }}\r
+      }}return $errorsCounter;\r
+    }\r
+    private function findSonsOf($parentTag) { $out= "";\r
+      for ($i=1;$i<count($this->matrix);$i++) { if ($this->matrix[$i]["parentTag"]==$parentTag) {\r
+          if ($this->matrix[$i]["tag"]!="") { $out.=$this->matrix[$i]["pre"]; $out.=$this->matrix[$i]["tag"]; $out.=$this->matrix[$i]["post"]; } else { $out.=$this->matrix[$i]["pre"]; $out.=$this->matrix[$i]["post"];}\r
+          if ($this->matrix[$i]["tag"]!="") { $out.=$this->findSonsOf($i); if ($this->matrix[$i]["tagType"]!="") { if (!in_array($this->matrix[$i]["tagType"], array ( "br","img","hr","input"))) $out.="</". $this->matrix[$i]["tagType"].">";}}\r
+      }}return $out;\r
+    }\r
+    private function findSonsOfDisplayCode($parentTag) { $out= "";\r
+        for ($i=1;$i<count($this->matrix);$i++) {\r
+            if ($this->matrix[$i]["parentTag"]==$parentTag) { $out.= "<div style=\"padding-left:15\"><span style='float:left;background-color:#FFFF99;color:#000;'>{$i}:</span>";\r
+                if ($this->matrix[$i]["tag"]!="") { if ($this->matrix[$i]["pre"]!="") $out.=htmlspecialchars($this->matrix[$i]["pre"])."<br>";\r
+                    $out.="".htmlspecialchars($this->matrix[$i]["tag"])."<span style='background-color:red; color:white'>{$i} <em>".$this->matrix[$i]["tagType"]."</em></span>";\r
+                    $out.=htmlspecialchars($this->matrix[$i]["post"]);\r
+                } else { if ($this->matrix[$i]["pre"]!="") $out.=htmlspecialchars($this->matrix[$i]["pre"])."<br>"; $out.=htmlspecialchars($this->matrix[$i]["post"]);}\r
+                if ($this->matrix[$i]["tag"]!="") { $out.="<div>".$this->findSonsOfDisplayCode($i)."</div>\n";\r
+                    if ($this->matrix[$i]["tagType"]!="") {\r
+                        if (($this->matrix[$i]["tagType"]!="br") && ($this->matrix[$i]["tagType"]!="img") && ($this->matrix[$i]["tagType"]!="hr")&& ($this->matrix[$i]["tagType"]!="input"))\r
+                            $out.="<div style='color:red'>".htmlspecialchars("</". $this->matrix[$i]["tagType"].">")."{$i} <em>".$this->matrix[$i]["tagType"]."</em></div>";\r
+                    }\r
+                } $out.="</div>\n";\r
+            }\r
+        }return $out;\r
+    }\r
+    private function removeSpacesAndBadTags($s) { $i=0;\r
+      while ($i<10) { $i++; $s = preg_replace (\r
+        array( '/  /i', '/<p([^>])*>(&nbsp;)*\s*<\/p>/i', '/<span([^>])*>(&nbsp;)*\s*<\/span>/i', '/<strong([^>])*>(&nbsp;)*\s*<\/strong>/i', '/<em([^>])*>(&nbsp;)*\s*<\/em>/i',\r
+          '/<font([^>])*>(&nbsp;)*\s*<\/font>/i', '/<small([^>])*>(&nbsp;)*\s*<\/small>/i', '/<\?xml:namespace([^>])*><\/\?xml:namespace>/i', '/<\?xml:namespace([^>])*\/>/i', '/class=\"MsoNormal\"/i',\r
+          '/<o:p><\/o:p>/i', '/<!DOCTYPE([^>])*>/i', '/<!--(.|\s)*?-->/', '/<\?(.|\s)*?\?>/'), \r
+        array(' ', ' ', '', '', '', '', '', '', '', '', '', ' ', '', '' ) , trim($s));\r
+      }return $s;\r
+    }\r
+    private function charByCharJob() { $s = $this->removeSpacesAndBadTags($this->dirtyhtml); if ($s=="") return; //echo "\r\n=!= ".$s." =!=\r\n<br/>\r\n";\r
+        $s = "<root>".$s."</root>"; $contenuto = ""; $ns = ""; $i=0; $j=0; $ss=''; $indexparentTag=0; $padri=array(); array_push($padri,"0"); $this->matrix[$j]["tagType"]="";\r
+        $this->matrix[$j]["tag"]=""; $this->matrix[$j]["parentTag"]="0"; $this->matrix[$j]["pre"]=""; $this->matrix[$j]["post"]=""; $tags=array();\r
+        // echo "\r\n=#= ".$s." =#=\r\n<br/>\r\n";\r
+        while($i<strlen($s)) {\r
+            if ( $s[$i] =="<") { $contenuto = $ns; $ns = ""; $tag=""; while( $i<strlen($s) && $s[$i]!=">" ){ $tag.=$s[$i]; $i++;} $tag.=$s[$i]; if (stristr($tag,'<param') && stristr($tag,'/>')) $tag = str_replace('/>','></param>',$tag);\r
+            $ss .= $tag;                 \r
+        } else $ss .= $s[$i]; $i++; }\r
+        $i=0; $s = $ss; //echo "\r\n== ".$s." ==\r\n<br/>\r\n";\r
+        while($i<strlen($s)) {\r
+            if ( $s[$i] =="<") { $contenuto = $ns; $ns = ""; $tag=""; while( $i<strlen($s) && $s[$i]!=">" ){ $tag.=$s[$i]; $i++;} $tag.=$s[$i];                \r
+                if($s[$i]==">") { $tag = $this->fixTag($tag); $tagType = $this->getTypeOfTag($tag); $tag = $this->fixAutoclosingTags($tag,$tagType);\r
+                    $tag = $this->mergeStyleAttributes($tag); if (!isset($tags[$tagType])) $tags[$tagType]=0; $tagok=true;\r
+                    if (($tags[$tagType]==0)&&(stristr($tag,'/'.$tagType.'>'))&&(stristr($tag,'<'.$tagType)!==false)) { $tagok=false; if ($this->debug) echo "<div style='color:#ff0000'>Found a closing tag <b>".htmlspecialchars($tag)."</b> at char $i without open tag: REMOVED</div>";} else $tagok=true;\r
+                }\r
+                if ($tagok) { $j++; $this->matrix[$j]["pre"]=""; $this->matrix[$j]["post"]=""; $this->matrix[$j]["parentTag"]=""; $this->matrix[$j]["tag"]=""; $this->matrix[$j]["tagType"]="";\r
+                    if (stristr($tag,'/'.$tagType.'>')) { $ind = array_pop($padri); $this->matrix[$j]["post"]=$contenuto; $this->matrix[$j]["parentTag"]=$ind; $tags[$tagType]--;\r
+                    } else { if (@preg_match("/".$tagType."\/>$/i",$tag)||preg_match("/\/>/i",$tag)) { $this->matrix[$j]["tagType"]=$tagType; $this->matrix[$j]["tag"]=$tag;\r
+                      $indexparentTag = array_pop($padri); array_push($padri,$indexparentTag); $this->matrix[$j]["parentTag"]=$indexparentTag; $this->matrix[$j]["pre"]=$contenuto; $this->matrix[$j]["post"]="";\r
+                    } else { $tags[$tagType]++; $this->matrix[$j]["tagType"]=$tagType; $this->matrix[$j]["tag"]=$tag; $indexparentTag = array_pop($padri); array_push($padri,$indexparentTag);\r
+                      array_push($padri,$j); $this->matrix[$j]["parentTag"]=$indexparentTag; $this->matrix[$j]["pre"]=$contenuto; $this->matrix[$j]["post"]=""; }\r
+                    }\r
+                }\r
+            } else { $ns.=$s[$i]; } $i++;\r
+        } for ($eli=$j+1;$eli<count($this->matrix);$eli++) { $this->matrix[$eli]["pre"]=""; $this->matrix[$eli]["post"]=""; $this->matrix[$eli]["parentTag"]=""; $this->matrix[$eli]["tag"]=""; $this->matrix[$eli]["tagType"]="";}\r
+        $errorsCounter = $this->checkTree();  $this->fixedxhtml=$this->findSonsOf(0);return $errorsCounter;\r
+    }\r
+}\r
+\r
+//## parse_str() implementation - max_vars fix.\r
+if (!function_exists("NXS_doSetArrRecursive")) { function NXS_doSetArrRecursive(&$array, $path, $value){ $key = array_shift($path); //prr($path); prr($key); echo "|-"; prr($array); echo "-|";\r
+  if (empty($path)) if (trim($key)=='')  $array[] = $value;  else  $array[$key] = $value; else { if (!isset($array[$key]) || !is_array($array[$key])) $array[$key] = array(); NXS_doSetArrRecursive($array[$key], $path, $value); }\r
+}}\r
+if (!function_exists("NXS_parseQueryStr")) { function NXS_parseQueryStr($url){ $tokens = explode("&", $url); $urlVars = array();\r
+  foreach ($tokens as $token) { $token = urldecode($token); $value = NXS_parseEQStr($token, "=", ""); \r
+    if (preg_match('/^([^\[]*)(\[.*\])$/', $token, $matches)) { if (preg_match_all('/\[([^\]]*)\]/', $matches[2], $matches2)) $gg = $matches2[1]; array_unshift($gg, $matches[1]); NXS_doSetArrRecursive($urlVars, $gg, $value);} \r
+      else $urlVars[$token] = $value;\r
+  } return $urlVars;\r
+}}\r
+if (!function_exists("NXS_parseEQStr")) { function NXS_parseEQStr(&$a, $delim='.', $default=false){ $n = strpos($a, $delim); if ($n === false) return $default; $result = substr($a, $n+strlen($delim)); $a = substr($a, 0, $n); return $result;}}\r
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/readme.txt b/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/readme.txt
new file mode 100644 (file)
index 0000000..73ec60e
--- /dev/null
@@ -0,0 +1,587 @@
+=== NextScripts: Social Networks Auto-Poster ===\r
+\r
+Contributors: NextScripts\r
+Donate link: http://www.nextscripts.com/social-networks-auto-poster-for-wordpress\r
+Tags: automation, autopost, auto-post, auto post, socialnetworks, socialnetwork, social networks, social network, facebook, Flipboard, google, google+, Flickr, twitter, google plus, pinterest, tumblr, blogger, blogspot, blogpost, linkedin, delicious, delicious.com, reddit, reddit.com, plugin, links, Post, posts, api, automatic, seo, scoop.it, integration, bookmark, bookmarks, admin, images, image, social, sharing, share, repost, re-post, wordpress.com, StumbleUpon, Diigo, vBulletin, Plurk, forums, vKontakte, open graph, LiveJournal, SETT, YouTube, Kippt, xing\r
+Requires at least: 3.4\r
+Tested up to: 4.3.1\r
+Stable tag: 3.4.24\r
+License: GPLv2 or later\r
+\r
+Automatically re-publishes blogposts to Facebook, Twitter, Google+, Pinterest, LinkedIn, Blogger, Tumblr, Delicious, Plurk, etc profiles and/or pages\r
+\r
+== Description ==\r
+\r
+**This plugin automatically publishes posts from your blog to your Social Network accounts** such as Facebook, Twitter, Google+(Google Plus), Blogger, Tumblr, Flickr, LiveJournal, Flipboard, DreamWidth, Delicious, Diigo, Instapaper, Stumbleupon, LinkedIn, Pinterest, Plurk, VKontakte(VK.com), YouTube, App.net, Scoop.It, Wordpress, XING etc. The whole process is completely automated. Just write a new post and either entire post or it's nicely formatted announcement with backlink will be published to all your configured social networks. You can reach the most audience and tell all your friends, readers and followers about your new post. Plugin works with profiles, business pages, community pages, groups, etc. Messages are 100% customizable and adopted for each network requirements.\r
+\r
+**ALL NEW SNAP for Wordpress Version 4 is coming soon...**\r
+\r
+More V4 info: http://www.nextscripts.com/tag/v4/\r
+\r
+* **Latest version 3.4** - New networks - XING, Kippt, compatibility with WP 3.9, 4.0, 4.1 and PHP 5.5. \r
+* *Version 3.3* - Post to all social accounts without creating a Wordpress Post. New networks - Flickr, Flipboard, SETT and Scoop.It. \r
+* *Version 3.0* - Auto-repost existing posts, autoposting query, select what image to use for autopost, "Custom URLs" for posts, New networks: App.net, Reddit and deviantart.com\r
+* *Version 2.7* - YouTube Support, FriendFeed support, Auto-import comments from Facebook and Twitter as Wordpress Comments, goo.gl and YOURLS support, ability to spin message text\r
+* *Version 2.6* - Better Interface, DreamWidth support, Instapaper support, ability to auto-import comments from social networks\r
+* *Version 2.5* - Export/Import Plugin settings, direct links to the published posts from the "Edit" page, ability to assign categories to each Social Network. LiveJournal Support.  \r
+* *Version 2.4* - "Image" posts for Facebook and Twitter, bit.ly support, Plurk Support\r
+* *Version 2.3* - Google+ image posts, delayed postings (Pro Only), new networks - Stumbleupon, vBulletin, Diigo\r
+\r
+= Supported Networks =\r
+\r
+* **App.net** - Autopost to your account.\r
+* **Blogger/Blogspot** - Autopost to your blog. HTML is supported.\r
+* **Delicious** - Auto-submit bookmark to your account. \r
+* **Deviantart.com** - Autopost to your blog. HTML is supported.\r
+* **Diigo** - Auto-submit bookmark to your account. \r
+* **Evernote/postach.io** - Auto-post to your Evernote account or postach.io blog.\r
+* **Facebook** - Autopost to your profile, business page, community page, or Facebook group page. Ability to attach your blogpost to Facebook post. Ability to make "Image" posts.\r
+* **Flickr** - Autopost images to your photostream and/or sets. Tags are supported. \r
+* **Flipboard** (*with third party API library*) - post to your magazines.\r
+* **Instapaper** - Auto-submit bookmark to your account. \r
+* **Google+** (*with third party API library*) - Autopost to your profile, business page or community. Ability to attach your blogpost to Google+ post. Ability to make "Image" posts.\r
+* **Kippt** - Auto-submit links to your blogpost to your Kippt list.\r
+* **LinkedIn** - Autopost to your account. Ability to attach your blogpost to LinkedIn post. Autopost to LinkedIn Company pages and/or Groups (*with third party API library*)\r
+* **LiveJournal** - Auto-submit your blogpost to LiveJournal blog or community. "LiveJournal Engine" based website DreamWidth.org is also supported. \r
+* **Pinterest** (*with third party API library*) - Pin your blogpost's featured image to your Pinterest board.\r
+* **Reddit** (*with third party API library*) - post to your subreddits.\r
+* **Scoop.It** - Autopost to your "Topics". Ability to attach your blogpost to scoop. Ability to make "Image" posts.\r
+* **SETT** - Auto-post to your Sett.com blog.\r
+* **Stumbleupon** - Auto-submit bookmark to your account. \r
+* **Tumblr** - Autopost to your account. Ability to attach your blogpost to Tumblr post. HTML is supported.\r
+* **Twitter** - Autopost to your account. Ability to attach Image to tweets.\r
+* **Plurk**  - Autopost to your account. Ability to attach Image to messages.\r
+* **vBulletin** - Auto-submit your blogpost to vBulletin forums. Could create new threads or new posts.\r
+* **vKontakte(VK.com)** - Autopost to your profile or group page. Ability to attach your blogpost to vk.com post. Ability to make "Image" posts.\r
+* **Wordpress** - Auto-submit your blogpost to another blog based on Wordpress. This options includes Wordpress.com, Blog.com, etc..\r
+* **YouTube** (*with third party API library*) - Post messages to your YouTube channel feed. If blogpost has youtube reference it will be attached.\r
+* **XING** - Post text messages or share links.\r
+\r
+... more networks are coming soon ...\r
+\r
+* (*with third party API library*) means that you need to have at least "Run-Time Edition" of <a href="http://www.nextscripts.com/snap-api/">SNAP Universal API</a>. SNAP API Run-Time Edition is included in the <a href="http://www.nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts">SNAP Pro Plugin</a>.\r
+\r
+**Plugin makes 100% White Labeled Posts** The main idea behind the plugin is to give you the ability to promote only yourself. Plugin uses your own apps and all posts to all networks come only from you. No "Shared via NextScripts.com" or "Posted by SNAP for Wordpress" messages.\r
+\r
+Please see <a href="http://www.nextscripts.com/installation-of-social-networks-auto-poster-for-wordpress/">complete installation instructions with screenshots</a>\r
+\r
+**Free and Pro Plugin Features** <a href="http://www.nextscripts.com/snap-features/">Please see more detailed features list</a>\r
+\r
+* Message Formatting Tags\r
+* Assign categories to each Social Network\r
+* Tags/Categories posted as Hashtags\r
+* Auto-import comments from Facebook as WordPress Comments\r
+* Auto-import replies and mentions from and Twitter as WordPress Comments\r
+* URL Shorteners: bit.ly, goo.gl, YOURLS and built in WordPress URL Shortener\r
+* Additional URL Parameters \r
+* Custom URLs for AutoPosts \r
+* Export/Import Plugin settings\r
+* See direct links to the published posts from the "Edit" page\r
+* "Image" posts for Facebook, Google+, Vkontakte and Twitter\r
+* Ability to "Spin" message post templates\r
+* Auto re-posting of the old posts\r
+\r
+**Also included exclusively in the <a href="http://www.nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts">SNAP Pro Plugin</a>**\r
+\r
+* Ability to make Scheduled and Delayed postings\r
+* Auto-repost existing random posts from from specific dates or "older then N days and younger then X days".\r
+* Limit random or one-by-one auto-reposting for specific days of the week and times. (like Monday-Friday from 8AM to 7PM Only)\r
+* Reddit Autoposting Support\r
+* LinkedIn Company Pages Autoposting support\r
+* Advanced Autoposting to Blogger\r
+* [Limited Time Only - included to "Pro" for free] Google+ Autoposting Support ($49.95 value)\r
+* [Limited Time Only - included to "Pro" for free] Pinterest Autoposting Support ($49.95 value)\r
+\r
+**Get Support**\r
+\r
+<a href="http://www.nextscripts.com/support/">Contact support/Open Support Ticket</a>\r
+\r
+== Installation ==\r
+\r
+You need to have account with either Facebook, Tumblr, Google+, LinkedIn, Pinterest, Blogger, Twitter, Delicious, Diigo, Plurk, LiveJournal, Stumbleupon, DreamWidth or all of them.\r
+\r
+**Very detailed installation instructions with screenshots are located here:** http://www.nextscripts.com/installation-of-social-networks-auto-poster-for-wordpress \r
+\r
+How to setup each type of Social Network\r
+\r
+* <a href="http://www.nextscripts.com/setup-installation-facebook-social-networks-auto-poster-wordpress/">Facebook Configuration</a>\r
+* <a href="http://www.nextscripts.com/setup-installation-twitter-social-networks-auto-poster-wordpress/">Twitter Configuration</a>\r
+* <a href="http://www.nextscripts.com/setup-installation-google-plus-social-networks-auto-poster-wordpress/">Google+ Configuration</a>\r
+* <a href="http://www.nextscripts.com/setup-installation-pinterest-social-networks-auto-poster-wordpress/">Pinterest Configuration</a>\r
+* <a href="http://www.nextscripts.com/setup-installation-tumblr-social-networks-auto-poster-wordpress/">Tumblr Configuration</a>\r
+* <a href="http://www.nextscripts.com/setup-installation-linkedin-social-networks-auto-poster-wordpress/">LinkedIn Configuration</a>\r
+* <a href="http://www.nextscripts.com/setup-installation-blogger-social-networks-auto-poster-wordpress/">Blogger Configuration</a>\r
+* <a href="http://www.nextscripts.com/setup-installation-delicious-social-networks-auto-poster-wordpress/">Delicious Configuration</a>\r
+* <a href="http://www.nextscripts.com/setup-installation-wp-based-social-networks-auto-poster-wordpress/">Blog.com/Wordpress.com Configuration</a>\r
+* <a href="http://www.nextscripts.com/setup-installation-diigo-social-networks-auto-poster-wordpress/">Diigo Configuration</a>\r
+* <a href="http://www.nextscripts.com/setup-installation-plurk-social-networks-auto-poster-wordpress/">Plurk Configuration</a>\r
+\r
+**More Networks/Instructions here:** http://www.nextscripts.com/installation-of-social-networks-auto-poster-for-wordpress \r
+\r
+Having problems? Please check out the <a href="http://www.nextscripts.com/troubleshooting-social-networks-auto-poster">Troubleshooting FAQ</a> page.\r
+\r
+**Get Support**\r
+\r
+<a href="http://www.nextscripts.com/support/">Contact support/Open Support Ticket</a>\r
+\r
+== Frequently Asked Questions ==\r
+\r
+= What is the difference between "Free" and "Pro" versions? =\r
+\r
+Free plugin is limited to one account per each type of connected networks. In other words you can add 1 Facebook, AND 1 Twitter AND 1 LinkedIn AND 1 etc ... accounts in the "Free" version. This is enough for about 95% of users.\r
+\r
+<a href="http://www.nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts">SNAP Pro Plugin</a> is NOT limited in number of accounts per each type of connected networks.  You can add 10 (or 100) Facebook, AND 15 Twitter AND 5 LinkedIn AND 25 etc ... accounts in the "Pro" version. \r
+\r
+Please see more here: <a href="http://www.nextscripts.com/social-networks-auto-poster-pro-for-wordpress-compare-editions//">Compare Editions</a>\r
+\r
+=  What networks in your auto-poster plugin are free and what are not? Why some networks are not free? =\r
+\r
+All networks except Google+, Pinterest and LinkedIn Company Pages are available for free.\r
+\r
+It really depends on the availability of the free API from the Social Network itself.\r
+Facebook, Twitter, Tumblr, LinkedIn and others have a very good and powerful free APIs that could be used for publishing posts. Those networks are free for you. Some networks like Google+ and Pinterest don't have API or have a read-only API that doesn't allow to make posts. We had to create our own API libraries for such networks and those libraries are available separately for some fee.\r
+\r
+=  Does the free plugin support Wordpress Multisite (ex-WPMU)? =\r
+\r
+Free plugin does not support Wordpress Multisite. There is a separate "Pro for WPMU" plugin available for Wordpress Multisite. Please see more here: <a href="http://www.nextscripts.com/social-networks-auto-poster-pro-for-wordpress-compare-editions//">Compare Editions</a>\r
+\r
+= Can I use it just for Twitter (Facebook, LinkedIn, Delicious) or it requires all networks to be set? =\r
+\r
+Sure you can use it for just one or two networks.\r
+\r
+= Can it post to Facebook and Google+ pages? Not to profiles, but to pages. =\r
+\r
+Yes, it can. Specify page IDs in the settings, and it will post to pages. \r
+\r
+= Why it's not so easy to setup? Why do I need all those apps? There are other plugins (Jetpack Publicize, Linksalpha Network Publisher, etc ) that could do it much easier. =\r
+\r
+There is a major difference between SNAP and other auto-posting plugins. Plugin MUST use an "App" to make posts. if plugin doesn't ask you to create your own app, it will use an app set by plugin author. Yes, it's easier to setup but it means that with every post you make you will promote that plugin author to all your friends and followers. All those posts will be marked as "Shared via Wordpress.com" or "posted by Linksalpha". SNAP gives you an ability to setup your own apps and promote only yourself. We have a very detailed and illustrated setup instructions and our support can help you with that. We believe that it's well worth to spend your time by setting it up, instead of doing free advertisement for somebody else.\r
+\r
+Please see more <a href="http://www.nextscripts.com/faq/">Frequently asked questions</a>\r
+\r
+== Screenshots ==\r
+\r
+1. Add new post metadata box (Pro Version)\r
+2. Settings Page (Pro Version)\r
+3. Facebook: Types of Post \r
+4. Google+: Types of Post \r
+\r
+== Changelog ==\r
+\r
+= 3.4.25 [09/21/2015] =\r
+\r
+* SNAP has been selected to be added to translate.wordpress.org. This release brings compatibility with it. \r
+\r
+= 3.4.24 [09/16/2015] =\r
+\r
+* Bug Fix - [Critical] Some users have "Log/History" and "New Post" tabs blank after 3.4.23 update. \r
+\r
+= 3.4.23 [09/15/2015] =\r
+\r
+* New - Wordpress 4.3.1 Compatibility\r
+* New - New setting - How to separate hashtags.\r
+* New/Bug Fix [Facebook] Support for new automatic page naming structure (pagename-pageID, example: https://www.facebook.com/nextscripts-270851199672443/). It was causing #803 error. \r
+* FYI - Facebook no longer allows posting to secret groups if you are not an admin. It is causing "Unsupported post request" error. More info: http://gd.is/fbe2\r
+\r
+= 3.4.22 [08/20/2015] =\r
+\r
+* New - New URL Shortener - u.to - Simple and anonymous use only. No accounts, no stats.\r
+* Bug Fix - Workaround for annoying Google Chrome "auto-fill" issue casing "ghost" accounts to be added on each "Settings Save" \r
+* Bug Fix - Some minor code improvements. \r
+\r
+= 3.4.21 [07/09/2015] =\r
+\r
+* New/Bug Fix - [Urgent][Critical] Facebook API 2.4 Compatibility. Usage of API 2.4 was causing "Invalid Scopes: user_groups" and other problems breaking autoposting to Facebook. \r
+\r
+= 3.4.20 [07/06/2015] =\r
+\r
+* New - Emoji support. (http://www.nextscripts.com/snap-features/emoji-support/)\r
+* Bug Fix - [Critical] Some users are unable to add new Blogger account with NextScripts API.\r
+\r
+\r
+= 3.4.19 [07/02/2015] =\r
+\r
+* New/Bug Fix - [Critical] Support for Blogger oAuth 2.0 API. Blogger(Google) has discontinued support for "ClientLogin" authentication method that SNAP was using for several years. All Blogger accounts must be removed and re-added with oAuth 2.0 authentication method. (Free Plugin Only) \r
+* Improvement - Improved "Filter by tags" feature.\r
+* Bug Fix - Fix for Fatal error: Cannot redeclare nxs_noLiGrps() \r
+* [XING] Improved connection stability.\r
+* [Instapapper] fix for broken URL parameters.\r
+\r
+= 3.4.18 [05/18/2015] =\r
+\r
+* Bug Fix - [Critical] Fix "Warning: Invalid argument supplied for foreach() in '***' on line 37". \r
+* Improvement/Bug Fix - Improved Security \r
+\r
+= 3.4.17 [05/15/2015] =\r
+\r
+* New/Improvement - Wordpress 4.2.2 compatibility.\r
+* New/Bug Fix - [Critical] LinkedIn (May 2015) Principal API changes compatibility. Fixes all posting and authorization issues. \r
+* [LinkedIn] [Breaking change] Groups are no longer supported via native LinkedIn API. \r
+* [LinkedIn] New, more clear LinkedIn configuration interface. \r
+* [LinkedIn] New post type: Image. (NextScripts API ONLY). (Profile and Company pages ONLY).\r
+* [Flickr] Flickr can post latitude and longitude info from post meta fields geo_latitude and geo_longitude. Thanks to petermolnar for the code. \r
+* Improvement - Performance and stability improvements for all Google services - Google+, Blogger, YouTube\r
+\r
+= 3.4.16 [03/26/2015] =\r
+\r
+* New/Bug Fix - [Critical] Facebook API 2.3 Compatibility. Usage of API 2.3 was causing "ERROR(#200) The user hasn't authorized the application to perform this action"\r
+* New - New URL Shortener - x.co\r
+* New - Facebook videos are now supported for Facebook Video posts in addition to YouTube and Vimeo.\r
+* Notice - FriendFeed has been shut down permanently. It has been removed from SNAP.\r
+* Notice - DeviantArt API is being extremely unstable and buggy on their side for the last several months. Until further notice DeviantArt connector is provided "as is". Please use it on your own risk. \r
+\r
+= 3.4.15 [03/12/2015] =\r
+\r
+* Bug Fix - [Critical] %TITLE% and some other message formatting tags were broken in the version 3.4.14\r
+\r
+= 3.4.14 [03/11/2015] =\r
+\r
+* Improvement - compatibility with QTranslate-X\r
+* Improvement - compatibility with new Facebook rules regarding video thumbnails.\r
+* Improvement - updated Facebook configuration interface. \r
+* Bug Fix - po.st connection issues. \r
+* Bug Fix - [Reset All SNAP Data] link wasn't working in some environments.\r
+* Bug Fix - [StumbleUpon] Fix for some connections issues.\r
+\r
+= 3.4.12 [02/23/2015] =\r
+\r
+* New - New URL Shortener - clk.im\r
+* New - New URL Shortener - po.st\r
+* New - "Force Shortened Links" option as well as "Shorten URL" checkbox on post settings will force shortened links to be used as attachments where possible. \r
+* New - %ANNOUNCER% tag will insert the rest of the post left from %ANNOUNCE% tag.\r
+* New - %AUTHORTWNAME% tag will insert @twitter username from the user settings.\r
+* Improvement - [Twitter] More useful info on image errors.\r
+* Improvement/Bug Fix - %HCT-CustomTaxonomy% will replace spaces in tags.\r
+* Improvement/Bug Fix - [Flickr] More useful info on errors.\r
+* Bug Fix - [XING] Broken XING category exclusion/inclusion \r
+\r
+= 3.4.10 [02/02/2015] =\r
+\r
+* Improvement/Bug Fix - compliance with new LinkedIn API changes causing "(#400) 'submitted-image-url' can not be empty" error\r
+* New - Twitter - ability to post Tweets as replies\r
+\r
+= 3.4.9 [01/28/2015] =\r
+\r
+* New - %CT-CustomTaxonomy% and %HCT-CustomTaxonomy% tags for custom taxonomies.\r
+* Bug Fix - %CF-CustomFieldName% was broken by the 3.4.8\r
+\r
+= 3.4.8 [01/26/2015] =\r
+\r
+* Improvement/Bug Fix - compliance with new Facebook API changes causing "(#100) Tried accessing nonexisting field (access_token) on node type (Group)" error\r
+* Bug Fix - Diigo - was ignoring custom URL selection. \r
+* Bug Fix - Don't keep errors in the DB is "Email errors" isn't checked.\r
+* Bug Fix - Some minor issues.\r
+\r
+= 3.4.7 [12/26/2014] =\r
+\r
+* Improvement - Wodrpress 4.1 Compatibility\r
+* Bug Fix - Flickr - "Invalid signature" problem.\r
+* Bug Fix - Sett - fix for "You need to provide a name" error.\r
+* Bug Fix - Some minor issues.\r
+\r
+= 3.4.6 [12/09/2014] =\r
+\r
+* Bug Fix - fixed corrupted file from 3.4.5\r
+\r
+= 3.4.5 [12/08/2014] =\r
+\r
+* New [Tumblr] - New option: Set post date.\r
+* New [Tumblr] - New option: Fill source URL.\r
+* Bug Fix - [Wordpress.org] "301 Moved Permanently" error message has been fixed.\r
+* Bug Fix - [Instapaper] "Created" error message has been fixed.\r
+\r
+= 3.4.4 [11/17/2014] =\r
+\r
+* New - New network "XING". Post  text messages or share links to your personal account. \r
+* Improvement - Performance and memory usage improvement\r
+* Bug Fix - [Diigo] "301" error message has been fixed.\r
+\r
+= 3.4.3 [09/17/2014] =\r
+\r
+* Improvement - Full Wordpress 4.0 compatibility including fixed for all "deprecated" notices.\r
+* Improvement - Better handling of Twitter characters limit.\r
+* New - %CT-CustomTaxonomy% tag (Twitter only for now)\r
+* Bug Fix - "Verify Featured Image" checkbox in the settings tab was not working along with functionality it should turn on.\r
+* Bug Fix - "Filter posts by tags" was broken.\r
+* Bug Fix - "Filter posts by categories" was not working in some environments involving third party automated posts or scheduled posts\r
+* Bug Fix -  "Incorrect import file" message when importing previously exported file. (Actual problem was with "Export")\r
+* Bug Fix - Duplicate "Update Settings" button.\r
+* Bug Fix - [LinkedIn] ugly error messages.\r
+* Bug Fix - [Plurk] - missing token error.\r
+\r
+= 3.4.2 [07/16/2014] =\r
+\r
+* Bug Fix - Fix for Broken Visual Editor. TinyMCE 4.0 compatibility broke earlier TinyMCE versions. \r
+\r
+= 3.4.1 [07/16/2014] =\r
+\r
+* New - New network "Kippt". Post your blogpost links to your Kippt Lists. \r
+* Improvement - Full PHP 5.5 compatibility including fixed for all "deprecated" notices.\r
+* Improvement - Full Wordpress 3.9 and TinyMCE 4.0 compatibility including fixed for all "deprecated" notices.\r
+* Bug Fix - Checkboxes/Radiobuttons got incorrectly unchecked \r
+* Bug Fix - [Facebook] Fix for "Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request" problem.\r
+* Bug Fix - [Facebook] Fix for posting to boards with international characters in URL.\r
+* Bug Fix - [Facebook] "Unsupported post request" error.\r
+* Bug Fix - [Facebook] Broken ability to post to the hidden groups. \r
+* Bug Fix - [Blogger] "Incorrect JSON" error.\r
+* Bug Fix - [Pinterest] Invalid log entry. "TEST".\r
+* Bug Fix - [Twitter] Wrong codes (like &#8212;).\r
+* Bug Fix - [VK] Better support for phone verification.\r
+* Bug Fix - [SETT] Fix for "Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request" problem.\r
+* Bug Fix - If you put 4 minutes in the dropdown for the Posting Delay, it returns 45 minutes.\r
+\r
+= 3.3.9 [06/06/2014] =\r
+\r
+* New - New tag %ORID% - will insert wordpress post ID.\r
+* Improvement/Bug Fix - [Flickr] Fix for empty error message problem.\r
+* Bug Fix - [LinkedIn] Fix for some connection issues when URL has special chars.\r
+* Bug Fix - [Pinterest] Fix for posting to boards with international characters in URL.\r
+\r
+= 3.3.8 [05/30/2014] =\r
+\r
+* Improvement/Bug Fix - [Flickr] Fix for "SSL is required" problem.\r
+* Improvement/Bug Fix - Compatibility with "Page Builder" plugin.\r
+* Bug Fix - [LinkedIn] Fix for impossible captcha authorization.\r
+* Bug Fix - [LinkedIn] Fix for huge array message.\r
+* Bug Fix - [Pinterest] Fix for incorrect links to created pins\r
+* Bug Fix - [Plurk] Better error handling. No more empty error messages.\r
+* Bug Fix - [DeviantArt] Better error handling. No more empty error messages.\r
+* Bug Fix - [FriendFeed] No more ugly messages during the post.\r
+\r
+\r
+= 3.3.7 [05/09/2014] =\r
+\r
+* [Critical] Googd news!  Facebook backed down on app review requirement. You no longer need to submit your app for review. This version revises this. Please see full story here: <a href="http://www.nextscripts.com/known-issues/facebook-issues/">www.nextscripts.com/known-issues/facebook-issues</a>\r
+* Bug Fix - Debug Facebook URL message has been removed. \r
+\r
+= 3.3.6 [05/09/2014] =\r
+\r
+* [Critical] Bug Fix - Facebook - Facebook API 2.0 Compatibility. Please see here: <a href="http://www.nextscripts.com/known-issues/facebook-issues/">www.nextscripts.com/known-issues/facebook-issues</a>\r
+* Improvement - Compatibility to up to Wordpress 3.9.1.\r
+* Improvement - Added support for Twitter multiline posts.\r
+* Improvement - Twitter - Better 140 characters cut if a lot of tags used.\r
+* Bug Fix - Contributors can't submit posts for review.\r
+* Bug Fix - app.net authorization issues. (like "Please contact the website that sent you here and let them know that there is a problem with the authorization URL")\r
+* Bug Fix - DeviantArt connection problems.\r
+* Bug Fix - Delicious connection problems.\r
+* Bug Fix - Delicious broken tags.\r
+\r
+= 3.3.4 [04/11/2014] =\r
+\r
+* Bug Fix - LinkedIn troubles with entering captcha\r
+* Bug Fix - LinkedIn "Array - Array" Error\r
+* Bug Fix - Plurk "Array" message removed\r
+* Bug Fix - LiveJournal "Array" message removed\r
+* Bug Fix - Sett error "You need to enter a name and email address"\r
+* Bug Fix - Twitter "over 140 characters" error when too many tags are used.\r
+\r
+= 3.3.3 [04/07/2014] =\r
+\r
+* Bug Fix/Improvement - Connection to Facebook has been updated to comply with new requirements. This will fix all "(#100) Tried accessing unexisting field (access_token) on node type (User)" errors.\r
+\r
+= 3.3.2 [04/02/2014] =\r
+\r
+* New - New network "SETT". Post your blogposts to your Sett Blog. \r
+* Bug Fix - LinkedIn Connection issues. \r
+* Bug Fix - Entries like nxs_snap_sh_ have been removed from "Custom Fields" list\r
+* Bug Fix - Many minor bugs. \r
+\r
+= 3.3.1 [03/12/2014] =\r
+\r
+* New/Improvement - More advanced auto-reposting configuration. You can now control what should happen when it's finished. You can turn it of, keep it in waiting mode, or reset and auto-start from the beginning. \r
+* Improvement - Flipboard is now able so set custom URL for autoposting. \r
+* Bug Fix - API message after the tumblr post has been removed.\r
+* Bug Fix - Cron check could produce inconclusive results.\r
+\r
+= 3.3.0 [03/06/2014] =\r
+\r
+* New - New network "Flipboard". Post your links to your magazine. \r
+* Improvement - A lot of code, error handling and interface optimizations and improvements. \r
+* Improvement - Plugin is not using 47kb of official Facebook API for PHP anymore. Facabook autoposting is now more stable and faster.\r
+* Improvement - Auto-Reposting functionality will be disabled if WP Cron is not configured correctly. \r
+* Improvement - Plugin show how many posts is included in auto-reposting on the settings page.\r
+* Bug Fix - Many bug fixes and improvements to the "Auto-Reposting" and "Posts from Query" functionality.\r
+* Bug Fix - Checkboxes with selected categories were not saving correctly.\r
+* Bug Fix - Google+ - custom URL postings were incorrect.\r
+* Bug Fix - Tumblr is now working "New Post to Social Networks"\r
+\r
+= 3.2.3 [02/07/2014] =\r
+\r
+* Improvement - More networks show the links to the created posts in the log. \r
+* Bug Fix - Flickr was missing from the "add new network" list\r
+* Bug Fix - Reddit failed to retrieve reddits with "Moderation" rights.\r
+* Bug Fix - Fixed(removed) an ability for super admin to disable himself for WPMU installations. \r
+* Bug Fix - Twitter - %ANOUNCE% tag was causing message to go over 140 characters. \r
+\r
+= 3.2.2 [02/05/2014] =\r
+\r
+* New - New network "Flickr". Post your images to your photostream and/or sets. Tags are supported. \r
+* Improvement - Some networks show the links to the created posts in the log. \r
+* Improvement/Bug Fix - Compatibility with plugins that hijack all requests with the word 'ajax'.\r
+* Improvement/Bug Fix - Compatibility with custom "post transition" statuses. \r
+* Bug Fix - Google+ - Fixed additional URL parameters.\r
+* Bug Fix - "New Post to social networks" fixed problem with " become \"\r
+* Bug Fix - "New Post to social networks" link is visible only to people who can use SNAP.\r
+* Bug Fix - Broken tabs and "-1" messages on WPMU installations. \r
+\r
+= 3.2.1 [01/30/2014] =\r
+\r
+* [Critical] Bug Fix - Facebook module could overwrite post type to "Text Only" for existing posts.\r
+* New - New Post to social networks without creating Wordpress post link is now in the top "New" menu.\r
+* Bug Fix - fixed link [Enabled/Disabled for Repost according to Categories/Tags/Taxonomies filters] (yes, again)\r
+\r
+= 3.2.0 [01/29/2014] =\r
+\r
+* New - Post to social networks without creating Wordpress post. \r
+* New - New network "Scoop.It". Make text posts, link posts, or image posts. Post with tags. \r
+* New - New LinkedIn Showcase pages are supported. (Pro Only) \r
+* Improvement/Bug Fix - New interface for checkboxes for networks with excluded categories.\r
+* Improvement/Bug Fix - %EXCERPT% tags won't cut the actual excerpt to 300 characters anymore. \r
+* Bug Fix - fized link [Enabled/Disabled for Repost according to Categories/Tags/Taxonomies filters]\r
+* Bug Fix - Stability improvements to re-posting functionality.\r
+\r
+= 3.1.2 [01/15/2014] =\r
+\r
+* [Critical] Bug Fix - [ERROR] (#100) actions should be a JSON-encoded dictionary with 'name' and 'link' keys\r
+* Improvement/Bug Fix - Plugin will import all comments from Facebook posts, not just the first 100.  \r
+* Bug Fix - Plugin were re-posting the same "Sticky" post in some configurations.  \r
+\r
+= 3.1.1 [01/14/2014] =\r
+\r
+* Improvement/Bug Fix - Update for Jan 14 Twitter API change - requirement for ONLY secured SSL connections\r
+* Improvement/Bug Fix - Better compatibility with some WP Admin themes - like fixed missing "Update Settings" button \r
+* Improvement/Bug Fix - Stability improvements and better error handling for Wordpress based sites.\r
+* Improvement/Bug Fix - Some fixes, improvements and optimizations to the re-posting functionality.\r
+* Improvement/Bug Fix - More clear interface for category filters. \r
+* Bug Fix - Missing Twitter image on servers without proper "Content-Length" header\r
+* Bug Fix - Duplicate categories filter for Twitter has been removed. \r
+* Bug Fix - vBulletin module optimization and better error handling.\r
+* Bug Fix - General options were getting overwritten by post options in some configurations. \r
+* Bug Fix - Memory limit problem for servers with more then 1GB of allowed for PHP memory. \r
+\r
+= 3.1.0 [12/12/2013] =\r
+\r
+* New - Wordpress 3.8 Compatibility\r
+* New - New Ajax based settings page - 7 times lighter and faster. \r
+* New - Filter autoposting by tags and custom taxonomies. \r
+* New - Ability to set all posts "Enabled/Disabled for repost" according to the Categories/Tags/Custom Taxonomies filters\r
+* Improvement - Performance/compatibility improvement with latest LastPass extension. \r
+* Improvement - Better compatibility with SSL.\r
+* Improvement/Bug Fix - HTML tags and shortcodes are now removed from Facebook attached titles. \r
+* Improvement/Bug Fix - Compatibility with new LinkedIn security feature "We just sent you the code". \r
+* Bug Fix - Facebook - wrong image was selected for "Image" posts in some configurations.\r
+* Bug Fix - broken reposting if "Newer then XX Days" value is too big. \r
+* Bug Fix - FriendFeed was ignoring message format and posting checkbox. \r
+* Bug Fix - Incorrect display of "Time to Post" for scheduled posts. \r
+* Bug Fix - incorrect "Autopost Cancelled" messages. \r
+\r
+= 3.0.9 [11/22/2013] =\r
+\r
+* New - %FULLTITLE% tag will insert processed title.\r
+* Bug Fix - YouTube - Google+ page setting were not saved.\r
+* Bug Fix - LinkedIn - Titles for groups were ignored.\r
+* Bug Fix - Set Time was not working in Firefox.\r
+* Bug Fix - Plurk authorization problems.\r
+* Bug Fix - Individual Category Excluded was breaking autoposting.\r
+* Bug Fix - Wordpress [caption] tag were broken\r
+\r
+= 3.0.8 [11/18/2013] =\r
+\r
+* Improvement/Bug Fix - OG:Image will be taken the same way as "Post image", not as small thumbnail. \r
+* Bug Fix - Language/Localization files were not working.\r
+* Bug Fix - Wordpress to Wordpress - Excerpts were incorrectly encoded. \r
+* Bug Fix - Reset reposting time after the change. \r
+* Bug Fix - Check if posts status is still "Published" at autoposting time. \r
+* Bug Fix - Reposting wasn't working if dates were out of bounds.\r
+* Bug Fix - Repost only previously unautoposted posts checkbox was not saved.\r
+\r
+= 3.0.7 [11/13/2013] =\r
+\r
+* Improvement/Bug Fix - Pinterest no longer allows shortened URLs. Option has been removed.\r
+* Bug Fix - Auto-reposting self disabling issues. \r
+* Bug Fix - Pinterest was ignoring default image.\r
+* Bug Fix - Several small bug fixes and improvements.\r
+\r
+= 3.0.6 [11/08/2013] =\r
+\r
+* Important Notice - Reddit support has been removed due to abuse. http://gd.is/trdx \r
+* New - Auto-Repost for Custom Post Types.\r
+* Improvement/Bug Fix - Blogger - Better errors handling for free API\r
+* Bug Fix - LinkedIn - Incorrect URL encoding for attached links\r
+* Bug Fix - Tumblr - Test button was incorrectly retuning 404 error.\r
+* Bug Fix - Deviantart - fix for "Couldn't resolve host 'xxxxxxxxxxx.deviantart.com"\r
+* Bug Fix - "&" symbol in the settings were causing some issues. \r
+* Bug Fix - Post setting "Include/Exclude from reposting" was ignored on some configurations. \r
+\r
+= 3.0.5 [11/05/2013] =\r
+\r
+* Improvement - Some code optimization for WMPU, should improve performance on busy sites.\r
+* Improvement/Bug Fix - Some code optimization for better stability. Should fix missing posts.\r
+* Bug Fix - Facebook - "Image" post were missing image or taking the wrong image.\r
+* Bug Fix - "Lost" Featured images in some installations with altered themes.\r
+\r
+= 3.0.4 [11/03/2013] =\r
+\r
+* Important Notice - 64MB of allowed PHP memory is mandatory.  \r
+* Bug Fix - plugin was ignoring some externally/automatically created posts.\r
+* Bug Fix - Import settings button was broken.\r
+* Bug Fix - Repost only previously unautoposted posts checkbox was not saved.\r
+* Bug Fix - trash_to_publish event should be excluded from the log. \r
+* Bug Fix - Twitter was ignoring selected image.\r
+* Bug Fix - Blogger - incorrect "Unfinished setup" message.\r
+* Bug Fix - Twitter - broken qTransalte for Twitter format.\r
+* Bug Fix - Reddit - title and message format problems. \r
+* Bug Fix - LiveJournal - Test button was broken\r
+\r
+= 3.0.3 [11/03/2013] =\r
+\r
+* Bug Fix - Broken/Incorrect WPMU Pages and Sites management\r
+* Bug Fix - Facebook text format issue.\r
+* Bug Fix - Settings Page layout fixes.\r
+\r
+= 3.0.2 [11/01/2013] =\r
+\r
+* Bug Fix - Blank pages on some sites after 2.7->3.0 update\r
+\r
+= 3.0.1 [11/01/2013] =\r
+\r
+* New - Major release with a lot of new and improved features. \r
+* New - Auto-repost existing and already posted posts based on some rules � one-by-one from old to new, one-by-one from new to old, from specific dates, "older then N days and younger then X days".\r
+* New - Add auto-posts to the query that will be posted according to some specified rules (like "two posts per hour")\r
+* New - Select what image to use for "Image" and "Attachment" post types if post has several images\r
+* New - Custom URL for posts\r
+* New - App.net Support\r
+* New - Reddit Support\r
+* New - Deviantart Support\r
+* New - Reset all Settings for existing posts.\r
+* New - Extended debug info.\r
+* New - Ability to send errors by email.\r
+* New - New Option � How to handle spaces in hashtags.\r
+* Improvement - Comments import has been completely redone. Disqus and usernames should be correct now.\r
+* Improvement - Code was optimized for lighter footprint\r
+\r
+= 1.0.0 - 2.7.22 [10/26/2013] =\r
+\r
+Here: http://www.nextscripts.com/snap-wp-changelog.txt\r
+\r
+== Upgrade Notice ==\r
+\r
+Just replace plugin files, the rest will be updated automatically.\r
+\r
+== Other/Copyrights ==\r
+\r
+Plugin Name: Next Scripts Social Networks Auto-Poster\r
+\r
+Plugin URI: http://www.nextscripts.com/social-networks-auto-poster-for-wordpress\r
+\r
+Description: This plugin automatically publishes posts from your blog to your Facebook, Twitter, and Google+ profiles and/or pages.\r
+\r
+Author: Next Scripts\r
+\r
+Author URL: http://www.nextscripts.com\r
+\r
+Copyright 2012-2014  Next Scripts, Inc\r
+\r
+PHP Twitter API: Copyright 2012 -  themattharris - tmhOAuth\r
+\r
+NextScripts.com, Inc
\ No newline at end of file