Version Description
[01/15/2013] =
- [Critical] Bug Fix - ERROR actions should be a JSON-encoded dictionary with 'name' and 'link' keys
- Improvement/Bug Fix - Plugin will import all comments from Facebook posts, not just the first 100.
- Bug Fix - Plugin were re-posting the same "Sticky" post in some configurations.
Download this release
Release Info
Developer | NextScripts |
Plugin | NextScripts: Social Networks Auto-Poster |
Version | 3.1.2 |
Comparing to | |
See all releases |
Code changes from version 3.0.9 to 3.1.2
- NextScripts_SNAP.php +26 -15
- inc-cl/ap.api.php +1 -0
- inc-cl/ap.php +27 -33
- inc-cl/apis/facebook.php +18 -5
- inc-cl/apis/liOAuth.php +1 -1
- inc-cl/apis/tmhOAuth.php +1 -0
- inc-cl/apis/trOAuth.php +5 -1
- inc-cl/apis/xmlrpc-client.php +10 -6
- inc-cl/bg.api.php +3 -1
- inc-cl/bg.php +27 -34
- inc-cl/da.php +19 -28
- inc-cl/di.php +19 -26
- inc-cl/dl.php +19 -25
- inc-cl/fb.api.php +7 -9
- inc-cl/fb.php +32 -36
- inc-cl/ff.php +21 -27
- inc-cl/gp.api.php +1 -1
- inc-cl/gp.php +20 -26
- inc-cl/ip.php +19 -25
- inc-cl/li.php +55 -44
- inc-cl/lj.php +19 -25
- inc-cl/pk.php +32 -38
- inc-cl/pn.php +20 -26
- inc-cl/rd.php +19 -28
- inc-cl/su.php +20 -26
- inc-cl/tr.api.php +2 -2
- inc-cl/tr.php +48 -52
- inc-cl/tw.api.php +2 -2
- inc-cl/tw.php +28 -37
- inc-cl/vb.api.php +10 -6
- inc-cl/vb.php +21 -27
- inc-cl/vk.api.php +1 -0
- inc-cl/vk.php +21 -27
- inc-cl/wp.api.php +3 -4
- inc-cl/wp.php +21 -27
- inc-cl/yt.php +19 -25
- inc/nxs_functions_adv.php +10 -4
- inc/nxs_snap_class.php +26 -9
- js/js.js +63 -58
- lang/nxs_snap-es_ES.mo +0 -0
- lang/nxs_snap-es_ES.po +768 -0
- lang/nxs_snap-pt_BR.mo +0 -0
- lang/nxs_snap-pt_BR.po +1721 -0
- nxs_functions.php +140 -68
- readme.txt +38 -3
NextScripts_SNAP.php
CHANGED
@@ -4,24 +4,25 @@ Plugin Name: NextScripts: Social Networks Auto-Poster
|
|
4 |
Plugin URI: http://www.nextscripts.com/social-networks-auto-poster-for-wordpress
|
5 |
Description: This plugin automatically publishes posts from your blog to multiple accounts on Facebook, Twitter, and Google+ profiles and/or pages.
|
6 |
Author: Next Scripts
|
7 |
-
Version: 3.
|
8 |
Author URI: http://www.nextscripts.com
|
9 |
Text Domain: nxs_snap
|
10 |
Copyright 2012 Next Scripts, Inc
|
11 |
*/
|
12 |
-
define( 'NextScripts_SNAP_Version' , '3.
|
13 |
|
14 |
-
$nxs_mLimit =
|
|
|
15 |
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__);
|
16 |
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;}}
|
17 |
} else {
|
18 |
|
19 |
-
require_once "nxs_functions.php"; require_once "inc/nxs_functions_adv.php"; require_once "inc/nxs_snap_class.php";
|
20 |
//## Include All Available Networks
|
21 |
//error_reporting(E_ALL); ini_set('display_errors', '1');
|
22 |
-
global $nxs_snapAvNts, $nxs_snapThisPageUrl, $nxs_plurl, $nxs_plpath, $nxs_isWPMU, $nxs_tpWMPU;
|
23 |
|
24 |
-
$
|
25 |
$nxs_isWPMU = defined('MULTISITE') && MULTISITE==true;
|
26 |
|
27 |
if (class_exists("NS_SNAutoPoster")) { nxs_checkAddLogTable(); $plgn_NS_SNAutoPoster = new NS_SNAutoPoster(); }
|
@@ -44,11 +45,11 @@ if (isset($_GET['page']) && $_GET['page']=='NextScripts_SNAP.php' && isset($_GET
|
|
44 |
//## Delete Account
|
45 |
if (!function_exists("ns_delNT_ajax")) { function ns_delNT_ajax(){ check_ajax_referer('nxsSsPageWPN'); $indx = (int)$_POST['id'];
|
46 |
global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;
|
47 |
-
unset($options[$_POST['nt']][$indx]); if (is_array($options)) update_option('NS_SNAutoPoster', $options);
|
48 |
}}
|
49 |
if (!function_exists("nsAuthFBSv_ajax")) { function nsAuthFBSv_ajax() { check_ajax_referer('nsFB'); $pgID = $_POST['pgID']; $fbs = array();
|
50 |
global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;
|
51 |
-
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);
|
52 |
}}
|
53 |
if (!function_exists("nsGetBoards_ajax")) {
|
54 |
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;
|
@@ -100,7 +101,7 @@ if (!function_exists("nsGetWLBoards_ajax")) {
|
|
100 |
//## Set all posts to Include/exclude from/to Auto-Reposting
|
101 |
if (!function_exists("nxs_SetRpstAll_ajax")) {
|
102 |
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']]);
|
103 |
-
|
104 |
if ($_POST['ed']=='X' || $_POST['ed']=='L') { // prr($options[$_POST['t']][$_POST['ii']]); prr($options); die();
|
105 |
if ($_POST['ed']=='X') { $options[$_POST['t']][$_POST['ii']]['rpstLastPostID'] = '';
|
106 |
$options[$_POST['t']][$_POST['ii']]['rpstLastShTime'] = ''; $options[$_POST['t']][$_POST['ii']]['rpstLastPostTime'] = ''; $options[$_POST['t']][$_POST['ii']]['rpstNxTime'] = '';
|
@@ -109,7 +110,7 @@ if (!function_exists("nxs_SetRpstAll_ajax")) {
|
|
109 |
$options[$_POST['t']][$_POST['ii']]['rpstLastPostTime'] = $post->post_date;
|
110 |
$options[$_POST['t']][$_POST['ii']]['rpstLastPostID'] = trim($_POST['lpid']);
|
111 |
}
|
112 |
-
if (is_array($options)) update_option('NS_SNAutoPoster', $options); $plgn_NS_SNAutoPoster->nxs_options = $options;
|
113 |
} else {
|
114 |
if (!empty($options['nxsCPTSeld'])) $tpArray = maybe_unserialize($options['nxsCPTSeld']); if (!is_array($tpArray)) $tpArray = array('post'); else $tpArray[] = 'post';
|
115 |
foreach ($tpArray as $tp) if (!empty($tp)) {
|
@@ -145,11 +146,11 @@ if (!function_exists("nxs_AddSUASettings")) { function nxs_AddSUASettings() { g
|
|
145 |
//## Initialize the admin panel if the plugin has been activated
|
146 |
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;
|
147 |
if (function_exists('add_options_page')) { add_options_page('Social Networks Auto Poster',
|
148 |
-
'<
|
149 |
}}}
|
150 |
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;
|
151 |
if (function_exists('add_options_page')) { add_options_page('Social Networks Auto Poster',
|
152 |
-
'<
|
153 |
}}}
|
154 |
//## Main Function to Post
|
155 |
if (!function_exists("nxs_snapLogPublishTo")) { function nxs_snapLogPublishTo( $new_status, $old_status, $post ) {
|
@@ -159,7 +160,9 @@ if (!function_exists("nxs_snapPublishTo")) { function nxs_snapPublishTo($postArr
|
|
159 |
if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;
|
160 |
if (!empty($_POST['nxs_snapPostOptions'])) { $NXS_POSTX = $_POST['nxs_snapPostOptions']; $NXS_POST = array(); $NXS_POST = NXS_parseQueryStr($NXS_POSTX); } else $NXS_POST = $_POST;
|
161 |
if(is_object($postArr)) $postID = $postArr->ID; else { $postID = $postArr; $postArr = get_post($postID); } $isPost = isset($NXS_POST["snapEdIT"]); $post = get_post($postID);
|
162 |
-
if ($post->post_status != 'publish') {
|
|
|
|
|
163 |
//nxs_addToLogN('BG', 'Post Status Changed', '', '-=## Autopost requested.'.($blog_id>1?'BlogID:'.$blog_id:'').' PostID:('.$postID.') Post Type: '.$post->post_type.' ##=-');
|
164 |
$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);
|
165 |
if ( isset($options['nxsCPTSeld']) && $options['nxsCPTSeld']!='') $nxsCPTSeld = unserialize($options['nxsCPTSeld']); else $nxsCPTSeld = array(); // $nxsCPTSeld = array_keys($post_types); - why we needed it?
|
@@ -310,6 +313,14 @@ if (!function_exists("nxs_getExpSettings_ajax")) { function nxs_getExpSettings_a
|
|
310 |
}}
|
311 |
|
312 |
function cron_add_nxsreposter( $schedules ) { $schedules['nxsreposter'] = array( 'interval' => 90, 'display' => __( 'NXS Reposter' )); return $schedules;} // Do this every 90 seconds
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
|
314 |
//## Actions and filters
|
315 |
add_action('shutdown', 'nxs_psCron', 25); //add_action( 'transition_post_status', 'nxs_snapLogPublishTo', 10, 3 );
|
@@ -322,7 +333,7 @@ add_filter('get_avatar','ns_get_avatar', 10, 5 );
|
|
322 |
|
323 |
if (isset($plgn_NS_SNAutoPoster)) { //## Actions
|
324 |
//## Add the admin menu
|
325 |
-
|
326 |
if ($nxs_isWPMU) { add_action('network_admin_menu', 'nxs_AddSUASettings'); global $blog_id; } $suOptions = array();
|
327 |
$suOptions = $plgn_NS_SNAutoPoster->nxs_options; if ($nxs_isWPMU) { $ntOptions = $plgn_NS_SNAutoPoster->nxs_ntoptions; if (!isset($suOptions['suaMode'])) $suOptions['suaMode'] = ''; }
|
328 |
$isPMB = $nxs_isWPMU && function_exists('nxs_doSMAS1') && $blog_id==1;
|
@@ -336,7 +347,7 @@ if (isset($plgn_NS_SNAutoPoster)) { //## Actions
|
|
336 |
add_action('admin_init', 'nxs_adminInitFunc');
|
337 |
add_action( 'admin_enqueue_scripts', 'nxssnap_enqueue_scripts' );
|
338 |
|
339 |
-
add_action('
|
340 |
|
341 |
add_action('wp_ajax_nxs_clLgo', 'nxs_clLgo_ajax');
|
342 |
add_action('wp_ajax_nxs_rfLgo', 'nxs_rfLgo_ajax');
|
4 |
Plugin URI: http://www.nextscripts.com/social-networks-auto-poster-for-wordpress
|
5 |
Description: This plugin automatically publishes posts from your blog to multiple accounts on Facebook, Twitter, and Google+ profiles and/or pages.
|
6 |
Author: Next Scripts
|
7 |
+
Version: 3.1.2
|
8 |
Author URI: http://www.nextscripts.com
|
9 |
Text Domain: nxs_snap
|
10 |
Copyright 2012 Next Scripts, Inc
|
11 |
*/
|
12 |
+
define( 'NextScripts_SNAP_Version' , '3.1.2' );
|
13 |
|
14 |
+
$nxs_mLimit = ini_get('memory_limit'); if (strpos($nxs_mLimit, 'G')) {$nxs_mLimit = (int)$nxs_mLimit * 1024;} else {$nxs_mLimit = (int)$nxs_mLimit;}
|
15 |
+
if ($nxs_mLimit>0 && $nxs_mLimit<64) { add_filter('plugin_action_links','ns_add_nomem_link', 10, 2 );
|
16 |
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__);
|
17 |
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;}}
|
18 |
} else {
|
19 |
|
20 |
+
require_once "nxs_functions.php"; require_once "inc/nxs_functions_adv.php"; require_once "inc/nxs_snap_class.php";
|
21 |
//## Include All Available Networks
|
22 |
//error_reporting(E_ALL); ini_set('display_errors', '1');
|
23 |
+
global $nxs_snapAvNts, $nxs_snapThisPageUrl, $nxs_snapSetPgURL, $nxs_plurl, $nxs_plpath, $nxs_isWPMU, $nxs_tpWMPU, $nxs_skipSSLCheck;
|
24 |
|
25 |
+
$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__);
|
26 |
$nxs_isWPMU = defined('MULTISITE') && MULTISITE==true;
|
27 |
|
28 |
if (class_exists("NS_SNAutoPoster")) { nxs_checkAddLogTable(); $plgn_NS_SNAutoPoster = new NS_SNAutoPoster(); }
|
45 |
//## Delete Account
|
46 |
if (!function_exists("ns_delNT_ajax")) { function ns_delNT_ajax(){ check_ajax_referer('nxsSsPageWPN'); $indx = (int)$_POST['id'];
|
47 |
global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;
|
48 |
+
unset($options[$_POST['nt']][$indx]); if (is_array($options)) { update_option('NS_SNAutoPoster', $options); $plgn_NS_SNAutoPoster->nxs_options = $options; }
|
49 |
}}
|
50 |
if (!function_exists("nsAuthFBSv_ajax")) { function nsAuthFBSv_ajax() { check_ajax_referer('nsFB'); $pgID = $_POST['pgID']; $fbs = array();
|
51 |
global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;
|
52 |
+
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; }
|
53 |
}}
|
54 |
if (!function_exists("nsGetBoards_ajax")) {
|
55 |
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;
|
101 |
//## Set all posts to Include/exclude from/to Auto-Reposting
|
102 |
if (!function_exists("nxs_SetRpstAll_ajax")) {
|
103 |
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']]);
|
104 |
+
if ($_POST['ed']=='2') {echo "OK"; die();} //## !!FIX THIS!!
|
105 |
if ($_POST['ed']=='X' || $_POST['ed']=='L') { // prr($options[$_POST['t']][$_POST['ii']]); prr($options); die();
|
106 |
if ($_POST['ed']=='X') { $options[$_POST['t']][$_POST['ii']]['rpstLastPostID'] = '';
|
107 |
$options[$_POST['t']][$_POST['ii']]['rpstLastShTime'] = ''; $options[$_POST['t']][$_POST['ii']]['rpstLastPostTime'] = ''; $options[$_POST['t']][$_POST['ii']]['rpstNxTime'] = '';
|
110 |
$options[$_POST['t']][$_POST['ii']]['rpstLastPostTime'] = $post->post_date;
|
111 |
$options[$_POST['t']][$_POST['ii']]['rpstLastPostID'] = trim($_POST['lpid']);
|
112 |
}
|
113 |
+
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']]);
|
114 |
} else {
|
115 |
if (!empty($options['nxsCPTSeld'])) $tpArray = maybe_unserialize($options['nxsCPTSeld']); if (!is_array($tpArray)) $tpArray = array('post'); else $tpArray[] = 'post';
|
116 |
foreach ($tpArray as $tp) if (!empty($tp)) {
|
146 |
//## Initialize the admin panel if the plugin has been activated
|
147 |
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;
|
148 |
if (function_exists('add_options_page')) { add_options_page('Social Networks Auto Poster',
|
149 |
+
'<span style="font-weight:bold; color:#2ecc2e;">{SNAP} </span>Social Networks Auto Poster', 'manage_options', basename(__FILE__), array(&$plgn_NS_SNAutoPoster, 'showSNAutoPosterOptionsPage'));
|
150 |
}}}
|
151 |
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;
|
152 |
if (function_exists('add_options_page')) { add_options_page('Social Networks Auto Poster',
|
153 |
+
'<span style="font-weight:bold; color:#2ecc2e">{SNAP} </span>Social Networks Auto Poster ', 'manage_options', basename(__FILE__), array(&$plgn_NS_SNAutoPoster, 'showSNAutoPosterOptionsPagex'));
|
154 |
}}}
|
155 |
//## Main Function to Post
|
156 |
if (!function_exists("nxs_snapLogPublishTo")) { function nxs_snapLogPublishTo( $new_status, $old_status, $post ) {
|
160 |
if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;
|
161 |
if (!empty($_POST['nxs_snapPostOptions'])) { $NXS_POSTX = $_POST['nxs_snapPostOptions']; $NXS_POST = array(); $NXS_POST = NXS_parseQueryStr($NXS_POSTX); } else $NXS_POST = $_POST;
|
162 |
if(is_object($postArr)) $postID = $postArr->ID; else { $postID = $postArr; $postArr = get_post($postID); } $isPost = isset($NXS_POST["snapEdIT"]); $post = get_post($postID);
|
163 |
+
if ($post->post_status != 'publish') { sleep(5); $post = get_post($postID); $postArr = $post;
|
164 |
+
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; }
|
165 |
+
}
|
166 |
//nxs_addToLogN('BG', 'Post Status Changed', '', '-=## Autopost requested.'.($blog_id>1?'BlogID:'.$blog_id:'').' PostID:('.$postID.') Post Type: '.$post->post_type.' ##=-');
|
167 |
$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);
|
168 |
if ( isset($options['nxsCPTSeld']) && $options['nxsCPTSeld']!='') $nxsCPTSeld = unserialize($options['nxsCPTSeld']); else $nxsCPTSeld = array(); // $nxsCPTSeld = array_keys($post_types); - why we needed it?
|
313 |
}}
|
314 |
|
315 |
function cron_add_nxsreposter( $schedules ) { $schedules['nxsreposter'] = array( 'interval' => 90, 'display' => __( 'NXS Reposter' )); return $schedules;} // Do this every 90 seconds
|
316 |
+
|
317 |
+
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;
|
318 |
+
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();
|
319 |
+
$ntObj->showNTSettings($ii, $pbo);
|
320 |
+
}
|
321 |
+
die();
|
322 |
+
}}
|
323 |
+
|
324 |
|
325 |
//## Actions and filters
|
326 |
add_action('shutdown', 'nxs_psCron', 25); //add_action( 'transition_post_status', 'nxs_snapLogPublishTo', 10, 3 );
|
333 |
|
334 |
if (isset($plgn_NS_SNAutoPoster)) { //## Actions
|
335 |
//## Add the admin menu
|
336 |
+
if ($nxs_skipSSLCheck===true){ add_filter('https_ssl_verify', '__return_false'); add_filter('https_local_ssl_verify', '__return_false'); }
|
337 |
if ($nxs_isWPMU) { add_action('network_admin_menu', 'nxs_AddSUASettings'); global $blog_id; } $suOptions = array();
|
338 |
$suOptions = $plgn_NS_SNAutoPoster->nxs_options; if ($nxs_isWPMU) { $ntOptions = $plgn_NS_SNAutoPoster->nxs_ntoptions; if (!isset($suOptions['suaMode'])) $suOptions['suaMode'] = ''; }
|
339 |
$isPMB = $nxs_isWPMU && function_exists('nxs_doSMAS1') && $blog_id==1;
|
347 |
add_action('admin_init', 'nxs_adminInitFunc');
|
348 |
add_action( 'admin_enqueue_scripts', 'nxssnap_enqueue_scripts' );
|
349 |
|
350 |
+
add_action('wp_ajax_nxs_snap_aj', 'nxs_snapAjax');
|
351 |
|
352 |
add_action('wp_ajax_nxs_clLgo', 'nxs_clLgo_ajax');
|
353 |
add_action('wp_ajax_nxs_rfLgo', 'nxs_rfLgo_ajax');
|
inc-cl/ap.api.php
CHANGED
@@ -51,6 +51,7 @@ if (!class_exists("nxs_class_SNAP_AP")) { class nxs_class_SNAP_AP {
|
|
51 |
$url = "https://alpha-api.app.net/stream/0/files?access_token=".$auth;
|
52 |
|
53 |
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
|
|
54 |
curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $response = curl_exec($ch); $errmsg = curl_error($ch); curl_close($ch); //prr($response);
|
55 |
if ($errmsg!='') return $errmsg; else $response = json_decode($response, true);
|
56 |
if (!is_array($response) || !isset($response['meta']) || $response['meta']['code']!='200' || $response['data']['file_token']=='') return print_r($response, true);
|
51 |
$url = "https://alpha-api.app.net/stream/0/files?access_token=".$auth;
|
52 |
|
53 |
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
54 |
+
global $nxs_skipSSLCheck; if ($nxs_skipSSLCheck===true) curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
55 |
curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $response = curl_exec($ch); $errmsg = curl_error($ch); curl_close($ch); //prr($response);
|
56 |
if ($errmsg!='') return $errmsg; else $response = json_decode($response, true);
|
57 |
if (!is_array($response) || !isset($response['meta']) || $response['meta']['code']!='200' || $response['data']['file_token']=='') return print_r($response, true);
|
inc-cl/ap.php
CHANGED
@@ -4,19 +4,19 @@ $nxs_snapAvNts[] = array('code'=>'AP', 'lcode'=>'ap', 'name'=>'App.net');
|
|
4 |
|
5 |
if (!class_exists("nxs_snapClassAP")) { class nxs_snapClassAP {
|
6 |
//#### Show Common Settings
|
7 |
-
function showGenNTSettings($ntOpts){ global $nxs_plurl, $
|
8 |
if ( isset($_GET['code']) && $_GET['code']!='' && (isset($_GET['auth']) && $_GET['auth']=='ap') ){ $at = $_GET['code'];
|
9 |
echo "-= This is normal technical authorization info that will dissapear (Unless you get some errors) =- <br/><br/><br/>";
|
10 |
$fbo = $ntOpts[$_GET['acc']]; $wprg = array(); $response = wp_remote_get('https://graph.facebook.com/nextscripts', $wprg);
|
11 |
-
echo $
|
12 |
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; }
|
13 |
if (isset($fbo['appID'])){ echo "-="; prr($fbo);
|
14 |
-
$wprg['body'] = array('client_id'=>$fbo['appID'], 'client_secret'=>$fbo['appSec'], 'grant_type'=>'authorization_code', 'redirect_uri'=>$
|
15 |
$response = wp_remote_post('https://account.app.net/oauth/access_token', $wprg);
|
16 |
if ( (is_object($response) && (isset($response->errors))) || (is_array($response) && stripos($response['body'],'"error":')!==false )) { prr($response); die(); }
|
17 |
$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']; }
|
18 |
if ($params['user_id']>0) { $optionsG = get_option('NS_SNAutoPoster'); $optionsG['ap'][$_GET['acc']] = $fbo; update_option('NS_SNAutoPoster', $optionsG);
|
19 |
-
?><script type="text/javascript">window.location = "<?php echo $
|
20 |
<?php } die(); }
|
21 |
}
|
22 |
?>
|
@@ -31,14 +31,15 @@ if (!class_exists("nxs_snapClassAP")) { class nxs_snapClassAP {
|
|
31 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = 'App.Net';
|
32 |
if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['appAppUserID']) && $pbo['appAppUserID']>1)?'1':'';
|
33 |
?>
|
34 |
-
<p style="margin:0px;margin-left:5px;">
|
35 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
36 |
<?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 } ?>
|
37 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
38 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
39 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php }
|
|
|
40 |
<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', 'nxs_snap'); ?>]</a>
|
41 |
-
</p><?php
|
42 |
}?>
|
43 |
</div>
|
44 |
</div> <?php
|
@@ -46,9 +47,9 @@ if (!class_exists("nxs_snapClassAP")) { class nxs_snapClassAP {
|
|
46 |
//#### Show NEW Settings Page
|
47 |
function showNewNTSettings($options){ $opts = array('nName'=>'', 'doAP'=>'1', 'apUName'=>'', 'apPageID'=>'', 'apCommID'=>'', 'postType'=>'A', 'apPass'=>''); $opts['ntInfo']= array('lcode'=>'ap'); $this->showNTSettings($options, $opts, true);}
|
48 |
//#### Show Unit Settings
|
49 |
-
function showNTSettings($ii, $options, $isNew=false){ global $nxs_plurl, $
|
50 |
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'] = '';
|
51 |
-
if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['attchImg'])) $options['attchImg'] = '';
|
52 |
if (!isset($options['appID'])) $options['appID'] = ''; if (!isset($options['appSec'])) $options['appSec'] = ''; ?>
|
53 |
<div id="doAP<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">
|
54 |
<input type="hidden" name="apDoSAP<?php echo $ii; ?>" value="0" id="apDoSAP<?php echo $ii; ?>" />
|
@@ -59,7 +60,7 @@ if (!class_exists("nxs_snapClassAP")) { class nxs_snapClassAP {
|
|
59 |
<br/>
|
60 |
<ul class="nsx_tabs">
|
61 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
62 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
63 |
</ul>
|
64 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
65 |
<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%;">
|
@@ -84,7 +85,7 @@ if (!class_exists("nxs_snapClassAP")) { class nxs_snapClassAP {
|
|
84 |
<?php } else { if(isset($options['appAppUserID']) && $options['appAppUserID']>0) { ?>
|
85 |
<?php _e('Your App.Net Account has been authorized.', 'nxs_snap'); ?> User ID: <?php _e(apply_filters('format_to_edit', htmlentities($options['appAppUserID'].' - '.$options['appAppUserName'], ENT_COMPAT, "UTF-8")), 'nxs_snap') ?>.
|
86 |
<?php _e('You can', 'nxs_snap'); ?> Re- <?php } ?>
|
87 |
-
<a href="https://account.app.net/oauth/authenticate?client_id=<?php echo trim($options['appID']);?>&response_type=code&redirect_uri=<?php echo trim(urlencode($
|
88 |
<?php if (!isset($options['appAppUserID']) || $options['appAppUserID']<1) { ?> <div class="blnkg"><=== <?php _e('Authorize your account', 'nxs_snap'); ?> ===</div>
|
89 |
<br/><br/><i> <?php _e('If you get App.Net message:', 'nxs_snap'); ?> <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.', 'nxs_snap'); ?></i> <?php }?>
|
90 |
<?php } ?>
|
@@ -99,29 +100,20 @@ if (!class_exists("nxs_snapClassAP")) { class nxs_snapClassAP {
|
|
99 |
|
100 |
</div>
|
101 |
<?php /* ######################## Tools Tab ####################### */ ?>
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
<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;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
108 |
-
<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']; ?>" />
|
109 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
110 |
-
<br/>
|
111 |
-
<?php } ?>
|
112 |
-
<?php nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
113 |
-
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
114 |
-
|
115 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
116 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
117 |
|
118 |
-
<div class="submit
|
119 |
|
120 |
|
121 |
</div><?php
|
122 |
}
|
123 |
//#### Set Unit Settings from POST
|
124 |
-
function setNTSettings($post, $options){
|
125 |
foreach ($post as $ii => $pval){
|
126 |
if (isset($pval['appID']) && $pval['appID']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
127 |
if (isset($pval['nName'])) $options[$ii]['nName'] = trim($pval['nName']);
|
@@ -143,17 +135,19 @@ if (!class_exists("nxs_snapClassAP")) { class nxs_snapClassAP {
|
|
143 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
144 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
145 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
146 |
-
}
|
147 |
} return $options;
|
148 |
}
|
149 |
//#### Show Post->Edit Meta Box Settings
|
150 |
function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'ap'; $ntU = 'AP';
|
151 |
foreach($ntOpts as $ii=>$ntOpt) { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapAP', true));
|
152 |
if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii])) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]); if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = '';
|
153 |
-
$doAP = $ntOpt['doAP'] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse'];
|
154 |
$isAvailAP = $ntOpt['appID']!='' && $ntOpt['appSec']!=''; $apMsgFormat = htmlentities($ntOpt['apTextFormat'], ENT_COMPAT, "UTF-8");
|
155 |
?>
|
156 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
157 |
<?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"'; ?> />
|
158 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="ap[<?php echo $ii; ?>][doAP]" value="<?php echo $doAP;?>"> <?php } ?> <?php } ?>
|
159 |
|
@@ -170,11 +164,11 @@ if (!class_exists("nxs_snapClassAP")) { class nxs_snapClassAP {
|
|
170 |
</td></tr>
|
171 |
|
172 |
<?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>
|
173 |
-
<?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $ntOpt); } ?>
|
174 |
|
175 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
176 |
|
177 |
-
<tr id="altFormat1" style=""><th scope="row"
|
178 |
<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"; ?> />
|
179 |
</th>
|
180 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
4 |
|
5 |
if (!class_exists("nxs_snapClassAP")) { class nxs_snapClassAP {
|
6 |
//#### Show Common Settings
|
7 |
+
function showGenNTSettings($ntOpts){ global $nxs_plurl, $nxs_snapSetPgURL; $ntInfo = array('code'=>'AP', 'lcode'=>'ap', 'name'=>'App.Net', 'defNName'=>'', 'tstReq' => true);
|
8 |
if ( isset($_GET['code']) && $_GET['code']!='' && (isset($_GET['auth']) && $_GET['auth']=='ap') ){ $at = $_GET['code'];
|
9 |
echo "-= This is normal technical authorization info that will dissapear (Unless you get some errors) =- <br/><br/><br/>";
|
10 |
$fbo = $ntOpts[$_GET['acc']]; $wprg = array(); $response = wp_remote_get('https://graph.facebook.com/nextscripts', $wprg);
|
11 |
+
echo $nxs_snapSetPgURL.'&auth=ap&acc='.$_GET['acc']."||";
|
12 |
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; }
|
13 |
if (isset($fbo['appID'])){ echo "-="; prr($fbo);
|
14 |
+
$wprg['body'] = array('client_id'=>$fbo['appID'], 'client_secret'=>$fbo['appSec'], 'grant_type'=>'authorization_code', 'redirect_uri'=>$nxs_snapSetPgURL.'&auth=ap&acc='.$_GET['acc'], 'code'=>$at);
|
15 |
$response = wp_remote_post('https://account.app.net/oauth/access_token', $wprg);
|
16 |
if ( (is_object($response) && (isset($response->errors))) || (is_array($response) && stripos($response['body'],'"error":')!==false )) { prr($response); die(); }
|
17 |
$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']; }
|
18 |
if ($params['user_id']>0) { $optionsG = get_option('NS_SNAutoPoster'); $optionsG['ap'][$_GET['acc']] = $fbo; update_option('NS_SNAutoPoster', $optionsG);
|
19 |
+
?><script type="text/javascript">window.location = "<?php echo $nxs_snapSetPgURL; ?>"</script>
|
20 |
<?php } die(); }
|
21 |
}
|
22 |
?>
|
31 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = 'App.Net';
|
32 |
if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['appAppUserID']) && $pbo['appAppUserID']>1)?'1':'';
|
33 |
?>
|
34 |
+
<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' />
|
35 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
36 |
<?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 } ?>
|
37 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
38 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
39 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?>
|
40 |
+
<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', 'nxs_snap'); ?>]</a>
|
41 |
<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', 'nxs_snap'); ?>]</a>
|
42 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
43 |
}?>
|
44 |
</div>
|
45 |
</div> <?php
|
47 |
//#### Show NEW Settings Page
|
48 |
function showNewNTSettings($options){ $opts = array('nName'=>'', 'doAP'=>'1', 'apUName'=>'', 'apPageID'=>'', 'apCommID'=>'', 'postType'=>'A', 'apPass'=>''); $opts['ntInfo']= array('lcode'=>'ap'); $this->showNTSettings($options, $opts, true);}
|
49 |
//#### Show Unit Settings
|
50 |
+
function showNTSettings($ii, $options, $isNew=false){ global $nxs_plurl, $nxs_snapSetPgURL; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt);
|
51 |
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'] = '';
|
52 |
+
if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['attchImg'])) $options['attchImg'] = '';
|
53 |
if (!isset($options['appID'])) $options['appID'] = ''; if (!isset($options['appSec'])) $options['appSec'] = ''; ?>
|
54 |
<div id="doAP<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>">
|
55 |
<input type="hidden" name="apDoSAP<?php echo $ii; ?>" value="0" id="apDoSAP<?php echo $ii; ?>" />
|
60 |
<br/>
|
61 |
<ul class="nsx_tabs">
|
62 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
63 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
64 |
</ul>
|
65 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
66 |
<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%;">
|
85 |
<?php } else { if(isset($options['appAppUserID']) && $options['appAppUserID']>0) { ?>
|
86 |
<?php _e('Your App.Net Account has been authorized.', 'nxs_snap'); ?> User ID: <?php _e(apply_filters('format_to_edit', htmlentities($options['appAppUserID'].' - '.$options['appAppUserName'], ENT_COMPAT, "UTF-8")), 'nxs_snap') ?>.
|
87 |
<?php _e('You can', 'nxs_snap'); ?> Re- <?php } ?>
|
88 |
+
<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.'&auth=ap&acc='.$ii));?>&scope=stream+write_post+follow+messages+update_profile+files">Authorize Your App.Net Account</a>
|
89 |
<?php if (!isset($options['appAppUserID']) || $options['appAppUserID']<1) { ?> <div class="blnkg"><=== <?php _e('Authorize your account', 'nxs_snap'); ?> ===</div>
|
90 |
<br/><br/><i> <?php _e('If you get App.Net message:', 'nxs_snap'); ?> <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.', 'nxs_snap'); ?></i> <?php }?>
|
91 |
<?php } ?>
|
100 |
|
101 |
</div>
|
102 |
<?php /* ######################## Tools Tab ####################### */ ?>
|
103 |
+
<?php if (!$isNew) { ?><div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
104 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
105 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
106 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
107 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
109 |
|
110 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div>
|
111 |
|
112 |
|
113 |
</div><?php
|
114 |
}
|
115 |
//#### Set Unit Settings from POST
|
116 |
+
function setNTSettings($post, $options){ $code = 'AP'; $lcode = 'ap';
|
117 |
foreach ($post as $ii => $pval){
|
118 |
if (isset($pval['appID']) && $pval['appID']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
119 |
if (isset($pval['nName'])) $options[$ii]['nName'] = trim($pval['nName']);
|
135 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
136 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
137 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
138 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
139 |
} return $options;
|
140 |
}
|
141 |
//#### Show Post->Edit Meta Box Settings
|
142 |
function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'ap'; $ntU = 'AP';
|
143 |
foreach($ntOpts as $ii=>$ntOpt) { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapAP', true));
|
144 |
if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii])) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]); if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = '';
|
145 |
+
$doAP = $ntOpt['doAP'] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse'];
|
146 |
$isAvailAP = $ntOpt['appID']!='' && $ntOpt['appSec']!=''; $apMsgFormat = htmlentities($ntOpt['apTextFormat'], ENT_COMPAT, "UTF-8");
|
147 |
?>
|
148 |
+
<tr><th style="text-align:left;" colspan="2">
|
149 |
+
<?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 } ?>
|
150 |
+
<?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 } ?>
|
151 |
<?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"'; ?> />
|
152 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="ap[<?php echo $ii; ?>][doAP]" value="<?php echo $doAP;?>"> <?php } ?> <?php } ?>
|
153 |
|
164 |
</td></tr>
|
165 |
|
166 |
<?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>
|
167 |
+
<?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); } ?>
|
168 |
|
169 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
170 |
|
171 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
172 |
<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"; ?> />
|
173 |
</th>
|
174 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
inc-cl/apis/facebook.php
CHANGED
@@ -802,7 +802,7 @@ abstract class NXS_BaseFacebook
|
|
802 |
protected function _restserver($params) {
|
803 |
// generic application level parameters
|
804 |
$params['api_key'] = $this->getAppId();
|
805 |
-
$params['format'] = 'json-strings';
|
806 |
|
807 |
$result = json_decode($this->_oauthRequest(
|
808 |
$this->getApiUrl($params['method']),
|
@@ -895,14 +895,27 @@ abstract class NXS_BaseFacebook
|
|
895 |
if (isset($params['access_token'])) {
|
896 |
$params['appsecret_proof'] = $this->getAppSecretProof($params['access_token']);
|
897 |
}
|
898 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
899 |
// json_encode all params values that are not strings
|
900 |
foreach ($params as $key => $value) {
|
901 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
902 |
$params[$key] = json_encode($value);
|
903 |
}
|
904 |
}
|
905 |
-
|
906 |
return $this->makeRequest($url, $params);
|
907 |
}
|
908 |
|
@@ -930,7 +943,7 @@ abstract class NXS_BaseFacebook
|
|
930 |
*
|
931 |
* @return string The response text
|
932 |
*/
|
933 |
-
protected function makeRequest($url, $params, $ch=null) {
|
934 |
if (!$ch) {
|
935 |
$ch = curl_init();
|
936 |
}
|
802 |
protected function _restserver($params) {
|
803 |
// generic application level parameters
|
804 |
$params['api_key'] = $this->getAppId();
|
805 |
+
$params['format'] = 'json-strings';
|
806 |
|
807 |
$result = json_decode($this->_oauthRequest(
|
808 |
$this->getApiUrl($params['method']),
|
895 |
if (isset($params['access_token'])) {
|
896 |
$params['appsecret_proof'] = $this->getAppSecretProof($params['access_token']);
|
897 |
}
|
898 |
+
|
899 |
+
foreach ($params as $key => $value) {
|
900 |
+
if (!is_string($value) && !($value instanceof CURLFile)) {
|
901 |
+
$params[$key] = json_encode($value);
|
902 |
+
}
|
903 |
+
}
|
904 |
+
/*
|
905 |
// json_encode all params values that are not strings
|
906 |
foreach ($params as $key => $value) {
|
907 |
+
|
908 |
+
if (is_array($value)) {
|
909 |
+
foreach ($value as $key2 => $value2) {
|
910 |
+
if (!is_string($value2) && !($value2 instanceof CURLFile)) {
|
911 |
+
$params[$value][$key2] = json_encode($value2);
|
912 |
+
}
|
913 |
+
}
|
914 |
+
} else if (!is_string($value)) {
|
915 |
$params[$key] = json_encode($value);
|
916 |
}
|
917 |
}
|
918 |
+
*/
|
919 |
return $this->makeRequest($url, $params);
|
920 |
}
|
921 |
|
943 |
*
|
944 |
* @return string The response text
|
945 |
*/
|
946 |
+
protected function makeRequest($url, $params, $ch=null) { //$prx = http_build_query($params, null, '&');// prr( urldecode($prx));
|
947 |
if (!$ch) {
|
948 |
$ch = curl_init();
|
949 |
}
|
inc-cl/apis/liOAuth.php
CHANGED
@@ -169,7 +169,7 @@ class nsx_LinkedIn {
|
|
169 |
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
|
170 |
curl_setopt($curl, CURLOPT_HTTPHEADER, $auth_header);
|
171 |
}
|
172 |
-
|
173 |
$data = curl_exec($curl); $errmsg = curl_error($curl); //prr($data);// die();
|
174 |
|
175 |
//## NextScripts Fix
|
169 |
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
|
170 |
curl_setopt($curl, CURLOPT_HTTPHEADER, $auth_header);
|
171 |
}
|
172 |
+
global $nxs_skipSSLCheck; if ($nxs_skipSSLCheck===true) curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
173 |
$data = curl_exec($curl); $errmsg = curl_error($curl); //prr($data);// die();
|
174 |
|
175 |
//## NextScripts Fix
|
inc-cl/apis/tmhOAuth.php
CHANGED
@@ -638,6 +638,7 @@ class NXS_tmhOAuth {
|
|
638 |
return;
|
639 |
|
640 |
// do it!
|
|
|
641 |
$response = curl_exec($c);
|
642 |
$code = curl_getinfo($c, CURLINFO_HTTP_CODE);
|
643 |
$info = curl_getinfo($c);
|
638 |
return;
|
639 |
|
640 |
// do it!
|
641 |
+
global $nxs_skipSSLCheck; if ($nxs_skipSSLCheck===true) curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
|
642 |
$response = curl_exec($c);
|
643 |
$code = curl_getinfo($c, CURLINFO_HTTP_CODE);
|
644 |
$info = curl_getinfo($c);
|
inc-cl/apis/trOAuth.php
CHANGED
@@ -238,7 +238,11 @@ $headers[] = 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3';
|
|
238 |
}
|
239 |
}
|
240 |
//prr($url);
|
241 |
-
if ($method=='DELETE') curl_setopt($ci, CURLOPT_URL, $url);
|
|
|
|
|
|
|
|
|
242 |
|
243 |
/*
|
244 |
$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);
|
238 |
}
|
239 |
}
|
240 |
//prr($url);
|
241 |
+
if ($method=='DELETE') curl_setopt($ci, CURLOPT_URL, $url);
|
242 |
+
|
243 |
+
global $nxs_skipSSLCheck; if ($nxs_skipSSLCheck===true) curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, false);
|
244 |
+
|
245 |
+
$response = curl_exec($ci); $out = array();
|
246 |
|
247 |
/*
|
248 |
$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);
|
inc-cl/apis/xmlrpc-client.php
CHANGED
@@ -601,7 +601,7 @@ class NXS_XMLRPC_Client
|
|
601 |
// Storage place for an error message
|
602 |
var $error = false;
|
603 |
|
604 |
-
function NXS_XMLRPC_Client($server, $path = false, $port = 80, $timeout =
|
605 |
{
|
606 |
if (!$path) {
|
607 |
// Assume we have been given a URL instead
|
@@ -734,6 +734,8 @@ class NXS_XMLRPC_Client
|
|
734 |
$curl=curl_init('http://' . $this->server . ':' . $this->port . $this->path);
|
735 |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
736 |
|
|
|
|
|
737 |
//Since 23Jun2004 (0.1.2) - Made timeout a class field
|
738 |
curl_setopt($curl, CURLOPT_TIMEOUT, $this->timeout);
|
739 |
|
@@ -741,6 +743,7 @@ class NXS_XMLRPC_Client
|
|
741 |
curl_setopt($curl, CURLOPT_VERBOSE, 1);
|
742 |
}
|
743 |
|
|
|
744 |
curl_setopt($curl, CURLOPT_HEADER, 1);
|
745 |
curl_setopt($curl, CURLOPT_POST, 1);
|
746 |
curl_setopt($curl, CURLOPT_POSTFIELDS, $xml);
|
@@ -750,15 +753,16 @@ class NXS_XMLRPC_Client
|
|
750 |
"Content-length: {$length}"));
|
751 |
|
752 |
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
|
|
|
753 |
|
754 |
// Call cURL to do it's stuff and return us the content
|
755 |
-
$contents = curl_exec($curl);
|
756 |
curl_close($curl);
|
757 |
|
758 |
// Check for 200 Code in $contents
|
759 |
if (!strstr($contents, '200 OK')) {
|
760 |
//There was no "200 OK" returned - we failed
|
761 |
-
$this->error = new NXS_XMLRPC_Error(-32300, 'transport error - HTTP status code was not 200');
|
762 |
return false;
|
763 |
}
|
764 |
|
@@ -1313,15 +1317,15 @@ class NXS_XMLRPC_ClientSSL extends NXS_XMLRPC_Client
|
|
1313 |
curl_setopt($curl, CURLOPT_CAINFO, $this->_caFile);
|
1314 |
}
|
1315 |
}
|
1316 |
-
|
1317 |
// Call cURL to do it's stuff and return us the content
|
1318 |
-
$contents = curl_exec($curl);
|
1319 |
curl_close($curl);
|
1320 |
|
1321 |
// Check for 200 Code in $contents
|
1322 |
if (!strstr($contents, '200 OK')) {
|
1323 |
//There was no "200 OK" returned - we failed
|
1324 |
-
$this->error = new NXS_XMLRPC_Error(-32300, 'transport error - HTTP status code was not 200');
|
1325 |
return false;
|
1326 |
}
|
1327 |
|
601 |
// Storage place for an error message
|
602 |
var $error = false;
|
603 |
|
604 |
+
function NXS_XMLRPC_Client($server, $path = false, $port = 80, $timeout = 25)
|
605 |
{
|
606 |
if (!$path) {
|
607 |
// Assume we have been given a URL instead
|
734 |
$curl=curl_init('http://' . $this->server . ':' . $this->port . $this->path);
|
735 |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
736 |
|
737 |
+
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");
|
738 |
+
|
739 |
//Since 23Jun2004 (0.1.2) - Made timeout a class field
|
740 |
curl_setopt($curl, CURLOPT_TIMEOUT, $this->timeout);
|
741 |
|
743 |
curl_setopt($curl, CURLOPT_VERBOSE, 1);
|
744 |
}
|
745 |
|
746 |
+
|
747 |
curl_setopt($curl, CURLOPT_HEADER, 1);
|
748 |
curl_setopt($curl, CURLOPT_POST, 1);
|
749 |
curl_setopt($curl, CURLOPT_POSTFIELDS, $xml);
|
753 |
"Content-length: {$length}"));
|
754 |
|
755 |
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
|
756 |
+
global $nxs_skipSSLCheck; if ($nxs_skipSSLCheck===true) curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
757 |
|
758 |
// Call cURL to do it's stuff and return us the content
|
759 |
+
$contents = curl_exec($curl); $err = curl_errno($curl); $errmsg = curl_error($curl);
|
760 |
curl_close($curl);
|
761 |
|
762 |
// Check for 200 Code in $contents
|
763 |
if (!strstr($contents, '200 OK')) {
|
764 |
//There was no "200 OK" returned - we failed
|
765 |
+
$this->error = new NXS_XMLRPC_Error(-32300, 'transport error - HTTP status code was not 200 - '.$err.' - '.$errmsg.' | '.print_r($contents, true));
|
766 |
return false;
|
767 |
}
|
768 |
|
1317 |
curl_setopt($curl, CURLOPT_CAINFO, $this->_caFile);
|
1318 |
}
|
1319 |
}
|
1320 |
+
global $nxs_skipSSLCheck; if ($nxs_skipSSLCheck===true) curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
1321 |
// Call cURL to do it's stuff and return us the content
|
1322 |
+
$contents = curl_exec($curl); $err = curl_errno($curl); $errmsg = curl_error($curl);
|
1323 |
curl_close($curl);
|
1324 |
|
1325 |
// Check for 200 Code in $contents
|
1326 |
if (!strstr($contents, '200 OK')) {
|
1327 |
//There was no "200 OK" returned - we failed
|
1328 |
+
$this->error = new NXS_XMLRPC_Error(-32300, 'transport error - HTTP status code was not 200! - '.$err.' - '.$errmsg.' | '.print_r($contents, true));
|
1329 |
return false;
|
1330 |
}
|
1331 |
|
inc-cl/bg.api.php
CHANGED
@@ -20,6 +20,7 @@ if (!class_exists("nxs_class_SNAP_BG")) { class nxs_class_SNAP_BG {
|
|
20 |
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0)");
|
21 |
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,10); curl_setopt($ch, CURLOPT_TIMEOUT, 10);
|
22 |
curl_setopt($ch, CURLOPT_HEADER,0); curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1);
|
|
|
23 |
$result = curl_exec($ch); $resultArray = curl_getinfo($ch); $errmsg = curl_error($ch);
|
24 |
if (trim($errmsg)!=='' || (is_array($resultArray) && $resultArray['http_code']!='200')) return array('result'=>'Error', 'error'=>"Error: ".$resultArray['http_code']." | Invalid Login ".$errmsg);
|
25 |
curl_close($ch); $arr = explode("=",$result); $token = $arr[3]; if (trim($token)=='') return false; else return $token;
|
@@ -28,11 +29,12 @@ if (!class_exists("nxs_class_SNAP_BG")) { class nxs_class_SNAP_BG {
|
|
28 |
$text = preg_replace('/<object\b[^>]*>(.*?)<\/object>/is', "", $text); $text = preg_replace('/<iframe\b[^>]*>(.*?)<\/iframe>/is', "", $text); $text = utf8_decode($text);
|
29 |
|
30 |
$postText = '<entry xmlns="http://www.w3.org/2005/Atom"><title type="text">'.$title.'</title><content type="xhtml">'.$text.'</content></entry>'; //prr($postText);
|
31 |
-
$
|
32 |
$headers = array("Content-type: application/atom+xml", "Content-Length: ".strlen($postText), "Authorization: GoogleLogin auth=".$auth, $postText);
|
33 |
curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, 1); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
34 |
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0)");
|
35 |
curl_setopt($ch, CURLOPT_HEADER,0); curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1); curl_setopt($ch, CURLINFO_HEADER_OUT, true);
|
|
|
36 |
$result = curl_exec($ch); curl_close($ch);
|
37 |
if (stripos($result,'tag:blogger.com')!==false) { $postID = CutFromTo($result, " rel='alternate' type='text/html' href='", "'"); return array("code"=>"OK", "post_id"=>$postID); } else return array("code"=>"ERR", "error"=>$result);
|
38 |
}
|
20 |
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0)");
|
21 |
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,10); curl_setopt($ch, CURLOPT_TIMEOUT, 10);
|
22 |
curl_setopt($ch, CURLOPT_HEADER,0); curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1);
|
23 |
+
global $nxs_skipSSLCheck; if ($nxs_skipSSLCheck===true) curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
24 |
$result = curl_exec($ch); $resultArray = curl_getinfo($ch); $errmsg = curl_error($ch);
|
25 |
if (trim($errmsg)!=='' || (is_array($resultArray) && $resultArray['http_code']!='200')) return array('result'=>'Error', 'error'=>"Error: ".$resultArray['http_code']." | Invalid Login ".$errmsg);
|
26 |
curl_close($ch); $arr = explode("=",$result); $token = $arr[3]; if (trim($token)=='') return false; else return $token;
|
29 |
$text = preg_replace('/<object\b[^>]*>(.*?)<\/object>/is', "", $text); $text = preg_replace('/<iframe\b[^>]*>(.*?)<\/iframe>/is', "", $text); $text = utf8_decode($text);
|
30 |
|
31 |
$postText = '<entry xmlns="http://www.w3.org/2005/Atom"><title type="text">'.$title.'</title><content type="xhtml">'.$text.'</content></entry>'; //prr($postText);
|
32 |
+
$ch = curl_init("https://www.blogger.com/feeds/$blogID/posts/default");
|
33 |
$headers = array("Content-type: application/atom+xml", "Content-Length: ".strlen($postText), "Authorization: GoogleLogin auth=".$auth, $postText);
|
34 |
curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, 1); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
35 |
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0)");
|
36 |
curl_setopt($ch, CURLOPT_HEADER,0); curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1); curl_setopt($ch, CURLINFO_HEADER_OUT, true);
|
37 |
+
global $nxs_skipSSLCheck; if ($nxs_skipSSLCheck===true) curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
38 |
$result = curl_exec($ch); curl_close($ch);
|
39 |
if (stripos($result,'tag:blogger.com')!==false) { $postID = CutFromTo($result, " rel='alternate' type='text/html' href='", "'"); return array("code"=>"OK", "post_id"=>$postID); } else return array("code"=>"ERR", "error"=>$result);
|
40 |
}
|
inc-cl/bg.php
CHANGED
@@ -14,14 +14,14 @@ if (!class_exists("nxs_snapClassBG")) { class nxs_snapClassBG {
|
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
17 |
-
<p style="margin:0px;margin-left:5px;"
|
18 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
-
</p><?php
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php //## END Settings
|
@@ -46,8 +46,8 @@ if (!class_exists("nxs_snapClassBG")) { class nxs_snapClassBG {
|
|
46 |
|
47 |
<br/>
|
48 |
<ul class="nsx_tabs">
|
49 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
50 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
51 |
</ul>
|
52 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
53 |
<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%;">
|
@@ -88,25 +88,16 @@ if (!class_exists("nxs_snapClassBG")) { class nxs_snapClassBG {
|
|
88 |
|
89 |
</div>
|
90 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
<input value="1" id="catSelS<?php echo $ntU; ?><?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 $ntU; ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo $ntU; ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo $ntU; ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
97 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
98 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
99 |
-
<br/>
|
100 |
-
<?php } ?>
|
101 |
-
|
102 |
-
<?php nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
103 |
-
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
104 |
-
|
105 |
|
106 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
107 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
108 |
|
109 |
-
<div class="submit
|
110 |
|
111 |
|
112 |
</div>
|
@@ -116,13 +107,13 @@ if (!class_exists("nxs_snapClassBG")) { class nxs_snapClassBG {
|
|
116 |
|
117 |
}
|
118 |
//#### Set Unit Settings from POST
|
119 |
-
function setNTSettings($post, $options){
|
120 |
foreach ($post as $ii => $pval){// prr($pval);
|
121 |
if (isset($pval['apBGUName']) && trim($pval['apBGUName'])!='' && isset($pval['apBGPass']) && trim($pval['apBGPass'])!='') { if (!isset($options[$ii])) $options[$ii] = array();
|
122 |
|
123 |
if (isset($pval['apDoBG'])) $options[$ii]['doBG'] = $pval['apDoBG']; else $options[$ii]['doBG'] = 0;
|
124 |
|
125 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
126 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
127 |
|
128 |
if (isset($pval['nName'])) $options[$ii]['nName'] = trim($pval['nName']);
|
@@ -139,20 +130,22 @@ if (!class_exists("nxs_snapClassBG")) { class nxs_snapClassBG {
|
|
139 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
140 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
141 |
|
142 |
-
}
|
143 |
} return $options;
|
144 |
}
|
145 |
//#### Show Post->Edit Meta Box Settings
|
146 |
function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'bg'; $ntU = 'BG';
|
147 |
-
foreach($ntOpts as $ii=>$
|
148 |
-
if (empty($
|
149 |
-
$doBG = $
|
150 |
-
$isAvailBG = $
|
151 |
?>
|
152 |
|
153 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
154 |
<?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 } ?>
|
155 |
-
<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', 'nxs_snap') ?> (<i style="color: #005800;"><?php echo $
|
156 |
if ($post->post_status == "publish" && $isAvailBG) { ?>
|
157 |
<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', 'nxs_snap') ?>" />
|
158 |
<?php } ?>
|
@@ -164,11 +157,11 @@ if (!class_exists("nxs_snapClassBG")) { class nxs_snapClassBG {
|
|
164 |
|
165 |
</td></tr>
|
166 |
<?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', 'nxs_snap') ?></b>
|
167 |
-
<?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $
|
168 |
|
169 |
-
<?php if ($
|
170 |
|
171 |
-
<tr id="altFormat1" style=""><th scope="row"
|
172 |
<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"; ?> />
|
173 |
</th>
|
174 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
17 |
+
<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' />
|
18 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php //## END Settings
|
46 |
|
47 |
<br/>
|
48 |
<ul class="nsx_tabs">
|
49 |
+
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
50 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
51 |
</ul>
|
52 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
53 |
<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%;">
|
88 |
|
89 |
</div>
|
90 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
91 |
+
<?php if (!$isNew) { ?><div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
92 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
93 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
94 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
95 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
|
97 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
98 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
99 |
|
100 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div>
|
101 |
|
102 |
|
103 |
</div>
|
107 |
|
108 |
}
|
109 |
//#### Set Unit Settings from POST
|
110 |
+
function setNTSettings($post, $options){
|
111 |
foreach ($post as $ii => $pval){// prr($pval);
|
112 |
if (isset($pval['apBGUName']) && trim($pval['apBGUName'])!='' && isset($pval['apBGPass']) && trim($pval['apBGPass'])!='') { if (!isset($options[$ii])) $options[$ii] = array();
|
113 |
|
114 |
if (isset($pval['apDoBG'])) $options[$ii]['doBG'] = $pval['apDoBG']; else $options[$ii]['doBG'] = 0;
|
115 |
|
116 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
117 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
118 |
|
119 |
if (isset($pval['nName'])) $options[$ii]['nName'] = trim($pval['nName']);
|
130 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
131 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
132 |
|
133 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
134 |
} return $options;
|
135 |
}
|
136 |
//#### Show Post->Edit Meta Box Settings
|
137 |
function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'bg'; $ntU = 'BG';
|
138 |
+
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]);
|
139 |
+
if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = '';
|
140 |
+
$doBG = $ntOpt['doBG'] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse'];
|
141 |
+
$isAvailBG = $ntOpt['bgUName']!='' && $ntOpt['bgPass']!=''; $bgMsgFormat = htmlentities($ntOpt['bgMsgFormat'], ENT_COMPAT, "UTF-8"); $bgMsgTFormat = htmlentities($ntOpt['bgMsgTFormat'], ENT_COMPAT, "UTF-8");
|
142 |
?>
|
143 |
|
144 |
+
<tr><th style="text-align:left;" colspan="2">
|
145 |
+
<?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 } ?>
|
146 |
+
<?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 } ?>
|
147 |
<?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 } ?>
|
148 |
+
<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', 'nxs_snap') ?> (<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"
|
149 |
if ($post->post_status == "publish" && $isAvailBG) { ?>
|
150 |
<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', 'nxs_snap') ?>" />
|
151 |
<?php } ?>
|
157 |
|
158 |
</td></tr>
|
159 |
<?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', 'nxs_snap') ?></b>
|
160 |
+
<?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); } ?>
|
161 |
|
162 |
+
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
163 |
|
164 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
165 |
<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"; ?> />
|
166 |
</th>
|
167 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
inc-cl/da.php
CHANGED
@@ -15,14 +15,14 @@ if (!class_exists("nxs_snapClassDA")) { class nxs_snapClassDA {
|
|
15 |
<div class="nxs_box_inside">
|
16 |
<?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.
|
17 |
<?php } else foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
18 |
-
<p style="margin:0px;margin-left:5px;">
|
19 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
20 |
<?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 } ?>
|
21 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
22 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
23 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
24 |
<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', 'nxs_snap'); ?>]</a>
|
25 |
-
</p><?php $pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
26 |
}?>
|
27 |
</div>
|
28 |
</div> <?php
|
@@ -49,7 +49,7 @@ if (!class_exists("nxs_snapClassDA")) { class nxs_snapClassDA {
|
|
49 |
<br/>
|
50 |
<ul class="nsx_tabs">
|
51 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
52 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
53 |
</ul>
|
54 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
55 |
<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%;">
|
@@ -82,40 +82,29 @@ if (!class_exists("nxs_snapClassDA")) { class nxs_snapClassDA {
|
|
82 |
</div>
|
83 |
|
84 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
85 |
-
|
86 |
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
<input value="1" id="catSelS<?php echo $ntU; ?><?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 $ntU; ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo $ntU; ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo $ntU; ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
91 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
92 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
93 |
-
<br/>
|
94 |
-
<?php } ?>
|
95 |
-
|
96 |
-
<div class="nxs_tls_cpt"><?php _e('Posting Delay', 'nxs_snap'); ?></div>
|
97 |
-
<div class="nxs_tls_bd">
|
98 |
-
<?php echo nxs_addPostingDelaySel($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
99 |
-
</div>
|
100 |
-
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
101 |
|
102 |
|
103 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
104 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
105 |
|
106 |
-
<div class="submit
|
107 |
|
108 |
</div><?php
|
109 |
}
|
110 |
//#### Set Unit Settings from POST
|
111 |
-
function setNTSettings($post, $options){
|
112 |
foreach ($post as $ii => $pval){
|
113 |
if (isset($pval['uName']) && $pval['uName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
114 |
if (isset($pval['uName'])) $options[$ii]['daUName'] = trim($pval['uName']);
|
115 |
if (isset($pval['nName'])) $options[$ii]['nName'] = trim($pval['nName']);
|
116 |
if (isset($pval['uPass'])) $options[$ii]['daPass'] = 'n5g9a'.nsx_doEncode($pval['uPass']); else $options[$ii]['daPass'] = '';
|
117 |
|
118 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
119 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
120 |
|
121 |
if (isset($pval['daTitleFormat'])) $options[$ii]['daTitleFormat'] = trim($pval['daTitleFormat']);
|
@@ -128,7 +117,7 @@ if (!class_exists("nxs_snapClassDA")) { class nxs_snapClassDA {
|
|
128 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
129 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
130 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
131 |
-
}
|
132 |
} return $options;
|
133 |
}
|
134 |
//#### Show Post->Edit Meta Box Settings
|
@@ -138,7 +127,9 @@ if (!class_exists("nxs_snapClassDA")) { class nxs_snapClassDA {
|
|
138 |
$isAvailDA = $ntOpt['daUName']!='' && $ntOpt['daPass']!=''; $daMsgFormat = htmlentities($ntOpt['daTextFormat'], ENT_COMPAT, "UTF-8"); $daMsgTFormat = htmlentities($ntOpt['daTitleFormat'], ENT_COMPAT, "UTF-8");
|
139 |
|
140 |
?>
|
141 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
142 |
<?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"'; ?> />
|
143 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="da[<?php echo $ii; ?>][doDA]" value="<?php echo $doDA;?>"> <?php } ?> <?php } ?>
|
144 |
|
@@ -155,11 +146,11 @@ if (!class_exists("nxs_snapClassDA")) { class nxs_snapClassDA {
|
|
155 |
</td></tr>
|
156 |
|
157 |
<?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>
|
158 |
-
<?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $ntOpt); } ?>
|
159 |
|
160 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
161 |
|
162 |
-
<tr id="altFormat1" style=""><th scope="row"
|
163 |
<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"; ?> />
|
164 |
</th>
|
165 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?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.
|
17 |
<?php } else foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
18 |
+
<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' />
|
19 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
20 |
<?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 } ?>
|
21 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
22 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
23 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
24 |
<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', 'nxs_snap'); ?>]</a>
|
25 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php // $pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
26 |
}?>
|
27 |
</div>
|
28 |
</div> <?php
|
49 |
<br/>
|
50 |
<ul class="nsx_tabs">
|
51 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
52 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
53 |
</ul>
|
54 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
55 |
<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%;">
|
82 |
</div>
|
83 |
|
84 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
85 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
86 |
|
87 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
88 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
89 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
|
92 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
93 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
94 |
|
95 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div>
|
96 |
|
97 |
</div><?php
|
98 |
}
|
99 |
//#### Set Unit Settings from POST
|
100 |
+
function setNTSettings($post, $options){ $code = 'DA'; $lcode = 'da';
|
101 |
foreach ($post as $ii => $pval){
|
102 |
if (isset($pval['uName']) && $pval['uName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
103 |
if (isset($pval['uName'])) $options[$ii]['daUName'] = trim($pval['uName']);
|
104 |
if (isset($pval['nName'])) $options[$ii]['nName'] = trim($pval['nName']);
|
105 |
if (isset($pval['uPass'])) $options[$ii]['daPass'] = 'n5g9a'.nsx_doEncode($pval['uPass']); else $options[$ii]['daPass'] = '';
|
106 |
|
107 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
108 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
109 |
|
110 |
if (isset($pval['daTitleFormat'])) $options[$ii]['daTitleFormat'] = trim($pval['daTitleFormat']);
|
117 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
118 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
119 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
120 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
121 |
} return $options;
|
122 |
}
|
123 |
//#### Show Post->Edit Meta Box Settings
|
127 |
$isAvailDA = $ntOpt['daUName']!='' && $ntOpt['daPass']!=''; $daMsgFormat = htmlentities($ntOpt['daTextFormat'], ENT_COMPAT, "UTF-8"); $daMsgTFormat = htmlentities($ntOpt['daTitleFormat'], ENT_COMPAT, "UTF-8");
|
128 |
|
129 |
?>
|
130 |
+
<tr><th style="text-align:left;" colspan="2">
|
131 |
+
<?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 } ?>
|
132 |
+
<?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 } ?>
|
133 |
<?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"'; ?> />
|
134 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="da[<?php echo $ii; ?>][doDA]" value="<?php echo $doDA;?>"> <?php } ?> <?php } ?>
|
135 |
|
146 |
</td></tr>
|
147 |
|
148 |
<?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>
|
149 |
+
<?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); } ?>
|
150 |
|
151 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
152 |
|
153 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
154 |
<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"; ?> />
|
155 |
</th>
|
156 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
inc-cl/di.php
CHANGED
@@ -15,14 +15,14 @@ if (!class_exists("nxs_snapClassDI")) { class nxs_snapClassDI {
|
|
15 |
</div>
|
16 |
<div class="nxs_box_inside">
|
17 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
18 |
-
<p style="margin:0px;margin-left:5px;">
|
19 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
20 |
<?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 } ?>
|
21 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
22 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
23 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
24 |
<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', 'nxs_snap'); ?>]</a>
|
25 |
-
</p
|
26 |
}?>
|
27 |
</div>
|
28 |
</div> <?php
|
@@ -45,7 +45,7 @@ if (!class_exists("nxs_snapClassDI")) { class nxs_snapClassDI {
|
|
45 |
<br/>
|
46 |
<ul class="nsx_tabs">
|
47 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
48 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
49 |
</ul>
|
50 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
51 |
<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%;">
|
@@ -84,29 +84,20 @@ if (!class_exists("nxs_snapClassDI")) { class nxs_snapClassDI {
|
|
84 |
?>
|
85 |
</div>
|
86 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
87 |
-
|
88 |
|
89 |
-
<?php
|
90 |
-
|
91 |
-
|
92 |
-
<input value="1" id="catSelS<?php echo $ntU; ?><?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 $ntU; ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo $ntU; ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo $ntU; ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
93 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
94 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
95 |
-
<br/>
|
96 |
-
<?php } ?>
|
97 |
-
|
98 |
-
<?php nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
99 |
-
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
100 |
-
|
101 |
|
102 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
103 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
104 |
|
105 |
-
<div class="submit
|
106 |
</div><?php
|
107 |
}
|
108 |
//#### Set Unit Settings from POST
|
109 |
-
function setNTSettings($post, $options){
|
110 |
foreach ($post as $ii => $pval){
|
111 |
if (isset($pval['apDIUName']) && $pval['apDIUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
112 |
if (isset($pval['apDIUName'])) $options[$ii]['diUName'] = trim($pval['apDIUName']);
|
@@ -114,7 +105,7 @@ if (!class_exists("nxs_snapClassDI")) { class nxs_snapClassDI {
|
|
114 |
if (isset($pval['apDIPass'])) $options[$ii]['diPass'] = 'n5g9a'.nsx_doEncode($pval['apDIPass']); else $options[$ii]['diPass'] = '';
|
115 |
if (isset($pval['apDIAPIKey'])) $options[$ii]['diAPIKey'] = trim($pval['apDIAPIKey']);
|
116 |
|
117 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
118 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
119 |
|
120 |
if (isset($pval['diInclTags'])) $options[$ii]['diInclTags'] = $pval['diInclTags']; else $options[$ii]['diInclTags'] = 0;
|
@@ -127,7 +118,7 @@ if (!class_exists("nxs_snapClassDI")) { class nxs_snapClassDI {
|
|
127 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
128 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
129 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
130 |
-
}
|
131 |
} return $options;
|
132 |
}
|
133 |
//#### Show Post->Edit Meta Box Settings
|
@@ -136,7 +127,9 @@ if (!class_exists("nxs_snapClassDI")) { class nxs_snapClassDI {
|
|
136 |
$doDI = $ntOpt['doDI'] && (is_array($pMeta) || $ntOpt['catSel']!='1');
|
137 |
$isAvailDI = $ntOpt['diUName']!='' && $ntOpt['diPass']!=''; $diMsgFormat = htmlentities($ntOpt['diMsgFormat'], ENT_COMPAT, "UTF-8"); $diMsgTFormat = htmlentities($ntOpt['diMsgTFormat'], ENT_COMPAT, "UTF-8");
|
138 |
?>
|
139 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
140 |
<?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"'; ?> />
|
141 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="di[<?php echo $ii; ?>][doDI]" value="<?php echo $doDI;?>"> <?php } ?> <?php } ?>
|
142 |
|
@@ -149,11 +142,11 @@ if (!class_exists("nxs_snapClassDI")) { class nxs_snapClassDI {
|
|
149 |
</span><?php } ?>
|
150 |
</td></tr>
|
151 |
<?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>
|
152 |
-
<?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $ntOpt); } ?>
|
153 |
|
154 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
155 |
|
156 |
-
<tr id="altFormat1" style=""><th scope="row"
|
157 |
<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"; ?> />
|
158 |
</th>
|
159 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
15 |
</div>
|
16 |
<div class="nxs_box_inside">
|
17 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
18 |
+
<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' />
|
19 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
20 |
<?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 } ?>
|
21 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
22 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
23 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
24 |
<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', 'nxs_snap'); ?>]</a>
|
25 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div> <?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
26 |
}?>
|
27 |
</div>
|
28 |
</div> <?php
|
45 |
<br/>
|
46 |
<ul class="nsx_tabs">
|
47 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
48 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
49 |
</ul>
|
50 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
51 |
<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%;">
|
84 |
?>
|
85 |
</div>
|
86 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
87 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
88 |
|
89 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
90 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
91 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
94 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
95 |
|
96 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div>
|
97 |
</div><?php
|
98 |
}
|
99 |
//#### Set Unit Settings from POST
|
100 |
+
function setNTSettings($post, $options){ $code = 'DI'; $lcode = 'di';
|
101 |
foreach ($post as $ii => $pval){
|
102 |
if (isset($pval['apDIUName']) && $pval['apDIUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
103 |
if (isset($pval['apDIUName'])) $options[$ii]['diUName'] = trim($pval['apDIUName']);
|
105 |
if (isset($pval['apDIPass'])) $options[$ii]['diPass'] = 'n5g9a'.nsx_doEncode($pval['apDIPass']); else $options[$ii]['diPass'] = '';
|
106 |
if (isset($pval['apDIAPIKey'])) $options[$ii]['diAPIKey'] = trim($pval['apDIAPIKey']);
|
107 |
|
108 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
109 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
110 |
|
111 |
if (isset($pval['diInclTags'])) $options[$ii]['diInclTags'] = $pval['diInclTags']; else $options[$ii]['diInclTags'] = 0;
|
118 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
119 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
120 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
121 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
122 |
} return $options;
|
123 |
}
|
124 |
//#### Show Post->Edit Meta Box Settings
|
127 |
$doDI = $ntOpt['doDI'] && (is_array($pMeta) || $ntOpt['catSel']!='1');
|
128 |
$isAvailDI = $ntOpt['diUName']!='' && $ntOpt['diPass']!=''; $diMsgFormat = htmlentities($ntOpt['diMsgFormat'], ENT_COMPAT, "UTF-8"); $diMsgTFormat = htmlentities($ntOpt['diMsgTFormat'], ENT_COMPAT, "UTF-8");
|
129 |
?>
|
130 |
+
<tr><th style="text-align:left;" colspan="2">
|
131 |
+
<?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 } ?>
|
132 |
+
<?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 } ?>
|
133 |
<?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"'; ?> />
|
134 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="di[<?php echo $ii; ?>][doDI]" value="<?php echo $doDI;?>"> <?php } ?> <?php } ?>
|
135 |
|
142 |
</span><?php } ?>
|
143 |
</td></tr>
|
144 |
<?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>
|
145 |
+
<?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); } ?>
|
146 |
|
147 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
148 |
|
149 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
150 |
<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"; ?> />
|
151 |
</th>
|
152 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
inc-cl/dl.php
CHANGED
@@ -14,14 +14,14 @@ if (!class_exists("nxs_snapClassDL")) { class nxs_snapClassDL {
|
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
17 |
-
<p style="margin:0px;margin-left:5px;">
|
18 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
-
</p><?php
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php
|
@@ -42,7 +42,7 @@ if (!class_exists("nxs_snapClassDL")) { class nxs_snapClassDL {
|
|
42 |
<br/>
|
43 |
<ul class="nsx_tabs">
|
44 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
45 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
46 |
</ul>
|
47 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
48 |
<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%;">
|
@@ -76,35 +76,27 @@ if (!class_exists("nxs_snapClassDL")) { class nxs_snapClassDL {
|
|
76 |
|
77 |
?></div>
|
78 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
79 |
-
|
80 |
|
81 |
-
<?php
|
82 |
-
|
83 |
-
|
84 |
-
<input value="1" id="catSelS<?php echo $ntU; ?><?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 $ntU; ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo $ntU; ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo $ntU; ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
85 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
86 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
87 |
-
<br/>
|
88 |
-
<?php } ?>
|
89 |
-
|
90 |
-
<?php nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
91 |
-
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
92 |
|
93 |
|
94 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
95 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
96 |
|
97 |
-
<div class="submit
|
98 |
}
|
99 |
//#### Set Unit Settings from POST
|
100 |
-
function setNTSettings($post, $options){
|
101 |
foreach ($post as $ii => $pval){
|
102 |
if (isset($pval['apDLUName']) && $pval['apDLUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
103 |
if (isset($pval['apDLUName'])) $options[$ii]['dlUName'] = trim($pval['apDLUName']);
|
104 |
if (isset($pval['nName'])) $options[$ii]['nName'] = trim($pval['nName']);
|
105 |
if (isset($pval['apDLPass'])) $options[$ii]['dlPass'] = 'n5g9a'.nsx_doEncode($pval['apDLPass']); else $options[$ii]['dlPass'] = '';
|
106 |
|
107 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
108 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
109 |
|
110 |
if (isset($pval['apDLMsgFrmt'])) $options[$ii]['dlMsgFormat'] = trim($pval['apDLMsgFrmt']);
|
@@ -116,7 +108,7 @@ if (!class_exists("nxs_snapClassDL")) { class nxs_snapClassDL {
|
|
116 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
117 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
118 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
119 |
-
}
|
120 |
} return $options;
|
121 |
}
|
122 |
//#### Show Post->Edit Meta Box Settings
|
@@ -125,7 +117,9 @@ if (!class_exists("nxs_snapClassDL")) { class nxs_snapClassDL {
|
|
125 |
$doDL = $ntOpt['doDL'] && (is_array($pMeta) || $ntOpt['catSel']!='1');
|
126 |
$isAvailDL = $ntOpt['dlUName']!='' && $ntOpt['dlPass']!=''; $dlMsgFormat = htmlentities($ntOpt['dlMsgFormat'], ENT_COMPAT, "UTF-8"); $dlMsgTFormat = htmlentities($ntOpt['dlMsgTFormat'], ENT_COMPAT, "UTF-8");
|
127 |
?>
|
128 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
129 |
<?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"'; ?> />
|
130 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="dl[<?php echo $ii; ?>][doDL]" value="<?php echo $doDL;?>"> <?php } ?> <?php } ?>
|
131 |
|
@@ -141,11 +135,11 @@ if (!class_exists("nxs_snapClassDL")) { class nxs_snapClassDL {
|
|
141 |
</td></tr>
|
142 |
|
143 |
<?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>
|
144 |
-
<?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $ntOpt); } ?>
|
145 |
|
146 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
147 |
|
148 |
-
<tr id="altFormat1" style=""><th scope="row"
|
149 |
<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"; ?> />
|
150 |
</th>
|
151 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
17 |
+
<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' />
|
18 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php
|
42 |
<br/>
|
43 |
<ul class="nsx_tabs">
|
44 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
45 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
46 |
</ul>
|
47 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
48 |
<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%;">
|
76 |
|
77 |
?></div>
|
78 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
79 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
80 |
|
81 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
82 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
83 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
|
86 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
87 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
88 |
|
89 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div></div><?php
|
90 |
}
|
91 |
//#### Set Unit Settings from POST
|
92 |
+
function setNTSettings($post, $options){$code = 'DL'; $lcode = 'dl';
|
93 |
foreach ($post as $ii => $pval){
|
94 |
if (isset($pval['apDLUName']) && $pval['apDLUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
95 |
if (isset($pval['apDLUName'])) $options[$ii]['dlUName'] = trim($pval['apDLUName']);
|
96 |
if (isset($pval['nName'])) $options[$ii]['nName'] = trim($pval['nName']);
|
97 |
if (isset($pval['apDLPass'])) $options[$ii]['dlPass'] = 'n5g9a'.nsx_doEncode($pval['apDLPass']); else $options[$ii]['dlPass'] = '';
|
98 |
|
99 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
100 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
101 |
|
102 |
if (isset($pval['apDLMsgFrmt'])) $options[$ii]['dlMsgFormat'] = trim($pval['apDLMsgFrmt']);
|
108 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
109 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
110 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
111 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
112 |
} return $options;
|
113 |
}
|
114 |
//#### Show Post->Edit Meta Box Settings
|
117 |
$doDL = $ntOpt['doDL'] && (is_array($pMeta) || $ntOpt['catSel']!='1');
|
118 |
$isAvailDL = $ntOpt['dlUName']!='' && $ntOpt['dlPass']!=''; $dlMsgFormat = htmlentities($ntOpt['dlMsgFormat'], ENT_COMPAT, "UTF-8"); $dlMsgTFormat = htmlentities($ntOpt['dlMsgTFormat'], ENT_COMPAT, "UTF-8");
|
119 |
?>
|
120 |
+
<tr><th style="text-align:left;" colspan="2">
|
121 |
+
<?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 } ?>
|
122 |
+
<?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 } ?>
|
123 |
<?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"'; ?> />
|
124 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="dl[<?php echo $ii; ?>][doDL]" value="<?php echo $doDL;?>"> <?php } ?> <?php } ?>
|
125 |
|
135 |
</td></tr>
|
136 |
|
137 |
<?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>
|
138 |
+
<?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); } ?>
|
139 |
|
140 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
141 |
|
142 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
143 |
<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"; ?> />
|
144 |
</th>
|
145 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
inc-cl/fb.api.php
CHANGED
@@ -21,25 +21,24 @@ if (!class_exists("nxs_class_SNAP_FB")) { class nxs_class_SNAP_FB {
|
|
21 |
|
22 |
//## Some OLD Format Conversion
|
23 |
if (!isset($options['attachType']) && isset($options['fbAttch'])) $options['attachType'] = $options['fbAttch'];
|
24 |
-
if (!isset($options['postType']) && isset($options['fbPostType'])) $options['postType'] = $options['fbPostType'];
|
25 |
-
if (!isset($options['pgID']) && isset($options['fbPgID'])) $options['pgID'] = $options['fbPgID'];
|
26 |
-
|
27 |
//## Get URL info.
|
28 |
if ($fbPostType!='I' && $fbPostType!='T' && isset($options['useFBGURLInfo']) && $options['useFBGURLInfo']=='1') { $url = $message['url']; $params = array();
|
29 |
$flds = array('id'=>$url, 'scrape'=>'true'); $response = wp_remote_post('http://graph.facebook.com', array('body' => $flds));
|
30 |
-
if (is_wp_error($response)) $badOut['Error'] = print_r($response, true)." - ERROR"; else { $response = json_decode($response['body'], true);
|
31 |
-
if (
|
32 |
if (!empty($response['site_name'])) $message['siteName'] = $response['site_name']; elseif ($message['siteName']=='') $message['siteName'] = $message['title'];
|
33 |
if (!empty($response['image'][0]['url'])) $message['imageURL'] = $response['image'][0]['url'];
|
34 |
}
|
35 |
} // prr($message);
|
36 |
-
$msg = nxs_doFormatMsg($options['fbMsgFormat'], $message); $imgURL = $message['imageURL']; $
|
37 |
$attachType = $options['attachType']; if ($attachType=='1') $attachType = 'A'; else $attachType = 'S';
|
38 |
if ($options['imgUpl']!='2') $options['imgUpl'] = 'T'; else $options['imgUpl'] = 'A'; $page_id = $options['pgID'];
|
39 |
$msg = strip_tags($msg); $msg = str_ireplace('<(")','<(")', $msg); //## FB Smiles FIX 3
|
40 |
if (substr($msg, 0, 1)=='@') $msg = ' '.$msg; // ERROR] couldn't open file fix
|
41 |
-
$mssg = array('access_token' => $options['fbAppPageAuthToken'], 'message' => $msg);
|
42 |
-
|
43 |
if ($fbPostType=='I' && trim($imgURL)=='') $fbPostType='T';
|
44 |
if ($fbPostType=='A' || $fbPostType=='') {
|
45 |
if (($attachType=='A' || $attachType=='S')) { $attArr = array('name' => $message['urlTitle'], 'caption' => $message['siteName'], 'link' =>$message['url'], 'description' => $message['urlDescr']); $mssg = array_merge($mssg, $attArr); ; }
|
@@ -54,7 +53,6 @@ if (!class_exists("nxs_class_SNAP_FB")) { class nxs_class_SNAP_FB {
|
|
54 |
if (isset($chosen_album) && isset($chosen_album["id"])) $page_id = $chosen_album["id"];
|
55 |
}
|
56 |
}
|
57 |
-
// prr($message); prr($mssg); prr($options); // die();
|
58 |
try { $ret = $facebook->api("/$page_id/".$fbWhere, "post", $mssg);} catch (NXS_FacebookApiException $e) { $badOut['Error'] = ' [ERROR] '.$e->getMessage()."<br/>\n";
|
59 |
if (stripos($e->getMessage(),'This API call requires a valid app_id')!==false) {
|
60 |
if ( !is_numeric($page_id) && stripos($options['fbURL'], '/groups/')!=false) $badOut['Error'] .= ' [ERROR] Unrecognized Facebook Group ID. Please use numeric ID.';
|
21 |
|
22 |
//## Some OLD Format Conversion
|
23 |
if (!isset($options['attachType']) && isset($options['fbAttch'])) $options['attachType'] = $options['fbAttch'];
|
24 |
+
if (!isset($options['postType']) && isset($options['fbPostType'])) $options['postType'] = $options['fbPostType']; $fbPostType = $options['postType'];
|
25 |
+
if (!isset($options['pgID']) && isset($options['fbPgID'])) $options['pgID'] = $options['fbPgID'];
|
26 |
+
|
27 |
//## Get URL info.
|
28 |
if ($fbPostType!='I' && $fbPostType!='T' && isset($options['useFBGURLInfo']) && $options['useFBGURLInfo']=='1') { $url = $message['url']; $params = array();
|
29 |
$flds = array('id'=>$url, 'scrape'=>'true'); $response = wp_remote_post('http://graph.facebook.com', array('body' => $flds));
|
30 |
+
if (is_wp_error($response)) $badOut['Error'] = print_r($response, true)." - ERROR"; else { $response = json_decode($response['body'], true); // prr($response); die();
|
31 |
+
if (!empty($response['description'])) $message['urlDescr'] = $response['description']; if (!empty($response['title'])) $message['urlTitle'] = $response['title'];
|
32 |
if (!empty($response['site_name'])) $message['siteName'] = $response['site_name']; elseif ($message['siteName']=='') $message['siteName'] = $message['title'];
|
33 |
if (!empty($response['image'][0]['url'])) $message['imageURL'] = $response['image'][0]['url'];
|
34 |
}
|
35 |
} // prr($message);
|
36 |
+
$msg = nxs_doFormatMsg($options['fbMsgFormat'], $message); $imgURL = $message['imageURL']; $fbWhere = 'feed';
|
37 |
$attachType = $options['attachType']; if ($attachType=='1') $attachType = 'A'; else $attachType = 'S';
|
38 |
if ($options['imgUpl']!='2') $options['imgUpl'] = 'T'; else $options['imgUpl'] = 'A'; $page_id = $options['pgID'];
|
39 |
$msg = strip_tags($msg); $msg = str_ireplace('<(")','<(")', $msg); //## FB Smiles FIX 3
|
40 |
if (substr($msg, 0, 1)=='@') $msg = ' '.$msg; // ERROR] couldn't open file fix
|
41 |
+
$mssg = array('access_token' => $options['fbAppPageAuthToken'], 'message' => $msg);
|
|
|
42 |
if ($fbPostType=='I' && trim($imgURL)=='') $fbPostType='T';
|
43 |
if ($fbPostType=='A' || $fbPostType=='') {
|
44 |
if (($attachType=='A' || $attachType=='S')) { $attArr = array('name' => $message['urlTitle'], 'caption' => $message['siteName'], 'link' =>$message['url'], 'description' => $message['urlDescr']); $mssg = array_merge($mssg, $attArr); ; }
|
53 |
if (isset($chosen_album) && isset($chosen_album["id"])) $page_id = $chosen_album["id"];
|
54 |
}
|
55 |
}
|
|
|
56 |
try { $ret = $facebook->api("/$page_id/".$fbWhere, "post", $mssg);} catch (NXS_FacebookApiException $e) { $badOut['Error'] = ' [ERROR] '.$e->getMessage()."<br/>\n";
|
57 |
if (stripos($e->getMessage(),'This API call requires a valid app_id')!==false) {
|
58 |
if ( !is_numeric($page_id) && stripos($options['fbURL'], '/groups/')!=false) $badOut['Error'] .= ' [ERROR] Unrecognized Facebook Group ID. Please use numeric ID.';
|
inc-cl/fb.php
CHANGED
@@ -4,14 +4,14 @@ $nxs_snapAvNts[] = array('code'=>'FB', 'lcode'=>'fb', 'name'=>'Facebook');
|
|
4 |
|
5 |
if (!class_exists("nxs_snapClassFB")) { class nxs_snapClassFB {
|
6 |
//#### Show Common Settings
|
7 |
-
function showGenNTSettings($ntOpts){ global $
|
8 |
if ( isset($_GET['code']) && $_GET['code']!='' && (isset($_GET['auth']) && $_GET['auth']=='fb') && ((!isset($_GET['action'])) || $_GET['action']!='gPlusAuth')){ $at = $_GET['code']; echo "-= This is normal technical authorization info that will dissapear (Unless you get some errors) =- <br/><br/><br/>";
|
9 |
//$fbo = array('wfa'=> 1339160000); //foreach ($ntOpts as $two) { if (isset($two['wfa']) && $two['wfa']>$fbo['wfa']) $fbo = $two; }
|
10 |
$fbo = $ntOpts[$_GET['acc']]; $wprg = array(); $response = wp_remote_get('https://graph.facebook.com/nextscripts', $wprg);
|
11 |
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; }
|
12 |
if (isset($fbo['fbPgID'])){ echo "-="; prr($fbo);// die();
|
13 |
-
$response = wp_remote_get('https://graph.facebook.com/oauth/access_token?client_id='.$fbo['fbAppID'].'&redirect_uri='.urlencode($
|
14 |
-
//prr('https://graph.facebook.com/oauth/access_token?client_id='.$fbo['fbAppID'].'&redirect_uri='.urlencode($
|
15 |
if ( (is_object($response) && (isset($response->errors))) || (is_array($response) && stripos($response['body'],'"error":')!==false )) { prr($response); die(); }
|
16 |
parse_str($response['body'], $params); $at = $params['access_token']; prr($response); prr($params);
|
17 |
$response = wp_remote_get('https://graph.facebook.com/oauth/access_token?client_secret='.$fbo['fbAppSec'].'&client_id='.$fbo['fbAppID'].'&grant_type=fb_exchange_token&fb_exchange_token='.$at, $wprg);
|
@@ -36,7 +36,7 @@ if (!class_exists("nxs_snapClassFB")) { class nxs_snapClassFB {
|
|
36 |
|
37 |
if ($user>0) { $fbo['fbAppAuthUser'] = $user;
|
38 |
$optionsG = get_option('NS_SNAutoPoster'); $optionsG['fb'][$_GET['acc']] = $fbo; update_option('NS_SNAutoPoster', $optionsG);
|
39 |
-
?><script type="text/javascript">window.location = "<?php echo $
|
40 |
<?php } die(); }
|
41 |
}
|
42 |
?>
|
@@ -48,16 +48,17 @@ if (!class_exists("nxs_snapClassFB")) { class nxs_snapClassFB {
|
|
48 |
</div>
|
49 |
</div>
|
50 |
<div class="nxs_box_inside">
|
51 |
-
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('https://www.facebook.com','', str_ireplace('http://www.facebook.com','', $pbo['fbURL']));
|
52 |
if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['fbAppAuthUser']) && $pbo['fbAppAuthUser']>1)?'1':''; ?>
|
53 |
-
<p style="margin:0px;margin-left:5px;">
|
54 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
55 |
<?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 } ?>
|
56 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
57 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
58 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention required. Unfinished setup', 'nxs_snap'); ?> ==></b><?php }
|
|
|
59 |
<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', 'nxs_snap'); ?>]</a>
|
60 |
-
</p><?php $pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
61 |
}?>
|
62 |
</div>
|
63 |
</div> <?php
|
@@ -67,7 +68,7 @@ if (!class_exists("nxs_snapClassFB")) { class nxs_snapClassFB {
|
|
67 |
//#### Show NEW Settings Page
|
68 |
function showNewNTSettings($mfbo){ $fbo = array('nName'=>'', 'doFB'=>'1', 'fbURL'=>'', 'fbAppID'=>'', 'imgUpl'=>'1', 'fbPostType'=>'A', 'fbMsgAFormat'=>'', 'fbAppSec'=>'', 'fbAttch'=>'1', 'fbPgID'=>'', 'fbAppAuthUser'=>'', 'fbMsgFormat'=>__('New post (%TITLE%) has been published on %SITENAME%', 'nxs_snap') ); $fbo['ntInfo']= array('lcode'=>'fb'); $this->showNTSettings($mfbo, $fbo, true);}
|
69 |
//#### Show Unit Settings
|
70 |
-
function showNTSettings($ii, $options, $isNew=false){ global $nxs_plurl, $
|
71 |
if ((int)$options['fbAttch']==0 && (!isset($options['trPostType']) || $options['trPostType']=='')) $options['trPostType'] = 'T';
|
72 |
if (!isset($plgn_NS_SNAutoPoster)) return; $gOptions = $plgn_NS_SNAutoPoster->nxs_options;
|
73 |
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'] = '';
|
@@ -89,7 +90,7 @@ if (!class_exists("nxs_snapClassFB")) { class nxs_snapClassFB {
|
|
89 |
|
90 |
<ul class="nsx_tabs">
|
91 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
92 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
93 |
</ul>
|
94 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
95 |
<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%;">
|
@@ -154,7 +155,7 @@ if (!class_exists("nxs_snapClassFB")) { class nxs_snapClassFB {
|
|
154 |
<?php } else { if(isset($options['fbAppAuthUser']) && $options['fbAppAuthUser']>0) { ?>
|
155 |
<?php _e('Your Facebook Account has been authorized.', 'nxs_snap'); ?> User ID: <?php _e(apply_filters('format_to_edit', htmlentities($options['fbAppAuthUser'], ENT_COMPAT, "UTF-8")), 'nxs_snap') ?>.
|
156 |
<?php _e('You can', 'nxs_snap'); ?> Re- <?php } ?>
|
157 |
-
<a href="https://www.facebook.com/dialog/oauth?client_id=<?php echo trim($options['fbAppID']);?>&client_secret=<?php echo trim($options['fbAppSec']);?>&scope=publish_stream,user_photos,photo_upload,friends_photos,offline_access,read_stream,manage_pages,user_groups,friends_groups&redirect_uri=<?php echo trim(urlencode($
|
158 |
<?php if (!isset($options['fbAppAuthUser']) || $options['fbAppAuthUser']<1) { ?> <div class="blnkg"><=== <?php _e('Authorize your account', 'nxs_snap'); ?> ===</div>
|
159 |
<br/><br/><i> <?php _e('If you get Facebook message:', 'nxs_snap'); ?> <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.', 'nxs_snap'); ?></i> <?php }?>
|
160 |
<?php } ?>
|
@@ -166,18 +167,10 @@ if (!class_exists("nxs_snapClassFB")) { class nxs_snapClassFB {
|
|
166 |
|
167 |
</div>
|
168 |
<?php /* ######################## Tools Tab ####################### */ ?>
|
169 |
-
|
170 |
|
171 |
-
|
172 |
-
|
173 |
-
<input value="0" id="catSelA<?php echo $ii; ?>" type="radio" name="fb[<?php echo $ii; ?>][catSel]" <?php if ((int)$options['catSel'] != 1) echo "checked"; ?> /> All
|
174 |
-
<input value="1" id="catSelSFB<?php echo $ii; ?>" type="radio" name="fb[<?php echo $ii; ?>][catSel]" <?php if ((int)$options['catSel'] == 1) echo "checked"; ?> /> <a href="#" style="text-decoration: none;" class="showCats" id="nxs_SCA_FB<?php echo $ii; ?>" onclick="jQuery('#catSelSFB<?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('FB<?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_FB<?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
175 |
-
<input type="hidden" name="fb[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_FB<?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
176 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
177 |
-
<br/>
|
178 |
-
<?php } ?>
|
179 |
-
|
180 |
-
<?php nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
181 |
|
182 |
<div style="width:100%;"><strong style="font-size: 16px;"><?php _e('Facebook Comments:', 'nxs_snap'); ?></strong> </div>
|
183 |
<div style="margin-bottom: 5px; margin-left: 10px; ">
|
@@ -193,20 +186,20 @@ if (!class_exists("nxs_snapClassFB")) { class nxs_snapClassFB {
|
|
193 |
|
194 |
</div>
|
195 |
|
196 |
-
<?php
|
197 |
|
198 |
|
199 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
200 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
201 |
|
202 |
-
<div class="submit
|
203 |
|
204 |
</div>
|
205 |
<?php
|
206 |
|
207 |
}
|
208 |
//#### Set Unit Settings from POST
|
209 |
-
function setNTSettings($post, $options){
|
210 |
foreach ($post as $ii => $pval){
|
211 |
if (isset($pval['apFBAppID']) && $pval['apFBAppID']!='') { if (!isset($options[$ii])) $options[$ii] = array();
|
212 |
if (isset($pval['apDoFB'])) $options[$ii]['doFB'] = $pval['apDoFB']; else $options[$ii]['doFB'] = 0;
|
@@ -214,7 +207,7 @@ if (!class_exists("nxs_snapClassFB")) { class nxs_snapClassFB {
|
|
214 |
if (isset($pval['apFBAppID'])) $options[$ii]['fbAppID'] = trim($pval['apFBAppID']);
|
215 |
if (isset($pval['apFBAppSec'])) $options[$ii]['fbAppSec'] = trim($pval['apFBAppSec']);
|
216 |
|
217 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
218 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
219 |
|
220 |
if (isset($pval['fbPostType'])) $options[$ii]['fbPostType'] = trim($pval['fbPostType']);
|
@@ -244,18 +237,21 @@ if (!class_exists("nxs_snapClassFB")) { class nxs_snapClassFB {
|
|
244 |
$options[$ii]['fbPgID'] = $fbPgID; //echo $fbPgID;
|
245 |
if (strpos($options[$ii]['fbURL'], '?')!==false) $options[$ii]['fbURL'] = substr($options[$ii]['fbURL'], 0, strpos($options[$ii]['fbURL'], '?'));// prr($pval); prr($options[$ii]); // die();
|
246 |
}
|
247 |
-
}
|
248 |
} return $options;
|
249 |
}
|
250 |
//#### Show Post->Edit Meta Box Settings
|
251 |
function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'fb'; $ntU = 'FB';
|
252 |
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]);
|
253 |
if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = ''; if (empty($ntOpt['urlToUse'])) $ntOpt['urlToUse'] = '';
|
254 |
-
$doFB = $ntOpt['doFB'] && (is_array($pMeta) || $ntOpt['catSel']!='1');
|
|
|
255 |
$isAvailFB = $ntOpt['fbURL']!='' && $ntOpt['fbAppID']!='' && $ntOpt['fbAppSec']!=''; $isAttachFB = $ntOpt['fbAttch']; $fbMsgFormat = htmlentities($ntOpt['fbMsgFormat'], ENT_COMPAT, "UTF-8"); $fbPostType = $ntOpt['fbPostType'];
|
256 |
?>
|
257 |
|
258 |
-
<tr><th style="text-align:left;" colspan="2">
|
|
|
|
|
259 |
|
260 |
<?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"'; ?> />
|
261 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="fb[<?php echo $ii; ?>][doFB]" value="<?php echo $doFB;?>"> <?php } ?> <?php } ?>
|
@@ -278,11 +274,11 @@ if (!class_exists("nxs_snapClassFB")) { class nxs_snapClassFB {
|
|
278 |
|
279 |
</td></tr>
|
280 |
<?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>
|
281 |
-
<?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $ntOpt); } ?>
|
282 |
|
283 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
284 |
|
285 |
-
<tr id="altFormat1" style=""><th scope="row"
|
286 |
<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"; ?> />
|
287 |
</th>
|
288 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
@@ -341,7 +337,7 @@ if (!class_exists("nxs_snapClassFB")) { class nxs_snapClassFB {
|
|
341 |
if (!function_exists("nxs_getBackFBComments")) { function nxs_getBackFBComments($postID, $options, $po) { require_once ('apis/facebook.php'); if (empty($options['fbAppPageAuthToken'])) return;
|
342 |
$opts = array('access_token' => $options['fbAppPageAuthToken']);
|
343 |
$facebook = new NXS_Facebook(array( 'appId' => $options['fbAppID'], 'secret' => $options['fbAppSec'], 'cookie' => true )); $ci = 0;
|
344 |
-
$ret = $facebook->api($po['pgID']."/comments?filter=toplevel", "GET", $opts);
|
345 |
$impCmnts = get_post_meta($postID, 'snapImportedFBComments', true); if (!is_array($impCmnts)) $impCmnts = array(); //prr($impCmnts);
|
346 |
if (is_array($ret) && is_array($ret['data'])) foreach ($ret['data'] as $comment){ $cid = $comment['id']; if (trim($cid)=='') continue;
|
347 |
if (!in_array('fbxcw'.$cid, $impCmnts)) { $authData = $facebook->api($comment['from']['id'], "GET", $opts);
|
@@ -425,7 +421,7 @@ if (!function_exists("nxs_doPublishToFB")) { //## Second Function to Post to FB
|
|
425 |
if ($dsc=='') $dsc = trim(apply_filters('the_content', nxs_doQTrans($post->post_content, $lng))); if ($dsc=='') $dsc = trim(nxs_doQTrans($post->post_content, $lng));
|
426 |
if ($dsc=='') $dsc = get_bloginfo('description');
|
427 |
}
|
428 |
-
$dsc = strip_tags($dsc); $dsc = nxs_decodeEntitiesFull($dsc); $dsc = nsTrnc($dsc, 900, ' ');
|
429 |
}
|
430 |
|
431 |
$msg = str_replace('<br>', "\n", $msg); $msg = str_replace('<br/>', "\n", $msg); $msg = str_replace('<br />', "\n", $msg);
|
@@ -447,7 +443,7 @@ if (!function_exists("nxs_doPublishToFB")) { //## Second Function to Post to FB
|
|
447 |
if (isset($options['urlToUse']) && trim($options['urlToUse'])!='') { $urlToGo = $options['urlToUse']; $options['useFBGURLInfo'] = true; } else $urlToGo = get_permalink($postID);
|
448 |
if($addParams!='') $urlToGo .= (strpos($urlToGo,'?')!==false?'&':'?').$addParams;
|
449 |
//prr($options);
|
450 |
-
$urlTitle = nxs_doQTrans($post->post_title, $lng); $options['fbMsgFormat'] = $msg;
|
451 |
} // prr($mssg); // prr($options); // prr($facebook); echo "/$page_id/feed";
|
452 |
|
453 |
$message = array('url'=>$urlToGo, 'urlTitle'=>$urlTitle, 'urlDescr'=>$dsc, 'imageURL'=>$imgURL, 'videoURL'=>$vidURL, 'siteName'=>$blogTitle);
|
4 |
|
5 |
if (!class_exists("nxs_snapClassFB")) { class nxs_snapClassFB {
|
6 |
//#### Show Common Settings
|
7 |
+
function showGenNTSettings($ntOpts){ global $nxs_snapSetPgURL, $nxs_plurl; $ntInfo = array('code'=>'FB', 'lcode'=>'fb', 'name'=>'Facebook', 'defNName'=>'dlUName', 'tstReq' => true);
|
8 |
if ( isset($_GET['code']) && $_GET['code']!='' && (isset($_GET['auth']) && $_GET['auth']=='fb') && ((!isset($_GET['action'])) || $_GET['action']!='gPlusAuth')){ $at = $_GET['code']; echo "-= This is normal technical authorization info that will dissapear (Unless you get some errors) =- <br/><br/><br/>";
|
9 |
//$fbo = array('wfa'=> 1339160000); //foreach ($ntOpts as $two) { if (isset($two['wfa']) && $two['wfa']>$fbo['wfa']) $fbo = $two; }
|
10 |
$fbo = $ntOpts[$_GET['acc']]; $wprg = array(); $response = wp_remote_get('https://graph.facebook.com/nextscripts', $wprg);
|
11 |
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; }
|
12 |
if (isset($fbo['fbPgID'])){ echo "-="; prr($fbo);// die();
|
13 |
+
$response = wp_remote_get('https://graph.facebook.com/oauth/access_token?client_id='.$fbo['fbAppID'].'&redirect_uri='.urlencode($nxs_snapSetPgURL.'&auth=fb&acc='.$_GET['acc']).'&client_secret='.$fbo['fbAppSec'].'&code='.$at, $wprg);
|
14 |
+
//prr('https://graph.facebook.com/oauth/access_token?client_id='.$fbo['fbAppID'].'&redirect_uri='.urlencode($nxs_snapSetPgURL).'&client_secret='.$fbo['fbAppSec'].'&code='.$at);
|
15 |
if ( (is_object($response) && (isset($response->errors))) || (is_array($response) && stripos($response['body'],'"error":')!==false )) { prr($response); die(); }
|
16 |
parse_str($response['body'], $params); $at = $params['access_token']; prr($response); prr($params);
|
17 |
$response = wp_remote_get('https://graph.facebook.com/oauth/access_token?client_secret='.$fbo['fbAppSec'].'&client_id='.$fbo['fbAppID'].'&grant_type=fb_exchange_token&fb_exchange_token='.$at, $wprg);
|
36 |
|
37 |
if ($user>0) { $fbo['fbAppAuthUser'] = $user;
|
38 |
$optionsG = get_option('NS_SNAutoPoster'); $optionsG['fb'][$_GET['acc']] = $fbo; update_option('NS_SNAutoPoster', $optionsG);
|
39 |
+
?><script type="text/javascript">window.location = "<?php echo $nxs_snapSetPgURL; ?>"</script>
|
40 |
<?php } die(); }
|
41 |
}
|
42 |
?>
|
48 |
</div>
|
49 |
</div>
|
50 |
<div class="nxs_box_inside">
|
51 |
+
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('https://www.facebook.com','', str_ireplace('http://www.facebook.com','', $pbo['fbURL']));
|
52 |
if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['fbAppAuthUser']) && $pbo['fbAppAuthUser']>1)?'1':''; ?>
|
53 |
+
<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' />
|
54 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
55 |
<?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 } ?>
|
56 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
57 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
58 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention required. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?>
|
59 |
+
<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', 'nxs_snap'); ?>]</a>
|
60 |
<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', 'nxs_snap'); ?>]</a>
|
61 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php // $pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
62 |
}?>
|
63 |
</div>
|
64 |
</div> <?php
|
68 |
//#### Show NEW Settings Page
|
69 |
function showNewNTSettings($mfbo){ $fbo = array('nName'=>'', 'doFB'=>'1', 'fbURL'=>'', 'fbAppID'=>'', 'imgUpl'=>'1', 'fbPostType'=>'A', 'fbMsgAFormat'=>'', 'fbAppSec'=>'', 'fbAttch'=>'1', 'fbPgID'=>'', 'fbAppAuthUser'=>'', 'fbMsgFormat'=>__('New post (%TITLE%) has been published on %SITENAME%', 'nxs_snap') ); $fbo['ntInfo']= array('lcode'=>'fb'); $this->showNTSettings($mfbo, $fbo, true);}
|
70 |
//#### Show Unit Settings
|
71 |
+
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');
|
72 |
if ((int)$options['fbAttch']==0 && (!isset($options['trPostType']) || $options['trPostType']=='')) $options['trPostType'] = 'T';
|
73 |
if (!isset($plgn_NS_SNAutoPoster)) return; $gOptions = $plgn_NS_SNAutoPoster->nxs_options;
|
74 |
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'] = '';
|
90 |
|
91 |
<ul class="nsx_tabs">
|
92 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
93 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
94 |
</ul>
|
95 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
96 |
<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%;">
|
155 |
<?php } else { if(isset($options['fbAppAuthUser']) && $options['fbAppAuthUser']>0) { ?>
|
156 |
<?php _e('Your Facebook Account has been authorized.', 'nxs_snap'); ?> User ID: <?php _e(apply_filters('format_to_edit', htmlentities($options['fbAppAuthUser'], ENT_COMPAT, "UTF-8")), 'nxs_snap') ?>.
|
157 |
<?php _e('You can', 'nxs_snap'); ?> Re- <?php } ?>
|
158 |
+
<a href="https://www.facebook.com/dialog/oauth?client_id=<?php echo trim($options['fbAppID']);?>&client_secret=<?php echo trim($options['fbAppSec']);?>&scope=publish_stream,user_photos,photo_upload,friends_photos,offline_access,read_stream,manage_pages,user_groups,friends_groups&redirect_uri=<?php echo trim(urlencode($nxs_snapSetPgURL.'&auth=fb&acc='.$ii));?>">Authorize Your Facebook Account</a>
|
159 |
<?php if (!isset($options['fbAppAuthUser']) || $options['fbAppAuthUser']<1) { ?> <div class="blnkg"><=== <?php _e('Authorize your account', 'nxs_snap'); ?> ===</div>
|
160 |
<br/><br/><i> <?php _e('If you get Facebook message:', 'nxs_snap'); ?> <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.', 'nxs_snap'); ?></i> <?php }?>
|
161 |
<?php } ?>
|
167 |
|
168 |
</div>
|
169 |
<?php /* ######################## Tools Tab ####################### */ ?>
|
170 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
171 |
|
172 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
173 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
|
175 |
<div style="width:100%;"><strong style="font-size: 16px;"><?php _e('Facebook Comments:', 'nxs_snap'); ?></strong> </div>
|
176 |
<div style="margin-bottom: 5px; margin-left: 10px; ">
|
186 |
|
187 |
</div>
|
188 |
|
189 |
+
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
190 |
|
191 |
|
192 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
193 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
194 |
|
195 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div>
|
196 |
|
197 |
</div>
|
198 |
<?php
|
199 |
|
200 |
}
|
201 |
//#### Set Unit Settings from POST
|
202 |
+
function setNTSettings($post, $options){ $code = 'FB'; $lcode = 'fb';
|
203 |
foreach ($post as $ii => $pval){
|
204 |
if (isset($pval['apFBAppID']) && $pval['apFBAppID']!='') { if (!isset($options[$ii])) $options[$ii] = array();
|
205 |
if (isset($pval['apDoFB'])) $options[$ii]['doFB'] = $pval['apDoFB']; else $options[$ii]['doFB'] = 0;
|
207 |
if (isset($pval['apFBAppID'])) $options[$ii]['fbAppID'] = trim($pval['apFBAppID']);
|
208 |
if (isset($pval['apFBAppSec'])) $options[$ii]['fbAppSec'] = trim($pval['apFBAppSec']);
|
209 |
|
210 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
211 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
212 |
|
213 |
if (isset($pval['fbPostType'])) $options[$ii]['fbPostType'] = trim($pval['fbPostType']);
|
237 |
$options[$ii]['fbPgID'] = $fbPgID; //echo $fbPgID;
|
238 |
if (strpos($options[$ii]['fbURL'], '?')!==false) $options[$ii]['fbURL'] = substr($options[$ii]['fbURL'], 0, strpos($options[$ii]['fbURL'], '?'));// prr($pval); prr($options[$ii]); // die();
|
239 |
}
|
240 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
241 |
} return $options;
|
242 |
}
|
243 |
//#### Show Post->Edit Meta Box Settings
|
244 |
function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'fb'; $ntU = 'FB';
|
245 |
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]);
|
246 |
if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = ''; if (empty($ntOpt['urlToUse'])) $ntOpt['urlToUse'] = '';
|
247 |
+
$doFB = $ntOpt['doFB'] && (is_array($pMeta) || $ntOpt['catSel']!='1');
|
248 |
+
$imgToUse = $ntOpt['imgToUse']; $urlToUse = $ntOpt['urlToUse'];
|
249 |
$isAvailFB = $ntOpt['fbURL']!='' && $ntOpt['fbAppID']!='' && $ntOpt['fbAppSec']!=''; $isAttachFB = $ntOpt['fbAttch']; $fbMsgFormat = htmlentities($ntOpt['fbMsgFormat'], ENT_COMPAT, "UTF-8"); $fbPostType = $ntOpt['fbPostType'];
|
250 |
?>
|
251 |
|
252 |
+
<tr><th style="text-align:left;" colspan="2">
|
253 |
+
<?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 } ?>
|
254 |
+
<?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 } ?>
|
255 |
|
256 |
<?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"'; ?> />
|
257 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="fb[<?php echo $ii; ?>][doFB]" value="<?php echo $doFB;?>"> <?php } ?> <?php } ?>
|
274 |
|
275 |
</td></tr>
|
276 |
<?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>
|
277 |
+
<?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); } ?>
|
278 |
|
279 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
280 |
|
281 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
282 |
<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"; ?> />
|
283 |
</th>
|
284 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
337 |
if (!function_exists("nxs_getBackFBComments")) { function nxs_getBackFBComments($postID, $options, $po) { require_once ('apis/facebook.php'); if (empty($options['fbAppPageAuthToken'])) return;
|
338 |
$opts = array('access_token' => $options['fbAppPageAuthToken']);
|
339 |
$facebook = new NXS_Facebook(array( 'appId' => $options['fbAppID'], 'secret' => $options['fbAppSec'], 'cookie' => true )); $ci = 0;
|
340 |
+
$ret = $facebook->api($po['pgID']."/comments?filter=toplevel&limit=250", "GET", $opts);
|
341 |
$impCmnts = get_post_meta($postID, 'snapImportedFBComments', true); if (!is_array($impCmnts)) $impCmnts = array(); //prr($impCmnts);
|
342 |
if (is_array($ret) && is_array($ret['data'])) foreach ($ret['data'] as $comment){ $cid = $comment['id']; if (trim($cid)=='') continue;
|
343 |
if (!in_array('fbxcw'.$cid, $impCmnts)) { $authData = $facebook->api($comment['from']['id'], "GET", $opts);
|
421 |
if ($dsc=='') $dsc = trim(apply_filters('the_content', nxs_doQTrans($post->post_content, $lng))); if ($dsc=='') $dsc = trim(nxs_doQTrans($post->post_content, $lng));
|
422 |
if ($dsc=='') $dsc = get_bloginfo('description');
|
423 |
}
|
424 |
+
$dsc = strip_tags(strip_shortcodes($dsc)); $dsc = nxs_decodeEntitiesFull($dsc); $dsc = nsTrnc($dsc, 900, ' ');
|
425 |
}
|
426 |
|
427 |
$msg = str_replace('<br>', "\n", $msg); $msg = str_replace('<br/>', "\n", $msg); $msg = str_replace('<br />', "\n", $msg);
|
443 |
if (isset($options['urlToUse']) && trim($options['urlToUse'])!='') { $urlToGo = $options['urlToUse']; $options['useFBGURLInfo'] = true; } else $urlToGo = get_permalink($postID);
|
444 |
if($addParams!='') $urlToGo .= (strpos($urlToGo,'?')!==false?'&':'?').$addParams;
|
445 |
//prr($options);
|
446 |
+
$urlTitle = nxs_doQTrans($post->post_title, $lng); $options['fbMsgFormat'] = $msg; $urlTitle = strip_tags(strip_shortcodes($urlTitle));
|
447 |
} // prr($mssg); // prr($options); // prr($facebook); echo "/$page_id/feed";
|
448 |
|
449 |
$message = array('url'=>$urlToGo, 'urlTitle'=>$urlTitle, 'urlDescr'=>$dsc, 'imageURL'=>$imgURL, 'videoURL'=>$vidURL, 'siteName'=>$blogTitle);
|
inc-cl/ff.php
CHANGED
@@ -14,14 +14,14 @@ if (!class_exists("nxs_snapClassFF")) { class nxs_snapClassFF {
|
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
17 |
-
<p style="margin:0px;margin-left:5px;">
|
18 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
-
</p><?php
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php
|
@@ -43,7 +43,7 @@ if (!class_exists("nxs_snapClassFF")) { class nxs_snapClassFF {
|
|
43 |
<br/>
|
44 |
<ul class="nsx_tabs">
|
45 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
46 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
47 |
</ul>
|
48 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
49 |
<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%;">
|
@@ -75,35 +75,27 @@ if (!class_exists("nxs_snapClassFF")) { class nxs_snapClassFF {
|
|
75 |
|
76 |
?></div>
|
77 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
78 |
-
|
79 |
|
80 |
-
<?php
|
81 |
-
|
82 |
-
|
83 |
-
<input value="1" id="catSelS<?php echo $ntU; ?><?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 $ntU; ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo $ntU; ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo $ntU; ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
84 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
85 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
86 |
-
<br/>
|
87 |
-
<?php } ?>
|
88 |
-
|
89 |
-
<?php nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
90 |
-
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
91 |
|
92 |
|
93 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
94 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
95 |
|
96 |
-
<div class="submit
|
97 |
}
|
98 |
//#### Set Unit Settings from POST
|
99 |
-
function setNTSettings($post, $options){
|
100 |
foreach ($post as $ii => $pval){
|
101 |
if (isset($pval['apFFUName']) && $pval['apFFUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
102 |
if (isset($pval['apFFUName'])) $options[$ii]['ffUName'] = trim($pval['apFFUName']);
|
103 |
if (isset($pval['nName'])) $options[$ii]['nName'] = trim($pval['nName']);
|
104 |
if (isset($pval['apFFPass'])) $options[$ii]['ffPass'] = 'n5g9a'.nsx_doEncode($pval['apFFPass']); else $options[$ii]['ffPass'] = '';
|
105 |
|
106 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
107 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
108 |
|
109 |
if (isset($pval['apFFMsgFrmt'])) $options[$ii]['ffMsgFormat'] = trim($pval['apFFMsgFrmt']);
|
@@ -116,7 +108,7 @@ if (!class_exists("nxs_snapClassFF")) { class nxs_snapClassFF {
|
|
116 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
117 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
118 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
119 |
-
}
|
120 |
} return $options;
|
121 |
}
|
122 |
//#### Show Post->Edit Meta Box Settings
|
@@ -127,7 +119,9 @@ if (!class_exists("nxs_snapClassFF")) { class nxs_snapClassFF {
|
|
127 |
$isAvailFF = $ntOpt['ffUName']!='' && $ntOpt['ffPass']!=''; $ffMsgFormat = htmlentities($ntOpt['ffMsgFormat'], ENT_COMPAT, "UTF-8");
|
128 |
$isAttchImg = $ntOpt['attchImg'];
|
129 |
?>
|
130 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
131 |
<?php if ($isAvailFF) { ?><input class="nxsGrpDoChb" value="1" id="doFF<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="ff[<?php echo $ii; ?>][doFF]" <?php if ((int)$doFF == 1) echo 'checked="checked" title="def"'; ?> />
|
132 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="ff[<?php echo $ii; ?>][doFF]" value="<?php echo $doFF;?>"> <?php } ?> <?php } ?>
|
133 |
|
@@ -147,11 +141,11 @@ if (!class_exists("nxs_snapClassFF")) { class nxs_snapClassFF {
|
|
147 |
<input value="1" type="checkbox" name="ff[<?php echo $ii; ?>][attchImg]" <?php if ((int)$isAttchImg == 1) echo "checked"; ?> /> </th><td><strong>Attach Image to FriendFeed Post</strong></td> </tr>
|
148 |
|
149 |
<?php if (!$isAvailFF) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your FriendFeed Account to AutoPost to FriendFeed</b>
|
150 |
-
<?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $ntOpt); } ?>
|
151 |
|
152 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
153 |
|
154 |
-
<tr id="altFormat1" style=""><th scope="row"
|
155 |
<input value="0" type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>ff" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]" <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> />
|
156 |
</th>
|
157 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
@@ -159,7 +153,7 @@ if (!class_exists("nxs_snapClassFF")) { class nxs_snapClassFF {
|
|
159 |
|
160 |
|
161 |
<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:', 'nxs_snap') ?></th>
|
162 |
-
<td><input value="<?php echo $ffMsgFormat ?>" type="text" name="ff[<?php echo $ii; ?>][
|
163 |
<?php /* ## Select Image & URL ## */ nxs_showImgToUseDlg($nt, $ii, $imgToUse); ?>
|
164 |
<?php }
|
165 |
}
|
@@ -171,7 +165,7 @@ if (!class_exists("nxs_snapClassFF")) { class nxs_snapClassFF {
|
|
171 |
if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];
|
172 |
if (isset($pMeta['timeToRun'])) $optMt['timeToRun'] = $pMeta['timeToRun']; if (isset($pMeta['rpstPostIncl'])) $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];
|
173 |
if (isset($pMeta['doFF'])) $optMt['doFF'] = $pMeta['doFF'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doFF'] = 0; }
|
174 |
-
if (isset($pMeta['SNAPincludeFF']) && $pMeta['SNAPincludeFF'] == '1' ) $optMt['doFF'] = 1;
|
175 |
return $optMt;
|
176 |
}
|
177 |
}}
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
17 |
+
<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' />
|
18 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php
|
43 |
<br/>
|
44 |
<ul class="nsx_tabs">
|
45 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
46 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
47 |
</ul>
|
48 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
49 |
<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%;">
|
75 |
|
76 |
?></div>
|
77 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
78 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
79 |
|
80 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
81 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
82 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
|
85 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
86 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
87 |
|
88 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div></div><?php
|
89 |
}
|
90 |
//#### Set Unit Settings from POST
|
91 |
+
function setNTSettings($post, $options){ $code = 'FF'; $lcode = 'ff';
|
92 |
foreach ($post as $ii => $pval){
|
93 |
if (isset($pval['apFFUName']) && $pval['apFFUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
94 |
if (isset($pval['apFFUName'])) $options[$ii]['ffUName'] = trim($pval['apFFUName']);
|
95 |
if (isset($pval['nName'])) $options[$ii]['nName'] = trim($pval['nName']);
|
96 |
if (isset($pval['apFFPass'])) $options[$ii]['ffPass'] = 'n5g9a'.nsx_doEncode($pval['apFFPass']); else $options[$ii]['ffPass'] = '';
|
97 |
|
98 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
99 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
100 |
|
101 |
if (isset($pval['apFFMsgFrmt'])) $options[$ii]['ffMsgFormat'] = trim($pval['apFFMsgFrmt']);
|
108 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
109 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
110 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
111 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
112 |
} return $options;
|
113 |
}
|
114 |
//#### Show Post->Edit Meta Box Settings
|
119 |
$isAvailFF = $ntOpt['ffUName']!='' && $ntOpt['ffPass']!=''; $ffMsgFormat = htmlentities($ntOpt['ffMsgFormat'], ENT_COMPAT, "UTF-8");
|
120 |
$isAttchImg = $ntOpt['attchImg'];
|
121 |
?>
|
122 |
+
<tr><th style="text-align:left;" colspan="2">
|
123 |
+
<?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 } ?>
|
124 |
+
<?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 } ?>
|
125 |
<?php if ($isAvailFF) { ?><input class="nxsGrpDoChb" value="1" id="doFF<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="ff[<?php echo $ii; ?>][doFF]" <?php if ((int)$doFF == 1) echo 'checked="checked" title="def"'; ?> />
|
126 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="ff[<?php echo $ii; ?>][doFF]" value="<?php echo $doFF;?>"> <?php } ?> <?php } ?>
|
127 |
|
141 |
<input value="1" type="checkbox" name="ff[<?php echo $ii; ?>][attchImg]" <?php if ((int)$isAttchImg == 1) echo "checked"; ?> /> </th><td><strong>Attach Image to FriendFeed Post</strong></td> </tr>
|
142 |
|
143 |
<?php if (!$isAvailFF) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your FriendFeed Account to AutoPost to FriendFeed</b>
|
144 |
+
<?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); } ?>
|
145 |
|
146 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
147 |
|
148 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
149 |
<input value="0" type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>ff" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]" <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> />
|
150 |
</th>
|
151 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
153 |
|
154 |
|
155 |
<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:', 'nxs_snap') ?></th>
|
156 |
+
<td><input value="<?php echo $ffMsgFormat ?>" type="text" name="ff[<?php echo $ii; ?>][SNAPformat]" style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apFFMsgFrmt<?php echo $ii; ?>');"/><?php nxs_doShowHint("apFFMsgFrmt".$ii, '', '58'); ?></td></tr>
|
157 |
<?php /* ## Select Image & URL ## */ nxs_showImgToUseDlg($nt, $ii, $imgToUse); ?>
|
158 |
<?php }
|
159 |
}
|
165 |
if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];
|
166 |
if (isset($pMeta['timeToRun'])) $optMt['timeToRun'] = $pMeta['timeToRun']; if (isset($pMeta['rpstPostIncl'])) $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];
|
167 |
if (isset($pMeta['doFF'])) $optMt['doFF'] = $pMeta['doFF'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doFF'] = 0; }
|
168 |
+
if (isset($pMeta['SNAPincludeFF']) && $pMeta['SNAPincludeFF'] == '1' ) $optMt['doFF'] = 1;
|
169 |
return $optMt;
|
170 |
}
|
171 |
}}
|
inc-cl/gp.api.php
CHANGED
@@ -26,7 +26,7 @@ if (!class_exists("nxs_class_SNAP_GP")) { class nxs_class_SNAP_GP {
|
|
26 |
$loginError = doConnectToGooglePlus2($email, $pass); if ($loginError!==false) { $badOut['Error'] = print_r($loginError, true)." - BAD USER/PASS"; return $badOut; }
|
27 |
if ($gpPostType=='I') $lnk = array(); if ($gpPostType=='A') $lnk = doGetGoogleUrlInfo2($message['url']); if (is_array($lnk) && $imgURL!='') $lnk['img'] = $imgURL;
|
28 |
if (is_array($lnk) && $imgURL=='' && $message['noImg']===true) $lnk['img'] = ''; // prr($lnk); prr($message);
|
29 |
-
if ($gpPostType=='I' &&
|
30 |
if (!empty($options['gpPageID']) && empty($options['gpCommID'])) { $to = $options['gpPageID']; $ret = doPostToGooglePlus2($msg, $lnk, $to);}
|
31 |
elseif (!empty($options['gpCommID'])) $ret = doPostToGooglePlus2($msg, $lnk, $options['gpPageID'], $options['gpCommID'], $options['gpCCat']); else $ret = doPostToGooglePlus2($msg, $lnk);
|
32 |
if ( (!is_array($ret)) && $ret!='OK') { $badOut['Error'] = print_r($ret, true); } else { return array('isPosted'=>'1', 'postID'=>$ret['post_id'], 'postURL'=>'https://plus.google.com/'.$ret['post_id'], 'pDate'=>date('Y-m-d H:i:s')); }
|
26 |
$loginError = doConnectToGooglePlus2($email, $pass); if ($loginError!==false) { $badOut['Error'] = print_r($loginError, true)." - BAD USER/PASS"; return $badOut; }
|
27 |
if ($gpPostType=='I') $lnk = array(); if ($gpPostType=='A') $lnk = doGetGoogleUrlInfo2($message['url']); if (is_array($lnk) && $imgURL!='') $lnk['img'] = $imgURL;
|
28 |
if (is_array($lnk) && $imgURL=='' && $message['noImg']===true) $lnk['img'] = ''; // prr($lnk); prr($message);
|
29 |
+
if ($gpPostType=='I' && (!empty($message['videoURL']))) { $lnk['video'] = $message['videoURL']; }
|
30 |
if (!empty($options['gpPageID']) && empty($options['gpCommID'])) { $to = $options['gpPageID']; $ret = doPostToGooglePlus2($msg, $lnk, $to);}
|
31 |
elseif (!empty($options['gpCommID'])) $ret = doPostToGooglePlus2($msg, $lnk, $options['gpPageID'], $options['gpCommID'], $options['gpCCat']); else $ret = doPostToGooglePlus2($msg, $lnk);
|
32 |
if ( (!is_array($ret)) && $ret!='OK') { $badOut['Error'] = print_r($ret, true); } else { return array('isPosted'=>'1', 'postID'=>$ret['post_id'], 'postURL'=>'https://plus.google.com/'.$ret['post_id'], 'pDate'=>date('Y-m-d H:i:s')); }
|
inc-cl/gp.php
CHANGED
@@ -15,14 +15,14 @@ if (!class_exists("nxs_snapClassGP")) { class nxs_snapClassGP {
|
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php if(!function_exists('doPostToGooglePlus')) {?> 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+.
|
17 |
<?php } else foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
18 |
-
<p style="margin:0px;margin-left:5px;">
|
19 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
20 |
<?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 } ?>
|
21 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
22 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
23 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
24 |
<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', 'nxs_snap'); ?>]</a>
|
25 |
-
</p><?php
|
26 |
}?>
|
27 |
</div>
|
28 |
</div> <?php
|
@@ -45,7 +45,7 @@ if (!class_exists("nxs_snapClassGP")) { class nxs_snapClassGP {
|
|
45 |
<br/>
|
46 |
<ul class="nsx_tabs">
|
47 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
48 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
49 |
</ul>
|
50 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
51 |
<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%;">
|
@@ -104,30 +104,22 @@ if (!class_exists("nxs_snapClassGP")) { class nxs_snapClassGP {
|
|
104 |
|
105 |
</div>
|
106 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
107 |
-
|
108 |
|
109 |
-
<?php
|
110 |
-
|
111 |
-
|
112 |
-
<input value="1" id="catSelS<?php echo $ntU; ?><?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 $ntU; ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo $ntU; ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo $ntU; ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
113 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
114 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
115 |
-
<br/>
|
116 |
-
<?php } ?>
|
117 |
-
|
118 |
-
<?php nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
119 |
-
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
120 |
|
121 |
|
122 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
123 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
124 |
|
125 |
-
<div class="submit
|
126 |
|
127 |
<?php
|
128 |
}
|
129 |
//#### Set Unit Settings from POST
|
130 |
-
function setNTSettings($post, $options){
|
131 |
foreach ($post as $ii => $pval){
|
132 |
if (isset($pval['apGPUName']) && $pval['apGPUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
133 |
if (isset($pval['apGPUName'])) $options[$ii]['gpUName'] = trim($pval['apGPUName']);
|
@@ -136,7 +128,7 @@ if (!class_exists("nxs_snapClassGP")) { class nxs_snapClassGP {
|
|
136 |
if (isset($pval['apGPPage'])) $options[$ii]['gpPageID'] = trim($pval['apGPPage']);
|
137 |
if (isset($pval['gpCommID'])) $options[$ii]['gpCommID'] = trim($pval['gpCommID']);
|
138 |
|
139 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
140 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
141 |
|
142 |
if (isset($pval['apGPCCats'])) $options[$ii]['gpCCat'] = trim($pval['apGPCCats']);
|
@@ -148,7 +140,7 @@ if (!class_exists("nxs_snapClassGP")) { class nxs_snapClassGP {
|
|
148 |
if (isset($pval['apDoGP'])) $options[$ii]['doGP'] = $pval['apDoGP']; else $options[$ii]['doGP'] = 0;
|
149 |
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']);
|
150 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
151 |
-
}
|
152 |
} return $options;
|
153 |
}
|
154 |
//#### Show Post->Edit Meta Box Settings
|
@@ -162,7 +154,9 @@ if (!class_exists("nxs_snapClassGP")) { class nxs_snapClassGP {
|
|
162 |
if ((int)$ntOpt['gpAttch'] == 1 || $isNew) $ntOpt['postType'] = 'A';
|
163 |
} $gpPostType = $ntOpt['postType'];
|
164 |
?>
|
165 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
166 |
<?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"'; ?> />
|
167 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="gp[<?php echo $ii; ?>][doGP]" value="<?php echo $doGP;?>"> <?php } ?> <?php } ?>
|
168 |
|
@@ -179,14 +173,14 @@ if (!class_exists("nxs_snapClassGP")) { class nxs_snapClassGP {
|
|
179 |
</td></tr>
|
180 |
|
181 |
<?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>
|
182 |
-
<?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $ntOpt); }
|
183 |
|
184 |
if (((int)$doGP == 1) && $post->post_status == "publish" && isset($ntOpt['timeToRun']) && $ntOpt['timeToRun'] > time()) { ?> <tr><th style="text-align:left; color: purple;" colspan="2">
|
185 |
===>>>> <?php _e('Autopost has been schedulled for', 'nxs_snap') ?> <?php echo date('F j, Y, g:i a', $ntOpt['timeToRun']) ?></th> <?php } ?>
|
186 |
|
187 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
188 |
|
189 |
-
<tr id="altFormat1" style=""><th scope="row"
|
190 |
<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"; ?> />
|
191 |
</th>
|
192 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
@@ -277,7 +271,7 @@ if (!function_exists("nxs_doPublishToGP")) { //## Second Function to Post to G+
|
|
277 |
if (isset($options['urlToUse']) && trim($options['urlToUse'])!='') { $urlToGo = $options['urlToUse']; $options['useFBGURLInfo'] = true; } else $urlToGo = get_permalink($postID);
|
278 |
$gOptions = $plgn_NS_SNAutoPoster->nxs_options; $addURLParams = trim($gOptions['addURLParams']); if($addURLParams!='') $urlToGo .= (strpos($urlToGo,'?')!==false?'&':'?').$addURLParams;
|
279 |
|
280 |
-
$message = array('url'=>$urlToGo, 'imageURL'=>$imgURL, 'videoCode'=>$ytCode, 'noImg'=>$isNoImg);
|
281 |
}
|
282 |
//## Actual Post
|
283 |
$ntToPost = new nxs_class_SNAP_GP(); $ret = $ntToPost->doPostToNT($options, $message);
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php if(!function_exists('doPostToGooglePlus')) {?> 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+.
|
17 |
<?php } else foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
18 |
+
<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' />
|
19 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
20 |
<?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 } ?>
|
21 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
22 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
23 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
24 |
<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', 'nxs_snap'); ?>]</a>
|
25 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php // $pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
26 |
}?>
|
27 |
</div>
|
28 |
</div> <?php
|
45 |
<br/>
|
46 |
<ul class="nsx_tabs">
|
47 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
48 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
49 |
</ul>
|
50 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
51 |
<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%;">
|
104 |
|
105 |
</div>
|
106 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
107 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
108 |
|
109 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
110 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
111 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
|
113 |
|
114 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
115 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
116 |
|
117 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div> </div>
|
118 |
|
119 |
<?php
|
120 |
}
|
121 |
//#### Set Unit Settings from POST
|
122 |
+
function setNTSettings($post, $options){ $code = 'GP'; $lcode = 'gp';
|
123 |
foreach ($post as $ii => $pval){
|
124 |
if (isset($pval['apGPUName']) && $pval['apGPUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
125 |
if (isset($pval['apGPUName'])) $options[$ii]['gpUName'] = trim($pval['apGPUName']);
|
128 |
if (isset($pval['apGPPage'])) $options[$ii]['gpPageID'] = trim($pval['apGPPage']);
|
129 |
if (isset($pval['gpCommID'])) $options[$ii]['gpCommID'] = trim($pval['gpCommID']);
|
130 |
|
131 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
132 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
133 |
|
134 |
if (isset($pval['apGPCCats'])) $options[$ii]['gpCCat'] = trim($pval['apGPCCats']);
|
140 |
if (isset($pval['apDoGP'])) $options[$ii]['doGP'] = $pval['apDoGP']; else $options[$ii]['doGP'] = 0;
|
141 |
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']);
|
142 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
143 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
144 |
} return $options;
|
145 |
}
|
146 |
//#### Show Post->Edit Meta Box Settings
|
154 |
if ((int)$ntOpt['gpAttch'] == 1 || $isNew) $ntOpt['postType'] = 'A';
|
155 |
} $gpPostType = $ntOpt['postType'];
|
156 |
?>
|
157 |
+
<tr><th style="text-align:left;" colspan="2">
|
158 |
+
<?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 } ?>
|
159 |
+
<?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 } ?>
|
160 |
<?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"'; ?> />
|
161 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="gp[<?php echo $ii; ?>][doGP]" value="<?php echo $doGP;?>"> <?php } ?> <?php } ?>
|
162 |
|
173 |
</td></tr>
|
174 |
|
175 |
<?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>
|
176 |
+
<?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); }
|
177 |
|
178 |
if (((int)$doGP == 1) && $post->post_status == "publish" && isset($ntOpt['timeToRun']) && $ntOpt['timeToRun'] > time()) { ?> <tr><th style="text-align:left; color: purple;" colspan="2">
|
179 |
===>>>> <?php _e('Autopost has been schedulled for', 'nxs_snap') ?> <?php echo date('F j, Y, g:i a', $ntOpt['timeToRun']) ?></th> <?php } ?>
|
180 |
|
181 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
182 |
|
183 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
184 |
<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"; ?> />
|
185 |
</th>
|
186 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
271 |
if (isset($options['urlToUse']) && trim($options['urlToUse'])!='') { $urlToGo = $options['urlToUse']; $options['useFBGURLInfo'] = true; } else $urlToGo = get_permalink($postID);
|
272 |
$gOptions = $plgn_NS_SNAutoPoster->nxs_options; $addURLParams = trim($gOptions['addURLParams']); if($addURLParams!='') $urlToGo .= (strpos($urlToGo,'?')!==false?'&':'?').$addURLParams;
|
273 |
|
274 |
+
$message = array('url'=>$urlToGo, 'imageURL'=>$imgURL, 'videoCode'=>$ytCode, 'noImg'=>$isNoImg); //prr($message);
|
275 |
}
|
276 |
//## Actual Post
|
277 |
$ntToPost = new nxs_class_SNAP_GP(); $ret = $ntToPost->doPostToNT($options, $message);
|
inc-cl/ip.php
CHANGED
@@ -14,14 +14,14 @@ if (!class_exists("nxs_snapClassIP")) { class nxs_snapClassIP {
|
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
17 |
-
<p style="margin:0px;margin-left:5px;">
|
18 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
-
</p><?php
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php
|
@@ -42,7 +42,7 @@ if (!class_exists("nxs_snapClassIP")) { class nxs_snapClassIP {
|
|
42 |
<br/>
|
43 |
<ul class="nsx_tabs">
|
44 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
45 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
46 |
</ul>
|
47 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
48 |
<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%;">
|
@@ -76,35 +76,27 @@ if (!class_exists("nxs_snapClassIP")) { class nxs_snapClassIP {
|
|
76 |
|
77 |
?></div>
|
78 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
79 |
-
<div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
80 |
|
81 |
-
<?php
|
82 |
-
|
83 |
-
|
84 |
-
<input value="1" id="catSelS<?php echo $ntU; ?><?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 $ntU; ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo $ntU; ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo $ntU; ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
85 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
86 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
87 |
-
<br/>
|
88 |
-
<?php } ?>
|
89 |
-
|
90 |
-
<?php nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
91 |
-
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
92 |
|
93 |
|
94 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
95 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
96 |
|
97 |
-
<div class="submit
|
98 |
}
|
99 |
//#### Set Unit Settings from POST
|
100 |
-
function setNTSettings($post, $options){
|
101 |
foreach ($post as $ii => $pval){
|
102 |
if (isset($pval['apIPUName']) && $pval['apIPUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
103 |
if (isset($pval['apIPUName'])) $options[$ii]['ipUName'] = trim($pval['apIPUName']);
|
104 |
if (isset($pval['nName'])) $options[$ii]['nName'] = trim($pval['nName']);
|
105 |
if (isset($pval['apIPPass'])) $options[$ii]['ipPass'] = 'n5g9a'.nsx_doEncode($pval['apIPPass']); else $options[$ii]['ipPass'] = '';
|
106 |
|
107 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
108 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
109 |
|
110 |
if (isset($pval['apIPMsgFrmt'])) $options[$ii]['ipMsgFormat'] = trim($pval['apIPMsgFrmt']);
|
@@ -116,7 +108,7 @@ if (!class_exists("nxs_snapClassIP")) { class nxs_snapClassIP {
|
|
116 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
117 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
118 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
119 |
-
}
|
120 |
} return $options;
|
121 |
}
|
122 |
//#### Show Post->Edit Meta Box Settings
|
@@ -125,7 +117,9 @@ if (!class_exists("nxs_snapClassIP")) { class nxs_snapClassIP {
|
|
125 |
$doIP = $ntOpt['doIP'] && (is_array($pMeta) || $ntOpt['catSel']!='1');
|
126 |
$isAvailIP = $ntOpt['ipUName']!='' && $ntOpt['ipPass']!=''; $ipMsgFormat = htmlentities($ntOpt['ipMsgFormat'], ENT_COMPAT, "UTF-8"); $ipMsgTFormat = htmlentities($ntOpt['ipMsgTFormat'], ENT_COMPAT, "UTF-8");
|
127 |
?>
|
128 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
129 |
<?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"'; ?> />
|
130 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="ip[<?php echo $ii; ?>][doIP]" value="<?php echo $doIP;?>"> <?php } ?> <?php } ?>
|
131 |
|
@@ -141,11 +135,11 @@ if (!class_exists("nxs_snapClassIP")) { class nxs_snapClassIP {
|
|
141 |
</td></tr>
|
142 |
|
143 |
<?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>
|
144 |
-
<?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $ntOpt); } ?>
|
145 |
|
146 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
147 |
|
148 |
-
<tr id="altFormat1" style=""><th scope="row"
|
149 |
<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"; ?> />
|
150 |
</th>
|
151 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
17 |
+
<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' />
|
18 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php
|
42 |
<br/>
|
43 |
<ul class="nsx_tabs">
|
44 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
45 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
46 |
</ul>
|
47 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
48 |
<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%;">
|
76 |
|
77 |
?></div>
|
78 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
79 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
80 |
|
81 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
82 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
83 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
|
86 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
87 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
88 |
|
89 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div></div><?php
|
90 |
}
|
91 |
//#### Set Unit Settings from POST
|
92 |
+
function setNTSettings($post, $options){ $code = 'IP'; $lcode = 'ip';
|
93 |
foreach ($post as $ii => $pval){
|
94 |
if (isset($pval['apIPUName']) && $pval['apIPUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
95 |
if (isset($pval['apIPUName'])) $options[$ii]['ipUName'] = trim($pval['apIPUName']);
|
96 |
if (isset($pval['nName'])) $options[$ii]['nName'] = trim($pval['nName']);
|
97 |
if (isset($pval['apIPPass'])) $options[$ii]['ipPass'] = 'n5g9a'.nsx_doEncode($pval['apIPPass']); else $options[$ii]['ipPass'] = '';
|
98 |
|
99 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
100 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
101 |
|
102 |
if (isset($pval['apIPMsgFrmt'])) $options[$ii]['ipMsgFormat'] = trim($pval['apIPMsgFrmt']);
|
108 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
109 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
110 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
111 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
112 |
} return $options;
|
113 |
}
|
114 |
//#### Show Post->Edit Meta Box Settings
|
117 |
$doIP = $ntOpt['doIP'] && (is_array($pMeta) || $ntOpt['catSel']!='1');
|
118 |
$isAvailIP = $ntOpt['ipUName']!='' && $ntOpt['ipPass']!=''; $ipMsgFormat = htmlentities($ntOpt['ipMsgFormat'], ENT_COMPAT, "UTF-8"); $ipMsgTFormat = htmlentities($ntOpt['ipMsgTFormat'], ENT_COMPAT, "UTF-8");
|
119 |
?>
|
120 |
+
<tr><th style="text-align:left;" colspan="2">
|
121 |
+
<?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 } ?>
|
122 |
+
<?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 } ?>
|
123 |
<?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"'; ?> />
|
124 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="ip[<?php echo $ii; ?>][doIP]" value="<?php echo $doIP;?>"> <?php } ?> <?php } ?>
|
125 |
|
135 |
</td></tr>
|
136 |
|
137 |
<?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>
|
138 |
+
<?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); } ?>
|
139 |
|
140 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
141 |
|
142 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
143 |
<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"; ?> />
|
144 |
</th>
|
145 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
inc-cl/li.php
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
<?php
|
2 |
|
3 |
if (isset($_GET['ca']) && $_GET['ca']!='') { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://www.google.com/recaptcha/api/image?c='.$_GET['ca']);
|
4 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_REFERER, 'https://www.google.com/'); $
|
5 |
-
if ($imageData === false) { echo 'Curl error: ' . curl_error($ch); die(); }
|
6 |
header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
|
7 |
header("Cache-Control: private",false); header("Content-Type: image/jpg"); header("Content-Transfer-Encoding: binary"); echo $imageData; die();
|
8 |
}
|
9 |
|
10 |
add_action('wp_ajax_nxsCptCheck' , 'nxsCptCheck_ajax');
|
11 |
-
if (!function_exists("nxsCptCheck_ajax")) { function nxsCptCheck_ajax() { global $nxs_gCookiesArr;
|
12 |
-
if ($_POST['c']
|
13 |
$flds['recaptcha_response_field'] = $_POST['c']; $cfldsTxt = build_http_query($flds); // prr($cfldsTxt); prr($nxs_gCookiesArr);
|
14 |
$contents2 = getCurlPageX('https://www.linkedin.com/uas/captcha-submit','https://www.linkedin.com/uas/login-submit', false, $cfldsTxt, false, $advSettings); // prr($contents2);
|
15 |
if (stripos($contents2['content'], 'The email address or password you provided does not match our records')!==false) { echo "Invalid Login/Password"; die(); }
|
@@ -21,7 +21,23 @@ if (!function_exists("nxsCptCheck_ajax")) { function nxsCptCheck_ajax() { global
|
|
21 |
$options['li'][$_POST['i']]['uCook'] = $nxs_gCookiesArr; if (is_array($options)) update_option('NS_SNAutoPoster', $options);
|
22 |
}
|
23 |
}
|
24 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
}}
|
26 |
|
27 |
//## NextScripts Facebook Connection Class
|
@@ -34,12 +50,12 @@ function nxs_ntp_time($host='time.nist.gov') { $sock = socket_create(AF_INET, SO
|
|
34 |
|
35 |
if (!class_exists("nxs_snapClassLI")) { class nxs_snapClassLI {
|
36 |
//#### Show Common Settings
|
37 |
-
function showGenNTSettings($ntOpts){ global $
|
38 |
|
39 |
if ( isset($_GET['auth']) && $_GET['auth']=='li'){ require_once('apis/liOAuth.php'); $options = $ntOpts[$_GET['acc']];
|
40 |
|
41 |
$api_key = $options['liAPIKey']; $api_secret = $options['liAPISec'];
|
42 |
-
$callback_url = $
|
43 |
$li_oauth = new nsx_LinkedIn($api_key, $api_secret, $callback_url);
|
44 |
$request_token = $li_oauth->getRequestToken(); //echo "####"; prr($request_token); die();
|
45 |
if (!is_object($request_token)) { echo "### LinkedIn Authorization Error:"; prr($request_token);
|
@@ -59,7 +75,7 @@ if (!class_exists("nxs_snapClassLI")) { class nxs_snapClassLI {
|
|
59 |
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>");}
|
60 |
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='';
|
61 |
if ($userinfo!='') { $options['liUserInfo'] = $userinfo; $optionsG = get_option('NS_SNAutoPoster'); $optionsG['li'][$_GET['acc']] = $options; update_option('NS_SNAutoPoster', $optionsG);
|
62 |
-
echo '<script type="text/javascript">window.location = "'.$
|
63 |
} prr($xml_response); die("<span style='color:red;'>ERROR: Something is Wrong with your LinkedIn account</span>");
|
64 |
}
|
65 |
|
@@ -75,14 +91,14 @@ if (!class_exists("nxs_snapClassLI")) { class nxs_snapClassLI {
|
|
75 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']];
|
76 |
if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['liAccessToken']) && $pbo['liAccessTokenSecret']!='')?'1':'';
|
77 |
?>
|
78 |
-
<p style="margin:0px;margin-left:5px;">
|
79 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
80 |
<?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 } ?>
|
81 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
82 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
83 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
84 |
<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', 'nxs_snap'); ?>]</a>
|
85 |
-
</p><?php
|
86 |
}?>
|
87 |
</div>
|
88 |
</div> <?php
|
@@ -90,7 +106,8 @@ if (!class_exists("nxs_snapClassLI")) { class nxs_snapClassLI {
|
|
90 |
//#### Show NEW Settings Page
|
91 |
function showNewNTSettings($bo){ $po = array('nName'=>'', 'ulName'=>'', 'uPass'=>'', 'grpID'=>'', 'uPage'=>'', 'doLI'=>'1', 'liAPIKey'=>'', 'liAPISec'=>'', 'liUserInfo'=>'', 'liAttch'=>'1', 'liOAuthToken'=>'', 'liMsgFormat'=>'New post has been published on %SITENAME%', 'liMsgFormatT'=>'New post - %TITLE%' ); $po['ntInfo']= array('lcode'=>'li'); $this->showNTSettings($bo, $po, true);}
|
92 |
//#### Show Unit Settings
|
93 |
-
function showNTSettings($ii, $options, $isNew=false){ global $nxs_plurl,$
|
|
|
94 |
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'] = '';
|
95 |
if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['liMsgAFrmt'])) $options['liMsgAFrmt'] = ''; ?>
|
96 |
<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; ?>" />
|
@@ -105,7 +122,7 @@ if (!class_exists("nxs_snapClassLI")) { class nxs_snapClassLI {
|
|
105 |
<br/>
|
106 |
<ul class="nsx_tabs">
|
107 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
108 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
109 |
</ul>
|
110 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
111 |
<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%;">
|
@@ -131,7 +148,7 @@ if (!class_exists("nxs_snapClassLI")) { class nxs_snapClassLI {
|
|
131 |
<?php } else { if(isset($options['liAccessToken']) && isset($options['liAccessTokenSecret']) && $options['liAccessTokenSecret']!=='') { ?>
|
132 |
Your LinkedIn Account has been authorized. <br/>User ID: <?php _e(apply_filters('format_to_edit', $options['liUserInfo']), 'nxs_snap') ?>.
|
133 |
<br/>You can Re- <?php } ?>
|
134 |
-
<a href="<?php echo $
|
135 |
|
136 |
<?php if (!isset($options['liAccessTokenSecret']) || $options['liAccessTokenSecret']=='') { ?> <div class="blnkg"><=== Authorize your account ===</div> <?php } ?>
|
137 |
|
@@ -202,25 +219,17 @@ if (!class_exists("nxs_snapClassLI")) { class nxs_snapClassLI {
|
|
202 |
</div>
|
203 |
|
204 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
205 |
-
|
206 |
-
|
207 |
-
<?php if (!$isNew) { ?> <div class="nxs_tls_cpt"><?php _e('Categories', 'nxs_snap'); ?></div>
|
208 |
-
<div style="width:100%;"><strong><?php _e('Categories', 'nxs_snap'); ?>:</strong>
|
209 |
-
<input value="0" id="catSelA<?php echo $ii; ?>" type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSel]" <?php if ((int)$options['catSel'] != 1) echo "checked"; ?> /> All
|
210 |
-
<input value="1" id="catSelS<?php echo $ntU; ?><?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 $ntU; ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo $ntU; ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo $ntU; ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
211 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
212 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
213 |
-
<br/>
|
214 |
-
<?php } ?>
|
215 |
|
216 |
-
<?php
|
217 |
-
|
|
|
218 |
|
219 |
|
220 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
221 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
222 |
|
223 |
-
<div class="submit
|
224 |
|
225 |
</div>
|
226 |
</div>
|
@@ -229,8 +238,8 @@ if (!class_exists("nxs_snapClassLI")) { class nxs_snapClassLI {
|
|
229 |
|
230 |
}
|
231 |
//#### Set Unit Settings from POST
|
232 |
-
function setNTSettings($post, $options){
|
233 |
-
foreach ($post as $ii => $pval){ // prr($pval);
|
234 |
if ( (isset($pval['apLIAPIKey']) && $pval['apLIAPISec']!='') || (isset($pval['uPass']) && $pval['uPass']!='') ) { if (!isset($options[$ii])) $options[$ii] = array(); $options[$ii]['ii'] = $ii;
|
235 |
if (isset($pval['apDoLI'])) $options[$ii]['doLI'] = $pval['apDoLI']; else $options[$ii]['doLI'] = 0;
|
236 |
if (isset($pval['nName'])) $options[$ii]['nName'] = trim($pval['nName']);
|
@@ -238,7 +247,7 @@ if (!class_exists("nxs_snapClassLI")) { class nxs_snapClassLI {
|
|
238 |
if (isset($pval['apLIAPISec']))$options[$ii]['liAPISec'] = trim($pval['apLIAPISec']);
|
239 |
if (isset($pval['apLIAttch'])) $options[$ii]['liAttch'] = $pval['apLIAttch']; else $options[$ii]['liAttch'] = 0;
|
240 |
|
241 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
242 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
243 |
|
244 |
if (isset($pval['ulName'])) $options[$ii]['ulName'] = trim($pval['ulName']);
|
@@ -254,37 +263,39 @@ if (!class_exists("nxs_snapClassLI")) { class nxs_snapClassLI {
|
|
254 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
255 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
256 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
257 |
-
}
|
258 |
} return $options;
|
259 |
}
|
260 |
//#### Show Post->Edit Meta Box Settings
|
261 |
function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'li'; $ntU = 'LI';
|
262 |
-
foreach($ntOpts as $ii=>$
|
263 |
-
if (empty($
|
264 |
-
$doLI = $
|
265 |
-
$isAvailLI = (isset($
|
266 |
-
$isAttachLI = $
|
267 |
?>
|
268 |
|
269 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
270 |
<?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"'; ?> />
|
271 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="li[<?php echo $ii; ?>][doLI]" value="<?php echo $doLI;?>"> <?php } ?> <?php } ?>
|
272 |
-
<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', 'nxs_snap') ?> (<i style="color: #005800;"><?php echo $
|
273 |
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', 'nxs_snap') ?>" />
|
274 |
<?php } ?>
|
275 |
|
276 |
<?php if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) { // prr($pMeta[$ii]);
|
277 |
?> <span id="pstdLI<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">
|
278 |
-
<a style="font-size: 10px;" href="<?php if ( $pMeta[$ii]['pgID']!='') echo $pMeta[$ii]['pgID']; elseif ($
|
279 |
</span><?php } ?>
|
280 |
|
281 |
</td></tr>
|
282 |
<?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>
|
283 |
-
<?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $
|
284 |
|
285 |
-
<?php if ($
|
286 |
|
287 |
-
<tr id="altFormat1" style=""><th scope="row"
|
288 |
<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"; ?> />
|
289 |
</th>
|
290 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
1 |
<?php
|
2 |
|
3 |
if (isset($_GET['ca']) && $_GET['ca']!='') { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://www.google.com/recaptcha/api/image?c='.$_GET['ca']);
|
4 |
+
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);
|
5 |
+
$imageData = curl_exec($ch); if ($imageData === false) { echo 'Curl error: ' . curl_error($ch); die(); }
|
6 |
header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
|
7 |
header("Cache-Control: private",false); header("Content-Type: image/jpg"); header("Content-Transfer-Encoding: binary"); echo $imageData; die();
|
8 |
}
|
9 |
|
10 |
add_action('wp_ajax_nxsCptCheck' , 'nxsCptCheck_ajax');
|
11 |
+
if (!function_exists("nxsCptCheck_ajax")) { function nxsCptCheck_ajax() { global $nxs_gCookiesArr; $advSettings = array();
|
12 |
+
if (!empty($_POST['c'])) { $seForDB = get_option('nxs_li_ctp_save'); $ser = maybe_unserialize($seForDB); $nxs_gCookiesArr = $ser['c']; $flds = $ser['f'];
|
13 |
$flds['recaptcha_response_field'] = $_POST['c']; $cfldsTxt = build_http_query($flds); // prr($cfldsTxt); prr($nxs_gCookiesArr);
|
14 |
$contents2 = getCurlPageX('https://www.linkedin.com/uas/captcha-submit','https://www.linkedin.com/uas/login-submit', false, $cfldsTxt, false, $advSettings); // prr($contents2);
|
15 |
if (stripos($contents2['content'], 'The email address or password you provided does not match our records')!==false) { echo "Invalid Login/Password"; die(); }
|
21 |
$options['li'][$_POST['i']]['uCook'] = $nxs_gCookiesArr; if (is_array($options)) update_option('NS_SNAutoPoster', $options);
|
22 |
}
|
23 |
}
|
24 |
+
}
|
25 |
+
if (!empty($_POST['s'])) { $seForDB = get_option('nxs_li_ctp_save'); $ser = maybe_unserialize($seForDB); $nxs_gCookiesArr = $ser['c']; $flds = $ser['f'];
|
26 |
+
$flds['PinVerificationForm_pinParam'] = $_POST['s']; $cfldsTxt = build_http_query($flds); // prr($cfldsTxt); prr($nxs_gCookiesArr);
|
27 |
+
$contents2 = getCurlPageX('https://www.linkedin.com/uas/ato-pin-challenge-submit','https://www.linkedin.com/uas/login-submit', false, $cfldsTxt, false, $advSettings); // prr($contents2);
|
28 |
+
if (stripos($contents2['content'], 'The email address or password you provided does not match our records')!==false) { echo "Invalid Login/Password"; die(); }
|
29 |
+
if (stripos($contents2['content'], '<div id="global-error">')!==false) { echo CutFromTo($contents2['content'], '<div role="alert" class="alert error">', '</div>'); die(); }
|
30 |
+
if (stripos($contents2['content'], 'Hmm, ')!==false) { echo "Invalid Login/Password"; die(); }
|
31 |
+
if (stripos($contents2['url'], 'linkedin.com/uas/ato-pin-challenge-submit')!==false) echo "Wrong Code. Please try Again";
|
32 |
+
if (stripos($contents2['url'], 'linkedin.com/home')!==false) { echo "OK. You are In";
|
33 |
+
$contents3 = getCurlPageX('http://www.linkedin.com/profile/edit?trk=tab_pro', 'http://www.linkedin.com/home', false, '', false, $advSettings); // prr($contents3);
|
34 |
+
if ($_POST['i']!='') { global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;
|
35 |
+
$options['li'][$_POST['i']]['uCook'] = $nxs_gCookiesArr; if (is_array($options)) update_option('NS_SNAutoPoster', $options);
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
die();
|
41 |
}}
|
42 |
|
43 |
//## NextScripts Facebook Connection Class
|
50 |
|
51 |
if (!class_exists("nxs_snapClassLI")) { class nxs_snapClassLI {
|
52 |
//#### Show Common Settings
|
53 |
+
function showGenNTSettings($ntOpts){ global $nxs_snapSetPgURL, $nxs_plurl; $ntInfo = array('code'=>'LI', 'lcode'=>'li', 'name'=>'LinkedIn', 'defNName'=>'ulName', 'tstReq' => true);
|
54 |
|
55 |
if ( isset($_GET['auth']) && $_GET['auth']=='li'){ require_once('apis/liOAuth.php'); $options = $ntOpts[$_GET['acc']];
|
56 |
|
57 |
$api_key = $options['liAPIKey']; $api_secret = $options['liAPISec'];
|
58 |
+
$callback_url = $nxs_snapSetPgURL."&auth=lia&acc=".$_GET['acc'];
|
59 |
$li_oauth = new nsx_LinkedIn($api_key, $api_secret, $callback_url);
|
60 |
$request_token = $li_oauth->getRequestToken(); //echo "####"; prr($request_token); die();
|
61 |
if (!is_object($request_token)) { echo "### LinkedIn Authorization Error:"; prr($request_token);
|
75 |
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>");}
|
76 |
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='';
|
77 |
if ($userinfo!='') { $options['liUserInfo'] = $userinfo; $optionsG = get_option('NS_SNAutoPoster'); $optionsG['li'][$_GET['acc']] = $options; update_option('NS_SNAutoPoster', $optionsG);
|
78 |
+
echo '<script type="text/javascript">window.location = "'.$nxs_snapSetPgURL.'"</script>'; die();
|
79 |
} prr($xml_response); die("<span style='color:red;'>ERROR: Something is Wrong with your LinkedIn account</span>");
|
80 |
}
|
81 |
|
91 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']];
|
92 |
if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['liAccessToken']) && $pbo['liAccessTokenSecret']!='')?'1':'';
|
93 |
?>
|
94 |
+
<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' />
|
95 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
96 |
<?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 } ?>
|
97 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
98 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
99 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
100 |
<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', 'nxs_snap'); ?>]</a>
|
101 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
102 |
}?>
|
103 |
</div>
|
104 |
</div> <?php
|
106 |
//#### Show NEW Settings Page
|
107 |
function showNewNTSettings($bo){ $po = array('nName'=>'', 'ulName'=>'', 'uPass'=>'', 'grpID'=>'', 'uPage'=>'', 'doLI'=>'1', 'liAPIKey'=>'', 'liAPISec'=>'', 'liUserInfo'=>'', 'liAttch'=>'1', 'liOAuthToken'=>'', 'liMsgFormat'=>'New post has been published on %SITENAME%', 'liMsgFormatT'=>'New post - %TITLE%' ); $po['ntInfo']= array('lcode'=>'li'); $this->showNTSettings($bo, $po, true);}
|
108 |
//#### Show Unit Settings
|
109 |
+
function showNTSettings($ii, $options, $isNew=false){ global $nxs_plurl,$nxs_snapSetPgURL; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['liOK'])) $options['liOK'] = '';
|
110 |
+
|
111 |
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'] = '';
|
112 |
if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['liMsgAFrmt'])) $options['liMsgAFrmt'] = ''; ?>
|
113 |
<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; ?>" />
|
122 |
<br/>
|
123 |
<ul class="nsx_tabs">
|
124 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
125 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
126 |
</ul>
|
127 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
128 |
<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%;">
|
148 |
<?php } else { if(isset($options['liAccessToken']) && isset($options['liAccessTokenSecret']) && $options['liAccessTokenSecret']!=='') { ?>
|
149 |
Your LinkedIn Account has been authorized. <br/>User ID: <?php _e(apply_filters('format_to_edit', $options['liUserInfo']), 'nxs_snap') ?>.
|
150 |
<br/>You can Re- <?php } ?>
|
151 |
+
<a href="<?php echo $nxs_snapSetPgURL; ?>&auth=li&acc=<?php echo $ii; ?>">Authorize Your LinkedIn Account</a>
|
152 |
|
153 |
<?php if (!isset($options['liAccessTokenSecret']) || $options['liAccessTokenSecret']=='') { ?> <div class="blnkg"><=== Authorize your account ===</div> <?php } ?>
|
154 |
|
219 |
</div>
|
220 |
|
221 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
222 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
|
224 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
225 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
226 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
227 |
|
228 |
|
229 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
230 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
231 |
|
232 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div>
|
233 |
|
234 |
</div>
|
235 |
</div>
|
238 |
|
239 |
}
|
240 |
//#### Set Unit Settings from POST
|
241 |
+
function setNTSettings($post, $options){ //prr($post);
|
242 |
+
foreach ($post as $ii => $pval){ // prr($ii); prr($pval);
|
243 |
if ( (isset($pval['apLIAPIKey']) && $pval['apLIAPISec']!='') || (isset($pval['uPass']) && $pval['uPass']!='') ) { if (!isset($options[$ii])) $options[$ii] = array(); $options[$ii]['ii'] = $ii;
|
244 |
if (isset($pval['apDoLI'])) $options[$ii]['doLI'] = $pval['apDoLI']; else $options[$ii]['doLI'] = 0;
|
245 |
if (isset($pval['nName'])) $options[$ii]['nName'] = trim($pval['nName']);
|
247 |
if (isset($pval['apLIAPISec']))$options[$ii]['liAPISec'] = trim($pval['apLIAPISec']);
|
248 |
if (isset($pval['apLIAttch'])) $options[$ii]['liAttch'] = $pval['apLIAttch']; else $options[$ii]['liAttch'] = 0;
|
249 |
|
250 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
251 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
252 |
|
253 |
if (isset($pval['ulName'])) $options[$ii]['ulName'] = trim($pval['ulName']);
|
263 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
264 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
265 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
266 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
267 |
} return $options;
|
268 |
}
|
269 |
//#### Show Post->Edit Meta Box Settings
|
270 |
function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'li'; $ntU = 'LI';
|
271 |
+
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]);
|
272 |
+
if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = ''; if (empty($ntOpt['urlToUse'])) $ntOpt['urlToUse'] = ''; if (empty($ntOpt['catSel'])) $ntOpt['catSel'] = '';
|
273 |
+
$doLI = $ntOpt['doLI'] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse']; $urlToUse = $ntOpt['urlToUse'];
|
274 |
+
$isAvailLI = (isset($ntOpt['liOAuthVerifier']) && $ntOpt['liOAuthVerifier']!='' && $ntOpt['liAccessTokenSecret']!='' && $ntOpt['liAccessToken']!='' && $ntOpt['liAPIKey']!='') || ($ntOpt['ulName']!=='' && $ntOpt['uPass']!=='');
|
275 |
+
$isAttachLI = $ntOpt['liAttch']; $liMsgFormat = htmlentities($ntOpt['liMsgFormat'], ENT_COMPAT, "UTF-8"); $liMsgFormatT = htmlentities($ntOpt['liMsgFormatT'], ENT_COMPAT, "UTF-8");
|
276 |
?>
|
277 |
|
278 |
+
<tr><th style="text-align:left;" colspan="2">
|
279 |
+
<?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 } ?>
|
280 |
+
<?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 } ?>
|
281 |
<?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"'; ?> />
|
282 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="li[<?php echo $ii; ?>][doLI]" value="<?php echo $doLI;?>"> <?php } ?> <?php } ?>
|
283 |
+
<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', 'nxs_snap') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th><td><?php //## Only show RePost button if the post is "published"
|
284 |
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', 'nxs_snap') ?>" />
|
285 |
<?php } ?>
|
286 |
|
287 |
<?php if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) { // prr($pMeta[$ii]);
|
288 |
?> <span id="pstdLI<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">
|
289 |
+
<a style="font-size: 10px;" href="<?php if ( $pMeta[$ii]['pgID']!='') echo $pMeta[$ii]['pgID']; elseif ($ntOpt['uPage']!='') echo $ntOpt['uPage']; else { } ?>" target="_blank"><?php $nType="LinkedIn"; printf( __( 'Posted on', 'nxs_snap' ), $nType); ?> <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>
|
290 |
</span><?php } ?>
|
291 |
|
292 |
</td></tr>
|
293 |
<?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>
|
294 |
+
<?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); } ?>
|
295 |
|
296 |
+
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
297 |
|
298 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
299 |
<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"; ?> />
|
300 |
</th>
|
301 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
inc-cl/lj.php
CHANGED
@@ -14,14 +14,14 @@ if (!class_exists("nxs_snapClassLJ")) { class nxs_snapClassLJ {
|
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('/xmlrpc.php','', str_ireplace('http://','', str_ireplace('https://','', $pbo['ljURL']))); ?>
|
17 |
-
<p style="margin:0px;margin-left:5px;">
|
18 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
-
</p><?php
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php
|
@@ -43,7 +43,7 @@ if (!class_exists("nxs_snapClassLJ")) { class nxs_snapClassLJ {
|
|
43 |
<br/>
|
44 |
<ul class="nsx_tabs">
|
45 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
46 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
47 |
</ul>
|
48 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
49 |
<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%;">
|
@@ -86,28 +86,20 @@ if (!class_exists("nxs_snapClassLJ")) { class nxs_snapClassLJ {
|
|
86 |
<b><?php _e('Test your settings', 'nxs_snap'); ?>:</b> <a href="#" class="NXSButton" onclick="testPost('LJ', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'nxs_snap' ), $nType); ?></a> <?php } ?>
|
87 |
</div>
|
88 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
89 |
-
|
90 |
|
91 |
-
<?php
|
92 |
-
|
93 |
-
|
94 |
-
<input value="1" id="catSelS<?php echo $ntU; ?><?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 $ntU; ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo $ntU; ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo $ntU; ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
95 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
96 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
97 |
-
<br/>
|
98 |
-
<?php } ?>
|
99 |
-
|
100 |
-
<?php nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
101 |
-
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
102 |
|
103 |
|
104 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
105 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
106 |
|
107 |
-
<div class="submit
|
108 |
}
|
109 |
//#### Set Unit Settings from POST
|
110 |
-
function setNTSettings($post, $options){
|
111 |
foreach ($post as $ii => $pval){
|
112 |
if (isset($pval['apLJUName']) && $pval['apLJUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
113 |
if (isset($pval['nName'])) $options[$ii]['nName'] = trim($pval['nName']);
|
@@ -116,7 +108,7 @@ if (!class_exists("nxs_snapClassLJ")) { class nxs_snapClassLJ {
|
|
116 |
if (isset($pval['apLJPass'])) $options[$ii]['ljPass'] = 'n5g9a'.nsx_doEncode($pval['apLJPass']); else $options[$ii]['ljPass'] = '';
|
117 |
if (isset($pval['apLJMsgFrmt'])) $options[$ii]['ljMsgFormat'] = trim($pval['apLJMsgFrmt']);
|
118 |
if (isset($pval['apLJMsgTFrmt'])) $options[$ii]['ljMsgTFormat'] = trim($pval['apLJMsgTFrmt']);
|
119 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
120 |
if (isset($pval['inclTags'])) $options[$ii]['inclTags'] = $pval['inclTags']; else $options[$ii]['inclTags'] = 0;
|
121 |
|
122 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
@@ -132,7 +124,7 @@ if (!class_exists("nxs_snapClassLJ")) { class nxs_snapClassLJ {
|
|
132 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
133 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
134 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
135 |
-
}
|
136 |
} return $options;
|
137 |
}
|
138 |
//#### Show Post->Edit Meta Box Settings
|
@@ -141,7 +133,9 @@ if (!class_exists("nxs_snapClassLJ")) { class nxs_snapClassLJ {
|
|
141 |
$doLJ = $ntOpt['doLJ'] && (is_array($pMeta) || $ntOpt['catSel']!='1');
|
142 |
$isAvailLJ = $ntOpt['ljUName']!='' && $ntOpt['ljPass']!=''; $ljMsgFormat = htmlentities($ntOpt['ljMsgFormat'], ENT_COMPAT, "UTF-8"); $ljMsgTFormat = htmlentities($ntOpt['ljMsgTFormat'], ENT_COMPAT, "UTF-8");
|
143 |
?>
|
144 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
145 |
<?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"'; ?> />
|
146 |
|
147 |
|
@@ -158,11 +152,11 @@ if (!class_exists("nxs_snapClassLJ")) { class nxs_snapClassLJ {
|
|
158 |
</td></tr>
|
159 |
|
160 |
<?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>
|
161 |
-
<?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $ntOpt); } ?>
|
162 |
|
163 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
164 |
|
165 |
-
<tr id="altFormat1" style=""><th scope="row"
|
166 |
<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"; ?> />
|
167 |
</th>
|
168 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('/xmlrpc.php','', str_ireplace('http://','', str_ireplace('https://','', $pbo['ljURL']))); ?>
|
17 |
+
<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' />
|
18 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php
|
43 |
<br/>
|
44 |
<ul class="nsx_tabs">
|
45 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
46 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
47 |
</ul>
|
48 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
49 |
<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%;">
|
86 |
<b><?php _e('Test your settings', 'nxs_snap'); ?>:</b> <a href="#" class="NXSButton" onclick="testPost('LJ', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'nxs_snap' ), $nType); ?></a> <?php } ?>
|
87 |
</div>
|
88 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
89 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
90 |
|
91 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
92 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
93 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
|
96 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
97 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
98 |
|
99 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div></div><?php
|
100 |
}
|
101 |
//#### Set Unit Settings from POST
|
102 |
+
function setNTSettings($post, $options){ $code = 'LJ'; $lcode = 'lj';
|
103 |
foreach ($post as $ii => $pval){
|
104 |
if (isset($pval['apLJUName']) && $pval['apLJUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
105 |
if (isset($pval['nName'])) $options[$ii]['nName'] = trim($pval['nName']);
|
108 |
if (isset($pval['apLJPass'])) $options[$ii]['ljPass'] = 'n5g9a'.nsx_doEncode($pval['apLJPass']); else $options[$ii]['ljPass'] = '';
|
109 |
if (isset($pval['apLJMsgFrmt'])) $options[$ii]['ljMsgFormat'] = trim($pval['apLJMsgFrmt']);
|
110 |
if (isset($pval['apLJMsgTFrmt'])) $options[$ii]['ljMsgTFormat'] = trim($pval['apLJMsgTFrmt']);
|
111 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
112 |
if (isset($pval['inclTags'])) $options[$ii]['inclTags'] = $pval['inclTags']; else $options[$ii]['inclTags'] = 0;
|
113 |
|
114 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
124 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
125 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
126 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
127 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
128 |
} return $options;
|
129 |
}
|
130 |
//#### Show Post->Edit Meta Box Settings
|
133 |
$doLJ = $ntOpt['doLJ'] && (is_array($pMeta) || $ntOpt['catSel']!='1');
|
134 |
$isAvailLJ = $ntOpt['ljUName']!='' && $ntOpt['ljPass']!=''; $ljMsgFormat = htmlentities($ntOpt['ljMsgFormat'], ENT_COMPAT, "UTF-8"); $ljMsgTFormat = htmlentities($ntOpt['ljMsgTFormat'], ENT_COMPAT, "UTF-8");
|
135 |
?>
|
136 |
+
<tr><th style="text-align:left;" colspan="2">
|
137 |
+
<?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 } ?>
|
138 |
+
<?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 } ?>
|
139 |
<?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"'; ?> />
|
140 |
|
141 |
|
152 |
</td></tr>
|
153 |
|
154 |
<?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>
|
155 |
+
<?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); } ?>
|
156 |
|
157 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
158 |
|
159 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
160 |
<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"; ?> />
|
161 |
</th>
|
162 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
inc-cl/pk.php
CHANGED
@@ -6,10 +6,10 @@ if (!class_exists("nxs_snapClassPK")) { class nxs_snapClassPK {
|
|
6 |
|
7 |
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>';}
|
8 |
//#### Show Common Settings
|
9 |
-
function showGenNTSettings($ntOpts){ global $
|
10 |
if ( isset($_GET['auth']) && $_GET['auth']=='pk'){ require_once('apis/plurkOAuth.php'); $options = $ntOpts[$_GET['acc']];
|
11 |
$consumer_key = $options['pkConsKey']; $consumer_secret = $options['pkConsSec'];
|
12 |
-
$callback_url = $
|
13 |
|
14 |
$tum_oauth = new wpPlurkOAuth($consumer_key, $consumer_secret); //prr($tum_oauth);
|
15 |
$request_token = $tum_oauth->getReqToken($callback_url);
|
@@ -40,7 +40,7 @@ if (!class_exists("nxs_snapClassPK")) { class nxs_snapClassPK {
|
|
40 |
|
41 |
$options['pkPgID'] = $userinfo; $optionsG = get_option('NS_SNAutoPoster'); $optionsG['pk'][$_GET['acc']] = $options; update_option('NS_SNAutoPoster', $optionsG);
|
42 |
|
43 |
-
if ($options['pkPgID']!='') { echo '<br/><br/>All good?! Redirecting ..... <script type="text/javascript">window.location = "'.$
|
44 |
else die("<span style='color:red;'>ERROR: Authorization Error: <span style='color:darkred; font-weight: bold;'>".$options['pkPgID']."</span></span>");
|
45 |
}
|
46 |
global $nxs_plurl; ?>
|
@@ -54,14 +54,14 @@ if (!class_exists("nxs_snapClassPK")) { class nxs_snapClassPK {
|
|
54 |
<div class="nxs_box_inside">
|
55 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('https://','', str_ireplace('http://','', $pbo['pkURL']));
|
56 |
if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['pkOAuthTokenSecret']) && $pbo['pkOAuthTokenSecret']!='')?'1':''; ?>
|
57 |
-
<p style="margin:0px;margin-left:5px;">
|
58 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
59 |
<?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 } ?>
|
60 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
61 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
62 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
63 |
<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', 'nxs_snap'); ?>]</a>
|
64 |
-
</p><?php
|
65 |
}?>
|
66 |
</div>
|
67 |
</div> <?php
|
@@ -69,7 +69,7 @@ if (!class_exists("nxs_snapClassPK")) { class nxs_snapClassPK {
|
|
69 |
//#### Show NEW Settings Page
|
70 |
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);}
|
71 |
//#### Show Unit Settings
|
72 |
-
function showNTSettings($ii, $options, $isNew=false){ global $nxs_plurl,$
|
73 |
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'] = '';
|
74 |
if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['attchImg'])) $options['attchImg'] = ''; ?>
|
75 |
<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; ?>" />
|
@@ -83,7 +83,7 @@ if (!class_exists("nxs_snapClassPK")) { class nxs_snapClassPK {
|
|
83 |
<br/>
|
84 |
<ul class="nsx_tabs">
|
85 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
86 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
87 |
</ul>
|
88 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
89 |
<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%;">
|
@@ -120,7 +120,7 @@ if (!class_exists("nxs_snapClassPK")) { class nxs_snapClassPK {
|
|
120 |
<?php } else { if(isset($options['pkAccessTocken']) && isset($options['pkAccessTocken']['oauth_token_secret']) && $options['pkAccessTocken']['oauth_token_secret']!=='') { ?>
|
121 |
Your Plurk Account has been authorized. Your display name: <?php _e(apply_filters('format_to_edit', htmlentities($options['pkPgID'], ENT_COMPAT, "UTF-8")), 'nxs_snap') ?>.
|
122 |
You can Re- <?php } ?>
|
123 |
-
<a href="<?php echo $
|
124 |
<?php if (!isset($options['pkOAuthTokenSecret']) || $options['pkOAuthTokenSecret']=='') { ?> <div class="blnkg"><=== Authorize your account ===</div> <?php } ?>
|
125 |
<?php } ?>
|
126 |
|
@@ -131,25 +131,17 @@ if (!class_exists("nxs_snapClassPK")) { class nxs_snapClassPK {
|
|
131 |
<?php }?>
|
132 |
</div>
|
133 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
134 |
-
|
135 |
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
<input value="1" id="catSelS<?php echo $ntU; ?><?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 $ntU; ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo $ntU; ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo $ntU; ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
140 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
141 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
142 |
-
<br/>
|
143 |
-
<?php } ?>
|
144 |
-
|
145 |
-
<?php nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
146 |
-
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
147 |
|
148 |
|
149 |
-
</div>
|
150 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
151 |
|
152 |
-
<div class="submit
|
153 |
|
154 |
</div>
|
155 |
<?php
|
@@ -157,7 +149,7 @@ if (!class_exists("nxs_snapClassPK")) { class nxs_snapClassPK {
|
|
157 |
|
158 |
}
|
159 |
//#### Set Unit Settings from POST
|
160 |
-
function setNTSettings($post, $options){
|
161 |
foreach ($post as $ii => $pval){ // prr($pval);
|
162 |
if (isset($pval['apPKConsKey']) && $pval['apPKConsSec']!='') { if (!isset($options[$ii])) $options[$ii] = array();
|
163 |
|
@@ -170,7 +162,7 @@ if (!class_exists("nxs_snapClassPK")) { class nxs_snapClassPK {
|
|
170 |
if (isset($pval['apPKConsKey'])) $options[$ii]['pkConsKey'] = trim($pval['apPKConsKey']);
|
171 |
if (isset($pval['apPKConsSec'])) $options[$ii]['pkConsSec'] = trim($pval['apPKConsSec']);
|
172 |
|
173 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
174 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
175 |
|
176 |
if (isset($pval['apPKMsgFrmt'])) $options[$ii]['pkMsgFormat'] = trim($pval['apPKMsgFrmt']);
|
@@ -182,21 +174,23 @@ if (!class_exists("nxs_snapClassPK")) { class nxs_snapClassPK {
|
|
182 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
183 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
184 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
185 |
-
}
|
186 |
} return $options;
|
187 |
}
|
188 |
//#### Show Post->Edit Meta Box Settings
|
189 |
function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'pk'; $ntU = 'PK';
|
190 |
-
foreach($ntOpts as $ii=>$
|
191 |
-
$doPK = $
|
192 |
-
$isAvailPK = isset($
|
193 |
-
$pkMsgFormat = htmlentities($
|
194 |
?>
|
195 |
|
196 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
197 |
<?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"'; ?> />
|
198 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="pk[<?php echo $ii; ?>][doPK]" value="<?php echo $doPK;?>"> <?php } ?> <?php } ?>
|
199 |
-
<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', 'nxs_snap') ?> (<i style="color: #005800;"><?php echo $
|
200 |
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', 'nxs_snap') ?>" />
|
201 |
<?php } ?>
|
202 |
|
@@ -207,11 +201,11 @@ if (!class_exists("nxs_snapClassPK")) { class nxs_snapClassPK {
|
|
207 |
|
208 |
</td></tr>
|
209 |
<?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>
|
210 |
-
<?php }else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $
|
211 |
|
212 |
-
<?php if ($
|
213 |
|
214 |
-
<tr id="altFormat1" style=""><th scope="row"
|
215 |
<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"; ?> />
|
216 |
</th>
|
217 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
@@ -223,12 +217,12 @@ if (!class_exists("nxs_snapClassPK")) { class nxs_snapClassPK {
|
|
223 |
</th>
|
224 |
<td><select name="pk[<?php echo $ii; ?>][Cat]" id="apPKCat<?php echo $ii; ?>">
|
225 |
<?php $pkCats = $this->pkCats();
|
226 |
-
if ($
|
227 |
|
228 |
?>
|
229 |
</select></td></tr>
|
230 |
|
231 |
-
<tr id="altFormat1" style=""><th scope="row"
|
232 |
<td>
|
233 |
<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>
|
234 |
<?php nxs_doShowHint("apPKMsgFrmt".$ii); ?></td></tr>
|
6 |
|
7 |
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>';}
|
8 |
//#### Show Common Settings
|
9 |
+
function showGenNTSettings($ntOpts){ global $nxs_snapSetPgURL, $nxs_plurl; $ntInfo = array('code'=>'PK', 'lcode'=>'pk', 'name'=>'Plurk', 'defNName'=>'', 'tstReq' => true);
|
10 |
if ( isset($_GET['auth']) && $_GET['auth']=='pk'){ require_once('apis/plurkOAuth.php'); $options = $ntOpts[$_GET['acc']];
|
11 |
$consumer_key = $options['pkConsKey']; $consumer_secret = $options['pkConsSec'];
|
12 |
+
$callback_url = $nxs_snapSetPgURL."&auth=pka&acc=".$_GET['acc'];
|
13 |
|
14 |
$tum_oauth = new wpPlurkOAuth($consumer_key, $consumer_secret); //prr($tum_oauth);
|
15 |
$request_token = $tum_oauth->getReqToken($callback_url);
|
40 |
|
41 |
$options['pkPgID'] = $userinfo; $optionsG = get_option('NS_SNAutoPoster'); $optionsG['pk'][$_GET['acc']] = $options; update_option('NS_SNAutoPoster', $optionsG);
|
42 |
|
43 |
+
if ($options['pkPgID']!='') { echo '<br/><br/>All good?! Redirecting ..... <script type="text/javascript">window.location = "'.$nxs_snapSetPgURL.'"</script>'; break; die();}
|
44 |
else die("<span style='color:red;'>ERROR: Authorization Error: <span style='color:darkred; font-weight: bold;'>".$options['pkPgID']."</span></span>");
|
45 |
}
|
46 |
global $nxs_plurl; ?>
|
54 |
<div class="nxs_box_inside">
|
55 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('https://','', str_ireplace('http://','', $pbo['pkURL']));
|
56 |
if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['pkOAuthTokenSecret']) && $pbo['pkOAuthTokenSecret']!='')?'1':''; ?>
|
57 |
+
<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' />
|
58 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
59 |
<?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 } ?>
|
60 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
61 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
62 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
63 |
<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', 'nxs_snap'); ?>]</a>
|
64 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
65 |
}?>
|
66 |
</div>
|
67 |
</div> <?php
|
69 |
//#### Show NEW Settings Page
|
70 |
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);}
|
71 |
//#### Show Unit Settings
|
72 |
+
function showNTSettings($ii, $options, $isNew=false){ global $nxs_plurl,$nxs_snapSetPgURL; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt);
|
73 |
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'] = '';
|
74 |
if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['attchImg'])) $options['attchImg'] = ''; ?>
|
75 |
<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; ?>" />
|
83 |
<br/>
|
84 |
<ul class="nsx_tabs">
|
85 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
86 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
87 |
</ul>
|
88 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
89 |
<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%;">
|
120 |
<?php } else { if(isset($options['pkAccessTocken']) && isset($options['pkAccessTocken']['oauth_token_secret']) && $options['pkAccessTocken']['oauth_token_secret']!=='') { ?>
|
121 |
Your Plurk Account has been authorized. Your display name: <?php _e(apply_filters('format_to_edit', htmlentities($options['pkPgID'], ENT_COMPAT, "UTF-8")), 'nxs_snap') ?>.
|
122 |
You can Re- <?php } ?>
|
123 |
+
<a href="<?php echo $nxs_snapSetPgURL;?>&auth=pk&acc=<?php echo $ii; ?>">Authorize Your Plurk Account</a>
|
124 |
<?php if (!isset($options['pkOAuthTokenSecret']) || $options['pkOAuthTokenSecret']=='') { ?> <div class="blnkg"><=== Authorize your account ===</div> <?php } ?>
|
125 |
<?php } ?>
|
126 |
|
131 |
<?php }?>
|
132 |
</div>
|
133 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
134 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
135 |
|
136 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
137 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
138 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
|
140 |
|
141 |
+
</div> <?php } ?><?php /* #### End of Tab #### */ ?>
|
142 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
143 |
|
144 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div>
|
145 |
|
146 |
</div>
|
147 |
<?php
|
149 |
|
150 |
}
|
151 |
//#### Set Unit Settings from POST
|
152 |
+
function setNTSettings($post, $options){
|
153 |
foreach ($post as $ii => $pval){ // prr($pval);
|
154 |
if (isset($pval['apPKConsKey']) && $pval['apPKConsSec']!='') { if (!isset($options[$ii])) $options[$ii] = array();
|
155 |
|
162 |
if (isset($pval['apPKConsKey'])) $options[$ii]['pkConsKey'] = trim($pval['apPKConsKey']);
|
163 |
if (isset($pval['apPKConsSec'])) $options[$ii]['pkConsSec'] = trim($pval['apPKConsSec']);
|
164 |
|
165 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
166 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
167 |
|
168 |
if (isset($pval['apPKMsgFrmt'])) $options[$ii]['pkMsgFormat'] = trim($pval['apPKMsgFrmt']);
|
174 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
175 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
176 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
177 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
178 |
} return $options;
|
179 |
}
|
180 |
//#### Show Post->Edit Meta Box Settings
|
181 |
function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'pk'; $ntU = 'PK';
|
182 |
+
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]);
|
183 |
+
$doPK = $ntOpt['doPK'] && (is_array($pMeta) || $ntOpt['catSel']!='1');
|
184 |
+
$isAvailPK = isset($ntOpt['pkAccessTocken']) && isset($ntOpt['pkAccessTocken']['oauth_token_secret']) && $ntOpt['pkAccessTocken']['oauth_token_secret']!=='';
|
185 |
+
$pkMsgFormat = htmlentities($ntOpt['pkMsgFormat'], ENT_COMPAT, "UTF-8");
|
186 |
?>
|
187 |
|
188 |
+
<tr><th style="text-align:left;" colspan="2">
|
189 |
+
<?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 } ?>
|
190 |
+
<?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 } ?>
|
191 |
<?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"'; ?> />
|
192 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="pk[<?php echo $ii; ?>][doPK]" value="<?php echo $doPK;?>"> <?php } ?> <?php } ?>
|
193 |
+
<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', 'nxs_snap') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>) </div></th><td><?php //## Only show RePost button if the post is "published"
|
194 |
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', 'nxs_snap') ?>" />
|
195 |
<?php } ?>
|
196 |
|
201 |
|
202 |
</td></tr>
|
203 |
<?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>
|
204 |
+
<?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); } ?>
|
205 |
|
206 |
+
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
207 |
|
208 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
209 |
<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"; ?> />
|
210 |
</th>
|
211 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
217 |
</th>
|
218 |
<td><select name="pk[<?php echo $ii; ?>][Cat]" id="apPKCat<?php echo $ii; ?>">
|
219 |
<?php $pkCats = $this->pkCats();
|
220 |
+
if ($ntOpt['pkCat']!='') $pkCats = str_replace($ntOpt['pkCat'].'"', $ntOpt['pkCat'].'" selected="selected"', $pkCats); echo $pkCats;
|
221 |
|
222 |
?>
|
223 |
</select></td></tr>
|
224 |
|
225 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"><?php _e('Text Format:', 'nxs_snap') ?></th>
|
226 |
<td>
|
227 |
<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>
|
228 |
<?php nxs_doShowHint("apPKMsgFrmt".$ii); ?></td></tr>
|
inc-cl/pn.php
CHANGED
@@ -15,14 +15,14 @@ if (!class_exists("nxs_snapClassPN")) { class nxs_snapClassPN {
|
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php if(!function_exists('doPostToPinterest')) {?> 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.
|
17 |
<?php } else foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
18 |
-
<p style="margin:0px;margin-left:5px;">
|
19 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
20 |
<?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 } ?>
|
21 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
22 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
23 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
24 |
<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', 'nxs_snap'); ?>]</a>
|
25 |
-
</p><?php
|
26 |
} ?>
|
27 |
</div>
|
28 |
</div> <?php
|
@@ -50,7 +50,7 @@ if (!class_exists("nxs_snapClassPN")) { class nxs_snapClassPN {
|
|
50 |
<br/>
|
51 |
<ul class="nsx_tabs">
|
52 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
53 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
54 |
</ul>
|
55 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
56 |
<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%;">
|
@@ -103,32 +103,24 @@ if (!class_exists("nxs_snapClassPN")) { class nxs_snapClassPN {
|
|
103 |
|
104 |
</div>
|
105 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
106 |
-
|
107 |
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
<input value="1" id="catSelS<?php echo $ntU; ?><?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 $ntU; ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo $ntU; ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo $ntU; ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
112 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
113 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
114 |
-
<br/>
|
115 |
-
<?php } ?>
|
116 |
-
|
117 |
-
<?php nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
118 |
-
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
119 |
|
120 |
|
121 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
122 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
123 |
|
124 |
-
<div class="submit
|
125 |
|
126 |
</div>
|
127 |
</div>
|
128 |
<?php
|
129 |
}
|
130 |
//#### Set Unit Settings from POST
|
131 |
-
function setNTSettings($post, $options){
|
132 |
foreach ($post as $ii => $pval){
|
133 |
if (isset($pval['apPNUName']) && $pval['apPNUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
134 |
if (isset($pval['apDoPN'])) $options[$ii]['doPN'] = $pval['apDoPN']; else $options[$ii]['doPN'] = 0;
|
@@ -140,7 +132,7 @@ if (!class_exists("nxs_snapClassPN")) { class nxs_snapClassPN {
|
|
140 |
if (isset($pval['isAttachVid'])) $options[$ii]['isAttachVid'] = $pval['isAttachVid']; else $options[$ii]['isAttachVid'] = 0;
|
141 |
if (isset($pval['cImgURL'])) $options[$ii]['cImgURL'] = trim($pval['cImgURL']);
|
142 |
|
143 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
144 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
145 |
|
146 |
if (isset($pval['apPNMsgFrmt'])) $options[$ii]['pnMsgFormat'] = trim($pval['apPNMsgFrmt']);
|
@@ -150,7 +142,7 @@ if (!class_exists("nxs_snapClassPN")) { class nxs_snapClassPN {
|
|
150 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
151 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
152 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
153 |
-
}
|
154 |
} return $options;
|
155 |
}
|
156 |
//#### Show Post->Edit Meta Box Settings
|
@@ -160,7 +152,9 @@ if (!class_exists("nxs_snapClassPN")) { class nxs_snapClassPN {
|
|
160 |
$doPN = $ntOpt['doPN'] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse']; $urlToUse = $ntOpt['urlToUse'];
|
161 |
$isAvailPN = $ntOpt['pnUName']!='' && $ntOpt['pnPass']!=''; $pnMsgFormat = htmlentities($ntOpt['pnMsgFormat'], ENT_COMPAT, "UTF-8");
|
162 |
?>
|
163 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
164 |
<?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"'; ?> />
|
165 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="pn[<?php echo $ii; ?>][doPN]" value="<?php echo $doPN;?>"> <?php } ?> <?php } ?>
|
166 |
<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', 'nxs_snap') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"
|
@@ -175,11 +169,11 @@ if (!class_exists("nxs_snapClassPN")) { class nxs_snapClassPN {
|
|
175 |
</td></tr>
|
176 |
|
177 |
<?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>
|
178 |
-
<?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $ntOpt); } ?>
|
179 |
|
180 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
181 |
|
182 |
-
<tr id="altFormat1" style=""><th scope="row"
|
183 |
<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"; ?> />
|
184 |
</th>
|
185 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
@@ -194,7 +188,7 @@ if (!class_exists("nxs_snapClassPN")) { class nxs_snapClassPN {
|
|
194 |
</select></td>
|
195 |
</tr>
|
196 |
|
197 |
-
<tr id="altFormat1" style=""><th scope="row"
|
198 |
<td>
|
199 |
<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>
|
200 |
<?php nxs_doShowHint("apPNMsgFrmt".$ii); ?></td></tr>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php if(!function_exists('doPostToPinterest')) {?> 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.
|
17 |
<?php } else foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
18 |
+
<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' />
|
19 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
20 |
<?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 } ?>
|
21 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
22 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
23 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
24 |
<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', 'nxs_snap'); ?>]</a>
|
25 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
26 |
} ?>
|
27 |
</div>
|
28 |
</div> <?php
|
50 |
<br/>
|
51 |
<ul class="nsx_tabs">
|
52 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
53 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
54 |
</ul>
|
55 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
56 |
<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%;">
|
103 |
|
104 |
</div>
|
105 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
106 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
107 |
|
108 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
109 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
110 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
|
112 |
|
113 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
114 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
115 |
|
116 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div>
|
117 |
|
118 |
</div>
|
119 |
</div>
|
120 |
<?php
|
121 |
}
|
122 |
//#### Set Unit Settings from POST
|
123 |
+
function setNTSettings($post, $options){
|
124 |
foreach ($post as $ii => $pval){
|
125 |
if (isset($pval['apPNUName']) && $pval['apPNUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
126 |
if (isset($pval['apDoPN'])) $options[$ii]['doPN'] = $pval['apDoPN']; else $options[$ii]['doPN'] = 0;
|
132 |
if (isset($pval['isAttachVid'])) $options[$ii]['isAttachVid'] = $pval['isAttachVid']; else $options[$ii]['isAttachVid'] = 0;
|
133 |
if (isset($pval['cImgURL'])) $options[$ii]['cImgURL'] = trim($pval['cImgURL']);
|
134 |
|
135 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
136 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
137 |
|
138 |
if (isset($pval['apPNMsgFrmt'])) $options[$ii]['pnMsgFormat'] = trim($pval['apPNMsgFrmt']);
|
142 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
143 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
144 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
145 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
146 |
} return $options;
|
147 |
}
|
148 |
//#### Show Post->Edit Meta Box Settings
|
152 |
$doPN = $ntOpt['doPN'] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse']; $urlToUse = $ntOpt['urlToUse'];
|
153 |
$isAvailPN = $ntOpt['pnUName']!='' && $ntOpt['pnPass']!=''; $pnMsgFormat = htmlentities($ntOpt['pnMsgFormat'], ENT_COMPAT, "UTF-8");
|
154 |
?>
|
155 |
+
<tr><th style="text-align:left;" colspan="2">
|
156 |
+
<?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 } ?>
|
157 |
+
<?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 } ?>
|
158 |
<?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"'; ?> />
|
159 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="pn[<?php echo $ii; ?>][doPN]" value="<?php echo $doPN;?>"> <?php } ?> <?php } ?>
|
160 |
<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', 'nxs_snap') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"
|
169 |
</td></tr>
|
170 |
|
171 |
<?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>
|
172 |
+
<?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); } ?>
|
173 |
|
174 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
175 |
|
176 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
177 |
<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"; ?> />
|
178 |
</th>
|
179 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
188 |
</select></td>
|
189 |
</tr>
|
190 |
|
191 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"><?php _e('Text Message Format:', 'nxs_snap') ?></th>
|
192 |
<td>
|
193 |
<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>
|
194 |
<?php nxs_doShowHint("apPNMsgFrmt".$ii); ?></td></tr>
|
inc-cl/rd.php
CHANGED
@@ -15,14 +15,14 @@ if (!class_exists("nxs_snapClassRD")) { class nxs_snapClassRD {
|
|
15 |
<div class="nxs_box_inside">
|
16 |
<?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.
|
17 |
<?php } else foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
18 |
-
<p style="margin:0px;margin-left:5px;">
|
19 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
20 |
<?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 } ?>
|
21 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
22 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
23 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
24 |
<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', 'nxs_snap'); ?>]</a>
|
25 |
-
</p><?php
|
26 |
}?>
|
27 |
</div>
|
28 |
</div> <?php
|
@@ -50,7 +50,7 @@ if (!class_exists("nxs_snapClassRD")) { class nxs_snapClassRD {
|
|
50 |
<br/>
|
51 |
<ul class="nsx_tabs">
|
52 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
53 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
54 |
</ul>
|
55 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
56 |
<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%;">
|
@@ -105,33 +105,22 @@ if (!class_exists("nxs_snapClassRD")) { class nxs_snapClassRD {
|
|
105 |
</div>
|
106 |
|
107 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
108 |
-
<div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
109 |
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
<input value="1" id="catSelS<?php echo $ntU; ?><?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 $ntU; ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo $ntU; ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo $ntU; ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
114 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
115 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
116 |
-
<br/>
|
117 |
-
<?php } ?>
|
118 |
-
|
119 |
-
<div class="nxs_tls_cpt"><?php _e('Posting Delay', 'nxs_snap'); ?></div>
|
120 |
-
<div class="nxs_tls_bd">
|
121 |
-
<?php echo nxs_addPostingDelaySel($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
122 |
-
</div>
|
123 |
-
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
124 |
|
125 |
|
126 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
127 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
128 |
|
129 |
-
<div class="submit
|
130 |
|
131 |
</div><?php
|
132 |
}
|
133 |
//#### Set Unit Settings from POST
|
134 |
-
function setNTSettings($post, $options){
|
135 |
foreach ($post as $ii => $pval){
|
136 |
if (isset($pval['uName']) && $pval['uName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
137 |
if (isset($pval['uName'])) $options[$ii]['rdUName'] = trim($pval['uName']);
|
@@ -146,7 +135,7 @@ if (!class_exists("nxs_snapClassRD")) { class nxs_snapClassRD {
|
|
146 |
|
147 |
if (isset($pval['rdSubReddit'])) $options[$ii]['rdSubReddit'] = trim($pval['rdSubReddit']);
|
148 |
|
149 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
150 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
151 |
|
152 |
if (isset($pval['postType'])) $options[$ii]['postType'] = $pval['postType'];
|
@@ -160,7 +149,7 @@ if (!class_exists("nxs_snapClassRD")) { class nxs_snapClassRD {
|
|
160 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
161 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
162 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
163 |
-
}
|
164 |
} return $options;
|
165 |
}
|
166 |
//#### Show Post->Edit Meta Box Settings
|
@@ -170,7 +159,9 @@ if (!class_exists("nxs_snapClassRD")) { class nxs_snapClassRD {
|
|
170 |
$isAvailRD = $ntOpt['rdUName']!='' && $ntOpt['rdPass']!=''; $rdMsgFormat = htmlentities($ntOpt['rdTextFormat'], ENT_COMPAT, "UTF-8"); $rdMsgTFormat = htmlentities($ntOpt['rdTitleFormat'], ENT_COMPAT, "UTF-8");
|
171 |
$rdPostType = $ntOpt['postType'];
|
172 |
?>
|
173 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
174 |
<?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"'; ?> />
|
175 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="rd[<?php echo $ii; ?>][doRD]" value="<?php echo $doRD;?>"> <?php } ?> <?php } ?>
|
176 |
|
@@ -187,11 +178,11 @@ if (!class_exists("nxs_snapClassRD")) { class nxs_snapClassRD {
|
|
187 |
</td></tr>
|
188 |
|
189 |
<?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>
|
190 |
-
<?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $ntOpt); } ?>
|
191 |
|
192 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
193 |
|
194 |
-
<tr id="altFormat1" style=""><th scope="row"
|
195 |
<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"; ?> />
|
196 |
</th>
|
197 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?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.
|
17 |
<?php } else foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
18 |
+
<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' />
|
19 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
20 |
<?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 } ?>
|
21 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
22 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
23 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
24 |
<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', 'nxs_snap'); ?>]</a>
|
25 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
26 |
}?>
|
27 |
</div>
|
28 |
</div> <?php
|
50 |
<br/>
|
51 |
<ul class="nsx_tabs">
|
52 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
53 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
54 |
</ul>
|
55 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
56 |
<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%;">
|
105 |
</div>
|
106 |
|
107 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
108 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
109 |
|
110 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
111 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
112 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
|
114 |
|
115 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
116 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
117 |
|
118 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div>
|
119 |
|
120 |
</div><?php
|
121 |
}
|
122 |
//#### Set Unit Settings from POST
|
123 |
+
function setNTSettings($post, $options){ $code = 'RD'; $lcode = 'rd';
|
124 |
foreach ($post as $ii => $pval){
|
125 |
if (isset($pval['uName']) && $pval['uName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
126 |
if (isset($pval['uName'])) $options[$ii]['rdUName'] = trim($pval['uName']);
|
135 |
|
136 |
if (isset($pval['rdSubReddit'])) $options[$ii]['rdSubReddit'] = trim($pval['rdSubReddit']);
|
137 |
|
138 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
139 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
140 |
|
141 |
if (isset($pval['postType'])) $options[$ii]['postType'] = $pval['postType'];
|
149 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
150 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
151 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
152 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
153 |
} return $options;
|
154 |
}
|
155 |
//#### Show Post->Edit Meta Box Settings
|
159 |
$isAvailRD = $ntOpt['rdUName']!='' && $ntOpt['rdPass']!=''; $rdMsgFormat = htmlentities($ntOpt['rdTextFormat'], ENT_COMPAT, "UTF-8"); $rdMsgTFormat = htmlentities($ntOpt['rdTitleFormat'], ENT_COMPAT, "UTF-8");
|
160 |
$rdPostType = $ntOpt['postType'];
|
161 |
?>
|
162 |
+
<tr><th style="text-align:left;" colspan="2">
|
163 |
+
<?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 } ?>
|
164 |
+
<?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 } ?>
|
165 |
<?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"'; ?> />
|
166 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="rd[<?php echo $ii; ?>][doRD]" value="<?php echo $doRD;?>"> <?php } ?> <?php } ?>
|
167 |
|
178 |
</td></tr>
|
179 |
|
180 |
<?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>
|
181 |
+
<?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); } ?>
|
182 |
|
183 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
184 |
|
185 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
186 |
<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"; ?> />
|
187 |
</th>
|
188 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
inc-cl/su.php
CHANGED
@@ -14,14 +14,14 @@ if (!class_exists("nxs_snapClassSU")) { class nxs_snapClassSU {
|
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
17 |
-
<p style="margin:0px;margin-left:5px;">
|
18 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
-
</p><?php
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php
|
@@ -44,7 +44,7 @@ if (!class_exists("nxs_snapClassSU")) { class nxs_snapClassSU {
|
|
44 |
<br/>
|
45 |
<ul class="nsx_tabs">
|
46 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
47 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
48 |
</ul>
|
49 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
50 |
<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%;">
|
@@ -89,28 +89,20 @@ if (!class_exists("nxs_snapClassSU")) { class nxs_snapClassSU {
|
|
89 |
|
90 |
?></div>
|
91 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
92 |
-
|
93 |
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
<input value="1" id="catSelS<?php echo $ntU; ?><?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 $ntU; ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo $ntU; ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo $ntU; ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
98 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
99 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
100 |
-
<br/>
|
101 |
-
<?php } ?>
|
102 |
-
|
103 |
-
<?php nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
104 |
-
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
105 |
|
106 |
|
107 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
108 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
109 |
|
110 |
-
<div class="submit
|
111 |
}
|
112 |
//#### Set Unit Settings from POST
|
113 |
-
function setNTSettings($post, $options){
|
114 |
foreach ($post as $ii => $pval){
|
115 |
if (isset($pval['apSUUName']) && $pval['apSUUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
116 |
|
@@ -125,7 +117,7 @@ if (!class_exists("nxs_snapClassSU")) { class nxs_snapClassSU {
|
|
125 |
if (isset($pval['suInclTags'])) $options[$ii]['suInclTags'] = $pval['suInclTags']; else $options[$ii]['suInclTags'] = 0;
|
126 |
if (isset($pval['apSUMsgFrmt'])) $options[$ii]['suMsgFormat'] = trim($pval['apSUMsgFrmt']);
|
127 |
|
128 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
129 |
if (!empty($options[$ii]['catSel']) && $options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
130 |
|
131 |
if (isset($pval['apDoSU'])) $options[$ii]['doSU'] = $pval['apDoSU']; else $options[$ii]['doSU'] = 0;
|
@@ -136,7 +128,7 @@ if (!class_exists("nxs_snapClassSU")) { class nxs_snapClassSU {
|
|
136 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
137 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
138 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
139 |
-
}
|
140 |
} return $options;
|
141 |
}
|
142 |
//#### Show Post->Edit Meta Box Settings
|
@@ -145,7 +137,9 @@ if (!class_exists("nxs_snapClassSU")) { class nxs_snapClassSU {
|
|
145 |
$doSU = $ntOpt['doSU'] && (is_array($pMeta) || $ntOpt['catSel']!='1');
|
146 |
$isAvailSU = $ntOpt['suUName']!='' && $ntOpt['suPass']!=''; $suMsgFormat = htmlentities($ntOpt['suMsgFormat'], ENT_COMPAT, "UTF-8");
|
147 |
?>
|
148 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
149 |
<?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"'; ?> />
|
150 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="su[<?php echo $ii; ?>][doSU]" value="<?php echo $doSU;?>"> <?php } ?> <?php } ?>
|
151 |
|
@@ -161,11 +155,11 @@ if (!class_exists("nxs_snapClassSU")) { class nxs_snapClassSU {
|
|
161 |
</td></tr>
|
162 |
|
163 |
<?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>
|
164 |
-
<?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $ntOpt); } ?>
|
165 |
|
166 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
167 |
|
168 |
-
<tr id="altFormat1" style=""><th scope="row"
|
169 |
<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"; ?> />
|
170 |
</th>
|
171 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
@@ -183,7 +177,7 @@ if (!class_exists("nxs_snapClassSU")) { class nxs_snapClassSU {
|
|
183 |
|
184 |
</div> </td></tr>
|
185 |
|
186 |
-
<tr id="altFormat1" style=""><th scope="row"
|
187 |
<td>
|
188 |
<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>
|
189 |
<?php nxs_doShowHint("apSUMsgFrmt".$ii); ?></td></tr>
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
17 |
+
<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' />
|
18 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php
|
44 |
<br/>
|
45 |
<ul class="nsx_tabs">
|
46 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
47 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
48 |
</ul>
|
49 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
50 |
<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%;">
|
89 |
|
90 |
?></div>
|
91 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
92 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
93 |
|
94 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
95 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
96 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
|
99 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
100 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
101 |
|
102 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div></div><?php
|
103 |
}
|
104 |
//#### Set Unit Settings from POST
|
105 |
+
function setNTSettings($post, $options){ $code = 'SU'; $lcode = 'su';
|
106 |
foreach ($post as $ii => $pval){
|
107 |
if (isset($pval['apSUUName']) && $pval['apSUUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
108 |
|
117 |
if (isset($pval['suInclTags'])) $options[$ii]['suInclTags'] = $pval['suInclTags']; else $options[$ii]['suInclTags'] = 0;
|
118 |
if (isset($pval['apSUMsgFrmt'])) $options[$ii]['suMsgFormat'] = trim($pval['apSUMsgFrmt']);
|
119 |
|
120 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
121 |
if (!empty($options[$ii]['catSel']) && $options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
122 |
|
123 |
if (isset($pval['apDoSU'])) $options[$ii]['doSU'] = $pval['apDoSU']; else $options[$ii]['doSU'] = 0;
|
128 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
129 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
130 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
131 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
132 |
} return $options;
|
133 |
}
|
134 |
//#### Show Post->Edit Meta Box Settings
|
137 |
$doSU = $ntOpt['doSU'] && (is_array($pMeta) || $ntOpt['catSel']!='1');
|
138 |
$isAvailSU = $ntOpt['suUName']!='' && $ntOpt['suPass']!=''; $suMsgFormat = htmlentities($ntOpt['suMsgFormat'], ENT_COMPAT, "UTF-8");
|
139 |
?>
|
140 |
+
<tr><th style="text-align:left;" colspan="2">
|
141 |
+
<?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 } ?>
|
142 |
+
<?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 } ?>
|
143 |
<?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"'; ?> />
|
144 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="su[<?php echo $ii; ?>][doSU]" value="<?php echo $doSU;?>"> <?php } ?> <?php } ?>
|
145 |
|
155 |
</td></tr>
|
156 |
|
157 |
<?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>
|
158 |
+
<?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); } ?>
|
159 |
|
160 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
161 |
|
162 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
163 |
<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"; ?> />
|
164 |
</th>
|
165 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
177 |
|
178 |
</div> </td></tr>
|
179 |
|
180 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"><?php _e('Text Format:', 'nxs_snap') ?></th>
|
181 |
<td>
|
182 |
<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>
|
183 |
<?php nxs_doShowHint("apSUMsgFrmt".$ii); ?></td></tr>
|
inc-cl/tr.api.php
CHANGED
@@ -11,7 +11,7 @@ if (!class_exists("nxs_class_SNAP_TR")) { class nxs_class_SNAP_TR {
|
|
11 |
foreach ($options as $ntOpts) $out[] = $this->doPostToNT($ntOpts, $message);
|
12 |
return $out;
|
13 |
}
|
14 |
-
function doPostToNT($options, $message){ $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>'');
|
15 |
//## Check settings
|
16 |
if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }
|
17 |
if (!isset($options['trConsKey']) || trim($options['trConsSec'])=='') { $badOut['Error'] = 'Not Configured'; return $badOut; }
|
@@ -35,7 +35,7 @@ if (!class_exists("nxs_class_SNAP_TR")) { class nxs_class_SNAP_TR {
|
|
35 |
$postArr['embed'] = $embedTxt;
|
36 |
} else { $postArr['title'] = $msgT; $postArr['type'] = 'text'; $postArr['source'] = $message['url']; $postArr['body'] = $msg; }
|
37 |
|
38 |
-
$postinfo = $tum_oauth->post("http://api.tumblr.com/v2/blog/".$options['trURL']."/post", $postArr); //
|
39 |
|
40 |
$code = $postinfo->meta->status;// echo "XX".print_r($code); prr($postinfo); // prr($msg); prr($postinfo); echo $code."VVVV"; die("|====");
|
41 |
|
11 |
foreach ($options as $ntOpts) $out[] = $this->doPostToNT($ntOpts, $message);
|
12 |
return $out;
|
13 |
}
|
14 |
+
function doPostToNT($options, $message){ $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>'');
|
15 |
//## Check settings
|
16 |
if (!is_array($options)) { $badOut['Error'] = 'No Options'; return $badOut; }
|
17 |
if (!isset($options['trConsKey']) || trim($options['trConsSec'])=='') { $badOut['Error'] = 'Not Configured'; return $badOut; }
|
35 |
$postArr['embed'] = $embedTxt;
|
36 |
} else { $postArr['title'] = $msgT; $postArr['type'] = 'text'; $postArr['source'] = $message['url']; $postArr['body'] = $msg; }
|
37 |
|
38 |
+
$postinfo = $tum_oauth->post("http://api.tumblr.com/v2/blog/".$options['trURL']."/post", $postArr); // prr($postinfo); prr($postArr);
|
39 |
|
40 |
$code = $postinfo->meta->status;// echo "XX".print_r($code); prr($postinfo); // prr($msg); prr($postinfo); echo $code."VVVV"; die("|====");
|
41 |
|
inc-cl/tr.php
CHANGED
@@ -4,10 +4,10 @@ $nxs_snapAvNts[] = array('code'=>'TR', 'lcode'=>'tr', 'name'=>'Tumblr');
|
|
4 |
|
5 |
if (!class_exists("nxs_snapClassTR")) { class nxs_snapClassTR {
|
6 |
//#### Show Common Settings
|
7 |
-
function showGenNTSettings($ntOpts){ global $
|
8 |
if ( isset($_GET['auth']) && $_GET['auth']=='tr'){ require_once('apis/trOAuth.php'); $options = $ntOpts[$_GET['acc']];
|
9 |
$consumer_key = $options['trConsKey']; $consumer_secret = $options['trConsSec'];
|
10 |
-
$callback_url = $
|
11 |
$tum_oauth = new TumblrOAuth($consumer_key, $consumer_secret);prr($tum_oauth );
|
12 |
$request_token = $tum_oauth->getRequestToken($callback_url); echo "####"; prr($request_token);
|
13 |
$options['trOAuthToken'] = $request_token['oauth_token'];
|
@@ -27,7 +27,7 @@ if (!class_exists("nxs_snapClassTR")) { class nxs_snapClassTR {
|
|
27 |
$userinfo = $tum_oauth->get('http://api.tumblr.com/v2/user/info'); prr($userinfo); prr($tum_oauth);// prr($url); die();
|
28 |
if (is_array($userinfo->response->user->blogs)) {
|
29 |
foreach ($userinfo->response->user->blogs as $blog){
|
30 |
-
if (stripos($blog->url, $options['trPgID'])!==false) { echo '<script type="text/javascript">window.location = "'.$
|
31 |
} prr($userinfo);
|
32 |
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>");
|
33 |
}
|
@@ -43,14 +43,14 @@ if (!class_exists("nxs_snapClassTR")) { class nxs_snapClassTR {
|
|
43 |
<div class="nxs_box_inside">
|
44 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('https://','', str_ireplace('http://','', $pbo['trURL']));
|
45 |
if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['trOAuthTokenSecret']) && $pbo['trOAuthTokenSecret']!='')?'1':''; ?>
|
46 |
-
<p style="margin:0px;margin-left:5px;">
|
47 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
48 |
<?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 } ?>
|
49 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
50 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
51 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
52 |
<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', 'nxs_snap'); ?>]</a>
|
53 |
-
</p><?php
|
54 |
}?>
|
55 |
</div>
|
56 |
</div> <?php
|
@@ -59,7 +59,7 @@ if (!class_exists("nxs_snapClassTR")) { class nxs_snapClassTR {
|
|
59 |
function showNewNTSettings($bo){ $po = array('nName'=>'', 'doTR'=>'1', 'trURL'=>'', 'trPgID'=>'', 'trConsKey'=>'', 'trInclTags'=>'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%' );
|
60 |
$po['ntInfo']= array('lcode'=>'tr'); $this->showNTSettings($bo, $po, true);}
|
61 |
//#### Show Unit Settings
|
62 |
-
function showNTSettings($ii, $options, $isNew=false){ global $nxs_plurl,$
|
63 |
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'] = '';
|
64 |
if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['trMsgTFormat'])) $options['trMsgTFormat'] = ''; ?>
|
65 |
<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; ?>" />
|
@@ -73,7 +73,7 @@ if (!class_exists("nxs_snapClassTR")) { class nxs_snapClassTR {
|
|
73 |
<br/>
|
74 |
<ul class="nsx_tabs">
|
75 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
76 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
77 |
</ul>
|
78 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
79 |
<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%;">
|
@@ -137,7 +137,7 @@ if (!class_exists("nxs_snapClassTR")) { class nxs_snapClassTR {
|
|
137 |
<?php } else { if(isset($options['trAccessTocken']) && isset($options['trAccessTocken']['oauth_token_secret']) && $options['trAccessTocken']['oauth_token_secret']!=='') { ?>
|
138 |
Your Tumblr Account has been authorized. Blog ID: <?php _e(apply_filters('format_to_edit', htmlentities($options['trPgID'], ENT_COMPAT, "UTF-8")), 'nxs_snap') ?>.
|
139 |
You can Re- <?php } ?>
|
140 |
-
<a href="<?php echo $
|
141 |
<?php if (!isset($options['trOAuthTokenSecret']) || $options['trOAuthTokenSecret']=='') { ?> <div class="blnkg"><=== Authorize your account ===</div> <?php } ?>
|
142 |
<?php } ?>
|
143 |
|
@@ -149,25 +149,17 @@ if (!class_exists("nxs_snapClassTR")) { class nxs_snapClassTR {
|
|
149 |
|
150 |
</div>
|
151 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
152 |
-
<div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
153 |
|
154 |
-
<?php
|
155 |
-
|
156 |
-
|
157 |
-
<input value="1" id="catSelS<?php echo $ntU; ?><?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 $ntU; ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo $ntU; ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo $ntU; ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
158 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
159 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
160 |
-
<br/>
|
161 |
-
<?php } ?>
|
162 |
-
|
163 |
-
<?php nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
164 |
-
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
165 |
|
166 |
|
167 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
168 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
169 |
|
170 |
-
<div class="submit
|
171 |
|
172 |
</div>
|
173 |
<?php
|
@@ -175,7 +167,7 @@ if (!class_exists("nxs_snapClassTR")) { class nxs_snapClassTR {
|
|
175 |
|
176 |
}
|
177 |
//#### Set Unit Settings from POST
|
178 |
-
function setNTSettings($post, $options){
|
179 |
foreach ($post as $ii => $pval){ // prr($pval);
|
180 |
if (isset($pval['apTRConsKey']) && $pval['apTRConsSec']!='') { if (!isset($options[$ii])) $options[$ii] = array();
|
181 |
|
@@ -195,7 +187,7 @@ if (!class_exists("nxs_snapClassTR")) { class nxs_snapClassTR {
|
|
195 |
if (isset($pval['apTRPostType'])) $options[$ii]['trPostType'] = trim($pval['apTRPostType']);
|
196 |
if (isset($pval['cImgURL'])) $options[$ii]['cImgURL'] = trim($pval['cImgURL']);
|
197 |
|
198 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
199 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
200 |
|
201 |
if (isset($pval['apTRDefImg'])) $options[$ii]['trDefImg'] = trim($pval['apTRDefImg']);
|
@@ -205,58 +197,60 @@ if (!class_exists("nxs_snapClassTR")) { class nxs_snapClassTR {
|
|
205 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
206 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
207 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
208 |
-
}
|
209 |
} return $options;
|
210 |
}
|
211 |
//#### Show Post->Edit Meta Box Settings
|
212 |
function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'tr'; $ntU = 'TR';
|
213 |
-
foreach($ntOpts as $ii=>$
|
214 |
-
if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii])) $
|
215 |
-
if (empty($
|
216 |
-
$doTR = $
|
217 |
-
$isAvailTR = isset($
|
218 |
-
$trMsgFormat = htmlentities($
|
219 |
?>
|
220 |
|
221 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
222 |
<?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"'; ?> />
|
223 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="tr[<?php echo $ii; ?>][doTR]" value="<?php echo $doTR;?>"> <?php } ?> <?php } ?>
|
224 |
-
<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', 'nxs_snap') ?> (<i style="color: #005800;"><?php echo $
|
225 |
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', 'nxs_snap') ?>" />
|
226 |
<?php } ?>
|
227 |
|
228 |
<?php if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) {
|
229 |
?> <span id="pstdTR<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">
|
230 |
-
<a style="font-size: 10px;" href="<?php echo $
|
231 |
</span><?php } ?>
|
232 |
|
233 |
</td></tr>
|
234 |
<?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>
|
235 |
-
<?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $
|
236 |
|
237 |
-
<?php if ($
|
238 |
|
239 |
-
<tr id="altFormat1" style=""><th scope="row"
|
240 |
<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"; ?> />
|
241 |
</th>
|
242 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
243 |
</td></tr> <?php } ?>
|
244 |
|
245 |
<tr id="altFormat1" style=""><th scope="row" style="text-align:right; width:60px; padding-right:10px;">
|
246 |
-
<input type="radio" name="tr[<?php echo $ii; ?>][apTRPostType]" value="T" <?php if ($
|
247 |
</th>
|
248 |
<td><b><?php _e('Text Post. Title Format:', 'nxs_snap') ?></b> <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; ?>');"/>
|
249 |
<?php nxs_doShowHint("apTRTMsgFrmt".$ii); ?> </td></tr>
|
250 |
|
251 |
<tr id="altFormat1" style=""><th scope="row" style="text-align:right; width:60px; padding-right:10px;">
|
252 |
-
<input type="radio" name="tr[<?php echo $ii; ?>][apTRPostType]" value="I" <?php if ($
|
253 |
</th>
|
254 |
<td><b>Image Post</b>
|
255 |
-
<input type="radio" name="tr[<?php echo $ii; ?>][apTRPostType]" value="V" <?php if ($
|
256 |
-
<input type="radio" name="tr[<?php echo $ii; ?>][apTRPostType]" value="U" <?php if ($
|
257 |
</td></tr>
|
258 |
|
259 |
-
<tr id="altFormat1" style=""><th scope="row"
|
260 |
<td>
|
261 |
<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>
|
262 |
<?php nxs_doShowHint("apTRMsgFrmt".$ii); ?></td></tr>
|
@@ -267,6 +261,7 @@ if (!class_exists("nxs_snapClassTR")) { class nxs_snapClassTR {
|
|
267 |
}
|
268 |
|
269 |
}
|
|
|
270 |
|
271 |
function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else $optMt['isPosted'] = '';
|
272 |
if (isset($pMeta['SNAPformat'])) $optMt['trMsgFormat'] = $pMeta['SNAPformat']; if (isset($pMeta['SNAPTformat'])) $optMt['trMsgTFormat'] = $pMeta['SNAPTformat'];
|
@@ -293,9 +288,10 @@ if (!function_exists("nxs_doPublishToTR")) { //## Second Function to Post to TR
|
|
293 |
function nxs_doPublishToTR($postID, $options){ $ntCd = 'TR'; $ntCdL = 'tr'; $ntNm = 'Tumblr'; global $plgn_NS_SNAutoPoster; $ytUrl = ''; $imgURL = '';
|
294 |
if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));
|
295 |
//if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToTR', array($postID, $options));
|
296 |
-
if (empty($options['imgToUse'])) $options['imgToUse'] = ''; if (empty($options['urlToUse'])) $options['urlToUse'] = '';
|
|
|
297 |
$addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));
|
298 |
-
|
299 |
$blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url();
|
300 |
$ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10));
|
301 |
$logNT = '<span style="color:#014A76">Tumblr</span> - '.$options['nName'];
|
@@ -306,10 +302,11 @@ if (!function_exists("nxs_doPublishToTR")) { //## Second Function to Post to TR
|
|
306 |
}
|
307 |
}
|
308 |
//## Format
|
309 |
-
if ($postID=='0') { echo "Testing ... <br/><br/>"; $options['trMsgFormat'] = 'Test Post from '.$blogTitle; $msgT = 'Test Post from '.$blogTitle; $options['trPostType']
|
310 |
-
|
|
|
311 |
$options['trMsgTFormat'] = nsFormatMessage($options['trMsgTFormat'], $postID, $addParams); nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));
|
312 |
-
|
313 |
$tggs = array();
|
314 |
if ($options['trInclTags']=='1'){ $t = wp_get_post_tags($postID); $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = implode(',', $tggs); }
|
315 |
if ($options['trInclCats']=='1'){ $t = wp_get_post_categories($postID); foreach($t as $c){ $cat = get_category($c); $tggs[] = $cat->name; } $tags = implode(',', $tggs); }
|
@@ -323,9 +320,8 @@ if (!function_exists("nxs_doPublishToTR")) { //## Second Function to Post to TR
|
|
323 |
//## MyURL - URLToGo code
|
324 |
if (!isset($options['urlToUse']) || trim($options['urlToUse'])=='') $myurl = trim(get_post_meta($postID, 'snap_MYURL', true)); if ($myurl!='') $options['urlToUse'] = $myurl;
|
325 |
if (isset($options['urlToUse']) && trim($options['urlToUse'])!='') { $urlToGo = $options['urlToUse']; $options['useFBGURLInfo'] = true; } else $urlToGo = get_permalink($postID);
|
326 |
-
$gOptions = $plgn_NS_SNAutoPoster->nxs_options; $addURLParams = trim($gOptions['addURLParams']); if($addURLParams!='') $urlToGo .= (strpos($urlToGo,'?')!==false?'&':'?').$addURLParams;
|
327 |
-
|
328 |
-
}
|
329 |
$extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?$post->post_title:'').' |'.$options['pType'];
|
330 |
$options['trURL'] = trim(str_ireplace('http://', '', $options['trURL'])); if (substr($options['trURL'],-1)=='/') $options['trURL'] = substr($options['trURL'], 0, -1);
|
331 |
//## Post
|
4 |
|
5 |
if (!class_exists("nxs_snapClassTR")) { class nxs_snapClassTR {
|
6 |
//#### Show Common Settings
|
7 |
+
function showGenNTSettings($ntOpts){ global $nxs_snapSetPgURL, $nxs_plurl; $ntInfo = array('code'=>'TR', 'lcode'=>'tr', 'name'=>'Tumblr', 'defNName'=>'', 'tstReq' => true);
|
8 |
if ( isset($_GET['auth']) && $_GET['auth']=='tr'){ require_once('apis/trOAuth.php'); $options = $ntOpts[$_GET['acc']];
|
9 |
$consumer_key = $options['trConsKey']; $consumer_secret = $options['trConsSec'];
|
10 |
+
$callback_url = $nxs_snapSetPgURL."&auth=tra&acc=".$_GET['acc'];
|
11 |
$tum_oauth = new TumblrOAuth($consumer_key, $consumer_secret);prr($tum_oauth );
|
12 |
$request_token = $tum_oauth->getRequestToken($callback_url); echo "####"; prr($request_token);
|
13 |
$options['trOAuthToken'] = $request_token['oauth_token'];
|
27 |
$userinfo = $tum_oauth->get('http://api.tumblr.com/v2/user/info'); prr($userinfo); prr($tum_oauth);// prr($url); die();
|
28 |
if (is_array($userinfo->response->user->blogs)) {
|
29 |
foreach ($userinfo->response->user->blogs as $blog){
|
30 |
+
if (stripos($blog->url, $options['trPgID'])!==false) { echo '<script type="text/javascript">window.location = "'.$nxs_snapSetPgURL.'"</script>'; break; die();}
|
31 |
} prr($userinfo);
|
32 |
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>");
|
33 |
}
|
43 |
<div class="nxs_box_inside">
|
44 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('https://','', str_ireplace('http://','', $pbo['trURL']));
|
45 |
if (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='') $pbo[$ntInfo['lcode'].'OK'] = (isset($pbo['trOAuthTokenSecret']) && $pbo['trOAuthTokenSecret']!='')?'1':''; ?>
|
46 |
+
<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' />
|
47 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
48 |
<?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 } ?>
|
49 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
50 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
51 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
52 |
<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', 'nxs_snap'); ?>]</a>
|
53 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
54 |
}?>
|
55 |
</div>
|
56 |
</div> <?php
|
59 |
function showNewNTSettings($bo){ $po = array('nName'=>'', 'doTR'=>'1', 'trURL'=>'', 'trPgID'=>'', 'trConsKey'=>'', 'trInclTags'=>'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%' );
|
60 |
$po['ntInfo']= array('lcode'=>'tr'); $this->showNTSettings($bo, $po, true);}
|
61 |
//#### Show Unit Settings
|
62 |
+
function showNTSettings($ii, $options, $isNew=false){ global $nxs_plurl,$nxs_snapSetPgURL; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt);
|
63 |
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'] = '';
|
64 |
if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; if (!isset($options['trMsgTFormat'])) $options['trMsgTFormat'] = ''; ?>
|
65 |
<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; ?>" />
|
73 |
<br/>
|
74 |
<ul class="nsx_tabs">
|
75 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
76 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
77 |
</ul>
|
78 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
79 |
<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%;">
|
137 |
<?php } else { if(isset($options['trAccessTocken']) && isset($options['trAccessTocken']['oauth_token_secret']) && $options['trAccessTocken']['oauth_token_secret']!=='') { ?>
|
138 |
Your Tumblr Account has been authorized. Blog ID: <?php _e(apply_filters('format_to_edit', htmlentities($options['trPgID'], ENT_COMPAT, "UTF-8")), 'nxs_snap') ?>.
|
139 |
You can Re- <?php } ?>
|
140 |
+
<a href="<?php echo $nxs_snapSetPgURL;?>&auth=tr&acc=<?php echo $ii; ?>">Authorize Your Tumblr Account</a>
|
141 |
<?php if (!isset($options['trOAuthTokenSecret']) || $options['trOAuthTokenSecret']=='') { ?> <div class="blnkg"><=== Authorize your account ===</div> <?php } ?>
|
142 |
<?php } ?>
|
143 |
|
149 |
|
150 |
</div>
|
151 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
152 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
153 |
|
154 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
155 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
156 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
|
158 |
|
159 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
160 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
161 |
|
162 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div>
|
163 |
|
164 |
</div>
|
165 |
<?php
|
167 |
|
168 |
}
|
169 |
//#### Set Unit Settings from POST
|
170 |
+
function setNTSettings($post, $options){
|
171 |
foreach ($post as $ii => $pval){ // prr($pval);
|
172 |
if (isset($pval['apTRConsKey']) && $pval['apTRConsSec']!='') { if (!isset($options[$ii])) $options[$ii] = array();
|
173 |
|
187 |
if (isset($pval['apTRPostType'])) $options[$ii]['trPostType'] = trim($pval['apTRPostType']);
|
188 |
if (isset($pval['cImgURL'])) $options[$ii]['cImgURL'] = trim($pval['cImgURL']);
|
189 |
|
190 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
191 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
192 |
|
193 |
if (isset($pval['apTRDefImg'])) $options[$ii]['trDefImg'] = trim($pval['apTRDefImg']);
|
197 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
198 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
199 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
200 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
201 |
} return $options;
|
202 |
}
|
203 |
//#### Show Post->Edit Meta Box Settings
|
204 |
function showEdPostNTSettings($ntOpts, $post){ global $nxs_plurl; $post_id = $post->ID; $nt = 'tr'; $ntU = 'TR';
|
205 |
+
foreach($ntOpts as $ii=>$ntOpt) {$pMeta = maybe_unserialize(get_post_meta($post_id, 'snapTR', true)); // prr($ntOpts); echo "~~~~~~~~~~~~~~~~"; prr($pMeta); echo "#######";
|
206 |
+
if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii])) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]);
|
207 |
+
if (empty($ntOpt['imgToUse'])) $ntOpt['imgToUse'] = ''; if (empty($ntOpt['urlToUse'])) $ntOpt['urlToUse'] = ''; if (empty($ntOpt['trMsgTFormat'])) $ntOpt['trMsgTFormat'] = '';
|
208 |
+
$doTR = $ntOpt['doTR'] && (is_array($pMeta) || (is_array($pMeta) || $ntOpt['catSel']!='1')); $imgToUse = $ntOpt['imgToUse']; $urlToUse = $ntOpt['urlToUse'];
|
209 |
+
$isAvailTR = isset($ntOpt['trAccessTocken']) && isset($ntOpt['trAccessTocken']['oauth_token_secret']) && $ntOpt['trAccessTocken']['oauth_token_secret']!=='';
|
210 |
+
$trMsgFormat = htmlentities($ntOpt['trMsgFormat'], ENT_COMPAT, "UTF-8"); $trMsgTFormat = htmlentities($ntOpt['trMsgTFormat'], ENT_COMPAT, "UTF-8");
|
211 |
?>
|
212 |
|
213 |
+
<tr><th style="text-align:left;" colspan="2">
|
214 |
+
<?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 } ?>
|
215 |
+
<?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 } ?>
|
216 |
<?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"'; ?> />
|
217 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="tr[<?php echo $ii; ?>][doTR]" value="<?php echo $doTR;?>"> <?php } ?> <?php } ?>
|
218 |
+
<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', 'nxs_snap') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>) </div></th><td><?php //## Only show RePost button if the post is "published"
|
219 |
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', 'nxs_snap') ?>" />
|
220 |
<?php } ?>
|
221 |
|
222 |
<?php if (is_array($pMeta) && isset($pMeta[$ii]) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) {
|
223 |
?> <span id="pstdTR<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;">
|
224 |
+
<a style="font-size: 10px;" href="<?php echo $ntOpt['trURL']; ?>post/<?php echo $pMeta[$ii]['pgID']; ?>" target="_blank"><?php $nType="Tumblr"; printf( __( 'Posted on', 'nxs_snap' ), $nType); ?> <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a>
|
225 |
</span><?php } ?>
|
226 |
|
227 |
</td></tr>
|
228 |
<?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>
|
229 |
+
<?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); } ?>
|
230 |
|
231 |
+
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
232 |
|
233 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
234 |
<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"; ?> />
|
235 |
</th>
|
236 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
237 |
</td></tr> <?php } ?>
|
238 |
|
239 |
<tr id="altFormat1" style=""><th scope="row" style="text-align:right; width:60px; padding-right:10px;">
|
240 |
+
<input type="radio" name="tr[<?php echo $ii; ?>][apTRPostType]" value="T" <?php if ($ntOpt['trPostType'] != 'I') echo 'checked="checked"'; ?> /> <br/>
|
241 |
</th>
|
242 |
<td><b><?php _e('Text Post. Title Format:', 'nxs_snap') ?></b> <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; ?>');"/>
|
243 |
<?php nxs_doShowHint("apTRTMsgFrmt".$ii); ?> </td></tr>
|
244 |
|
245 |
<tr id="altFormat1" style=""><th scope="row" style="text-align:right; width:60px; padding-right:10px;">
|
246 |
+
<input type="radio" name="tr[<?php echo $ii; ?>][apTRPostType]" value="I" <?php if ($ntOpt['trPostType'] == 'I') echo 'checked="checked"'; ?> /> <br/>
|
247 |
</th>
|
248 |
<td><b>Image Post</b>
|
249 |
+
<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); ?>
|
250 |
+
<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); ?>
|
251 |
</td></tr>
|
252 |
|
253 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"><?php _e('Text Format:', 'nxs_snap') ?></th>
|
254 |
<td>
|
255 |
<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>
|
256 |
<?php nxs_doShowHint("apTRMsgFrmt".$ii); ?></td></tr>
|
261 |
}
|
262 |
|
263 |
}
|
264 |
+
|
265 |
|
266 |
function adjMetaOpt($optMt, $pMeta){ if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else $optMt['isPosted'] = '';
|
267 |
if (isset($pMeta['SNAPformat'])) $optMt['trMsgFormat'] = $pMeta['SNAPformat']; if (isset($pMeta['SNAPTformat'])) $optMt['trMsgTFormat'] = $pMeta['SNAPTformat'];
|
288 |
function nxs_doPublishToTR($postID, $options){ $ntCd = 'TR'; $ntCdL = 'tr'; $ntNm = 'Tumblr'; global $plgn_NS_SNAutoPoster; $ytUrl = ''; $imgURL = '';
|
289 |
if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true));
|
290 |
//if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToTR', array($postID, $options));
|
291 |
+
if (empty($options['imgToUse'])) $options['imgToUse'] = ''; if (empty($options['urlToUse'])) $options['urlToUse'] = '';
|
292 |
+
if (empty($options['trMsgTFormat'])) $options['trMsgTFormat'] = ''; if (empty($options['imgSize'])) $options['imgSize'] = '';
|
293 |
$addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'POSTID'=>$postID, 'ACCNAME'=>$options['nName']));
|
294 |
+
|
295 |
$blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url();
|
296 |
$ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10));
|
297 |
$logNT = '<span style="color:#014A76">Tumblr</span> - '.$options['nName'];
|
302 |
}
|
303 |
}
|
304 |
//## Format
|
305 |
+
if ($postID=='0') { echo "Testing ... <br/><br/>"; $options['trMsgFormat'] = 'Test Post from '.$blogTitle; $msgT = 'Test Post from '.$blogTitle; $options['trPostType']='T';
|
306 |
+
$postDate = gmdate("Y-m-d H:i:s")." GMT"; $tags = ''; $urlToGo = '';
|
307 |
+
} else{ $post = get_post($postID); if(!$post) return; $options['trMsgFormat'] = nsFormatMessage($options['trMsgFormat'], $postID, $addParams);
|
308 |
$options['trMsgTFormat'] = nsFormatMessage($options['trMsgTFormat'], $postID, $addParams); nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));
|
309 |
+
|
310 |
$tggs = array();
|
311 |
if ($options['trInclTags']=='1'){ $t = wp_get_post_tags($postID); $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = implode(',', $tggs); }
|
312 |
if ($options['trInclCats']=='1'){ $t = wp_get_post_categories($postID); foreach($t as $c){ $cat = get_category($c); $tggs[] = $cat->name; } $tags = implode(',', $tggs); }
|
320 |
//## MyURL - URLToGo code
|
321 |
if (!isset($options['urlToUse']) || trim($options['urlToUse'])=='') $myurl = trim(get_post_meta($postID, 'snap_MYURL', true)); if ($myurl!='') $options['urlToUse'] = $myurl;
|
322 |
if (isset($options['urlToUse']) && trim($options['urlToUse'])!='') { $urlToGo = $options['urlToUse']; $options['useFBGURLInfo'] = true; } else $urlToGo = get_permalink($postID);
|
323 |
+
$gOptions = $plgn_NS_SNAutoPoster->nxs_options; $addURLParams = trim($gOptions['addURLParams']); if($addURLParams!='') $urlToGo .= (strpos($urlToGo,'?')!==false?'&':'?').$addURLParams;
|
324 |
+
}
|
|
|
325 |
$extInfo = ' | PostID: '.$postID." - ".(isset($post) && is_object($post)?$post->post_title:'').' |'.$options['pType'];
|
326 |
$options['trURL'] = trim(str_ireplace('http://', '', $options['trURL'])); if (substr($options['trURL'],-1)=='/') $options['trURL'] = substr($options['trURL'], 0, -1);
|
327 |
//## Post
|
inc-cl/tw.api.php
CHANGED
@@ -23,7 +23,7 @@ if (!class_exists("nxs_class_SNAP_TW")) { class nxs_class_SNAP_TW {
|
|
23 |
if (empty($imgURL) && $img=='') $options['attchImg'] = false;
|
24 |
//## Make Post
|
25 |
//$msg = $message['message']; $imgURL = trim($message['imageURL']); $img = trim($message['img']); $nxs_urlLen = $message['urlLength'];
|
26 |
-
if ($options['attchImg']!=false && $img=='' && $imgURL!='' ) {
|
27 |
if( ini_get('allow_url_fopen') ) { if (getimagesize($imgURL)!==false) { $img = nxs_remote_get($imgURL); if(is_nxs_error($img)) $options['attchImg'] = false; else $img = $img['body']; } else $options['attchImg'] = false; }
|
28 |
else { $img = nxs_remote_get($imgURL); if(is_nxs_error($img)) $options['attchImg'] = false; elseif (isset($img['body'])&& trim($img['body'])!='') $img = $img['body']; else $options['attchImg'] = false; }
|
29 |
}
|
@@ -31,7 +31,7 @@ if (!class_exists("nxs_class_SNAP_TW")) { class nxs_class_SNAP_TW {
|
|
31 |
|
32 |
require_once ('apis/tmhOAuth.php'); if ($nxs_urlLen>0) { $msg = nsTrnc($msg, $twLim-22+$nxs_urlLen); } else $msg = nsTrnc($msg, $twLim); if (substr($msg, 0, 1)=='@') $msg = ' '.$msg;
|
33 |
$tmhOAuth = new NXS_tmhOAuth(array( 'consumer_key' => $options['twConsKey'], 'consumer_secret' => $options['twConsSec'], 'user_token' => $options['twAccToken'], 'user_secret' => $options['twAccTokenSec']));
|
34 |
-
if ($options['attchImg']!=false && $img!='') $code = $tmhOAuth -> request('POST', '
|
35 |
else $code = $tmhOAuth->request('POST', $tmhOAuth->url('1.1/statuses/update'), array('status' =>$msg));
|
36 |
if ( $code=='403' && stripos($tmhOAuth->response['response'], 'User is over daily photo limit')!==false && $options['attchImg']!=false && $img!='') {
|
37 |
$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));
|
23 |
if (empty($imgURL) && $img=='') $options['attchImg'] = false;
|
24 |
//## Make Post
|
25 |
//$msg = $message['message']; $imgURL = trim($message['imageURL']); $img = trim($message['img']); $nxs_urlLen = $message['urlLength'];
|
26 |
+
if ($options['attchImg']!=false && $img=='' && $imgURL!='' ) { $imgURL = str_replace(' ', '%20', $imgURL);
|
27 |
if( ini_get('allow_url_fopen') ) { if (getimagesize($imgURL)!==false) { $img = nxs_remote_get($imgURL); if(is_nxs_error($img)) $options['attchImg'] = false; else $img = $img['body']; } else $options['attchImg'] = false; }
|
28 |
else { $img = nxs_remote_get($imgURL); if(is_nxs_error($img)) $options['attchImg'] = false; elseif (isset($img['body'])&& trim($img['body'])!='') $img = $img['body']; else $options['attchImg'] = false; }
|
29 |
}
|
31 |
|
32 |
require_once ('apis/tmhOAuth.php'); if ($nxs_urlLen>0) { $msg = nsTrnc($msg, $twLim-22+$nxs_urlLen); } else $msg = nsTrnc($msg, $twLim); if (substr($msg, 0, 1)=='@') $msg = ' '.$msg;
|
33 |
$tmhOAuth = new NXS_tmhOAuth(array( 'consumer_key' => $options['twConsKey'], 'consumer_secret' => $options['twConsSec'], 'user_token' => $options['twAccToken'], 'user_secret' => $options['twAccTokenSec']));
|
34 |
+
if ($options['attchImg']!=false && $img!='') $code = $tmhOAuth -> request('POST', 'https://api.twitter.com/1.1/statuses/update_with_media.json', array( 'media[]' => $img, 'status' => $msg), true, true);
|
35 |
else $code = $tmhOAuth->request('POST', $tmhOAuth->url('1.1/statuses/update'), array('status' =>$msg));
|
36 |
if ( $code=='403' && stripos($tmhOAuth->response['response'], 'User is over daily photo limit')!==false && $options['attchImg']!=false && $img!='') {
|
37 |
$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));
|
inc-cl/tw.php
CHANGED
@@ -14,14 +14,14 @@ if (!class_exists("nxs_snapClassTW")) { class nxs_snapClassTW {
|
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('https://','', str_ireplace('http://','', $pbo['twURL'])); ?>
|
17 |
-
<p style="margin:0px;margin-left:5px;">
|
18 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention required. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
-
</p><?php
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php
|
@@ -45,7 +45,7 @@ if (!class_exists("nxs_snapClassTW")) { class nxs_snapClassTW {
|
|
45 |
<br/>
|
46 |
<ul class="nsx_tabs">
|
47 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
48 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
49 |
</ul>
|
50 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
51 |
<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%;">
|
@@ -73,18 +73,10 @@ if (!class_exists("nxs_snapClassTW")) { class nxs_snapClassTW {
|
|
73 |
|
74 |
</div>
|
75 |
<?php /* ######################## Tools Tab ####################### */ ?>
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
<strong><?php _e('Categories', 'nxs_snap'); ?>:</strong>
|
81 |
-
<input value="0" id="catSelA<?php echo $ii; ?>" type="radio" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSel]" <?php if ((int)$options['catSel'] != 1) echo "checked"; ?> /> All
|
82 |
-
<input value="1" id="catSelSTW<?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_TW<?php echo $ii; ?>" onclick="jQuery('#catSelSTW<?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('TW<?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_TW<?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
83 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_TW<?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
84 |
-
</div>
|
85 |
-
<?php } ?>
|
86 |
-
|
87 |
-
<?php nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
88 |
|
89 |
<div class="nxs_tls_cpt"><?php _e('Auto Import of Replies and Mentions:', 'nxs_snap'); ?></div>
|
90 |
<div class="nxs_tls_bd">
|
@@ -98,17 +90,17 @@ if (!class_exists("nxs_snapClassTW")) { class nxs_snapClassTW {
|
|
98 |
<?php } else { echo "<br/>"; _e('Please activate the "Comments Import" from SNAP Settings Tab', 'nxs_snap'); } ?>
|
99 |
</div>
|
100 |
|
101 |
-
|
102 |
|
103 |
-
</div>
|
104 |
</div><br/>
|
105 |
-
<div class="submit
|
106 |
|
107 |
</div>
|
108 |
<?php
|
109 |
}
|
110 |
//#### Set Unit Settings from POST
|
111 |
-
function setNTSettings($post, $options){
|
112 |
foreach ($post as $ii => $pval){
|
113 |
if (isset($pval['apTWURL']) && $pval['apTWURL']!='') { if (!isset($options[$ii])) $options[$ii] = array();
|
114 |
if (isset($pval['apDoTW'])) $options[$ii]['doTW'] = $pval['apDoTW']; else $options[$ii]['doTW'] = 0;
|
@@ -118,7 +110,7 @@ if (!class_exists("nxs_snapClassTW")) { class nxs_snapClassTW {
|
|
118 |
if (isset($pval['apTWConsSec'])) $options[$ii]['twConsSec'] = trim($pval['apTWConsSec']);
|
119 |
if (isset($pval['apTWAccToken'])) $options[$ii]['twAccToken'] = trim($pval['apTWAccToken']);
|
120 |
|
121 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
122 |
if (isset($options[$ii]['catSel']) && $options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
123 |
|
124 |
if (isset($pval['riComments'])) $options[$ii]['riComments'] = $pval['riComments']; else $options[$ii]['riComments'] = 0;
|
@@ -132,7 +124,7 @@ if (!class_exists("nxs_snapClassTW")) { class nxs_snapClassTW {
|
|
132 |
if (isset($pval['attchImg'])) $options[$ii]['attchImg'] = $pval['attchImg']; else $options[$ii]['attchImg'] = 0;
|
133 |
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']);
|
134 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
135 |
-
}
|
136 |
} return $options;
|
137 |
}
|
138 |
//#### Show Post->Edit Meta Box Settings
|
@@ -142,7 +134,9 @@ if (!class_exists("nxs_snapClassTW")) { class nxs_snapClassTW {
|
|
142 |
$doTW = $ntOpt['doTW'] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse'];
|
143 |
$isAvailTW = $ntOpt['twURL']!='' && $ntOpt['twConsKey']!='' && $ntOpt['twConsSec']!='' && $ntOpt['twAccToken']!=''; $twMsgFormat = htmlentities($ntOpt['twMsgFormat'], ENT_COMPAT, "UTF-8"); $isAttchImg = $ntOpt['attchImg'];
|
144 |
?>
|
145 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
146 |
<?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"'; ?> />
|
147 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="tw[<?php echo $ii; ?>][doTW]" value="<?php echo $doTW;?>"> <?php } ?> <?php } ?>
|
148 |
<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', 'nxs_snap') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)
|
@@ -159,17 +153,17 @@ if (!class_exists("nxs_snapClassTW")) { class nxs_snapClassTW {
|
|
159 |
</td></tr>
|
160 |
|
161 |
<?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>
|
162 |
-
<?php }else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $ntOpt); } ?>
|
163 |
|
164 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
165 |
|
166 |
-
<tr id="altFormat1" style=""><th scope="row"
|
167 |
<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"; ?> />
|
168 |
</th>
|
169 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
170 |
</td></tr> <?php } ?>
|
171 |
|
172 |
-
<tr id="altFormat1" style=""><th scope="row"
|
173 |
<td><input value="<?php echo $twMsgFormat ?>" type="text" name="tw[<?php echo $ii; ?>][SNAPformat]" style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apTWMsgFrmt<?php echo $ii; ?>');"/><?php nxs_doShowHint("apTWMsgFrmt".$ii); ?></td></tr>
|
174 |
|
175 |
<tr><th scope="row" style="text-align:right; width:150px; vertical-align:top; padding-top: 5px; padding-right:10px;">
|
@@ -255,19 +249,17 @@ if (!function_exists("nxs_doPublishToTW")) { //## Second Function to Post to TW
|
|
255 |
nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$options['pType']); return;
|
256 |
}
|
257 |
}
|
258 |
-
$blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url(); $uln = 0; $extInfo = ' | PostID: '.$postID;
|
259 |
-
|
260 |
|
261 |
if ($options['attchImg']=='1') { if (trim($options['imgToUse'])!='') $imgURL = $options['imgToUse']; else $imgURL = nxs_getPostImage($postID); if (preg_match("/noImg.\.png/i", $imgURL)) $imgURL = '';
|
262 |
-
if(trim($imgURL)=='') $options['attchImg'] = 0; else {
|
263 |
if( ini_get('allow_url_fopen') ) { if (@getimagesize($imgURL)!==false) { $img = wp_remote_get($imgURL);
|
264 |
-
if (is_wp_error($img)) $options['attchImg'] = 0; else if ($img['headers']['content-length']<200) { $options['attchImg'] = 0; }
|
265 |
-
} else { $img = wp_remote_get($imgURL); if(is_wp_error($img)) $options['attchImg'] = 0; elseif (isset($img['body'])&& trim($img['body'])!='') $img = $img['body']; else $options['attchImg'] = 0; }
|
|
|
266 |
}
|
267 |
-
if ($options['attchImg'] == 0) nxs_addToLogN('E', 'Error', $logNT, 'Could not get image ('.$imgURL.'), will post without it - Error:'.print_r($img), $extInfo);
|
268 |
}
|
269 |
-
if ($options['attchImg']=='1' && $img!='') $twLim = 117; else $twLim = 140;
|
270 |
-
|
271 |
if ($postID=='0') { echo "Testing ... <br/><br/>"; $msg = 'Test Post from '.nsTrnc($blogTitle, $twLim - 24)." - ".rand(1, 155); $uln = nxs_strLen($msg);}
|
272 |
else{ $post = get_post($postID); if(!$post) return; $twMsgFormat = $options['twMsgFormat']; nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));
|
273 |
$extInfo = ' | PostID: '.$postID." - ".$post->post_title.' |'.$options['pType'];
|
@@ -359,8 +351,7 @@ if (!function_exists("nxs_doPublishToTW")) { //## Second Function to Post to TW
|
|
359 |
else { nxs_addToRI($postID); 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); }
|
360 |
}
|
361 |
//## Return Result
|
362 |
-
if ($ret['isPosted']=='1') return 200; else return print_r($ret, true);
|
363 |
-
|
364 |
}
|
365 |
}
|
366 |
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('https://','', str_ireplace('http://','', $pbo['twURL'])); ?>
|
17 |
+
<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' />
|
18 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention required. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php
|
45 |
<br/>
|
46 |
<ul class="nsx_tabs">
|
47 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
48 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
49 |
</ul>
|
50 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
51 |
<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%;">
|
73 |
|
74 |
</div>
|
75 |
<?php /* ######################## Tools Tab ####################### */ ?>
|
76 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
77 |
+
|
78 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
79 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
<div class="nxs_tls_cpt"><?php _e('Auto Import of Replies and Mentions:', 'nxs_snap'); ?></div>
|
82 |
<div class="nxs_tls_bd">
|
90 |
<?php } else { echo "<br/>"; _e('Please activate the "Comments Import" from SNAP Settings Tab', 'nxs_snap'); } ?>
|
91 |
</div>
|
92 |
|
93 |
+
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
94 |
|
95 |
+
</div> <?php } ?>
|
96 |
</div><br/>
|
97 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div>
|
98 |
|
99 |
</div>
|
100 |
<?php
|
101 |
}
|
102 |
//#### Set Unit Settings from POST
|
103 |
+
function setNTSettings($post, $options){ $code = 'TW'; $lcode = 'tw';
|
104 |
foreach ($post as $ii => $pval){
|
105 |
if (isset($pval['apTWURL']) && $pval['apTWURL']!='') { if (!isset($options[$ii])) $options[$ii] = array();
|
106 |
if (isset($pval['apDoTW'])) $options[$ii]['doTW'] = $pval['apDoTW']; else $options[$ii]['doTW'] = 0;
|
110 |
if (isset($pval['apTWConsSec'])) $options[$ii]['twConsSec'] = trim($pval['apTWConsSec']);
|
111 |
if (isset($pval['apTWAccToken'])) $options[$ii]['twAccToken'] = trim($pval['apTWAccToken']);
|
112 |
|
113 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
114 |
if (isset($options[$ii]['catSel']) && $options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
115 |
|
116 |
if (isset($pval['riComments'])) $options[$ii]['riComments'] = $pval['riComments']; else $options[$ii]['riComments'] = 0;
|
124 |
if (isset($pval['attchImg'])) $options[$ii]['attchImg'] = $pval['attchImg']; else $options[$ii]['attchImg'] = 0;
|
125 |
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']);
|
126 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
127 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
128 |
} return $options;
|
129 |
}
|
130 |
//#### Show Post->Edit Meta Box Settings
|
134 |
$doTW = $ntOpt['doTW'] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse'];
|
135 |
$isAvailTW = $ntOpt['twURL']!='' && $ntOpt['twConsKey']!='' && $ntOpt['twConsSec']!='' && $ntOpt['twAccToken']!=''; $twMsgFormat = htmlentities($ntOpt['twMsgFormat'], ENT_COMPAT, "UTF-8"); $isAttchImg = $ntOpt['attchImg'];
|
136 |
?>
|
137 |
+
<tr><th style="text-align:left;" colspan="2">
|
138 |
+
<?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 } ?>
|
139 |
+
<?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 } ?>
|
140 |
<?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"'; ?> />
|
141 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="tw[<?php echo $ii; ?>][doTW]" value="<?php echo $doTW;?>"> <?php } ?> <?php } ?>
|
142 |
<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', 'nxs_snap') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)
|
153 |
</td></tr>
|
154 |
|
155 |
<?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>
|
156 |
+
<?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); } ?>
|
157 |
|
158 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
159 |
|
160 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
161 |
<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"; ?> />
|
162 |
</th>
|
163 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
164 |
</td></tr> <?php } ?>
|
165 |
|
166 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"><?php _e('Message Format:', 'nxs_snap') ?></th>
|
167 |
<td><input value="<?php echo $twMsgFormat ?>" type="text" name="tw[<?php echo $ii; ?>][SNAPformat]" style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apTWMsgFrmt<?php echo $ii; ?>');"/><?php nxs_doShowHint("apTWMsgFrmt".$ii); ?></td></tr>
|
168 |
|
169 |
<tr><th scope="row" style="text-align:right; width:150px; vertical-align:top; padding-top: 5px; padding-right:10px;">
|
249 |
nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'.' |'.$options['pType']); return;
|
250 |
}
|
251 |
}
|
252 |
+
$blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url(); $uln = 0; $extInfo = ' | PostID: '.$postID;
|
|
|
253 |
|
254 |
if ($options['attchImg']=='1') { if (trim($options['imgToUse'])!='') $imgURL = $options['imgToUse']; else $imgURL = nxs_getPostImage($postID); if (preg_match("/noImg.\.png/i", $imgURL)) $imgURL = '';
|
255 |
+
if(trim($imgURL)=='') $options['attchImg'] = 0; else { $imgURL = str_replace(' ', '%20', $imgURL);
|
256 |
if( ini_get('allow_url_fopen') ) { if (@getimagesize($imgURL)!==false) { $img = wp_remote_get($imgURL);
|
257 |
+
if (is_wp_error($img)) $options['attchImg'] = 0; else if ( (!empty($img['headers']['content-length'])) && (int)$img['headers']['content-length']<200) { $options['attchImg'] = 0; } else $img = $img['body']; } else $options['attchImg'] = 0;
|
258 |
+
} else { $img = wp_remote_get($imgURL); if(is_wp_error($img)) $options['attchImg'] = 0; elseif (isset($img['body'])&& trim($img['body'])!='') $img = $img['body']; else $options['attchImg'] = 0; }
|
259 |
+
if ($options['attchImg'] == 0) nxs_addToLogN('E', 'Error', $logNT, 'Could not get image ('.$imgURL.'), will post without it - Error:'.print_r($img, true), $extInfo);
|
260 |
}
|
|
|
261 |
}
|
262 |
+
if ($options['attchImg']=='1' && $img!='') $twLim = 117; else $twLim = 140;
|
|
|
263 |
if ($postID=='0') { echo "Testing ... <br/><br/>"; $msg = 'Test Post from '.nsTrnc($blogTitle, $twLim - 24)." - ".rand(1, 155); $uln = nxs_strLen($msg);}
|
264 |
else{ $post = get_post($postID); if(!$post) return; $twMsgFormat = $options['twMsgFormat']; nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1'));
|
265 |
$extInfo = ' | PostID: '.$postID." - ".$post->post_title.' |'.$options['pType'];
|
351 |
else { nxs_addToRI($postID); 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); }
|
352 |
}
|
353 |
//## Return Result
|
354 |
+
if ($ret['isPosted']=='1') return 200; else return print_r($ret, true);
|
|
|
355 |
}
|
356 |
}
|
357 |
|
inc-cl/vb.api.php
CHANGED
@@ -25,8 +25,8 @@ if (!class_exists("nxs_class_SNAP_VB")) { class nxs_class_SNAP_VB {
|
|
25 |
} else return 'No Saved Login';
|
26 |
return false;
|
27 |
}
|
28 |
-
function nxs_doConnectToVB($u, $p, $url){ global $nxs_vbCkArray; $hdrsArr = $this->nxs_getVBHeaders($url
|
29 |
-
$response = wp_remote_get($url); if(is_wp_error($response)) return "Invalid Connection. ".print_r($response, true);
|
30 |
$contents = $response['body']; //$response['body'] = htmlentities($response['body']); prr($response); die();
|
31 |
$ckArr = $response['cookies']; $mdhashLoc = stripos($contents, 'md5hash(vb_login_password');
|
32 |
if ($mdhashLoc===false) return "No VB found";
|
@@ -36,8 +36,9 @@ if (!class_exists("nxs_class_SNAP_VB")) { class nxs_class_SNAP_VB {
|
|
36 |
$frmTxt = substr($frmTxt, stripos($frmTxt, '<input')+8);
|
37 |
} $flds['vb_login_username'] = $u; $flds['vb_login_md5password'] = md5($p); $flds['vb_login_md5password_utf'] = md5($p); $flds['cookieuser'] = '1'; $flds['do'] = 'login';
|
38 |
|
39 |
-
// $logURL = substr($contents, $mdhashLoc-250, 250); $logURL = CutFromTo($logURL, 'action="', '"');
|
40 |
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);}
|
|
|
41 |
$r2 = wp_remote_post( $baseURL.'login.php?do=login', array( 'method' => 'POST', 'timeout' => 45, 'redirection' => 0, 'headers' => $hdrsArr, 'body' => $flds, 'cookies' => $ckArr)); // prr($r2);
|
42 |
if (stripos($r2['body'],'exec_refresh()')!==false) { $ckArr = nxsMergeArraysOV($ckArr, $r2['cookies']); $nxs_vbCkArray = $ckArr; return false; } else return "Bad Username/Password";
|
43 |
}
|
@@ -67,16 +68,19 @@ if (!class_exists("nxs_class_SNAP_VB")) { class nxs_class_SNAP_VB {
|
|
67 |
} $flds['title'] = $subj; $flds['message'] = $msg; $flds['message_backup'] = $msg; $flds['wysiwyg'] = '1'; $flds['do'] = 'postreply'; $flds['parseurl'] = '1'; $flds['sbutton'] = 'Submit+Reply';
|
68 |
$smURL = $baseURL.'newreply.php?do=postreply'.str_replace('&','&',$fid);
|
69 |
} //prr($flds);
|
70 |
-
$r2 = wp_remote_post( $smURL, array( 'method' => 'POST', 'timeout' => 45, 'redirection' => 0, 'headers' => $hdrsArr, 'body' => $flds, 'cookies' => $ckArr))
|
|
|
|
|
71 |
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);
|
72 |
$r2 = wp_remote_post( $smURL, array( 'method' => 'POST', 'timeout' => 45, 'redirection' => 0, 'headers' => $hdrsArr, 'body' => $flds, 'cookies' => $ckArr));
|
73 |
}
|
|
|
74 |
if (stripos($r2['body'], 'errorblock')!==false) return trim(strip_tags( CutFromTo($r2['body'], 'errorblock','</div>')));
|
75 |
if (stripos($r2['body'], 'exec_refresh()')!==false && stripos($r2['body'], 'blockrow restore">')!==false) return trim(strip_tags( CutFromTo($r2['body'], 'blockrow restore">','</p>')));
|
76 |
if (stripos($r2['body'], '<error>')!==false) return trim(strip_tags( CutFromTo($r2['body'], '<error>','</error>')));
|
77 |
if ( $r2['response']['code']=='302' || $r2['response']['code']=='303') { return array("code"=>"OK", "post_id"=>$r2['headers']['location']); }
|
78 |
if (stripos($r2['body'], '<newpostid>')!==false || stripos($r2['body'], 'postbit postid="')!==false ) return 'OK';
|
79 |
-
return "Something wrong";
|
80 |
}
|
81 |
|
82 |
function doPostToNT($options, $message){ $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>''); global $nxs_vbCkArray;
|
@@ -93,7 +97,7 @@ if (!class_exists("nxs_class_SNAP_VB")) { class nxs_class_SNAP_VB {
|
|
93 |
if ($loginError!==false) return "ERROR - BAD USER/PASS - ".print_r($loginError, true);
|
94 |
$ret = $this->nxs_doPostToVB($options['vbURL'], $msgT, $msg, $urlToGo, $message['tags']);
|
95 |
|
96 |
-
if ( (!is_array($ret)) && $ret!='OK') $badOut['Error'] .= 'Something went wrong -
|
97 |
return $badOut;
|
98 |
}
|
99 |
}}
|
25 |
} else return 'No Saved Login';
|
26 |
return false;
|
27 |
}
|
28 |
+
function nxs_doConnectToVB($u, $p, $url){ global $nxs_vbCkArray; $hdrsArr = $this->nxs_getVBHeaders($url); $mids = '';// echo "LOGGIN";
|
29 |
+
$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);
|
30 |
$contents = $response['body']; //$response['body'] = htmlentities($response['body']); prr($response); die();
|
31 |
$ckArr = $response['cookies']; $mdhashLoc = stripos($contents, 'md5hash(vb_login_password');
|
32 |
if ($mdhashLoc===false) return "No VB found";
|
36 |
$frmTxt = substr($frmTxt, stripos($frmTxt, '<input')+8);
|
37 |
} $flds['vb_login_username'] = $u; $flds['vb_login_md5password'] = md5($p); $flds['vb_login_md5password_utf'] = md5($p); $flds['cookieuser'] = '1'; $flds['do'] = 'login';
|
38 |
|
39 |
+
// $logURL = substr($contents, $mdhashLoc-250, 250); $logURL = CutFromTo($logURL, 'action="', '"');
|
40 |
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);}
|
41 |
+
$hdrsArr = $this->nxs_getVBHeaders($url, true);
|
42 |
$r2 = wp_remote_post( $baseURL.'login.php?do=login', array( 'method' => 'POST', 'timeout' => 45, 'redirection' => 0, 'headers' => $hdrsArr, 'body' => $flds, 'cookies' => $ckArr)); // prr($r2);
|
43 |
if (stripos($r2['body'],'exec_refresh()')!==false) { $ckArr = nxsMergeArraysOV($ckArr, $r2['cookies']); $nxs_vbCkArray = $ckArr; return false; } else return "Bad Username/Password";
|
44 |
}
|
68 |
} $flds['title'] = $subj; $flds['message'] = $msg; $flds['message_backup'] = $msg; $flds['wysiwyg'] = '1'; $flds['do'] = 'postreply'; $flds['parseurl'] = '1'; $flds['sbutton'] = 'Submit+Reply';
|
69 |
$smURL = $baseURL.'newreply.php?do=postreply'.str_replace('&','&',$fid);
|
70 |
} //prr($flds);
|
71 |
+
$r2 = wp_remote_post( $smURL, array( 'method' => 'POST', 'timeout' => 45, 'redirection' => 0, 'headers' => $hdrsArr, 'body' => $flds, 'cookies' => $ckArr));
|
72 |
+
// prr($r2['response']); prr(htmlentities($r2['body'])); $r2['body'] = ''; prr($r2); die();
|
73 |
+
if(is_wp_error($r2)) return "Invalid Connection. ".print_r($r2, true);
|
74 |
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);
|
75 |
$r2 = wp_remote_post( $smURL, array( 'method' => 'POST', 'timeout' => 45, 'redirection' => 0, 'headers' => $hdrsArr, 'body' => $flds, 'cookies' => $ckArr));
|
76 |
}
|
77 |
+
if(is_wp_error($r2)) return "Invalid Connection. ".print_r($r2, true);
|
78 |
if (stripos($r2['body'], 'errorblock')!==false) return trim(strip_tags( CutFromTo($r2['body'], 'errorblock','</div>')));
|
79 |
if (stripos($r2['body'], 'exec_refresh()')!==false && stripos($r2['body'], 'blockrow restore">')!==false) return trim(strip_tags( CutFromTo($r2['body'], 'blockrow restore">','</p>')));
|
80 |
if (stripos($r2['body'], '<error>')!==false) return trim(strip_tags( CutFromTo($r2['body'], '<error>','</error>')));
|
81 |
if ( $r2['response']['code']=='302' || $r2['response']['code']=='303') { return array("code"=>"OK", "post_id"=>$r2['headers']['location']); }
|
82 |
if (stripos($r2['body'], '<newpostid>')!==false || stripos($r2['body'], 'postbit postid="')!==false ) return 'OK';
|
83 |
+
return "Something wrong - Error: ".print_r($r2, true);
|
84 |
}
|
85 |
|
86 |
function doPostToNT($options, $message){ $badOut = array('pgID'=>'', 'isPosted'=>0, 'pDate'=>date('Y-m-d H:i:s'), 'Error'=>''); global $nxs_vbCkArray;
|
97 |
if ($loginError!==false) return "ERROR - BAD USER/PASS - ".print_r($loginError, true);
|
98 |
$ret = $this->nxs_doPostToVB($options['vbURL'], $msgT, $msg, $urlToGo, $message['tags']);
|
99 |
|
100 |
+
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'));
|
101 |
return $badOut;
|
102 |
}
|
103 |
}}
|
inc-cl/vb.php
CHANGED
@@ -14,14 +14,14 @@ if (!class_exists("nxs_snapClassVB")) { class nxs_snapClassVB {
|
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
17 |
-
<p style="margin:0px;margin-left:5px;">
|
18 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
-
</p><?php
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php
|
@@ -44,7 +44,7 @@ if (!class_exists("nxs_snapClassVB")) { class nxs_snapClassVB {
|
|
44 |
<br/>
|
45 |
<ul class="nsx_tabs">
|
46 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
47 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
48 |
</ul>
|
49 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
50 |
<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%;">
|
@@ -89,28 +89,20 @@ if (!class_exists("nxs_snapClassVB")) { class nxs_snapClassVB {
|
|
89 |
|
90 |
?></div>
|
91 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
92 |
-
<div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
93 |
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
<input value="1" id="catSelS<?php echo $ntU; ?><?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 $ntU; ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo $ntU; ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo $ntU; ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
98 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
99 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
100 |
-
<br/>
|
101 |
-
<?php } ?>
|
102 |
-
|
103 |
-
<?php nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
104 |
-
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
105 |
|
106 |
|
107 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
108 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
109 |
|
110 |
-
<div class="submit
|
111 |
}
|
112 |
//#### Set Unit Settings from POST
|
113 |
-
function setNTSettings($post, $options){
|
114 |
foreach ($post as $ii => $pval){
|
115 |
if (isset($pval['apVBUName']) && $pval['apVBUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
116 |
if (isset($pval['apVBUName'])) $options[$ii]['vbUName'] = trim($pval['apVBUName']);
|
@@ -122,7 +114,7 @@ if (!class_exists("nxs_snapClassVB")) { class nxs_snapClassVB {
|
|
122 |
if (isset($pval['apVBMsgTFrmt'])) $options[$ii]['vbMsgTFormat'] = trim($pval['apVBMsgTFrmt']);
|
123 |
if (isset($pval['apVBMsgFrmt'])) $options[$ii]['vbMsgFormat'] = trim($pval['apVBMsgFrmt']);
|
124 |
|
125 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
126 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
127 |
|
128 |
if (isset($pval['apDoVB'])) $options[$ii]['doVB'] = $pval['apDoVB']; else $options[$ii]['doVB'] = 0;
|
@@ -132,7 +124,7 @@ if (!class_exists("nxs_snapClassVB")) { class nxs_snapClassVB {
|
|
132 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
133 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
134 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
135 |
-
}
|
136 |
} return $options;
|
137 |
}
|
138 |
//#### Show Post->Edit Meta Box Settings
|
@@ -141,7 +133,9 @@ if (!class_exists("nxs_snapClassVB")) { class nxs_snapClassVB {
|
|
141 |
$doVB = $ntOpt['doVB'] && (is_array($pMeta) || $ntOpt['catSel']!='1');
|
142 |
$isAvailVB = $ntOpt['vbUName']!='' && $ntOpt['vbPass']!=''; $vbMsgFormat = htmlentities($ntOpt['vbMsgFormat'], ENT_COMPAT, "UTF-8"); $vbMsgTFormat = htmlentities($ntOpt['vbMsgTFormat'], ENT_COMPAT, "UTF-8");
|
143 |
?>
|
144 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
145 |
<?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"'; ?> />
|
146 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="vb[<?php echo $ii; ?>][doVB]" value="<?php echo $doVB;?>"> <?php } ?> <?php } ?>
|
147 |
|
@@ -158,20 +152,20 @@ if (!class_exists("nxs_snapClassVB")) { class nxs_snapClassVB {
|
|
158 |
</td></tr>
|
159 |
|
160 |
<?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>
|
161 |
-
<?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $ntOpt); } ?>
|
162 |
|
163 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
164 |
|
165 |
-
<tr id="altFormat1" style=""><th scope="row"
|
166 |
<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"; ?> />
|
167 |
</th>
|
168 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
169 |
</td></tr> <?php } ?>
|
170 |
|
171 |
-
<tr id="altFormat1" style=""><th scope="row"
|
172 |
<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>
|
173 |
|
174 |
-
<tr id="altFormat1" style=""><th scope="row"
|
175 |
<td>
|
176 |
<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>
|
177 |
<?php nxs_doShowHint("apVBMsgFrmt".$ii); ?></td></tr>
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
17 |
+
<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' />
|
18 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php
|
44 |
<br/>
|
45 |
<ul class="nsx_tabs">
|
46 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
47 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
48 |
</ul>
|
49 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
50 |
<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%;">
|
89 |
|
90 |
?></div>
|
91 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
92 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
93 |
|
94 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
95 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
96 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
|
99 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
100 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
101 |
|
102 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div></div><?php
|
103 |
}
|
104 |
//#### Set Unit Settings from POST
|
105 |
+
function setNTSettings($post, $options){ $code = 'VB'; $lcode = 'vb';
|
106 |
foreach ($post as $ii => $pval){
|
107 |
if (isset($pval['apVBUName']) && $pval['apVBUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
108 |
if (isset($pval['apVBUName'])) $options[$ii]['vbUName'] = trim($pval['apVBUName']);
|
114 |
if (isset($pval['apVBMsgTFrmt'])) $options[$ii]['vbMsgTFormat'] = trim($pval['apVBMsgTFrmt']);
|
115 |
if (isset($pval['apVBMsgFrmt'])) $options[$ii]['vbMsgFormat'] = trim($pval['apVBMsgFrmt']);
|
116 |
|
117 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
118 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
119 |
|
120 |
if (isset($pval['apDoVB'])) $options[$ii]['doVB'] = $pval['apDoVB']; else $options[$ii]['doVB'] = 0;
|
124 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
125 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
126 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
127 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
128 |
} return $options;
|
129 |
}
|
130 |
//#### Show Post->Edit Meta Box Settings
|
133 |
$doVB = $ntOpt['doVB'] && (is_array($pMeta) || $ntOpt['catSel']!='1');
|
134 |
$isAvailVB = $ntOpt['vbUName']!='' && $ntOpt['vbPass']!=''; $vbMsgFormat = htmlentities($ntOpt['vbMsgFormat'], ENT_COMPAT, "UTF-8"); $vbMsgTFormat = htmlentities($ntOpt['vbMsgTFormat'], ENT_COMPAT, "UTF-8");
|
135 |
?>
|
136 |
+
<tr><th style="text-align:left;" colspan="2">
|
137 |
+
<?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 } ?>
|
138 |
+
<?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 } ?>
|
139 |
<?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"'; ?> />
|
140 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="vb[<?php echo $ii; ?>][doVB]" value="<?php echo $doVB;?>"> <?php } ?> <?php } ?>
|
141 |
|
152 |
</td></tr>
|
153 |
|
154 |
<?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>
|
155 |
+
<?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); } ?>
|
156 |
|
157 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
158 |
|
159 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
160 |
<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"; ?> />
|
161 |
</th>
|
162 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
163 |
</td></tr> <?php } ?>
|
164 |
|
165 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"><?php _e('Text Format:', 'nxs_snap') ?></th>
|
166 |
<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>
|
167 |
|
168 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"><?php _e('Text Format:', 'nxs_snap') ?></th>
|
169 |
<td>
|
170 |
<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>
|
171 |
<?php nxs_doShowHint("apVBMsgFrmt".$ii); ?></td></tr>
|
inc-cl/vk.api.php
CHANGED
@@ -23,6 +23,7 @@ if (!class_exists("nxs_class_SNAP_VK")) { class nxs_class_SNAP_VK {
|
|
23 |
file_put_contents($tmp, $imgData);
|
24 |
|
25 |
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $VKuploadUrl); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
|
|
26 |
curl_setopt($ch, CURLOPT_POSTFIELDS, array('photo' => '@' . $tmp)); $response = curl_exec($ch); $errmsg = curl_error($ch); curl_close($ch); //prr($response);
|
27 |
|
28 |
$uploadResultObj = json_decode($response); // prr($response); //prr($uploadResultObj);
|
23 |
file_put_contents($tmp, $imgData);
|
24 |
|
25 |
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $VKuploadUrl); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
26 |
+
global $nxs_skipSSLCheck; if ($nxs_skipSSLCheck===true) curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
27 |
curl_setopt($ch, CURLOPT_POSTFIELDS, array('photo' => '@' . $tmp)); $response = curl_exec($ch); $errmsg = curl_error($ch); curl_close($ch); //prr($response);
|
28 |
|
29 |
$uploadResultObj = json_decode($response); // prr($response); //prr($uploadResultObj);
|
inc-cl/vk.php
CHANGED
@@ -14,14 +14,14 @@ if (!class_exists("nxs_snapClassVK")) { class nxs_snapClassVK {
|
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('https://vk.com','', str_ireplace('http://vk.com','', $pbo['url'])); ?>
|
17 |
-
<p style="margin:0px;margin-left:5px;">
|
18 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
-
</p><?php
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php
|
@@ -29,7 +29,7 @@ if (!class_exists("nxs_snapClassVK")) { class nxs_snapClassVK {
|
|
29 |
//#### Show NEW Settings Page
|
30 |
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);}
|
31 |
//#### Show Unit Settings
|
32 |
-
function showNTSettings($ii, $options, $isNew=false){ global $nxs_plurl
|
33 |
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'] = '';
|
34 |
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'] = '';
|
35 |
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'] = ''; ?>
|
@@ -48,7 +48,7 @@ if (!class_exists("nxs_snapClassVK")) { class nxs_snapClassVK {
|
|
48 |
<br/>
|
49 |
<ul class="nsx_tabs">
|
50 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
51 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
52 |
</ul>
|
53 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
54 |
<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%;">
|
@@ -135,32 +135,24 @@ if (!class_exists("nxs_snapClassVK")) { class nxs_snapClassVK {
|
|
135 |
|
136 |
</div>
|
137 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
138 |
-
|
139 |
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
<input value="1" id="catSelS<?php echo $ntU; ?><?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 $ntU; ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo $ntU; ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo $ntU; ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
144 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
145 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
146 |
-
<br/>
|
147 |
-
<?php } ?>
|
148 |
-
|
149 |
-
<?php nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
150 |
-
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
151 |
|
152 |
|
153 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
154 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
155 |
|
156 |
-
<div class="submit
|
157 |
|
158 |
</div>
|
159 |
<?php
|
160 |
|
161 |
}
|
162 |
//#### Set Unit Settings from POST
|
163 |
-
function setNTSettings($post, $options){
|
164 |
foreach ($post as $ii => $pval){
|
165 |
if (isset($pval['apVKAppID']) && $pval['apVKAppID']!='') { if (!isset($options[$ii])) $options[$ii] = array();
|
166 |
if (isset($pval['apDoVK'])) $options[$ii]['doVK'] = $pval['apDoVK']; else $options[$ii]['doVK'] = 0;
|
@@ -184,7 +176,7 @@ if (!class_exists("nxs_snapClassVK")) { class nxs_snapClassVK {
|
|
184 |
}
|
185 |
|
186 |
|
187 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
188 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
189 |
|
190 |
if (isset($pval['postType'])) $options[$ii]['postType'] = trim($pval['postType']);
|
@@ -209,7 +201,7 @@ if (!class_exists("nxs_snapClassVK")) { class nxs_snapClassVK {
|
|
209 |
$options[$ii]['vkPgID'] = $vkPgID; //echo $vkPgID;
|
210 |
if (strpos($options[$ii]['url'], '?')!==false) $options[$ii]['url'] = substr($options[$ii]['url'], 0, strpos($options[$ii]['url'], '?'));// prr($pval); prr($options[$ii]); // die();
|
211 |
}
|
212 |
-
}
|
213 |
} return $options;
|
214 |
}
|
215 |
//#### Show Post->Edit Meta Box Settings
|
@@ -219,7 +211,9 @@ if (!class_exists("nxs_snapClassVK")) { class nxs_snapClassVK {
|
|
219 |
$doVK = $ntOpt['doVK'] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse']; $urlToUse = $ntOpt['urlToUse'];
|
220 |
$isAvailVK = $ntOpt['url']!='' && $ntOpt['vkAppID']!='' || $ntOpt['uPass']!=''; $isAttachVK = $ntOpt['attch']; $msgFrmt = htmlentities($ntOpt['msgFrmt'], ENT_COMPAT, "UTF-8"); $postType = $ntOpt['postType'];
|
221 |
?>
|
222 |
-
<tr><th style="text-align:left;" colspan="2">
|
|
|
|
|
223 |
<?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"'; ?> />
|
224 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="vk[<?php echo $ii; ?>][doVK]" value="<?php echo $doVK;?>"> <?php } ?> <?php } ?>
|
225 |
<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', 'nxs_snap') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th>
|
@@ -233,16 +227,16 @@ if (!class_exists("nxs_snapClassVK")) { class nxs_snapClassVK {
|
|
233 |
<?php } ?>
|
234 |
</td></tr>
|
235 |
<?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>
|
236 |
-
<?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $ntOpt); } ?>
|
237 |
|
238 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
239 |
|
240 |
-
<tr id="altFormat1" style=""><th scope="row"
|
241 |
<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"; ?> />
|
242 |
</th>
|
243 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
244 |
</td></tr> <?php } ?>
|
245 |
-
<tr id="altFormat1" style=""><th scope="row" valign="top"
|
246 |
<td>
|
247 |
<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>
|
248 |
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('https://vk.com','', str_ireplace('http://vk.com','', $pbo['url'])); ?>
|
17 |
+
<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' />
|
18 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php
|
29 |
//#### Show NEW Settings Page
|
30 |
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);}
|
31 |
//#### Show Unit Settings
|
32 |
+
function showNTSettings($ii, $options, $isNew=false){ global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt);
|
33 |
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'] = '';
|
34 |
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'] = '';
|
35 |
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'] = ''; ?>
|
48 |
<br/>
|
49 |
<ul class="nsx_tabs">
|
50 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
51 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
52 |
</ul>
|
53 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
54 |
<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%;">
|
135 |
|
136 |
</div>
|
137 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
138 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
139 |
|
140 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
141 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
142 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
|
144 |
|
145 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
146 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
147 |
|
148 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div>
|
149 |
|
150 |
</div>
|
151 |
<?php
|
152 |
|
153 |
}
|
154 |
//#### Set Unit Settings from POST
|
155 |
+
function setNTSettings($post, $options){ $code = 'VK'; $lcode = 'vk';
|
156 |
foreach ($post as $ii => $pval){
|
157 |
if (isset($pval['apVKAppID']) && $pval['apVKAppID']!='') { if (!isset($options[$ii])) $options[$ii] = array();
|
158 |
if (isset($pval['apDoVK'])) $options[$ii]['doVK'] = $pval['apDoVK']; else $options[$ii]['doVK'] = 0;
|
176 |
}
|
177 |
|
178 |
|
179 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
180 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
181 |
|
182 |
if (isset($pval['postType'])) $options[$ii]['postType'] = trim($pval['postType']);
|
201 |
$options[$ii]['vkPgID'] = $vkPgID; //echo $vkPgID;
|
202 |
if (strpos($options[$ii]['url'], '?')!==false) $options[$ii]['url'] = substr($options[$ii]['url'], 0, strpos($options[$ii]['url'], '?'));// prr($pval); prr($options[$ii]); // die();
|
203 |
}
|
204 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
205 |
} return $options;
|
206 |
}
|
207 |
//#### Show Post->Edit Meta Box Settings
|
211 |
$doVK = $ntOpt['doVK'] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse']; $urlToUse = $ntOpt['urlToUse'];
|
212 |
$isAvailVK = $ntOpt['url']!='' && $ntOpt['vkAppID']!='' || $ntOpt['uPass']!=''; $isAttachVK = $ntOpt['attch']; $msgFrmt = htmlentities($ntOpt['msgFrmt'], ENT_COMPAT, "UTF-8"); $postType = $ntOpt['postType'];
|
213 |
?>
|
214 |
+
<tr><th style="text-align:left;" colspan="2">
|
215 |
+
<?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 } ?>
|
216 |
+
<?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 } ?>
|
217 |
<?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"'; ?> />
|
218 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="vk[<?php echo $ii; ?>][doVK]" value="<?php echo $doVK;?>"> <?php } ?> <?php } ?>
|
219 |
<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', 'nxs_snap') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th>
|
227 |
<?php } ?>
|
228 |
</td></tr>
|
229 |
<?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>
|
230 |
+
<?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); } ?>
|
231 |
|
232 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
233 |
|
234 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
235 |
<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"; ?> />
|
236 |
</th>
|
237 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
238 |
</td></tr> <?php } ?>
|
239 |
+
<tr id="altFormat1" style=""><th scope="row" valign="top" class="nxsTHRow"><?php _e('Message Format:', 'nxs_snap') ?></th>
|
240 |
<td>
|
241 |
<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>
|
242 |
|
inc-cl/wp.api.php
CHANGED
@@ -26,10 +26,9 @@ if (!class_exists("nxs_class_SNAP_WP")) { class nxs_class_SNAP_WP {
|
|
26 |
//## Format
|
27 |
$msg = nxs_doFormatMsg($options['wpMsgFormat'], $message); $msgT = nxs_doFormatMsg($options['wpMsgTFormat'], $message);
|
28 |
if (isset($message['imageURL'])) $imgURL = trim(nxs_getImgfrOpt($message['imageURL'], $options['imgSize'])); else $imgURL = '';
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
//## Post
|
34 |
require_once ('apis/xmlrpc-client.php'); $nxsToWPclient = new NXS_XMLRPC_Client($options['wpURL']); $nxsToWPclient->debug = false;
|
35 |
if ($imgURL!=='' && stripos($imgURL, 'http')!==false) {
|
26 |
//## Format
|
27 |
$msg = nxs_doFormatMsg($options['wpMsgFormat'], $message); $msgT = nxs_doFormatMsg($options['wpMsgTFormat'], $message);
|
28 |
if (isset($message['imageURL'])) $imgURL = trim(nxs_getImgfrOpt($message['imageURL'], $options['imgSize'])); else $imgURL = '';
|
29 |
+
$link = urlencode($message['url']); $ext = substr($msg, 0, 1000);
|
30 |
+
//## Fix missing xmlrpc.php
|
31 |
+
if (substr($options['wpURL'], -1)=='/') $options['wpURL'] = substr($options['wpURL'], 0, -1); if (substr($options['wpURL'], -10)!='xmlrpc.php') $options['wpURL'] .= "/xmlrpc.php";
|
|
|
32 |
//## Post
|
33 |
require_once ('apis/xmlrpc-client.php'); $nxsToWPclient = new NXS_XMLRPC_Client($options['wpURL']); $nxsToWPclient->debug = false;
|
34 |
if ($imgURL!=='' && stripos($imgURL, 'http')!==false) {
|
inc-cl/wp.php
CHANGED
@@ -14,14 +14,14 @@ if (!class_exists("nxs_snapClassWP")) { class nxs_snapClassWP {
|
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('/xmlrpc.php','', str_ireplace('http://','', str_ireplace('https://','', $pbo['wpURL']))); ?>
|
17 |
-
<p style="margin:0px;margin-left:5px;">
|
18 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
-
</p><?php
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php
|
@@ -44,7 +44,7 @@ if (!class_exists("nxs_snapClassWP")) { class nxs_snapClassWP {
|
|
44 |
<br/>
|
45 |
<ul class="nsx_tabs">
|
46 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
47 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
48 |
</ul>
|
49 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
50 |
<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%;">
|
@@ -86,28 +86,20 @@ if (!class_exists("nxs_snapClassWP")) { class nxs_snapClassWP {
|
|
86 |
|
87 |
?></div>
|
88 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
89 |
-
|
90 |
|
91 |
-
<?php
|
92 |
-
|
93 |
-
|
94 |
-
<input value="1" id="catSelS<?php echo $ntU; ?><?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 $ntU; ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo $ntU; ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo $ntU; ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
95 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
96 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
97 |
-
<br/>
|
98 |
-
<?php } ?>
|
99 |
-
|
100 |
-
<?php nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
101 |
-
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
102 |
|
103 |
|
104 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
105 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
106 |
|
107 |
-
<div class="submit
|
108 |
}
|
109 |
//#### Set Unit Settings from POST
|
110 |
-
function setNTSettings($post, $options){
|
111 |
foreach ($post as $ii => $pval){
|
112 |
if (isset($pval['apWPUName']) && $pval['apWPUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
113 |
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'];
|
@@ -117,7 +109,7 @@ if (!class_exists("nxs_snapClassWP")) { class nxs_snapClassWP {
|
|
117 |
if (isset($pval['apWPMsgFrmt'])) $options[$ii]['wpMsgFormat'] = trim($pval['apWPMsgFrmt']);
|
118 |
if (isset($pval['apWPMsgTFrmt'])) $options[$ii]['wpMsgTFormat'] = trim($pval['apWPMsgTFrmt']);
|
119 |
|
120 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
121 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
122 |
|
123 |
if (isset($pval['apDoWP'])) $options[$ii]['doWP'] = $pval['apDoWP']; else $options[$ii]['doWP'] = 0;
|
@@ -127,7 +119,7 @@ if (!class_exists("nxs_snapClassWP")) { class nxs_snapClassWP {
|
|
127 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
128 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
129 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
130 |
-
}
|
131 |
} return $options;
|
132 |
}
|
133 |
//#### Show Post->Edit Meta Box Settings
|
@@ -137,7 +129,9 @@ if (!class_exists("nxs_snapClassWP")) { class nxs_snapClassWP {
|
|
137 |
$doWP = $ntOpt['doWP'] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse'];
|
138 |
$isAvailWP = $ntOpt['wpUName']!='' && $ntOpt['wpPass']!=''; $wpMsgFormat = htmlentities($ntOpt['wpMsgFormat'], ENT_COMPAT, "UTF-8"); $wpMsgTFormat = htmlentities($ntOpt['wpMsgTFormat'], ENT_COMPAT, "UTF-8");
|
139 |
?>
|
140 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
141 |
<?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"'; ?> />
|
142 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="wp[<?php echo $ii; ?>][doWP]" value="<?php echo $doWP;?>"> <?php } ?> <?php } ?>
|
143 |
<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', 'nxs_snap') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"
|
@@ -153,20 +147,20 @@ if (!class_exists("nxs_snapClassWP")) { class nxs_snapClassWP {
|
|
153 |
</td></tr>
|
154 |
|
155 |
<?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>
|
156 |
-
<?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { nxs_doSMAS5($nt, $ii, $ntOpt); } ?>
|
157 |
|
158 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
159 |
|
160 |
-
<tr id="altFormat1" style=""><th scope="row"
|
161 |
<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"; ?> />
|
162 |
</th>
|
163 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
164 |
</td></tr> <?php } ?>
|
165 |
|
166 |
-
<tr id="altFormat1" style=""><th scope="row"
|
167 |
<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>
|
168 |
|
169 |
-
<tr id="altFormat1" style=""><th scope="row"
|
170 |
<td>
|
171 |
<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>
|
172 |
<?php nxs_doShowHint("apWPMsgFrmt".$ii); ?></td></tr>
|
14 |
</div>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?php foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = str_ireplace('/xmlrpc.php','', str_ireplace('http://','', str_ireplace('https://','', $pbo['wpURL']))); ?>
|
17 |
+
<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' />
|
18 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
19 |
<?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 } ?>
|
20 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
21 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
22 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
23 |
<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', 'nxs_snap'); ?>]</a>
|
24 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php //$pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
25 |
}?>
|
26 |
</div>
|
27 |
</div> <?php
|
44 |
<br/>
|
45 |
<ul class="nsx_tabs">
|
46 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
47 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
48 |
</ul>
|
49 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
50 |
<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%;">
|
86 |
|
87 |
?></div>
|
88 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
89 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
90 |
|
91 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
92 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
93 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
|
96 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
97 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
98 |
|
99 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div></div><?php
|
100 |
}
|
101 |
//#### Set Unit Settings from POST
|
102 |
+
function setNTSettings($post, $options){ $code = 'WP'; $lcode = 'wp';
|
103 |
foreach ($post as $ii => $pval){
|
104 |
if (isset($pval['apWPUName']) && $pval['apWPUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
105 |
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'];
|
109 |
if (isset($pval['apWPMsgFrmt'])) $options[$ii]['wpMsgFormat'] = trim($pval['apWPMsgFrmt']);
|
110 |
if (isset($pval['apWPMsgTFrmt'])) $options[$ii]['wpMsgTFormat'] = trim($pval['apWPMsgTFrmt']);
|
111 |
|
112 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
113 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
114 |
|
115 |
if (isset($pval['apDoWP'])) $options[$ii]['doWP'] = $pval['apDoWP']; else $options[$ii]['doWP'] = 0;
|
119 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
120 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
121 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
122 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
123 |
} return $options;
|
124 |
}
|
125 |
//#### Show Post->Edit Meta Box Settings
|
129 |
$doWP = $ntOpt['doWP'] && (is_array($pMeta) || $ntOpt['catSel']!='1'); $imgToUse = $ntOpt['imgToUse'];
|
130 |
$isAvailWP = $ntOpt['wpUName']!='' && $ntOpt['wpPass']!=''; $wpMsgFormat = htmlentities($ntOpt['wpMsgFormat'], ENT_COMPAT, "UTF-8"); $wpMsgTFormat = htmlentities($ntOpt['wpMsgTFormat'], ENT_COMPAT, "UTF-8");
|
131 |
?>
|
132 |
+
<tr><th style="text-align:left;" colspan="2">
|
133 |
+
<?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 } ?>
|
134 |
+
<?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 } ?>
|
135 |
<?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"'; ?> />
|
136 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="wp[<?php echo $ii; ?>][doWP]" value="<?php echo $doWP;?>"> <?php } ?> <?php } ?>
|
137 |
<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', 'nxs_snap') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published"
|
147 |
</td></tr>
|
148 |
|
149 |
<?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>
|
150 |
+
<?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); } ?>
|
151 |
|
152 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
153 |
|
154 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
155 |
<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"; ?> />
|
156 |
</th>
|
157 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
158 |
</td></tr> <?php } ?>
|
159 |
|
160 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"><?php _e('Title Format:', 'nxs_snap') ?></th>
|
161 |
<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>
|
162 |
|
163 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"><?php _e('Text Format:', 'nxs_snap') ?></th>
|
164 |
<td>
|
165 |
<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>
|
166 |
<?php nxs_doShowHint("apWPMsgFrmt".$ii); ?></td></tr>
|
inc-cl/yt.php
CHANGED
@@ -15,14 +15,14 @@ if (!class_exists("nxs_snapClassYT")) { class nxs_snapClassYT {
|
|
15 |
<div class="nxs_box_inside">
|
16 |
<?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.
|
17 |
<?php } else foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
18 |
-
<p style="margin:0px;margin-left:5px;">
|
19 |
-
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="
|
20 |
<?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 } ?>
|
21 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
22 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
23 |
-
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>
|
24 |
<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', 'nxs_snap'); ?>]</a>
|
25 |
-
</p><?php $pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
26 |
}?>
|
27 |
</div>
|
28 |
</div> <?php
|
@@ -38,7 +38,7 @@ if (!class_exists("nxs_snapClassYT")) { class nxs_snapClassYT {
|
|
38 |
<b><?php _e('YouTube API Library not found', 'nxs_snap'); ?></b>
|
39 |
<br/><br/> <?php _e('YouTube doesn\'t have a built-in API for automated posts yet.', 'nxs_snap'); ?> <br/><?php _e('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.', 'nxs_snap'); ?></span></div>
|
40 |
<?php return; }; ?>
|
41 |
-
<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/
|
42 |
|
43 |
<div style="width:100%;"><strong><?php _e('Account Nickname', 'nxs_snap'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'nxs_snap'); ?></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")), 'nxs_snap') ?>" /><br/>
|
44 |
<?php echo nxs_addQTranslSel('yt', $ii, $options['qTLng']); ?>
|
@@ -46,7 +46,7 @@ if (!class_exists("nxs_snapClassYT")) { class nxs_snapClassYT {
|
|
46 |
<br/>
|
47 |
<ul class="nsx_tabs">
|
48 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
49 |
-
<li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li>
|
50 |
</ul>
|
51 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
52 |
<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%;">
|
@@ -79,28 +79,20 @@ if (!class_exists("nxs_snapClassYT")) { class nxs_snapClassYT {
|
|
79 |
<b><?php _e('Test your settings', 'nxs_snap'); ?>:</b> <a href="#" class="NXSButton" onclick="testPost('YT', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'nxs_snap' ), $nType); ?></a> <?php }
|
80 |
?></div>
|
81 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
82 |
-
|
83 |
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
<input value="1" id="catSelS<?php echo $ntU; ?><?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 $ntU; ?><?php echo $ii; ?>" onclick="jQuery('#catSelS<?php echo $ntU; ?><?php echo $ii; ?>').attr('checked', true); jQuery('#tmpCatSelNT').val('<?php echo $ntU; ?><?php echo $ii; ?>'); nxs_markCats( jQuery('#nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
88 |
-
<input type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][catSelEd]" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $options['catSelEd']; ?>" />
|
89 |
-
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
90 |
-
<br/>
|
91 |
-
<?php } ?>
|
92 |
-
|
93 |
-
<?php nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?>
|
94 |
-
<?php nxs_showRepostSettings($nt, $ii, $options); ?>
|
95 |
|
96 |
|
97 |
-
</div> <?php /* #### End of Tab #### */ ?>
|
98 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
99 |
|
100 |
-
<div class="submit
|
101 |
}
|
102 |
//#### Set Unit Settings from POST
|
103 |
-
function setNTSettings($post, $options){
|
104 |
foreach ($post as $ii => $pval){
|
105 |
if (isset($pval['apYTUName']) && $pval['apYTUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
106 |
if (isset($pval['apYTUName'])) $options[$ii]['ytUName'] = trim($pval['apYTUName']);
|
@@ -109,7 +101,7 @@ if (!class_exists("nxs_snapClassYT")) { class nxs_snapClassYT {
|
|
109 |
if (isset($pval['apYTPage'])) $options[$ii]['ytPageID'] = trim($pval['apYTPage']);
|
110 |
if (isset($pval['ytGPPageID'])) $options[$ii]['ytGPPageID'] = trim($pval['ytGPPageID']);
|
111 |
|
112 |
-
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']);
|
113 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
114 |
|
115 |
if (isset($pval['postType'])) $options[$ii]['postType'] = $pval['postType'];
|
@@ -121,7 +113,7 @@ if (!class_exists("nxs_snapClassYT")) { class nxs_snapClassYT {
|
|
121 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
122 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
123 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
124 |
-
}
|
125 |
} return $options;
|
126 |
}
|
127 |
//#### Show Post->Edit Meta Box Settings
|
@@ -130,7 +122,9 @@ if (!class_exists("nxs_snapClassYT")) { class nxs_snapClassYT {
|
|
130 |
$doYT = $ntOpt['doYT'] && (is_array($pMeta) || $ntOpt['catSel']!='1');
|
131 |
$isAvailYT = $ntOpt['ytUName']!='' && $ntOpt['ytPass']!=''; $ytMsgFormat = htmlentities($ntOpt['ytMsgFormat'], ENT_COMPAT, "UTF-8");
|
132 |
?>
|
133 |
-
<tr><th style="text-align:left;" colspan="2"
|
|
|
|
|
134 |
<?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"'; ?> />
|
135 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="yt[<?php echo $ii; ?>][doYT]" value="<?php echo $doYT;?>"> <?php } ?> <?php } ?>
|
136 |
|
@@ -151,7 +145,7 @@ if (!class_exists("nxs_snapClassYT")) { class nxs_snapClassYT {
|
|
151 |
|
152 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
153 |
|
154 |
-
<tr id="altFormat1" style=""><th scope="row"
|
155 |
<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"; ?> />
|
156 |
</th>
|
157 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
15 |
<div class="nxs_box_inside">
|
16 |
<?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.
|
17 |
<?php } else foreach ($ntOpts as $indx=>$pbo){ if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?>
|
18 |
+
<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' />
|
19 |
+
<input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" onchange="<?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?>nxs_doShowWarning(jQuery(this), '<?php echo (substr_count($pbo['catSelEd'], ",")+1); ?>', '<?php echo $ntInfo['code'];?>', '<?php echo $indx;?>');<?php } ?>" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> />
|
20 |
<?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 } ?>
|
21 |
<?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?>
|
22 |
<strong><?php _e('Auto-publish to', 'nxs_snap'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong>
|
23 |
+
<?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')){ ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'nxs_snap'); ?> ==></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', 'nxs_snap'); ?>]</a>
|
24 |
<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', 'nxs_snap'); ?>]</a>
|
25 |
+
</p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php // $pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);
|
26 |
}?>
|
27 |
</div>
|
28 |
</div> <?php
|
38 |
<b><?php _e('YouTube API Library not found', 'nxs_snap'); ?></b>
|
39 |
<br/><br/> <?php _e('YouTube doesn\'t have a built-in API for automated posts yet.', 'nxs_snap'); ?> <br/><?php _e('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.', 'nxs_snap'); ?></span></div>
|
40 |
<?php return; }; ?>
|
41 |
+
<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', 'nxs_snap' ), $nType); ?></a></div>
|
42 |
|
43 |
<div style="width:100%;"><strong><?php _e('Account Nickname', 'nxs_snap'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'nxs_snap'); ?></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")), 'nxs_snap') ?>" /><br/>
|
44 |
<?php echo nxs_addQTranslSel('yt', $ii, $options['qTLng']); ?>
|
46 |
<br/>
|
47 |
<ul class="nsx_tabs">
|
48 |
<li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'nxs_snap'); ?></a></li>
|
49 |
+
<?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'nxs_snap'); ?></a></li> <?php } ?>
|
50 |
</ul>
|
51 |
<div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?>
|
52 |
<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%;">
|
79 |
<b><?php _e('Test your settings', 'nxs_snap'); ?>:</b> <a href="#" class="NXSButton" onclick="testPost('YT', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'nxs_snap' ), $nType); ?></a> <?php }
|
80 |
?></div>
|
81 |
<?php /* ######################## Advanced Tab ####################### */ ?>
|
82 |
+
<?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content">
|
83 |
|
84 |
+
<?php nxs_showCatTagsCTFilters($nt, $ii, $options);
|
85 |
+
nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);
|
86 |
+
nxs_showRepostSettings($nt, $ii, $options); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
|
89 |
+
</div> <?php } ?> <?php /* #### End of Tab #### */ ?>
|
90 |
</div><br/> <?php /* #### End of Tabs #### */ ?>
|
91 |
|
92 |
+
<div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap') ?>" /></div></div><?php
|
93 |
}
|
94 |
//#### Set Unit Settings from POST
|
95 |
+
function setNTSettings($post, $options){ $code = 'YT'; $lcode = 'yt';
|
96 |
foreach ($post as $ii => $pval){
|
97 |
if (isset($pval['apYTUName']) && $pval['apYTUName']!=''){ if (!isset($options[$ii])) $options[$ii] = array();
|
98 |
if (isset($pval['apYTUName'])) $options[$ii]['ytUName'] = trim($pval['apYTUName']);
|
101 |
if (isset($pval['apYTPage'])) $options[$ii]['ytPageID'] = trim($pval['apYTPage']);
|
102 |
if (isset($pval['ytGPPageID'])) $options[$ii]['ytGPPageID'] = trim($pval['ytGPPageID']);
|
103 |
|
104 |
+
if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0;
|
105 |
if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = '';
|
106 |
|
107 |
if (isset($pval['postType'])) $options[$ii]['postType'] = $pval['postType'];
|
113 |
if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']);
|
114 |
if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);
|
115 |
if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);
|
116 |
+
} elseif ((isset($pval['catSel'])) && $pval['catSel']=='X' && (isset($pval['apDoFB'])) && $pval['apDoFB']=='1') $options[$ii]['catSel'] = trim($pval['catSel']);
|
117 |
} return $options;
|
118 |
}
|
119 |
//#### Show Post->Edit Meta Box Settings
|
122 |
$doYT = $ntOpt['doYT'] && (is_array($pMeta) || $ntOpt['catSel']!='1');
|
123 |
$isAvailYT = $ntOpt['ytUName']!='' && $ntOpt['ytPass']!=''; $ytMsgFormat = htmlentities($ntOpt['ytMsgFormat'], ENT_COMPAT, "UTF-8");
|
124 |
?>
|
125 |
+
<tr><th style="text-align:left;" colspan="2">
|
126 |
+
<?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 } ?>
|
127 |
+
<?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 } ?>
|
128 |
<?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"'; ?> />
|
129 |
<?php if ($post->post_status == "publish") { ?> <input type="hidden" name="yt[<?php echo $ii; ?>][doYT]" value="<?php echo $doYT;?>"> <?php } ?> <?php } ?>
|
130 |
|
145 |
|
146 |
<?php if ($ntOpt['rpstOn']=='1') { ?>
|
147 |
|
148 |
+
<tr id="altFormat1" style=""><th scope="row" class="nxsTHRow">
|
149 |
<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"; ?> />
|
150 |
</th>
|
151 |
<td> <?php _e('Include in "Auto-Reposting" to this network.', 'nxs_snap') ?>
|
inc/nxs_functions_adv.php
CHANGED
@@ -53,10 +53,10 @@ if (!function_exists("nsFormatMessage")) { function nsFormatMessage($msg, $postI
|
|
53 |
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);
|
54 |
$tggs = array(); foreach ($t as $tagA) {$tggs[] = "#".trim(str_replace(' ', $htS, preg_replace('/[^a-zA-Z0-9\p{L}\p{N}\s]/u', '', trim(ucwords(str_ireplace('&','',str_ireplace('&','',$tagA->name))))))); }
|
55 |
$tags = implode(', ',$tggs); $msg = str_ireplace("%HTAGS%", $tags, $msg);
|
56 |
-
}
|
57 |
-
if (preg_match('%CF-[a-zA-Z0-
|
58 |
foreach ($msgA as $mms) {
|
59 |
-
if (substr($mms, 0, 1)=='-' && stripos($mms, '%')!==false) { $mGr = CutFromTo($mms, '-', '%'); $cfItem = get_post_meta($postID, $mGr, true);
|
60 |
} $msg = $mout;
|
61 |
}
|
62 |
if (preg_match('%FULLTEXT%', $msg)) { $postContent = apply_filters('the_content', nxs_doQTrans($post->post_content, $lng)); $msg = str_ireplace("%FULLTEXT%", $postContent, $msg);}
|
@@ -100,6 +100,12 @@ if (!function_exists("nxs_memCheck")) { function nxs_memCheck() { global $nxs_sn
|
|
100 |
<a target="_blank" href="<?php echo $nxs_snapThisPageUrl; ?>&do=test">Check HTTPS/SSL</a>
|
101 |
</div> <?php
|
102 |
}}
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
?>
|
53 |
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);
|
54 |
$tggs = array(); foreach ($t as $tagA) {$tggs[] = "#".trim(str_replace(' ', $htS, preg_replace('/[^a-zA-Z0-9\p{L}\p{N}\s]/u', '', trim(ucwords(str_ireplace('&','',str_ireplace('&','',$tagA->name))))))); }
|
55 |
$tags = implode(', ',$tggs); $msg = str_ireplace("%HTAGS%", $tags, $msg);
|
56 |
+
}
|
57 |
+
if (preg_match('%CF-[a-zA-Z0-9_]%', $msg)) { $msgA = explode('%CF', $msg); $mout = '';
|
58 |
foreach ($msgA as $mms) {
|
59 |
+
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;
|
60 |
} $msg = $mout;
|
61 |
}
|
62 |
if (preg_match('%FULLTEXT%', $msg)) { $postContent = apply_filters('the_content', nxs_doQTrans($post->post_content, $lng)); $msg = str_ireplace("%FULLTEXT%", $postContent, $msg);}
|
100 |
<a target="_blank" href="<?php echo $nxs_snapThisPageUrl; ?>&do=test">Check HTTPS/SSL</a>
|
101 |
</div> <?php
|
102 |
}}
|
103 |
+
//## Check SSL Sec
|
104 |
+
if (!function_exists("nxsCheckSSLCurl")){function nxsCheckSSLCurl($url){
|
105 |
+
$ch = curl_init($url); $headers = array(); $headers[] = 'Accept: text/html, application/xhtml+xml, */*'; $headers[] = 'Cache-Control: no-cache';
|
106 |
+
$headers[] = 'Connection: Keep-Alive'; $headers[] = 'Accept-Language: en-us'; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
107 |
+
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)");
|
108 |
+
$content = curl_exec($ch); $err = curl_errno($ch); $errmsg = curl_error($ch); if ($err!=0) return array('errNo'=>$err, 'errMsg'=>$errmsg); else return false;
|
109 |
+
}}
|
110 |
|
111 |
?>
|
inc/nxs_snap_class.php
CHANGED
@@ -9,7 +9,7 @@ if (!class_exists("NS_SNAutoPoster")) {
|
|
9 |
//## Constructor
|
10 |
function NS_SNAutoPoster() { }
|
11 |
//## Initialization function
|
12 |
-
function init() { $this->getAPOptions(); }
|
13 |
//## Administrative Functions
|
14 |
//## Options loader function
|
15 |
function getAPOptions() { global $nxs_isWPMU, $blog_id; $dbMUOptions = array();
|
@@ -30,6 +30,7 @@ if (!class_exists("NS_SNAutoPoster")) {
|
|
30 |
$options['isMA'] = function_exists('nxs_doSMAS1') && isset($options['lk']) && isset($options['uk']) && $options['uk']!='';
|
31 |
$options['isMU'] = function_exists('showSNAP_WPMU_OptionsPageExt') && isset($options['lk']) && isset($options['uk']) && $options['uk']!='';
|
32 |
$options['isMUx'] = function_exists('showSNAP_WPMU_OptionsPageExtX') && isset($options['lk']) && isset($options['uk']) && $options['uk']!=''; // prr($options);
|
|
|
33 |
if (!isset($options['isPro']) || $options['isPro']!='1'){ //## Upgrade from non-pro version
|
34 |
$optPro = array();foreach ($options as $indx => $opt){
|
35 |
if (substr($indx, 0, 2)=='fb') $optPro['fb'][0][$indx] = $opt;
|
@@ -94,14 +95,16 @@ define('WP_ALLOW_MULTISITE', true);<br/>to<br/>define('WP_ALLOW_MULTISITE', fals
|
|
94 |
}
|
95 |
function showSNAutoPosterOptionsPage() { global $nxs_snapAvNts, $nxs_snapThisPageUrl, $nxsOne, $nxs_plurl, $nxs_isWPMU, $nxs_tpWMPU; $nxsOne = ''; $options = $this->nxs_options; //prr($options);
|
96 |
//if($acid==1) $options = $this->nxs_options; else { switch_to_blog($acid); $options = $this->getAPOptions(); }
|
97 |
-
|
98 |
-
|
|
|
99 |
$secCheck = wp_verify_nonce($_POST['nxsChkUpl_wpnonce'], 'nxsChkUpl');
|
100 |
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']));
|
101 |
while (substr($fileData, 0,1)!=='a') $fileData = substr($fileData, 1);
|
102 |
-
$uplOpt = maybe_unserialize($fileData); if (is_array($uplOpt) && isset($uplOpt['imgNoCheck'])) { $options = $uplOpt; update_option($this->dbOptionsName, $options); } else { ?><div class="error" id="message"><p><strong>Incorrect Import file.</div><?php }
|
103 |
}
|
104 |
}
|
|
|
105 |
if (isset($_POST['nxsMainFromElementAccts']) || isset($_POST['nxsMainFromSupportFld'])) {
|
106 |
if (get_magic_quotes_gpc() || $_POST['nxs_mqTest']=="\'") {array_walk_recursive($_POST, 'nsx_stripSlashes');} array_walk_recursive($_POST, 'nsx_fixSlashes');
|
107 |
//## Load Networks Settings update_NS_SNAutoPoster_settings
|
@@ -196,9 +199,10 @@ define('WP_ALLOW_MULTISITE', true);<br/>to<br/>define('WP_ALLOW_MULTISITE', fals
|
|
196 |
foreach ($options['whoCanSeeSNAPBox'] as $uRole) { $role = get_role($uRole); $role->add_cap('see_snap_box'); $role->add_cap('make_snap_posts'); }
|
197 |
foreach ($options['whoCanMakePosts'] as $uRole) { $role = get_role($uRole); $role->add_cap('make_snap_posts'); }
|
198 |
|
199 |
-
update_option($this->dbOptionsName, $options);
|
200 |
?><div class="updated"><p><strong><?php _e("Settings Updated.", 'nxs_snap');?></strong></p></div><?php
|
201 |
}
|
|
|
202 |
$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;}
|
203 |
|
204 |
$category_ids = get_all_category_ids(); if(isset($options['exclCats'])) $pk = maybe_unserialize($options['exclCats']); else $pk = '';
|
@@ -244,12 +248,20 @@ if ( is_array($category_ids) && is_array($pk) && count($category_ids) == count($
|
|
244 |
<div class="popShAtt" id="popOnlyCat"><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></div>
|
245 |
<div class="popShAtt" id="popReActive"><?php _e('Reposter is activated for this account', 'nxs_snap'); ?></div>
|
246 |
|
247 |
-
<div id="showCatSel" style="display: none;background-color: #fff; width: 300px; padding: 25px;"><span class="nxspButton bClose"><span>X</span></span
|
248 |
<div id="fbSelCatsGLB" class="categorydivInd" style="padding-left: 15px; background-color: #fff;">
|
249 |
<a href="#" onclick="nxs_chAllCatsL(1, 'fbSelCatsGLB'); return false;">Check all</a> | <a href="#" onclick="nxs_chAllCatsL(0, 'fbSelCatsGLB'); return false;">UnCheck all</a>
|
250 |
<div id="category-all" class="tabs-panel"> <input type="hidden" id="tmpCatSelNT" name="tmpCatSelNT" value="" />
|
251 |
<ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
|
252 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
</ul>
|
254 |
</div>
|
255 |
</div> <div class="submit"><input type="button" id="" class="button-primary" name="btnSelCats" onclick="nxs_doSetSelCats( jQuery('#tmpCatSelNT').val() ); jQuery('#showCatSel').bPopup().close();" value="Select Categories" /></div>
|
@@ -722,7 +734,7 @@ Please see #4 and #5 for Twitter:<br/>
|
|
722 |
</div>
|
723 |
<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', 'nxs_snap'); ?></div></div>
|
724 |
<form method="post" enctype="multipart/form-data" id="nsStFormUpl" action="<?php echo $nxs_snapThisPageUrl?>">
|
725 |
-
<input type="file" accept="text/plain" onchange="jQuery('#nsStFormUpl').submit();" id="impFileSettings_button" name="impFileSettings_button" style="display: block; visibility: hidden; width:
|
726 |
<input type="hidden" value="1" name="upload_NS_SNAutoPoster_settings" /> <input value="'" type="hidden" name="nxs_mqTest" /> <?php wp_nonce_field( 'nxsChkUpl', 'nxsChkUpl_wpnonce' ); ?>
|
727 |
</form>
|
728 |
<br/> <br/> <?php
|
@@ -730,7 +742,7 @@ Please see #4 and #5 for Twitter:<br/>
|
|
730 |
function showSNAutoPosterOptionsPagex() { global $nxs_snapAvNts, $nxs_snapThisPageUrl, $nxsOne, $nxs_plurl, $nxs_isWPMU; $nxsOne = ''; $options = $this->nxs_options; ?>
|
731 |
<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 }
|
732 |
|
733 |
-
function NS_SNAP_ShowPageTop(){ global $nxs_snapAvNts, $nxs_snapThisPageUrl, $nxsOne, $nxs_plurl, $nxs_isWPMU; $nxsOne = ''; $options = $this->nxs_options;
|
734 |
|
735 |
if ($_GET['page']=='NextScripts_SNAP.php' && isset($_GET['do']) && $_GET['do']=='h'){ nxs_do_this_hourly(); die(); }
|
736 |
if ($_GET['page']=='NextScripts_SNAP.php' && isset($_GET['do']) && $_GET['do']=='q'){ nxs_do_post_from_query(); die(); }
|
@@ -768,6 +780,11 @@ Please see #4 and #5 for Twitter:<br/>
|
|
768 |
if (stripos($disabled_functions, 'curl_exec')!==false) {
|
769 |
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/>");
|
770 |
}
|
|
|
|
|
|
|
|
|
|
|
771 |
/*
|
772 |
if ((defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE==true) || (defined('MULTISITE') && MULTISITE==true) ) {
|
773 |
echo "<br/><br/><br/><b style=\"font-size:16px; color:red;\">Sorry, we do not support Multiuser Wordpress at this time</b>"; return;
|
9 |
//## Constructor
|
10 |
function NS_SNAutoPoster() { }
|
11 |
//## Initialization function
|
12 |
+
function init() { $this->nxs_options = $this->getAPOptions(); }
|
13 |
//## Administrative Functions
|
14 |
//## Options loader function
|
15 |
function getAPOptions() { global $nxs_isWPMU, $blog_id; $dbMUOptions = array();
|
30 |
$options['isMA'] = function_exists('nxs_doSMAS1') && isset($options['lk']) && isset($options['uk']) && $options['uk']!='';
|
31 |
$options['isMU'] = function_exists('showSNAP_WPMU_OptionsPageExt') && isset($options['lk']) && isset($options['uk']) && $options['uk']!='';
|
32 |
$options['isMUx'] = function_exists('showSNAP_WPMU_OptionsPageExtX') && isset($options['lk']) && isset($options['uk']) && $options['uk']!=''; // prr($options);
|
33 |
+
if (isset($options['skipSSLSec'])) $nxs_skipSSLCheck = $options['skipSSLSec'];// prr($options);
|
34 |
if (!isset($options['isPro']) || $options['isPro']!='1'){ //## Upgrade from non-pro version
|
35 |
$optPro = array();foreach ($options as $indx => $opt){
|
36 |
if (substr($indx, 0, 2)=='fb') $optPro['fb'][0][$indx] = $opt;
|
95 |
}
|
96 |
function showSNAutoPosterOptionsPage() { global $nxs_snapAvNts, $nxs_snapThisPageUrl, $nxsOne, $nxs_plurl, $nxs_isWPMU, $nxs_tpWMPU; $nxsOne = ''; $options = $this->nxs_options; //prr($options);
|
97 |
//if($acid==1) $options = $this->nxs_options; else { switch_to_blog($acid); $options = $this->getAPOptions(); }
|
98 |
+
|
99 |
+
//## Import Settings
|
100 |
+
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');
|
101 |
$secCheck = wp_verify_nonce($_POST['nxsChkUpl_wpnonce'], 'nxsChkUpl');
|
102 |
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']));
|
103 |
while (substr($fileData, 0,1)!=='a') $fileData = substr($fileData, 1);
|
104 |
+
$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 }
|
105 |
}
|
106 |
}
|
107 |
+
//## Save Settings
|
108 |
if (isset($_POST['nxsMainFromElementAccts']) || isset($_POST['nxsMainFromSupportFld'])) {
|
109 |
if (get_magic_quotes_gpc() || $_POST['nxs_mqTest']=="\'") {array_walk_recursive($_POST, 'nsx_stripSlashes');} array_walk_recursive($_POST, 'nsx_fixSlashes');
|
110 |
//## Load Networks Settings update_NS_SNAutoPoster_settings
|
199 |
foreach ($options['whoCanSeeSNAPBox'] as $uRole) { $role = get_role($uRole); $role->add_cap('see_snap_box'); $role->add_cap('make_snap_posts'); }
|
200 |
foreach ($options['whoCanMakePosts'] as $uRole) { $role = get_role($uRole); $role->add_cap('make_snap_posts'); }
|
201 |
|
202 |
+
update_option($this->dbOptionsName, $options); $this->nxs_options = $options;
|
203 |
?><div class="updated"><p><strong><?php _e("Settings Updated.", 'nxs_snap');?></strong></p></div><?php
|
204 |
}
|
205 |
+
|
206 |
$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;}
|
207 |
|
208 |
$category_ids = get_all_category_ids(); if(isset($options['exclCats'])) $pk = maybe_unserialize($options['exclCats']); else $pk = '';
|
248 |
<div class="popShAtt" id="popOnlyCat"><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></div>
|
249 |
<div class="popShAtt" id="popReActive"><?php _e('Reposter is activated for this account', 'nxs_snap'); ?></div>
|
250 |
|
251 |
+
<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', 'nxs_snap'); ?>:
|
252 |
<div id="fbSelCatsGLB" class="categorydivInd" style="padding-left: 15px; background-color: #fff;">
|
253 |
<a href="#" onclick="nxs_chAllCatsL(1, 'fbSelCatsGLB'); return false;">Check all</a> | <a href="#" onclick="nxs_chAllCatsL(0, 'fbSelCatsGLB'); return false;">UnCheck all</a>
|
254 |
<div id="category-all" class="tabs-panel"> <input type="hidden" id="tmpCatSelNT" name="tmpCatSelNT" value="" />
|
255 |
<ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
|
256 |
+
<?php
|
257 |
+
$args = array( 'descendants_and_self' => 0, 'selected_cats' => '', 'taxonomy' => 'category', 'checked_ontop' => false); if (function_exists('wp_terms_checklist')) wp_terms_checklist(0, $args );
|
258 |
+
/* //## Show Hierarcical custom taxonomies as categories.
|
259 |
+
$args = array('hierarchical' => true, 'public' => true, '_builtin' => false ); $output = 'names'; $operator = 'and'; $taxonomies = get_taxonomies( $args, $output, $operator );
|
260 |
+
if ( $taxonomies ) foreach ( $taxonomies as $taxonomy ) { ?> <b><br/> <?php _e($taxonomy, 'nxs_snap'); ?></b><br/> <?php
|
261 |
+
$args = array( 'descendants_and_self' => 0, 'selected_cats' => '', 'taxonomy' => $taxonomy, 'checked_ontop' => false); if (function_exists('wp_terms_checklist')) wp_terms_checklist(0, $args );
|
262 |
+
}
|
263 |
+
*/
|
264 |
+
?>
|
265 |
</ul>
|
266 |
</div>
|
267 |
</div> <div class="submit"><input type="button" id="" class="button-primary" name="btnSelCats" onclick="nxs_doSetSelCats( jQuery('#tmpCatSelNT').val() ); jQuery('#showCatSel').bPopup().close();" value="Select Categories" /></div>
|
734 |
</div>
|
735 |
<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', 'nxs_snap'); ?></div></div>
|
736 |
<form method="post" enctype="multipart/form-data" id="nsStFormUpl" action="<?php echo $nxs_snapThisPageUrl?>">
|
737 |
+
<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">
|
738 |
<input type="hidden" value="1" name="upload_NS_SNAutoPoster_settings" /> <input value="'" type="hidden" name="nxs_mqTest" /> <?php wp_nonce_field( 'nxsChkUpl', 'nxsChkUpl_wpnonce' ); ?>
|
739 |
</form>
|
740 |
<br/> <br/> <?php
|
742 |
function showSNAutoPosterOptionsPagex() { global $nxs_snapAvNts, $nxs_snapThisPageUrl, $nxsOne, $nxs_plurl, $nxs_isWPMU; $nxsOne = ''; $options = $this->nxs_options; ?>
|
743 |
<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 }
|
744 |
|
745 |
+
function NS_SNAP_ShowPageTop(){ global $nxs_snapAvNts, $nxs_snapThisPageUrl, $nxsOne, $nxs_plurl, $nxs_isWPMU, $nxs_skipSSLCheck; $nxsOne = ''; $options = $this->nxs_options;
|
746 |
|
747 |
if ($_GET['page']=='NextScripts_SNAP.php' && isset($_GET['do']) && $_GET['do']=='h'){ nxs_do_this_hourly(); die(); }
|
748 |
if ($_GET['page']=='NextScripts_SNAP.php' && isset($_GET['do']) && $_GET['do']=='q'){ nxs_do_post_from_query(); die(); }
|
780 |
if (stripos($disabled_functions, 'curl_exec')!==false) {
|
781 |
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/>");
|
782 |
}
|
783 |
+
if (empty($options['skipSSLSec'])) { $err = nxsCheckSSLCurl('https://www.google.com');
|
784 |
+
if ($err!==false && $err['errNo']=='60') { $nxs_skipSSLCheck = true; $options['skipSSLSec'] = true; } else { $nxs_skipSSLCheck = false; $options['skipSSLSec'] = false; }
|
785 |
+
update_option($this->dbOptionsName, $options); $this->nxs_options = $options;
|
786 |
+
}
|
787 |
+
|
788 |
/*
|
789 |
if ((defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE==true) || (defined('MULTISITE') && MULTISITE==true) ) {
|
790 |
echo "<br/><br/><br/><b style=\"font-size:16px; color:red;\">Sorry, we do not support Multiuser Wordpress at this time</b>"; return;
|
js/js.js
CHANGED
@@ -1,56 +1,37 @@
|
|
1 |
-
(
|
2 |
-
|
3 |
-
throw new Error("Please enter all the required config options!");
|
4 |
-
}
|
5 |
-
var iframe = jQuery('<iframe>',{ width:1, height:1, frameborder:0, css:{ display:'none' } }).appendTo('body');
|
6 |
-
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>';
|
7 |
-
setTimeout(function(){
|
8 |
-
var body = (iframe.prop('contentDocument') !== undefined) ? iframe.prop('contentDocument').body : iframe.prop('document').body; // IE
|
9 |
-
body = jQuery(body); body.html(formHTML); var form = body.find('form');
|
10 |
-
form.attr('action',options.script);
|
11 |
-
form.find('input[name=filename]').val(options.filename);
|
12 |
-
form.find('input[name=_wpnonce]').val(options.content);
|
13 |
-
form.submit();
|
14 |
-
},50);
|
15 |
-
};
|
16 |
-
})(jQuery);
|
17 |
-
|
18 |
-
jQuery(document).ready(function() { // Submit Serialized Form - avoid Max.Vars limit.
|
19 |
-
|
20 |
-
if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) {
|
21 |
jQuery(window).load(function(){
|
22 |
-
jQuery('input:-webkit-autofill').each(function(){
|
23 |
-
var text =jQuery(this).val();
|
24 |
-
var name = jQuery(this).attr('name');
|
25 |
-
jQuery(this).after(this.outerHTML).remove();
|
26 |
-
jQuery('input[name=' + name + ']').val(text);
|
27 |
-
});
|
28 |
});
|
29 |
-
}
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
38 |
});
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
//console.log(jQuery('#post')); console.log(jQuery('#NXS_MetaFieldsForm'));
|
43 |
-
//var nxsmf = jQuery('#NXS_MetaFieldsForm').serialize(); alert(nxsmf); return false; });
|
44 |
-
});
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
jQuery.post(ajaxurl,{action: 'nxs_delPostSettings', pid: pid, _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val(), ajax: 'true'}, function(j){
|
49 |
-
location.reload();
|
50 |
-
}, "html")
|
51 |
-
|
52 |
}
|
53 |
-
|
54 |
function nxs_expSettings(){
|
55 |
jQuery.generateFile({ filename: 'nx-snap-settings.txt', content: jQuery('input#nxsSsPageWPN_wpnonce').val(), script: 'admin-ajax.php'});
|
56 |
}
|
@@ -110,11 +91,30 @@ function doSwitchShAtt(att, idNum){
|
|
110 |
function doShowHideAltFormat(){ if (jQuery('#NS_SNAutoPosterAttachPost').is(':checked')) {
|
111 |
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:');}
|
112 |
}
|
113 |
-
function
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
function doShowHideBlocks1(blID, shhd){ if (shhd==1) jQuery('#do'+blID+'Div').show(); else jQuery('#do'+blID+'Div').hide();}
|
115 |
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'); }
|
116 |
else { jQuery('#do'+blID+'Div').hide(); jQuery('#do'+blID+'A').text('[Show Settings]'); jQuery('#apDoS'+blID).val('0'); }
|
117 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
|
119 |
function doShowFillBlock(blIDTo, blIDFrm){ jQuery('#'+blIDTo).html(jQuery('#do'+blIDFrm+'Div').html());}
|
120 |
function doCleanFillBlock(blIDFrm){ jQuery('#do'+blIDFrm+'Div').html('');}
|
@@ -182,18 +182,23 @@ function nxs_hideTip(id){
|
|
182 |
}, "html")
|
183 |
}
|
184 |
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
})(jQuery);
|
196 |
|
197 |
-
|
198 |
/// #####
|
199 |
(function(b){b.fn.bPopup=function(n,p){function t(){b.isFunction(a.onOpen)&&a.onOpen.call(c);k=(e.data("bPopup")||0)+1;d="__bPopup"+k;l="auto"!==a.position[1];m="auto"!==a.position[0];i="fixed"===a.positionStyle;j=r(c,a.amsl);f=l?a.position[1]:j[1];g=m?a.position[0]:j[0];q=s();a.modal&&b('<div class="bModal '+d+'"></div>').css({"background-color":a.modalColor,height:"100%",left:0,opacity:0,position:"fixed",top:0,width:"100%","z-index":a.zIndex+k}).each(function(){a.appending&&b(this).appendTo(a.appendTo)}).animate({opacity:a.opacity},a.fadeSpeed);c.data("bPopup",a).data("id",d).css({left:!a.follow[0]&&m||i?g:h.scrollLeft()+g,position:a.positionStyle||"absolute",top:!a.follow[1]&&l||i?f:h.scrollTop()+f,"z-index":a.zIndex+k+1}).each(function(){a.appending&&b(this).appendTo(a.appendTo);if(null!=a.loadUrl)switch(a.contentContainer=b(a.contentContainer||c),a.content){case "iframe":b('<iframe scrolling="no" frameborder="0"></iframe>').attr("src",a.loadUrl).appendTo(a.contentContainer);break;default:a.contentContainer.load(a.loadUrl)}}).fadeIn(a.fadeSpeed,function(){b.isFunction(p)&&p.call(c);u()})}function o(){a.modal&&b(".bModal."+c.data("id")).fadeOut(a.fadeSpeed,function(){b(this).remove()});c.stop().fadeOut(a.fadeSpeed,function(){null!=a.loadUrl&&a.contentContainer.empty()});e.data("bPopup",0<e.data("bPopup")-1?e.data("bPopup")-1:null);a.scrollBar||b("html").css("overflow","auto");b("."+a.closeClass).die("click."+d);b(".bModal."+d).die("click");h.unbind("keydown."+d);e.unbind("."+d);c.data("bPopup",null);b.isFunction(a.onClose)&&setTimeout(function(){a.onClose.call(c)},a.fadeSpeed);return!1}function u(){e.data("bPopup",k);b("."+a.closeClass).live("click."+d,o);a.modalClose&&b(".bModal."+d).live("click",o).css("cursor","pointer");(a.follow[0]||a.follow[1])&&e.bind("scroll."+d,function(){q&&c.stop().animate({left:a.follow[0]&&!i?h.scrollLeft()+g:g,top:a.follow[1]&&!i?h.scrollTop()+f:f},a.followSpeed)}).bind("resize."+d,function(){if(q=s())j=r(c,a.amsl),a.follow[0]&&(g=m?g:j[0]),a.follow[1]&&(f=l?f:j[1]),c.stop().each(function(){i?b(this).css({left:g,top:f},a.followSpeed):b(this).animate({left:m?g:g+h.scrollLeft(),top:l?f:f+h.scrollTop()},a.followSpeed)})});a.escClose&&h.bind("keydown."+d,function(a){27==a.which&&o()})}function r(a,b){var c=(e.width()-a.outerWidth(!0))/2,d=(e.height()-a.outerHeight(!0))/2-b;return[c,20>d?20:d]}function s(){return e.height()>c.outerHeight(!0)+20&&e.width()>c.outerWidth(!0)+20}b.isFunction(n)&&(p=n,n=null);var a=b.extend({},b.fn.bPopup.defaults,n);a.scrollBar||b("html").css("overflow","hidden");var c=this,h=b(document),e=b(window),k,d,q,l,m,i,j,f,g;this.close=function(){a=c.data("bPopup");o()};return this.each(function(){c.data("bPopup")||t()})};b.fn.bPopup.defaults={amsl:50,appending:!0,appendTo:"body",closeClass:"bClose",content:"ajax",contentContainer:null,escClose:!0,fadeSpeed:250,follow:[!0,!0],followSpeed:500,loadUrl:null,modal:!0,modalClose:!0,modalColor:"#000",onClose:null,onOpen:null,opacity:0.7,position:["auto","auto"],positionStyle:"absolute",scrollBar:!0,zIndex:9997}})(jQuery);
|
1 |
+
jQuery(document).ready(function() {
|
2 |
+
if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) { //## Chrome Autofill is evil
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
jQuery(window).load(function(){
|
4 |
+
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);});
|
|
|
|
|
|
|
|
|
|
|
5 |
});
|
6 |
+
}
|
7 |
+
//## Submit Serialized Form - avoid Max.Vars limit.
|
8 |
+
jQuery('#nsStFormMisc').submit(function() { var dataA = jQuery('#nsStForm').serialize(); jQuery('#nxsMainFromElementAccts').val(dataA); });
|
9 |
+
jQuery('#nsStForm').submit(function() { jQuery('#nsStFormMisc').submit(); return false; });
|
10 |
+
var nxs_isPrevirew = false;
|
11 |
+
jQuery('#post-preview').click(function(event) { nxs_isPrevirew = true; });
|
12 |
+
jQuery('#post').submit(function(event) { if (nxs_isPrevirew == true) return; jQuery('body').append('<form id="nxs_tempForm"></form>'); jQuery("#NXS_MetaFieldsIN").appendTo("#nxs_tempForm");
|
13 |
+
var nxsmf = jQuery('#nxs_tempForm').serialize(); jQuery( "#NXS_MetaFieldsIN" ).remove(); jQuery('#nxs_snapPostOptions').val(nxsmf); //alert(nxsmf); alert(jQuery('#nxs_snapPostOptions').val()); return false;
|
14 |
+
});
|
15 |
+
});
|
16 |
|
17 |
|
18 |
+
|
19 |
+
(function($) {
|
20 |
+
$(function() {
|
21 |
+
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]}); });
|
22 |
+
jQuery('#showLic').bind('click', function(e) { e.preventDefault(); jQuery('#showLicForm').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false]}); });
|
23 |
+
/* // Will move it here later for better compatibility
|
24 |
+
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="" />');
|
25 |
+
str = str.replace(/post_category/g, "pk"); jQuery('div.categorydiv').replaceWith('<input type="hidden" name="post_category" value="'+str+'" />');
|
26 |
+
});
|
27 |
+
*/
|
28 |
});
|
29 |
+
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
+
//## Functions
|
32 |
+
function nxs_doResetPostSettings(pid){
|
33 |
+
jQuery.post(ajaxurl,{action: 'nxs_delPostSettings', pid: pid, _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val(), ajax: 'true'}, function(j){ location.reload(); }, "html")
|
|
|
|
|
|
|
34 |
}
|
|
|
35 |
function nxs_expSettings(){
|
36 |
jQuery.generateFile({ filename: 'nx-snap-settings.txt', content: jQuery('input#nxsSsPageWPN_wpnonce').val(), script: 'admin-ajax.php'});
|
37 |
}
|
91 |
function doShowHideAltFormat(){ if (jQuery('#NS_SNAutoPosterAttachPost').is(':checked')) {
|
92 |
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:');}
|
93 |
}
|
94 |
+
function nxs_doShowWarning(blID, num, bl, ii){ var idnum = bl+ii;
|
95 |
+
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?");
|
96 |
+
if (cnf==true) { if (jQuery('#catSelA'+idnum).length) jQuery('#catSelA'+idnum).prop('checked', true); else {
|
97 |
+
jQuery('#nsStForm').append('<input type="hidden" id="catSelA'+idnum+'" name="'+bl.toLowerCase()+'['+ii+'][catSel]" value="X" />');
|
98 |
+
} } else { blID.prop('checked', false); }
|
99 |
+
}}
|
100 |
+
function doShowHideBlocks(blID){ alert('#do'+blID+'Div'); if (jQuery('#apDo'+blID).is(':checked')) jQuery('#do'+blID+'Div').show(); else jQuery('#do'+blID+'Div').hide();}
|
101 |
function doShowHideBlocks1(blID, shhd){ if (shhd==1) jQuery('#do'+blID+'Div').show(); else jQuery('#do'+blID+'Div').hide();}
|
102 |
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'); }
|
103 |
else { jQuery('#do'+blID+'Div').hide(); jQuery('#do'+blID+'A').text('[Show Settings]'); jQuery('#apDoS'+blID).val('0'); }
|
104 |
}
|
105 |
+
|
106 |
+
function doGetHideNTBlock(bl,ii){ if (jQuery('#apDoS'+bl+ii).length<1 || jQuery('#apDoS'+bl+ii).val()=='0') {
|
107 |
+
if (jQuery('#do'+bl+ii+'Div').length<1) { jQuery("#"+bl+ii+"LoadingImg").show();
|
108 |
+
jQuery.post(ajaxurl,{nxsact:'getNTset',nt:bl,ii:ii,action:'nxs_snap_aj', _wpnonce: jQuery('input#nxsSsPageWPN_wpnonce').val(), ajax: 'true'}, function(j){ var options = '';
|
109 |
+
//## check is filters were reset
|
110 |
+
var filtersReset = jQuery('#catSelA'+bl+ii).length && jQuery('#catSelA'+bl+ii).val() == 'X'; if (filtersReset) jQuery('#catSelA'+bl+ii).remove();
|
111 |
+
//## Show data
|
112 |
+
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');
|
113 |
+
if (filtersReset) jQuery('#catSelA'+bl+ii).prop('checked', true);
|
114 |
+
}, "html")
|
115 |
+
} else { jQuery('#do'+bl+ii+'Div').show(); jQuery('#do'+bl+ii+'AG').text('[Hide Settings]'); jQuery('#apDoS'+bl+ii).val('1'); }
|
116 |
+
} else { jQuery('#do'+bl+ii+'Div').hide(); jQuery('#do'+bl+ii+'AG').text('[Show Settings]'); jQuery('#apDoS'+bl+ii).val('0'); }
|
117 |
+
}
|
118 |
|
119 |
function doShowFillBlock(blIDTo, blIDFrm){ jQuery('#'+blIDTo).html(jQuery('#do'+blIDFrm+'Div').html());}
|
120 |
function doCleanFillBlock(blIDFrm){ jQuery('#do'+blIDFrm+'Div').html('');}
|
182 |
}, "html")
|
183 |
}
|
184 |
|
185 |
+
//## Export File
|
186 |
+
(function(jQuery){ jQuery.generateFile = function(options){ options = options || {};
|
187 |
+
if(!options.script || !options.filename || !options.content){
|
188 |
+
throw new Error("Please enter all the required config options!");
|
189 |
+
}
|
190 |
+
var iframe = jQuery('<iframe>',{ width:1, height:1, frameborder:0, css:{ display:'none' } }).appendTo('body');
|
191 |
+
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>';
|
192 |
+
setTimeout(function(){
|
193 |
+
var body = (iframe.prop('contentDocument') !== undefined) ? iframe.prop('contentDocument').body : iframe.prop('document').body; // IE
|
194 |
+
body = jQuery(body); body.html(formHTML); var form = body.find('form');
|
195 |
+
form.attr('action',options.script);
|
196 |
+
form.find('input[name=filename]').val(options.filename);
|
197 |
+
form.find('input[name=_wpnonce]').val(options.content);
|
198 |
+
form.submit();
|
199 |
+
},50);
|
200 |
+
};
|
201 |
})(jQuery);
|
202 |
|
|
|
203 |
/// #####
|
204 |
(function(b){b.fn.bPopup=function(n,p){function t(){b.isFunction(a.onOpen)&&a.onOpen.call(c);k=(e.data("bPopup")||0)+1;d="__bPopup"+k;l="auto"!==a.position[1];m="auto"!==a.position[0];i="fixed"===a.positionStyle;j=r(c,a.amsl);f=l?a.position[1]:j[1];g=m?a.position[0]:j[0];q=s();a.modal&&b('<div class="bModal '+d+'"></div>').css({"background-color":a.modalColor,height:"100%",left:0,opacity:0,position:"fixed",top:0,width:"100%","z-index":a.zIndex+k}).each(function(){a.appending&&b(this).appendTo(a.appendTo)}).animate({opacity:a.opacity},a.fadeSpeed);c.data("bPopup",a).data("id",d).css({left:!a.follow[0]&&m||i?g:h.scrollLeft()+g,position:a.positionStyle||"absolute",top:!a.follow[1]&&l||i?f:h.scrollTop()+f,"z-index":a.zIndex+k+1}).each(function(){a.appending&&b(this).appendTo(a.appendTo);if(null!=a.loadUrl)switch(a.contentContainer=b(a.contentContainer||c),a.content){case "iframe":b('<iframe scrolling="no" frameborder="0"></iframe>').attr("src",a.loadUrl).appendTo(a.contentContainer);break;default:a.contentContainer.load(a.loadUrl)}}).fadeIn(a.fadeSpeed,function(){b.isFunction(p)&&p.call(c);u()})}function o(){a.modal&&b(".bModal."+c.data("id")).fadeOut(a.fadeSpeed,function(){b(this).remove()});c.stop().fadeOut(a.fadeSpeed,function(){null!=a.loadUrl&&a.contentContainer.empty()});e.data("bPopup",0<e.data("bPopup")-1?e.data("bPopup")-1:null);a.scrollBar||b("html").css("overflow","auto");b("."+a.closeClass).die("click."+d);b(".bModal."+d).die("click");h.unbind("keydown."+d);e.unbind("."+d);c.data("bPopup",null);b.isFunction(a.onClose)&&setTimeout(function(){a.onClose.call(c)},a.fadeSpeed);return!1}function u(){e.data("bPopup",k);b("."+a.closeClass).live("click."+d,o);a.modalClose&&b(".bModal."+d).live("click",o).css("cursor","pointer");(a.follow[0]||a.follow[1])&&e.bind("scroll."+d,function(){q&&c.stop().animate({left:a.follow[0]&&!i?h.scrollLeft()+g:g,top:a.follow[1]&&!i?h.scrollTop()+f:f},a.followSpeed)}).bind("resize."+d,function(){if(q=s())j=r(c,a.amsl),a.follow[0]&&(g=m?g:j[0]),a.follow[1]&&(f=l?f:j[1]),c.stop().each(function(){i?b(this).css({left:g,top:f},a.followSpeed):b(this).animate({left:m?g:g+h.scrollLeft(),top:l?f:f+h.scrollTop()},a.followSpeed)})});a.escClose&&h.bind("keydown."+d,function(a){27==a.which&&o()})}function r(a,b){var c=(e.width()-a.outerWidth(!0))/2,d=(e.height()-a.outerHeight(!0))/2-b;return[c,20>d?20:d]}function s(){return e.height()>c.outerHeight(!0)+20&&e.width()>c.outerWidth(!0)+20}b.isFunction(n)&&(p=n,n=null);var a=b.extend({},b.fn.bPopup.defaults,n);a.scrollBar||b("html").css("overflow","hidden");var c=this,h=b(document),e=b(window),k,d,q,l,m,i,j,f,g;this.close=function(){a=c.data("bPopup");o()};return this.each(function(){c.data("bPopup")||t()})};b.fn.bPopup.defaults={amsl:50,appending:!0,appendTo:"body",closeClass:"bClose",content:"ajax",contentContainer:null,escClose:!0,fadeSpeed:250,follow:[!0,!0],followSpeed:500,loadUrl:null,modal:!0,modalClose:!0,modalColor:"#000",onClose:null,onOpen:null,opacity:0.7,position:["auto","auto"],positionStyle:"absolute",scrollBar:!0,zIndex:9997}})(jQuery);
|
lang/nxs_snap-es_ES.mo
ADDED
Binary file
|
lang/nxs_snap-es_ES.po
ADDED
@@ -0,0 +1,768 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2013 NextScripts: Social Networks Auto-Poster
|
2 |
+
# This file is distributed under the same license as the NextScripts: Social Networks Auto-Poster package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: NextScripts: Social Networks Auto-Poster 2.6.0\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/social-networks-auto-poster-"
|
7 |
+
"facebook-twitter-g\n"
|
8 |
+
"POT-Creation-Date: 2013-01-24 19:11:08+00:00\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"PO-Revision-Date: 2013-11-19 13:36+0100\n"
|
13 |
+
"Last-Translator: jelena kovacevic <jecajeca260@gmail.com>\n"
|
14 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
+
"X-Generator: Poedit 1.5.5\n"
|
16 |
+
|
17 |
+
#: inc-cl/bg.php:12 inc-cl/di.php:13 inc-cl/dl.php:12 inc-cl/fb.php:44
|
18 |
+
#: inc-cl/gp.php:12 inc-cl/li.php:61 inc-cl/lj.php:12 inc-cl/pk.php:50
|
19 |
+
#: inc-cl/pn.php:12 inc-cl/su.php:12 inc-cl/tr.php:40 inc-cl/tw.php:12
|
20 |
+
#: inc-cl/vb.php:12 inc-cl/vk.php:12 inc-cl/wp.php:12
|
21 |
+
msgid "accounts"
|
22 |
+
msgstr "cuentas"
|
23 |
+
|
24 |
+
#: inc-cl/bg.php:19 inc-cl/di.php:20 inc-cl/dl.php:19 inc-cl/fb.php:52
|
25 |
+
#: inc-cl/gp.php:20 inc-cl/li.php:70 inc-cl/lj.php:19 inc-cl/pk.php:58
|
26 |
+
#: inc-cl/pn.php:20 inc-cl/su.php:19 inc-cl/tr.php:48 inc-cl/tw.php:19
|
27 |
+
#: inc-cl/vb.php:19 inc-cl/vk.php:19 inc-cl/wp.php:19
|
28 |
+
msgid "Auto-publish to"
|
29 |
+
msgstr "Auto publicar en"
|
30 |
+
|
31 |
+
#: inc-cl/bg.php:20 inc-cl/di.php:21 inc-cl/dl.php:20 inc-cl/fb.php:53
|
32 |
+
#: inc-cl/gp.php:21 inc-cl/li.php:71 inc-cl/lj.php:20 inc-cl/pk.php:59
|
33 |
+
#: inc-cl/pn.php:21 inc-cl/su.php:20 inc-cl/tr.php:49 inc-cl/tw.php:20
|
34 |
+
#: inc-cl/vb.php:20 inc-cl/vk.php:20 inc-cl/wp.php:20
|
35 |
+
msgid "Attention requred. Unfinished setup"
|
36 |
+
msgstr "Atención requerida. Instalación no terminada."
|
37 |
+
|
38 |
+
#: inc-cl/bg.php:20 inc-cl/di.php:21 inc-cl/dl.php:20 inc-cl/fb.php:53
|
39 |
+
#: inc-cl/gp.php:21 inc-cl/li.php:71 inc-cl/lj.php:20 inc-cl/pk.php:59
|
40 |
+
#: inc-cl/pn.php:21 inc-cl/su.php:20 inc-cl/tr.php:49 inc-cl/tw.php:20
|
41 |
+
#: inc-cl/vb.php:20 inc-cl/vk.php:20 inc-cl/wp.php:20
|
42 |
+
msgid "Show Settings"
|
43 |
+
msgstr "Mostrar Configuración"
|
44 |
+
|
45 |
+
#: inc-cl/bg.php:21 inc-cl/di.php:22 inc-cl/dl.php:21 inc-cl/fb.php:54
|
46 |
+
#: inc-cl/gp.php:22 inc-cl/li.php:72 inc-cl/lj.php:21 inc-cl/pk.php:60
|
47 |
+
#: inc-cl/pn.php:22 inc-cl/su.php:21 inc-cl/tr.php:50 inc-cl/tw.php:21
|
48 |
+
#: inc-cl/vb.php:21 inc-cl/vk.php:21 inc-cl/wp.php:21
|
49 |
+
msgid "Remove Account"
|
50 |
+
msgstr "Eliminar Cuenta"
|
51 |
+
|
52 |
+
#: inc-cl/bg.php:36 inc-cl/di.php:36 inc-cl/dl.php:33 inc-cl/fb.php:70
|
53 |
+
#: inc-cl/gp.php:37 inc-cl/li.php:86 inc-cl/lj.php:33 inc-cl/pk.php:73
|
54 |
+
#: inc-cl/pn.php:41 inc-cl/su.php:35 inc-cl/tr.php:63 inc-cl/tw.php:33
|
55 |
+
#: inc-cl/vb.php:35 inc-cl/vk.php:35 inc-cl/wp.php:33
|
56 |
+
msgid "Detailed %s Installation/Configuration Instructions"
|
57 |
+
msgstr "Instrucciones de Instalación/Configuración %s detalladas"
|
58 |
+
|
59 |
+
#: inc-cl/bg.php:38 inc-cl/di.php:38 inc-cl/dl.php:35 inc-cl/fb.php:75
|
60 |
+
#: inc-cl/gp.php:39 inc-cl/li.php:88 inc-cl/lj.php:36 inc-cl/pk.php:75
|
61 |
+
#: inc-cl/pn.php:42 inc-cl/su.php:37 inc-cl/tr.php:65 inc-cl/tw.php:35
|
62 |
+
#: inc-cl/vb.php:37 inc-cl/vk.php:40 inc-cl/wp.php:37
|
63 |
+
msgid "Account Nickname"
|
64 |
+
msgstr "Apodo de Cuenta"
|
65 |
+
|
66 |
+
#: inc-cl/bg.php:38 inc-cl/di.php:38 inc-cl/dl.php:35 inc-cl/fb.php:75
|
67 |
+
#: inc-cl/gp.php:39 inc-cl/li.php:88 inc-cl/lj.php:36 inc-cl/pk.php:75
|
68 |
+
#: inc-cl/pn.php:42 inc-cl/su.php:37 inc-cl/tr.php:65 inc-cl/tw.php:35
|
69 |
+
#: inc-cl/vb.php:37 inc-cl/vk.php:40 inc-cl/wp.php:37
|
70 |
+
msgid "Just so you can easely identify it"
|
71 |
+
msgstr "Solo para que pueda identificarla fácilmente"
|
72 |
+
|
73 |
+
#: inc-cl/bg.php:43 inc-cl/di.php:43 inc-cl/dl.php:39 inc-cl/fb.php:80
|
74 |
+
#: inc-cl/gp.php:43 inc-cl/li.php:92 inc-cl/lj.php:40 inc-cl/pk.php:79
|
75 |
+
#: inc-cl/pn.php:46 inc-cl/su.php:41 inc-cl/tr.php:69 inc-cl/tw.php:39
|
76 |
+
#: inc-cl/vb.php:41 inc-cl/vk.php:45 inc-cl/wp.php:41
|
77 |
+
msgid "Categories"
|
78 |
+
msgstr "Categorías"
|
79 |
+
|
80 |
+
#: inc-cl/bg.php:47 inc-cl/di.php:47 inc-cl/dl.php:43 inc-cl/fb.php:84
|
81 |
+
#: inc-cl/gp.php:47 inc-cl/li.php:96 inc-cl/lj.php:44 inc-cl/pk.php:83
|
82 |
+
#: inc-cl/pn.php:50 inc-cl/su.php:45 inc-cl/tr.php:73 inc-cl/tw.php:43
|
83 |
+
#: inc-cl/vb.php:45 inc-cl/vk.php:49 inc-cl/wp.php:45
|
84 |
+
msgid "Only selected categories will be autoposted to this account"
|
85 |
+
msgstr "Solo las categorías seleccionadas serán auto posteadas en esta cuenta"
|
86 |
+
|
87 |
+
#: inc-cl/bg.php:55
|
88 |
+
msgid ""
|
89 |
+
"Log to your Blogger management panel and look at the URL of your blog: "
|
90 |
+
"http://www.blogger.com/blogger.g?blogID=8959085979163812093#allposts. Your "
|
91 |
+
"Blog ID will be: 8959085979163812093"
|
92 |
+
msgstr ""
|
93 |
+
"Autentíquese en su panel de gestión del Blogger y mire la URL de su blog: "
|
94 |
+
"http://www.blogger.com/blogger.g?blogID=8959085979163812093#allposts. Su ID "
|
95 |
+
"del Blog será: 8959085979163812093"
|
96 |
+
|
97 |
+
#: inc-cl/bg.php:59 inc-cl/di.php:64 inc-cl/dl.php:54 inc-cl/lj.php:53
|
98 |
+
#: inc-cl/tr.php:87 inc-cl/vb.php:68 inc-cl/wp.php:60
|
99 |
+
msgid "Post Title Format"
|
100 |
+
msgstr "Formato del Título del Post"
|
101 |
+
|
102 |
+
#: inc-cl/bg.php:59 inc-cl/bg.php:64 inc-cl/di.php:64 inc-cl/di.php:69
|
103 |
+
#: inc-cl/dl.php:54 inc-cl/dl.php:60 inc-cl/fb.php:94 inc-cl/gp.php:63
|
104 |
+
#: inc-cl/lj.php:53 inc-cl/lj.php:57 inc-cl/pk.php:105 inc-cl/pn.php:76
|
105 |
+
#: inc-cl/su.php:72 inc-cl/tr.php:87 inc-cl/tr.php:115 inc-cl/vb.php:68
|
106 |
+
#: inc-cl/vb.php:73 inc-cl/vk.php:89
|
107 |
+
msgid "Show format info"
|
108 |
+
msgstr "Mostrar información del formato"
|
109 |
+
|
110 |
+
#: inc-cl/bg.php:64 inc-cl/di.php:69 inc-cl/dl.php:60 inc-cl/lj.php:57
|
111 |
+
#: inc-cl/pk.php:105 inc-cl/su.php:72 inc-cl/tr.php:115 inc-cl/vb.php:73
|
112 |
+
#: inc-cl/wp.php:64
|
113 |
+
msgid "Post Text Format"
|
114 |
+
msgstr "Formato del Texto del Post"
|
115 |
+
|
116 |
+
#: inc-cl/bg.php:72 inc-cl/di.php:60
|
117 |
+
msgid "Post with tags"
|
118 |
+
msgstr "Post con etiquetas"
|
119 |
+
|
120 |
+
#: inc-cl/bg.php:72
|
121 |
+
msgid "Tags from the blogpost will be auto-posted to Blogger/Blogspot"
|
122 |
+
msgstr "Las etiquetas del blogpost serán auto posteadas a Blogger/Blogspot"
|
123 |
+
|
124 |
+
#: inc-cl/bg.php:77 inc-cl/di.php:75 inc-cl/dl.php:66 inc-cl/fb.php:144
|
125 |
+
#: inc-cl/gp.php:81 inc-cl/li.php:168 inc-cl/lj.php:63 inc-cl/pk.php:123
|
126 |
+
#: inc-cl/pn.php:84 inc-cl/su.php:78 inc-cl/tr.php:138 inc-cl/tw.php:63
|
127 |
+
#: inc-cl/vb.php:79 inc-cl/vk.php:123 inc-cl/wp.php:70
|
128 |
+
msgid "Test your settings"
|
129 |
+
msgstr "Pruebe su configuración"
|
130 |
+
|
131 |
+
#: inc-cl/bg.php:77
|
132 |
+
msgid "Submit Test Post to Complete"
|
133 |
+
msgstr "Envíe un Post de Prueba a %s"
|
134 |
+
|
135 |
+
#: inc-cl/bg.php:77 inc-cl/di.php:75 inc-cl/dl.php:66 inc-cl/fb.php:144
|
136 |
+
#: inc-cl/gp.php:81 inc-cl/li.php:168 inc-cl/lj.php:63 inc-cl/pk.php:123
|
137 |
+
#: inc-cl/pn.php:84 inc-cl/su.php:78 inc-cl/tr.php:138 inc-cl/tw.php:63
|
138 |
+
#: inc-cl/vb.php:79 inc-cl/vk.php:123 inc-cl/wp.php:70
|
139 |
+
msgid "Submit Test Post to %s"
|
140 |
+
msgstr "Enviar mensaje de prueba a% s"
|
141 |
+
|
142 |
+
#: inc-cl/bg.php:80 inc-cl/di.php:76 inc-cl/dl.php:70 inc-cl/fb.php:146
|
143 |
+
#: inc-cl/gp.php:82 inc-cl/li.php:173 inc-cl/lj.php:67 inc-cl/pk.php:125
|
144 |
+
#: inc-cl/pn.php:87 inc-cl/su.php:82 inc-cl/tr.php:140 inc-cl/tw.php:65
|
145 |
+
#: inc-cl/vb.php:83 inc-cl/vk.php:125 inc-cl/wp.php:74
|
146 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:227
|
147 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:380
|
148 |
+
msgid "Update Settings"
|
149 |
+
msgstr "Actualizar Configuración"
|
150 |
+
|
151 |
+
#: inc-cl/bg.php:119 inc-cl/di.php:107 inc-cl/dl.php:99 inc-cl/fb.php:195
|
152 |
+
#: inc-cl/gp.php:117 inc-cl/li.php:212 inc-cl/lj.php:95 inc-cl/pk.php:166
|
153 |
+
#: inc-cl/pn.php:119 inc-cl/su.php:113 inc-cl/tr.php:184 inc-cl/tw.php:98
|
154 |
+
#: inc-cl/vb.php:115 inc-cl/vk.php:185 inc-cl/wp.php:103
|
155 |
+
msgid "publish to"
|
156 |
+
msgstr "publicar a"
|
157 |
+
|
158 |
+
#: inc-cl/bg.php:121
|
159 |
+
msgid "Repost to Blogger"
|
160 |
+
msgstr "Re Postear en el Blogger"
|
161 |
+
|
162 |
+
#: inc-cl/bg.php:126 inc-cl/di.php:112 inc-cl/dl.php:105 inc-cl/fb.php:202
|
163 |
+
#: inc-cl/gp.php:124 inc-cl/li.php:218 inc-cl/lj.php:101 inc-cl/pk.php:172
|
164 |
+
#: inc-cl/pn.php:125 inc-cl/su.php:120 inc-cl/tr.php:190 inc-cl/tw.php:103
|
165 |
+
#: inc-cl/vb.php:122 inc-cl/vk.php:191 inc-cl/wp.php:110
|
166 |
+
msgid "Posted on"
|
167 |
+
msgstr "Posteado en"
|
168 |
+
|
169 |
+
#: inc-cl/bg.php:130
|
170 |
+
msgid "Setup your Blogger Account to AutoPost to Blogger"
|
171 |
+
msgstr "Configure su Cuenta Blogger para Auto Postear en el Blogger"
|
172 |
+
|
173 |
+
#: inc-cl/bg.php:132 inc-cl/di.php:117 inc-cl/dl.php:113 inc-cl/lj.php:109
|
174 |
+
#: inc-cl/wp.php:118
|
175 |
+
msgid "Title Format:"
|
176 |
+
msgstr "Formato del Título:"
|
177 |
+
|
178 |
+
#: inc-cl/bg.php:134 inc-cl/fb.php:232 inc-cl/gp.php:141 inc-cl/li.php:229
|
179 |
+
#: inc-cl/tw.php:109 inc-cl/vk.php:197
|
180 |
+
msgid "Message Format:"
|
181 |
+
msgstr "Formato del Mensaje:"
|
182 |
+
|
183 |
+
#: inc-cl/di.php:60
|
184 |
+
msgid "Tags from the blogpost will be auto posted to Diigo"
|
185 |
+
msgstr "Las etiquetas desde el blogpost serán auto posteadas a Diigo"
|
186 |
+
|
187 |
+
#: inc-cl/di.php:108
|
188 |
+
msgid "Repost to Diigo"
|
189 |
+
msgstr "Re Postear a Diigo"
|
190 |
+
|
191 |
+
#: inc-cl/di.php:119 inc-cl/dl.php:116 inc-cl/lj.php:112 inc-cl/pk.php:190
|
192 |
+
#: inc-cl/su.php:138 inc-cl/tr.php:211 inc-cl/vb.php:130 inc-cl/vb.php:133
|
193 |
+
#: inc-cl/wp.php:121
|
194 |
+
msgid "Text Format:"
|
195 |
+
msgstr "Formato del Texto:"
|
196 |
+
|
197 |
+
#: inc-cl/dl.php:100
|
198 |
+
msgid "Repost to Delicious"
|
199 |
+
msgstr "Repostear a Delicious"
|
200 |
+
|
201 |
+
#: inc-cl/fb.php:89
|
202 |
+
msgid "Could be your Facebook Profile, Facebook Page, Facebook Group"
|
203 |
+
msgstr ""
|
204 |
+
"Pudiera ser su Perfil de Facebook, Página de Facebook, Grupo de Facebook"
|
205 |
+
|
206 |
+
#: inc-cl/fb.php:94 inc-cl/gp.php:63 inc-cl/li.php:159 inc-cl/pn.php:76
|
207 |
+
#: inc-cl/tw.php:56 inc-cl/vk.php:89
|
208 |
+
msgid "Message text Format"
|
209 |
+
msgstr "Formato del texto del Mensaje"
|
210 |
+
|
211 |
+
#: inc-cl/fb.php:98 inc-cl/fb.php:107 inc-cl/fb.php:115 inc-cl/fb.php:217
|
212 |
+
#: inc-cl/fb.php:221 inc-cl/gp.php:67 inc-cl/gp.php:133 inc-cl/vk.php:96
|
213 |
+
#: inc-cl/vk.php:204
|
214 |
+
msgid "What's the difference?"
|
215 |
+
msgstr "¿Cuál es la diferencia?"
|
216 |
+
|
217 |
+
#: inc-cl/fb.php:101 inc-cl/fb.php:219 inc-cl/gp.php:73 inc-cl/vk.php:99
|
218 |
+
#: inc-cl/vk.php:205
|
219 |
+
msgid "Text Post"
|
220 |
+
msgstr "Postear el Texto"
|
221 |
+
|
222 |
+
#: inc-cl/fb.php:101 inc-cl/fb.php:219 inc-cl/gp.php:73 inc-cl/gp.php:136
|
223 |
+
#: inc-cl/vk.php:99 inc-cl/vk.php:205
|
224 |
+
msgid "just text message"
|
225 |
+
msgstr "sólo mensaje de texto"
|
226 |
+
|
227 |
+
#: inc-cl/fb.php:103 inc-cl/fb.php:220 inc-cl/vk.php:206
|
228 |
+
msgid "Image Post"
|
229 |
+
msgstr "Post de la Imagen"
|
230 |
+
|
231 |
+
#: inc-cl/fb.php:103 inc-cl/fb.php:220 inc-cl/gp.php:74 inc-cl/gp.php:137
|
232 |
+
#: inc-cl/vk.php:100 inc-cl/vk.php:206
|
233 |
+
msgid "big image with text message"
|
234 |
+
msgstr "imagen grande con mensaje de texto"
|
235 |
+
|
236 |
+
#: inc-cl/fb.php:104
|
237 |
+
msgid "Upload Images to"
|
238 |
+
msgstr "Subir Imágenes a"
|
239 |
+
|
240 |
+
#: inc-cl/fb.php:105
|
241 |
+
msgid "App Album"
|
242 |
+
msgstr "Álbum de la App"
|
243 |
+
|
244 |
+
#: inc-cl/fb.php:105 inc-cl/fb.php:113 inc-cl/fb.php:224
|
245 |
+
msgid "or"
|
246 |
+
msgstr "o"
|
247 |
+
|
248 |
+
#: inc-cl/fb.php:107
|
249 |
+
msgid "Timeline"
|
250 |
+
msgstr "Línea de Tiempo"
|
251 |
+
|
252 |
+
#: inc-cl/fb.php:110 inc-cl/vk.php:101
|
253 |
+
msgid "Text Post with \"attached\" link"
|
254 |
+
msgstr "Post de Texto con enlace \"adjunto\""
|
255 |
+
|
256 |
+
#: inc-cl/fb.php:112
|
257 |
+
msgid "Link attachment type"
|
258 |
+
msgstr "Tipo de enlace del adjunto "
|
259 |
+
|
260 |
+
#: inc-cl/fb.php:113 inc-cl/fb.php:224
|
261 |
+
msgid "Share a link to your blogpost"
|
262 |
+
msgstr "Compartir un enlace en su blogpost"
|
263 |
+
|
264 |
+
#: inc-cl/fb.php:115 inc-cl/fb.php:226
|
265 |
+
msgid "Attach your blogpost"
|
266 |
+
msgstr "Adjuntar su blogpost"
|
267 |
+
|
268 |
+
#: inc-cl/fb.php:116
|
269 |
+
msgid "If post has video use it as an attachment thumbnail."
|
270 |
+
msgstr "Si el post tiene video usarlo como una imagen en miniatura adjunta."
|
271 |
+
|
272 |
+
#: inc-cl/fb.php:116
|
273 |
+
msgid ""
|
274 |
+
"Video will be used for an attachment thumbnail instead of featured image. "
|
275 |
+
"Only Youtube is supported at this time."
|
276 |
+
msgstr ""
|
277 |
+
"El video será utilizado para una imagen en miniatura adjunta en vez de una "
|
278 |
+
"imagen principal. Hasta el momento solamente Youtube es soportado."
|
279 |
+
|
280 |
+
#: inc-cl/fb.php:118
|
281 |
+
msgid "Attachment Text Format"
|
282 |
+
msgstr "Formato del Texto del Adjunto"
|
283 |
+
|
284 |
+
#: inc-cl/fb.php:119 inc-cl/vk.php:109
|
285 |
+
msgid "Auto"
|
286 |
+
msgstr "Auto"
|
287 |
+
|
288 |
+
#: inc-cl/fb.php:120 inc-cl/vk.php:110
|
289 |
+
msgid ""
|
290 |
+
"Recommended. Info from SEO Plugins will be used, then post excerpt, then "
|
291 |
+
"post text"
|
292 |
+
msgstr ""
|
293 |
+
"Recomendado. La información de los Plugins de SEO será posteada, luego los "
|
294 |
+
"extractos de post, luego los textos de post"
|
295 |
+
|
296 |
+
#: inc-cl/fb.php:121
|
297 |
+
msgid "Set your own format"
|
298 |
+
msgstr "Modifique su propio formato"
|
299 |
+
|
300 |
+
#: inc-cl/fb.php:125
|
301 |
+
msgid "Where to upload Images"
|
302 |
+
msgstr "Dónde subir las imágenes"
|
303 |
+
|
304 |
+
#: inc-cl/fb.php:125
|
305 |
+
msgid "(App Album)"
|
306 |
+
msgstr "(App Álbum)"
|
307 |
+
|
308 |
+
#: inc-cl/fb.php:125
|
309 |
+
msgid ""
|
310 |
+
"Facebook automatically creates an album for your app. Images will be grouped "
|
311 |
+
"there as in any regular album."
|
312 |
+
msgstr ""
|
313 |
+
"Facebook crea automáticamente los álbumes para tus aplicaciones. Las "
|
314 |
+
"imágenes se pueden agrupar en un álbum regular"
|
315 |
+
|
316 |
+
#: inc-cl/fb.php:125
|
317 |
+
msgid "(Timeline)"
|
318 |
+
msgstr "(Línea de Tiempo)"
|
319 |
+
|
320 |
+
#: inc-cl/fb.php:125
|
321 |
+
msgid ""
|
322 |
+
"Images will be posted to the special \"Wall/Timeline\" album and won't be "
|
323 |
+
"grouped. \"Wall/Timeline\" album must exist. It's created when first image "
|
324 |
+
"posted to timeline manually."
|
325 |
+
msgstr ""
|
326 |
+
"Las imágenes se publicarán en el álbum especial \"Camino/Línea de Tiempo\" y "
|
327 |
+
"no serán agrupadas. El álbum \"Camino/Línea de Tiempo\" debe existir. Se "
|
328 |
+
"crea cuando usted fijó por primera vez esta imagen de la línea de tiempo de "
|
329 |
+
"forma manual."
|
330 |
+
|
331 |
+
#: inc-cl/fb.php:126 inc-cl/fb.php:228
|
332 |
+
msgid "Two ways of attaching post on Facebook"
|
333 |
+
msgstr "Dos formas de adjuntar un post en Facebook"
|
334 |
+
|
335 |
+
#: inc-cl/fb.php:127 inc-cl/fb.php:229
|
336 |
+
msgid "Facebook Post Types"
|
337 |
+
msgstr "Tipos de Post de Facebook "
|
338 |
+
|
339 |
+
#: inc-cl/fb.php:133
|
340 |
+
msgid "Authorize Your Facebook Account"
|
341 |
+
msgstr "Cuenta de Facebook autorizada"
|
342 |
+
|
343 |
+
#: inc-cl/fb.php:133
|
344 |
+
msgid "Please click \"Update Settings\" to be able to Authorize your account."
|
345 |
+
msgstr ""
|
346 |
+
"Por favor haga clic \"Update Settings\" para habilitar su cuenta autorizada"
|
347 |
+
|
348 |
+
#: inc-cl/fb.php:135
|
349 |
+
msgid "Your Facebook Account has been authorized."
|
350 |
+
msgstr "Su cuenta de Facebook ha sido autorizada"
|
351 |
+
|
352 |
+
#: inc-cl/fb.php:136 inc-cl/vk.php:68
|
353 |
+
msgid "You can"
|
354 |
+
msgstr "Usted puede"
|
355 |
+
|
356 |
+
#: inc-cl/fb.php:138 inc-cl/vk.php:71
|
357 |
+
msgid "Authorize your account"
|
358 |
+
msgstr "Su cuenta está autorizada"
|
359 |
+
|
360 |
+
#: inc-cl/fb.php:139
|
361 |
+
msgid "If you get Facebook message:"
|
362 |
+
msgstr "Si usted obtiene un mensaje de Facebook:"
|
363 |
+
|
364 |
+
#: inc-cl/fb.php:139
|
365 |
+
msgid ""
|
366 |
+
"please make sure that domain name in your Facebook App matches your website "
|
367 |
+
"domain exactly. Please note that www. and non www. versions are different "
|
368 |
+
"domains."
|
369 |
+
msgstr ""
|
370 |
+
"Por favor, asegúrese de que el nombre de dominio en su aplicación de "
|
371 |
+
"Facebook corresponda a su dominio del sitio web. Tenga en cuenta que las "
|
372 |
+
"versiones www. y no www. son de dominios diferentes."
|
373 |
+
|
374 |
+
#: inc-cl/fb.php:196
|
375 |
+
msgid "Repost to Facebook"
|
376 |
+
msgstr "Re postear en Facebook"
|
377 |
+
|
378 |
+
#: inc-cl/fb.php:216 inc-cl/vk.php:203
|
379 |
+
msgid "Post Type:"
|
380 |
+
msgstr "Tipo de Post:"
|
381 |
+
|
382 |
+
#: inc-cl/fb.php:221 inc-cl/gp.php:138 inc-cl/vk.php:208
|
383 |
+
msgid "Text Post with \"attached\" blogpost"
|
384 |
+
msgstr "Post de Texto con blogpost \"attached\""
|
385 |
+
|
386 |
+
#: inc-cl/fb.php:223 inc-cl/vk.php:103
|
387 |
+
msgid "Link attachment type:"
|
388 |
+
msgstr "Tipo de link adjuntado:"
|
389 |
+
|
390 |
+
#: inc-cl/fb.php:327
|
391 |
+
msgid "OK - Message Posted, please see your Facebook Page"
|
392 |
+
msgstr "OK - Mensaje Posteado, por favor revise su página de Facebook"
|
393 |
+
|
394 |
+
#: inc-cl/gp.php:34
|
395 |
+
msgid "Google+ API Library not found"
|
396 |
+
msgstr "La librería del API de Google+ no se encuentra"
|
397 |
+
|
398 |
+
#: inc-cl/gp.php:35
|
399 |
+
msgid "Google+ doesn't have a built-in API for automated posts yet."
|
400 |
+
msgstr "Google+ no tiene todavía una API integrada de mensajes automatizados "
|
401 |
+
|
402 |
+
#: inc-cl/gp.php:35
|
403 |
+
msgid ""
|
404 |
+
"The current <a target=\"_blank\" href=\"http://developers.google.com/+/api/"
|
405 |
+
"\">Google+ API</a> is \"Read Only\" and can't be used for posting. <br/><br/"
|
406 |
+
">You need to get a special <a target=\"_blank\" href=\"http://www."
|
407 |
+
"nextscripts.com/google-plus-automated-posting\"><b>API Library Module</b></"
|
408 |
+
"a> to be able to publish your content to Google+."
|
409 |
+
msgstr ""
|
410 |
+
"La actual <a target=\"_blank\" href=\"http://developers.google.com/+/api/"
|
411 |
+
"\">Google+ API</a> es de \"Solo Lectura\" y no puede ser usada para postear. "
|
412 |
+
"<br/><br/>Usted necesita obtener un <a target=\"_blank\" href=\"http://www."
|
413 |
+
"nextscripts.com/google-plus-automated-posting\"><b>Módulo de la Librería del "
|
414 |
+
"API</b></a> especial para poder publicar su contenido en Google+."
|
415 |
+
|
416 |
+
#: inc-cl/gp.php:53
|
417 |
+
msgid "Leave Empty to publish to your profile or community"
|
418 |
+
msgstr "Dejar en blanco para publicar en su perfil o comunidad"
|
419 |
+
|
420 |
+
#: inc-cl/gp.php:54
|
421 |
+
msgid "Leave Empty to publish to your profile or community."
|
422 |
+
msgstr "Dejar en blanco para publicar en su perfil o comunidad."
|
423 |
+
|
424 |
+
#: inc-cl/gp.php:57 inc-cl/gp.php:58
|
425 |
+
msgid "Leave Empty to publish to your profile or page"
|
426 |
+
msgstr "Dejar en blanco para publicar en su perfil o página"
|
427 |
+
|
428 |
+
#: inc-cl/gp.php:74
|
429 |
+
msgid "Google+ Image Post"
|
430 |
+
msgstr "Post de imágen de Google+"
|
431 |
+
|
432 |
+
#: inc-cl/gp.php:75
|
433 |
+
msgid "Add blogpost to Google+ message as an attachment"
|
434 |
+
msgstr "Añadir a los mensajes de Google+ un blogpost como un archivo adjunto"
|
435 |
+
|
436 |
+
#: inc-cl/gp.php:76 inc-cl/gp.php:139
|
437 |
+
msgid "Google+ Post Types"
|
438 |
+
msgstr "Tipos de Post de Google+"
|
439 |
+
|
440 |
+
#: inc-cl/gp.php:118 inc-cl/gp.php:132 inc-cl/gp.php:136
|
441 |
+
msgid "Repost to Google+"
|
442 |
+
msgstr "Re postear a Google+"
|
443 |
+
|
444 |
+
#: inc-cl/gp.php:137
|
445 |
+
msgid "Post to Google+ as \"Image post\""
|
446 |
+
msgstr "Re postear a Google+ como "
|
447 |
+
|
448 |
+
#: inc-cl/gp.php:186
|
449 |
+
msgid "OK - Message Posted, please see your Google+ Page"
|
450 |
+
msgstr "OK - Mensaje posteado, por favor revise la página de Google+"
|
451 |
+
|
452 |
+
#: inc-cl/li.php:213
|
453 |
+
msgid "Repost to LinkedIn"
|
454 |
+
msgstr "Re postear a LinkedIn"
|
455 |
+
|
456 |
+
#: inc-cl/lj.php:34
|
457 |
+
msgid "You can setup LiveJournal blog."
|
458 |
+
msgstr "Usted puede configurar el blog LiveJournal."
|
459 |
+
|
460 |
+
#: inc-cl/lj.php:51
|
461 |
+
msgid "Post Title and Post Text Formats"
|
462 |
+
msgstr "Formatos del Título y del Texto del Post"
|
463 |
+
|
464 |
+
#: inc-cl/lj.php:96
|
465 |
+
msgid "Repost to LiveJournal"
|
466 |
+
msgstr "Re postear a LiveJournal"
|
467 |
+
|
468 |
+
#: inc-cl/pk.php:167
|
469 |
+
msgid "Repost to Plurk"
|
470 |
+
msgstr "Re postear a Plurk"
|
471 |
+
|
472 |
+
#: inc-cl/pn.php:120
|
473 |
+
msgid "Repost to Pinterest"
|
474 |
+
msgstr "Re postear a Pinterest"
|
475 |
+
|
476 |
+
#: inc-cl/pn.php:142
|
477 |
+
msgid "Text Message Format:"
|
478 |
+
msgstr "Formato del Mensaje de Texto"
|
479 |
+
|
480 |
+
#: inc-cl/su.php:114
|
481 |
+
msgid "Repost to StumbleUpon"
|
482 |
+
msgstr "Re postear a StumbleUpon"
|
483 |
+
|
484 |
+
#: inc-cl/tr.php:185
|
485 |
+
msgid "Repost to Tumblr"
|
486 |
+
msgstr "Re postear a Tumblr"
|
487 |
+
|
488 |
+
#: inc-cl/tr.php:200
|
489 |
+
msgid "Text Post. Title Format:"
|
490 |
+
msgstr "Post de Texto. Formato del Título:"
|
491 |
+
|
492 |
+
#: inc-cl/tw.php:100
|
493 |
+
msgid "Repost to Twitter"
|
494 |
+
msgstr "Re postear a Twitter"
|
495 |
+
|
496 |
+
#: inc-cl/vb.php:116
|
497 |
+
msgid "Repost to vBulletin"
|
498 |
+
msgstr "Repostear vBulletin"
|
499 |
+
|
500 |
+
#: inc-cl/vk.php:54
|
501 |
+
msgid "Could be your vKontakte(VK) Profile or vKontakte(VK) Group Page"
|
502 |
+
msgstr "Pudiera ser su Perfil vKontakte(VK) o su Página de Grupo vKontakte(VK)"
|
503 |
+
|
504 |
+
#: inc-cl/vk.php:57
|
505 |
+
msgid "(It could be used for \"Text\" and \"Image\" posts)"
|
506 |
+
msgstr "(Podría ser utilizado para posts de \"Texto\" e \"Imagen\")"
|
507 |
+
|
508 |
+
#: inc-cl/vk.php:61
|
509 |
+
msgid "[Create VK App]"
|
510 |
+
msgstr "[Crear App VK]"
|
511 |
+
|
512 |
+
#: inc-cl/vk.php:61
|
513 |
+
msgid "[Manage VK Apps]"
|
514 |
+
msgstr "[Administrar los Apps VK]"
|
515 |
+
|
516 |
+
#: inc-cl/vk.php:65
|
517 |
+
msgid ""
|
518 |
+
"<b>Authorize Your vKontakte(VK) Account</b>. Please click \"Update Settings"
|
519 |
+
"\" to be able to Authorize your account."
|
520 |
+
msgstr ""
|
521 |
+
"<b>Su cuenta vKontakte(VK) está autorizada</b>. Por favor haga clic en "
|
522 |
+
"\"Actualizar Configuración\" para poder actualizar su cuenta."
|
523 |
+
|
524 |
+
#: inc-cl/vk.php:67
|
525 |
+
msgid "Your vKontakte(VK) Account has been authorized."
|
526 |
+
msgstr "Su cuenta vKontakte(VK) ha sido autorizada."
|
527 |
+
|
528 |
+
#: inc-cl/vk.php:79
|
529 |
+
msgid "(It could be used for \"Text with attached link\" posts)"
|
530 |
+
msgstr "(Podría ser utilizado para posts \"Texto con enlace adjunto\")"
|
531 |
+
|
532 |
+
#: inc-cl/vk.php:85
|
533 |
+
msgid "Please upgrade the plugin to \"PRO\" get NextScripts VK API"
|
534 |
+
msgstr ""
|
535 |
+
"Por favor actualice el plugin a \"PRO\" para obtener el NextScripts VK API"
|
536 |
+
|
537 |
+
#: inc-cl/vk.php:93 inc-cl/vk.php:200
|
538 |
+
msgid "Add backlink to the post"
|
539 |
+
msgstr "Adicionar al backlink del post"
|
540 |
+
|
541 |
+
#: inc-cl/vk.php:100
|
542 |
+
msgid "mage Post"
|
543 |
+
msgstr "Post mage"
|
544 |
+
|
545 |
+
#: inc-cl/vk.php:105
|
546 |
+
msgid ""
|
547 |
+
"<strong>If post has video use it as an attachment thumbnail.</strong> "
|
548 |
+
"<i>Video will be used for an attachment thumbnail instead of featured image. "
|
549 |
+
"Only Youtube is supported at this time.</i>"
|
550 |
+
msgstr ""
|
551 |
+
"<strong>Si su post utiliza un video con un archivo adjunto en miniatura</"
|
552 |
+
"strong> <i>El video será utilizado para colocar la miniatura en lugar de la "
|
553 |
+
"imagen principal. En estos momentos solo se admite Youtube.</i>"
|
554 |
+
|
555 |
+
#: inc-cl/vk.php:108
|
556 |
+
msgid "Attachment Text Format:"
|
557 |
+
msgstr "Adjuntar el Formato del Texto:"
|
558 |
+
|
559 |
+
#: inc-cl/vk.php:111
|
560 |
+
msgid "Set your own format:"
|
561 |
+
msgstr "Modificar su propio formato:"
|
562 |
+
|
563 |
+
#: inc-cl/vk.php:188
|
564 |
+
msgid "Repost to vKontakte(VK)"
|
565 |
+
msgstr "Re postear a Vkontakte (VK)"
|
566 |
+
|
567 |
+
#: inc-cl/vk.php:209
|
568 |
+
msgid "Post Types"
|
569 |
+
msgstr "Tipos de Post"
|
570 |
+
|
571 |
+
#: inc-cl/wp.php:104
|
572 |
+
msgid "Repost to WP Blog"
|
573 |
+
msgstr "Repostear al Blog WP "
|
574 |
+
|
575 |
+
#: nxs_functions.php:156
|
576 |
+
msgid "Wrong key, please contact support"
|
577 |
+
msgstr ""
|
578 |
+
"Llave incorrecta, por favor póngase en contacto con el servicio de soporte"
|
579 |
+
|
580 |
+
#: nxs_functions.php:243
|
581 |
+
msgid "Inserts the Your Blog/Site Name"
|
582 |
+
msgstr "Inserte el nombre de su Sitio de Blog "
|
583 |
+
|
584 |
+
#: nxs_functions.php:243
|
585 |
+
msgid "Inserts the Title of your post"
|
586 |
+
msgstr "Inserte el título de su post"
|
587 |
+
|
588 |
+
#: nxs_functions.php:243
|
589 |
+
msgid "Inserts the URL of your post"
|
590 |
+
msgstr "Inserte la URL de su post"
|
591 |
+
|
592 |
+
#: nxs_functions.php:243
|
593 |
+
msgid "Inserts the <b>Shortened URL</b> of your post"
|
594 |
+
msgstr "Inserte la<b>URL Acortada</b> de su post"
|
595 |
+
|
596 |
+
#: nxs_functions.php:243
|
597 |
+
msgid "Inserts the featured image"
|
598 |
+
msgstr "Inserte una imagen principal"
|
599 |
+
|
600 |
+
#: nxs_functions.php:243
|
601 |
+
msgid "Inserts the excerpt of your post"
|
602 |
+
msgstr "Inserte el extracto de su mensaje"
|
603 |
+
|
604 |
+
#: nxs_functions.php:243
|
605 |
+
msgid "Inserts the body(text) as typed"
|
606 |
+
msgstr "Inserte el texto del cuerpo como se escribió"
|
607 |
+
|
608 |
+
#: nxs_functions.php:243
|
609 |
+
msgid "Inserts the processed body(text) of your post"
|
610 |
+
msgstr "Inserte el cuerpo transformado (texto) en su post"
|
611 |
+
|
612 |
+
#: nxs_functions.php:243
|
613 |
+
msgid "Inserts the author's name"
|
614 |
+
msgstr "Inserte el nombre del autor"
|
615 |
+
|
616 |
+
#: nxs_functions.php:247
|
617 |
+
msgid ""
|
618 |
+
"You already have %s configured. This plugin supports only one %s account. "
|
619 |
+
"<br/><br/> Please consider getting <a target=\"_blank\" href=\"http://www."
|
620 |
+
"nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts"
|
621 |
+
"\">Multiple Accounts Edition</a> if you would like to add another %s account "
|
622 |
+
"for auto-posting."
|
623 |
+
msgstr ""
|
624 |
+
"Usted ya tiene %s configurado. Este plugin soporta solo una %s cuenta. <br/"
|
625 |
+
"><br/> Por favor considere conseguir<a target=\"_blank\" href=\"http://www."
|
626 |
+
"nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts\">La "
|
627 |
+
"Edición de Multiples Cuentas</a> si desea añadir otra cuenta %s para la auto-"
|
628 |
+
"publicación."
|
629 |
+
|
630 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:163
|
631 |
+
msgid "Settings Updated."
|
632 |
+
msgstr "Configuración Actualizada."
|
633 |
+
|
634 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:223
|
635 |
+
msgid "Export Settings"
|
636 |
+
msgstr "Exportar Configuración"
|
637 |
+
|
638 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:224
|
639 |
+
msgid "Import Settings"
|
640 |
+
msgstr "Importar Configuración"
|
641 |
+
|
642 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:520
|
643 |
+
msgid "Contact support"
|
644 |
+
msgstr "Contactar el soporte"
|
645 |
+
|
646 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:521
|
647 |
+
msgid ""
|
648 |
+
"Ready to to Upgrade to Multiple Accounts Edition<br/> and get Google+ and "
|
649 |
+
"Pinterest Auto-Posting?"
|
650 |
+
msgstr "¿Listo para actualizar a la Edición de "
|
651 |
+
|
652 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:522
|
653 |
+
msgid "Enter your Activation Key"
|
654 |
+
msgstr "Entre su Llave de Activación"
|
655 |
+
|
656 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:523
|
657 |
+
msgid "Get It here"
|
658 |
+
msgstr "Consígalo aquí"
|
659 |
+
|
660 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:525
|
661 |
+
msgid "Activation"
|
662 |
+
msgstr "Activación"
|
663 |
+
|
664 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:527
|
665 |
+
msgid "Multiple Accounts Edition and Google+ and Pinterest Auto-Posting"
|
666 |
+
msgstr "Edición de Cuentas Múltiples y Google+ y Pinterest Auto-Posting"
|
667 |
+
|
668 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:527
|
669 |
+
msgid "You can find your key on this page"
|
670 |
+
msgstr "Usted puede encontrar su llave en esta página"
|
671 |
+
|
672 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:528
|
673 |
+
msgid "Enter your Key"
|
674 |
+
msgstr "Entre su Llave"
|
675 |
+
|
676 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:530
|
677 |
+
msgid "Your plugin will be automatically upgraded"
|
678 |
+
msgstr "Su plugin se actualizará automáticamente"
|
679 |
+
|
680 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:535
|
681 |
+
msgid "Next Scripts: Social Networks Auto Poster Options"
|
682 |
+
msgstr "Próximos Scripts: Social Networks Auto Poster Options"
|
683 |
+
|
684 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:535
|
685 |
+
msgid "Plugin Version"
|
686 |
+
msgstr "Versión del Plugin"
|
687 |
+
|
688 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:538
|
689 |
+
msgid "Get"
|
690 |
+
msgstr "Obtener"
|
691 |
+
|
692 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:540
|
693 |
+
msgid "Here you can setup \"Social Networks Auto Poster\"."
|
694 |
+
msgstr "Aqui puede configurar\"Social Networks Auto Poster\"."
|
695 |
+
|
696 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:540
|
697 |
+
msgid ""
|
698 |
+
"You can start by clicking \"Add new account\" button and choosing the Social "
|
699 |
+
"Network you would like to add."
|
700 |
+
msgstr ""
|
701 |
+
"Usted puede comenzar haciendo clic en el botón\"Add new account\"y "
|
702 |
+
"seleccionar la Red Social que desea adicionar."
|
703 |
+
|
704 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:553
|
705 |
+
msgid "You have Google Analytics Plugin installed and activated."
|
706 |
+
msgstr "Usted debe tener instalado y activado el Plugin Google Analytics"
|
707 |
+
|
708 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:553
|
709 |
+
msgid "This plugin hijacks the authorization workflow."
|
710 |
+
msgstr "Este plugin toma el flujo de trabajo de la autorización workflow."
|
711 |
+
|
712 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:554
|
713 |
+
msgid ""
|
714 |
+
"Please temporary <a href=\"%s\">deactivate</a> Google Analytics plugin, do "
|
715 |
+
"all authorizations and then activate it back."
|
716 |
+
msgstr ""
|
717 |
+
"Por favor <a href=\"%s\">desactive</a> temporalmente el plugin de Google "
|
718 |
+
"Analytics, cambie todos los permisos y vuelva a activarlos"
|
719 |
+
|
720 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:585
|
721 |
+
msgid ""
|
722 |
+
"If you made any changes to the format, please \"Update\" the post before "
|
723 |
+
"reposting, "
|
724 |
+
msgstr ""
|
725 |
+
"Si usted hizo algunos cambios en el formato por favor \"Update\"el post "
|
726 |
+
"antes de re postear"
|
727 |
+
|
728 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:588
|
729 |
+
msgid "Check All"
|
730 |
+
msgstr "Seleccionar todos"
|
731 |
+
|
732 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:588
|
733 |
+
msgid "Uncheck All"
|
734 |
+
msgstr "Deseleccionar todos"
|
735 |
+
|
736 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:598
|
737 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:601
|
738 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:606
|
739 |
+
msgid "NextScripts: Social Networks Auto Poster - Post Options"
|
740 |
+
msgstr "Próximos Scripts: Social Networks Auto Poster - Post "
|
741 |
+
|
742 |
+
#: social-networks-auto-poster-facebook-twitter-g.php:692
|
743 |
+
msgid "Settings"
|
744 |
+
msgstr "Configuración"
|
745 |
+
|
746 |
+
#. Plugin Name of the plugin/theme
|
747 |
+
msgid "NextScripts: Social Networks Auto-Poster"
|
748 |
+
msgstr "Próximos Scripts: Social Networks Auto-Poster"
|
749 |
+
|
750 |
+
#. Plugin URI of the plugin/theme
|
751 |
+
msgid "http://www.nextscripts.com/social-networks-auto-poster-for-wordpress"
|
752 |
+
msgstr "http://www.nextscripts.com/social-networks-auto-poster-for-wordpress"
|
753 |
+
|
754 |
+
#. Description of the plugin/theme
|
755 |
+
msgid ""
|
756 |
+
"This plugin automatically publishes posts from your blog to multiple "
|
757 |
+
"accounts on Facebook, Twitter, and Google+ profiles and/or pages."
|
758 |
+
msgstr ""
|
759 |
+
"Este plugin publica posts automáticamente desde su blog a cuentas múltiples "
|
760 |
+
"en Facebook, Twitter, y perfiles de Google+ y/o páginas."
|
761 |
+
|
762 |
+
#. Author of the plugin/theme
|
763 |
+
msgid "Next Scripts"
|
764 |
+
msgstr "Próximos Scripts"
|
765 |
+
|
766 |
+
#. Author URI of the plugin/theme
|
767 |
+
msgid "http://www.nextscripts.com"
|
768 |
+
msgstr "http://www.nextscripts.com"
|
lang/nxs_snap-pt_BR.mo
ADDED
Binary file
|
lang/nxs_snap-pt_BR.po
ADDED
@@ -0,0 +1,1721 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2013 NextScripts: Social Networks Auto-Poster
|
2 |
+
# This file is distributed under the same license as the NextScripts: Social Networks Auto-Poster package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: NextScripts: Social Networks Auto-Poster 2.6.0\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/social-networks-auto-poster-"
|
7 |
+
"facebook-twitter-g\n"
|
8 |
+
"POT-Creation-Date: 2013-11-19 17:49:49+00:00\n"
|
9 |
+
"PO-Revision-Date: 2013-11-21 22:27-0300\n"
|
10 |
+
"Last-Translator: Leonardo Kfoury <lkmdias@gmail.com>\n"
|
11 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
12 |
+
"MIME-Version: 1.0\n"
|
13 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
+
"Content-Transfer-Encoding: 8bit\n"
|
15 |
+
"X-Generator: Poedit 1.5.7\n"
|
16 |
+
"Language: pt_BR\n"
|
17 |
+
|
18 |
+
#: NextScripts_SNAP.php:218 inc/nxs_snap_class.php:218
|
19 |
+
msgid "Settings"
|
20 |
+
msgstr "Configurações"
|
21 |
+
|
22 |
+
#: NextScripts_SNAP.php:312
|
23 |
+
msgid "NXS Reposter"
|
24 |
+
msgstr "NXS Reposter"
|
25 |
+
|
26 |
+
#: inc/nxs_functions_adv.php:94 inc/nxs_functions_adv.php:95
|
27 |
+
msgid "N/A"
|
28 |
+
msgstr "N/A"
|
29 |
+
|
30 |
+
#: inc/nxs_functions_adv.php:94 inc/nxs_functions_adv.php:95
|
31 |
+
msgid " MByte"
|
32 |
+
msgstr " MByte"
|
33 |
+
|
34 |
+
#: inc/nxs_functions_adv.php:96
|
35 |
+
msgid "PHP Version"
|
36 |
+
msgstr "Versão do PHP"
|
37 |
+
|
38 |
+
#: inc/nxs_functions_adv.php:97
|
39 |
+
msgid "Memory limit"
|
40 |
+
msgstr "Limite de Memória"
|
41 |
+
|
42 |
+
#: inc/nxs_functions_adv.php:98
|
43 |
+
msgid "Memory usage"
|
44 |
+
msgstr "Uso da Memória"
|
45 |
+
|
46 |
+
#: inc/nxs_snap_class.php:199
|
47 |
+
msgid "Settings Updated."
|
48 |
+
msgstr "Atualizar Configurações"
|
49 |
+
|
50 |
+
#: inc/nxs_snap_class.php:243 inc-cl/ap.php:109 inc-cl/bg.php:98
|
51 |
+
#: inc-cl/da.php:92 inc-cl/di.php:94 inc-cl/dl.php:86 inc-cl/fb.php:176
|
52 |
+
#: inc-cl/ff.php:85 inc-cl/gp.php:114 inc-cl/ip.php:86 inc-cl/li.php:212
|
53 |
+
#: inc-cl/lj.php:96 inc-cl/pk.php:140 inc-cl/pn.php:113 inc-cl/rd.php:115
|
54 |
+
#: inc-cl/su.php:99 inc-cl/tr.php:159 inc-cl/vb.php:99 inc-cl/vk.php:145
|
55 |
+
#: inc-cl/wp.php:96 inc-cl/yt.php:89
|
56 |
+
msgid "Only selected categories will be autoposted to this account"
|
57 |
+
msgstr ""
|
58 |
+
"Apenas as Categorias selecionadas serão Publicadas Automaticamente para esta "
|
59 |
+
"conta."
|
60 |
+
|
61 |
+
#: inc/nxs_snap_class.php:244
|
62 |
+
msgid "Reposter is activated for this account"
|
63 |
+
msgstr "Reposter está ativado para esta conta"
|
64 |
+
|
65 |
+
#: inc/nxs_snap_class.php:261 inc/nxs_snap_class.php:267
|
66 |
+
msgid "Import Settings"
|
67 |
+
msgstr "Importar Configurações"
|
68 |
+
|
69 |
+
#: inc/nxs_snap_class.php:266
|
70 |
+
msgid "Export Settings"
|
71 |
+
msgstr "Exportar Configurações"
|
72 |
+
|
73 |
+
#: inc/nxs_snap_class.php:270 inc/nxs_snap_class.php:587 inc-cl/ap.php:118
|
74 |
+
#: inc-cl/bg.php:109 inc-cl/da.php:106 inc-cl/di.php:105 inc-cl/dl.php:97
|
75 |
+
#: inc-cl/fb.php:202 inc-cl/ff.php:96 inc-cl/gp.php:125 inc-cl/ip.php:97
|
76 |
+
#: inc-cl/li.php:223 inc-cl/lj.php:107 inc-cl/pk.php:151 inc-cl/pn.php:124
|
77 |
+
#: inc-cl/rd.php:129 inc-cl/su.php:110 inc-cl/tr.php:170 inc-cl/tw.php:105
|
78 |
+
#: inc-cl/vb.php:110 inc-cl/vk.php:156 inc-cl/wp.php:107 inc-cl/yt.php:100
|
79 |
+
msgid "Update Settings"
|
80 |
+
msgstr "Atualizar Configurações"
|
81 |
+
|
82 |
+
#: inc/nxs_snap_class.php:282
|
83 |
+
msgid "How to make auto-posts?"
|
84 |
+
msgstr "Como fazer Publicações Automáticas?"
|
85 |
+
|
86 |
+
#: inc/nxs_snap_class.php:282 inc-cl/fb.php:108 inc-cl/fb.php:117
|
87 |
+
#: inc-cl/fb.php:125 inc-cl/fb.php:299 inc-cl/fb.php:303 inc-cl/gp.php:88
|
88 |
+
#: inc-cl/gp.php:196 inc-cl/vk.php:106 inc-cl/vk.php:255
|
89 |
+
msgid "What's the difference?"
|
90 |
+
msgstr "Qual a diferença?"
|
91 |
+
|
92 |
+
#: inc/nxs_snap_class.php:284
|
93 |
+
msgid "The difference between \"Immediately\" and \"Scheduled\""
|
94 |
+
msgstr "A diferença entre\"Imediatamente \" e \"Programada\""
|
95 |
+
|
96 |
+
#: inc/nxs_snap_class.php:285
|
97 |
+
msgid ""
|
98 |
+
"<b>\"Immediately\"</b> - Once you click \"Publish\" button plugin starts "
|
99 |
+
"pushing your update to configured social networks. At this time you need to "
|
100 |
+
"wait and look at the turning circle. Some APIs are pretty slow, so you have "
|
101 |
+
"to wait and wait and wait until all updates are posted and page released "
|
102 |
+
"back to you."
|
103 |
+
msgstr ""
|
104 |
+
"<b>\"Imediatamente\"</b> - Logo que você clicar no botão \"Publicar\" o "
|
105 |
+
"Plugin vai começar o envio para a atualização em suas Redes Sociais "
|
106 |
+
"configuradas. Neste momento você precisa esperar e observar o percurso do "
|
107 |
+
"envio. Algumas APIs são muito lentas, então você precisa esperar, esperar e "
|
108 |
+
"esperar, até que todas as atualizações sejam publicadas e a página possa "
|
109 |
+
"então ser liberada e voltar para você."
|
110 |
+
|
111 |
+
#: inc/nxs_snap_class.php:286
|
112 |
+
msgid ""
|
113 |
+
"<b>\"Scheduled\"</b> - Releases the page immediately back to you, so you can "
|
114 |
+
"proceed with something else and it schedules all auto-posting jobs to your "
|
115 |
+
"WP-Cron. This is much faster and much more efficient, but it could not work "
|
116 |
+
"if your WP-Cron is disabled or broken."
|
117 |
+
msgstr ""
|
118 |
+
"<b>\"Programada\"</b> - Libera a página imediatamente de volta para você, "
|
119 |
+
"para que você possa prosseguir com outra tarefa. E o Plugin agenda todas as "
|
120 |
+
"tarefas das Publicações Automáticas em seu WP-Cron. Isto é muito mais rápido "
|
121 |
+
"e muito mais eficiente, mas não poderia funcionar se o seu WP-Cron está "
|
122 |
+
"desativado ou quebrado."
|
123 |
+
|
124 |
+
#: inc/nxs_snap_class.php:290
|
125 |
+
msgid "Publish Immediately"
|
126 |
+
msgstr "Publicar <b>Imediatamente</b>"
|
127 |
+
|
128 |
+
#: inc/nxs_snap_class.php:290
|
129 |
+
msgid ""
|
130 |
+
"No WP Cron will be used. Choose if WP Cron is disabled or broken on your "
|
131 |
+
"website"
|
132 |
+
msgstr ""
|
133 |
+
"O WP Cron não será usado. Escolha se o WP Cron está desativado ou quebrado "
|
134 |
+
"em seu website"
|
135 |
+
|
136 |
+
#: inc/nxs_snap_class.php:294
|
137 |
+
msgid "Use WP Cron to Schedule autoposts"
|
138 |
+
msgstr "Use WP Cron para agendar as Publicações Automáticas"
|
139 |
+
|
140 |
+
#: inc/nxs_snap_class.php:294
|
141 |
+
msgid ""
|
142 |
+
"Recommended for most sites. Faster Performance - requires working WP Cron"
|
143 |
+
msgstr ""
|
144 |
+
"Recomendado para a maioria dos sites. Desempenho mais rápido - requer "
|
145 |
+
"trabalhar com o WP Cron"
|
146 |
+
|
147 |
+
#: inc/nxs_snap_class.php:299
|
148 |
+
msgid "Proper setup for WP Cron is REQURED for this feature to work."
|
149 |
+
msgstr ""
|
150 |
+
"A configuração adequada para o WP Cron é requerida para que esse recurso "
|
151 |
+
"funcione."
|
152 |
+
|
153 |
+
#: inc/nxs_snap_class.php:299
|
154 |
+
msgid "Please see here for the proper WP Cron setup tutorial"
|
155 |
+
msgstr ""
|
156 |
+
"Por favor, veja aqui o Tutorial de Instalação para o correto funcionamento "
|
157 |
+
"do WP Cron"
|
158 |
+
|
159 |
+
#: inc/nxs_snap_class.php:300
|
160 |
+
msgid "Limit autoposting speed"
|
161 |
+
msgstr "Limite de Velocidade das Publicações Automáticas"
|
162 |
+
|
163 |
+
#: inc/nxs_snap_class.php:300
|
164 |
+
msgid "Recommended for busy sites with a lot of new posts."
|
165 |
+
msgstr "Recomendado para sites ocupados com muitas tarefas novas."
|
166 |
+
|
167 |
+
#: inc/nxs_snap_class.php:306 nxs_functions.php:756
|
168 |
+
msgid "Randomize posting time ±"
|
169 |
+
msgstr "Tempo de Randomização da Publicação ±"
|
170 |
+
|
171 |
+
#: inc/nxs_snap_class.php:307 nxs_functions.php:753 nxs_functions.php:757
|
172 |
+
msgid "Minutes"
|
173 |
+
msgstr "Minutos"
|
174 |
+
|
175 |
+
#: inc/nxs_snap_class.php:311
|
176 |
+
msgid ""
|
177 |
+
"What to do with the rest of the posts if there are more posts then daily "
|
178 |
+
"limit?"
|
179 |
+
msgstr ""
|
180 |
+
"O que fazer com o resto das Publicações, se já houver ultrapassado o limite "
|
181 |
+
"diário para publicações?"
|
182 |
+
|
183 |
+
#: inc/nxs_snap_class.php:312
|
184 |
+
msgid "Skip/Discard/Don't Autopost "
|
185 |
+
msgstr "Pular/Descartar/Não Publicar"
|
186 |
+
|
187 |
+
#: inc/nxs_snap_class.php:313
|
188 |
+
msgid "Schedule for tomorrow"
|
189 |
+
msgstr "Programar para amanhã"
|
190 |
+
|
191 |
+
#: inc/nxs_snap_class.php:313
|
192 |
+
msgid "Not recommended, may cause significant delays"
|
193 |
+
msgstr "Não é recomendado, pode causar atrasos significativos"
|
194 |
+
|
195 |
+
#: inc/nxs_snap_class.php:322
|
196 |
+
msgid "User Privileges/Security"
|
197 |
+
msgstr "Privilégios/Segurança do Usuário"
|
198 |
+
|
199 |
+
#: inc/nxs_snap_class.php:326
|
200 |
+
msgid "Skip User Security Verification."
|
201 |
+
msgstr "Pular a Verificação de Segurança do usuário."
|
202 |
+
|
203 |
+
#: inc/nxs_snap_class.php:327
|
204 |
+
msgid ""
|
205 |
+
"NOT Recommended, but useful in some situations. This will allow autoposting "
|
206 |
+
"for everyone even for the non-existent users."
|
207 |
+
msgstr ""
|
208 |
+
"Não é recomendado, mas é útil em algumas situações. Isso permitirá as "
|
209 |
+
"publicações automáticas para todos, mesmo para os usuários que não existem."
|
210 |
+
|
211 |
+
#: inc/nxs_snap_class.php:329
|
212 |
+
msgid "Who can make autoposts without seeing any auto-posting options?"
|
213 |
+
msgstr "Quem pode fazer as Publicações Automáticas e verificar as Opções?"
|
214 |
+
|
215 |
+
#: inc/nxs_snap_class.php:344
|
216 |
+
msgid ""
|
217 |
+
"Who can see auto-posting options on the \"New Post\" and \"Edit Post\" pages "
|
218 |
+
"and make autoposts?"
|
219 |
+
msgstr ""
|
220 |
+
"Quem pode ver as Opções de Publicações Automáticas nas páginas de \"Novo Post"
|
221 |
+
"\" Editar e fazer Publicações Automáticas?"
|
222 |
+
|
223 |
+
#: inc/nxs_snap_class.php:366
|
224 |
+
msgid "Include/Exclude Wordpress Pages and Custom Post Types"
|
225 |
+
msgstr "Incluir/Excluir Páginas e tipos de Posts padrão do Wordpress"
|
226 |
+
|
227 |
+
#: inc/nxs_snap_class.php:369
|
228 |
+
msgid "Use for Wordpress Pages"
|
229 |
+
msgstr "Usar para Páginas do Wordpress"
|
230 |
+
|
231 |
+
#: inc/nxs_snap_class.php:370
|
232 |
+
msgid "Show the SNAP metabox and auto-post for pages, not just posts."
|
233 |
+
msgstr ""
|
234 |
+
"Exibir a Caixa Meta e Publicações Automáticas do SNAP para as páginas, não "
|
235 |
+
"apenas Posts."
|
236 |
+
|
237 |
+
#: inc/nxs_snap_class.php:372
|
238 |
+
msgid "Custom Post Types:"
|
239 |
+
msgstr "Tipos de Posts Personalizados:"
|
240 |
+
|
241 |
+
#: inc/nxs_snap_class.php:373
|
242 |
+
msgid ""
|
243 |
+
"Please select \"Custom Post Types\" that you would like to be autoposted to "
|
244 |
+
"your social networks"
|
245 |
+
msgstr ""
|
246 |
+
"Por favor, selecione os \"Tipos de Post Personalizados\" que você gostaria "
|
247 |
+
"que fossem Publicados Automaticamente para suas redes sociais"
|
248 |
+
|
249 |
+
#: inc/nxs_snap_class.php:391
|
250 |
+
msgid "Categories to Include/Exclude:"
|
251 |
+
msgstr "Categorias para Incluir/Excluir "
|
252 |
+
|
253 |
+
#: inc/nxs_snap_class.php:392
|
254 |
+
msgid ""
|
255 |
+
"Each blogpost will be autoposted to all categories selected below. All "
|
256 |
+
"categories are selected by default. \r\n"
|
257 |
+
" <b>Uncheck</b> categories that you would like <b>NOT</b> to "
|
258 |
+
"auto-post by default. Assigning the uncheked category to the new blogpost "
|
259 |
+
"will turn off auto-posting to all configured networks."
|
260 |
+
msgstr ""
|
261 |
+
"Cada Publicação, dentre as Categorias Selecionadas abaixo, será publicada "
|
262 |
+
"automaticamente. Todas as categorias são selecionadas por padrão. \r\n"
|
263 |
+
" <b>Desmarque</b> as Categorias que você <b>NÃO</b> quer que "
|
264 |
+
"sejam publicadas automaticamente por padrão. As Categorias desmarcadas terão "
|
265 |
+
"desligadas as \"Publicações Automáticas\" para todas as Redes configuradas."
|
266 |
+
|
267 |
+
#: inc/nxs_snap_class.php:411
|
268 |
+
msgid "URL Shortener"
|
269 |
+
msgstr "Código Curto \"shortcode\" do URL"
|
270 |
+
|
271 |
+
#: inc/nxs_snap_class.php:452
|
272 |
+
msgid "Auto-Import comments from Social Networks"
|
273 |
+
msgstr "Importar Automaticamente os Comentários para as Redes Sociais"
|
274 |
+
|
275 |
+
#: inc/nxs_snap_class.php:452 inc/nxs_snap_class.php:468
|
276 |
+
msgid "New"
|
277 |
+
msgstr "Novo"
|
278 |
+
|
279 |
+
#: inc/nxs_snap_class.php:468
|
280 |
+
msgid "Additional URL Parameters"
|
281 |
+
msgstr "Parâmetros adicionais do URL"
|
282 |
+
|
283 |
+
#: inc/nxs_snap_class.php:469
|
284 |
+
msgid "Will be added to backlinks."
|
285 |
+
msgstr "Serão adicionados para backlinks."
|
286 |
+
|
287 |
+
#: inc/nxs_snap_class.php:471
|
288 |
+
msgid "Additional URL Parameters:"
|
289 |
+
msgstr "Parâmetros adicionais do URL"
|
290 |
+
|
291 |
+
#: inc/nxs_snap_class.php:473
|
292 |
+
msgid ""
|
293 |
+
"You can use %NTNAME% for social network name, %NTCODE% for social network "
|
294 |
+
"two-letter code, %ACCNAME% for account name, %POSTID% for post ID, "
|
295 |
+
"%POSTTITLE% for post title, %SITENAME% for website name. <b>Any text must be "
|
296 |
+
"URL Encoded</b><br/>Example: utm_source=%NTCODE%&utm_medium=%ACCNAME"
|
297 |
+
"%&utm_campaign=SNAP%2Bfrom%2B%SITENAME%"
|
298 |
+
msgstr ""
|
299 |
+
"Você pode usar %NTNAME% para o Nome da Rede Social, %NTCODE% para a Rede "
|
300 |
+
"Social em código de duas letras, %ACCNAME% para o Nome da Conta, %POSTID% "
|
301 |
+
"para o ID da Post, %POSTTITLE% para o Título do Post, %SITENAME% para o "
|
302 |
+
"Nome do Site. <b>Qualquer texto deve ser URL codificado</b><br/>Exemplo: "
|
303 |
+
"utm_source=%NTCODE%&utm_medium=%ACCNAME%&utm_campaign=SNAP%2Bfrom%2B%SITENAME"
|
304 |
+
"%"
|
305 |
+
|
306 |
+
#: inc/nxs_snap_class.php:477
|
307 |
+
msgid "Auto-HashTags Settings"
|
308 |
+
msgstr "Configurações de \"hashtags\" Automáticas"
|
309 |
+
|
310 |
+
#: inc/nxs_snap_class.php:478
|
311 |
+
msgid "How to generate hashtags if tag is longer then one word"
|
312 |
+
msgstr ""
|
313 |
+
"Como gerar as \"hashtags\" se for maior que as Tags depois de cada palavra"
|
314 |
+
|
315 |
+
#: inc/nxs_snap_class.php:480
|
316 |
+
msgid "Replace spaces in hashtags with "
|
317 |
+
msgstr "Substituir os espaços nas \"hashtags\" com"
|
318 |
+
|
319 |
+
#: inc/nxs_snap_class.php:489
|
320 |
+
msgid "%ANNOUNCE% tag settings"
|
321 |
+
msgstr "%ANNOUNCE% Configurações do Trecho "
|
322 |
+
|
323 |
+
#: inc/nxs_snap_class.php:490
|
324 |
+
msgid ""
|
325 |
+
"Plugin will take text untill the <!--more--> tag. Please specify how "
|
326 |
+
"many characters should it get if <!--more--> tag is not found"
|
327 |
+
msgstr ""
|
328 |
+
"O Plugin publicará o texto até a marcação <!--mais-->. Por favor, "
|
329 |
+
"especifique o número de caracteres que deve ser publicado se a marcação "
|
330 |
+
"<!--mais--> não for encontrada"
|
331 |
+
|
332 |
+
#: inc/nxs_snap_class.php:492
|
333 |
+
msgid "How many characters:"
|
334 |
+
msgstr "Quantos caracteres:"
|
335 |
+
|
336 |
+
#: inc/nxs_snap_class.php:497
|
337 |
+
msgid "\"Open Graph\" Tags"
|
338 |
+
msgstr "Tags \"Open Graph\" "
|
339 |
+
|
340 |
+
#: inc/nxs_snap_class.php:498
|
341 |
+
msgid ""
|
342 |
+
"This is simple and useful implementation of \"Open Graph\" Tags, as this "
|
343 |
+
"option will only add tags needed for \"Auto Posting\". If you use other "
|
344 |
+
"specialized plugins, uncheck this option."
|
345 |
+
msgstr ""
|
346 |
+
"Esta é uma implementação simples e útil para as Marcações (Tags) do \"Open "
|
347 |
+
"Graph\", esta opção só irá adicionar \"Tags\" necessárias para as "
|
348 |
+
"\"Publicações Automáticas\". Se você usa outros plugins especializados, "
|
349 |
+
"desmarque esta opção."
|
350 |
+
|
351 |
+
#: inc/nxs_snap_class.php:500
|
352 |
+
msgid "Add Open Graph Tags"
|
353 |
+
msgstr "Adicionar as Marcações (Tags) do \"Open Graph\""
|
354 |
+
|
355 |
+
#: inc/nxs_snap_class.php:503
|
356 |
+
msgid "Default Image URL for og:image tag:"
|
357 |
+
msgstr "URL da Imagem Padrão para a Tag \"og:image\":"
|
358 |
+
|
359 |
+
#: inc/nxs_snap_class.php:508
|
360 |
+
msgid "Advanced \"Featured\" Image Settings"
|
361 |
+
msgstr "Configurações Avançadas da Imagem de \"Destaque\""
|
362 |
+
|
363 |
+
#: inc/nxs_snap_class.php:512
|
364 |
+
msgid ""
|
365 |
+
"Advanced Setting. Uncheck only if you are 100% sure that your images are "
|
366 |
+
"valid or if you have troubles with image verification."
|
367 |
+
msgstr ""
|
368 |
+
"Desmarque a opção somente se você tem certeza de que suas imagens são "
|
369 |
+
"válidas ou se você tem problemas com a verificação de imagem."
|
370 |
+
|
371 |
+
#: inc/nxs_snap_class.php:517
|
372 |
+
msgid "Use advanced image finder"
|
373 |
+
msgstr "Usar o Localizador Avançado de Imagem"
|
374 |
+
|
375 |
+
#: inc/nxs_snap_class.php:519
|
376 |
+
msgid ""
|
377 |
+
"Check this if your images could be found only in the fully processed posts. "
|
378 |
+
"<br/>This feature could interfere with some plugins using post processing "
|
379 |
+
"functions incorrectly. Your site could become messed up, have troubles "
|
380 |
+
"displaying content or start giving you \"ob_start() [ref.outcontrol]: Cannot "
|
381 |
+
"use output buffering in output buffering display handlers\" errors."
|
382 |
+
msgstr ""
|
383 |
+
"Marque esta opção se as imagens podem ser encontradas nos Posts totalmente "
|
384 |
+
"processados. <br/>Este recurso pode interferir com alguns plugins que "
|
385 |
+
"utilizam funções de pós-processamento de forma incorreta. Seu site pode "
|
386 |
+
"ficar confuso, ter problemas ao exibir conteúdos ou começar a mostrar "
|
387 |
+
"mensagens de \"ERRO \"ob_start() [ref.outcontrol]: Não é possível usar o "
|
388 |
+
"buffer de saída, na saída de manipuladores de exibição de buffer\" (Cannot "
|
389 |
+
"use output buffering in output buffering display handlers)."
|
390 |
+
|
391 |
+
#: inc/nxs_snap_class.php:525
|
392 |
+
msgid "Alternative \"Featured Image\" location"
|
393 |
+
msgstr "Local Alternativo da \"Imagem de Destaque\""
|
394 |
+
|
395 |
+
#: inc/nxs_snap_class.php:526
|
396 |
+
msgid ""
|
397 |
+
"Plugin uses standard Wordpress \"Featured Image\" by default. If your theme "
|
398 |
+
"stores \"Featured Image\" in the custom field, please enter the name of it. "
|
399 |
+
"Use prefix if your custom field has only partial location."
|
400 |
+
msgstr ""
|
401 |
+
"O Pligin usa o Padrão do Wordpress \"Imagem de Destaque\" por padrão. Se seu "
|
402 |
+
"Tema tem a \"Imagem de Destaque\" em campo personalizado, por favor, digite "
|
403 |
+
"o nome do mesmo. Use o prefixo se o seu campo personalizado só tem uma "
|
404 |
+
"localização parcial."
|
405 |
+
|
406 |
+
#: inc/nxs_snap_class.php:528
|
407 |
+
msgid "Custom field name:"
|
408 |
+
msgstr "Nome do Campo Personalizado:"
|
409 |
+
|
410 |
+
#: inc/nxs_snap_class.php:530
|
411 |
+
msgid "Set the name of the custom field that contains image info"
|
412 |
+
msgstr "Defina o nome do campo personalizado que contém a informação da imagem"
|
413 |
+
|
414 |
+
#: inc/nxs_snap_class.php:533
|
415 |
+
msgid "Custom field Array Path:"
|
416 |
+
msgstr "Caminho \"Matriz\" do Campo Personalizado:"
|
417 |
+
|
418 |
+
#: inc/nxs_snap_class.php:535 inc/nxs_snap_class.php:540
|
419 |
+
msgid "Optional"
|
420 |
+
msgstr "Opcional"
|
421 |
+
|
422 |
+
#: inc/nxs_snap_class.php:535
|
423 |
+
msgid ""
|
424 |
+
"If your custom field contain an array, please enter the path to the image "
|
425 |
+
"field. For example: ['images']['image']"
|
426 |
+
msgstr ""
|
427 |
+
"Se o seu Campo Personalizado contém uma Matriz, por favor, digite o caminho "
|
428 |
+
"correto para o campo da imagem. Por exemplo: ['imagens'] ['imagem']"
|
429 |
+
|
430 |
+
#: inc/nxs_snap_class.php:538
|
431 |
+
msgid "Custom field Image Prefix:"
|
432 |
+
msgstr "Campo Personalizado do Prefixo da Imagem:"
|
433 |
+
|
434 |
+
#: inc/nxs_snap_class.php:540
|
435 |
+
msgid ""
|
436 |
+
"If your custom field contain only the last part of the image path, please "
|
437 |
+
"enter the prefix"
|
438 |
+
msgstr ""
|
439 |
+
"Se o campo personalizado contém somente a última parte do caminho da imagem, "
|
440 |
+
"por favor, digite o prefixo"
|
441 |
+
|
442 |
+
#: inc/nxs_snap_class.php:545 inc/nxs_snap_class.php:546
|
443 |
+
msgid "Debug/Report Settings"
|
444 |
+
msgstr "Configurações Depurar(Debug)/Relatório"
|
445 |
+
|
446 |
+
#: inc/nxs_snap_class.php:549
|
447 |
+
msgid "How many log records keep?"
|
448 |
+
msgstr "Manter quantos Registros de \"Log\"?"
|
449 |
+
|
450 |
+
#: inc/nxs_snap_class.php:558
|
451 |
+
msgid "Minimal"
|
452 |
+
msgstr "Mínimo"
|
453 |
+
|
454 |
+
#: inc/nxs_snap_class.php:558
|
455 |
+
msgid ""
|
456 |
+
"Only important action info will be added to the log. \"Debug\", \"Skipped\", "
|
457 |
+
"informational info will be ignored."
|
458 |
+
msgstr ""
|
459 |
+
"Somente as ações e informações importantes serão adicionada ao \"Log\". "
|
460 |
+
"\"Depurar\", \"Ignorado\", e Informativos serão ignorados."
|
461 |
+
|
462 |
+
#: inc/nxs_snap_class.php:559
|
463 |
+
msgid "Normal"
|
464 |
+
msgstr "Normal"
|
465 |
+
|
466 |
+
#: inc/nxs_snap_class.php:559
|
467 |
+
msgid "All info except extended debug queryies will be added to the log."
|
468 |
+
msgstr ""
|
469 |
+
"Todas as informações, exceto depuração estendida e \"queryies\" serão "
|
470 |
+
"adicionadas ao Log."
|
471 |
+
|
472 |
+
#: inc/nxs_snap_class.php:560
|
473 |
+
msgid "Extended/Debug"
|
474 |
+
msgstr "Depuração/Estendida"
|
475 |
+
|
476 |
+
#: inc/nxs_snap_class.php:560
|
477 |
+
msgid "Advanced Setting. Extended debug Info will be added to the log."
|
478 |
+
msgstr ""
|
479 |
+
"Configurações Avançadas. As informações da Depuração Estendida serão "
|
480 |
+
"adicionadas ao Log."
|
481 |
+
|
482 |
+
#: inc/nxs_snap_class.php:566
|
483 |
+
msgid ""
|
484 |
+
"Send Email notification for all autoposting errors. No more then one email "
|
485 |
+
"per hour will be sent."
|
486 |
+
msgstr ""
|
487 |
+
"Enviar notificação por Email para todos os erros de Publicações Automáticas. "
|
488 |
+
"Então será enviado um e-mail por hora e não mais."
|
489 |
+
|
490 |
+
#: inc/nxs_snap_class.php:569
|
491 |
+
msgid "Email:"
|
492 |
+
msgstr "E-mail:"
|
493 |
+
|
494 |
+
#: inc/nxs_snap_class.php:570
|
495 |
+
msgid ""
|
496 |
+
"wp_mail will be used. Some email providers (gmail, hotmail) might have "
|
497 |
+
"problems getting such mail"
|
498 |
+
msgstr ""
|
499 |
+
"O wp_mail será usado. Alguns provedores de e-mail (gmail, hotmail) podem ter "
|
500 |
+
"problemas para receber tais e-mails"
|
501 |
+
|
502 |
+
#: inc/nxs_snap_class.php:722
|
503 |
+
msgid ""
|
504 |
+
"Set random delays around your interval time, to make your posts appear more "
|
505 |
+
"human"
|
506 |
+
msgstr ""
|
507 |
+
"Definir atrasos aleatórios em torno do seu intervalo de tempo, para fazer "
|
508 |
+
"seus posts aparecem mais \"humano\" menos automatizados"
|
509 |
+
|
510 |
+
#: inc/nxs_snap_class.php:742
|
511 |
+
msgid "Contact support"
|
512 |
+
msgstr "Contactar o Suporte"
|
513 |
+
|
514 |
+
#: inc/nxs_snap_class.php:743
|
515 |
+
msgid ""
|
516 |
+
"Ready to to Upgrade to Multiple Accounts Edition<br/> and get Google+ and "
|
517 |
+
"Pinterest Auto-Posting?"
|
518 |
+
msgstr ""
|
519 |
+
"Está Pronto para Atualizar para a Edição de Múltiplas Contas<br/> e ter "
|
520 |
+
"Publicações Automáticas para o Google+ e para o Pinterest?"
|
521 |
+
|
522 |
+
#: inc/nxs_snap_class.php:744
|
523 |
+
msgid "Enter your Activation Key"
|
524 |
+
msgstr "Digite sua Chave de Ativação"
|
525 |
+
|
526 |
+
#: inc/nxs_snap_class.php:745
|
527 |
+
msgid "Get It here"
|
528 |
+
msgstr "Comprá-lo aqui"
|
529 |
+
|
530 |
+
#: inc/nxs_snap_class.php:747
|
531 |
+
msgid "Activation"
|
532 |
+
msgstr "Ativação"
|
533 |
+
|
534 |
+
#: inc/nxs_snap_class.php:749
|
535 |
+
msgid "Multiple Accounts Edition and Google+ and Pinterest Auto-Posting"
|
536 |
+
msgstr ""
|
537 |
+
"Edição de Múltiplas Contas para \"Publicações Automáticas\" para o Google+ e "
|
538 |
+
"o Pinterest"
|
539 |
+
|
540 |
+
#: inc/nxs_snap_class.php:749
|
541 |
+
msgid "You can find your key on this page"
|
542 |
+
msgstr "Você pode encontrar sua chave nesta página"
|
543 |
+
|
544 |
+
#: inc/nxs_snap_class.php:750
|
545 |
+
msgid "Enter your Key"
|
546 |
+
msgstr "Insira sua chave"
|
547 |
+
|
548 |
+
#: inc/nxs_snap_class.php:752
|
549 |
+
msgid "Your plugin will be automatically upgraded"
|
550 |
+
msgstr "O seu Plugin será atualizado automaticamente"
|
551 |
+
|
552 |
+
#: inc/nxs_snap_class.php:757
|
553 |
+
msgid "Next Scripts: Social Networks Auto Poster Options"
|
554 |
+
msgstr "Next Scripts: Social Networks Auto Poster - Opções"
|
555 |
+
|
556 |
+
#: inc/nxs_snap_class.php:757
|
557 |
+
msgid "Plugin Version"
|
558 |
+
msgstr "Versão do Plugin"
|
559 |
+
|
560 |
+
#: inc/nxs_snap_class.php:760
|
561 |
+
msgid "Get"
|
562 |
+
msgstr "Comprar"
|
563 |
+
|
564 |
+
#: inc/nxs_snap_class.php:762
|
565 |
+
msgid "Here you can setup \"Social Networks Auto Poster\"."
|
566 |
+
msgstr "Aqui você pode configurar o \"Social Networks Auto Poster\"."
|
567 |
+
|
568 |
+
#: inc/nxs_snap_class.php:762
|
569 |
+
msgid ""
|
570 |
+
"You can start by clicking \"Add new account\" button and choosing the Social "
|
571 |
+
"Network you would like to add."
|
572 |
+
msgstr ""
|
573 |
+
"Você pode começar clicando no botão \"Adicionar Nova Conta\" e escolher a "
|
574 |
+
"Rede Social que você gostaria de adicionar."
|
575 |
+
|
576 |
+
#: inc/nxs_snap_class.php:778
|
577 |
+
msgid "You have Google Analytics Plugin installed and activated."
|
578 |
+
msgstr "Você tem o Google Analytics Plugin instalado e ativado."
|
579 |
+
|
580 |
+
#: inc/nxs_snap_class.php:778
|
581 |
+
msgid "This plugin hijacks the authorization workflow."
|
582 |
+
msgstr "Este plugin captura a Autorização e o Fluxo de Trabalho."
|
583 |
+
|
584 |
+
#: inc/nxs_snap_class.php:779
|
585 |
+
msgid ""
|
586 |
+
"Please temporary <a href=\"%s\">deactivate</a> Google Analytics plugin, do "
|
587 |
+
"all authorizations and then activate it back."
|
588 |
+
msgstr ""
|
589 |
+
"Por favor, <a href=\"%s\">desative</a> temporariamente o Plugin do Google "
|
590 |
+
"Analytics, para poder fazer todas as autorizações e, em seguida, volte a "
|
591 |
+
"ativá-lo."
|
592 |
+
|
593 |
+
#: inc/nxs_snap_class.php:820 inc-cl/fb.php:135 inc-cl/li.php:179
|
594 |
+
#: inc-cl/vk.php:119 nxs_functions.php:675 nxs_functions.php:685
|
595 |
+
msgid "Auto"
|
596 |
+
msgstr "Automático"
|
597 |
+
|
598 |
+
#: inc/nxs_snap_class.php:820
|
599 |
+
msgid "Post URL will be used"
|
600 |
+
msgstr "O URL da Publicação será utilizado"
|
601 |
+
|
602 |
+
#: inc/nxs_snap_class.php:823 nxs_functions.php:688
|
603 |
+
msgid "URL:"
|
604 |
+
msgstr "URL:"
|
605 |
+
|
606 |
+
#: inc/nxs_snap_class.php:833
|
607 |
+
msgid ""
|
608 |
+
"If you made any changes to the format, please \"Update\" the post before "
|
609 |
+
"reposting"
|
610 |
+
msgstr ""
|
611 |
+
"Se você tiver feito alterações no formato, por favor, \"Atualize\" a "
|
612 |
+
"publicação antes de republicar"
|
613 |
+
|
614 |
+
#: inc/nxs_snap_class.php:836
|
615 |
+
msgid "Check All"
|
616 |
+
msgstr "Marcar Tudo"
|
617 |
+
|
618 |
+
#: inc/nxs_snap_class.php:836
|
619 |
+
msgid "Uncheck All"
|
620 |
+
msgstr "Desmarcar Tudo"
|
621 |
+
|
622 |
+
#: inc/nxs_snap_class.php:870 inc/nxs_snap_class.php:873
|
623 |
+
#: inc/nxs_snap_class.php:878
|
624 |
+
msgid "NextScripts: Social Networks Auto Poster - Post Options"
|
625 |
+
msgstr "NextScripts: Social Networks Auto Poster - Opções das Publicações"
|
626 |
+
|
627 |
+
#: inc-cl/ap.php:27 inc-cl/bg.php:12 inc-cl/da.php:12 inc-cl/di.php:13
|
628 |
+
#: inc-cl/dl.php:12 inc-cl/fb.php:47 inc-cl/ff.php:12 inc-cl/gp.php:12
|
629 |
+
#: inc-cl/ip.php:12 inc-cl/li.php:71 inc-cl/lj.php:12 inc-cl/pk.php:50
|
630 |
+
#: inc-cl/pn.php:12 inc-cl/rd.php:12 inc-cl/su.php:12 inc-cl/tr.php:40
|
631 |
+
#: inc-cl/tw.php:12 inc-cl/vb.php:12 inc-cl/vk.php:12 inc-cl/wp.php:12
|
632 |
+
#: inc-cl/yt.php:12
|
633 |
+
msgid "accounts"
|
634 |
+
msgstr "contas"
|
635 |
+
|
636 |
+
#: inc-cl/ap.php:38 inc-cl/bg.php:21 inc-cl/da.php:22 inc-cl/di.php:22
|
637 |
+
#: inc-cl/dl.php:21 inc-cl/fb.php:57 inc-cl/ff.php:21 inc-cl/gp.php:22
|
638 |
+
#: inc-cl/ip.php:21 inc-cl/li.php:82 inc-cl/lj.php:21 inc-cl/pk.php:60
|
639 |
+
#: inc-cl/pn.php:22 inc-cl/rd.php:22 inc-cl/su.php:21 inc-cl/tr.php:50
|
640 |
+
#: inc-cl/tw.php:21 inc-cl/vb.php:21 inc-cl/vk.php:21 inc-cl/wp.php:21
|
641 |
+
#: inc-cl/yt.php:22
|
642 |
+
msgid "Auto-publish to"
|
643 |
+
msgstr "Publicar Automaticamente para"
|
644 |
+
|
645 |
+
#: inc-cl/ap.php:39 inc-cl/bg.php:22 inc-cl/da.php:23 inc-cl/di.php:23
|
646 |
+
#: inc-cl/dl.php:22 inc-cl/ff.php:22 inc-cl/gp.php:23 inc-cl/ip.php:22
|
647 |
+
#: inc-cl/li.php:83 inc-cl/lj.php:22 inc-cl/pk.php:61 inc-cl/pn.php:23
|
648 |
+
#: inc-cl/rd.php:23 inc-cl/su.php:22 inc-cl/tr.php:51 inc-cl/vb.php:22
|
649 |
+
#: inc-cl/vk.php:22 inc-cl/wp.php:22 inc-cl/yt.php:23
|
650 |
+
msgid "Attention requred. Unfinished setup"
|
651 |
+
msgstr "Atenção! Instalação inacabada."
|
652 |
+
|
653 |
+
#: inc-cl/ap.php:39 inc-cl/bg.php:22 inc-cl/da.php:23 inc-cl/di.php:23
|
654 |
+
#: inc-cl/dl.php:22 inc-cl/fb.php:58 inc-cl/ff.php:22 inc-cl/gp.php:23
|
655 |
+
#: inc-cl/ip.php:22 inc-cl/li.php:83 inc-cl/lj.php:22 inc-cl/pk.php:61
|
656 |
+
#: inc-cl/pn.php:23 inc-cl/rd.php:23 inc-cl/su.php:22 inc-cl/tr.php:51
|
657 |
+
#: inc-cl/tw.php:22 inc-cl/vb.php:22 inc-cl/vk.php:22 inc-cl/wp.php:22
|
658 |
+
#: inc-cl/yt.php:23
|
659 |
+
msgid "Show Settings"
|
660 |
+
msgstr "Exibir Configurações"
|
661 |
+
|
662 |
+
#: inc-cl/ap.php:40 inc-cl/bg.php:23 inc-cl/da.php:24 inc-cl/di.php:24
|
663 |
+
#: inc-cl/dl.php:23 inc-cl/fb.php:59 inc-cl/ff.php:23 inc-cl/gp.php:24
|
664 |
+
#: inc-cl/ip.php:23 inc-cl/li.php:84 inc-cl/lj.php:23 inc-cl/pk.php:62
|
665 |
+
#: inc-cl/pn.php:24 inc-cl/rd.php:24 inc-cl/su.php:23 inc-cl/tr.php:52
|
666 |
+
#: inc-cl/tw.php:23 inc-cl/vb.php:23 inc-cl/vk.php:23 inc-cl/wp.php:23
|
667 |
+
#: inc-cl/yt.php:24
|
668 |
+
msgid "Remove Account"
|
669 |
+
msgstr "Remover Conta"
|
670 |
+
|
671 |
+
#: inc-cl/ap.php:55 inc-cl/bg.php:41 inc-cl/da.php:43 inc-cl/di.php:40
|
672 |
+
#: inc-cl/dl.php:37 inc-cl/fb.php:81 inc-cl/ff.php:38 inc-cl/gp.php:41
|
673 |
+
#: inc-cl/ip.php:37 inc-cl/li.php:100 inc-cl/lj.php:37 inc-cl/pk.php:77
|
674 |
+
#: inc-cl/pn.php:46 inc-cl/rd.php:44 inc-cl/su.php:39 inc-cl/tr.php:68
|
675 |
+
#: inc-cl/tw.php:41 inc-cl/vb.php:39 inc-cl/vk.php:40 inc-cl/wp.php:37
|
676 |
+
#: inc-cl/yt.php:41
|
677 |
+
msgid "Detailed %s Installation/Configuration Instructions"
|
678 |
+
msgstr "Detalhado %s Instruções de Instalação/Configuração"
|
679 |
+
|
680 |
+
#: inc-cl/ap.php:57 inc-cl/bg.php:43 inc-cl/da.php:45 inc-cl/di.php:42
|
681 |
+
#: inc-cl/dl.php:39 inc-cl/fb.php:86 inc-cl/ff.php:40 inc-cl/gp.php:43
|
682 |
+
#: inc-cl/ip.php:39 inc-cl/li.php:102 inc-cl/lj.php:40 inc-cl/pk.php:79
|
683 |
+
#: inc-cl/pn.php:47 inc-cl/rd.php:46 inc-cl/su.php:41 inc-cl/tr.php:70
|
684 |
+
#: inc-cl/tw.php:43 inc-cl/vb.php:41 inc-cl/vk.php:45 inc-cl/wp.php:41
|
685 |
+
#: inc-cl/yt.php:43
|
686 |
+
msgid "Account Nickname"
|
687 |
+
msgstr "Apelido da conta"
|
688 |
+
|
689 |
+
#: inc-cl/ap.php:57 inc-cl/bg.php:43 inc-cl/da.php:45 inc-cl/di.php:42
|
690 |
+
#: inc-cl/dl.php:39 inc-cl/fb.php:86 inc-cl/ff.php:40 inc-cl/gp.php:43
|
691 |
+
#: inc-cl/ip.php:39 inc-cl/li.php:102 inc-cl/lj.php:40 inc-cl/pk.php:79
|
692 |
+
#: inc-cl/pn.php:47 inc-cl/rd.php:46 inc-cl/su.php:41 inc-cl/tr.php:70
|
693 |
+
#: inc-cl/tw.php:43 inc-cl/vb.php:41 inc-cl/vk.php:45 inc-cl/wp.php:41
|
694 |
+
#: inc-cl/yt.php:43
|
695 |
+
msgid "Just so you can easily identify it"
|
696 |
+
msgstr "(Só para que você possa facilmente identificá-la)"
|
697 |
+
|
698 |
+
#: inc-cl/ap.php:61 inc-cl/bg.php:49 inc-cl/da.php:51 inc-cl/di.php:47
|
699 |
+
#: inc-cl/dl.php:44 inc-cl/fb.php:91 inc-cl/ff.php:45 inc-cl/gp.php:47
|
700 |
+
#: inc-cl/ip.php:44 inc-cl/li.php:107 inc-cl/lj.php:45 inc-cl/pk.php:84
|
701 |
+
#: inc-cl/pn.php:52 inc-cl/rd.php:52 inc-cl/su.php:46 inc-cl/tr.php:75
|
702 |
+
#: inc-cl/tw.php:47 inc-cl/vb.php:46 inc-cl/vk.php:50 inc-cl/wp.php:46
|
703 |
+
#: inc-cl/yt.php:48
|
704 |
+
msgid "Account Info"
|
705 |
+
msgstr "Informações da Conta"
|
706 |
+
|
707 |
+
#: inc-cl/ap.php:62 inc-cl/bg.php:50 inc-cl/da.php:52 inc-cl/di.php:48
|
708 |
+
#: inc-cl/dl.php:45 inc-cl/fb.php:92 inc-cl/ff.php:46 inc-cl/gp.php:48
|
709 |
+
#: inc-cl/ip.php:45 inc-cl/li.php:108 inc-cl/lj.php:46 inc-cl/pk.php:85
|
710 |
+
#: inc-cl/pn.php:53 inc-cl/rd.php:53 inc-cl/su.php:47 inc-cl/tr.php:76
|
711 |
+
#: inc-cl/tw.php:48 inc-cl/vb.php:47 inc-cl/vk.php:51 inc-cl/wp.php:47
|
712 |
+
#: inc-cl/yt.php:49
|
713 |
+
msgid "Advanced"
|
714 |
+
msgstr "Avançado"
|
715 |
+
|
716 |
+
#: inc-cl/ap.php:72 inc-cl/da.php:68 inc-cl/rd.php:91
|
717 |
+
msgid "Text Format"
|
718 |
+
msgstr "Formato de texto"
|
719 |
+
|
720 |
+
#: inc-cl/ap.php:72 inc-cl/bg.php:64 inc-cl/bg.php:69 inc-cl/da.php:63
|
721 |
+
#: inc-cl/da.php:68 inc-cl/di.php:68 inc-cl/di.php:73 inc-cl/dl.php:58
|
722 |
+
#: inc-cl/dl.php:64 inc-cl/fb.php:103 inc-cl/ff.php:64 inc-cl/gp.php:80
|
723 |
+
#: inc-cl/ip.php:58 inc-cl/ip.php:64 inc-cl/lj.php:70 inc-cl/lj.php:74
|
724 |
+
#: inc-cl/pk.php:109 inc-cl/pn.php:91 inc-cl/rd.php:79 inc-cl/rd.php:91
|
725 |
+
#: inc-cl/su.php:76 inc-cl/tr.php:93 inc-cl/tr.php:119 inc-cl/vb.php:72
|
726 |
+
#: inc-cl/vb.php:80 inc-cl/vk.php:96 inc-cl/wp.php:65 inc-cl/wp.php:72
|
727 |
+
#: inc-cl/yt.php:68
|
728 |
+
msgid "Show format info"
|
729 |
+
msgstr "Exibir as informações do Formato"
|
730 |
+
|
731 |
+
#: inc-cl/ap.php:75
|
732 |
+
msgid "New post (%TITLE%) has been published on %SITENAME% - %URL%"
|
733 |
+
msgstr "Nova Publicação (%TITLE%) foi publicada em %SITENAME% - %URL%"
|
734 |
+
|
735 |
+
#: inc-cl/ap.php:80
|
736 |
+
msgid "Attach Image to App.net Post"
|
737 |
+
msgstr "Anexar a imagem à Publicação \"App.net\""
|
738 |
+
|
739 |
+
#: inc-cl/ap.php:83
|
740 |
+
msgid "Authorize Your App.Net Account"
|
741 |
+
msgstr "Autorizar a sua Conta ao \"App.net\""
|
742 |
+
|
743 |
+
#: inc-cl/ap.php:83 inc-cl/fb.php:153
|
744 |
+
msgid "Please click \"Update Settings\" to be able to Authorize your account."
|
745 |
+
msgstr ""
|
746 |
+
"Por favor, clique em \"Atualizar Configurações\" para poder autorizar a sua "
|
747 |
+
"conta."
|
748 |
+
|
749 |
+
#: inc-cl/ap.php:85
|
750 |
+
msgid "Your App.Net Account has been authorized."
|
751 |
+
msgstr "Sua conta \"App.Net\" foi autorizada."
|
752 |
+
|
753 |
+
#: inc-cl/ap.php:86 inc-cl/fb.php:156 inc-cl/vk.php:73
|
754 |
+
msgid "You can"
|
755 |
+
msgstr "Você pode"
|
756 |
+
|
757 |
+
#: inc-cl/ap.php:88 inc-cl/fb.php:158 inc-cl/vk.php:75
|
758 |
+
msgid "Authorize your account"
|
759 |
+
msgstr "Autorizar a sua conta"
|
760 |
+
|
761 |
+
#: inc-cl/ap.php:89
|
762 |
+
msgid "If you get App.Net message:"
|
763 |
+
msgstr "Se você receber a mensagem do \"App.net\":"
|
764 |
+
|
765 |
+
#: inc-cl/ap.php:89
|
766 |
+
msgid ""
|
767 |
+
"please make sure that domain name in your App.Net App matches your website "
|
768 |
+
"domain exactly. Please note that www. and non www. versions are different "
|
769 |
+
"domains."
|
770 |
+
msgstr ""
|
771 |
+
"por favor, certifique-se de que o nome de domínio em seu \"App.net\" "
|
772 |
+
"corresponde exatamente ao domínio do seu site . Por favor, note que com o "
|
773 |
+
"www. e sem o www. são considerados domínios diferentes."
|
774 |
+
|
775 |
+
#: inc-cl/ap.php:97 inc-cl/bg.php:86 inc-cl/da.php:80 inc-cl/di.php:83
|
776 |
+
#: inc-cl/dl.php:73 inc-cl/fb.php:164 inc-cl/ff.php:72 inc-cl/gp.php:102
|
777 |
+
#: inc-cl/ip.php:73 inc-cl/li.php:197 inc-cl/lj.php:86 inc-cl/pk.php:129
|
778 |
+
#: inc-cl/pn.php:101 inc-cl/rd.php:103 inc-cl/su.php:86 inc-cl/tr.php:147
|
779 |
+
#: inc-cl/tw.php:70 inc-cl/vb.php:86 inc-cl/vk.php:133 inc-cl/wp.php:83
|
780 |
+
#: inc-cl/yt.php:79
|
781 |
+
msgid "Test your settings"
|
782 |
+
msgstr "Teste suas configurações"
|
783 |
+
|
784 |
+
#: inc-cl/ap.php:97 inc-cl/bg.php:86 inc-cl/da.php:80 inc-cl/di.php:83
|
785 |
+
#: inc-cl/dl.php:73 inc-cl/fb.php:164 inc-cl/ff.php:72 inc-cl/gp.php:102
|
786 |
+
#: inc-cl/ip.php:73 inc-cl/li.php:197 inc-cl/lj.php:86 inc-cl/pk.php:129
|
787 |
+
#: inc-cl/pn.php:101 inc-cl/rd.php:103 inc-cl/su.php:86 inc-cl/tr.php:147
|
788 |
+
#: inc-cl/tw.php:70 inc-cl/vb.php:86 inc-cl/vk.php:133 inc-cl/wp.php:83
|
789 |
+
#: inc-cl/yt.php:79
|
790 |
+
msgid "Submit Test Post to %s"
|
791 |
+
msgstr "Enviar Publicação de teste para %s"
|
792 |
+
|
793 |
+
#: inc-cl/ap.php:104 inc-cl/ap.php:105 inc-cl/bg.php:93 inc-cl/bg.php:94
|
794 |
+
#: inc-cl/da.php:87 inc-cl/da.php:88 inc-cl/di.php:89 inc-cl/di.php:90
|
795 |
+
#: inc-cl/dl.php:81 inc-cl/dl.php:82 inc-cl/fb.php:171 inc-cl/fb.php:172
|
796 |
+
#: inc-cl/ff.php:80 inc-cl/ff.php:81 inc-cl/gp.php:109 inc-cl/gp.php:110
|
797 |
+
#: inc-cl/ip.php:81 inc-cl/ip.php:82 inc-cl/li.php:207 inc-cl/li.php:208
|
798 |
+
#: inc-cl/lj.php:91 inc-cl/lj.php:92 inc-cl/pk.php:135 inc-cl/pk.php:136
|
799 |
+
#: inc-cl/pn.php:108 inc-cl/pn.php:109 inc-cl/rd.php:110 inc-cl/rd.php:111
|
800 |
+
#: inc-cl/su.php:94 inc-cl/su.php:95 inc-cl/tr.php:154 inc-cl/tr.php:155
|
801 |
+
#: inc-cl/tw.php:78 inc-cl/tw.php:80 inc-cl/vb.php:94 inc-cl/vb.php:95
|
802 |
+
#: inc-cl/vk.php:140 inc-cl/vk.php:141 inc-cl/wp.php:91 inc-cl/wp.php:92
|
803 |
+
#: inc-cl/yt.php:84 inc-cl/yt.php:85
|
804 |
+
msgid "Categories"
|
805 |
+
msgstr "Categorias:"
|
806 |
+
|
807 |
+
#: inc-cl/ap.php:160 inc-cl/bg.php:155 inc-cl/da.php:145 inc-cl/di.php:143
|
808 |
+
#: inc-cl/dl.php:132 inc-cl/fb.php:263 inc-cl/ff.php:134 inc-cl/gp.php:169
|
809 |
+
#: inc-cl/ip.php:132 inc-cl/li.php:272 inc-cl/lj.php:149 inc-cl/pk.php:198
|
810 |
+
#: inc-cl/pn.php:166 inc-cl/rd.php:177 inc-cl/su.php:152 inc-cl/tr.php:224
|
811 |
+
#: inc-cl/vb.php:148 inc-cl/vk.php:225 inc-cl/wp.php:143 inc-cl/yt.php:137
|
812 |
+
msgid "publish to"
|
813 |
+
msgstr "Publicar em"
|
814 |
+
|
815 |
+
#: inc-cl/ap.php:161
|
816 |
+
msgid "Repost to App.Net"
|
817 |
+
msgstr "Republicar no \"App.net\""
|
818 |
+
|
819 |
+
#: inc-cl/ap.php:167 inc-cl/bg.php:162 inc-cl/da.php:152 inc-cl/di.php:148
|
820 |
+
#: inc-cl/dl.php:138 inc-cl/fb.php:276 inc-cl/ff.php:140 inc-cl/gp.php:176
|
821 |
+
#: inc-cl/ip.php:138 inc-cl/li.php:278 inc-cl/lj.php:155 inc-cl/pk.php:204
|
822 |
+
#: inc-cl/pn.php:172 inc-cl/rd.php:184 inc-cl/su.php:159 inc-cl/tr.php:230
|
823 |
+
#: inc-cl/tw.php:157 inc-cl/vb.php:155 inc-cl/vk.php:231 inc-cl/wp.php:150
|
824 |
+
#: inc-cl/yt.php:144
|
825 |
+
msgid "Posted on"
|
826 |
+
msgstr "Publicado em"
|
827 |
+
|
828 |
+
#: inc-cl/ap.php:180 inc-cl/bg.php:174 inc-cl/da.php:165 inc-cl/di.php:159
|
829 |
+
#: inc-cl/dl.php:151 inc-cl/fb.php:288 inc-cl/ff.php:157 inc-cl/gp.php:192
|
830 |
+
#: inc-cl/ip.php:151 inc-cl/li.php:290 inc-cl/lj.php:168 inc-cl/pk.php:216
|
831 |
+
#: inc-cl/pn.php:185 inc-cl/rd.php:197 inc-cl/su.php:171 inc-cl/tr.php:242
|
832 |
+
#: inc-cl/tw.php:169 inc-cl/vb.php:168 inc-cl/vk.php:243 inc-cl/wp.php:163
|
833 |
+
#: inc-cl/yt.php:157
|
834 |
+
msgid "Include in \"Auto-Reposting\" to this network."
|
835 |
+
msgstr "Incluir esta Rede nas \"Publicações Automáticas\""
|
836 |
+
|
837 |
+
#: inc-cl/ap.php:184 inc-cl/da.php:172 inc-cl/di.php:164 inc-cl/dl.php:158
|
838 |
+
#: inc-cl/ip.php:158 inc-cl/lj.php:174 inc-cl/pk.php:230 inc-cl/rd.php:210
|
839 |
+
#: inc-cl/su.php:186 inc-cl/tr.php:259 inc-cl/vb.php:171 inc-cl/vb.php:174
|
840 |
+
#: inc-cl/wp.php:169
|
841 |
+
msgid "Text Format:"
|
842 |
+
msgstr "Formato de texto:"
|
843 |
+
|
844 |
+
#: inc-cl/bg.php:60
|
845 |
+
msgid ""
|
846 |
+
"Log to your Blogger management panel and look at the URL of your blog: "
|
847 |
+
"http://www.blogger.com/blogger.g?blogID=8959085979163812093#allposts. Your "
|
848 |
+
"Blog ID will be: 8959085979163812093"
|
849 |
+
msgstr ""
|
850 |
+
"Acesse o painel de administração do seu Blogger e veja o URL do seu blog: "
|
851 |
+
"http://www.blogger.com/blogger.g?blogID=8959085979163812093#allposts. Seu ID "
|
852 |
+
"do Blog será: 8959085979163812093"
|
853 |
+
|
854 |
+
#: inc-cl/bg.php:64 inc-cl/da.php:63 inc-cl/di.php:68 inc-cl/dl.php:58
|
855 |
+
#: inc-cl/ip.php:58 inc-cl/lj.php:70 inc-cl/rd.php:79 inc-cl/tr.php:93
|
856 |
+
#: inc-cl/vb.php:72 inc-cl/wp.php:64
|
857 |
+
msgid "Post Title Format"
|
858 |
+
msgstr "Formato do Título da Publicação"
|
859 |
+
|
860 |
+
#: inc-cl/bg.php:69 inc-cl/di.php:73 inc-cl/dl.php:64 inc-cl/ff.php:64
|
861 |
+
#: inc-cl/ip.php:64 inc-cl/lj.php:74 inc-cl/pk.php:109 inc-cl/su.php:76
|
862 |
+
#: inc-cl/tr.php:119 inc-cl/vb.php:80 inc-cl/wp.php:71
|
863 |
+
msgid "Post Text Format"
|
864 |
+
msgstr "Formato do Texto da Publicação"
|
865 |
+
|
866 |
+
#: inc-cl/bg.php:77
|
867 |
+
msgid "HTML is allowed"
|
868 |
+
msgstr "Pode ser usado HTML."
|
869 |
+
|
870 |
+
#: inc-cl/bg.php:81 inc-cl/di.php:64
|
871 |
+
msgid "Post with tags"
|
872 |
+
msgstr "Tags da Publicação"
|
873 |
+
|
874 |
+
#: inc-cl/bg.php:81
|
875 |
+
msgid "Tags from the blogpost will be auto-posted to Blogger/Blogspot"
|
876 |
+
msgstr ""
|
877 |
+
"As Tags do blogpost serão automaticamente enviadas para Blogger/Blogspot"
|
878 |
+
|
879 |
+
#: inc-cl/bg.php:86
|
880 |
+
msgid "Submit Test Post to Finish Configuration"
|
881 |
+
msgstr "Enviar uma Publicação de teste para concluir a configuração"
|
882 |
+
|
883 |
+
#: inc-cl/bg.php:157
|
884 |
+
msgid "Repost to Blogger"
|
885 |
+
msgstr "Republicar no Blogger"
|
886 |
+
|
887 |
+
#: inc-cl/bg.php:166
|
888 |
+
msgid "Setup your Blogger Account to AutoPost to Blogger"
|
889 |
+
msgstr ""
|
890 |
+
"Configure sua conta do Blogger para Publicar Automaticamente para o Blogger"
|
891 |
+
|
892 |
+
#: inc-cl/bg.php:177 inc-cl/da.php:169 inc-cl/di.php:162 inc-cl/dl.php:155
|
893 |
+
#: inc-cl/ff.php:161 inc-cl/ip.php:155 inc-cl/lj.php:171 inc-cl/rd.php:201
|
894 |
+
#: inc-cl/wp.php:166
|
895 |
+
msgid "Title Format:"
|
896 |
+
msgstr "Formato do título:"
|
897 |
+
|
898 |
+
#: inc-cl/bg.php:179 inc-cl/fb.php:315 inc-cl/gp.php:215 inc-cl/li.php:297
|
899 |
+
#: inc-cl/tw.php:172 inc-cl/vk.php:245 inc-cl/yt.php:161
|
900 |
+
msgid "Message Format:"
|
901 |
+
msgstr "Formato de Mensagem:"
|
902 |
+
|
903 |
+
#: inc-cl/da.php:39
|
904 |
+
msgid "deviantART API Library not found"
|
905 |
+
msgstr "Biblioteca de API \"deviantART\" não foi encontrada"
|
906 |
+
|
907 |
+
#: inc-cl/da.php:40
|
908 |
+
msgid "deviantART doesn't have a built-in API for automated posts yet."
|
909 |
+
msgstr ""
|
910 |
+
"A \"deviantART\" ainda não tem uma API inserida para mensagens automatizadas."
|
911 |
+
|
912 |
+
#: inc-cl/da.php:40
|
913 |
+
msgid ""
|
914 |
+
"<br/>You need to get a special <a target=\"_blank\" href=\"http://www."
|
915 |
+
"nextscripts.com/deviantart-automated-posting\"><b>API Library Module</b></a> "
|
916 |
+
"to be able to publish your content to deviantART."
|
917 |
+
msgstr ""
|
918 |
+
"<br/>Você precisa ter um<a target=\"_blank\" href=\"http://www.nextscripts."
|
919 |
+
"com/deviantart-automated-posting\"><b> Módulo de Livraria API </b></"
|
920 |
+
"a>especial para poder publicar o seu conteúdo para deviantART."
|
921 |
+
|
922 |
+
#: inc-cl/da.php:71
|
923 |
+
msgid "%FULLTEXT%"
|
924 |
+
msgstr "%FULLTEXT%"
|
925 |
+
|
926 |
+
#: inc-cl/da.php:96 inc-cl/rd.php:119 nxs_functions.php:482
|
927 |
+
msgid "Posting Delay"
|
928 |
+
msgstr "Publicado com retardo \"delay\""
|
929 |
+
|
930 |
+
#: inc-cl/da.php:146
|
931 |
+
msgid "Repost to deviantART"
|
932 |
+
msgstr "Republicar no deviantART"
|
933 |
+
|
934 |
+
#: inc-cl/di.php:64
|
935 |
+
msgid "Tags from the blogpost will be auto posted to Diigo"
|
936 |
+
msgstr "Tags do blog/site serão Publicadas Automaticamente para o Diigo"
|
937 |
+
|
938 |
+
#: inc-cl/di.php:144
|
939 |
+
msgid "Repost to Diigo"
|
940 |
+
msgstr "Republicar no Digo"
|
941 |
+
|
942 |
+
#: inc-cl/dl.php:133
|
943 |
+
msgid "Repost to Delicious"
|
944 |
+
msgstr "Republicar para o Delicious"
|
945 |
+
|
946 |
+
#: inc-cl/fb.php:58 inc-cl/tw.php:22
|
947 |
+
msgid "Attention required. Unfinished setup"
|
948 |
+
msgstr "Atenção! Instalação inacabada."
|
949 |
+
|
950 |
+
#: inc-cl/fb.php:68 inc-cl/gp.php:83 inc-cl/rd.php:94
|
951 |
+
msgid "New post (%TITLE%) has been published on %SITENAME%"
|
952 |
+
msgstr "Nova Publicação (%TITLE%) foi feita em %SITENAME%"
|
953 |
+
|
954 |
+
#: inc-cl/fb.php:70 inc-cl/tw.php:33
|
955 |
+
msgctxt "timezone date format"
|
956 |
+
msgid "Y-m-d G:i:s"
|
957 |
+
msgstr "d-m-Y G:i:s"
|
958 |
+
|
959 |
+
#: inc-cl/fb.php:82
|
960 |
+
msgid "Please use in your Facebook App:"
|
961 |
+
msgstr "Por favor, use a sua App Facebook:"
|
962 |
+
|
963 |
+
#: inc-cl/fb.php:98
|
964 |
+
msgid "Could be your Facebook Profile, Facebook Page, Facebook Group"
|
965 |
+
msgstr "Pode ser seu Perfil no Facebook, Página, ou Grupo no Facebook"
|
966 |
+
|
967 |
+
#: inc-cl/fb.php:103 inc-cl/gp.php:80 inc-cl/li.php:167 inc-cl/pn.php:91
|
968 |
+
#: inc-cl/tw.php:62 inc-cl/vk.php:96 inc-cl/yt.php:68
|
969 |
+
msgid "Message text Format"
|
970 |
+
msgstr "Formato do texto da Publicação"
|
971 |
+
|
972 |
+
#: inc-cl/fb.php:111 inc-cl/fb.php:301 inc-cl/gp.php:94 inc-cl/gp.php:199
|
973 |
+
#: inc-cl/rd.php:87 inc-cl/rd.php:207 inc-cl/vk.php:109 inc-cl/vk.php:256
|
974 |
+
msgid "Text Post"
|
975 |
+
msgstr "Texto da Publicação"
|
976 |
+
|
977 |
+
#: inc-cl/fb.php:111 inc-cl/fb.php:301 inc-cl/gp.php:94 inc-cl/gp.php:199
|
978 |
+
#: inc-cl/vk.php:109 inc-cl/vk.php:256
|
979 |
+
msgid "just text message"
|
980 |
+
msgstr "apenas a mensagem de texto"
|
981 |
+
|
982 |
+
#: inc-cl/fb.php:113 inc-cl/fb.php:302 inc-cl/vk.php:110 inc-cl/vk.php:257
|
983 |
+
msgid "Image Post"
|
984 |
+
msgstr "Imagem da Publicação"
|
985 |
+
|
986 |
+
#: inc-cl/fb.php:113 inc-cl/fb.php:302 inc-cl/gp.php:95 inc-cl/gp.php:200
|
987 |
+
#: inc-cl/vk.php:110 inc-cl/vk.php:257
|
988 |
+
msgid "big image with text message"
|
989 |
+
msgstr "Imagem Grande para o texto da Mensagem "
|
990 |
+
|
991 |
+
#: inc-cl/fb.php:114
|
992 |
+
msgid "Upload Images to"
|
993 |
+
msgstr "Enviar imagens para"
|
994 |
+
|
995 |
+
#: inc-cl/fb.php:115
|
996 |
+
msgid "App Album"
|
997 |
+
msgstr "Álbum de Aplicativos"
|
998 |
+
|
999 |
+
#: inc-cl/fb.php:115 inc-cl/fb.php:123 inc-cl/fb.php:306
|
1000 |
+
msgid "or"
|
1001 |
+
msgstr "ou"
|
1002 |
+
|
1003 |
+
#: inc-cl/fb.php:117
|
1004 |
+
msgid "Timeline"
|
1005 |
+
msgstr "Linha do Tempo"
|
1006 |
+
|
1007 |
+
#: inc-cl/fb.php:120 inc-cl/vk.php:111
|
1008 |
+
msgid "Text Post with \"attached\" link"
|
1009 |
+
msgstr "Texto da Publicação com link \"anexado\""
|
1010 |
+
|
1011 |
+
#: inc-cl/fb.php:122
|
1012 |
+
msgid "Link attachment type"
|
1013 |
+
msgstr "Tipo de link de anexo"
|
1014 |
+
|
1015 |
+
#: inc-cl/fb.php:123 inc-cl/fb.php:306
|
1016 |
+
msgid "Share a link to your blogpost"
|
1017 |
+
msgstr "Compartilhar um link para seu blogpost"
|
1018 |
+
|
1019 |
+
#: inc-cl/fb.php:125 inc-cl/fb.php:308
|
1020 |
+
msgid "Attach your blogpost"
|
1021 |
+
msgstr "Anexar seu blogpost"
|
1022 |
+
|
1023 |
+
#: inc-cl/fb.php:126
|
1024 |
+
msgid "If post has video use it as an attachment thumbnail."
|
1025 |
+
msgstr ""
|
1026 |
+
"Se a Publicação tem um vídeo anexo usá-lo como miniatura (thumbnail) como "
|
1027 |
+
"anexo."
|
1028 |
+
|
1029 |
+
#: inc-cl/fb.php:126
|
1030 |
+
msgid ""
|
1031 |
+
"Video will be used for an attachment thumbnail instead of featured image. "
|
1032 |
+
"Only Youtube is supported at this time."
|
1033 |
+
msgstr ""
|
1034 |
+
"O vídeo será usado para uma miniatura em vez da imagem em destaque anexa. "
|
1035 |
+
"Apenas YouTube é suportado neste momento."
|
1036 |
+
|
1037 |
+
#: inc-cl/fb.php:129
|
1038 |
+
msgid "Let Facebook fill the link info"
|
1039 |
+
msgstr "Deixar o Facebook preencher as informações do link"
|
1040 |
+
|
1041 |
+
#: inc-cl/fb.php:130
|
1042 |
+
msgid ""
|
1043 |
+
"Recommended. Facebook will automatically take attached/shared link info from "
|
1044 |
+
"OG: tags or other sources."
|
1045 |
+
msgstr ""
|
1046 |
+
"Recomendado. O Facebook terá automaticamente as informações sobre vínculos "
|
1047 |
+
"(links)Anexada/Compartilhado do \"OG:tags\" ou de outras fontes."
|
1048 |
+
|
1049 |
+
#: inc-cl/fb.php:134 inc-cl/li.php:178
|
1050 |
+
msgid "Attachment Text Format"
|
1051 |
+
msgstr "Formato do Texto do anexo"
|
1052 |
+
|
1053 |
+
#: inc-cl/fb.php:136 inc-cl/li.php:180 inc-cl/vk.php:120
|
1054 |
+
msgid ""
|
1055 |
+
"Recommended. Info from SEO Plugins will be used, then post excerpt, then "
|
1056 |
+
"post text"
|
1057 |
+
msgstr ""
|
1058 |
+
"Recomendado. Informações de Plugins de SEO serão usadas, publicar o Resumo, "
|
1059 |
+
"e depois o Texto"
|
1060 |
+
|
1061 |
+
#: inc-cl/fb.php:137 inc-cl/li.php:181
|
1062 |
+
msgid "Set your own format"
|
1063 |
+
msgstr "Definir seu próprio formato."
|
1064 |
+
|
1065 |
+
#: inc-cl/fb.php:143
|
1066 |
+
msgid "Where to upload Images"
|
1067 |
+
msgstr "Onde fazer o envio de imagens"
|
1068 |
+
|
1069 |
+
#: inc-cl/fb.php:143
|
1070 |
+
msgid "(App Album)"
|
1071 |
+
msgstr "(Álbum de Aplicativos)"
|
1072 |
+
|
1073 |
+
#: inc-cl/fb.php:143
|
1074 |
+
msgid ""
|
1075 |
+
"Facebook automatically creates an album for your app. Images will be grouped "
|
1076 |
+
"there as in any regular album."
|
1077 |
+
msgstr ""
|
1078 |
+
"O Facebook cria automaticamente um álbum para suas imagens de Aplicativos, "
|
1079 |
+
"que serão agrupadas lá como em qualquer álbum usual."
|
1080 |
+
|
1081 |
+
#: inc-cl/fb.php:143
|
1082 |
+
msgid "(Timeline)"
|
1083 |
+
msgstr "(Linha do Tempo)"
|
1084 |
+
|
1085 |
+
#: inc-cl/fb.php:143
|
1086 |
+
msgid ""
|
1087 |
+
"Images will be posted to the special \"Wall/Timeline\" album and won't be "
|
1088 |
+
"grouped. \"Wall/Timeline\" album must exist. It's created when first image "
|
1089 |
+
"posted to timeline manually."
|
1090 |
+
msgstr ""
|
1091 |
+
"As imagens serão publicadas no álbum especial \"Mural/Linha do Tempo\" e não "
|
1092 |
+
"serão agrupadas. O Álbum \"Mural/Linha do Tempo\" deve existir. É criado "
|
1093 |
+
"quando a primeira imagem for publicada à Linha do Tempo manualmente."
|
1094 |
+
|
1095 |
+
#: inc-cl/fb.php:144 inc-cl/fb.php:310
|
1096 |
+
msgid "Two ways of attaching post on Facebook"
|
1097 |
+
msgstr "Duas formas de anexar a Publicação no Facebook"
|
1098 |
+
|
1099 |
+
#: inc-cl/fb.php:145 inc-cl/fb.php:311
|
1100 |
+
msgid "Facebook Post Types"
|
1101 |
+
msgstr "Tipos de Publicação no Facebook"
|
1102 |
+
|
1103 |
+
#: inc-cl/fb.php:153
|
1104 |
+
msgid "Authorize Your Facebook Account"
|
1105 |
+
msgstr "Autorizar a sua conta do Facebook"
|
1106 |
+
|
1107 |
+
#: inc-cl/fb.php:155
|
1108 |
+
msgid "Your Facebook Account has been authorized."
|
1109 |
+
msgstr "Sua conta do Facebook foi autorizada."
|
1110 |
+
|
1111 |
+
#: inc-cl/fb.php:159
|
1112 |
+
msgid "If you get Facebook message:"
|
1113 |
+
msgstr "Se você receber a mensagem do Facebook:"
|
1114 |
+
|
1115 |
+
#: inc-cl/fb.php:159
|
1116 |
+
msgid ""
|
1117 |
+
"please make sure that domain name in your Facebook App matches your website "
|
1118 |
+
"domain exactly. Please note that www. and non www. versions are different "
|
1119 |
+
"domains."
|
1120 |
+
msgstr ""
|
1121 |
+
"certifique-se de que o nome de domínio em seu Aplicativos Facebook "
|
1122 |
+
"corresponde exatamente ao domínio do seu site . Por favor, note que com o "
|
1123 |
+
"www. e sem o www. são considerados domínios diferentes."
|
1124 |
+
|
1125 |
+
#: inc-cl/fb.php:182
|
1126 |
+
msgid "Facebook Comments:"
|
1127 |
+
msgstr "Comentários do Facebook:"
|
1128 |
+
|
1129 |
+
#: inc-cl/fb.php:184
|
1130 |
+
msgid ""
|
1131 |
+
"Plugin could grab comments from Facebook and import them as Wordpress "
|
1132 |
+
"Comments"
|
1133 |
+
msgstr ""
|
1134 |
+
"O Plugin pode pegar os comentários do Facebook e importá-los como "
|
1135 |
+
"comentários do Wordpress"
|
1136 |
+
|
1137 |
+
#: inc-cl/fb.php:187
|
1138 |
+
msgid "Import Facebook Comments"
|
1139 |
+
msgstr "Importar os Comentários do Facebook"
|
1140 |
+
|
1141 |
+
#: inc-cl/fb.php:190 inc-cl/tw.php:97
|
1142 |
+
msgid "Auto-approve imported comments"
|
1143 |
+
msgstr "Aprovar automaticamente os Comentários importados"
|
1144 |
+
|
1145 |
+
#: inc-cl/fb.php:192 inc-cl/tw.php:98
|
1146 |
+
msgid "Please activate the \"Comments Import\" from SNAP Settings Tab"
|
1147 |
+
msgstr ""
|
1148 |
+
"Por favor, ative o \"Importar Comentários\" na Guia de Configurações do SNAP"
|
1149 |
+
|
1150 |
+
#: inc-cl/fb.php:266
|
1151 |
+
msgid "Repost to Facebook"
|
1152 |
+
msgstr "Republicar no Facebook"
|
1153 |
+
|
1154 |
+
#: inc-cl/fb.php:268
|
1155 |
+
msgid "Import Comments from Facebook"
|
1156 |
+
msgstr "Importar os Comentários do Facebook"
|
1157 |
+
|
1158 |
+
#: inc-cl/fb.php:298 inc-cl/gp.php:195 inc-cl/rd.php:204 inc-cl/vk.php:254
|
1159 |
+
msgid "Post Type:"
|
1160 |
+
msgstr "Tipo de Publicação:"
|
1161 |
+
|
1162 |
+
#: inc-cl/fb.php:303 inc-cl/gp.php:201 inc-cl/vk.php:259
|
1163 |
+
msgid "Text Post with \"attached\" blogpost"
|
1164 |
+
msgstr "Texto da Publicação com Post do Blog \"anexado\""
|
1165 |
+
|
1166 |
+
#: inc-cl/fb.php:305 inc-cl/vk.php:113
|
1167 |
+
msgid "Link attachment type:"
|
1168 |
+
msgstr "Tipo de Link do Anexo"
|
1169 |
+
|
1170 |
+
#: inc-cl/fb.php:367 inc-cl/tw.php:228
|
1171 |
+
msgid "%d comment has been imported."
|
1172 |
+
msgstr "%d Comentário(s) importado(s)"
|
1173 |
+
|
1174 |
+
#: inc-cl/ff.php:67
|
1175 |
+
msgid "Attach Image to FriendFeed Post"
|
1176 |
+
msgstr "Anexar imagem à Publicação do FriendFeed"
|
1177 |
+
|
1178 |
+
#: inc-cl/ff.php:135
|
1179 |
+
msgid "Repost to FriendFeed"
|
1180 |
+
msgstr "Republicar no FriendFeed"
|
1181 |
+
|
1182 |
+
#: inc-cl/gp.php:38
|
1183 |
+
msgid "Google+ API Library not found"
|
1184 |
+
msgstr "Biblioteca de API do Google+ não encontrada"
|
1185 |
+
|
1186 |
+
#: inc-cl/gp.php:39
|
1187 |
+
msgid "Google+ doesn't have a built-in API for automated posts yet."
|
1188 |
+
msgstr "Google ainda não tem uma API inserida para mensagens automatizadas."
|
1189 |
+
|
1190 |
+
#: inc-cl/gp.php:39
|
1191 |
+
msgid ""
|
1192 |
+
"The current <a target=\"_blank\" href=\"http://developers.google.com/+/api/"
|
1193 |
+
"\">Google+ API</a> is \"Read Only\" and can't be used for posting. <br/><br/"
|
1194 |
+
">You need to get a special <a target=\"_blank\" href=\"http://www."
|
1195 |
+
"nextscripts.com/google-plus-automated-posting\"><b>API Library Module</b></"
|
1196 |
+
"a> to be able to publish your content to Google+."
|
1197 |
+
msgstr ""
|
1198 |
+
"A atual <a target=\"_blank\" href=\"http://developers.google.com/+/api/"
|
1199 |
+
"\">API Google+ </a> está configurada como \"Somente leitura\" não pode ser "
|
1200 |
+
"usada para a publicação. <br/><br/>Você precisa ter uma <a target=\"_blank\" "
|
1201 |
+
"href=\"http://www.nextscripts.com/google-plus-automated-posting"
|
1202 |
+
"\"><b>Biblioteca ou módulo de API especial</b></a> para poder publicar o seu "
|
1203 |
+
"conteúdo no Google+"
|
1204 |
+
|
1205 |
+
#: inc-cl/gp.php:57
|
1206 |
+
msgid "Leave Empty to publish to your profile or community"
|
1207 |
+
msgstr "Deixar vazio para publicar no seu perfil ou comunidade"
|
1208 |
+
|
1209 |
+
#: inc-cl/gp.php:58
|
1210 |
+
msgid "Leave Empty to publish to your profile or community."
|
1211 |
+
msgstr "Deixar vazio para publicar no seu perfil ou comunidade."
|
1212 |
+
|
1213 |
+
#: inc-cl/gp.php:61 inc-cl/gp.php:62
|
1214 |
+
msgid "Leave Empty to publish to your profile or page"
|
1215 |
+
msgstr "Deixar vazio para publicar em seu perfil ou página"
|
1216 |
+
|
1217 |
+
#: inc-cl/gp.php:65
|
1218 |
+
msgid "Retrieve Categories and Page Names"
|
1219 |
+
msgstr "Recuperar Categorias e Nomes de Página"
|
1220 |
+
|
1221 |
+
#: inc-cl/gp.php:95
|
1222 |
+
msgid "Google+ Image Post"
|
1223 |
+
msgstr "Imagem da Publicação no Google+"
|
1224 |
+
|
1225 |
+
#: inc-cl/gp.php:96
|
1226 |
+
msgid "Add blogpost to Google+ message as an attachment"
|
1227 |
+
msgstr "Adicionar Post do Blog para publicar no Google+ como um anexo"
|
1228 |
+
|
1229 |
+
#: inc-cl/gp.php:97 inc-cl/gp.php:202
|
1230 |
+
msgid "Google+ Post Types"
|
1231 |
+
msgstr "Tipos de Publicação para o Google+"
|
1232 |
+
|
1233 |
+
#: inc-cl/gp.php:170
|
1234 |
+
msgid "Repost to Google+"
|
1235 |
+
msgstr "Republicar no Google+"
|
1236 |
+
|
1237 |
+
#: inc-cl/gp.php:185
|
1238 |
+
msgid "Autopost has been schedulled for"
|
1239 |
+
msgstr "Publicação Automática está programada para"
|
1240 |
+
|
1241 |
+
#: inc-cl/gp.php:200
|
1242 |
+
msgid "Post to Google+ as \"Image post\""
|
1243 |
+
msgstr "Publicar no Google+ como \"Imagem do Post\""
|
1244 |
+
|
1245 |
+
#: inc-cl/ip.php:133
|
1246 |
+
msgid "Repost to Instapaper"
|
1247 |
+
msgstr "Republicar no Instapaper"
|
1248 |
+
|
1249 |
+
#: inc-cl/li.php:187
|
1250 |
+
msgid "Message title Format (Groups Only)"
|
1251 |
+
msgstr "Formato de Título da Publicação (Apenas para grupos)"
|
1252 |
+
|
1253 |
+
#: inc-cl/li.php:273
|
1254 |
+
msgid "Repost to LinkedIn"
|
1255 |
+
msgstr "Republicar no LinkedIn"
|
1256 |
+
|
1257 |
+
#: inc-cl/li.php:302
|
1258 |
+
msgid "Title Format (Groups Only):"
|
1259 |
+
msgstr "Formato do Título (Apenas para grupos):"
|
1260 |
+
|
1261 |
+
#: inc-cl/lj.php:38
|
1262 |
+
msgid "You can setup LiveJournal blog."
|
1263 |
+
msgstr "Você pode configurar o blog no LiveJournal."
|
1264 |
+
|
1265 |
+
#: inc-cl/lj.php:68
|
1266 |
+
msgid "Post Title and Post Text Formats"
|
1267 |
+
msgstr "Título e Formatos de Texto da Publicação "
|
1268 |
+
|
1269 |
+
#: inc-cl/lj.php:82
|
1270 |
+
msgid "Post with tags."
|
1271 |
+
msgstr "Publicação com Tags"
|
1272 |
+
|
1273 |
+
#: inc-cl/lj.php:82
|
1274 |
+
msgid "Tags from the blogpost will be auto posted to LiveJournal"
|
1275 |
+
msgstr "Tags do blogpost serão Publicadas Automáticamente para o LiveJournal"
|
1276 |
+
|
1277 |
+
#: inc-cl/lj.php:150
|
1278 |
+
msgid "Repost to LiveJournal"
|
1279 |
+
msgstr "Republicar no LiveJournal"
|
1280 |
+
|
1281 |
+
#: inc-cl/pk.php:199
|
1282 |
+
msgid "Repost to Plurk"
|
1283 |
+
msgstr "Republicar no Plurk"
|
1284 |
+
|
1285 |
+
#: inc-cl/pn.php:87
|
1286 |
+
msgid "If post has a video use it instead of image"
|
1287 |
+
msgstr "Se a Publicação tem um vídeo, usá-lo em vez da imagem"
|
1288 |
+
|
1289 |
+
#: inc-cl/pn.php:87
|
1290 |
+
msgid ""
|
1291 |
+
"Video will be pinned instead of featured image. Only Youtube is supported at "
|
1292 |
+
"this time."
|
1293 |
+
msgstr ""
|
1294 |
+
"O vídeo será usado em vez da imagem em destaque anexa. Apenas Youtube é "
|
1295 |
+
"suportado neste momento."
|
1296 |
+
|
1297 |
+
#: inc-cl/pn.php:167
|
1298 |
+
msgid "Repost to Pinterest"
|
1299 |
+
msgstr "Republicar no Pinterest"
|
1300 |
+
|
1301 |
+
#: inc-cl/pn.php:197
|
1302 |
+
msgid "Text Message Format:"
|
1303 |
+
msgstr "Formato do Texto da Mensagem:"
|
1304 |
+
|
1305 |
+
#: inc-cl/rd.php:39
|
1306 |
+
msgid "Reddit API Library not found"
|
1307 |
+
msgstr "Biblioteca de API do Reddit não foi encontrada"
|
1308 |
+
|
1309 |
+
#: inc-cl/rd.php:40
|
1310 |
+
msgid "Reddit doesn't have a built-in API for automated posts yet."
|
1311 |
+
msgstr "Reddit ainda não tem uma API inserida para mensagens automatizadas."
|
1312 |
+
|
1313 |
+
#: inc-cl/rd.php:40
|
1314 |
+
msgid ""
|
1315 |
+
"<br/>You need to get a special <a target=\"_blank\" href=\"http://www."
|
1316 |
+
"nextscripts.com/reddit-automated-posting\"><b>API Library Module</b></a> to "
|
1317 |
+
"be able to publish your content to Reddit."
|
1318 |
+
msgstr ""
|
1319 |
+
"<br/>Você precisa ter um<a target=\"_blank\" href=\"http://www.nextscripts."
|
1320 |
+
"com/reddit-automated-posting\"><b> Módulo de Livraria API </b></a>especial "
|
1321 |
+
"para poder publicar o seu conteúdo para o Reddit."
|
1322 |
+
|
1323 |
+
#: inc-cl/rd.php:85 inc-cl/rd.php:205
|
1324 |
+
msgid "Link Post"
|
1325 |
+
msgstr "Link da Publicação"
|
1326 |
+
|
1327 |
+
#: inc-cl/rd.php:87
|
1328 |
+
msgid "set the text format below"
|
1329 |
+
msgstr "definir o formato de texto abaixo"
|
1330 |
+
|
1331 |
+
#: inc-cl/rd.php:178
|
1332 |
+
msgid "Repost to Reddit"
|
1333 |
+
msgstr "Republicar no Blogger"
|
1334 |
+
|
1335 |
+
#: inc-cl/su.php:153
|
1336 |
+
msgid "Repost to StumbleUpon"
|
1337 |
+
msgstr "Republicar no StumbleUpon"
|
1338 |
+
|
1339 |
+
#: inc-cl/tr.php:225
|
1340 |
+
msgid "Repost to Tumblr"
|
1341 |
+
msgstr "Republicar no Tumblr"
|
1342 |
+
|
1343 |
+
#: inc-cl/tr.php:248
|
1344 |
+
msgid "Text Post. Title Format:"
|
1345 |
+
msgstr "Texto da Publicação. Formato do Título:"
|
1346 |
+
|
1347 |
+
#: inc-cl/tw.php:60
|
1348 |
+
msgid "Attach Image to Twitter Post"
|
1349 |
+
msgstr "Anexar a imagem ao Post do Twitter"
|
1350 |
+
|
1351 |
+
#: inc-cl/tw.php:79
|
1352 |
+
msgid "Only selected categories will be autoposted to this account."
|
1353 |
+
msgstr ""
|
1354 |
+
"Apenas as Categorias selecionadas terão as Publicadas Automáticas para esta "
|
1355 |
+
"conta"
|
1356 |
+
|
1357 |
+
#: inc-cl/tw.php:89
|
1358 |
+
msgid "Auto Import of Replies and Mentions:"
|
1359 |
+
msgstr "Importação Automática de Respostas e Menções:"
|
1360 |
+
|
1361 |
+
#: inc-cl/tw.php:91
|
1362 |
+
msgid ""
|
1363 |
+
"Plugin could grab Replies and Mentions from Twitter and import them as "
|
1364 |
+
"Wordpress Comments"
|
1365 |
+
msgstr ""
|
1366 |
+
"O Plugin pode pegar as Respostas e Menções do Twitter e importá-las como "
|
1367 |
+
"Comentários do Wordpress"
|
1368 |
+
|
1369 |
+
#: inc-cl/tw.php:93
|
1370 |
+
msgid "Import Twitter Replies"
|
1371 |
+
msgstr "Importar Respostas do Twitter"
|
1372 |
+
|
1373 |
+
#: inc-cl/tw.php:95
|
1374 |
+
msgid "Import Twitter Mentions"
|
1375 |
+
msgstr "Importar Menções do Twitter"
|
1376 |
+
|
1377 |
+
#: inc-cl/tw.php:148
|
1378 |
+
msgid "autopost to"
|
1379 |
+
msgstr "Publicar Automaticamente em"
|
1380 |
+
|
1381 |
+
#: inc-cl/tw.php:151
|
1382 |
+
msgid "Repost to Twitter"
|
1383 |
+
msgstr "Republicar no Twitter"
|
1384 |
+
|
1385 |
+
#: inc-cl/tw.php:154
|
1386 |
+
msgid "Import Replies/Mentions from Twitter"
|
1387 |
+
msgstr "Importar Respostas/Menções do Twitter"
|
1388 |
+
|
1389 |
+
#: inc-cl/vb.php:149
|
1390 |
+
msgid "Repost to vBulletin"
|
1391 |
+
msgstr "Republicar no vBulletin"
|
1392 |
+
|
1393 |
+
#: inc-cl/vk.php:59
|
1394 |
+
msgid "Could be your vKontakte(VK) Profile or vKontakte(VK) Group Page"
|
1395 |
+
msgstr "Poderia ser seu Perfil vKontakte(VK) ou Página de Grupo vKontakte(VK) "
|
1396 |
+
|
1397 |
+
#: inc-cl/vk.php:62
|
1398 |
+
msgid "(It could be used for \"Text\" and \"Image\" posts)"
|
1399 |
+
msgstr "(Poderia ser usado para \"Texto\" e \"Imagem\" publicadas)"
|
1400 |
+
|
1401 |
+
#: inc-cl/vk.php:66
|
1402 |
+
msgid "[Create VK App]"
|
1403 |
+
msgstr "[Criar Aplicativos VK]"
|
1404 |
+
|
1405 |
+
#: inc-cl/vk.php:66
|
1406 |
+
msgid "[Manage VK Apps]"
|
1407 |
+
msgstr "[Gerenciar Aplicativos VK]"
|
1408 |
+
|
1409 |
+
#: inc-cl/vk.php:70
|
1410 |
+
msgid ""
|
1411 |
+
"<b>Authorize Your vKontakte(VK) Account</b>. Please click \"Update Settings"
|
1412 |
+
"\" to be able to Authorize your account."
|
1413 |
+
msgstr ""
|
1414 |
+
"<b>Autorizar a Conta vKontakte(VK)</ b>. Por favor, clique em \"Atualizar "
|
1415 |
+
"Configurações\" para poder autorizar sua conta."
|
1416 |
+
|
1417 |
+
#: inc-cl/vk.php:72
|
1418 |
+
msgid "Your vKontakte(VK) Account has been authorized."
|
1419 |
+
msgstr "Sua Conta vKontakte(VK) foi autorizada."
|
1420 |
+
|
1421 |
+
#: inc-cl/vk.php:83
|
1422 |
+
msgid "(It could be used for \"Text with attached link\" posts)"
|
1423 |
+
msgstr "(Poderia ser usado como \"Texto com Link Anexado\" para publicação)"
|
1424 |
+
|
1425 |
+
#: inc-cl/vk.php:92
|
1426 |
+
msgid "Please upgrade the plugin to \"PRO\" get NextScripts VK API"
|
1427 |
+
msgstr ""
|
1428 |
+
"Por favor, atualize o Plugin para a versão \"Pro\" do API NextScripts VK"
|
1429 |
+
|
1430 |
+
#: inc-cl/vk.php:103 inc-cl/vk.php:251
|
1431 |
+
msgid "Add backlink to the post"
|
1432 |
+
msgstr "Adicionar Link de Retorno (backlink) para a Publicação"
|
1433 |
+
|
1434 |
+
#: inc-cl/vk.php:115
|
1435 |
+
msgid ""
|
1436 |
+
"<strong>If post has video use it as an attachment thumbnail.</strong> "
|
1437 |
+
"<i>Video will be used for an attachment thumbnail instead of featured image. "
|
1438 |
+
"Only Youtube is supported at this time.</i>"
|
1439 |
+
msgstr ""
|
1440 |
+
"<strong>Se a Publicação tem um vídeo de anexo.</strong> <i>Ele será usado "
|
1441 |
+
"como miniatura em vez da imagem anexa em destaque. Apenas Youtube é "
|
1442 |
+
"suportado</i>"
|
1443 |
+
|
1444 |
+
#: inc-cl/vk.php:118
|
1445 |
+
msgid "Attachment Text Format:"
|
1446 |
+
msgstr "Formato de Texto do Anexo?"
|
1447 |
+
|
1448 |
+
#: inc-cl/vk.php:121
|
1449 |
+
msgid "Set your own format:"
|
1450 |
+
msgstr "Defina o seu próprio formato:"
|
1451 |
+
|
1452 |
+
#: inc-cl/vk.php:228
|
1453 |
+
msgid "Repost to vKontakte(VK)"
|
1454 |
+
msgstr "Republicar no vKontakte(VK)"
|
1455 |
+
|
1456 |
+
#: inc-cl/vk.php:260
|
1457 |
+
msgid "Post Types"
|
1458 |
+
msgstr "Tipos de Publicação"
|
1459 |
+
|
1460 |
+
#: inc-cl/wp.php:144
|
1461 |
+
msgid "Repost to WP Blog"
|
1462 |
+
msgstr "Republicar em Blog WP"
|
1463 |
+
|
1464 |
+
#: inc-cl/yt.php:38
|
1465 |
+
msgid "YouTube API Library not found"
|
1466 |
+
msgstr "Biblioteca de API do YouTube não encontrada"
|
1467 |
+
|
1468 |
+
#: inc-cl/yt.php:39
|
1469 |
+
msgid "YouTube doesn't have a built-in API for automated posts yet."
|
1470 |
+
msgstr ""
|
1471 |
+
"O YouTube ainda não tem uma API inserida para Publicações Automatizadas."
|
1472 |
+
|
1473 |
+
#: inc-cl/yt.php:39
|
1474 |
+
msgid ""
|
1475 |
+
"The current <a target=\"_blank\" href=\"http://developers.google.com/+/api/"
|
1476 |
+
"\">YouTube API</a> is \"Read Only\" and can't be used for posting. <br/><br/"
|
1477 |
+
">You need to get a special <a target=\"_blank\" href=\"http://www."
|
1478 |
+
"nextscripts.com/google-plus-automated-posting\"><b>API Library Module</b></"
|
1479 |
+
"a> to be able to publish your content to YouTube."
|
1480 |
+
msgstr ""
|
1481 |
+
"A atual <a target=\"_blank\" href=\"http://developers.google.com/+/api/"
|
1482 |
+
"\">API Google+ </a> está configurada como \"Somente leitura\" não pode ser "
|
1483 |
+
"usada para a publicação. <br/><br/>Você precisa ter uma <a target=\"_blank\" "
|
1484 |
+
"href=\"http://www.nextscripts.com/google-plus-automated-posting"
|
1485 |
+
"\"><b>Biblioteca ou módulo de API especial</b></a> para poder publicar o seu "
|
1486 |
+
"conteúdo no Google+"
|
1487 |
+
|
1488 |
+
#: inc-cl/yt.php:71
|
1489 |
+
msgid "New post: %TITLE% - %URL%"
|
1490 |
+
msgstr "Nova Publicação: %TITLE% - %URL%"
|
1491 |
+
|
1492 |
+
#: inc-cl/yt.php:138
|
1493 |
+
msgid "Repost to YouTube"
|
1494 |
+
msgstr "Republicar no YouTube"
|
1495 |
+
|
1496 |
+
#: nxs_functions.php:284
|
1497 |
+
msgid "Wrong key, please contact support"
|
1498 |
+
msgstr "Chave errada, por favor, contacte o suporte"
|
1499 |
+
|
1500 |
+
#: nxs_functions.php:390
|
1501 |
+
msgid "Inserts the Title of the post"
|
1502 |
+
msgstr "Inserir o Título da sua Publicação"
|
1503 |
+
|
1504 |
+
#: nxs_functions.php:390
|
1505 |
+
msgid "Inserts the URL of the post"
|
1506 |
+
msgstr "Inserir o URL da sua Publicação"
|
1507 |
+
|
1508 |
+
#: nxs_functions.php:390
|
1509 |
+
msgid "Inserts the <b>shortened URL</b> of your post"
|
1510 |
+
msgstr "Inserir o <b>URL Curto</b> da sua Publicação"
|
1511 |
+
|
1512 |
+
#: nxs_functions.php:390
|
1513 |
+
msgid "Inserts the featured image URL"
|
1514 |
+
msgstr "Inserir o URL da imagem de destaque"
|
1515 |
+
|
1516 |
+
#: nxs_functions.php:390
|
1517 |
+
msgid "Inserts the excerpt of the post (processed)"
|
1518 |
+
msgstr "Inserir o Resumo da sua Publicação (processada)"
|
1519 |
+
|
1520 |
+
#: nxs_functions.php:390
|
1521 |
+
msgid "Inserts the excerpt of the post (as typed)"
|
1522 |
+
msgstr "Inserir o Resumo da Publicação (como digitado)"
|
1523 |
+
|
1524 |
+
#: nxs_functions.php:390
|
1525 |
+
msgid ""
|
1526 |
+
"Inserts the text till the <!--more--> tag or first N words of the post"
|
1527 |
+
msgstr ""
|
1528 |
+
"Inserir o Texto até a marcação <!--more--> ou as primeiras \"X\" "
|
1529 |
+
"palavras da Publicação"
|
1530 |
+
|
1531 |
+
#: nxs_functions.php:390
|
1532 |
+
msgid "Inserts the processed body(text) of the post"
|
1533 |
+
msgstr "Inserir o Conteúdo (texto) processado da Publicação"
|
1534 |
+
|
1535 |
+
#: nxs_functions.php:390
|
1536 |
+
msgid "Inserts the body(text) of the post as typed"
|
1537 |
+
msgstr "Inserir o Corpo (texto) processado da Publicação"
|
1538 |
+
|
1539 |
+
#: nxs_functions.php:390
|
1540 |
+
msgid "Inserts post tags"
|
1541 |
+
msgstr "Inserir as Tags da Publicação"
|
1542 |
+
|
1543 |
+
#: nxs_functions.php:390
|
1544 |
+
msgid "Inserts post categories"
|
1545 |
+
msgstr "Inserir a Categoria da Publicação"
|
1546 |
+
|
1547 |
+
#: nxs_functions.php:390
|
1548 |
+
msgid "Inserts post tags as hashtags"
|
1549 |
+
msgstr "Inserir as Tags e \"hashtags\" da Publicação"
|
1550 |
+
|
1551 |
+
#: nxs_functions.php:390
|
1552 |
+
msgid "Inserts post categories as hashtags"
|
1553 |
+
msgstr "Inserir as \"hashtags\" das Categorias da Publicação"
|
1554 |
+
|
1555 |
+
#: nxs_functions.php:390
|
1556 |
+
msgid "Inserts the author's name"
|
1557 |
+
msgstr "Inserir o Nome do Autor"
|
1558 |
+
|
1559 |
+
#: nxs_functions.php:390
|
1560 |
+
msgid "Inserts the the Blog/Site name"
|
1561 |
+
msgstr "Inserir o Nome do Blog/Site"
|
1562 |
+
|
1563 |
+
#: nxs_functions.php:394
|
1564 |
+
msgid ""
|
1565 |
+
"You already have %s configured. This plugin supports only one %s account. "
|
1566 |
+
"<br/><br/> Please consider getting <a target=\"_blank\" href=\"http://www."
|
1567 |
+
"nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts"
|
1568 |
+
"\">Multiple Accounts Edition</a> if you would like to add another %s account "
|
1569 |
+
"for auto-posting."
|
1570 |
+
msgstr ""
|
1571 |
+
"Você já tem %s configurado. Este plugin suporta apenas uma %s Conta. <br/"
|
1572 |
+
"><br/> Por favor considerar a obtenção de <a target=\"_blank\" href=\"http://"
|
1573 |
+
"www.nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts"
|
1574 |
+
"\">Edição para Múltiplas Contas</a> Se você quiser adicionar %s contas de "
|
1575 |
+
"auto-publicações."
|
1576 |
+
|
1577 |
+
#: nxs_functions.php:674
|
1578 |
+
msgid "Image(s) to use:"
|
1579 |
+
msgstr "Imagem(ns) a serem utilizadas:"
|
1580 |
+
|
1581 |
+
#: nxs_functions.php:676
|
1582 |
+
msgid "Show all"
|
1583 |
+
msgstr "Mostrar tudo"
|
1584 |
+
|
1585 |
+
#: nxs_functions.php:684
|
1586 |
+
msgid "URL to use:"
|
1587 |
+
msgstr "URL a ser utilizado:"
|
1588 |
+
|
1589 |
+
#: nxs_functions.php:685
|
1590 |
+
msgid "Post URL or globally defined URL will be used"
|
1591 |
+
msgstr "URL da Publicação ou o URL definido globalmente a ser utilizada"
|
1592 |
+
|
1593 |
+
#: nxs_functions.php:689
|
1594 |
+
msgid ""
|
1595 |
+
"This will trigger \"Network will decide attachment info\". Image and other "
|
1596 |
+
"settings will be ignored."
|
1597 |
+
msgstr ""
|
1598 |
+
"Isso fará com que a \"Rede Social defina as informações anexadas\". Imagens "
|
1599 |
+
"e outras configurações serão ignoradas."
|
1600 |
+
|
1601 |
+
#: nxs_functions.php:744
|
1602 |
+
msgid "Auto Reposting"
|
1603 |
+
msgstr "Rapublicar Automaticamente:"
|
1604 |
+
|
1605 |
+
#: nxs_functions.php:744
|
1606 |
+
msgid "[Instructions]"
|
1607 |
+
msgstr "[Instruções]"
|
1608 |
+
|
1609 |
+
#: nxs_functions.php:747
|
1610 |
+
msgid "Plugin could autorepost existing posts"
|
1611 |
+
msgstr "O Plugin pode Republicar Automaticamente as Publicações existentes"
|
1612 |
+
|
1613 |
+
#: nxs_functions.php:749
|
1614 |
+
msgid "Repost existing posts every"
|
1615 |
+
msgstr "Republicar as Publicações existentes"
|
1616 |
+
|
1617 |
+
#: nxs_functions.php:751 nxs_functions.php:786 nxs_functions.php:787
|
1618 |
+
msgid "Days"
|
1619 |
+
msgstr "Dias"
|
1620 |
+
|
1621 |
+
#: nxs_functions.php:752
|
1622 |
+
msgid "Hours"
|
1623 |
+
msgstr "Horas"
|
1624 |
+
|
1625 |
+
#: nxs_functions.php:760
|
1626 |
+
msgid "Repost ONLY previously unautoposted posts"
|
1627 |
+
msgstr "Repubplicar SÓ as Publicações anteriormente não publicadas"
|
1628 |
+
|
1629 |
+
#: nxs_functions.php:764
|
1630 |
+
msgid "Repost: (Choose Posts, Pages, Custom Post Types)"
|
1631 |
+
msgstr ""
|
1632 |
+
"Republicar (Escolha Publicações \"Posts\", Páginas, Tipos de Publicações "
|
1633 |
+
"Personalizadas)"
|
1634 |
+
|
1635 |
+
#: nxs_functions.php:774
|
1636 |
+
msgid "Get posts"
|
1637 |
+
msgstr "Receber Publicações"
|
1638 |
+
|
1639 |
+
#: nxs_functions.php:782
|
1640 |
+
msgid "from"
|
1641 |
+
msgstr "de"
|
1642 |
+
|
1643 |
+
#: nxs_functions.php:783
|
1644 |
+
msgid "to"
|
1645 |
+
msgstr "para"
|
1646 |
+
|
1647 |
+
#: nxs_functions.php:786
|
1648 |
+
msgid "Older then"
|
1649 |
+
msgstr "Mais antigos"
|
1650 |
+
|
1651 |
+
#: nxs_functions.php:787
|
1652 |
+
msgid "and Newer then"
|
1653 |
+
msgstr "e mais recente"
|
1654 |
+
|
1655 |
+
#: nxs_functions.php:794
|
1656 |
+
msgid "[Set All Existing Posts to \"Enabled for Repost\"]"
|
1657 |
+
msgstr ""
|
1658 |
+
"[Definir todas as Publicações Existentes como \"Habilitadas\" para "
|
1659 |
+
"Republicar]"
|
1660 |
+
|
1661 |
+
#: nxs_functions.php:795
|
1662 |
+
msgid "[Set All Existing Posts to \"Disabled for Repost\"]"
|
1663 |
+
msgstr ""
|
1664 |
+
"[Definir todas as Publicações Existentes como \"Desabilitadas\" para "
|
1665 |
+
"Republicar]"
|
1666 |
+
|
1667 |
+
#: nxs_functions.php:798
|
1668 |
+
msgid "Last post"
|
1669 |
+
msgstr "Última Publicação"
|
1670 |
+
|
1671 |
+
#: nxs_functions.php:798
|
1672 |
+
msgid "was re-posted on:"
|
1673 |
+
msgstr "Republicado em:"
|
1674 |
+
|
1675 |
+
#: nxs_functions.php:799
|
1676 |
+
msgid "Next post will be ~"
|
1677 |
+
msgstr "Próxima Publicação será ~"
|
1678 |
+
|
1679 |
+
#: nxs_functions.php:800
|
1680 |
+
msgid "[Reset]"
|
1681 |
+
msgstr "[Redefinir]"
|
1682 |
+
|
1683 |
+
#: nxs_functions.php:802
|
1684 |
+
msgid "Set \"Last re-posted post ID\" to:"
|
1685 |
+
msgstr "Dfinir \"ID da Última Republicação\" para:"
|
1686 |
+
|
1687 |
+
#: nxs_functions.php:803
|
1688 |
+
msgid "[Set]"
|
1689 |
+
msgstr "[Definir]"
|
1690 |
+
|
1691 |
+
#~ msgid "Submit Test Post to Complete"
|
1692 |
+
#~ msgstr "Enviar Publicação de teste para completar"
|
1693 |
+
|
1694 |
+
#~ msgid "OK - Message Posted, please see your Facebook Page"
|
1695 |
+
#~ msgstr "OK - mensagem publicada, por favor, consulte sua Página no Facebook"
|
1696 |
+
|
1697 |
+
#~ msgid "OK - Message Posted, please see your Google+ Page"
|
1698 |
+
#~ msgstr "OK - mensagem publicada, por favor, consulte sua Página no Google+"
|
1699 |
+
|
1700 |
+
#~ msgid "mage Post"
|
1701 |
+
#~ msgstr "Publicação Curinga"
|
1702 |
+
|
1703 |
+
#~ msgid "NextScripts: Social Networks Auto-Poster"
|
1704 |
+
#~ msgstr "NextScripts: Social Networks Auto-Poster"
|
1705 |
+
|
1706 |
+
#~ msgid "http://www.nextscripts.com/social-networks-auto-poster-for-wordpress"
|
1707 |
+
#~ msgstr ""
|
1708 |
+
#~ "http://www.nextscripts.com/social-networks-auto-poster-for-wordpress"
|
1709 |
+
|
1710 |
+
#~ msgid ""
|
1711 |
+
#~ "This plugin automatically publishes posts from your blog to multiple "
|
1712 |
+
#~ "accounts on Facebook, Twitter, and Google+ profiles and/or pages."
|
1713 |
+
#~ msgstr ""
|
1714 |
+
#~ "Este plugin publica automaticamente Posts, Perfis e/ou Páginas do seu "
|
1715 |
+
#~ "Blog/Site para várias contas no Facebook, Twitter, Google+."
|
1716 |
+
|
1717 |
+
#~ msgid "Next Scripts"
|
1718 |
+
#~ msgstr "Próximos Scripts"
|
1719 |
+
|
1720 |
+
#~ msgid "http://www.nextscripts.com"
|
1721 |
+
#~ msgstr "http://www.nextscripts.com"
|
nxs_functions.php
CHANGED
@@ -86,9 +86,9 @@ if (!function_exists("nxs_getNXSHeaders")) { function nxs_getNXSHeaders($ref=''
|
|
86 |
}}
|
87 |
if (!function_exists('nxs_chckRmImage')){function nxs_chckRmImage($url, $chType='head'){ if( ini_get('allow_url_fopen')=='1' && @getimagesize($url)!==false) return true;
|
88 |
$hdrsArr = nxs_getNXSHeaders(); $nxsWPRemWhat = 'wp_remote_'.$chType; $rsp = $nxsWPRemWhat($url, array('headers' => $hdrsArr));
|
89 |
-
if(is_wp_error($rsp)) { nxs_addToLogN('E', 'Error', 'IMAGE', '-=ERROR=- Server can\'t access it\'s own images. Most probably it\'s a DNS problem. Please contact your hosting provider. '.
|
90 |
if (is_array($rsp) && ($rsp['response']['code']=='200' || ( $rsp['response']['code']=='403' && $rsp['headers']['server']=='cloudflare-nginx') )) return true;
|
91 |
-
else { if ($chType=='head') { return nxs_chckRmImage($url, 'get'); } else { nxs_addToLogN('E', 'Error', 'IMAGE', '-=ERROR=- Server can\'t access it\'s own images. Most probably it\'s a DNS problem. Please contact your hosting provider. '.
|
92 |
}
|
93 |
}}
|
94 |
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;
|
@@ -101,7 +101,9 @@ if (!function_exists('nxs_getPostImage')){ function nxs_getPostImage($postID, $s
|
|
101 |
}
|
102 |
if ($imgURL!='' && $options['imgNoCheck']!='1' && nxs_chckRmImage($imgURL)==false) $imgURL = ''; if ($imgURL!='') return $imgURL;
|
103 |
//## Featured Image
|
104 |
-
if ($imgURL=='') { if ((int)$postID>0 && function_exists("get_post_thumbnail_id") ){ $imgURL = wp_get_attachment_image_src(get_post_thumbnail_id($postID), $size); $imgURL = $imgURL[0];
|
|
|
|
|
105 |
if ($imgURL!='' && $options['imgNoCheck']!='1' && nxs_chckRmImage($imgURL)==false) $imgURL = ''; if ($imgURL!='') return $imgURL;
|
106 |
//## plugin/categories-images
|
107 |
if ((int)$postID>0 && function_exists('z_taxonomy_image_url')) { $post_categories = wp_get_post_categories( $postID );
|
@@ -152,37 +154,27 @@ function nxs_tiny_mce_before_init( $init ) {
|
|
152 |
if (!function_exists("jsPostToSNAP")) { function jsPostToSNAP() { global $nxs_snapAvNts, $nxs_plurl; ?>
|
153 |
<script type="text/javascript" >
|
154 |
function nxs_updateGetImgsX(e){ }
|
155 |
-
jQuery(document).on('change', '#content', function( e ) {
|
156 |
-
|
157 |
-
});
|
158 |
function nxs_updateGetImgsXX(e){
|
159 |
var targetId = e.target.id;
|
160 |
var text = 'Kortinko';
|
161 |
-
|
162 |
switch ( targetId ) {
|
163 |
-
|
164 |
case 'content':
|
165 |
text = jQuery('#content').val();
|
166 |
break;
|
167 |
-
|
168 |
case 'tinymce':
|
169 |
-
if ( tinymce.activeEditor )
|
170 |
-
text = tinymce.activeEditor.getContent();
|
171 |
break;
|
172 |
}
|
173 |
-
|
174 |
jQuery('.nxs_imgPrevList').html( text );
|
175 |
-
}
|
176 |
-
|
177 |
-
function nxs_clPrvImgShow(tIdN){ jQuery("#isAutoImg-"+tIdN).trigger('click'); jQuery("#isAutoImg-"+tIdN).trigger('click'); }
|
178 |
-
|
179 |
function nxs_clPrvImg(id, ii){ jQuery("#imgToUse-"+ii).val(jQuery("#"+id+" img").attr('src')); jQuery(".nxs_prevIDiv"+ii+" .nxs_checkIcon").hide();
|
180 |
jQuery(".nxs_prevIDiv"+ii).removeClass("nxs_chImg_selDiv"); jQuery(".nxs_prevIDiv"+ii+" img").removeClass("nxs_chImg_selImg");
|
181 |
jQuery("#"+id+" img").addClass("nxs_chImg_selImg"); jQuery("#"+id).addClass("nxs_chImg_selDiv"); jQuery("#"+id+" .nxs_checkIcon").show();
|
182 |
-
}
|
183 |
-
|
184 |
-
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; }
|
185 |
-
|
186 |
function nxs_updateGetImgs(e){
|
187 |
var textOut='';
|
188 |
var tId = e.target.id;
|
@@ -251,27 +243,23 @@ if (!function_exists("nxs_jsPostToSNAP2")){ function nxs_jsPostToSNAP2() { glob
|
|
251 |
|
252 |
<script type="text/javascript">
|
253 |
|
254 |
-
|
255 |
-
jQuery("form input:checkbox
|
256 |
-
var thVal = jQuery(this).val();
|
257 |
-
|
258 |
-
|
259 |
-
//alert( uqID + "|" + catsA + "|" + thVal);
|
260 |
-
});
|
261 |
-
var arr = [<?php $xarr = maybe_unserialize($options['exclCats']); if (is_array($xarr)) echo "'".implode("','", $xarr)."'"; ?>];
|
262 |
if ( jQuery.inArray(thVal, arr)>-1) jQuery('.nxsGrpDoChb').removeAttr('checked'); else jQuery(".nxsGrpDoChb[title='def']").attr('checked','checked');
|
263 |
-
|
264 |
-
});
|
265 |
-
|
266 |
-
jQuery(function(){
|
267 |
-
jQuery("form .popular-category input:checkbox").click ( function(){ var nxs_isLocked = jQuery('#nxsLockIt').val(); if (nxs_isLocked=='1') return;
|
268 |
-
var thVal = jQuery(this).val();
|
269 |
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");
|
270 |
if (jQuery.inArray(thVal, catsA)>-1) jQuery('#'+uqID).attr('checked','checked')
|
271 |
-
|
272 |
-
});
|
273 |
-
|
274 |
-
|
|
|
|
|
|
|
|
|
275 |
});
|
276 |
});
|
277 |
|
@@ -290,7 +278,7 @@ if (!function_exists("nxs_jsPostToSNAP2")){ function nxs_jsPostToSNAP2() { glob
|
|
290 |
}<?php } ?>
|
291 |
}
|
292 |
|
293 |
-
|
294 |
jQuery('#nxsAPIUpd').dblclick(function() { doLic(); });
|
295 |
//When page loads...
|
296 |
jQuery(".nsx_tab_content").hide(); //Hide all content
|
@@ -306,6 +294,52 @@ if (!function_exists("nxs_jsPostToSNAP2")){ function nxs_jsPostToSNAP2() { glob
|
|
306 |
jQuery(activeTab).show(); //Fade in the active ID content
|
307 |
return false;
|
308 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
});
|
310 |
</script>
|
311 |
|
@@ -333,12 +367,14 @@ div.popShAtt { display: none; position: absolute; width: 600px; padding: 10px; b
|
|
333 |
.underdash {border-bottom: 1px #21759B dashed; text-decoration:none;}
|
334 |
.underdash a:hover {border-bottom: 1px #21759B dashed}
|
335 |
|
336 |
-
|
|
|
|
|
337 |
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;}
|
338 |
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;}
|
339 |
ul.nsx_tabs li a:hover { background: #ccc;}
|
340 |
html ul.nsx_tabs li.active, html ul.nsx_tabs li.active a:hover { background: #fff; border-bottom: 1px solid #fff; }
|
341 |
-
.nsx_tab_container {border: 1px solid #999; border-top: none; overflow: hidden; clear: both; float: left; width:
|
342 |
.nsx_tab_content {padding: 10px;}
|
343 |
|
344 |
.nxs_tls_cpt{width:100%; padding-bottom: 5px; padding-top: 10px;font-size: 16px; font-weight: bold;}
|
@@ -352,6 +388,7 @@ html ul.nsx_tabs li.active, html ul.nsx_tabs li.active a:hover { background: #f
|
|
352 |
.subDiv{margin-left: 15px;}
|
353 |
.nxs_hili {color:#008000;}
|
354 |
.clNewNTSets{width: 800px;}
|
|
|
355 |
|
356 |
.nxs_icon16 { font-size: 14px; line-height: 18px;
|
357 |
background-position: 3px 50% !important;
|
@@ -477,8 +514,9 @@ if (!function_exists('nxs_addPostingDelaySel')){function nxs_addPostingDelaySel(
|
|
477 |
if (function_exists('nxs_doSMAS4')) return nxs_doSMAS4($nt, $ii, $hrs, $min, $days); else return '<br/>';
|
478 |
}}
|
479 |
if (!function_exists('nxs_addPostingDelaySelV3')){function nxs_addPostingDelaySelV3($nt, $ii, $hrs=0, $min=0, $days=0){
|
480 |
-
if (function_exists('nxs_doSMAS4')) { ?> <div class="nxs_tls_cpt"><?php _e('Posting Delay', 'nxs_snap'); ?></div>
|
481 |
-
<div class="nxs_tls_bd"><?php
|
|
|
482 |
<?php } else echo '<br/>';
|
483 |
}}
|
484 |
|
@@ -496,7 +534,7 @@ if (!function_exists('nxs_addQTranslSel')){function nxs_addQTranslSel($nt, $ii,
|
|
496 |
|
497 |
if (!function_exists("nxs_hideTip_ajax")) { function nxs_hideTip_ajax() { check_ajax_referer('nxsSsPageWPN');
|
498 |
global $plgn_NS_SNAutoPoster, $nxs_plurl; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;
|
499 |
-
$options['hideTopTip'] = '1'; update_option($plgn_NS_SNAutoPoster->dbOptionsName, $options);
|
500 |
}}
|
501 |
|
502 |
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;
|
@@ -703,7 +741,7 @@ function nxs_cURLTest($url, $msg, $testText){ echo "<br/>--== Test Requested ...
|
|
703 |
}
|
704 |
|
705 |
//## Reposter
|
706 |
-
function nxs_adjRpst($optionsii, $pval){
|
707 |
|
708 |
$rpstEvrySecEx = $optionsii['rpstDays']*86400+$optionsii['rpstHrs']*3600+$optionsii['rpstMins']*60;
|
709 |
|
@@ -715,7 +753,7 @@ function nxs_adjRpst($optionsii, $pval){
|
|
715 |
if (isset($pval['rpstPostIncl'])) $optionsii['rpstPostIncl'] = trim($pval['rpstPostIncl']);
|
716 |
|
717 |
$rpstEvrySecNew = $optionsii['rpstDays']*86400+$optionsii['rpstHrs']*3600+$optionsii['rpstMins']*60;
|
718 |
-
$rpstRNDSecs = $optionsii['rpstRndMins']*60; if ($rpstRNDSecs>$rpstEvrySecNew) $optionsii['rpstRndMins'] = 0;
|
719 |
|
720 |
if ($rpstEvrySecNew!=$rpstEvrySecEx) { $currTime = time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); $optionsii['rpstNxTime'] = $currTime + $rpstEvrySecNew; }
|
721 |
if (isset($pval['rpstType'])) $optionsii['rpstType'] = trim($pval['rpstType']);
|
@@ -726,14 +764,41 @@ function nxs_adjRpst($optionsii, $pval){
|
|
726 |
if (isset($pval['rpstNWDays'])) $optionsii['rpstNWDays'] = trim($pval['rpstNWDays']);
|
727 |
if (isset($pval['rpstOnlyPUP'])) $optionsii['rpstOnlyPUP'] = trim($pval['rpstOnlyPUP']); else $optionsii['rpstOnlyPUP'] = 0;
|
728 |
|
729 |
-
if (isset($pval['nxsCPTSeld'])) $optionsii['nxsCPTSeld'] = serialize($pval['nxsCPTSeld']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
730 |
|
731 |
if (isset($pval['rpstBtwHrsType'])) $optionsii['rpstBtwHrsType'] = trim($pval['rpstBtwHrsType']);
|
732 |
-
if (isset($pval['rpstBtwHrsT'])) $optionsii['rpstBtwHrsT'] = trim($pval['rpstBtwHrsT']); if ((int)$optionsii['rpstBtwHrsT']>23) $optionsii['rpstBtwHrsT'] = 23;
|
733 |
-
if (isset($pval['rpstBtwHrsF'])) $optionsii['rpstBtwHrsF'] = trim($pval['rpstBtwHrsF']); if ((int)$optionsii['rpstBtwHrsF']>23) $optionsii['rpstBtwHrsF'] = 23;
|
734 |
if (isset($pval['rpstBtwDays'])) $optionsii['rpstBtwDays'] = $pval['rpstBtwDays']; else $optionsii['rpstBtwDays'] = array();
|
735 |
return $optionsii;
|
736 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
737 |
function nxs_showRepostSettings($nt, $ii, $options){ global $nxs_snapAvNts, $nxs_plurl;
|
738 |
if (empty($options['rpstPostIncl'])) $options['rpstPostIncl'] = 0; if (empty($options['rpstPostIncl'])) $options['rpstLastShTime'] = ''; if (empty($options['rpstNxTime'])) $options['rpstNxTime'] = '';
|
739 |
if (empty($options['rpstLastPostID'])) $options['rpstLastPostID'] = '';
|
@@ -790,8 +855,10 @@ function nxs_showRepostSettings($nt, $ii, $options){ global $nxs_snapAvNts, $nxs
|
|
790 |
<select name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"><option <?php echo $options['rpstPostIncl'] == "1"?'selected="selected"':''; ?> value="1">Enabled for Repost</option>
|
791 |
<option <?php echo $options['rpstPostIncl'] != "1"?'selected="selected"':''; ?> value="0">Disabled for Repost</option></select><br/>
|
792 |
<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' />
|
793 |
-
|
794 |
-
<span class="nxsInstrSpan"><a href="#" onclick="nxs_setRpstAll('<?php echo $nt; ?>','
|
|
|
|
|
795 |
|
796 |
</div><hr/>
|
797 |
<b><?php _e('Last post', 'nxs_snap'); ?></b> (ID: <?php echo !empty($options['rpstLastPostID'])?$options['rpstLastPostID']:''; ?>) <b><?php _e('was re-posted on:', 'nxs_snap'); ?></b> <?php echo $options['rpstLastShTime']>0?date_i18n('Y-m-d H:i', $options['rpstLastShTime']):'Never'; ?>
|
@@ -843,7 +910,7 @@ function nxs_rePoster(){ global $nxs_snapAvNts,$plgn_NS_SNAutoPoster, $nxs_rpst_
|
|
843 |
$rpstEvrySec = $ntOpts['rpstDays']*86400+$ntOpts['rpstHrs']*3600+$ntOpts['rpstMins']*60; $rndSec = $ntOpts['rpstRndMins']*60;
|
844 |
$nxTime = (isset($ntOpts['rpstNxTime']) && (int)$ntOpts['rpstNxTime']>0)?$ntOpts['rpstNxTime']:$currTime+$rpstEvrySec;
|
845 |
|
846 |
-
$times = "
|
847 |
|
848 |
if ($nxTime < $currTime) { $hasChanged = true; // Do Post
|
849 |
$nxs_rpst_type = $ntOpts['rpstType'];
|
@@ -855,7 +922,7 @@ function nxs_rePoster(){ global $nxs_snapAvNts,$plgn_NS_SNAutoPoster, $nxs_rpst_
|
|
855 |
|
856 |
//nxs_addToLogN('S', 'pTypes', $logNT, print_r($tpArray, true), $extInfo); // $tpArray = array('post', 'location');
|
857 |
|
858 |
-
if ($ntOpts['rpstType']=='1') $args = array ( 'orderby' => 'rand', 'posts_per_page' => '1', 'post_type' => $tpArray, 'post_status' => 'publish', 'suppress_filters' => false );
|
859 |
// if ($ntOpts['rpstType']=='2') $args = array ( 'posts_per_page' => '1', 'orderby' => 'post_date ASC, p.ID ASC', 'post_type' => 'post', 'post_status' => 'publish', 'suppress_filters' => false );
|
860 |
// if ($ntOpts['rpstType']=='3') $args = array ( 'posts_per_page' => '1', 'orderby' => 'post_date DESC, p.ID DESC', 'post_type' => 'post', 'post_status' => 'publish', 'suppress_filters' => false );
|
861 |
if ($ntOpts['rpstType']=='2') $args = array ( 'posts_per_page' => '1', 'orderby' => 'date ID', 'order'=>'ASC', 'post_type' => $tpArray, 'post_status' => 'publish', 'suppress_filters' => false );
|
@@ -867,6 +934,7 @@ function nxs_rePoster(){ global $nxs_snapAvNts,$plgn_NS_SNAutoPoster, $nxs_rpst_
|
|
867 |
if ($ntOpts['rpstTimeType']=='D') { $nxs_rpst_older = ceil(abs($currTime - $rpstToTime) / 86400);
|
868 |
$nxs_rpst_newer = ceil(abs($currTime - $rpstFromTime) / 86400);
|
869 |
} 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');
|
|
|
870 |
//if (isset($options['rpstOnlyPUP']) && trim($options['rpstOnlyPUP'])=='1') { add_filter( 'posts_join' , 'nxs_custom_posts_join'); add_filter( 'posts_where', 'nxs_filter_where_only' ); }
|
871 |
|
872 |
$nxs_rpst_code = 'nxsi'.$ii.$avNt['lcode']; $nxs_rpst_NT = strtoupper($avNt['lcode']);
|
@@ -874,22 +942,21 @@ function nxs_rePoster(){ global $nxs_snapAvNts,$plgn_NS_SNAutoPoster, $nxs_rpst_
|
|
874 |
if (isset($options['rpstOnlyPUP']) && trim($options['rpstOnlyPUP'])=='1') { add_filter( 'posts_where', 'nxs_filter_where_only' ); }
|
875 |
add_filter( 'posts_where', 'nxs_filter_where' ); $query = new WP_Query( $args ); remove_filter( 'posts_where', 'filter_where' ); // $extInfo = print_r($query, true);
|
876 |
|
877 |
-
$rpstLastPostID = $query->posts[0]->ID; $rpstLastPostTime = $query->posts[0]->post_date; $ntOpts['rpstLastPostTime'] = ($rpstLastPostTime!='')?$rpstLastPostTime:($ntOpts['rpstType']=='3'?'
|
878 |
-
$extInfo = " |
|
879 |
|
880 |
//echo "<br/>\r\n".$rpstEvrySec."<br/>\r\n";
|
881 |
$ntOpts['rpstLastShTime'] = $currTime; $rndTime = rand(0-$rndSec, $rndSec); $ntOpts['rpstNxTime'] = $lastTime + $rpstEvrySec*2 + $rndTime;
|
882 |
if (($ntOpts['rpstType']=='1') && (int)$rpstLastPostID<1) { $ntOpts['rpstOn']='0';
|
883 |
-
nxs_addToLogN('S','RE-
|
884 |
} else { $ntOpts['rpstLastPostID'] = $rpstLastPostID;
|
885 |
//## Actual Post
|
886 |
$clName = 'nxs_snapClass'.strtoupper($avNt['lcode']); $pFuncName = 'nxs_doPublishTo'.strtoupper($avNt['lcode']);
|
887 |
$po = get_post_meta($rpstLastPostID, 'snap'.strtoupper($avNt['lcode']), true); $po = maybe_unserialize($po);
|
888 |
-
$ntClInst = new $clName(); $ntOpts['ii'] = $ii; $ntOpts['pType'] = 'aj'; $
|
889 |
-
if ($options['extDebug']=='1') $extInfo .= "<br/><br/>NT OPTS: ".print_r($
|
890 |
-
$result = $pFuncName($rpstLastPostID, $
|
891 |
-
|
892 |
-
nxs_addToLogN('S', 'RE-Posted', $logNT, 'OK | '.$times.' | Last 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);
|
893 |
}
|
894 |
}
|
895 |
if (!isset($ntOpts['rpstLastShTime']) || (int)$ntOpts['rpstLastShTime']==0 ) { $hasChanged = true; $ntOpts['rpstLastShTime'] = $currTime; $ntOpts['rpstNxTime'] = $lastTime + $rpstEvrySec + rand(0-$rndSec, $rndSec); }
|
@@ -897,15 +964,19 @@ function nxs_rePoster(){ global $nxs_snapAvNts,$plgn_NS_SNAutoPoster, $nxs_rpst_
|
|
897 |
}
|
898 |
}
|
899 |
}
|
900 |
-
} if ($hasChanged) update_option($plgn_NS_SNAutoPoster->dbOptionsName, $options);
|
901 |
}
|
902 |
|
903 |
-
function
|
904 |
-
if (
|
|
|
|
|
|
|
|
|
905 |
}
|
906 |
|
907 |
//## NXS Cron
|
908 |
-
if (!function_exists("nxs_psCron")) { function nxs_psCron() { if (stripos($_SERVER["REQUEST_URI"], 'wp-cron.php')!==false) nxs_rePoster(); if (!is_home() && !is_front_page()) return;
|
909 |
//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;
|
910 |
$ltc = get_option('NSX_LastTChecked'); if (time()<$ltc+300) return; $sh =_get_cron_array(); $itmsToPush = array();
|
911 |
if (is_array($sh)) foreach ($sh as $evTime => $evDataX) foreach ($evDataX as $evFunc=>$evData) if (strpos($evFunc, 'ns_doPublishTo')!==false) { $chkTime = rand(360, 600); //$chkTime = rand(5, 7);
|
@@ -961,11 +1032,12 @@ function nxs_do_this_hourly() { $options = get_option('NS_SNAutoPoster');
|
|
961 |
}
|
962 |
}
|
963 |
//#### V3 new Query Poster
|
964 |
-
function nxs_addToPostingQuery($postID){
|
|
|
965 |
if (!in_array($postID, $quPosts)) $quPosts[] = $postID; update_option('NSX_PostsQuery', $quPosts);
|
966 |
//## Update Next Post time
|
967 |
-
$
|
968 |
-
if (empty($nxTime) || $nxTime < $currTime) { $options['quNxTime'] = $currTime; update_option('NS_SNAutoPoster', $options); }
|
969 |
}
|
970 |
function nxs_do_post_from_query() { // nxs_addToLogN('A', 'Debug info only. - Cron Time', 'X', '', $extInfo);
|
971 |
$options = get_option('NS_SNAutoPoster'); $quPosts = maybe_unserialize(get_option('NSX_PostsQuery')); if (!is_array($quPosts)) $quPosts = array();
|
86 |
}}
|
87 |
if (!function_exists('nxs_chckRmImage')){function nxs_chckRmImage($url, $chType='head'){ if( ini_get('allow_url_fopen')=='1' && @getimagesize($url)!==false) return true;
|
88 |
$hdrsArr = nxs_getNXSHeaders(); $nxsWPRemWhat = 'wp_remote_'.$chType; $rsp = $nxsWPRemWhat($url, array('headers' => $hdrsArr));
|
89 |
+
if(is_wp_error($rsp)) { nxs_addToLogN('E', 'Error', 'IMAGE', '-=ERROR=- Server can\'t access it\'s own images. Most probably it\'s a DNS problem. Please contact your hosting provider. '.serialize($rsp), ''); return false; }
|
90 |
if (is_array($rsp) && ($rsp['response']['code']=='200' || ( $rsp['response']['code']=='403' && $rsp['headers']['server']=='cloudflare-nginx') )) return true;
|
91 |
+
else { if ($chType=='head') { return nxs_chckRmImage($url, 'get'); } else { nxs_addToLogN('E', 'Error', 'IMAGE', '-=ERROR=- Server can\'t access it\'s own images. Most probably it\'s a DNS problem. Please contact your hosting provider. '.serialize($rsp), $url); return false; }
|
92 |
}
|
93 |
}}
|
94 |
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;
|
101 |
}
|
102 |
if ($imgURL!='' && $options['imgNoCheck']!='1' && nxs_chckRmImage($imgURL)==false) $imgURL = ''; if ($imgURL!='') return $imgURL;
|
103 |
//## Featured Image
|
104 |
+
if ($imgURL=='') { if ((int)$postID>0 && function_exists("get_post_thumbnail_id") ){ $imgURL = wp_get_attachment_image_src(get_post_thumbnail_id($postID), $size); $imgURL = $imgURL[0];
|
105 |
+
if ((trim($imgURL)!='') && substr($imgURL, 0, 4)!='http') $imgURL = site_url($imgURL);
|
106 |
+
}}
|
107 |
if ($imgURL!='' && $options['imgNoCheck']!='1' && nxs_chckRmImage($imgURL)==false) $imgURL = ''; if ($imgURL!='') return $imgURL;
|
108 |
//## plugin/categories-images
|
109 |
if ((int)$postID>0 && function_exists('z_taxonomy_image_url')) { $post_categories = wp_get_post_categories( $postID );
|
154 |
if (!function_exists("jsPostToSNAP")) { function jsPostToSNAP() { global $nxs_snapAvNts, $nxs_plurl; ?>
|
155 |
<script type="text/javascript" >
|
156 |
function nxs_updateGetImgsX(e){ }
|
157 |
+
jQuery(document).on('change', '#content', function( e ) { nxs_updateGetImgsX( e ); });
|
158 |
+
|
|
|
159 |
function nxs_updateGetImgsXX(e){
|
160 |
var targetId = e.target.id;
|
161 |
var text = 'Kortinko';
|
|
|
162 |
switch ( targetId ) {
|
|
|
163 |
case 'content':
|
164 |
text = jQuery('#content').val();
|
165 |
break;
|
|
|
166 |
case 'tinymce':
|
167 |
+
if ( tinymce.activeEditor ) text = tinymce.activeEditor.getContent();
|
|
|
168 |
break;
|
169 |
}
|
|
|
170 |
jQuery('.nxs_imgPrevList').html( text );
|
171 |
+
}
|
172 |
+
function nxs_clPrvImgShow(tIdN){ jQuery("#isAutoImg-"+tIdN).trigger('click'); jQuery("#isAutoImg-"+tIdN).trigger('click'); }
|
|
|
|
|
173 |
function nxs_clPrvImg(id, ii){ jQuery("#imgToUse-"+ii).val(jQuery("#"+id+" img").attr('src')); jQuery(".nxs_prevIDiv"+ii+" .nxs_checkIcon").hide();
|
174 |
jQuery(".nxs_prevIDiv"+ii).removeClass("nxs_chImg_selDiv"); jQuery(".nxs_prevIDiv"+ii+" img").removeClass("nxs_chImg_selImg");
|
175 |
jQuery("#"+id+" img").addClass("nxs_chImg_selImg"); jQuery("#"+id).addClass("nxs_chImg_selDiv"); jQuery("#"+id+" .nxs_checkIcon").show();
|
176 |
+
}
|
177 |
+
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; }
|
|
|
|
|
178 |
function nxs_updateGetImgs(e){
|
179 |
var textOut='';
|
180 |
var tId = e.target.id;
|
243 |
|
244 |
<script type="text/javascript">
|
245 |
|
246 |
+
jQuery(function(){
|
247 |
+
jQuery("form .categorydiv .selectit input:checkbox").click ( function(){ var nxs_isLocked = jQuery('#nxsLockIt').val(); if (nxs_isLocked=='1') return;
|
248 |
+
var thVal = jQuery(this).val(); if (!jQuery(this).is(":checked")) return;
|
249 |
+
|
250 |
+
var arr = [<?php if (!empty($options['exclCats'])) { $xarr = maybe_unserialize($options['exclCats']); if (is_array($xarr)) echo "'".implode("','", $xarr)."'"; } ?>];
|
|
|
|
|
|
|
251 |
if ( jQuery.inArray(thVal, arr)>-1) jQuery('.nxsGrpDoChb').removeAttr('checked'); else jQuery(".nxsGrpDoChb[title='def']").attr('checked','checked');
|
252 |
+
|
|
|
|
|
|
|
|
|
|
|
253 |
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");
|
254 |
if (jQuery.inArray(thVal, catsA)>-1) jQuery('#'+uqID).attr('checked','checked')
|
255 |
+
// alert( uqID + "|" + catsA + "|" + thVal);
|
256 |
+
});
|
257 |
+
|
258 |
+
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");
|
259 |
+
if (jQuery.inArray(thVal, catsA)>-1) jQuery('#'+uqID).attr('checked','checked')
|
260 |
+
// alert( uqID + "|" + catsA + "|" + thVal);
|
261 |
+
});
|
262 |
+
|
263 |
});
|
264 |
});
|
265 |
|
278 |
}<?php } ?>
|
279 |
}
|
280 |
|
281 |
+
function nxs_doTabs(){
|
282 |
jQuery('#nxsAPIUpd').dblclick(function() { doLic(); });
|
283 |
//When page loads...
|
284 |
jQuery(".nsx_tab_content").hide(); //Hide all content
|
294 |
jQuery(activeTab).show(); //Fade in the active ID content
|
295 |
return false;
|
296 |
});
|
297 |
+
|
298 |
+
}
|
299 |
+
|
300 |
+
function nxs_doTabsInd(iid){
|
301 |
+
//When page loads...
|
302 |
+
jQuery(iid+" .nsx_tab_content").hide(); //Hide all content
|
303 |
+
jQuery(iid+" ul.nsx_tabs > li:first-child").addClass("active").show(); //Activate first tab
|
304 |
+
jQuery(iid+" .nsx_tab_container > .nsx_tab_content:first-child").show(); //Show first tab content
|
305 |
+
|
306 |
+
//On Click Event
|
307 |
+
jQuery(iid+" ul.nsx_tabs li").click(function() {
|
308 |
+
jQuery(this).parent().children("li").removeClass("active"); //Remove any "active" class
|
309 |
+
jQuery(this).addClass("active"); //Add "active" class to selected tab
|
310 |
+
jQuery(this).parent().parent().children(".nsx_tab_container").children(".nsx_tab_content").hide(); //Hide all tab content
|
311 |
+
var activeTab = jQuery(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
|
312 |
+
jQuery(activeTab).show(); //Fade in the active ID content
|
313 |
+
return false;
|
314 |
+
});
|
315 |
+
|
316 |
+
}
|
317 |
+
|
318 |
+
function nxs_in_array(needle, haystack) { for(var i in haystack) { if(haystack[i] == needle) return true;} return false; }
|
319 |
+
|
320 |
+
jQuery(document).ready(function() {
|
321 |
+
nxs_doTabs();
|
322 |
+
//## Check for excluded Tags
|
323 |
+
var nxs_curTagsValue = jQuery('#tax-input-post_tag').val();
|
324 |
+
// !!FIXIT!!
|
325 |
+
jQuery(function () { setTimeout(nxs_checkTagsChanges, 0.1); });
|
326 |
+
function nxs_checkTagsChanges() { var currentValue = jQuery('#tax-input-post_tag').val(); var nxs_isLocked = jQuery('#nxsLockIt').val(); if (nxs_isLocked=='1') return;
|
327 |
+
if ((currentValue) && currentValue != nxs_curTagsValue && currentValue != '') {
|
328 |
+
nxs_curTagsValue = jQuery('#tax-input-post_tag').val();
|
329 |
+
var nxs_curTagsValueX = ''; var tValX = [];
|
330 |
+
jQuery('.the-tags').each(function() {
|
331 |
+
var tVals = jQuery( this ).val().split(","); var tID = jQuery( this ).attr('id').replace("tax-input-","");
|
332 |
+
for(var ii in tVals) tValX.push(tID+"|"+jQuery.trim(tVals[ii]));
|
333 |
+
}); // alert(tValX);
|
334 |
+
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");
|
335 |
+
// console.log( uqID ); console.log( JSON.stringify( catsA ) );
|
336 |
+
for(var ii in catsA) { var tgVal = jQuery.trim(catsA[ii]);
|
337 |
+
if (tgVal.indexOf("|")<1 && tgVal!="") tgVal = "post_tag|"+tgVal;
|
338 |
+
if (tgVal!="" && jQuery.inArray(tgVal, tValX)>-1) { jQuery('#'+uqID).attr('checked','checked'); }
|
339 |
+
}
|
340 |
+
});
|
341 |
+
} setTimeout(nxs_checkTagsChanges, 0.1);
|
342 |
+
}
|
343 |
});
|
344 |
</script>
|
345 |
|
367 |
.underdash {border-bottom: 1px #21759B dashed; text-decoration:none;}
|
368 |
.underdash a:hover {border-bottom: 1px #21759B dashed}
|
369 |
|
370 |
+
.nxsTHRow {vertical-align:top; padding-top:6px; text-align:right; width:80px; padding-right:10px;}
|
371 |
+
|
372 |
+
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%;}
|
373 |
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;}
|
374 |
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;}
|
375 |
ul.nsx_tabs li a:hover { background: #ccc;}
|
376 |
html ul.nsx_tabs li.active, html ul.nsx_tabs li.active a:hover { background: #fff; border-bottom: 1px solid #fff; }
|
377 |
+
.nsx_tab_container {border: 1px solid #999; border-top: none; overflow: hidden; clear: both; float: left; width: 99%; background: #fff;}
|
378 |
.nsx_tab_content {padding: 10px;}
|
379 |
|
380 |
.nxs_tls_cpt{width:100%; padding-bottom: 5px; padding-top: 10px;font-size: 16px; font-weight: bold;}
|
388 |
.subDiv{margin-left: 15px;}
|
389 |
.nxs_hili {color:#008000;}
|
390 |
.clNewNTSets{width: 800px;}
|
391 |
+
.nxclear {clear: both;}
|
392 |
|
393 |
.nxs_icon16 { font-size: 14px; line-height: 18px;
|
394 |
background-position: 3px 50% !important;
|
514 |
if (function_exists('nxs_doSMAS4')) return nxs_doSMAS4($nt, $ii, $hrs, $min, $days); else return '<br/>';
|
515 |
}}
|
516 |
if (!function_exists('nxs_addPostingDelaySelV3')){function nxs_addPostingDelaySelV3($nt, $ii, $hrs=0, $min=0, $days=0){
|
517 |
+
if (function_exists('nxs_doSMAS4')) { ?> <div class="nxs_tls_cpt"><?php _e('Posting Delay', 'nxs_snap'); ?></div>
|
518 |
+
<div class="nxs_tls_bd"><?php global $plgn_NS_SNAutoPoster, $nxs_plurl; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;
|
519 |
+
if ($options['nxsHTDP']=='I') _e('Not Compatible with "Publish Immediately"'); else echo nxs_doSMAS4($nt, $ii, $hrs, $min, $days); ?></div>
|
520 |
<?php } else echo '<br/>';
|
521 |
}}
|
522 |
|
534 |
|
535 |
if (!function_exists("nxs_hideTip_ajax")) { function nxs_hideTip_ajax() { check_ajax_referer('nxsSsPageWPN');
|
536 |
global $plgn_NS_SNAutoPoster, $nxs_plurl; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;
|
537 |
+
$options['hideTopTip'] = '1'; update_option($plgn_NS_SNAutoPoster->dbOptionsName, $options); $plgn_NS_SNAutoPoster->nxs_options = $options;
|
538 |
}}
|
539 |
|
540 |
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;
|
741 |
}
|
742 |
|
743 |
//## Reposter
|
744 |
+
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;
|
745 |
|
746 |
$rpstEvrySecEx = $optionsii['rpstDays']*86400+$optionsii['rpstHrs']*3600+$optionsii['rpstMins']*60;
|
747 |
|
753 |
if (isset($pval['rpstPostIncl'])) $optionsii['rpstPostIncl'] = trim($pval['rpstPostIncl']);
|
754 |
|
755 |
$rpstEvrySecNew = $optionsii['rpstDays']*86400+$optionsii['rpstHrs']*3600+$optionsii['rpstMins']*60;
|
756 |
+
$rpstRNDSecs = isset($optionsii['rpstRndMins'])?$optionsii['rpstRndMins']*60:0; if ($rpstRNDSecs>$rpstEvrySecNew) $optionsii['rpstRndMins'] = 0;
|
757 |
|
758 |
if ($rpstEvrySecNew!=$rpstEvrySecEx) { $currTime = time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); $optionsii['rpstNxTime'] = $currTime + $rpstEvrySecNew; }
|
759 |
if (isset($pval['rpstType'])) $optionsii['rpstType'] = trim($pval['rpstType']);
|
764 |
if (isset($pval['rpstNWDays'])) $optionsii['rpstNWDays'] = trim($pval['rpstNWDays']);
|
765 |
if (isset($pval['rpstOnlyPUP'])) $optionsii['rpstOnlyPUP'] = trim($pval['rpstOnlyPUP']); else $optionsii['rpstOnlyPUP'] = 0;
|
766 |
|
767 |
+
if (isset($pval['nxsCPTSeld'])) $optionsii['nxsCPTSeld'] = serialize($pval['nxsCPTSeld']);
|
768 |
+
|
769 |
+
if (isset($pval['tagsSel'])) { $optionsii['tagsSel'] = trim($pval['tagsSel']); $tagsSelX = array(); $tggsSel = explode(',', $optionsii['tagsSel']);
|
770 |
+
foreach ($tggsSel as $tggg){ $tggg = trim($tggg); $tagsSelX[] = $tggg;
|
771 |
+
if (stripos($tggg, '|')!==false) { $tgArr = explode('|', $tggg); $taxonomy = $tgArr[0]; $tgggT = $tgArr[1]; } else { $taxonomy = 'post_tag'; $tgggT = $tggg; }
|
772 |
+
$tgArr = get_term_by( 'slug', $tgggT, $taxonomy, ARRAY_A); if (is_array($tgArr)) $tagsSelX[] = $tgArr['term_id'];
|
773 |
+
} $optionsii['tagsSelX'] = implode(',', $tagsSelX);
|
774 |
+
}
|
775 |
+
if (isset($pval['custTaxSel'])) $optionsii['custTaxSel'] = trim($pval['custTaxSel']);
|
776 |
|
777 |
if (isset($pval['rpstBtwHrsType'])) $optionsii['rpstBtwHrsType'] = trim($pval['rpstBtwHrsType']);
|
778 |
+
if (isset($pval['rpstBtwHrsT'])) $optionsii['rpstBtwHrsT'] = trim($pval['rpstBtwHrsT']); if (isset($optionsii['rpstBtwHrsT'])&&(int)$optionsii['rpstBtwHrsT']>23) $optionsii['rpstBtwHrsT'] = 23;
|
779 |
+
if (isset($pval['rpstBtwHrsF'])) $optionsii['rpstBtwHrsF'] = trim($pval['rpstBtwHrsF']); if (isset($optionsii['rpstBtwHrsF'])&&(int)$optionsii['rpstBtwHrsF']>23) $optionsii['rpstBtwHrsF'] = 23;
|
780 |
if (isset($pval['rpstBtwDays'])) $optionsii['rpstBtwDays'] = $pval['rpstBtwDays']; else $optionsii['rpstBtwDays'] = array();
|
781 |
return $optionsii;
|
782 |
}
|
783 |
+
|
784 |
+
function nxs_showCatTagsCTFilters($nt, $ii, $options){ global $nxs_snapAvNts, $nxs_plurl;
|
785 |
+
if (!isset($options['tagsSel'])) $options['tagsSel'] = ''; if (!isset($options['custTaxSel'])) $options['custTaxSel'] = '';
|
786 |
+
?> <div class="nxs_tls_cpt"><?php _e('Filter Autoposting by', 'nxs_snap'); ?></div>
|
787 |
+
<div class="nxs_tls_bd">
|
788 |
+
<div style="width:100%;"><strong><?php _e('Categories', 'nxs_snap'); ?>:</strong>
|
789 |
+
<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', 'nxs_snap'); ?>
|
790 |
+
<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', 'nxs_snap'); ?><?php if ($options['catSelEd']!='') echo "[".(substr_count($options['catSelEd'], ",")+1)."]"; ?></a>
|
791 |
+
<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']; ?>" />
|
792 |
+
<br/><i><?php _e('Only selected categories will be autoposted to this account', 'nxs_snap'); ?></i></div>
|
793 |
+
<br/>
|
794 |
+
<div style="width:100%;"><strong><?php _e('Tags and Custom Taxonomies', 'nxs_snap'); ?>:</strong>
|
795 |
+
<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")), 'nxs_snap') ?>" />
|
796 |
+
<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.', 'nxs_snap'); ?></i></div>
|
797 |
+
<br/>
|
798 |
+
</div> <?php
|
799 |
+
}
|
800 |
+
|
801 |
+
|
802 |
function nxs_showRepostSettings($nt, $ii, $options){ global $nxs_snapAvNts, $nxs_plurl;
|
803 |
if (empty($options['rpstPostIncl'])) $options['rpstPostIncl'] = 0; if (empty($options['rpstPostIncl'])) $options['rpstLastShTime'] = ''; if (empty($options['rpstNxTime'])) $options['rpstNxTime'] = '';
|
804 |
if (empty($options['rpstLastPostID'])) $options['rpstLastPostID'] = '';
|
855 |
<select name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"><option <?php echo $options['rpstPostIncl'] == "1"?'selected="selected"':''; ?> value="1">Enabled for Repost</option>
|
856 |
<option <?php echo $options['rpstPostIncl'] != "1"?'selected="selected"':''; ?> value="0">Disabled for Repost</option></select><br/>
|
857 |
<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' />
|
858 |
+
<?php _e('Set All Existing Posts to: ', 'nxs_snap'); ?>
|
859 |
+
<span class="nxsInstrSpan"><a href="#" onclick="nxs_setRpstAll('<?php echo $nt; ?>','1','<?php echo $ii; ?>'); return false;"><?php _e('[Enabled for Repost]', 'nxs_snap'); ?></a> </span>
|
860 |
+
<span class="nxsInstrSpan"><a href="#" onclick="nxs_setRpstAll('<?php echo $nt; ?>','0','<?php echo $ii; ?>'); return false;"><?php _e('[Disabled for Repost]', 'nxs_snap'); ?></a> </span>
|
861 |
+
<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]', 'nxs_snap'); ?></a> </span>
|
862 |
|
863 |
</div><hr/>
|
864 |
<b><?php _e('Last post', 'nxs_snap'); ?></b> (ID: <?php echo !empty($options['rpstLastPostID'])?$options['rpstLastPostID']:''; ?>) <b><?php _e('was re-posted on:', 'nxs_snap'); ?></b> <?php echo $options['rpstLastShTime']>0?date_i18n('Y-m-d H:i', $options['rpstLastShTime']):'Never'; ?>
|
910 |
$rpstEvrySec = $ntOpts['rpstDays']*86400+$ntOpts['rpstHrs']*3600+$ntOpts['rpstMins']*60; $rndSec = $ntOpts['rpstRndMins']*60;
|
911 |
$nxTime = (isset($ntOpts['rpstNxTime']) && (int)$ntOpts['rpstNxTime']>0)?$ntOpts['rpstNxTime']:$currTime+$rpstEvrySec;
|
912 |
|
913 |
+
$times = "Requested Time: ".date_i18n('Y-m-d H:i:s', $nxTime)." | Current Time:".date_i18n('Y-m-d H:i:s', $currTime)." | ";
|
914 |
|
915 |
if ($nxTime < $currTime) { $hasChanged = true; // Do Post
|
916 |
$nxs_rpst_type = $ntOpts['rpstType'];
|
922 |
|
923 |
//nxs_addToLogN('S', 'pTypes', $logNT, print_r($tpArray, true), $extInfo); // $tpArray = array('post', 'location');
|
924 |
|
925 |
+
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 );
|
926 |
// if ($ntOpts['rpstType']=='2') $args = array ( 'posts_per_page' => '1', 'orderby' => 'post_date ASC, p.ID ASC', 'post_type' => 'post', 'post_status' => 'publish', 'suppress_filters' => false );
|
927 |
// if ($ntOpts['rpstType']=='3') $args = array ( 'posts_per_page' => '1', 'orderby' => 'post_date DESC, p.ID DESC', 'post_type' => 'post', 'post_status' => 'publish', 'suppress_filters' => false );
|
928 |
if ($ntOpts['rpstType']=='2') $args = array ( 'posts_per_page' => '1', 'orderby' => 'date ID', 'order'=>'ASC', 'post_type' => $tpArray, 'post_status' => 'publish', 'suppress_filters' => false );
|
934 |
if ($ntOpts['rpstTimeType']=='D') { $nxs_rpst_older = ceil(abs($currTime - $rpstToTime) / 86400);
|
935 |
$nxs_rpst_newer = ceil(abs($currTime - $rpstFromTime) / 86400);
|
936 |
} 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');
|
937 |
+
if ($nxs_rpst_newer>5000) $nxs_rpst_newer = 5000; if ($nxs_rpst_newer<$nxs_rpst_older) $nxs_rpst_older = 0;
|
938 |
//if (isset($options['rpstOnlyPUP']) && trim($options['rpstOnlyPUP'])=='1') { add_filter( 'posts_join' , 'nxs_custom_posts_join'); add_filter( 'posts_where', 'nxs_filter_where_only' ); }
|
939 |
|
940 |
$nxs_rpst_code = 'nxsi'.$ii.$avNt['lcode']; $nxs_rpst_NT = strtoupper($avNt['lcode']);
|
942 |
if (isset($options['rpstOnlyPUP']) && trim($options['rpstOnlyPUP'])=='1') { add_filter( 'posts_where', 'nxs_filter_where_only' ); }
|
943 |
add_filter( 'posts_where', 'nxs_filter_where' ); $query = new WP_Query( $args ); remove_filter( 'posts_where', 'filter_where' ); // $extInfo = print_r($query, true);
|
944 |
|
945 |
+
$rpstLastPostID = $query->posts[0]->ID; $rpstLastPostTime = $query->posts[0]->post_date; $ntOpts['rpstLastPostTime'] = ($rpstLastPostTime!='')?$rpstLastPostTime:($ntOpts['rpstType']=='3'?'1985-01-01':'2050-12-12');
|
946 |
+
$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):'');
|
947 |
|
948 |
//echo "<br/>\r\n".$rpstEvrySec."<br/>\r\n";
|
949 |
$ntOpts['rpstLastShTime'] = $currTime; $rndTime = rand(0-$rndSec, $rndSec); $ntOpts['rpstNxTime'] = $lastTime + $rpstEvrySec*2 + $rndTime;
|
950 |
if (($ntOpts['rpstType']=='1') && (int)$rpstLastPostID<1) { $ntOpts['rpstOn']='0';
|
951 |
+
nxs_addToLogN('S','RE-Posting - End of the Query',$logNT,'OK '.$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);
|
952 |
} else { $ntOpts['rpstLastPostID'] = $rpstLastPostID;
|
953 |
//## Actual Post
|
954 |
$clName = 'nxs_snapClass'.strtoupper($avNt['lcode']); $pFuncName = 'nxs_doPublishTo'.strtoupper($avNt['lcode']);
|
955 |
$po = get_post_meta($rpstLastPostID, 'snap'.strtoupper($avNt['lcode']), true); $po = maybe_unserialize($po);
|
956 |
+
$ntClInst = new $clName(); $ntOpts['ii'] = $ii; $ntOpts['pType'] = 'aj'; $ntOptsPost = $ntClInst->adjMetaOpt($ntOpts, $po[$ii]);
|
957 |
+
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);
|
958 |
+
$result = $pFuncName($rpstLastPostID, $ntOptsPost); //if ($result == 200) die("Successfully sent your post to App.Net."); else die($result);
|
959 |
+
nxs_addToLogN('S', 'RE-Posted', $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);
|
|
|
960 |
}
|
961 |
}
|
962 |
if (!isset($ntOpts['rpstLastShTime']) || (int)$ntOpts['rpstLastShTime']==0 ) { $hasChanged = true; $ntOpts['rpstLastShTime'] = $currTime; $ntOpts['rpstNxTime'] = $lastTime + $rpstEvrySec + rand(0-$rndSec, $rndSec); }
|
964 |
}
|
965 |
}
|
966 |
}
|
967 |
+
} if ($hasChanged) { update_option($plgn_NS_SNAutoPoster->dbOptionsName, $options); $plgn_NS_SNAutoPoster->nxs_options = $options; }
|
968 |
}
|
969 |
|
970 |
+
function nxs_chckBrwsr() { $isOK = false;
|
971 |
+
if (preg_match('/MSIE/i',$_SERVER['HTTP_USER_AGENT'])) $isOK = true; if (preg_match('/Internet Explorer/i',$_SERVER['HTTP_USER_AGENT'])) $isOK = true;
|
972 |
+
if (preg_match('/Firefox/i',$_SERVER['HTTP_USER_AGENT'])) $isOK = true; if (preg_match('/Opera/i',$_SERVER['HTTP_USER_AGENT'])) $isOK = true;
|
973 |
+
if (preg_match('/Chrome/i',$_SERVER['HTTP_USER_AGENT'])) $isOK = true; if (preg_match('/Safari/i',$_SERVER['HTTP_USER_AGENT'])) $isOK = true;
|
974 |
+
if (preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone)/i', strtolower($_SERVER['HTTP_USER_AGENT'])) || (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;
|
975 |
+
return $isOK;
|
976 |
}
|
977 |
|
978 |
//## NXS Cron
|
979 |
+
if (!function_exists("nxs_psCron")) { function nxs_psCron() { if (stripos($_SERVER["REQUEST_URI"], 'wp-cron.php')!==false) nxs_rePoster(); if (!is_home() && !is_front_page()) return; if (nxs_chckBrwsr()==false) return;
|
980 |
//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;
|
981 |
$ltc = get_option('NSX_LastTChecked'); if (time()<$ltc+300) return; $sh =_get_cron_array(); $itmsToPush = array();
|
982 |
if (is_array($sh)) foreach ($sh as $evTime => $evDataX) foreach ($evDataX as $evFunc=>$evData) if (strpos($evFunc, 'ns_doPublishTo')!==false) { $chkTime = rand(360, 600); //$chkTime = rand(5, 7);
|
1032 |
}
|
1033 |
}
|
1034 |
//#### V3 new Query Poster
|
1035 |
+
function nxs_addToPostingQuery($postID){ global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;
|
1036 |
+
$quPosts = maybe_unserialize(get_option('NSX_PostsQuery')); if (!is_array($quPosts)) $quPosts = array();
|
1037 |
if (!in_array($postID, $quPosts)) $quPosts[] = $postID; update_option('NSX_PostsQuery', $quPosts);
|
1038 |
//## Update Next Post time
|
1039 |
+
$currTime = time() + 10 + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); $nxTime = !empty($options['quNxTime'])?$options['quNxTime']:0;
|
1040 |
+
if (empty($nxTime) || $nxTime < $currTime) { $options['quNxTime'] = $currTime; update_option('NS_SNAutoPoster', $options); $plgn_NS_SNAutoPoster->nxs_options = $options; }
|
1041 |
}
|
1042 |
function nxs_do_post_from_query() { // nxs_addToLogN('A', 'Debug info only. - Cron Time', 'X', '', $extInfo);
|
1043 |
$options = get_option('NS_SNAutoPoster'); $quPosts = maybe_unserialize(get_option('NSX_PostsQuery')); if (!is_array($quPosts)) $quPosts = array();
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ Contributors: NextScripts
|
|
4 |
Donate link: http://www.nextscripts.com/social-networks-auto-poster-for-wordpress
|
5 |
Tags: automation, autopost, auto-post, auto post, socialnetworks, socialnetwork, social networks, social network, facebook, google, google+, twitter, google plus, pinterest, tumblr, blogger, blogspot, blogpost, linkedin, delicious, delicious.com, reddit, reddit.com, plugin, links, Post, posts, api, automatic, seo, integration, bookmark, FriendFeed, bookmarks, admin, images, image, social, sharing, share, repost, re-post, wordpress.com, StumbleUpon, Diigo, vBulletin, Plurk, forums, vKontakte, open graph, LiveJournal, YouTube
|
6 |
Requires at least: 3.1
|
7 |
-
Tested up to: 3.
|
8 |
-
Stable tag: 3.
|
9 |
License: GPLv2 or later
|
10 |
|
11 |
Automatically re-publishes blogposts to Facebook, Twitter, Google+, Pinterest, LinkedIn, Blogger, Tumblr, Delicious, Plurk, etc profiles and/or pages
|
@@ -151,7 +151,42 @@ Please see more <a href="http://www.nextscripts.com/faq/">Frequently asked quest
|
|
151 |
|
152 |
== Changelog ==
|
153 |
|
154 |
-
= 3.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
* New - %FULLTITLE% tag will insert processed title.
|
157 |
* Bug Fix - YouTube - Google+ page setting were not saved.
|
4 |
Donate link: http://www.nextscripts.com/social-networks-auto-poster-for-wordpress
|
5 |
Tags: automation, autopost, auto-post, auto post, socialnetworks, socialnetwork, social networks, social network, facebook, google, google+, twitter, google plus, pinterest, tumblr, blogger, blogspot, blogpost, linkedin, delicious, delicious.com, reddit, reddit.com, plugin, links, Post, posts, api, automatic, seo, integration, bookmark, FriendFeed, bookmarks, admin, images, image, social, sharing, share, repost, re-post, wordpress.com, StumbleUpon, Diigo, vBulletin, Plurk, forums, vKontakte, open graph, LiveJournal, YouTube
|
6 |
Requires at least: 3.1
|
7 |
+
Tested up to: 3.8.0
|
8 |
+
Stable tag: 3.1.2
|
9 |
License: GPLv2 or later
|
10 |
|
11 |
Automatically re-publishes blogposts to Facebook, Twitter, Google+, Pinterest, LinkedIn, Blogger, Tumblr, Delicious, Plurk, etc profiles and/or pages
|
151 |
|
152 |
== Changelog ==
|
153 |
|
154 |
+
= 3.1.2 [01/15/2013] =
|
155 |
+
|
156 |
+
* [Critical] Bug Fix - [ERROR] (#100) actions should be a JSON-encoded dictionary with 'name' and 'link' keys
|
157 |
+
* Improvement/Bug Fix - Plugin will import all comments from Facebook posts, not just the first 100.
|
158 |
+
* Bug Fix - Plugin were re-posting the same "Sticky" post in some configurations.
|
159 |
+
|
160 |
+
= 3.1.1 [01/14/2013] =
|
161 |
+
|
162 |
+
* Improvement/Bug Fix - Update for Jan 14 Twitter API change - requirement for ONLY secured SSL connections
|
163 |
+
* Improvement/Bug Fix - Better compatibility with some WP Admin themes - like fixed missing "Update Settings" button
|
164 |
+
* Improvement/Bug Fix - Stability improvements and better error handling for Wordpress based sites.
|
165 |
+
* Improvement/Bug Fix - Some fixes, improvements and optimizations to the re-posting functionality.
|
166 |
+
* Improvement/Bug Fix - More clear interface for category filters.
|
167 |
+
* Bug Fix - Missing Twitter image on servers without proper "Content-Length" header
|
168 |
+
* Bug Fix - Duplicate categories filter for Twitter has been removed.
|
169 |
+
* Bug Fix - vBulletin module optimization and better error handling.
|
170 |
+
* Bug Fix - General options were getting overwritten by post options in some configurations.
|
171 |
+
* Bug Fix - Memory limit problem for servers with more then 1GB of allowed for PHP memory.
|
172 |
+
|
173 |
+
= 3.1.0 [12/12/2013] =
|
174 |
+
|
175 |
+
* New - Wordpress 3.8 Compatibility
|
176 |
+
* New - New Ajax based settings page - 7 times lighter and faster.
|
177 |
+
* New - Filter autoposting by tags and custom taxonomies.
|
178 |
+
* New - Ability to set all posts "Enabled/Disabled for repost" according to the Categories/Tags/Custom Taxonomies filters
|
179 |
+
* Improvement - Performance/compatibility improvement with latest LastPass extension.
|
180 |
+
* Improvement - Better compatibility with SSL.
|
181 |
+
* Improvement/Bug Fix - HTML tags and shortcodes are now removed from Facebook attached titles.
|
182 |
+
* Improvement/Bug Fix - Compatibility with new LinkedIn security feature "We just sent you the code".
|
183 |
+
* Bug Fix - Facebook - wrong image was selected for "Image" posts in some configurations.
|
184 |
+
* Bug Fix - broken reposting if "Newer then XX Days" value is too big.
|
185 |
+
* Bug Fix - FriendFeed was ignoring message format and posting checkbox.
|
186 |
+
* Bug Fix - Incorrect display of "Time to Post" for scheduled posts.
|
187 |
+
* Bug Fix - incorrect "Autopost Cancelled" messages.
|
188 |
+
|
189 |
+
= 3.0.9 [11/22/2013] =
|
190 |
|
191 |
* New - %FULLTITLE% tag will insert processed title.
|
192 |
* Bug Fix - YouTube - Google+ page setting were not saved.
|