function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl, $nxs_snapSetPgURL; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['bgOK'])) { $options['bgOK'] = ''; } if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } if (!isset($options['msgAFrmt'])) { $options['msgAFrmt'] = ''; } if (empty($options['apiToUse'])) { if (!empty($options['APIKey'])) { $options['apiToUse'] = 'bg'; } if (!empty($options['bgUName']) && !empty($options['bgPass'])) { $options['apiToUse'] = 'nx'; } } ?> <div id="doBG<?php echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { echo " clNewNTSets"; } ?> "> <input type="hidden" name="apDoSBG<?php echo $ii; ?> " value="0" id="apDoSBG<?php echo $ii; ?> " /> <?php if ($isNew) { ?> <input type="hidden" name="bg[<?php echo $ii; ?> ][apDoBG]" value="1" id="apDoNewBG<?php echo $ii; ?> " /> <?php } ?> <div id="doBG<?php echo $ii; ?> Div" style="margin-left: 10px;"> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/bg16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-blogger-social-networks-auto-poster-wordpress/"><?php $nType = "Blogger"; printf(__('Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?> </a></div> <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?> </i> </div><input name="bg[<?php echo $ii; ?> ][nName]" id="bgnName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /><br/> <?php echo nxs_addQTranslSel('bg', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <?php if (!class_exists('nxsAPI_GP') && !empty($options['bgUName']) && empty($options['APIKey'])) { ?> <span style="color: red;">Blogger has <a style="color: red;" target="_blank" href="https://developers.google.com/identity/protocols/AuthForInstalledApps">discontinued support for "ClientLogin" authentication method</a>. This account should be removed and re-added with oAuth authentication method or upgraded to NextScripts API</span><br/></hr> <?php } ?> <div style="width:100%;"><strong>Blogger Blog ID:</strong> <p style="font-size: 11px; margin: 0px;"><?php _e('Log to your Blogger management panel and look at the URL of your blog: http://www.blogger.com/blogger.g?blogID=8959085979163812093#allposts. Your Blog ID will be: 8959085979163812093', 'social-networks-auto-poster-facebook-twitter-g'); ?> </p> </div><input name="bg[<?php echo $ii; ?> ][bgBlogID]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['bgBlogID'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <br/><br/> <div style="display: <?php echo empty($options['apiToUse']) ? "block" : "none"; ?> ;"> <div style="width:100%; text-align: center; color:#005800; font-weight: bold; font-size: 14px;">You can choose what API you would like to use. </div> <span style="color:#005800; font-weight: bold; font-size: 14px;">Blogger Native API:</span> Free built-in API from Blogger. More secure, more stable. More complicated - <b style="color: red;">requires approval of access to API by Google (3-5 days)</b> and authorization. <br/><br/> <span style="color:#005800; font-weight: bold; font-size: 14px;">NextScripts API for Blogger:</span> Premium API with extended functionality. Easier to configure, but less secure - requires your password.<br/><br/> <select name="bg[<?php echo $ii; ?> ][apiToUse]" onchange="if (jQuery(this).val()=='bg') { jQuery('.nxs_bg_nxapi_<?php echo $ii; ?> ').hide(); jQuery('.nxs_bg_bgapi_<?php echo $ii; ?> ').show(); }else { jQuery('.nxs_bg_bgapi_<?php echo $ii; ?> ').hide(); jQuery('.nxs_bg_nxapi_<?php echo $ii; ?> ').show(); }"><option <?php echo empty($options['apiToUse']) || $options['apiToUse'] == 'bg' ? "selected" : ""; ?> value="bg">Blogger API</option><option <?php echo !empty($options['apiToUse']) && $options['apiToUse'] == 'nx' ? "selected" : ""; ?> value="nx">NextScripts API</option></select><hr/> </div> <div id="nxsAPIBG<?php echo $ii; ?> " class="nxs_bg_bgapi_<?php echo $ii; ?> " style="display: <?php echo empty($options['apiToUse']) || $options['apiToUse'] == 'bg' ? "block" : "none"; ?> ;"><h3>Blogger API</h3> <div class="subDiv" id="sub<?php echo $ii; ?> DivL" style="display: block;"> <div style="width:100%;"><strong>Client ID:</strong> </div><input name="bg[<?php echo $ii; ?> ][APIKey]" style="width: 70%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['APIKey'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <div style="width:100%;"><strong>Client Secret:</strong> </div><input name="bg[<?php echo $ii; ?> ][APISec]" id="APISec" style="width: 70%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['APISec'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <br/><br/> <?php if ($options['APIKey'] == '') { ?> <b>Authorize Your Blogger Account</b>. Please save your settings and come back here to Authorize your account. <?php } else { if (isset($options['AccessToken']) && isset($options['AccessTokenSecret']) && $options['AccessTokenSecret'] !== '') { ?> Your Blogger Account has been authorized. <br/>Blog ID: <?php _e(apply_filters('format_to_edit', $options['blogInfo']), 'social-networks-auto-poster-facebook-twitter-g'); ?> . <br/>You can Re- <?php } ?> <a href="https://accounts.google.com/o/oauth2/auth?redirect_uri=<?php echo trim(urlencode($nxs_snapSetPgURL)); ?> &response_type=code&client_id=<?php echo trim($options['APIKey']); ?> &scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fblogger&approval_prompt=force&access_type=offline&state=<?php echo 'nxs-bg-' . $ii; ?> ">Authorize Your Blogger Account</a> <?php if (empty($options['AccessTokenSecret'])) { ?> <div class="blnkg"><=== Authorize your account ===</div> <?php } ?> <?php } ?> </div> </div> <div id="nxsAPINX<?php echo $ii; ?> " class="nxs_bg_nxapi_<?php echo $ii; ?> " style="display: <?php echo !empty($options['apiToUse']) && $options['apiToUse'] == 'nx' ? "block" : "none"; ?> ;"><h3>NextScripts API</h3> <?php if (class_exists('nxsAPI_GP')) { ?> <div class="subDiv" id="sub<?php echo $ii; ?> DivN" style="display: block;"> <div style="width:100%;"><strong>Your Blogger Username/Email:</strong> </div><input name="bg[<?php echo $ii; ?> ][bgUName]" style="width: 70%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['bgUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <div style="width:100%;"><strong>Your Blogger Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" type="password" name="bg[<?php echo $ii; ?> ][bgPass]" style="width: 75%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['bgPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> </div> <?php } else { nxs_show_noLibWrn('"NextScripts API Library for Blogger" is NOT installed'); } ?> </div> <br/><hr/> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong> (<a href="#" id="apBGTMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apBGTMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a>)</div> <input name="bg[<?php echo $ii; ?> ][apBGMsgTFrmt]" id="apBGMsgTFrmt" style="width: 50%;" value="<?php if ($options['bgMsgTFormat'] != '') { _e(apply_filters('format_to_edit', htmlentities($options['bgMsgTFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); } else { echo "%TITLE%"; } ?> " onfocus="mxs_showFrmtInfo('apBGTMsgFrmt<?php echo $ii; ?> ');" /><?php nxs_doShowHint("apBGTMsgFrmt" . $ii); ?> <br/> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong> (<a href="#" id="apBGMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apBGMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a>) <!-- HTML is <?php if (!function_exists('doPostToGooglePlus')) { ?> <b>NOT</b> <?php } ?> allowed. <?php if (!function_exists('doPostToGooglePlus')) { ?> <i>- Blogger "Free API" limitation. Please get <a href="http://www.nextscripts.com/google-plus-automated-posting/#blogger">NextScripts API</a> to allow HTML</i> <?php } ?> --> </div> <textarea cols="150" rows="3" id="bg<?php echo $ii; ?> SNAPformat" name="bg[<?php echo $ii; ?> ][apBGMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#bg<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apBGMsgFrmt<?php echo $ii; ?> ');"><?php if ($options['bgMsgFormat'] != '') { _e(apply_filters('format_to_edit', htmlentities($options['bgMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); } else { echo "%FULLTEXT% <br/><a href='%URL%'>%TITLE%</a>"; } ?> </textarea> <?php nxs_doShowHint("apBGMsgFrmt" . $ii, __('HTML is allowed', 'social-networks-auto-poster-facebook-twitter-g')); ?> </div> <p style="margin-bottom: 20px;margin-top: 5px;"><input value="1" id="bgInclTags" type="checkbox" name="bg[<?php echo $ii; ?> ][bgInclTags]" <?php if ((int) $options['bgInclTags'] == 1) { echo "checked"; } ?> /> <strong><?php _e('Post with tags', 'social-networks-auto-poster-facebook-twitter-g'); ?> </strong> <?php _e('Tags from the blogpost will be auto-posted to Blogger/Blogspot', 'social-networks-auto-poster-facebook-twitter-g'); ?> </p> <?php if (!empty($options['bgPass']) || !empty($options['AccessToken'])) { ?> <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</b> <?php if (!isset($options['bgOK']) || $options['bgOK'] != '1') { ?> <div class="blnkg">=== <?php _e('Submit Test Post to Finish Configuration', 'social-networks-auto-poster-facebook-twitter-g'); ?> ===></div> <?php } ?> <a href="#" class="NXSButton" onclick="testPost('BG', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?> </a> <?php } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?> " /></div> </div> </div> <?php }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl, $nxs_snapSetPgURL; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['fillSrcURL'])) { $options['fillSrcURL'] = '0'; } if (!isset($options['useOrDate'])) { $options['useOrDate'] = '1'; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } if (!isset($options['trMsgTFormat'])) { $options['trMsgTFormat'] = ''; } //prr($options); ?> <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; ?> " /> <?php if ($isNew) { ?> <input type="hidden" name="tr[<?php echo $ii; ?> ][apDoTR]" value="1" id="apDoNewTR<?php echo $ii; ?> " /> <?php } ?> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/tr16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-tumblr-social-networks-auto-poster-wordpress/"><?php $nType = "Tumblr"; printf(__('Detailed %s Installation/Configuration Instructions', 'nxs_snap'), $nType); ?> </a></div> <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="tr[<?php echo $ii; ?> ][nName]" id="trnName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><br/> <?php echo nxs_addQTranslSel('tr', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'nxs_snap'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'nxs_snap'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><strong>Tumblr URL:</strong> <i>It should be your public URL. (i.e. like <b>http://nextscripts.tumblr.com/</b>, not http://www.tumblr.com/blog/nextscripts</i> </div><input onchange="nxsTRURLVal(<?php echo $ii; ?> );" name="tr[<?php echo $ii; ?> ][apTRURL]" id="apTRURL<?php echo $ii; ?> " style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['trURL'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><span style="color: #F00000;" id="apTRURLerr<?php echo $ii; ?> "></span> <div style="width:100%;"><strong>Tumblr OAuth Consumer Key:</strong> </div><input name="tr[<?php echo $ii; ?> ][apTRConsKey]" id="apTRConsKey" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['trConsKey'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%;"><strong>Tumblr Secret Key:</strong> </div><input name="tr[<?php echo $ii; ?> ][apTRConsSec]" id="apTRConsSec" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['trConsSec'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/> <div style="width:100%;"><strong id="altFormatText">Default Post Type:</strong></div> <div style="margin-left: 10px;"> <input type="radio" name="tr[<?php echo $ii; ?> ][apTRPostType]" value="T" <?php if ($options['trPostType'] != 'I') { echo 'checked="checked"'; } ?> onchange="nxs_TRSetEnable('T','<?php echo $ii; ?> ');" /> Text Post<br/> <div style="width:100%; margin-left: 15px;"><strong id="altFormatText"><?php _e('Post Title Format', 'nxs_snap'); ?> :</strong> (<a href="#" id="apTRTMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apTRTMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a>) </div><div onblur="jQuery('#apTRMsgFrmt<?php echo $ii; ?> Hint').hide();"> <input name="tr[<?php echo $ii; ?> ][apTRMsgTFrmt]" id="apTRMsgTFrmt<?php echo $ii; ?> " style="margin-left: 15px; width: 50%;" value="<?php if ($options['trMsgTFormat'] != '') { _e(apply_filters('format_to_edit', htmlentities($options['trMsgTFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } else { echo "New Post has been published on %SITENAME%"; } ?> " onfocus="jQuery('#apTRTMsgFrmt<?php echo $ii; ?> Hint').show();" <?php if ($options['trPostType'] == 'I') { echo 'disabled="disabled"'; } ?> /><br/> <?php nxs_doShowHint("apTRTMsgFrmt" . $ii); ?> </div> <input type="radio" name="tr[<?php echo $ii; ?> ][apTRPostType]" value="I" <?php if ($options['trPostType'] == 'I') { echo 'checked="checked"'; } ?> onchange="nxs_TRSetEnable('I','<?php echo $ii; ?> ');"/> Image Post <i>Don't forget to change default "Post Text Format" to prevent duplicate images.</i><br/> <div style="width:100%; margin-left: 15px;"> <strong>Clickthrough URL:</strong> <p style="margin-bottom: 20px;margin-top: 5px;"> <input type="radio" name="tr[<?php echo $ii; ?> ][cImgURL]" value="R" <?php if (!isset($options['cImgURL']) || $options['cImgURL'] == '' || $options['cImgURL'] == 'R') { echo 'checked="checked"'; } ?> /> Regular Post URL <input type="radio" name="tr[<?php echo $ii; ?> ][cImgURL]" value="S" <?php if ($options['cImgURL'] == 'S') { echo 'checked="checked"'; } ?> /> Shortened Post URL <input type="radio" name="tr[<?php echo $ii; ?> ][cImgURL]" value="N" <?php if ($options['cImgURL'] == 'N') { echo 'checked="checked"'; } ?> /> No Clickthrough URL </p><strong>Defailt Image to Post:</strong> <p style="font-size: 11px; margin: 0px;">If your post is missing "Featured Image" and doesn't have any images in the text body this will be used instead.</p> </div><input name="tr[<?php echo $ii; ?> ][apTRDefImg]" id="apTRDefImg<?php echo $ii; ?> " style=" margin-left: 15px; width: 30%;" <?php if ($options['trPostType'] != 'I') { echo 'disabled="disabled"'; } ?> value="<?php _e(apply_filters('format_to_edit', htmlentities($options['trDefImg'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/> <input type="radio" name="tr[<?php echo $ii; ?> ][apTRPostType]" value="U" <?php if ($options['trPostType'] == 'U') { echo 'checked="checked"'; } ?> /> Audio Post<br/> <input type="radio" name="tr[<?php echo $ii; ?> ][apTRPostType]" value="V" <?php if ($options['trPostType'] == 'V') { echo 'checked="checked"'; } ?> /> Video Post<br/> <i style="">Tip: Your post must contain link to Audio or Video file if you select "Audio Post" or "Video Post" , otherwise it will reverted to the "Text Post"</i> <br/><br/> </div> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'nxs_snap'); ?> :</strong> (<a href="#" id="apTRMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apTRMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a>) </div> <textarea cols="150" rows="3" id="tr<?php echo $ii; ?> SNAPformat" name="tr[<?php echo $ii; ?> ][apTRMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#tr<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apTRMsgFrmt<?php echo $ii; ?> ');"><?php if ($options['trMsgFormat'] != '') { _e(apply_filters('format_to_edit', htmlentities($options['trMsgFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } else { echo htmlentities("<p>New Post has been published on %URL%</p>\r\n<blockquote><p><strong>%TITLE%</strong></p>\r\n<p><img src=\"%IMG%\"/></p><p>%FULLTEXT%</p></blockquote>"); } ?> </textarea> <br/> <?php nxs_doShowHint("apTRMsgFrmt" . $ii); ?> <p style="margin-bottom: 20px;margin-top: 5px;"> <input value="1" type="checkbox" name="tr[<?php echo $ii; ?> ][fillSrcURL]" <?php if ((int) $options['fillSrcURL'] == 1) { echo "checked"; } ?> /> <strong>Fill "Source URL"</strong> Will fill Tumblr's "Source URL" with post URL or defined URL. <br/><input value="1" type="checkbox" name="tr[<?php echo $ii; ?> ][useOrDate]" <?php if ((int) $options['useOrDate'] == 1) { echo "checked"; } ?> /> <strong>Keep Original Post Date</strong> Will post to Tumblr with original date of the post <br/><input value="1" type="checkbox" name="tr[<?php echo $ii; ?> ][trInclTags]" <?php if ((int) $options['trInclTags'] == 1) { echo "checked"; } ?> /> <strong>Post with tags.</strong> Tags from the blogpost will be auto posted to Tumblr <br/><input value="1" type="checkbox" name="tr[<?php echo $ii; ?> ][trInclCats]" <?php if ((int) $options['trInclCats'] == 1) { echo "checked"; } ?> /> <strong>Post categories as tags.</strong> Categories from the blogpost will be auto posted to Tumblr as tags </p> <?php if ($options['trConsSec'] == '') { ?> <b>Authorize Your Tumblr Account</b>. Please save your settings and come back here to Authorize your account. <?php } else { if (isset($options['trAccessTocken']) && isset($options['trAccessTocken']['oauth_token_secret']) && $options['trAccessTocken']['oauth_token_secret'] !== '') { ?> Your Tumblr Account has been authorized. Blog ID: <?php _e(apply_filters('format_to_edit', htmlentities($options['trPgID'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> . You can Re- <?php } ?> <a href="<?php echo $nxs_snapSetPgURL . (stripos($nxs_snapSetPgURL, '?') !== false ? '&' : '?'); ?> auth=tr&acc=<?php echo $ii; ?> ">Authorize Your Tumblr Account</a> <?php if (!isset($options['trOAuthTokenSecret']) || $options['trOAuthTokenSecret'] == '') { ?> <div class="blnkg"><=== Authorize your account ===</div> <?php } ?> <?php } ?> <?php if (isset($options['trOAuthTokenSecret']) && $options['trOAuthTokenSecret'] != '') { ?> <br/><br/><b><?php _e('Test your settings', 'nxs_snap'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('TR', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'nxs_snap'), $nType); ?> </a> <br/><br/> <?php } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX 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 }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } ?> <div id="doDL<?php echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { echo " clNewNTSets"; } ?> " style="max-width: 1000px; background-color: #EBF4FB; margin: 10px; border: 1px solid #808080; padding: 10px; display:none;"> <input type="hidden" name="apDoSDL<?php echo $ii; ?> " value="0" id="apDoSDL<?php echo $ii; ?> " /> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/dl16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-delicious-social-networks-auto-poster-wordpress/"><?php $nType = "Delicious"; printf(__('Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?> </a></div> <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?> </i> </div><input name="dl[<?php echo $ii; ?> ][nName]" id="dlnName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /><br/> <?php echo nxs_addQTranslSel('dl', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><strong>Delicious Username:</strong> </div><input name="dl[<?php echo $ii; ?> ][apDLUName]" id="apDLUName" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['dlUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <div style="width:100%;"><strong>Delicious Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="dl[<?php echo $ii; ?> ][apDLPass]" id="apDLPass" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['dlPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($options['dlPass'], 5)) : $options['dlPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <br/> <?php if ($isNew) { ?> <input type="hidden" name="dl[<?php echo $ii; ?> ][apDoDL]" value="1" id="apDoNewDL<?php echo $ii; ?> " /> <?php } ?> <br/> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?> </strong> (<a href="#" id="apDLTMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apDLTMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a>)</div> <input name="dl[<?php echo $ii; ?> ][apDLMsgTFrmt]" id="apDLMsgTFrmt" style="width: 50%;" value="<?php if ($isNew) { echo "%TITLE%"; } else { _e(apply_filters('format_to_edit', htmlentities($options['dlMsgTFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); } ?> " onfocus="mxs_showFrmtInfo('apDLTMsgFrmt<?php echo $ii; ?> ');" /><?php nxs_doShowHint("apDLTMsgFrmt" . $ii); ?> </div> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?> </strong> (<a href="#" id="apDLMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apDLMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a>)</div> <textarea cols="150" rows="3" id="di<?php echo $ii; ?> SNAPformat" name="dl[<?php echo $ii; ?> ][apDLMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#dl<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apDLMsgFrmt<?php echo $ii; ?> ');"><?php if ($isNew) { echo "%EXCERPT%"; } else { _e(apply_filters('format_to_edit', htmlentities($options['dlMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); } ?> </textarea> <?php nxs_doShowHint("apDLMsgFrmt" . $ii); ?> </div><br/> <?php if ($options['dlPass'] != '') { ?> <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('DL', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?> </a> <?php } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?> " /></div></div><?php }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl, $nxs_snapSetPgURL; $ntInfo = $this->ntInfo; $nt = $ntInfo['lcode']; $ntU = $ntInfo['code']; if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } if (!isset($options['setID'])) { $options['setID'] = ''; } if (!isset($options['appKey'])) { $options['appKey'] = ''; } if (!isset($options['appSec'])) { $options['appSec'] = ''; } ?> <div id="do<?php echo $ntU; echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { echo " clNewNTSets"; } ?> "> <input type="hidden" value="0" id="apDoS<?php echo $ntU . $ii; ?> " /> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/<?php echo $nt; ?> 16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/instructions/flickr-social-networks-auto-poster-setup-installation/"><?php $nType = $ntInfo['name']; printf(__('Detailed %s Installation/Configuration Instructions', 'nxs_snap'), $nType); ?> </a></div> <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="<?php echo $nt; ?> [<?php echo $ii; ?> ][nName]" id="apnName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><br/> <?php echo nxs_addQTranslSel($nt, $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'nxs_snap'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'nxs_snap'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><strong><?php echo $nType; ?> Consumer Key:</strong> </div><input name="<?php echo $nt; ?> [<?php echo $ii; ?> ][appKey]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['appKey'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%;"><strong><?php echo $nType; ?> Consumer Secret:</strong> </div><input name="<?php echo $nt; ?> [<?php echo $ii; ?> ][appSec]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['appSec'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/> <div style="width:100%;"><strong><?php echo $nType; ?> Set ID (Optional):</strong> </div><input name="<?php echo $nt; ?> [<?php echo $ii; ?> ][setID]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['setID'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/> <br/> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'nxs_snap'); ?> :</strong> (<a href="#" id="msgFrmtT<?php echo $ntU . $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('msgFrmtT<?php echo $ntU . $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a>)</div> <input name="<?php echo $nt; ?> [<?php echo $ii; ?> ][msgTFrmt]" style="width: 50%;" value="<?php if (!empty($options['msgTFrmt'])) { _e(apply_filters('format_to_edit', htmlentities($options['msgTFrmt'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } else { echo "%TITLE%"; } ?> " onfocus="mxs_showFrmtInfo('msgFrmtT<?php echo $ntU . $ii; ?> ');" /><?php nxs_doShowHint("msgFrmtT" . $ntU . $ii); ?> <br/> <div id="altFormat" style="margin-left: 0px;"> <div style="width:100%;"><strong id="altFormatText"><?php _e('Text Format', 'nxs_snap'); ?> :</strong> (<a href="#" id="msgFrmt<?php echo $ntU; echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('msgFrmt<?php echo $ntU; echo $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a>) </div> <textarea cols="150" rows="3" id="<?php echo $nt; echo $ii; ?> msgFrmt" name="<?php echo $nt; ?> [<?php echo $ii; ?> ][msgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#<?php echo $nt; echo $ii; ?> msgFrmt').attr('rows', 6); mxs_showFrmtInfo('msgFrmt<?php echo $ntU . $ii; ?> ');"><?php if ($isNew) { _e("%EXCERPT% \r\n\r\n%URL%", 'nxs_snap'); } else { _e(apply_filters('format_to_edit', htmlentities($options['msgFrmt'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } ?> </textarea><?php nxs_doShowHint("msgFrmt" . $ntU . $ii); ?> </div> <p style="margin-bottom: 20px;margin-top: 5px;"><input value="1" type="checkbox" name="<?php echo $nt; ?> [<?php echo $ii; ?> ][inclTags]" <?php if ((int) $options['inclTags'] == 1) { echo "checked"; } ?> /> <strong><?php _e('Post with tags', 'nxs_snap'); ?> </strong> <?php _e('Tags from the blogpost will be auto-posted to ' . $ntInfo['name'], 'nxs_snap'); ?> </p> <div style="width:100%;"><strong>Default Image to use:</strong> <p style="font-size: 11px; margin: 0px;">If your post does not have any images this will be used instead.</p> </div><input name="<?php echo $nt; ?> [<?php echo $ii; ?> ][defImg]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['defImg'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/><br/> <?php if ($options['appKey'] == '') { ?> <b><?php _e('Authorize Your ' . $ntInfo['name'] . ' Account', 'nxs_snap'); ?> </b> <?php _e('Please click "Update Settings" to be able to Authorize your account.', 'nxs_snap'); ?> <?php } else { if (isset($options['appAppUserID']) && $options['appAppUserID'] > 0) { ?> <?php _e('Your ' . $ntInfo['name'] . ' 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'); ?> . <?php _e('You can', 'nxs_snap'); ?> Re- <?php } ?> <a href="<?php echo $nxs_snapSetPgURL . (stripos($nxs_snapSetPgURL, '?') !== false ? '&' : '?'); ?> auth=<?php echo $nt; ?> &acc=<?php echo $ii; ?> ">Authorize Your <?php echo $ntInfo['name']; ?> Account</a> <?php if (!isset($options['appAppUserID']) || $options['appAppUserID'] < 1) { ?> <div class="blnkg"><=== <?php _e('Authorize your account', 'nxs_snap'); ?> ===</div> <?php } ?> <?php } ?> <br/><br/> <?php if ($isNew) { ?> <input type="hidden" name="<?php echo $nt; ?> [<?php echo $ii; ?> ][apDo<?php echo $ntU; ?> ]" value="1" id="apDoNew<?php echo $ntU; echo $ii; ?> " /> <?php } ?> <?php if (isset($options['appAppUserID']) && $options['appAppUserID'] > 0) { ?> <b><?php _e('Test your settings', 'nxs_snap'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('<?php echo $ntU; ?> ', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'nxs_snap'), $nType); ?> </a> <?php } ?> </div> <?php /* ######################## Tools Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX 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 }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl, $nxs_snapSetPgURL; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['liOK'])) { $options['liOK'] = ''; } if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } if (!isset($options['liMsgAFrmt'])) { $options['liMsgAFrmt'] = ''; } ?> <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; ?> " /> <?php if ($isNew) { ?> <input type="hidden" name="li[<?php echo $ii; ?> ][apDoLI]" value="1" id="apDoNewLI<?php echo $ii; ?> " /> <?php } ?> <div id="doLI<?php echo $ii; ?> Div" style="margin-left: 10px;"> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/li16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-linkedin-social-networks-auto-poster-wordpress/"><?php $nType = "LinkedIn"; printf(__('Detailed %s Installation/Configuration Instructions', 'nxs_snap'), $nType); ?> </a></div> <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="li[<?php echo $ii; ?> ][nName]" id="linName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><br/> <?php echo nxs_addQTranslSel('li', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'nxs_snap'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'nxs_snap'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <table width="800" border="0" cellpadding="10"> <tr><td colspan="2"> <div style="width:100%; text-align: center; color:#005800; font-weight: bold; font-size: 14px;">You can choose what API you would like to use. </div> </td></tr> <tr><td valign="top" width="50%" style="border-right: 1px solid #999;"> <span style="color:#005800; font-weight: bold; font-size: 14px;">LinkedIn Native API:</span> Free built-in API from LinkedIn. Can be used for posting to your profile only. More secure, more stable. More complicated - requires LinkedIn App and authorization. <a target="_blank" href="http://www.nextscripts.com/setup-installation-linkedin-social-networks-auto-poster-wordpress/">LinkedIn Installation/configuration instructions</a><br/><br/> <div class="subDiv" id="sub<?php echo $ii; ?> DivL" style="display: block;"> <div style="width:100%;"><strong>Your LinkedIn API Key:</strong> </div><input name="li[<?php echo $ii; ?> ][apLIAPIKey]" id="apLIAPIKey" style="width: 70%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['liAPIKey'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%;"><strong>Your LinkedIn API Secret:</strong> </div><input name="li[<?php echo $ii; ?> ][apLIAPISec]" id="apLIAPISec" style="width: 70%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['liAPISec'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/><br/><div style="width:100%;"><strong>Your LinkedIn Group ID:</strong><br/> Fill only if you are posting to LinkedIn Group. Leave empty to post to your profile. </div><input name="li[<?php echo $ii; ?> ][grpID]" id="" style="width: 70%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['grpID'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/><br/> <?php if ($options['liAPIKey'] == '') { ?> <b>Authorize Your LinkedIn Account</b>. Please save your settings and come back here to Authorize your account. <?php } else { if (isset($options['liAccessToken']) && isset($options['liAccessTokenSecret']) && $options['liAccessTokenSecret'] !== '') { ?> Your LinkedIn Account has been authorized. <br/>User ID: <?php _e(apply_filters('format_to_edit', $options['liUserInfo']), 'nxs_snap'); ?> . <br/>You can Re- <?php } ?> <?php if (class_exists("cl_nxsAutoPostToSN")) { ?> <a href="https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=<?php echo trim($options['liAPIKey']); ?> &scope=r_basicprofile+r_emailaddress+rw_nus+rw_groups&state=<?php echo 'nxs-li-' . $ii; ?> &redirect_uri=<?php echo trim(urlencode($nxs_snapSetPgURL)); ?> ">Authorize Your LinkedIn Account</a> <?php } else { ?> <a href="<?php echo $nxs_snapSetPgURL; ?> &auth=li&acc=<?php echo $ii; ?> ">Authorize Your LinkedIn Account</a> <?php } ?> <?php if (!isset($options['liAccessTokenSecret']) || $options['liAccessTokenSecret'] == '') { ?> <div class="blnkg"><=== Authorize your account ===</div> <?php } ?> <?php } ?> </div> </td><td valign="top" width="50%"> <span style="color:#005800; font-weight: bold; font-size: 14px;">NextScripts LinkedIn API:</span> Premium API with extended functionality. Can be used for posting to your profile, <b>group page</b> or <b>company page</b>. Less secure - requires your password. Use it only if you need to post to your LinkedIn Company Page.<br/><br/> <?php if (function_exists("doConnectToLinkedIn")) { ?> <div class="subDiv" id="sub<?php echo $ii; ?> DivN" style="display: block;"> <div style="width:100%;"><strong>Your LinkedIn Page URL:</strong> Could be your company page or group page. Leave empty to post to your own profile.</div><input name="li[<?php echo $ii; ?> ][uPage]" id="liuPage" style="width: 90%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['uPage'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/> <div style="width:100%;"><strong>Your LinkedIn Username/Email:</strong> </div><input name="li[<?php echo $ii; ?> ][ulName]" id="liulName" style="width: 70%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['ulName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%;"><strong>Your LinkedIn Password:</strong> </div><input type="password" name="li[<?php echo $ii; ?> ][uPass]" id="liuPass" style="width: 75%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['uPass'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> </div> <?php } else { ?> You can get NextScripts LinkedIn API <a target="_blank" href="http://www.nextscripts.com/linkedin-api-automated-posting/"><b>here</b></a>. <?php } ?> </td></tr></table> <br/><br/> <div id="altFormat"> <div style="width:100%;"><strong id="altFormatText"><?php _e('Message text Format', 'nxs_snap'); ?> :</strong> </div> <textarea cols="150" rows="3" id="li<?php echo $ii; ?> SNAPformat" name="li[<?php echo $ii; ?> ][apLIMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#li<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apLIMsgFrmt<?php echo $ii; ?> ');"><?php _e(apply_filters('format_to_edit', htmlentities($options['liMsgFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> </textarea> <?php nxs_doShowHint("apIPMsgFrmt" . $ii); ?> </div> <p style="margin: 0px;"><input value="1" id="apLIAttch" onchange="doShowHideAltFormat();" type="checkbox" name="li[<?php echo $ii; ?> ][apLIAttch]" <?php if ((int) $options['liAttch'] == 1) { echo "checked"; } ?> /> <strong>Publish Posts to LinkedIn as an Attachment</strong> </p> <div style="margin-left: 10px;"> <strong><?php _e('Attachment Text Format', 'nxs_snap'); ?> :</strong><br/> <input value="1" id="apLIMsgAFrmtA<?php echo $ii; ?> " <?php if (trim($options['liMsgAFrmt']) == '') { echo "checked"; } ?> onchange="if (jQuery(this).is(':checked')) { jQuery('#apLIMsgAFrmtDiv<?php echo $ii; ?> ').hide(); jQuery('#apLIMsgAFrmt<?php echo $ii; ?> ').val(''); }else jQuery('#apLIMsgAFrmtDiv<?php echo $ii; ?> ').show();" type="checkbox" name="li[<?php echo $ii; ?> ][apLIMsgAFrmtA]"/> <strong><?php _e('Auto', 'nxs_snap'); ?> </strong> <i> - <?php _e('Recommended. Info from SEO Plugins will be used, then post excerpt, then post text', 'nxs_snap'); ?> </i><br/> <div id="apLIMsgAFrmtDiv<?php echo $ii; ?> " style="<?php if ($options['liMsgAFrmt'] == '') { echo "display:none;"; } ?> " > <?php _e('Set your own format', 'nxs_snap'); ?> :<input name="li[<?php echo $ii; ?> ][apLIMsgAFrmt]" id="apLIMsgAFrmt<?php echo $ii; ?> " style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['liMsgAFrmt'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><br/></div> </div> <br/> <div id="altFormat"> <div style="width:100%;"><strong id="altFormatText"><?php _e('Message title Format (Groups Only)', 'nxs_snap'); ?> :</strong> </div> <input name="li[<?php echo $ii; ?> ][apLIMsgFrmtT]" id="li<?php echo $ii; ?> SNAPformatT" style="width: 50%;" value="<?php if ($isNew) { echo "New Post - %TITLE%"; } else { _e(apply_filters('format_to_edit', htmlentities($options['liMsgFormatT'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } ?> " onfocus="mxs_showFrmtInfo('apLIMsgFrmtT<?php echo $ii; ?> ');" /><?php nxs_doShowHint("apIPMsgFrmt" . $ii); ?> </div> <br/> <?php if ($options['liAPIKey'] != '' || isset($options['uPass']) && $options['uPass'] != '') { ?> <br/><b><?php _e('Test your settings', 'nxs_snap'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('LI', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'nxs_snap'), $nType); ?> </a> <?php if (!isset($options['liOK']) || $options['liOK'] == '') { ?> <div class="blnkg"><=== Click "Test" to finish setup ===</div> <?php } ?> <br/><?php } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX 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> </div> <?php }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); 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'] = ''; } if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } if (!isset($options['uName'])) { $options['uName'] = ''; } if (!isset($options['postType'])) { $options['postType'] = ''; } ?> <div id="doVK<?php echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { echo " clNewNTSets"; } ?> " style="background-image: url(<?php echo $nxs_plurl; ?> img/vk-bg.png); background-position:90% 10%;"> <input type="hidden" name="apDoSVK<?php echo $ii; ?> " value="0" id="apDoSVK<?php echo $ii; ?> " /> <?php if ($isNew) { ?> <input type="hidden" name="vk[<?php echo $ii; ?> ][apDoVK]" value="1" id="apDoNewVK<?php echo $ii; ?> " /> <?php } ?> <div class="nsx_iconedTitle" style="float: right; max-width: 322px; text-align: right; background-image: url(<?php echo $nxs_plurl; ?> img/vk16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-vkontakte-social-networks-auto-poster-wordpress/"><?php $nType = "vKontakte"; printf(__('Detailed %s Installation/Configuration Instructions', 'nxs_snap'), $nType); ?> </a><br/> <span style="font-size: 10px;">Please use URL <em style="font-size: 10px; color:#CB4B16;">http://<?php echo $_SERVER["SERVER_NAME"]; ?> </em> and domain <em style="font-size: 10px; color:#CB4B16;"><?php echo $_SERVER["SERVER_NAME"]; ?> </em> in your vKontakte(VK) App</span> </div> <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="vk[<?php echo $ii; ?> ][nName]" id="vknName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><br/> <?php echo nxs_addQTranslSel('vk', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'nxs_snap'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'nxs_snap'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><strong>vKontakte(VK) URL:</strong> </div> <p style="font-size: 11px; margin: 0px;"><?php _e('Could be your vKontakte(VK) Profile or vKontakte(VK) Group Page', 'nxs_snap'); ?> </p> <input name="vk[<?php echo $ii; ?> ][url]" id="apurl" style="width: 50%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['url'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%; margin-top: 15px; margin-bottom: 5px;"><b style="font-size: 14px;" >VK API</b> <?php _e('(It could be used for "Text" and "Image" posts)', 'nxs_snap'); ?> </div> <div style="width:100%; margin-left: 15px;"> <div style="width:100%;"><strong>vKontakte(VK) Application ID:</strong> <a href="http://vk.com/editapp?act=create" target="_blank"><?php _e('[Create VK App]', 'nxs_snap'); ?> </a> <a href="http://vk.com/apps?act=settings" target="_blank"><?php _e('[Manage VK Apps]', 'nxs_snap'); ?> </a> </div> <input name="vk[<?php echo $ii; ?> ][apVKAppID]" id="apVKAppID" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['vkAppID'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/> <?php if ($options['vkAppID'] == '') { ?> <?php _e('<b>Authorize Your vKontakte(VK) Account</b>. Please click "Update Settings" to be able to Authorize your account.', 'nxs_snap'); ?> <?php } else { if (isset($options['vkAppAuthUser']) && $options['vkAppAuthUser'] > 0) { ?> <?php _e('Your vKontakte(VK) Account has been authorized.'); ?> User ID: <?php _e(apply_filters('format_to_edit', htmlentities($options['vkAppAuthUser'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> . <?php _e('You can', 'nxs_snap'); ?> Re- <?php } ?> <a target="_blank" href="http://api.vkontakte.ru/oauth/authorize?client_id=<?php echo $options['vkAppID']; ?> &scope=offline,wall,photos,pages&redirect_uri=http://api.vkontakte.ru/blank.html&display=page&response_type=token<?php '&auth=vk&acc=' . $ii; ?> ">Authorize Your vKontakte(VK) Account</a> <?php if (!isset($options['vkAppAuthUser']) || $options['vkAppAuthUser'] < 1) { ?> <div class="blnkg"><=== <?php _e('Authorize your account', 'nxs_snap'); ?> ===</div> <?php } ?> <div style="width:100%;"><strong>vKontakte(VK) Auth Response:</strong> </div><input name="vk[<?php echo $ii; ?> ][apVKAuthResp]" style="width: 50%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['apVKAuthResp'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><br/><br/> <?php } ?> </div> <div style="width:100%; margin-bottom: 5px;"><b style="font-size: 14px;" >NextScripts VK API</b> <?php _e('(It could be used for "Text with attached link" posts)', 'nxs_snap'); ?> </div> <div style="width:100%; margin-left: 15px;"> <?php if (function_exists("nxs_doPostToVK")) { ?> <div style="width:100%;"><strong>vKontakte(VK) Email:</strong> </div><input name="vk[<?php echo $ii; ?> ][uName]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['uName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%;"><strong>vKontakte(VK) Password:</strong> </div><input name="vk[<?php echo $ii; ?> ][uPass]" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['uPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($options['uPass'], 5)) : $options['uPass'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <?php if (isset($options['vkPhReq'])) { if (empty($options['vkPh'])) { $options['vkPh'] = ''; } ?> <div style="width:100%;"><strong>vKontakte(VK) Phone Number (<?php _e(apply_filters('format_to_edit', htmlentities($options['vkPhReq'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> ) :</strong> </div><input name="vk[<?php echo $ii; ?> ][vkPh]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['vkPh'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <?php } ?> <?php } else { ?> **** <?php _e('Please upgrade the plugin to "PRO" get NextScripts VK API', 'nxs_snap'); ?> <?php } ?> </div> <br/> <div id="altFormat"> <div style="width:100%;"><strong id="altFormatText"><?php _e('Message text Format', 'nxs_snap'); ?> :</strong> (<a href="#" id="msgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('msgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a>)</div> <textarea cols="150" rows="3" id="vkmsgFrmt<?php echo $ii; ?> " name="vk[<?php echo $ii; ?> ][msgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#vk<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('msgFrmt<?php echo $ii; ?> ');"><?php _e(apply_filters('format_to_edit', htmlentities($options['msgFrmt'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> </textarea> <?php nxs_doShowHint("msgFrmt" . $ii); ?> <br/> </div> <div > <input value="1" type="checkbox" name="vk[<?php echo $ii; ?> ][addBackLink]" <?php if (isset($options['addBackLink']) && (int) $options['addBackLink'] == 1) { echo "checked"; } ?> /> <?php _e('Add backlink to the post', 'nxs_snap'); ?> </div> <br/> <div style="width:100%;"><strong id="altFormatText">Post Type:</strong> <-- (<a id="showShAtt" onmouseout="hidePopShAtt('<?php echo $ii; ?> VKX');" onmouseover="showPopShAtt('<?php echo $ii; ?> VKX', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php _e('What\'s the difference?', 'nxs_snap'); ?> </a>) </div> <div style="margin-left: 10px;"> <input type="radio" name="vk[<?php echo $ii; ?> ][postType]" value="T" <?php if ($options['postType'] == 'T') { echo 'checked="checked"'; } ?> /> <?php _e('Text Post', 'nxs_snap'); ?> - <i><?php _e('just text message', 'nxs_snap'); ?> </i><br/> <input type="radio" name="vk[<?php echo $ii; ?> ][postType]" value="I" <?php if ($options['postType'] == 'I') { echo 'checked="checked"'; } ?> /> <?php _e('Image Post', 'nxs_snap'); ?> - <i><?php _e('big image with text message', 'nxs_snap'); ?> </i><br/> <input type="radio" <?php if (!function_exists("nxs_doPostToVK")) { ?> disabled="disabled" <?php } ?> name="vk[<?php echo $ii; ?> ][postType]" value="A" <?php if (!isset($options['postType']) || $options['postType'] == '' || $options['postType'] == 'A') { echo 'checked="checked"'; } ?> /> <span <?php if (!function_exists("nxs_doPostToVK")) { ?> style="color:#C0C0C0;"<?php } ?> ><?php _e('Text Post with "attached" link', 'nxs_snap'); ?> </span><br/> <?php if (function_exists("nxs_doPostToVK")) { ?> <div style="width:100%; margin-left: 15px;"><strong><?php _e('Link attachment type:', 'nxs_snap'); ?> </strong> <div style="margin-bottom: 5px; margin-left: 10px; "><input value="1" id="apattchAsVid" type="checkbox" name="vk[<?php echo $ii; ?> ][attchAsVid]" <?php if (isset($options['attchAsVid']) && (int) $options['attchAsVid'] == 1) { echo "checked"; } ?> /> <?php _e('<strong>If post has video use it as an attachment thumbnail.</strong> <i>Video will be used for an attachment thumbnail instead of featured image. Only Youtube is supported at this time.</i>', 'nxs_snap'); ?> <br/> </div> <strong><?php _e('Attachment Text Format:', 'nxs_snap'); ?> </strong><br/> <input value="1" id="apVKMsgAFrmtA<?php echo $ii; ?> " <?php if (trim($options['msgAFormat']) == '') { echo "checked"; } ?> onchange="if (jQuery(this).is(':checked')) { jQuery('#apVKMsgAFrmtDiv<?php echo $ii; ?> ').hide(); jQuery('#apVKMsgAFrmt<?php echo $ii; ?> ').val(''); }else jQuery('#apVKMsgAFrmtDiv<?php echo $ii; ?> ').show();" type="checkbox" name="vk[<?php echo $ii; ?> ][msgAFormat]"/> <strong><?php _e('Auto', 'nxs_snap'); ?> </strong> <i> - <?php _e('Recommended. Info from SEO Plugins will be used, then post excerpt, then post text', 'nxs_snap'); ?> </i><br/> <div id="apVKMsgAFrmtDiv<?php echo $ii; ?> " style="<?php if ($options['msgAFormat'] == '') { echo "display:none;"; } ?> " > <?php _e('Set your own format:', 'nxs_snap'); ?> <input name="vk[<?php echo $ii; ?> ][msgAFormat]" id="apVKMsgAFrmt<?php echo $ii; ?> " style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['msgAFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><br/></div> </div><br/> <?php } ?> </div><br/> <div class="popShAtt" style="z-index: 9999" id="popShAtt<?php echo $ii; ?> VKX"><h3>vKontakte(VK) Post Types</h3><img src="<?php echo $nxs_plurl; ?> img/vkPostTypesDiff6.png" width="600" height="257" alt="vKontakte(VK) Post Types"/></div> <?php if ($options['vkPgID'] != '') { ?> <div style="width:100%;"><strong>Your vKontakte(VK) Page ID:</strong> <?php _e(apply_filters('format_to_edit', htmlentities($options['vkPgID'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> </div><?php } ?> <?php if (isset($options['vkAppAuthUser']) && $options['vkAppAuthUser'] > 0) { ?> <br/><br/><b><?php _e('Test your settings', 'nxs_snap'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('VK','<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'nxs_snap'), $nType); ?> </a> <?php } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX 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 }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } ?> <div id="doKT<?php echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { ?> clNewNTSets<?php } ?> "> <input type="hidden" name="apDoSKT<?php echo $ii; ?> " value="0" id="apDoSKT<?php echo $ii; ?> " /> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/<?php echo $nt; ?> 16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/instructions/kippt-social-networks-auto-poster-setup-installation/"><?php $nType = "Kippt"; printf(__('Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?> </a></div> <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?> </i> </div><input name="<?php echo $nt; ?> [<?php echo $ii; ?> ][nName]" id="nName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /><br/> <?php echo nxs_addQTranslSel($nt, $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><strong><?php echo $nType; ?> Username:</strong> </div><input name="<?php echo $nt; ?> [<?php echo $ii; ?> ][uName]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['uName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <div style="width:100%;"><strong><?php echo $nType; ?> Token:</strong> <span style="font-size: 11px; margin: 0px;">Get it from <a target="_blank" href="http://developers.kippt.com/">developers.kippt.com</a>.</span></div><input name="<?php echo $nt; ?> [<?php echo $ii; ?> ][uPass]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['uPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($options['uPass'], 5)) : $options['uPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <br/> <div style="width:100%;"><strong><?php echo $nType; ?> List:</strong> </div><input name="<?php echo $nt; ?> [<?php echo $ii; ?> ][list]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['list'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <br/><br/> <?php if ($isNew) { ?> <input type="hidden" name="<?php echo $nt; ?> [<?php echo $ii; ?> ][apDo<?php echo $ntU; ?> ]" value="1" id="apDoNew<?php echo $ntU; echo $ii; ?> " /> <?php } ?> <br/> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong> (<a href="#" id="msgFrmtT<?php echo $ntU . $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('msgFrmtT<?php echo $ntU . $ii; ?> '); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a>)</div> <input name="<?php echo $nt; ?> [<?php echo $ii; ?> ][msgTFrmt]" style="width: 50%;" value="<?php if (!empty($options['msgTFrmt'])) { _e(apply_filters('format_to_edit', htmlentities($options['msgTFrmt'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); } else { echo "%TITLE%"; } ?> " onfocus="mxs_showFrmtInfo('msgFrmtT<?php echo $ntU . $ii; ?> ');" /><?php nxs_doShowHint("msgFrmtT" . $ntU . $ii); ?> <br/> <div id="altFormat" style="margin-left: 0px;"> <div style="width:100%;"><strong id="altFormatText"><?php _e('Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong> (<a href="#" id="msgFrmt<?php echo $ntU; echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('msgFrmt<?php echo $ntU; echo $ii; ?> '); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a>) </div> <textarea cols="150" rows="3" id="<?php echo $nt; echo $ii; ?> msgFrmt" name="<?php echo $nt; ?> [<?php echo $ii; ?> ][msgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#<?php echo $nt; echo $ii; ?> msgFrmt').attr('rows', 6); mxs_showFrmtInfo('msgFrmt<?php echo $ntU . $ii; ?> ');"><?php if ($isNew) { _e("%EXCERPT%", 'social-networks-auto-poster-facebook-twitter-g'); } else { _e(apply_filters('format_to_edit', htmlentities($options['msgFrmt'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); } ?> </textarea><?php nxs_doShowHint("msgFrmt" . $ntU . $ii); ?> </div> <?php if ($options['uPass'] != '') { ?> <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('<?php echo $ntU; ?> ', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?> </a> <?php } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submit nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?> " /></div> </div><?php }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl, $nxs_snapSetPgURL; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } if (!isset($options['attchImg'])) { $options['attchImg'] = ''; } if (!isset($options['appID'])) { $options['appID'] = ''; } if (!isset($options['appSec'])) { $options['appSec'] = ''; } ?> <div id="doAP<?php echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { echo " clNewNTSets"; } ?> "> <input type="hidden" value="0" id="apDoS<?php echo $ntU . $ii; ?> " /> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/ap16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation/app-net-social-networks-auto-poster-wordpress/"><?php $nType = "App.Net"; printf(__('Detailed %s Installation/Configuration Instructions', 'nxs_snap'), $nType); ?> </a></div> <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="ap[<?php echo $ii; ?> ][nName]" id="apnName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><br/> <?php echo nxs_addQTranslSel('ap', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'nxs_snap'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'nxs_snap'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><strong>App.Net Client ID:</strong> </div><input name="ap[<?php echo $ii; ?> ][appID]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['appID'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%;"><strong>App.Net Client Secret:</strong> </div><input name="ap[<?php echo $ii; ?> ][appSec]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['appSec'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/> <br/> <div id="altFormat" style="margin-left: 0px;"> <div style="width:100%;"><strong id="altFormatText"><?php _e('Text Format', 'nxs_snap'); ?> :</strong> (<a href="#" id="apTextFormat<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apTextFormat<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a>) </div> <textarea cols="150" rows="3" id="ap<?php echo $ii; ?> SNAPformat" name="ap[<?php echo $ii; ?> ][apTextFormat]" style="width:51%;max-width: 650px;" onfocus="jQuery('#ap<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apAPMsgFrmt<?php echo $ii; ?> ');"><?php if ($isNew) { _e("New post (%TITLE%) has been published on %SITENAME% - %URL%", 'nxs_snap'); } else { _e(apply_filters('format_to_edit', htmlentities($options['apTextFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } ?> </textarea> <?php nxs_doShowHint("apTextFormat" . $ii); ?> </div> <p style="margin: 0px;"><input value="1" id="apAPAttch" type="checkbox" name="ap[<?php echo $ii; ?> ][attchImg]" <?php if ((int) $options['attchImg'] == 1) { echo "checked"; } ?> /> <strong><?php _e('Attach Image to App.net Post', 'nxs_snap'); ?> </strong></p> <br/><br/> <?php if ($options['appID'] == '') { ?> <b><?php _e('Authorize Your App.Net Account', 'nxs_snap'); ?> </b> <?php _e('Please click "Update Settings" to be able to Authorize your account.', 'nxs_snap'); ?> <?php } else { if (isset($options['appAppUserID']) && $options['appAppUserID'] > 0) { ?> <?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'); ?> . <?php _e('You can', 'nxs_snap'); ?> Re- <?php } ?> <a href="https://account.app.net/oauth/authenticate?client_id=<?php echo trim($options['appID']); ?> &response_type=code&redirect_uri=<?php echo trim(urlencode($nxs_snapSetPgURL) . '&state=ap-' . $ii . '&scope=stream+write_post+follow+messages+update_profile+files'); ?> ">Authorize Your App.Net Account</a> <?php if (!isset($options['appAppUserID']) || $options['appAppUserID'] < 1) { ?> <div class="blnkg"><=== <?php _e('Authorize your account', 'nxs_snap'); ?> ===</div> <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 } ?> <?php } ?> <br/> <?php if ($isNew) { ?> <input type="hidden" name="ap[<?php echo $ii; ?> ][apDoAP]" value="1" id="apDoNewAP<?php echo $ii; ?> " /> <?php } ?> <?php if (isset($options['appAppUserID']) && $options['appAppUserID'] > 0) { ?> <b><?php _e('Test your settings', 'nxs_snap'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('AP', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'nxs_snap'), $nType); ?> </a> <?php } ?> </div> <?php /* ######################## Tools Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX 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 }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } ?> <div id="doWP<?php echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { echo " clNewNTSets"; } ?> "> <input type="hidden" name="apDoSWP<?php echo $ii; ?> " value="0" id="apDoSWP<?php echo $ii; ?> " /> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/wp16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-wp-based-social-networks-auto-poster-wordpress/"><?php $nType = "Wordpress"; printf(__('Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?> </a></div> <?php if ($isNew) { ?> <br/>You can setup any Wordpress based blog with activated XML-RPC support (WP Admin->Settimgs->Writing->Remote Publishing->Check XML-RPC). Wordpress.com and Blog.com supported as well.<br/><br/> <?php } ?> <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?> </i> </div><input name="wp[<?php echo $ii; ?> ][nName]" id="wpnName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /><br/> <?php echo nxs_addQTranslSel('wp', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><strong>XMLRPC URL:</strong> </div><input name="wp[<?php echo $ii; ?> ][apWPURL]" id="apWPURL" style="width: 50%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['wpURL'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <p style="font-size: 11px; margin: 0px;">Usually its a URL of your Wordpress installation with /xmlrpc.php at the end.<br/> Please use <b style="color: #005800;">https://YourUserName.wordpress.com/xmlrpc.php</b> (replace YourUserName with your user name - for example <i style="color: #005800;">https://nextscripts.wordpress.com/xmlrpc.php</i>) for Wordpress.com blogs. <br/> Please use <b style="color: #005800;">http://YourUserName.blog.com/xmlrpc.php</b> (replace YourUserName with your user name - for example <i style="color: #005800;">http://nextscripts.blog.com/xmlrpc.php</i> for Blog.com blogs</p> <div style="width:100%;"><br/><strong>Blog Username:</strong> </div><input name="wp[<?php echo $ii; ?> ][apWPUName]" id="apWPUName" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['wpUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <div style="width:100%;"><strong>Blog Password:</strong> </div><input name="wp[<?php echo $ii; ?> ][apWPPass]" id="apWPPass" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['wpPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($options['wpPass'], 5)) : $options['wpPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <br/> <?php if ($isNew) { ?> <input type="hidden" name="wp[<?php echo $ii; ?> ][apDoWP]" value="1" id="apDoNewWP<?php echo $ii; ?> " /> <?php } ?> <br/> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?> </strong> (<a href="#" id="apWPMsgTFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apWPMsgTFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a>) </div> <input name="wp[<?php echo $ii; ?> ][apWPMsgTFrmt]" id="apWPMsgTFrmt" style="width: 50%;" onfocus="mxs_showFrmtInfo('apWPMsgTFrmt<?php echo $ii; ?> ');" value="<?php if ($isNew) { echo "%TITLE%"; } else { _e(apply_filters('format_to_edit', htmlentities($options['wpMsgTFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); } ?> " /> <?php nxs_doShowHint("apWPMsgTFrmt" . $ii); ?> </div> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?> </strong> (<a href="#" id="apWPMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apWPMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a>) </div> <textarea cols="150" rows="3" id="wp<?php echo $ii; ?> SNAPformat" name="wp[<?php echo $ii; ?> ][apWPMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#wp<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apWPMsgFrmt<?php echo $ii; ?> ');"><?php if ($isNew) { echo "%EXCERPT%"; } else { _e(apply_filters('format_to_edit', htmlentities($options['wpMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); } ?> </textarea> <?php nxs_doShowHint("apWPMsgFrmt" . $ii); ?> </div><br/> <?php if ($options['wpPass'] != '') { ?> <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('WP', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?> </a> <?php } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?> " /></div></div><?php }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl, $nxs_snapSetPgURL; $ntInfo = $this->ntInfo; $nt = $ntInfo['lcode']; $ntU = $ntInfo['code']; if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } if (!isset($options['mgzURL'])) { $options['mgzURL'] = ''; } ?> <div id="do<?php echo $ntU; echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { echo " clNewNTSets"; } ?> "> <input type="hidden" value="0" id="apDoS<?php echo $ntU . $ii; ?> " /> <?php if (!function_exists('doPostToFlipboard')) { nxs_show_noLibWrn('Flipboard API Library module NOT found.<br/><br/><span style="color:black;">Flipboard does not have a free native API for automated posts yet.</span><br/><br/><span style="font-size: 12px;color:black;">You need to have a special API Library Module to be able to publish your content to Flipboard.</span>'); echo "</div>"; return; } ?> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/<?php echo $nt; ?> 16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/instructions/flipboard-social-networks-auto-poster-setup-installation/"><?php $nType = $ntInfo['name']; printf(__('Detailed %s Installation/Configuration Instructions', 'nxs_snap'), $nType); ?> </a></div> <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="<?php echo $nt; ?> [<?php echo $ii; ?> ][nName]" id="apnName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><br/> <?php echo nxs_addQTranslSel($nt, $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'nxs_snap'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'nxs_snap'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><strong><?php echo $nType; ?> Login/Email:</strong> </div><input name="<?php echo $nt; ?> [<?php echo $ii; ?> ][uName]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['uName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%;"><strong><?php echo $nType; ?> Password:</strong> </div><input name="<?php echo $nt; ?> [<?php echo $ii; ?> ][uPass]" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['uPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($options['uPass'], 5)) : $options['uPass'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/> <div style="width:100%;"><strong><?php echo $nType; ?> Magazine URL:</strong> </div><input name="<?php echo $nt; ?> [<?php echo $ii; ?> ][mgzURL]" style="width: 60%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['mgzURL'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/> <br/> <div id="altFormat" style="margin-left: 0px;"> <div style="width:100%;"><strong id="altFormatText"><?php _e('Comment Text Format', 'nxs_snap'); ?> :</strong> (<a href="#" id="msgFrmt<?php echo $ntU; echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('msgFrmt<?php echo $ntU; echo $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a>) </div> <textarea cols="150" rows="3" id="<?php echo $nt; echo $ii; ?> msgFrmt" name="<?php echo $nt; ?> [<?php echo $ii; ?> ][msgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#<?php echo $nt; echo $ii; ?> msgFrmt').attr('rows', 6); mxs_showFrmtInfo('msgFrmt<?php echo $ntU . $ii; ?> ');"><?php if ($isNew) { _e("%EXCERPT% \r\n\r\n%URL%", 'nxs_snap'); } else { _e(apply_filters('format_to_edit', htmlentities($options['msgFrmt'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } ?> </textarea><?php nxs_doShowHint("msgFrmt" . $ntU . $ii); ?> </div> <br/> <?php if ($isNew) { ?> <input type="hidden" name="<?php echo $nt; ?> [<?php echo $ii; ?> ][apDo<?php echo $ntU; ?> ]" value="1" id="apDoNew<?php echo $ntU; echo $ii; ?> " /> <?php } ?> <?php if (!empty($options['uPass'])) { ?> <b><?php _e('Test your settings', 'nxs_snap'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('<?php echo $ntU; ?> ', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'nxs_snap'), $nType); ?> </a> <?php } ?> </div> <?php /* ######################## Tools Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX 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 }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl, $nxs_snapSetPgURL; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } if (!isset($options['attchImg'])) { $options['attchImg'] = ''; } ?> <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; ?> " /> <?php if ($isNew) { ?> <input type="hidden" name="pk[<?php echo $ii; ?> ][apDoPK]" value="1" id="apDoNewPK<?php echo $ii; ?> " /> <?php } ?> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/pk16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-plurk-social-networks-auto-poster-wordpress/"><?php $nType = "Plurk"; printf(__('Detailed %s Installation/Configuration Instructions', 'nxs_snap'), $nType); ?> </a></div> <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="pk[<?php echo $ii; ?> ][nName]" id="pknName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><br/> <?php echo nxs_addQTranslSel('pk', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'nxs_snap'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'nxs_snap'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><strong>Your Plurk URL:</strong> </div><input onchange="nxsPKURLVal(<?php echo $ii; ?> );" name="pk[<?php echo $ii; ?> ][apPKURL]" id="apPKURL<?php echo $ii; ?> " style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['pkURL'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><span style="color: #F00000;" id="apPKURLerr<?php echo $ii; ?> "></span> <div style="width:100%;"><strong>Your Plurk App Key:</strong> </div><input name="pk[<?php echo $ii; ?> ][apPKConsKey]" id="apPKConsKey" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['pkConsKey'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%;"><strong>Your Plurk App Secret:</strong> </div><input name="pk[<?php echo $ii; ?> ][apPKConsSec]" id="apPKConsSec" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['pkConsSec'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/><br/> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText">Plurk prefix:</strong> </div> <select name="pk[<?php echo $ii; ?> ][Cat]" id="pkCat<?php echo $ii; ?> "> <?php $pkCats = $this->pkCats(); if (isset($options['pkCat']) && $options['pkCat'] != '') { $pkCats = str_replace($options['pkCat'] . '"', $options['pkCat'] . '" selected="selected"', $pkCats); } echo $pkCats; ?> </select> </div> <br/> <p style="margin: 0px;"><input value="1" id="apLIAttch" type="checkbox" name="pk[<?php echo $ii; ?> ][attchImg]" <?php if ((int) $options['attchImg'] == 1) { echo "checked"; } ?> /> <strong>Attach Image to Plurk Post</strong></p> <br/> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'nxs_snap'); ?> :</strong> (<a href="#" id="apPKMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apPKMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a>) </div> <textarea cols="150" rows="3" id="pk<?php echo $ii; ?> SNAPformat" name="pk[<?php echo $ii; ?> ][apPKMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#pk<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apPKMsgFrmt<?php echo $ii; ?> ');"><?php if ($options['pkMsgFormat'] != '') { _e(apply_filters('format_to_edit', htmlentities($options['pkMsgFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } else { echo htmlentities("%TITLE% - %URL%"); } ?> </textarea> <br/> <?php nxs_doShowHint("apPKMsgFrmt" . $ii); ?> <br/> <?php if ($options['pkConsSec'] == '') { ?> <b>Authorize Your Plurk Account</b>. Please save your settings and come back here to Authorize your account. <?php } else { if (!empty($options['pkAccessTocken']) && $options['pkAccessTockenSec'] !== '') { ?> 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'); ?> . You can Re- <?php } ?> <a href="<?php echo $nxs_snapSetPgURL . (stripos($nxs_snapSetPgURL, '?') !== false ? '&' : '?'); ?> auth=pk&acc=<?php echo $ii; ?> ">Authorize Your Plurk Account</a> <?php if (!isset($options['pkOAuthTokenSecret']) || $options['pkOAuthTokenSecret'] == '') { ?> <div class="blnkg"><=== Authorize your account ===</div> <?php } ?> <?php } ?> <?php if (isset($options['pkOAuthTokenSecret']) && $options['pkOAuthTokenSecret'] != '') { ?> <br/><br/><b><?php _e('Test your settings', 'nxs_snap'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('PK', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'nxs_snap'), $nType); ?> </a> <br/><br/> <?php } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX 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 }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } if (!isset($options['grpID'])) { $options['grpID'] = ''; } if (!isset($options['attchImg'])) { $options['attchImg'] = ''; } if (!isset($options['attchImg'])) { $options['attchImg'] = ''; } ?> <div id="doFF<?php echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { echo " clNewNTSets"; } ?> " style="max-width: 1000px; background-color: #EBF4FB; margin: 10px; border: 1px solid #808080; padding: 10px; display:none;"> <input type="hidden" name="apDoSFF<?php echo $ii; ?> " value="0" id="apDoSFF<?php echo $ii; ?> " /> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/ff16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-FriendFeed-social-networks-auto-poster-wordpress/"><?php $nType = "FriendFeed"; printf(__('Detailed %s Installation/Configuration Instructions', 'nxs_snap'), $nType); ?> </a></div> <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="ff[<?php echo $ii; ?> ][nName]" id="ffnName<?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/> <?php echo nxs_addQTranslSel('ff', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'nxs_snap'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'nxs_snap'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><strong>FriendFeed nickname:</strong> <span style="font-size: 11px; margin: 0px;">Get it from <a target="_blank" href="https://friendfeed.com/account/api">https://friendfeed.com/account/api</a>.</span></div><input name="ff[<?php echo $ii; ?> ][apFFUName]" id="apFFUName" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['ffUName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%;"><strong>FriendFeed remote key:</strong> <span style="font-size: 11px; margin: 0px;">Get it from <a target="_blank" href="https://friendfeed.com/account/api">https://friendfeed.com/account/api</a>.</span> </div><input name="ff[<?php echo $ii; ?> ][apFFPass]" id="apFFPass" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['ffPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($options['ffPass'], 5)) : $options['ffPass'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/> <div style="width:100%;"><br/><strong>Group ID:</strong> [Optional] Please specify Group ID. <i>Use this <b>only</b> if you are posting NOT to your own feed. </i></div> <input name="ff[<?php echo $ii; ?> ][grpID]" id="grpID" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['grpID'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <?php if ($isNew) { ?> <input type="hidden" name="ff[<?php echo $ii; ?> ][apDoFF]" value="1" id="apDoNewFF<?php echo $ii; ?> " /> <?php } ?> <br/> <br/> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'nxs_snap'); ?> </strong> (<a href="#" id="apFFMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apFFMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a>)</div> <input name="ff[<?php echo $ii; ?> ][apFFMsgFrmt]" id="apFFMsgFrmt" style="width: 50%;" value="<?php if ($isNew) { echo "%TITLE% - %URL% %EXCERPT%"; } else { _e(apply_filters('format_to_edit', htmlentities($options['ffMsgFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } ?> " onfocus="mxs_showFrmtInfo('apFFMsgFrmt<?php echo $ii; ?> ');" /><?php nxs_doShowHint("apFFMsgFrmt" . $ii); ?> </div> <p style="margin: 0px;"><input value="1" id="apLIAttch" type="checkbox" name="ff[<?php echo $ii; ?> ][attchImg]" <?php if ((int) $options['attchImg'] == 1) { echo "checked"; } ?> /> <strong><?php _e('Attach Image to FriendFeed Post', 'nxs_snap'); ?> </strong></p> <br/> <?php if ($options['ffPass'] != '') { ?> <b><?php _e('Test your settings', 'nxs_snap'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('FF', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'nxs_snap'), $nType); ?> </a> <?php } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX 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 }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } if (!isset($options['gpCCatsList'])) { $options['gpCCatsList'] = ''; } ?> <div id="doGP<?php echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { echo " clNewNTSets"; } ?> " > <input type="hidden" name="apDoSGP<?php echo $ii; ?> " value="0" id="apDoSGP<?php echo $ii; ?> " /> <?php if (!class_exists('nxsAPI_GP') || defined('d1') && d1 == 1) { nxs_show_noLibWrn('Google+ API Library module NOT found.<br/><br/><span style="color:black;">Google+ does not have a free native API for automated posts yet. The current <a target="_blank" href="http://developers.google.com/+/api/">Google+ API</a> is "Read Only" and can\'t be used for posting.</span><br/><br/><span style="font-size: 12px;color:black;">You need to have a special API Library Module to be able to publish your content to Google+.</span>'); echo "</div>"; return; } ?> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/gp16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-google-plus-social-networks-auto-poster-wordpress/"><?php $nType = "Google+"; printf(__('Detailed %s Installation/Configuration Instructions', 'nxs_snap'), $nType); ?> </a></div> <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="gp[<?php echo $ii; ?> ][nName]" id="gpnName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><br/> <?php echo nxs_addQTranslSel('gp', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'nxs_snap'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'nxs_snap'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><strong>Google+ Login Email:</strong> </div><input name="gp[<?php echo $ii; ?> ][apGPUName]" id="apGPUName<?php echo $ii; ?> " style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['gpUName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%;"><strong>Google+ Password:</strong> </div><input name="gp[<?php echo $ii; ?> ][apGPPass]" id="apGPPass<?php echo $ii; ?> " type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['gpPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($options['gpPass'], 5)) : $options['gpPass'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/> <p><div style="width:100%;"><strong>Google+ Page ID (Optional - for Google+ Pages Only. <b style="color: #580000;"> <?php _e('Leave Empty to publish to your profile or community', 'nxs_snap'); ?> </b>):</strong> <p style="font-size: 11px; margin: 0px;">For example if URL of your page is https://plus.google.com/u/0/b/117008619877691455570/ your Page ID is: 117008619877691455570. <b><?php _e('Leave Empty to publish to your profile or community.', 'nxs_snap'); ?> </b></p> </div><input name="gp[<?php echo $ii; ?> ][apGPPage]" id="apGPPage" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['gpPageID'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/> <p><div style="width:100%;"><strong>Google+ Community ID (Optional - for Google+ Communities Only. <b style="color: #580000;"> <?php _e('Leave Empty to publish to your profile or page', 'nxs_snap'); ?> </b>):</strong> <p style="font-size: 11px; margin: 0px;">For example if URL of your Community is https://plus.google.com/communities/100396001601096060160 your Page ID is: 100396001601096060160. <b><?php _e('Leave Empty to publish to your profile or page', 'nxs_snap'); ?> .</b></p> </div><input name="gp[<?php echo $ii; ?> ][gpCommID]" id="gpCommID<?php echo $ii; ?> " style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['gpCommID'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <a href="#" onclick="getGPCats(jQuery('<?php if ($isNew) { echo "#nsx_addNT "; } ?> #apGPUName<?php echo $ii; ?> ').val(), jQuery('<?php if ($isNew) { echo "#nsx_addNT "; } ?> #apGPPass<?php echo $ii; ?> ').val(), '<?php echo $ii; ?> ', jQuery('<?php if ($isNew) { echo "#nsx_addNT "; } ?> #gpCommID<?php echo $ii; ?> ').val()); return false;"> <?php _e('Retrieve Categories and Page Names', 'nxs_snap'); ?> </a> <div style="padding-left: 15px; width:100%;"><strong>Community Category:</strong> <img id="gpLoadingImg<?php echo $ii; ?> " style="display: none;" src='<?php echo $nxs_plurl; ?> img/ajax-loader-sm.gif' /> <select name="gp[<?php echo $ii; ?> ][apGPCCats]" id="apGPCCats<?php echo $ii; ?> "> <?php if ($options['gpCCatsList'] != '') { $gGPCats = $options['gpCCatsList']; if (base64_encode(base64_decode($gGPCats)) === $gGPCats) { $gGPCats = base64_decode($gGPCats); } if ($options['gpCCat'] != '') { $gGPCats = str_replace($options['gpCCat'] . '"', $options['gpCCat'] . '" selected="selected"', $gGPCats); } echo $gGPCats; } else { ?> <option value="0">None(Click above to retrieve your categories)</option> <?php } ?> </select> </div> <br/><br/> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText"><?php _e('Message text Format', 'nxs_snap'); ?> :</strong> (<a href="#" id="apGPMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apGPMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a>) </div> <textarea cols="150" rows="3" id="gp<?php echo $ii; ?> SNAPformat" name="gp[<?php echo $ii; ?> ][apGPMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#gp<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apGPMsgFrmt<?php echo $ii; ?> ');"><?php if ($isNew) { _e("New post (%TITLE%) has been published on %SITENAME%", 'nxs_snap'); } else { _e(apply_filters('format_to_edit', htmlentities($options['gpMsgFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } ?> </textarea> <?php nxs_doShowHint("apGPMsgFrmt" . $ii); ?> </div><br/> <div style="width:100%;"><strong id="altFormatText">Post Type:</strong><-- (<a id="showShAtt" onmouseout="hidePopShAtt('<?php echo $ii; ?> XG');" onmouseover="showPopShAtt('<?php echo $ii; ?> XG', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php _e('What\'s the difference?', 'nxs_snap'); ?> </a>) </div> <div style="margin-left: 10px;"> <?php if (!isset($options['postType']) || $options['postType'] == '') { if ((int) $options['imgPost'] == 1) { $options['postType'] = 'I'; } if ((int) $options['gpAttch'] == 1 || $isNew) { $options['postType'] = 'A'; } } ?> <input type="radio" name="gp[<?php echo $ii; ?> ][postType]" value="T" <?php if ($options['postType'] == 'T') { echo 'checked="checked"'; } ?> /> <?php _e('Text Post', 'nxs_snap'); ?> - <i><?php _e('just text message', 'nxs_snap'); ?> </i><br/> <input type="radio" name="gp[<?php echo $ii; ?> ][postType]" value="I" <?php if ($options['postType'] == 'I') { echo 'checked="checked"'; } ?> /> <?php _e('Google+ Image Post', 'nxs_snap'); ?> - <i><?php _e('big image with text message', 'nxs_snap'); ?> </i><br/> <input type="radio" name="gp[<?php echo $ii; ?> ][postType]" value="A" <?php if (!isset($options['postType']) || $options['postType'] == '' || $options['postType'] == 'A') { echo 'checked="checked"'; } ?> /> <?php _e('Add blogpost to Google+ message as an attachment', 'nxs_snap'); ?> <br/> <div class="popShAtt" id="popShAtt<?php echo $ii; ?> XG"><h3><?php _e('Google+ Post Types', 'nxs_snap'); ?> </h3><img src="<?php echo $nxs_plurl; ?> img/gpPostTypesDiff6.png" width="600" height="285" alt="<?php _e('Google+ Post Types', 'nxs_snap'); ?> "/></div> </div><br/> <?php if ($isNew) { ?> <input type="hidden" name="gp[<?php echo $ii; ?> ][apDoGP]" value="1" id="apDoNewGP<?php echo $ii; ?> " /> <?php } ?> <?php if ($options['gpPass'] != '') { ?> <b><?php _e('Test your settings', 'nxs_snap'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('GP', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'nxs_snap'), $nType); ?> </a> <?php } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX 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 }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } if (!isset($options['commID'])) { $options['commID'] = ''; } ?> <div id="doLJ<?php echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { echo " clNewNTSets"; } ?> "> <input type="hidden" name="apDoSLJ<?php echo $ii; ?> " value="0" id="apDoSLJ<?php echo $ii; ?> " /> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/lj16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-livejournal-social-networks-auto-poster-for-wordpress/"><?php $nType = "LiveJournal"; printf(__('Detailed %s Installation/Configuration Instructions', 'nxs_snap'), $nType); ?> </a></div> <?php if ($isNew) { ?> <br/><?php _e('You can setup LiveJournal blog.', 'nxs_snap'); ?> <br/><br/> <?php } ?> <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="lj[<?php echo $ii; ?> ][nName]" id="ljnName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><br/> <?php echo nxs_addQTranslSel('lj', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'nxs_snap'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'nxs_snap'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><br/><strong>LiveJournal Username:</strong> </div><input name="lj[<?php echo $ii; ?> ][apLJUName]" id="apLJUName" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['ljUName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%;"><strong>LiveJournal Password:</strong> </div><input name="lj[<?php echo $ii; ?> ][apLJPass]" id="apLJPass" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['ljPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($options['ljPass'], 5)) : $options['ljPass'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/> <div style="width:100%;"><br/><strong>Blog/Community URL or ID:</strong> Please specify the Blog or Community URL or ID. <i>Use this only if you are posting NOT to your own journal. </i></div> <input name="lj[<?php echo $ii; ?> ][commID]" id="commID" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['commID'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%;"><br/><strong>Website:</strong> Please select your website. <i>SNAP could also post to other LJ Engine Based sites like DreamWidth.org </i></div> <select id="lj1delayHrs" name="lj[<?php echo $ii; ?> ][ljSrv]"><option <?php if (!isset($options['ljSrv']) || $options['ljSrv'] == '' || $options['ljSrv'] == 'LJ') { ?> selected="selected" <?php } ?> value="LJ">LiveJournal.com</option> <option <?php if (isset($options['ljSrv']) && $options['ljSrv'] == 'DW') { ?> selected="selected" <?php } ?> value="DW">DreamWidth.org</option> </select> <br/> <?php if ($isNew) { ?> <input type="hidden" name="lj[<?php echo $ii; ?> ][apDoLJ]" value="1" id="apDoNewLJ<?php echo $ii; ?> " /> <?php } ?> <br/><strong id="altFormatText"><?php _e('Post Title and Post Text Formats', 'nxs_snap'); ?> </strong> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'nxs_snap'); ?> </strong> (<a href="#" id="apLJMsgTFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apLJMsgTFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a>) </div><input name="lj[<?php echo $ii; ?> ][apLJMsgTFrmt]" id="apLJMsgTFrmt<?php echo $ii; ?> " style="width: 50%;" value="<?php if ($isNew) { echo "%TITLE%"; } else { _e(apply_filters('format_to_edit', htmlentities($options['ljMsgTFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } ?> " onfocus="mxs_showFrmtInfo('apLJMsgTFrmt<?php echo $ii; ?> ');" /><?php nxs_doShowHint("apLJMsgTFrmt" . $ii); ?> </div> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'nxs_snap'); ?> </strong> (<a href="#" id="apLJMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apLJMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a>) </div> <textarea cols="150" rows="3" id="lj<?php echo $ii; ?> SNAPformat" name="lj[<?php echo $ii; ?> ][apLJMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#lj<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apLJMsgFrmt<?php echo $ii; ?> ');"><?php if ($isNew) { echo "%FULLTEXT%"; } else { _e(apply_filters('format_to_edit', htmlentities($options['ljMsgFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } ?> </textarea> <?php nxs_doShowHint("apLJMsgFrmt" . $ii); ?> </div> <p style="margin-bottom: 20px;margin-top: 5px;"><input value="1" id="ljInclTags<?php echo $ii; ?> " type="checkbox" name="lj[<?php echo $ii; ?> ][inclTags]" <?php if ((int) $options['inclTags'] == 1) { echo "checked"; } ?> /> <strong><?php _e('Post with tags.', 'nxs_snap'); ?> </strong> <?php _e('Tags from the blogpost will be auto posted to LiveJournal', 'nxs_snap'); ?> </p><br/> <?php if ($options['ljPass'] != '') { ?> <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 } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX 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 }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } ?> <div id="doVB<?php echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { echo " clNewNTSets"; } ?> "> <input type="hidden" name="apDoSVB<?php echo $ii; ?> " value="0" id="apDoSVB<?php echo $ii; ?> " /> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/vb16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-vbulletin-social-networks-auto-poster-wordpress/"><?php $nType = "vBulletin"; printf(__('Detailed %s Installation/Configuration Instructions', 'nxs_snap'), $nType); ?> </a></div> <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="vb[<?php echo $ii; ?> ][nName]" id="vbnName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><br/> <?php echo nxs_addQTranslSel('vb', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'nxs_snap'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'nxs_snap'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText">vBulletin URL:</strong> <span style="font-size: 11px; margin: 0px;">Could be Forum URL or Thread URL. Either new thread of new post will be created.</span></div> <input name="vb[<?php echo $ii; ?> ][apVBURL]" id="apVBURL" style="width: 60%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['vbURL'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/> </div> <div style="width:100%;"><strong>vBulletin Username:</strong> </div><input name="vb[<?php echo $ii; ?> ][apVBUName]" id="apVBUName" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['vbUName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%;"><strong>vBulletin Password:</strong> </div><input name="vb[<?php echo $ii; ?> ][apVBPass]" id="apVBPass" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['vbPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($options['vbPass'], 5)) : $options['vbPass'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/> <?php if ($isNew) { ?> <input type="hidden" name="vb[<?php echo $ii; ?> ][apDoVB]" value="1" id="apDoNewVB<?php echo $ii; ?> " /> <?php } ?> <br/> <p style="margin-bottom: 20px;margin-top: 5px;"><input value="1" id="vbInclTags" type="checkbox" name="vb[<?php echo $ii; ?> ][vbInclTags]" <?php if ((int) $options['vbInclTags'] == 1) { echo "checked"; } ?> /> <strong>Post with tags</strong> Tags from the blogpost will be auto posted to vBulletin </p> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'nxs_snap'); ?> </strong> (<a href="#" id="apVBMsgTFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apVBMsgTFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a>)</div> <textarea cols="150" rows="3" id="vb<?php echo $ii; ?> SNAPformat" name="vb[<?php echo $ii; ?> ][apVBMsgTFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#vb<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apVBMsgTFrmt<?php echo $ii; ?> ');"><?php if ($isNew) { echo "%TITLE%"; } else { _e(apply_filters('format_to_edit', htmlentities($options['vbMsgTFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } ?> </textarea> <?php nxs_doShowHint("apVBMsgTFrmt" . $ii); ?> </div><br/> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'nxs_snap'); ?> </strong> (<a href="#" id="apVBMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apVBMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a>)</div> <input name="vb[<?php echo $ii; ?> ][apVBMsgFrmt]" id="apVBMsgFrmt" style="width: 50%;" value="<?php if ($isNew) { echo "%EXCERPT%"; } else { _e(apply_filters('format_to_edit', htmlentities($options['vbMsgFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } ?> " onfocus="mxs_showFrmtInfo('apVBMsgFrmt<?php echo $ii; ?> ');" /><?php nxs_doShowHint("apVBMsgFrmt" . $ii); ?> </div><br/> <?php if ($options['vbPass'] != '') { ?> <b><?php _e('Test your settings', 'nxs_snap'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('VB', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'nxs_snap'), $nType); ?> </a> <?php } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX 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 }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl, $plgn_NS_SNAutoPoster; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); $tmzFrmt = _x('Y-m-d G:i:s', 'timezone date format'); if (!isset($plgn_NS_SNAutoPoster)) { $gOptions = array(); } else { $gOptions = $plgn_NS_SNAutoPoster->nxs_options; } if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['riComments'])) { $options['riComments'] = ''; } if (!isset($options['riCommentsAA'])) { $options['riCommentsAA'] = ''; } if (!isset($options['riCommentsM'])) { $options['riCommentsM'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } ?> <div id="doTW<?php echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { echo " clNewNTSets"; } ?> " > <input type="hidden" name="apDoSTW<?php echo $ii; ?> " value="0" id="apDoSTW<?php echo $ii; ?> " /> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/tw16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-twitter-social-networks-auto-poster-wordpress/"><?php $nType = "Twitter"; printf(__('Detailed %s Installation/Configuration Instructions', 'nxs_snap'), $nType); ?> </a></div> <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 type="text" name="tw[<?php echo $ii; ?> ][nName]" id="twnName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><br/> <?php echo nxs_addQTranslSel('tw', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'nxs_snap'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'nxs_snap'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div class="nxs_tls_lbl"><strong>Your Twitter URL:</strong> </div><input type="text" name="tw[<?php echo $ii; ?> ][apTWURL]" id="apTWURL" style="width: 40%;border: 1px solid #ACACAC;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['twURL'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div class="nxs_tls_lbl"><strong>Your Twitter API Key:</strong> </div><input type="text" name="tw[<?php echo $ii; ?> ][apTWConsKey]" id="apTWConsKey" style="width: 40%; border: 1px solid #ACACAC;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['twConsKey'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div class="nxs_tls_lbl"><strong>Your Twitter API Secret:</strong> </div><input type="text" name="tw[<?php echo $ii; ?> ][apTWConsSec]" id="apTWConsSec" style="width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['twConsSec'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div class="nxs_tls_lbl"><strong>Your Access Token:</strong> </div><input type="text" name="tw[<?php echo $ii; ?> ][apTWAccToken]" id="apTWAccToken" style="width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['twAccToken'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div class="nxs_tls_lbl"><strong>Your Access Token Secret:</strong> </div><input type="text" name="tw[<?php echo $ii; ?> ][apTWAccTokenSec]" id="apTWAccTokenSec" style="width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['twAccTokenSec'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <?php if ($isNew) { ?> <input type="hidden" name="tw[<?php echo $ii; ?> ][apDoTW]" value="1" id="apDoNewTW<?php echo $ii; ?> " /> <?php } ?> <br/><br/> <p style="margin: 0px;"><input value="1" id="apLIAttch" type="checkbox" name="tw[<?php echo $ii; ?> ][attchImg]" <?php if ((int) $options['attchImg'] == 1) { echo "checked"; } ?> /> <strong><?php _e('Attach Image to Twitter Post', 'nxs_snap'); ?> </strong></p> <br/> <strong id="altFormatText"><?php _e('Message text Format', 'nxs_snap'); ?> :</strong><br/> <textarea cols="150" rows="3" id="tw<?php echo $ii; ?> SNAPformat" name="tw[<?php echo $ii; ?> ][apTWMsgFrmt]" style="width:51%;max-width: 610px;" onfocus="jQuery('#tw<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apTWMsgFrmt<?php echo $ii; ?> ');"><?php _e(apply_filters('format_to_edit', htmlentities($options['twMsgFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> </textarea> <?php nxs_doShowHint("apTWMsgFrmt" . $ii); ?> <?php nxs_doShowHint("apTWMsgFrmt" . $ii, '<br/><br/><b>%TAGS% and %CATS% will be posted as hashtags. <br/>Please remember that Twitter takes only 140 characters.</b>'); ?> <?php if ($options['twAccTokenSec'] != '') { ?> <br/><br/><b><?php _e('Test your settings', 'nxs_snap'); ?> :</b> <?php if (!isset($options['twOK']) || $options['twOK'] != '1') { ?> <div class="blnkg">=== Submit Test Post to Complete ===></div> <?php } ?> <a href="#" class="NXSButton" onclick="testPost('TW', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'nxs_snap'), $nType); ?> </a> <br/> <?php } ?> </div> <?php /* ######################## Tools Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?> <div class="nxs_tls_cpt"><?php _e('Auto Import of Replies and Mentions:', 'nxs_snap'); ?> </div> <div class="nxs_tls_bd"> <div class="nxs_tls_sbInfo"><?php _e('Plugin could grab Replies and Mentions from Twitter and import them as Wordpress Comments', 'nxs_snap'); ?> </div> <?php if (!empty($gOptions['riActive']) && $gOptions['riActive'] == '1') { ?> <input value="1" id="riC<?php echo $ii; ?> " <?php if (trim($options['riComments']) == '1') { echo "checked"; } ?> type="checkbox" name="<?php echo $nt; ?> [<?php echo $ii; ?> ][riComments]"/> <b><?php _e('Import Twitter Replies', 'nxs_snap'); ?> </b> <br/> <input value="1" id="riCM<?php echo $ii; ?> " <?php if (trim($options['riCommentsM']) == '1') { echo "checked"; } ?> type="checkbox" name="<?php echo $nt; ?> [<?php echo $ii; ?> ][riCommentsM]"/> <b><?php _e('Import Twitter Mentions', 'nxs_snap'); ?> </b> <br/> <input value="1" id="riCA<?php echo $ii; ?> " <?php if (trim($options['riCommentsAA']) == '1') { echo "checked"; } ?> type="checkbox" name="<?php echo $nt; ?> [<?php echo $ii; ?> ][riCommentsAA]"/> <b><?php _e('Auto-approve imported comments', 'nxs_snap'); ?> </b> <?php } else { echo "<br/>"; _e('Please activate the "Comments Import" from SNAP Settings Tab', 'nxs_snap'); } ?> </div> <?php nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> </div><br/> <div class="submitX nxclear" style="padding-bottom: 0px;"> <input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap'); ?> " /> <?php /* <input type="button" id="svBtn<?php echo $nt.$ii ?>" onclick="nxs_svSet('<?php echo $nt; ?>', '<?php echo $ii; ?>')" class="button-primary" value="<?php _e('Update Settings', 'nxs_snap') ?>" /> <div id="nxsSaveLoadingImg<?php echo $nt.$ii; ?>" class="doneMsg">Saving.....</div> <div id="doneMsg<?php echo $nt.$ii; ?>" class="doneMsg">Done</div> */ ?> </div> </div> <?php }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } ?> <div id="doDA<?php echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { echo " clNewNTSets"; } ?> "> <input type="hidden" value="0" id="apDoS<?php echo $ntU . $ii; ?> " /> <div style="color:red;padding:5px;margin:5px; border: 1px solid darkred;">DeviantArt API is being extremely unstable and buggy on their side for the last several months. Until further notice DeviantArt connector is provided "as is". Please use it on your own risk. This may cause numerous of different issues including disapering posts, broken accounts, messed up posts, etc...<br/></div> <?php if (!function_exists('doConnectToDeviantART')) { ?> <span style="color:#580000; font-size: 16px;"><br/><br/> <b><?php _e('deviantART API Library not found', 'social-networks-auto-poster-facebook-twitter-g'); ?> </b> <br/><br/> <?php _e('deviantART doesn\'t have a built-in API for automated posts yet.', 'social-networks-auto-poster-facebook-twitter-g'); ?> <br/><?php _e('<br/>You need to get a special <a target="_blank" href="http://www.nextscripts.com/deviantart-automated-posting"><b>API Library Module</b></a> to be able to publish your content to deviantART.', 'social-networks-auto-poster-facebook-twitter-g'); ?> </span></div> <?php return; } ?> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/da16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-deviantart-social-networks-auto-poster-wordpress/"><?php $nType = "deviantART"; printf(__('Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?> </a></div> <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?> </i> </div><input name="da[<?php echo $ii; ?> ][nName]" id="danName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /><br/> <?php echo nxs_addQTranslSel('da', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><strong>deviantART Username or Email:</strong> </div><input name="da[<?php echo $ii; ?> ][uName]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['daUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <div style="width:100%;"><strong>deviantART Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="da[<?php echo $ii; ?> ][uPass]" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['daPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($options['daPass'], 5)) : $options['daPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <br/> <br/> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?> </strong> (<a href="#" id="daTitleFormat<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('daTitleFormat<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a>)</div> <input name="da[<?php echo $ii; ?> ][daTitleFormat]" id="daTitleFormat<?php echo $ii; ?> " style="width: 50%;" value="<?php if ($isNew) { echo "%TITLE%"; } else { _e(apply_filters('format_to_edit', htmlentities($options['daTitleFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); } ?> " onfocus="mxs_showFrmtInfo('daTitleFormat<?php echo $ii; ?> ');" /><?php nxs_doShowHint("daTitleFormat" . $ii); ?> </div><br/> <div id="altFormat" style="margin-left: 0px;"> <div style="width:100%;"><strong id="altFormatText"><?php _e('Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong> (<a href="#" id="daTextFormat<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('daTextFormat<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a>) </div> <textarea cols="150" rows="3" id="da<?php echo $ii; ?> SNAPformat" name="da[<?php echo $ii; ?> ][daTextFormat]" style="width:51%;max-width: 650px;" onfocus="jQuery('#da<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apDAMsgFrmt<?php echo $ii; ?> ');"><?php if ($isNew) { _e("%FULLTEXT%", 'social-networks-auto-poster-facebook-twitter-g'); } else { _e(apply_filters('format_to_edit', htmlentities($options['daTextFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); } ?> </textarea> <?php nxs_doShowHint("daTextFormat" . $ii); ?> </div><br/> <?php if ($isNew) { ?> <input type="hidden" name="da[<?php echo $ii; ?> ][apDoDA]" value="1" id="apDoNewDA<?php echo $ii; ?> " /> <?php } ?> <?php if ($options['daPass'] != '') { ?> <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('DA', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?> </a> <?php } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?> " /></div> </div><?php }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } if (!isset($options['rdSubReddit'])) { $options['rdSubReddit'] = ''; } ?> <div id="doRD<?php echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { echo " clNewNTSets"; } ?> "> <input type="hidden" name="apDoSRD<?php echo $ii; ?> " value="0" id="apDoSRD<?php echo $ii; ?> " /> <?php if (!function_exists('doConnectToRD')) { nxs_show_noLibWrn('Reddit API Library module NOT found.<br/><br/><span style="color:black;">Reddit does not have a free native API for automated posts yet.</span><br/><br/><span style="font-size: 12px;color:black;">You need to have a special API Library Module to be able to publish your content to Reddit.</span>'); echo "</div>"; return; } ?> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/rd16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-reddit-social-networks-auto-poster-wordpress/"><?php $nType = "Reddit"; printf(__('Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?> </a></div> <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?> </i> </div><input name="rd[<?php echo $ii; ?> ][nName]" id="rdnName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /><br/> <?php echo nxs_addQTranslSel('rd', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><strong>Reddit Username:</strong> </div><input name="rd[<?php echo $ii; ?> ][uName]" id="apRDUName<?php echo $ii; ?> " style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['rdUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <div style="width:100%;"><strong>Reddit Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="rd[<?php echo $ii; ?> ][uPass]" id="apRDPass<?php echo $ii; ?> " type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['rdPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($options['rdPass'], 5)) : $options['rdPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <br/> <div style="width:100%;"><strong>Subreddit ID:</strong> Please <a href="#" onclick="nxs_getBrdsOrCats(jQuery('<?php if ($isNew) { echo "#nsx_addNT "; } ?> #apRDUName<?php echo $ii; ?> ').val(),jQuery('<?php if ($isNew) { echo "#nsx_addNT "; } ?> #apRDPass<?php echo $ii; ?> ').val(), 'rd' , '<?php echo $ii; ?> ', 'rdSubReddit'); return false;">click here to retrieve your subreddits</a> </div> <img id="rdLoadingImg<?php echo $ii; ?> " style="display: none;" src='<?php echo $nxs_plurl; ?> img/ajax-loader-sm.gif' /> <select name="rd[<?php echo $ii; ?> ][rdSubReddit]" id="rdSubReddit<?php echo $ii; ?> "> <?php if ($options['rdSubRedditsList'] != '') { $gBoards = $options['rdSubRedditsList']; if (base64_encode(base64_decode($gBoards)) === $gBoards) { $gBoards = base64_decode($gBoards); } if ($options['rdSubReddit'] != '') { $gBoards = str_replace($options['rdSubReddit'] . '"', $options['rdSubReddit'] . '" selected="selected"', $gBoards); } echo $gBoards; } else { ?> <option value="0">None(Click above to retrieve your subreddits)</option> <?php } ?> </select> <br/><br/> <?php /* <input name="rd[<?php echo $ii; ?>][rdSubReddit]" id="apRDPage" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['rdSubReddit'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /> */ ?> <i style="color: #580000;">Please do not try to post to subredits that you do not own. Reddit is very serious about it's policy that prohibits sharing your own links. You will loose posting privileges and you account will be <b>banned</b> if you post to public subreddits. </i> <br/> <br/> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?> </strong> (<a href="#" id="rdTitleFormat<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('rdTitleFormat<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a>)</div> <input name="rd[<?php echo $ii; ?> ][rdTitleFormat]" id="rdTitleFormat<?php echo $ii; ?> " style="width: 50%;" value="<?php if ($isNew) { echo "%TITLE%"; } else { _e(apply_filters('format_to_edit', htmlentities($options['rdTitleFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); } ?> " onfocus="mxs_showFrmtInfo('rdTitleFormat<?php echo $ii; ?> ');" /><?php nxs_doShowHint("rdTitleFormat" . $ii); ?> </div><br/> <div style="width:100%;"><strong id="altFormatText">Post Type:</strong></div> <div style="margin-left: 10px;"> <input type="radio" name="rd[<?php echo $ii; ?> ][postType]" value="A" <?php if (!isset($options['postType']) || $options['postType'] == '' || $options['postType'] == 'A') { echo 'checked="checked"'; } ?> /> <?php _e('Link Post', 'social-networks-auto-poster-facebook-twitter-g'); ?> <br/> <input type="radio" name="rd[<?php echo $ii; ?> ][postType]" value="T" <?php if ($options['postType'] == 'T') { echo 'checked="checked"'; } ?> /> <?php _e('Text Post', 'social-networks-auto-poster-facebook-twitter-g'); ?> - <i><?php _e('set the text format below', 'social-networks-auto-poster-facebook-twitter-g'); ?> </i> </div><br/> <div id="altFormat" style="margin-left: 20px;"> <div style="width:100%;"><strong id="altFormatText"><?php _e('Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong> (<a href="#" id="rdTextFormat<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('rdTextFormat<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a>) </div> <textarea cols="150" rows="3" id="rd<?php echo $ii; ?> SNAPformat" name="rd[<?php echo $ii; ?> ][rdTextFormat]" style="width:51%;max-width: 650px;" onfocus="jQuery('#rd<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apRDMsgFrmt<?php echo $ii; ?> ');"><?php if ($isNew) { _e("New post (%TITLE%) has been published on %SITENAME%", 'social-networks-auto-poster-facebook-twitter-g'); } else { _e(apply_filters('format_to_edit', htmlentities($options['rdTextFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); } ?> </textarea> <?php nxs_doShowHint("rdTextFormat" . $ii); ?> </div><br/> <?php if ($isNew) { ?> <input type="hidden" name="rd[<?php echo $ii; ?> ][apDoRD]" value="1" id="apDoNewRD<?php echo $ii; ?> " /> <?php } ?> <?php if ($options['rdPass'] != '') { ?> <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('RD', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?> </a> <?php } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?> " /></div> </div><?php }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } ?> <div id="doBG<?php echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { ?> clNewNTSets<?php } ?> "> <input type="hidden" value="0" id="apDoS<?php echo $ntU . $ii; ?> " /> <?php if ($isNew) { ?> <input type="hidden" name="bg[<?php echo $ii; ?> ][apDoBG]" value="1" id="apDoNewBG<?php echo $ii; ?> " /> <?php } ?> <div style="display: none;"><input name="bg[<?php echo $ii; ?> ][apBGPassChr]" id="apBGPassChr" type="password" value="" /></div> <div id="doBG<?php echo $ii; ?> Div" style="margin-left: 10px;"> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/bg16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-blogger-social-networks-auto-poster-wordpress/"><?php $nType = "Blogger"; printf(__('Detailed %s Installation/Configuration Instructions', 'nxs_snap'), $nType); ?> </a></div> <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="bg[<?php echo $ii; ?> ][nName]" id="bgnName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><br/> <?php echo nxs_addQTranslSel('bg', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'nxs_snap'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'nxs_snap'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><strong>Blogger Username/Email:</strong> </div><input name="bg[<?php echo $ii; ?> ][apBGUName]" id="apBGUName" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['bgUName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%;"><strong>Blogger Password:</strong> </div><input name="bg[<?php echo $ii; ?> ][apBGPass]" id="apBGPass" autocomplete="off" type="password" style="width: 30%;" value="<?php if (trim($options['bgPass']) != '') { _e(apply_filters('format_to_edit', htmlentities(substr($options['bgPass'], 0, 5) == 'b4d7s' ? nsx_doDecode(substr($options['bgPass'], 5)) : $options['bgPass'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } ?> " /> <br/> <div style="width:100%;"><strong>Blogger Blog ID:</strong> <p style="font-size: 11px; margin: 0px;"><?php _e('Log to your Blogger management panel and look at the URL of your blog: http://www.blogger.com/blogger.g?blogID=8959085979163812093#allposts. Your Blog ID will be: 8959085979163812093', 'nxs_snap'); ?> </p> </div><input name="bg[<?php echo $ii; ?> ][apBGBlogID]" id="apBGBlogID" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['bgBlogID'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/><br/> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'nxs_snap'); ?> :</strong> (<a href="#" id="apBGTMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apBGTMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a>)</div> <input name="bg[<?php echo $ii; ?> ][apBGMsgTFrmt]" id="apBGMsgTFrmt" style="width: 50%;" value="<?php if ($options['bgMsgTFormat'] != '') { _e(apply_filters('format_to_edit', htmlentities($options['bgMsgTFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } else { echo "%TITLE%"; } ?> " onfocus="mxs_showFrmtInfo('apBGTMsgFrmt<?php echo $ii; ?> ');" /><?php nxs_doShowHint("apBGTMsgFrmt" . $ii); ?> <br/> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'nxs_snap'); ?> :</strong> (<a href="#" id="apBGMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apBGMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a>) <!-- HTML is <?php if (!function_exists('doPostToGooglePlus')) { ?> <b>NOT</b> <?php } ?> allowed. <?php if (!function_exists('doPostToGooglePlus')) { ?> <i>- Blogger "Free API" limitation. Please get <a href="http://www.nextscripts.com/google-plus-automated-posting/#blogger">NextScripts API</a> to allow HTML</i> <?php } ?> --> </div> <textarea cols="150" rows="3" id="bg<?php echo $ii; ?> SNAPformat" name="bg[<?php echo $ii; ?> ][apBGMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#bg<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apBGMsgFrmt<?php echo $ii; ?> ');"><?php if ($options['bgMsgFormat'] != '') { _e(apply_filters('format_to_edit', htmlentities($options['bgMsgFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } else { echo "%FULLTEXT% <br/><a href='%URL%'>%TITLE%</a>"; } ?> </textarea> <?php nxs_doShowHint("apBGMsgFrmt" . $ii, __('HTML is allowed', 'nxs_snap')); ?> </div> <p style="margin-bottom: 20px;margin-top: 5px;"><input value="1" id="bgInclTags" type="checkbox" name="bg[<?php echo $ii; ?> ][bgInclTags]" <?php if ((int) $options['bgInclTags'] == 1) { echo "checked"; } ?> /> <strong><?php _e('Post with tags', 'nxs_snap'); ?> </strong> <?php _e('Tags from the blogpost will be auto-posted to Blogger/Blogspot', 'nxs_snap'); ?> </p> <?php if ($options['bgPass'] != '') { ?> <b><?php _e('Test your settings', 'nxs_snap'); ?> :</b> <?php if (!isset($options['bgOK']) || $options['bgOK'] != '1') { ?> <div class="blnkg">=== <?php _e('Submit Test Post to Finish Configuration', 'nxs_snap'); ?> ===></div> <?php } ?> <a href="#" class="NXSButton" onclick="testPost('BG', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'nxs_snap'), $nType); ?> </a> <?php } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX 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> </div> <?php }
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'); if (empty($options['postType']) && !empty($options['fbPostType'])) { $options['postType'] = $options['fbPostType']; unset($options['fbPostType']); } //## Compatibility with V <3.2 if (empty($options['postType']) && !empty($options['PostType'])) { $pt = $options['PostType']; unset($options['PostType']); $options['postType'] = $pt; } //## Compatibility with V <3.2 if ((int) $options['fbAttch'] == 0 && empty($options['postType'])) { $options['postType'] = 'T'; } if (!isset($plgn_NS_SNAutoPoster)) { $gOptions = array(); } else { $gOptions = $plgn_NS_SNAutoPoster->nxs_options; } if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } if (!isset($options['fbMsgAFrmt'])) { $options['fbMsgAFrmt'] = ''; } if (!isset($options['riComments'])) { $options['riComments'] = ''; } if (!isset($options['riCommentsAA'])) { $options['riCommentsAA'] = ''; } if (!isset($options['useFBGURLInfo'])) { $options['useFBGURLInfo'] = ''; } ?> <div id="doFB<?php echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { echo " clNewNTSets"; } ?> "> <input type="hidden" name="apDoSFB<?php echo $ii; ?> " value="0" id="apDoSFB<?php echo $ii; ?> " /> <?php if ($isNew) { ?> <input type="hidden" name="fb[<?php echo $ii; ?> ][apDoFB]" value="1" id="apDoNewFB<?php echo $ii; ?> " /> <?php } ?> <div class="nsx_iconedTitle" style="float: right; max-width: 342px; text-align: right; background-image: url(<?php echo $nxs_plurl; ?> img/fb16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/instructions/facebook-social-networks-auto-poster-setup-installation"><?php $nType = "Facebook"; printf(__('Detailed %s Installation/Configuration Instructions', 'nxs_snap'), $nType); ?> </a><br/> <span style="font-size: 10px;"><?php _e('Please use in your Facebook App:', 'nxs_snap'); ?> <br/> URL: <em style="font-size: 10px; color:#CB4B16;">http://<?php echo $_SERVER["SERVER_NAME"]; ?> </em> <br/>Domain: <em style="font-size: 10px; color:#CB4B16;"><?php echo $_SERVER["SERVER_NAME"]; ?> </em> </span> </div> <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="fb[<?php echo $ii; ?> ][nName]" id="fbnName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><br/> <?php echo nxs_addQTranslSel('fb', $ii, $options['qTLng']); ?> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'nxs_snap'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'nxs_snap'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><strong>Facebook URL:</strong> </div> <p style="font-size: 11px; margin: 0px;"><?php _e('Could be your Facebook Profile, Facebook Page, Facebook Group', 'nxs_snap'); ?> </p> <input name="fb[<?php echo $ii; ?> ][apFBURL]" id="apFBURL" style="width: 50%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['fbURL'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/><br/> <?php /* <?php if ($isNew) { ?><b>Choose How to connect to Facebook:</b> <- <a target="_blank" href="http://www.nextscripts.com/connect-facebook/">What is it?</a> <br/> <select onchange="nxs_showHideBlock('fbChooseSRVB'+this.value, 'fbChooseSRVC');" id="fbChooseSRV<?php echo $ii; ?>"><option value="0">Your own app</option><option value="1">Autopost.to Service</option><option value="2">Username/password (Pro Only)</option></select> <br/> <br/> <?php } */ ?> <div id="fbChooseSRVB0" class="fbChooseSRVC" style="padding-left:15px; display: <?php if ($isNew || !empty($options['fbAppID'])) { echo 'block'; } else { echo 'none'; } ?> ;"> <div style="width:100%;"><strong>Facebook App ID:</strong> </div><input name="fb[<?php echo $ii; ?> ][apFBAppID]" id="apFBAppID" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['fbAppID'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%;"><strong>Facebook App Secret:</strong> </div><input name="fb[<?php echo $ii; ?> ][apFBAppSec]" id="apFBAppSec" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['fbAppSec'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> </div> <div id="fbChooseSRVB1" class="fbChooseSRVC" style="padding-left:15px; display: <?php if (!empty($options['atpKey'])) { echo 'block'; } else { echo 'none'; } ?> ;"> <div style="width:100%;"><strong>Autopost.to Key:</strong> </div><input name="fb[<?php echo $ii; ?> ][atpKey]" id="apFBAppID" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['atpKey'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> </div> <div id="fbChooseSRVB2" class="fbChooseSRVC" style="padding-left:15px; display: <?php if (!empty($options['uName'])) { echo 'block'; } else { echo 'none'; } ?> ;"> <?php if (!function_exists('doPostToFacebook')) { ?> <span style="color:#580000; font-size: 16px;"><br/><br/> <b><?php _e('NextScritps Facebook API Library not found. Please upgrade plugin to "Pro" to get it.', 'nxs_snap'); ?> </b> <?php } else { ?> <div style="width:100%;"><strong><?php echo $nType; ?> Login/Email:</strong> </div><input name="<?php echo $nt; ?> [<?php echo $ii; ?> ][uName]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['uName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%;"><strong><?php echo $nType; ?> Password:</strong> </div><input name="<?php echo $nt; ?> [<?php echo $ii; ?> ][uPass]" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['uPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($options['uPass'], 5)) : $options['uPass'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/> <?php } ?> </div> <br/><br/> <div id="altFormat"> <div style="width:100%;"><strong id="altFormatText"><?php _e('Message text Format', 'nxs_snap'); ?> :</strong> (<a href="#" id="apFBMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apFBMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a>)</div> <textarea cols="150" rows="3" id="fb<?php echo $ii; ?> SNAPformat" name="fb[<?php echo $ii; ?> ][apFBMsgFrmt]" style="width:51%;max-width: 610px;" onfocus="jQuery('#fb<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apFBMsgFrmt<?php echo $ii; ?> ');"><?php _e(apply_filters('format_to_edit', htmlentities($options['fbMsgFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> </textarea> <?php nxs_doShowHint("apFBMsgFrmt" . $ii); ?> <br/> </div><br/> <div style="width:100%;"><strong style="font-size: 16px;" id="altFormatText">Post Type:</strong><-- (<a id="showShAtt" onmouseout="hidePopShAtt('<?php echo $ii; ?> X');" onmouseover="showPopShAtt('<?php echo $ii; ?> X', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php _e('What\'s the difference?', 'nxs_snap'); ?> </a>) </div> <div style="margin-left: 10px;"> <input type="radio" name="fb[<?php echo $ii; ?> ][postType]" value="T" <?php if ($options['postType'] == 'T') { echo 'checked="checked"'; } ?> /> <?php _e('Text Post', 'nxs_snap'); ?> - <i><?php _e('just text message', 'nxs_snap'); ?> </i><br/> <input type="radio" name="fb[<?php echo $ii; ?> ][postType]" value="I" <?php if ($options['postType'] == 'I') { echo 'checked="checked"'; } ?> /> <?php _e('Image Post', 'nxs_snap'); ?> - <i><?php _e('big image with text message', 'nxs_snap'); ?> </i><br/> <div style="width:100%; margin-left: 15px;"><strong><?php _e('Upload Images to', 'nxs_snap'); ?> : </strong> <input value="2" id="apFBImgUplAPP<?php echo $ii; ?> " type="radio" name="fb[<?php echo $ii; ?> ][apFBImgUpl]" <?php if ((int) $options['imgUpl'] == 2) { echo "checked"; } ?> /> <?php _e('App Album', 'nxs_snap'); ?> .. <?php _e('or', 'nxs_snap'); ?> .. <input value="1" id="apFBImgUplTML<?php echo $ii; ?> " type="radio" name="fb[<?php echo $ii; ?> ][apFBImgUpl]" <?php if ((int) $options['imgUpl'] != 2) { echo "checked"; } ?> /> <?php _e('Timeline', 'nxs_snap'); ?> <-- (<a id="showShAtt" onmouseout="hidePopShAtt('<?php echo $ii; ?> I');" onmouseover="showPopShAtt('<?php echo $ii; ?> I', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php _e('What\'s the difference?', 'nxs_snap'); ?> </a>) </div> <input type="radio" name="fb[<?php echo $ii; ?> ][postType]" value="A" <?php if (!isset($options['postType']) || $options['postType'] == '' || $options['postType'] == 'A') { echo 'checked="checked"'; } ?> /> <?php _e('Text Post with "attached" link', 'nxs_snap'); ?> <br/> <div style="width:100%; margin-left: 15px;"><strong><?php _e('Link attachment type', 'nxs_snap'); ?> : </strong> <input value="2" id="apFBAttchShare<?php echo $ii; ?> " type="radio" name="fb[<?php echo $ii; ?> ][apFBAttch]" <?php if ((int) $options['fbAttch'] == 2) { echo "checked"; } ?> /> <?php _e('Share a link to your blogpost', 'nxs_snap'); ?> .. <?php _e('or', 'nxs_snap'); ?> .. <input value="1" id="apFBAttch<?php echo $ii; ?> " type="radio" name="fb[<?php echo $ii; ?> ][apFBAttch]" <?php if ((int) $options['fbAttch'] == 1) { echo "checked"; } ?> /> <?php _e('Attach your blogpost', 'nxs_snap'); ?> <-- (<a id="showShAtt" onmouseout="hidePopShAtt('<?php echo $ii; ?> ');" onmouseover="showPopShAtt('<?php echo $ii; ?> ', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php _e('What\'s the difference?', 'nxs_snap'); ?> </a>) <div style="margin-bottom: 5px; margin-left: 10px; "><input value="1" id="apFBAttchAsVid" type="checkbox" name="fb[<?php echo $ii; ?> ][apFBAttchAsVid]" <?php if (isset($options['fbAttchAsVid']) && (int) $options['fbAttchAsVid'] == 1) { echo "checked"; } ?> /> <strong><?php _e('If post has video use it as an attachment thumbnail.', 'nxs_snap'); ?> </strong> <i><?php _e('Video will be used for an attachment thumbnail instead of featured image. Only Youtube is supported at this time.', 'nxs_snap'); ?> </i> <br/></div> <input value="1" id="useFBGURLInfo<?php echo $ii; ?> " <?php if (!empty($options['useFBGURLInfo']) && $options['useFBGURLInfo'] == '1') { echo "checked"; } ?> onchange="if (jQuery(this).is(':checked')) { jQuery('#useFBGURLInfoDiv<?php echo $ii; ?> ').hide(); }else jQuery('#useFBGURLInfoDiv<?php echo $ii; ?> ').show();" type="checkbox" name="fb[<?php echo $ii; ?> ][useFBGURLInfo]"/> <strong><?php _e('Let Facebook fill the link info', 'nxs_snap'); ?> </strong> <i> - <?php _e('Recommended. Facebook will automatically take attached/shared link info from OG: tags or other sources.', 'nxs_snap'); ?> </i><br/> <div id="useFBGURLInfoDiv<?php echo $ii; ?> " style="<?php if (trim($options['useFBGURLInfo']) == '' || $options['useFBGURLInfo'] == '1') { echo "display:none;"; } ?> " > <strong><?php _e('Attachment Text Format', 'nxs_snap'); ?> :</strong><br/> <input value="1" id="apFBMsgAFrmtA<?php echo $ii; ?> " <?php if (trim($options['fbMsgAFrmt']) == '') { echo "checked"; } ?> onchange="if (jQuery(this).is(':checked')) { jQuery('#apFBMsgAFrmtDiv<?php echo $ii; ?> ').hide(); jQuery('#apFBMsgAFrmt<?php echo $ii; ?> ').val(''); }else jQuery('#apFBMsgAFrmtDiv<?php echo $ii; ?> ').show();" type="checkbox" name="fb[<?php echo $ii; ?> ][apFBMsgAFrmtA]"/> <strong><?php _e('Auto', 'nxs_snap'); ?> </strong> <i> - <?php _e('Recommended. Info from SEO Plugins will be used, then post excerpt, then post text', 'nxs_snap'); ?> </i><br/> <div id="apFBMsgAFrmtDiv<?php echo $ii; ?> " style="<?php if ($options['fbMsgAFrmt'] == '') { echo "display:none;"; } ?> " > <?php _e('Set your own format', 'nxs_snap'); ?> :<input name="fb[<?php echo $ii; ?> ][apFBMsgAFrmt]" id="apFBMsgAFrmt<?php echo $ii; ?> " style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['fbMsgAFrmt'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><br/></div> </div> </div><br/></div> <div class="popShAtt" style="z-index: 9999; width: 350px;" id="popShAtt<?php echo $ii; ?> I"><h3><?php _e('Where to upload Images', 'nxs_snap'); ?> </h3> <b><?php _e('(App Album)', 'nxs_snap'); ?> </b> <?php _e('Facebook automatically creates an album for your app. Images will be grouped there as in any regular album.', 'nxs_snap'); ?> <br/><br/><b><?php _e('(Timeline)', 'nxs_snap'); ?> </b> <?php _e('Images will be posted to the special "Wall/Timeline" album and won\'t be grouped. "Wall/Timeline" album must exist. It\'s created when first image posted to timeline manually.', 'nxs_snap'); ?> </div> <div class="popShAtt" style="z-index: 9999" id="popShAtt<?php echo $ii; ?> "><h3><?php _e('Two ways of attaching post on Facebook', 'nxs_snap'); ?> </h3><img src="<?php echo $nxs_plurl; ?> img/fb2wops.png" width="600" height="257" alt="<?php _e('Two ways of attaching post on Facebook', 'nxs_snap'); ?> "/></div> <div class="popShAtt" style="z-index: 9999" id="popShAtt<?php echo $ii; ?> X"><h3><?php _e('Facebook Post Types', 'nxs_snap'); ?> </h3><img src="<?php echo $nxs_plurl; ?> img/fbPostTypesDiff6.png" width="600" height="398" alt="<?php _e('Facebook Post Types', 'nxs_snap'); ?> "/></div> <?php if ($options['fbPgID'] != '') { ?> <div style="width:100%;"><strong>Facebook Page ID:</strong> <?php if (!empty($options['destType']) && $options['destType'] == 'pr') { _e('Profile', 'nxs_snap'); } if (!empty($options['destType']) && $options['destType'] == 'gr') { _e('Group', 'nxs_snap'); } if (empty($options['destType']) || !empty($options['destType']) && $options['destType'] == 'pg') { _e('Page', 'nxs_snap'); } ?> - <?php _e(apply_filters('format_to_edit', htmlentities($options['fbPgID'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> </div><?php } ?> <?php if (!empty($options['fbAppID'])) { if ($options['fbAppSec'] == '') { ?> <b><?php _e('Authorize Your Facebook Account', 'nxs_snap'); ?> </b> <?php _e('Please click "Update Settings" to be able to Authorize your account.', 'nxs_snap'); ?> <?php } else { if (isset($options['fbAppAuthUser']) && $options['fbAppAuthUser'] > 0) { ?> <?php _e('Your Facebook Account has been authorized.', 'nxs_snap'); ?> User ID: <?php _e(apply_filters('format_to_edit', htmlentities($options['fbAppAuthUser'] . (!empty($options['fbAppAuthUserName']) ? " - " . $options['fbAppAuthUserName'] : ''), ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> . <br/><?php _e('You can', 'nxs_snap'); ?> Re- <?php } ?> <a href="https://www.facebook.com/dialog/oauth?client_id=<?php echo trim($options['fbAppID']); ?> &scope=publish_actions,manage_pages,user_photos,user_groups&state=<?php echo 'nxs-fb-' . $ii; ?> &redirect_uri=<?php echo trim(urlencode($nxs_snapSetPgURL)); ?> ">Authorize Your Facebook Account</a> <?php if (!isset($options['fbAppAuthUser']) || $options['fbAppAuthUser'] < 1) { ?> <div class="blnkg"><=== <?php _e('Authorize your account', 'nxs_snap'); ?> ===</div> <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 } ?> <?php } } ?> <?php if (isset($options['fbAppAuthUser']) && $options['fbAppAuthUser'] > 0 || !empty($options['atpKey']) || !empty($options['uName'])) { ?> <br/><br/><b><?php _e('Test your settings', 'nxs_snap'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('FB','<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'nxs_snap'), $nType); ?> </a> <?php } ?> </div> <?php /* ######################## Tools Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); ?> <div style="width:100%;"><strong style="font-size: 16px;"><?php _e('Facebook Comments:', 'nxs_snap'); ?> </strong> </div> <div style="margin-bottom: 5px; margin-left: 10px; "> <p style="font-size: 11px; margin: 0px;"><?php _e('Plugin could grab comments from Facebook and import them as Wordpress Comments', 'nxs_snap'); ?> </p> <?php if (!empty($gOptions['riActive']) && $gOptions['riActive'] == '1') { ?> <input value="1" id="apFBMsgAFrmtA<?php echo $ii; ?> " <?php if (trim($options['riComments']) == '1') { echo "checked"; } ?> type="checkbox" name="fb[<?php echo $ii; ?> ][riComments]"/> <strong><?php _e('Import Facebook Comments', 'nxs_snap'); ?> </strong> <br/> <div style="margin-bottom: 5px; margin-left: 10px; "> <input value="1" id="apFBMsgAFrmtA<?php echo $ii; ?> " <?php if (trim($options['riCommentsAA']) == '1') { echo "checked"; } ?> type="checkbox" name="fb[<?php echo $ii; ?> ][riCommentsAA]"/> <strong><?php _e('Auto-approve imported comments', 'nxs_snap'); ?> </strong></div> <?php } else { echo "<br/>"; _e('Please activate the "Comments Import" from SNAP Settings Tab', 'nxs_snap'); } ?> </div> <?php nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX nxclear" style="padding-bottom: 0px;"> <input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'nxs_snap'); ?> " /> <input type="button" id="svBtn<?php echo $nt . $ii; ?> " onclick="nxs_svSet('<?php echo $nt; ?> ', '<?php echo $ii; ?> ')" class="button-primary" value="<?php _e('Update Settings', 'nxs_snap'); ?> " /> </div> </div> <?php }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } if (!isset($options['ytGPPageID'])) { $options['ytGPPageID'] = ''; } ?> <div id="doYT<?php echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { echo " clNewNTSets"; } ?> "> <input type="hidden" name="apDoSYT<?php echo $ii; ?> " value="0" id="apDoSYT<?php echo $ii; ?> " /> <?php if (!function_exists('doPostToGooglePlus')) { ?> <span style="color:#580000; font-size: 16px;"><br/><br/> <b><?php _e('YouTube API Library not found', 'nxs_snap'); ?> </b> <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> <?php return; } ?> <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> <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/> <?php echo nxs_addQTranslSel('yt', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'nxs_snap'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'nxs_snap'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><strong>YouTube(Google) Username:</strong> </div><input name="yt[<?php echo $ii; ?> ][apYTUName]" id="apYTUName" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['ytUName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%;"><strong>YouTube(Google) Password:</strong> </div><input name="yt[<?php echo $ii; ?> ][apYTPass]" id="apYTPass" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['ytPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($options['ytPass'], 5)) : $options['ytPass'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/> <p><div style="width:100%;"><strong>YouTube Channel Page URL:</strong> </div><input name="yt[<?php echo $ii; ?> ][apYTPage]" id="apYTPage" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['ytPageID'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/><br/> <p><div style="width:100%;"><i style="color: gray;"><strong >Google+ Page ID:</strong> Fill this only if you are posting to youTube as your Google+ page. Please leave this empty otherwise.</i> </div><input name="yt[<?php echo $ii; ?> ][ytGPPageID]" id="ytGPPageID" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['ytGPPageID'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/><br/> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText"><?php _e('Message text Format', 'nxs_snap'); ?> :</strong> (<a href="#" id="apYTMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apYTMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a>) </div> <textarea cols="150" rows="3" id="yt<?php echo $ii; ?> SNAPformat" name="yt[<?php echo $ii; ?> ][apYTMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#yt<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apYTMsgFrmt<?php echo $ii; ?> ');"><?php if ($isNew) { _e("New post: %TITLE% - %URL%", 'nxs_snap'); } else { _e(apply_filters('format_to_edit', htmlentities($options['ytMsgFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } ?> </textarea> <?php nxs_doShowHint("apYTMsgFrmt" . $ii); ?> </div><br/> <?php if ($isNew) { ?> <input type="hidden" name="yt[<?php echo $ii; ?> ][apDoYT]" value="1" id="apDoNewYT<?php echo $ii; ?> " /> <?php } ?> <?php if ($options['ytPass'] != '') { ?> <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 } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX 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 }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } ?> <div id="doPN<?php echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { echo " clNewNTSets"; } ?> "> <input type="hidden" name="apDoSPN<?php echo $ii; ?> " value="0" id="apDoSPN<?php echo $ii; ?> " /> <?php if (!function_exists('doPostToPinterest')) { ?> <span style="color:#580000; font-size: 16px;"><br/><br/> <b>Pinterest API Library not found</b> <br/><br/> Pinterest doesn't have a built-in API for automated posts yet. <br/><br/>You need to get a special <a target="_blank" href="http://www.nextscripts.com/pinterest-automated-posting"><b>API Library Module</b></a> to be able to publish your content to Pinterest.</span></div> <?php return; } ?> <div id="doPN<?php echo $ii; ?> Div" style="margin-left: 10px;"> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/pn16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-pinterest-social-networks-auto-poster-wordpress/"><?php $nType = "Pinterest"; printf(__('Detailed %s Installation/Configuration Instructions', 'nxs_snap'), $nType); ?> </a></div> <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="pn[<?php echo $ii; ?> ][nName]" id="pnnName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /><br/> <?php echo nxs_addQTranslSel('pn', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'nxs_snap'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'nxs_snap'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><strong>Pinterest Email:</strong> </div><input name="pn[<?php echo $ii; ?> ][apPNUName]" id="apPNUName<?php echo $ii; ?> " class="apPNUName<?php echo $ii; ?> " style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['pnUName'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <div style="width:100%;"><strong>Pinterest Password:</strong> </div><input name="pn[<?php echo $ii; ?> ][apPNPass]" id="apPNPass<?php echo $ii; ?> " type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['pnPass'], 0, 5) == 'g9c1a' ? nsx_doDecode(substr($options['pnPass'], 5)) : $options['pnPass'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/> <strong>Clickthrough URL:</strong> <p style="margin-bottom: 20px;margin-top: 5px;"> <input type="radio" name="pn[<?php echo $ii; ?> ][cImgURL]" value="R" <?php if (!isset($options['cImgURL']) || $options['cImgURL'] == '' || $options['cImgURL'] == 'R') { echo 'checked="checked"'; } ?> /> Regular Post URL <!-- <input type="radio" name="pn[<?php echo $ii; ?> ][cImgURL]" value="S" <?php if ($options['cImgURL'] == 'S') { echo 'checked="checked"'; } ?> /> Shortened Post URL --> <input type="radio" name="pn[<?php echo $ii; ?> ][cImgURL]" value="N" <?php if ($options['cImgURL'] == 'N') { echo 'checked="checked"'; } ?> /> No Clickthrough URL <div style="width:100%;"><strong>Default Image to Pin:</strong> <p style="font-size: 11px; margin: 0px;">If your post does not have any images this will be used instead.</p> </div><input name="pn[<?php echo $ii; ?> ][apPNDefImg]" id="apPNDefImg" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['pnDefImg'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); ?> " /> <br/><br/> <div style="width:100%;"><strong>Board:</strong> Please <a href="#" onclick="nxs_getPNBoards(jQuery('<?php if ($isNew) { echo "#nsx_addNT "; } ?> #apPNUName<?php echo $ii; ?> ').val(),jQuery('<?php if ($isNew) { echo "#nsx_addNT "; } ?> #apPNPass<?php echo $ii; ?> ').val(), '<?php echo $ii; ?> '); return false;">click here to retrieve your boards</a> </div> <img id="pnLoadingImg<?php echo $ii; ?> " style="display: none;" src='<?php echo $nxs_plurl; ?> img/ajax-loader-sm.gif' /> <select name="pn[<?php echo $ii; ?> ][apPNBoard]" id="apPNBoard<?php echo $ii; ?> "> <?php if ($options['pnBoardsList'] != '') { $gPNBoards = $options['pnBoardsList']; if (base64_encode(base64_decode($gPNBoards)) === $gPNBoards) { $gPNBoards = base64_decode($gPNBoards); } if ($options['pnBoard'] != '') { $gPNBoards = str_replace($options['pnBoard'] . '"', $options['pnBoard'] . '" selected="selected"', $gPNBoards); } echo $gPNBoards; } else { ?> <option value="0">None(Click above to retrieve your boards)</option> <?php } ?> </select> <br/><br/> <div style="margin-bottom: 5px; margin-left: 0px; "><input value="1" id="isAttachVid" type="checkbox" name="pn[<?php echo $ii; ?> ][isAttachVid]" <?php if (isset($options['isAttachVid']) && (int) $options['isAttachVid'] == 1) { echo "checked"; } ?> /> <strong><?php _e('If post has a video use it instead of image', 'nxs_snap'); ?> </strong> <i><?php _e('Video will be pinned instead of featured image. Only Youtube is supported at this time.', 'nxs_snap'); ?> </i> <br/></div> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText"><?php _e('Message text Format', 'nxs_snap'); ?> :</strong> <a href="#" id="apPNMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apPNMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'nxs_snap'); ?> </a> </div> <textarea cols="150" rows="3" id="pn<?php echo $ii; ?> SNAPformat" name="pn[<?php echo $ii; ?> ][apPNMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#pn<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apPNMsgFrmt<?php echo $ii; ?> ');"><?php if ($options['pnMsgFormat'] != '') { _e(apply_filters('format_to_edit', htmlentities($options['pnMsgFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap'); } else { echo "%TITLE% - %URL%"; } ?> </textarea> <?php nxs_doShowHint("apPNMsgFrmt" . $ii); ?> </div><br/> <?php if ($isNew) { ?> <input type="hidden" name="pn[<?php echo $ii; ?> ][apDoPN]" value="1" id="apDoNewPN<?php echo $ii; ?> " /> <?php } ?> <?php if ($options['pnPass'] != '') { ?> <b><?php _e('Test your settings', 'nxs_snap'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('PN', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'nxs_snap'), $nType); ?> </a> <?php } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX 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> </div> <?php }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl, $nxs_snapSetPgURL; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['liOK'])) { $options['liOK'] = ''; } if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } if (!isset($options['liMsgAFrmt'])) { $options['liMsgAFrmt'] = ''; } if (empty($options['apiToUse'])) { if (!empty($options['liAPIKey'])) { $options['apiToUse'] = 'li'; } if (!empty($options['ulName']) && !empty($options['uPass'])) { $options['apiToUse'] = 'nx'; } } ?> <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; ?> " /> <?php if ($isNew) { ?> <input type="hidden" name="li[<?php echo $ii; ?> ][apDoLI]" value="1" id="apDoNewLI<?php echo $ii; ?> " /> <?php } ?> <div id="doLI<?php echo $ii; ?> Div" style="margin-left: 10px;"> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/li16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-linkedin-social-networks-auto-poster-wordpress/"><?php $nType = "LinkedIn"; printf(__('Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?> </a></div> <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?> </i> </div><input name="li[<?php echo $ii; ?> ][nName]" id="linName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /><br/> <?php echo nxs_addQTranslSel('li', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="display: <?php echo empty($options['apiToUse']) ? "block" : "none"; ?> ;"> <div style="width:100%; text-align: center; color:#005800; font-weight: bold; font-size: 14px;">You can choose what API you would like to use. </div> <span style="color:#005800; font-weight: bold; font-size: 14px;">LinkedIn Native API:</span> Free built-in API from LinkedIn. Can be used for posting to your profile. More secure, more stable. More complicated - requires LinkedIn App and authorization. <br/><br/> <span style="color:#005800; font-weight: bold; font-size: 14px;">NextScripts API for LinkedIn:</span> Premium API with extended functionality. Can be used for posting to your profile, <b>group page</b> or <b>company page</b>. Easier to configure, but less secure - requires your password.<br/><br/> <select name="li[<?php echo $ii; ?> ][apiToUse]" onchange="if (jQuery(this).val()=='li') { jQuery('.nxs_li_nxapi_<?php echo $ii; ?> ').hide(); jQuery('.nxs_li_liapi_<?php echo $ii; ?> ').show(); }else { jQuery('.nxs_li_liapi_<?php echo $ii; ?> ').hide(); jQuery('.nxs_li_nxapi_<?php echo $ii; ?> ').show(); }"><option <?php echo empty($options['apiToUse']) || $options['apiToUse'] == 'li' ? "selected" : ""; ?> value="li">LinkedIn API</option><option <?php echo !empty($options['apiToUse']) && $options['apiToUse'] == 'nx' ? "selected" : ""; ?> value="nx">NextScripts API</option></select><hr/> </div> <div id="nxsAPILI<?php echo $ii; ?> " class="nxs_li_liapi_<?php echo $ii; ?> " style="display: <?php echo empty($options['apiToUse']) || $options['apiToUse'] == 'li' ? "block" : "none"; ?> ;"><h3>LinkedIn API</h3> <div class="subDiv" id="sub<?php echo $ii; ?> DivL" style="display: block;"> <?php if (!empty($options['grpID'])) { ?> <span style="color: red;">LinkedIn has <a style="color: red;" target="_blank" href="https://developer.linkedin.com/support/developer-program-transition">discontinued support for groups</a> from it's free native API. This account should be removed or switched to NextScripts API</span> <br/> <br/><a onclick="jQuery('#nxsAPILI<?php echo $ii; ?> ').hide(); jQuery('#nxsAPINX<?php echo $ii; ?> ').show(); jQuery('#liuPage<?php echo $ii; ?> ').val('https://www.linkedin.com/groups/?gid=<?php echo $options['grpID']; ?> '); jQuery('#sub<?php echo $ii; ?> DivL').append('<input type=hidden name=li[<?php echo $ii; ?> ][apiToUse] value=nx />'); return false;" style="font-size: 16px;" href="#">>>> Switch to NextScripts API Now <<<</a><br/><br/></hr> <?php } ?> <div style="width:100%;"><strong>LinkedIn Client ID:</strong> </div><input name="li[<?php echo $ii; ?> ][apLIAPIKey]" id="apLIAPIKey" style="width: 70%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['liAPIKey'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <div style="width:100%;"><strong>LinkedIn Client Secret:</strong> </div><input name="li[<?php echo $ii; ?> ][apLIAPISec]" id="apLIAPISec" style="width: 70%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['liAPISec'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <br/> <?php if ($options['liAPIKey'] == '') { ?> <b>Authorize Your LinkedIn Account</b>. Please save your settings and come back here to Authorize your account. <?php } else { if (isset($options['liAccessToken']) && isset($options['liAccessTokenSecret']) && $options['liAccessTokenSecret'] !== '') { ?> Your LinkedIn Account has been authorized. <br/>User ID: <?php _e(apply_filters('format_to_edit', $options['liUserInfo']), 'social-networks-auto-poster-facebook-twitter-g'); ?> . <br/>You can Re- <?php } ?> <?php if (class_exists("cl_nxsAutoPostToSN")) { ?> <a href="https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=<?php echo trim($options['liAPIKey']); ?> &scope=r_basicprofile+r_emailaddress+w_share&state=<?php echo 'nxs-li-' . $ii; ?> &redirect_uri=<?php echo trim(urlencode($nxs_snapSetPgURL)); ?> ">Authorize Your LinkedIn Account</a> <?php } else { ?> <a href="<?php echo $nxs_snapSetPgURL; ?> &auth=li&acc=<?php echo $ii; ?> ">Authorize Your LinkedIn Account</a> <?php } ?> <?php if (!isset($options['liAccessTokenSecret']) || $options['liAccessTokenSecret'] == '') { ?> <div class="blnkg"><=== Authorize your account ===</div> <?php } ?> <?php } ?> </div> </div> <div id="nxsAPINX<?php echo $ii; ?> " class="nxs_li_nxapi_<?php echo $ii; ?> " style="display: <?php echo !empty($options['apiToUse']) && $options['apiToUse'] == 'nx' ? "block" : "none"; ?> ;"><h3>NextScripts API</h3> <?php if (function_exists("doConnectToLinkedIn")) { ?> <div class="subDiv" id="sub<?php echo $ii; ?> DivN" style="display: block;"> <div style="width:100%;"><strong>Your LinkedIn Page URL:</strong> Could be your company page or group page. Leave empty to post to your own profile.</div><input name="li[<?php echo $ii; ?> ][uPage]" id="liuPage<?php echo $ii; ?> " style="width: 90%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['uPage'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <br/> <div style="width:100%;"><strong>Your LinkedIn Username/Email:</strong> </div><input name="li[<?php echo $ii; ?> ][ulName]" id="liulName" style="width: 70%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['ulName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <div style="width:100%;"><strong>Your LinkedIn Password:</strong> </div><input type="password" name="li[<?php echo $ii; ?> ][uPass]" id="liuPass" style="width: 75%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['uPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> </div> <?php } else { nxs_show_noLibWrn('NextScripts API Library for LinkedIn module NOT found'); } ?> </div> <br/><hr/> <div id="altFormat"> <div style="width:100%;"><strong id="altFormatText"><?php _e('Message text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong> </div> <textarea cols="150" rows="3" id="li<?php echo $ii; ?> SNAPformat" name="li[<?php echo $ii; ?> ][apLIMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#li<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apLIMsgFrmt<?php echo $ii; ?> ');"><?php _e(apply_filters('format_to_edit', htmlentities($options['liMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> </textarea> <?php nxs_doShowHint("apIPMsgFrmt" . $ii); ?> </div> <div style="width:100%;"><strong id="altFormatText">Post Type:</strong> </div> <div style="margin-left: 10px;"> <?php if (empty($options['postType'])) { if ((int) $options['liAttch'] == 1 || $isNew) { $options['postType'] = 'A'; } } ?> <input type="radio" name="li[<?php echo $ii; ?> ][postType]" value="T" <?php if ($options['postType'] == 'T') { echo 'checked="checked"'; } ?> /> <?php _e('Text Post', 'social-networks-auto-poster-facebook-twitter-g'); ?> - <i><?php _e('just text message', 'social-networks-auto-poster-facebook-twitter-g'); ?> </i><br/> <span class="nxs_li_nxapi_<?php echo $ii; ?> " style="display: <?php echo !empty($options['apiToUse']) && $options['apiToUse'] == 'nx' ? "block" : "none"; ?> ;"> <input type="radio" name="li[<?php echo $ii; ?> ][postType]" value="I" <?php if ($options['postType'] == 'I') { echo 'checked="checked"'; } ?> /> <?php _e('Image Post', 'social-networks-auto-poster-facebook-twitter-g'); ?> - <i><?php _e('big image with text message (Profiles and Company pages only)', 'social-networks-auto-poster-facebook-twitter-g'); ?> </i><br/> </span> <input type="radio" name="li[<?php echo $ii; ?> ][postType]" value="A" <?php if (!isset($options['postType']) || $options['postType'] == '' || $options['postType'] == 'A') { echo 'checked="checked"'; } ?> /> <?php _e('Add blogpost to LinkedIn message as an attachment', 'social-networks-auto-poster-facebook-twitter-g'); ?> <br/> <div style="margin-left: 10px;"> <strong><?php _e('Attachment Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong><br/> <input value="1" id="apLIMsgAFrmtA<?php echo $ii; ?> " <?php if (trim($options['liMsgAFrmt']) == '') { echo "checked"; } ?> onchange="if (jQuery(this).is(':checked')) { jQuery('#apLIMsgAFrmtDiv<?php echo $ii; ?> ').hide(); jQuery('#apLIMsgAFrmt<?php echo $ii; ?> ').val(''); }else jQuery('#apLIMsgAFrmtDiv<?php echo $ii; ?> ').show();" type="checkbox" name="li[<?php echo $ii; ?> ][apLIMsgAFrmtA]"/> <strong><?php _e('Auto', 'social-networks-auto-poster-facebook-twitter-g'); ?> </strong> <i> - <?php _e('Recommended. Info from SEO Plugins will be used, then post excerpt, then post text', 'social-networks-auto-poster-facebook-twitter-g'); ?> </i><br/> <div id="apLIMsgAFrmtDiv<?php echo $ii; ?> " style="<?php if ($options['liMsgAFrmt'] == '') { echo "display:none;"; } ?> " > <?php _e('Set your own format', 'social-networks-auto-poster-facebook-twitter-g'); ?> :<input name="li[<?php echo $ii; ?> ][apLIMsgAFrmt]" id="apLIMsgAFrmt<?php echo $ii; ?> " style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['liMsgAFrmt'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /><br/></div> </div> </div><br/> <br/> <div id="altFormat" style="display: <?php echo !empty($options['apiToUse']) && $options['apiToUse'] == 'nx' ? "block" : "none"; ?> ;"> <div style="width:100%;"><strong id="altFormatText"><?php _e('Message title Format (Groups Only)', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong> </div> <input name="li[<?php echo $ii; ?> ][apLIMsgFrmtT]" id="li<?php echo $ii; ?> SNAPformatT" style="width: 50%;" value="<?php if ($isNew) { echo "New Post - %TITLE%"; } else { _e(apply_filters('format_to_edit', htmlentities($options['liMsgFormatT'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); } ?> " onfocus="mxs_showFrmtInfo('apLIMsgFrmtT<?php echo $ii; ?> ');" /><?php nxs_doShowHint("apIPMsgFrmt" . $ii); ?> </div> <br/> <?php if ($options['liAPIKey'] != '' || isset($options['uPass']) && $options['uPass'] != '') { ?> <br/><b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('LI', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?> </a> <?php if (!isset($options['liOK']) || $options['liOK'] == '') { ?> <div class="blnkg"><=== Click "Test" to finish setup ===</div> <?php } ?> <br/><?php } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?> " /></div> </div> </div> <?php }
function showNTSettings($ii, $options, $isNew = false) { global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt); if (!isset($options['nHrs'])) { $options['nHrs'] = 0; } if (!isset($options['nMin'])) { $options['nMin'] = 0; } if (!isset($options['catSel'])) { $options['catSel'] = 0; } if (!isset($options['catSelEd'])) { $options['catSelEd'] = ''; } if (!isset($options['nDays'])) { $options['nDays'] = 0; } if (!isset($options['qTLng'])) { $options['qTLng'] = ''; } if (!isset($options['nsfw'])) { $options['nsfw'] = ''; } ?> <div id="doSU<?php echo $ii; ?> Div" class="insOneDiv<?php if ($isNew) { echo " clNewNTSets"; } ?> "> <input type="hidden" name="apDoSSU<?php echo $ii; ?> " value="0" id="apDoSSU<?php echo $ii; ?> " /> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/su16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-stumbleupon-social-networks-auto-poster-wordpress/"><?php $nType = "StumbleUpon"; printf(__('Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?> </a></div> <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?> </i> </div><input name="su[<?php echo $ii; ?> ][nName]" id="sunName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /><br/> <?php echo nxs_addQTranslSel('su', $ii, $options['qTLng']); ?> <br/> <ul class="nsx_tabs"> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a></li> <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt . $ii; ?> _tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a></li> <?php } ?> </ul> <div class="nsx_tab_container"><?php /* ######################## Account Tab ####################### */ ?> <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%;"> <div style="width:100%;"><strong>StumbleUpon Username:</strong> </div><input name="su[<?php echo $ii; ?> ][apSUUName]" id="apSUUName" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['suUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <div style="width:100%;"><strong>StumbleUpon Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="su[<?php echo $ii; ?> ][apSUPass]" id="apSUPass" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['suPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($options['suPass'], 5)) : $options['suPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <br/> <?php if ($isNew) { ?> <input type="hidden" name="su[<?php echo $ii; ?> ][apDoSU]" value="1" id="apDoNewSU<?php echo $ii; ?> " /> <?php } ?> <br/> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText">StumbleUpon Category:</strong> </div> <select name="su[<?php echo $ii; ?> ][apSUCat]" id="apSUCat<?php echo $ii; ?> "><option value="error" selected="selected" disabled="">Select default StumbleUpon Category</option> <?php $suCats = $this->suCats(); if (isset($options['suCat']) && $options['suCat'] != '') { $suCats = str_replace('"' . $options['suCat'] . '"', '"' . $options['suCat'] . '" selected="selected"', $suCats); } echo $suCats; ?> </select> <input value="1" id="suInclTags" type="checkbox" name="su[<?php echo $ii; ?> ][nsfw]" <?php if ((int) $options['nsfw'] == 1) { echo "checked"; } ?> /> <strong>NSFW</strong> </div> <p style="margin-bottom: 20px;margin-top: 5px;"><input value="1" id="suInclTags" type="checkbox" name="su[<?php echo $ii; ?> ][suInclTags]" <?php if ((int) $options['suInclTags'] == 1) { echo "checked"; } ?> /> <strong>Post with tags</strong> Tags from the blogpost will be auto posted to StumbleUpon </p> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?> </strong> (<a href="#" id="apSUMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apSUMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a>)</div> <textarea cols="150" rows="3" id="su<?php echo $ii; ?> SNAPformat" name="su[<?php echo $ii; ?> ][apSUMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#su<?php echo $ii; ?> SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apSUMsgFrmt<?php echo $ii; ?> ');"><?php if ($isNew) { echo "%TITLE% - %EXCERPT%"; } else { _e(apply_filters('format_to_edit', htmlentities($options['suMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); } ?> </textarea> <?php nxs_doShowHint("apSUMsgFrmt" . $ii); ?> </div><br/> <?php if ($options['suPass'] != '') { ?> <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('SU', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?> </a> <?php } ?> </div> <?php /* ######################## Advanced Tab ####################### */ ?> <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt . $ii; ?> _tab2" class="nsx_tab_content"> <?php nxs_showCatTagsCTFilters($nt, $ii, $options); nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']); nxs_showRepostSettings($nt, $ii, $options); ?> </div> <?php } ?> <?php /* #### End of Tab #### */ ?> </div><br/> <?php /* #### End of Tabs #### */ ?> <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?> " /></div></div><?php }