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')) { nxs_show_noLibWrn('YouTube API Library module NOT found.<br/><br/><span style="color:black;">YouTube does not have a free native API for automated posts yet.</span><br/><br/><span style="font-size: 12px;color:black;">You need to have a special API Library Module to be able to publish your content to YouTube.</span>'); echo "</div>"; return; } ?> <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?> img/yt16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/instructions/youtube-social-networks-auto-poster-wordpress-setup-installation/"><?php $nType = "YouTube"; printf(__('Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?> </a></div> <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?> </i> </div><input name="yt[<?php echo $ii; ?> ][nName]" id="ytnName<?php echo $ii; ?> " style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /><br/> <?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', '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>YouTube(Google) Username:</strong> </div><input name="yt[<?php echo $ii; ?> ][apYTUName]" id="apYTUName" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['ytUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <div style="width:100%;"><strong>YouTube(Google) Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="yt[<?php echo $ii; ?> ][apYTPass]" id="apYTPass" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['ytPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($options['ytPass'], 5)) : $options['ytPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <br/> <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")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <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")), 'social-networks-auto-poster-facebook-twitter-g'); ?> " /> <br/><br/> <div id="altFormat" style=""> <div style="width:100%;"><strong id="altFormatText"><?php _e('Message text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</strong> (<a href="#" id="apYTMsgFrmt<?php echo $ii; ?> HintInfo" onclick="mxs_showHideFrmtInfo('apYTMsgFrmt<?php echo $ii; ?> '); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?> </a>) </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%", 'social-networks-auto-poster-facebook-twitter-g'); } else { _e(apply_filters('format_to_edit', htmlentities($options['ytMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); } ?> </textarea> <?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', 'social-networks-auto-poster-facebook-twitter-g'); ?> :</b> <a href="#" class="NXSButton" onclick="testPost('YT', '<?php echo $ii; ?> '); return false;"><?php printf(__('Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g'), $nType); ?> </a> <?php } ?> </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; $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, $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; $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="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') || defined('d1') && d1 == 1) { nxs_show_noLibWrn('Pinterest API Library module NOT found.<br/><br/><span style="color:black;">Pinterest doesn\'t have a free native API for automated posts yet.</span><br/><br/><span style="font-size: 12px;color:black;">You need to have a special API Library Module to be able to publish your content to Pinterest.</span>'); echo "</div>"; return; } ?> <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; $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; $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 }