Esempio n. 1
0
        function showNTSettings($ii, $options, $isNew = false)
        {
            global $nxs_plurl;
            ?>
    <div id="doBG<?php 
            echo $ii;
            ?>
Div" class="insOneDiv<?php 
            if ($isNew) {
                ?>
 clNewNTSets<?php 
            }
            ?>
" style="background-image: url(<?php 
            echo $nxs_plurl;
            ?>
img/bg-bg.png);background-position:90% 10%;"> <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 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 easely 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']);
            ?>
            <?php 
            echo nxs_addPostingDelaySel('bg', $ii, $options['nHrs'], $options['nMin']);
            ?>
            
             <?php 
            if (!$isNew) {
                ?>
    <div style="width:100%;"><strong><?php 
                _e('Categories', 'nxs_snap');
                ?>
:</strong>
       <input value="0" id="catSelA<?php 
                echo $ii;
                ?>
" type="radio" name="bg[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $options['catSel'] != 1) {
                    echo "checked";
                }
                ?>
 /> All                                  
       <input value="1" id="catSelSBG<?php 
                echo $ii;
                ?>
" type="radio" name="bg[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $options['catSel'] == 1) {
                    echo "checked";
                }
                ?>
 /> <a href="#" style="text-decoration: none;" class="showCats" id="nxs_SCA_BG<?php 
                echo $ii;
                ?>
" onclick="jQuery('#catSelSBG<?php 
                echo $ii;
                ?>
').attr('checked', true); jQuery('#tmpCatSelNT').val('BG<?php 
                echo $ii;
                ?>
'); nxs_markCats( jQuery('#nxs_SC_BG<?php 
                echo $ii;
                ?>
').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php 
                if ($options['catSelEd'] != '') {
                    echo "[" . (substr_count($options['catSelEd'], ",") + 1) . "]";
                }
                ?>
</a>       
       <input type="hidden" name="bg[<?php 
                echo $ii;
                ?>
][catSelEd]" id="nxs_SC_BG<?php 
                echo $ii;
                ?>
" value="<?php 
                echo $options['catSelEd'];
                ?>
" />
       <br/><i><?php 
                _e('Only selected categories will be autoposted to this account', 'nxs_snap');
                ?>
</i>
    </div> 
    <br/>
    <?php 
            }
            ?>
            
            <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'] != '') {
                ?>
            <?php 
                wp_nonce_field('rePostToBG', 'rePostToBG_wpnonce');
                ?>
            <b><?php 
                _e('Test your settings', 'nxs_snap');
                ?>
:</b>&nbsp;&nbsp;&nbsp; <?php 
                if (!isset($options['bgOK']) || $options['bgOK'] != '1') {
                    ?>
 <div class="blnkg">=== <?php 
                    _e('Submit Test Post to Finish Configuration', 'nxs_snap');
                    ?>
 ===&gt;</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 class="submit"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
            _e('Update Settings', 'nxs_snap');
            ?>
" /></div>
            </div>
        </div>
        <?php 
        }
Esempio n. 2
0
        function showNTSettings($ii, $two, $isNew = false)
        {
            global $nxs_plurl, $plgn_NS_SNAutoPoster;
            if (!isset($plgn_NS_SNAutoPoster)) {
                return;
            }
            $gOptions = $plgn_NS_SNAutoPoster->nxs_options;
            ?>
    <div id="doTW<?php 
            echo $ii;
            ?>
Div" class="insOneDiv<?php 
            if ($isNew) {
                echo " clNewNTSets";
            }
            ?>
" style="background-image: url(<?php 
            echo $nxs_plurl;
            ?>
img/tw-bg.png);  background-position:90% 10%;">   <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 easely identify it', 'nxs_snap');
            ?>
</i> </div><input 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($two['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" /><br/>
    <?php 
            echo nxs_addQTranslSel('tw', $ii, $two['qTLng']);
            echo nxs_addPostingDelaySel('tw', $ii, $two['nHrs'], $two['nMin']);
            ?>
    
     <?php 
            if (!$isNew) {
                ?>
    <div style="width:100%;"><strong><?php 
                _e('Categories', 'nxs_snap');
                ?>
:</strong>
       <input value="0" id="catSelA<?php 
                echo $ii;
                ?>
" type="radio" name="tw[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $two['catSel'] != 1) {
                    echo "checked";
                }
                ?>
 /> All                                  
       <input value="1" id="catSelSTW<?php 
                echo $ii;
                ?>
" type="radio" name="tw[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $two['catSel'] == 1) {
                    echo "checked";
                }
                ?>
 /> <a href="#" style="text-decoration: none;" class="showCats" id="nxs_SCA_TW<?php 
                echo $ii;
                ?>
" onclick="jQuery('#catSelSTW<?php 
                echo $ii;
                ?>
').attr('checked', true); jQuery('#tmpCatSelNT').val('TW<?php 
                echo $ii;
                ?>
'); nxs_markCats( jQuery('#nxs_SC_TW<?php 
                echo $ii;
                ?>
').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php 
                if ($two['catSelEd'] != '') {
                    echo "[" . (substr_count($two['catSelEd'], ",") + 1) . "]";
                }
                ?>
</a>       
       <input type="hidden" name="tw[<?php 
                echo $ii;
                ?>
][catSelEd]" id="nxs_SC_TW<?php 
                echo $ii;
                ?>
" value="<?php 
                echo $two['catSelEd'];
                ?>
" />
    <br/><i><?php 
                _e('Only selected categories will be autoposted to this account', 'nxs_snap');
                ?>
</i></div> 
    <br/>
    <?php 
            }
            ?>
    
    <div style="width:100%;"><strong>Your Twitter URL:</strong> </div><input name="tw[<?php 
            echo $ii;
            ?>
][apTWURL]" id="apTWURL" style="width: 40%;border: 1px solid #ACACAC;" value="<?php 
            _e(apply_filters('format_to_edit', htmlentities($two['twURL'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" />
    <div style="width:100%;"><strong>Your Twitter Consumer Key:</strong> </div><input name="tw[<?php 
            echo $ii;
            ?>
][apTWConsKey]" id="apTWConsKey" style="width: 40%; border: 1px solid #ACACAC;" value="<?php 
            _e(apply_filters('format_to_edit', htmlentities($two['twConsKey'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" />  
    <div style="width:100%;"><strong>Your Twitter Consumer Secret:</strong> </div><input name="tw[<?php 
            echo $ii;
            ?>
][apTWConsSec]" id="apTWConsSec" style="width: 40%;" value="<?php 
            _e(apply_filters('format_to_edit', htmlentities($two['twConsSec'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" />
    <div style="width:100%;"><strong>Your Access Token:</strong> </div><input name="tw[<?php 
            echo $ii;
            ?>
][apTWAccToken]" id="apTWAccToken" style="width: 40%;" value="<?php 
            _e(apply_filters('format_to_edit', htmlentities($two['twAccToken'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" />
    <div style="width:100%;"><strong>Your Access Token Secret:</strong> </div><input name="tw[<?php 
            echo $ii;
            ?>
][apTWAccTokenSec]" id="apTWAccTokenSec" style="width: 40%;" value="<?php 
            _e(apply_filters('format_to_edit', htmlentities($two['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) $two['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>
    <input name="tw[<?php 
            echo $ii;
            ?>
][apTWMsgFrmt]" id="apTWMsgFrmt" style="width: 50%;" value="<?php 
            if (!$isNew) {
                _e(apply_filters('format_to_edit', htmlentities($two['twMsgFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            } else {
                echo "%TITLE% - %URL%";
            }
            ?>
"  onfocus="mxs_showFrmtInfo('apTWMsgFrmt<?php 
            echo $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>');
            ?>
    
  <br/><br/>
   <div style="width:100%;"><strong style="font-size: 16px;"><?php 
            _e('Twitter Replies and Mentions:', 'nxs_snap');
            ?>
</strong> </div>
   <div style="margin-bottom: 5px; margin-left: 10px; ">
   <p style="font-size: 11px; margin: 0px;"><?php 
            _e('Plugin could grab Replies and Mentions from Twitter and import them as Wordpress Comments', 'nxs_snap');
            ?>
</p>
   
   <?php 
            if ($gOptions['riActive'] == '1') {
                ?>
   <input value="1"  id="riC<?php 
                echo $ii;
                ?>
" <?php 
                if (trim($two['riComments']) == '1') {
                    echo "checked";
                }
                ?>
 type="checkbox" name="tw[<?php 
                echo $ii;
                ?>
][riComments]"/> <strong><?php 
                _e('Import Twitter Replies', 'nxs_snap');
                ?>
</strong>
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   <input value="1"  id="riCM<?php 
                echo $ii;
                ?>
" <?php 
                if (trim($two['riCommentsM']) == '1') {
                    echo "checked";
                }
                ?>
 type="checkbox" name="tw[<?php 
                echo $ii;
                ?>
][riCommentsM]"/> <strong><?php 
                _e('Import Twitter Mentions', 'nxs_snap');
                ?>
</strong>
   <br/>
   <div style="margin-bottom: 5px; margin-left: 10px; ">
   <input value="1"  id="riCA<?php 
                echo $ii;
                ?>
" <?php 
                if (trim($two['riCommentsAA']) == '1') {
                    echo "checked";
                }
                ?>
 type="checkbox" name="tw[<?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 - Other Settings', 'nxs_snap');
            }
            ?>
   
   </div>
               
    <?php 
            if ($two['twAccTokenSec'] != '') {
                ?>
 <?php 
                wp_nonce_field('rePostToTW', 'rePostToTW_wpnonce');
                ?>
      <br/><br/><b><?php 
                _e('Test your settings', 'nxs_snap');
                ?>
:</b>&nbsp;&nbsp;&nbsp; <?php 
                if (!isset($two['twOK']) || $two['twOK'] != '1') {
                    ?>
 <div class="blnkg">=== Submit Test Post to Complete ===&gt;</div> <?php 
                }
                ?>
 <a href="#" class="NXSButton" onclick="testPost('TW', '<?php 
                echo $ii;
                ?>
'); return false;"><?php 
                printf(__('Submit Test Post to %s', 'nxs_snap'), $nType);
                ?>
</a> <br/>
      <?php 
            }
            ?>
      <div class="submit"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
            _e('Update Settings', 'nxs_snap');
            ?>
" /></div>
    </div>
    <?php 
        }
Esempio n. 3
0
        function showNTSettings($ii, $gpo, $isNew = false)
        {
            global $nxs_plurl;
            ?>
            <div id="doDL<?php 
            echo $ii;
            ?>
Div" class="insOneDiv<?php 
            if ($isNew) {
                echo " clNewNTSets";
            }
            ?>
" style="max-width: 1000px; background-color: #EBF4FB; background-image: url(<?php 
            echo $nxs_plurl;
            ?>
img/dl-bg.png);  background-position:90% 10%; background-repeat: no-repeat; 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', 'nxs_snap'), $nType);
            ?>
</a></div>
            
            <div style="width:100%;"><strong><?php 
            _e('Account Nickname', 'nxs_snap');
            ?>
:</strong> <i><?php 
            _e('Just so you can easely identify it', 'nxs_snap');
            ?>
</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($gpo['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" /><br/>
            <?php 
            echo nxs_addQTranslSel('dl', $ii, $gpo['qTLng']);
            echo nxs_addPostingDelaySel('dl', $ii, $gpo['nHrs'], $gpo['nMin']);
            ?>
            
            <?php 
            if (!$isNew) {
                ?>
    <div style="width:100%;"><strong><?php 
                _e('Categories', 'nxs_snap');
                ?>
:</strong>
       <input value="0" id="catSelA<?php 
                echo $ii;
                ?>
" type="radio" name="dl[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $gpo['catSel'] != 1) {
                    echo "checked";
                }
                ?>
 /> All                                  
       <input value="1" id="catSelSDL<?php 
                echo $ii;
                ?>
" type="radio" name="dl[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $gpo['catSel'] == 1) {
                    echo "checked";
                }
                ?>
 /> <a href="#" style="text-decoration: none;" class="showCats" id="nxs_SCA_DL<?php 
                echo $ii;
                ?>
" onclick="jQuery('#catSelSDL<?php 
                echo $ii;
                ?>
').attr('checked', true); jQuery('#tmpCatSelNT').val('DL<?php 
                echo $ii;
                ?>
'); nxs_markCats( jQuery('#nxs_SC_DL<?php 
                echo $ii;
                ?>
').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php 
                if ($gpo['catSelEd'] != '') {
                    echo "[" . (substr_count($gpo['catSelEd'], ",") + 1) . "]";
                }
                ?>
</a>       
       <input type="hidden" name="dl[<?php 
                echo $ii;
                ?>
][catSelEd]" id="nxs_SC_DL<?php 
                echo $ii;
                ?>
" value="<?php 
                echo $gpo['catSelEd'];
                ?>
" />
    <br/><i><?php 
                _e('Only selected categories will be autoposted to this account', 'nxs_snap');
                ?>
</i></div> 
    <br/>
    <?php 
            }
            ?>
            
            <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($gpo['dlUName'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" />                
            <div style="width:100%;"><strong>Delicious Password:</strong> </div><input name="dl[<?php 
            echo $ii;
            ?>
][apDLPass]" id="apDLPass" type="password" style="width: 30%;" value="<?php 
            _e(apply_filters('format_to_edit', htmlentities(substr($gpo['dlPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($gpo['dlPass'], 5)) : $gpo['dlPass'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" />  <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', 'nxs_snap');
            ?>
</strong> (<a href="#" id="apDLTMsgFrmt<?php 
            echo $ii;
            ?>
HintInfo" onclick="mxs_showHideFrmtInfo('apDLTMsgFrmt<?php 
            echo $ii;
            ?>
'); return false;"><?php 
            _e('Show format info', 'nxs_snap');
            ?>
</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($gpo['dlMsgTFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            }
            ?>
" 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', 'nxs_snap');
            ?>
</strong> (<a href="#" id="apDLMsgFrmt<?php 
            echo $ii;
            ?>
HintInfo" onclick="mxs_showHideFrmtInfo('apDLMsgFrmt<?php 
            echo $ii;
            ?>
'); return false;"><?php 
            _e('Show format info', 'nxs_snap');
            ?>
</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($gpo['dlMsgFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            }
            ?>
</textarea>
  
              <?php 
            nxs_doShowHint("apDLMsgFrmt" . $ii);
            ?>
            </div><br/>    
            
            <?php 
            if ($gpo['dlPass'] != '') {
                ?>
            <?php 
                wp_nonce_field('rePostToDL', 'rePostToDL_wpnonce');
                ?>
            <b><?php 
                _e('Test your settings', 'nxs_snap');
                ?>
:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('DL', '<?php 
                echo $ii;
                ?>
'); return false;"><?php 
                printf(__('Submit Test Post to %s', 'nxs_snap'), $nType);
                ?>
</a>      
               
            <?php 
            }
            ?>
<div class="submit"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
            _e('Update Settings', 'nxs_snap');
            ?>
" /></div></div><?php 
        }
Esempio n. 4
0
        function showNTSettings($ii, $options, $isNew = false)
        {
            global $nxs_plurl;
            ?>
             <div id="doPN<?php 
            echo $ii;
            ?>
Div" class="insOneDiv<?php 
            if ($isNew) {
                echo " clNewNTSets";
            }
            ?>
" style="background-image: url(<?php 
            echo $nxs_plurl;
            ?>
img/pn-bg.png);  background-position:90% 10%;">     <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 easely 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']);
            echo nxs_addPostingDelaySel('pn', $ii, $options['nHrs'], $options['nMin']);
            ?>
            
             <?php 
            if (!$isNew) {
                ?>
    <div style="width:100%;"><strong><?php 
                _e('Categories', 'nxs_snap');
                ?>
:</strong>
       <input value="0" id="catSelA<?php 
                echo $ii;
                ?>
" type="radio" name="pn[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $options['catSel'] != 1) {
                    echo "checked";
                }
                ?>
 /> All                                  
       <input value="1" id="catSelSPN<?php 
                echo $ii;
                ?>
" type="radio" name="pn[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $options['catSel'] == 1) {
                    echo "checked";
                }
                ?>
 /> <a href="#" style="text-decoration: none;" class="showCats" id="nxs_SCA_PN<?php 
                echo $ii;
                ?>
" onclick="jQuery('#catSelSPN<?php 
                echo $ii;
                ?>
').attr('checked', true); jQuery('#tmpCatSelNT').val('PN<?php 
                echo $ii;
                ?>
'); nxs_markCats( jQuery('#nxs_SC_PN<?php 
                echo $ii;
                ?>
').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php 
                if ($options['catSelEd'] != '') {
                    echo "[" . (substr_count($options['catSelEd'], ",") + 1) . "]";
                }
                ?>
</a>       
       <input type="hidden" name="pn[<?php 
                echo $ii;
                ?>
][catSelEd]" id="nxs_SC_PN<?php 
                echo $ii;
                ?>
" value="<?php 
                echo $options['catSelEd'];
                ?>
" />
    <br/><i><?php 
                _e('Only selected categories will be autoposted to this account', 'nxs_snap');
                ?>
</i></div> 
    <br/>
    <?php 
            }
            ?>
                  
            <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/>                
            <div style="width:100%;"><strong>Default Image to Pin:</strong> 
            <p style="font-size: 11px; margin: 0px;">If your post missing Featured Image 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="getBoards(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>
            <?php 
            wp_nonce_field('getBoards', 'getBoards_wpnonce');
            ?>
<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 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'] != '') {
                ?>
            <?php 
                wp_nonce_field('rePostToPN', 'rePostToPN_wpnonce');
                ?>
            <b><?php 
                _e('Test your settings', 'nxs_snap');
                ?>
:</b>&nbsp;&nbsp;&nbsp; <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 class="submit"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
            _e('Update Settings', 'nxs_snap');
            ?>
" /></div>
            </div>
  </div>
            <?php 
        }
Esempio n. 5
0
        function showNTSettings($ii, $options, $isNew = false)
        {
            global $nxs_plurl, $nxs_snapThisPageUrl;
            ?>
    <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 easely 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']);
            echo nxs_addPostingDelaySel('tr', $ii, $options['nHrs'], $options['nMin']);
            ?>
            
             <?php 
            if (!$isNew) {
                ?>
    <div style="width:100%;"><strong><?php 
                _e('Categories', 'nxs_snap');
                ?>
:</strong>
       <input value="0" id="catSelA<?php 
                echo $ii;
                ?>
" type="radio" name="tr[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $options['catSel'] != 1) {
                    echo "checked";
                }
                ?>
 /> All                                  
       <input value="1" id="catSelSTR<?php 
                echo $ii;
                ?>
" type="radio" name="tr[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $options['catSel'] == 1) {
                    echo "checked";
                }
                ?>
 /> <a href="#" style="text-decoration: none;" class="showCats" id="nxs_SCA_TR<?php 
                echo $ii;
                ?>
" onclick="jQuery('#catSelSTR<?php 
                echo $ii;
                ?>
').attr('checked', true); jQuery('#tmpCatSelNT').val('TR<?php 
                echo $ii;
                ?>
'); nxs_markCats( jQuery('#nxs_SC_TR<?php 
                echo $ii;
                ?>
').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php 
                if ($options['catSelEd'] != '') {
                    echo "[" . (substr_count($options['catSelEd'], ",") + 1) . "]";
                }
                ?>
</a>       
       <input type="hidden" name="tr[<?php 
                echo $ii;
                ?>
][catSelEd]" id="nxs_SC_TR<?php 
                echo $ii;
                ?>
" value="<?php 
                echo $options['catSelEd'];
                ?>
" />
    <br/><i><?php 
                _e('Only selected categories will be autoposted to this account', 'nxs_snap');
                ?>
</i></div> 
    <br/>
    <?php 
            }
            ?>
            
            <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&nbsp;&nbsp;
<input type="radio" name="tr[<?php 
            echo $ii;
            ?>
][cImgURL]" value="S" <?php 
            if ($options['cImgURL'] == 'S') {
                echo 'checked="checked"';
            }
            ?>
 /> Shortened Post URL&nbsp;&nbsp;
<input type="radio" name="tr[<?php 
            echo $ii;
            ?>
][cImgURL]" value="N" <?php 
            if ($options['cImgURL'] == 'N') {
                echo 'checked="checked"';
            }
            ?>
 /> No Clickthrough URL&nbsp;&nbsp;
</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"  id="trInclTags" 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"  id="trInclCats" 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_snapThisPageUrl;
                ?>
&auth=tr&acc=<?php 
                echo $ii;
                ?>
">Authorize Your Tumblr Account</a> 
              <?php 
                if (!isset($options['trOAuthTokenSecret']) || $options['trOAuthTokenSecret'] == '') {
                    ?>
 <div class="blnkg">&lt;=== Authorize your account ===</div> <?php 
                }
                ?>
            
            <?php 
            }
            ?>
            
            
            
            <?php 
            if (isset($options['trOAuthTokenSecret']) && $options['trOAuthTokenSecret'] != '') {
                ?>
            <?php 
                wp_nonce_field('rePostToTR', 'rePostToTR_wpnonce');
                ?>
            <br/><br/><b><?php 
                _e('Test your settings', 'nxs_snap');
                ?>
:</b>&nbsp;&nbsp;&nbsp; <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 class="submit"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
            _e('Update Settings', 'nxs_snap');
            ?>
" /></div>  
            
        </div>
        <?php 
        }
Esempio n. 6
0
        function showNTSettings($ii, $gpo, $isNew = false)
        {
            global $nxs_plurl;
            ?>
            <div id="doGP<?php 
            echo $ii;
            ?>
Div" class="insOneDiv<?php 
            if ($isNew) {
                echo " clNewNTSets";
            }
            ?>
" style="background-image: url(<?php 
            echo $nxs_plurl;
            ?>
img/gp-bg.png);  background-position:90% 10%;">     <input type="hidden" name="apDoSGP<?php 
            echo $ii;
            ?>
" value="0" id="apDoSGP<?php 
            echo $ii;
            ?>
" />             
            <?php 
            if (!function_exists('doPostToGooglePlus')) {
                ?>
<span style="color:#580000; font-size: 16px;"><br/><br/>
            <b><?php 
                _e('Google+ API Library not found', 'nxs_snap');
                ?>
</b>
             <br/><br/> <?php 
                _e('Google+ 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/">Google+ API</a> is "Read Only" and can\'t be used for posting.  <br/><br/>You need to get a special <a target="_blank" href="http://www.nextscripts.com/google-plus-automated-posting"><b>API Library Module</b></a> to be able to publish your content to Google+.', 'nxs_snap');
                ?>
</span></div>
            <?php 
                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 easely 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($gpo['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" /><br/>
            <?php 
            echo nxs_addQTranslSel('gp', $ii, $gpo['qTLng']);
            echo nxs_addPostingDelaySel('gp', $ii, $gpo['nHrs'], $gpo['nMin']);
            ?>
            
            <?php 
            if (!$isNew) {
                ?>
    <div style="width:100%;"><strong><?php 
                _e('Categories', 'nxs_snap');
                ?>
:</strong>
       <input value="0" id="catSelA<?php 
                echo $ii;
                ?>
" type="radio" name="gp[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $gpo['catSel'] != 1) {
                    echo "checked";
                }
                ?>
 /> All                                  
       <input value="1" id="catSelSGP<?php 
                echo $ii;
                ?>
" type="radio" name="gp[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $gpo['catSel'] == 1) {
                    echo "checked";
                }
                ?>
 /> <a href="#" style="text-decoration: none;" class="showCats" id="nxs_SCA_GP<?php 
                echo $ii;
                ?>
" onclick="jQuery('#catSelSGP<?php 
                echo $ii;
                ?>
').attr('checked', true); jQuery('#tmpCatSelNT').val('GP<?php 
                echo $ii;
                ?>
'); nxs_markCats( jQuery('#nxs_SC_GP<?php 
                echo $ii;
                ?>
').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php 
                if ($gpo['catSelEd'] != '') {
                    echo "[" . (substr_count($gpo['catSelEd'], ",") + 1) . "]";
                }
                ?>
</a>       
       <input type="hidden" name="gp[<?php 
                echo $ii;
                ?>
][catSelEd]" id="nxs_SC_GP<?php 
                echo $ii;
                ?>
" value="<?php 
                echo $gpo['catSelEd'];
                ?>
" />
    <br/><i><?php 
                _e('Only selected categories will be autoposted to this account', 'nxs_snap');
                ?>
</i></div> 
    <br/>
    <?php 
            }
            ?>
            
            <div style="width:100%;"><strong>Google+ Username:</strong> </div><input name="gp[<?php 
            echo $ii;
            ?>
][apGPUName]" id="apGPUName" style="width: 30%;" value="<?php 
            _e(apply_filters('format_to_edit', htmlentities($gpo['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" type="password" style="width: 30%;" value="<?php 
            _e(apply_filters('format_to_edit', htmlentities(substr($gpo['gpPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($gpo['gpPass'], 5)) : $gpo['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($gpo['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" style="width: 30%;" value="<?php 
            _e(apply_filters('format_to_edit', htmlentities($gpo['gpCommID'], 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="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($gpo['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>&lt;-- (<a id="showShAtt" onmouseout="hidePopShAtt('<?php 
            echo $ii;
            ?>
XG');" onmouseover="showPopShAtt('<?php 
            echo $ii;
            ?>
XG', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php 
            _e('What\'s the difference?', 'nxs_snap');
            ?>
</a>)  </div>                      
<div style="margin-left: 10px;">
        <?php 
            if (!isset($gpo['postType']) || $gpo['postType'] == '') {
                if ((int) $gpo['imgPost'] == 1) {
                    $gpo['postType'] = 'I';
                }
                if ((int) $gpo['gpAttch'] == 1 || $isNew) {
                    $gpo['postType'] = 'A';
                }
            }
            ?>
        <input type="radio" name="gp[<?php 
            echo $ii;
            ?>
][postType]" value="T" <?php 
            if ($gpo['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 ($gpo['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($gpo['postType']) || $gpo['postType'] == '' || $gpo['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 ($gpo['gpPass'] != '') {
                ?>
            <?php 
                wp_nonce_field('rePostToGP', 'rePostToGP_wpnonce');
                ?>
            <b><?php 
                _e('Test your settings', 'nxs_snap');
                ?>
:</b>&nbsp;&nbsp;&nbsp; <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 class="submit"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
            _e('Update Settings', 'nxs_snap');
            ?>
" /></div></div><?php 
        }
Esempio n. 7
0
        function showNTSettings($ii, $options, $isNew = false)
        {
            global $nxs_plurl, $nxs_snapThisPageUrl;
            if (!isset($options['liOK'])) {
                $options['liOK'] = '';
            }
            ?>
    <div id="doLI<?php 
            echo $ii;
            ?>
Div" class="insOneDiv<?php 
            if ($isNew) {
                echo " clNewNTSets";
            }
            ?>
" style="background-image: url(<?php 
            echo $nxs_plurl;
            ?>
img/li-bg.png);  background-position:90% 10%;">   <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 easely 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']);
            echo nxs_addPostingDelaySel('li', $ii, $options['nHrs'], $options['nMin']);
            ?>
            
            <?php 
            if (!$isNew) {
                ?>
    <div style="width:100%;"><strong><?php 
                _e('Categories', 'nxs_snap');
                ?>
:</strong>
       <input value="0" id="catSelA<?php 
                echo $ii;
                ?>
" type="radio" name="li[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $options['catSel'] != 1) {
                    echo "checked";
                }
                ?>
 /> All                                  
       <input value="1" id="catSelSLI<?php 
                echo $ii;
                ?>
" type="radio" name="li[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $options['catSel'] == 1) {
                    echo "checked";
                }
                ?>
 /> <a href="#" style="text-decoration: none;" class="showCats" id="nxs_SCA_LI<?php 
                echo $ii;
                ?>
" onclick="jQuery('#catSelSLI<?php 
                echo $ii;
                ?>
').attr('checked', true); jQuery('#tmpCatSelNT').val('LI<?php 
                echo $ii;
                ?>
'); nxs_markCats( jQuery('#nxs_SC_LI<?php 
                echo $ii;
                ?>
').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php 
                if ($options['catSelEd'] != '') {
                    echo "[" . (substr_count($options['catSelEd'], ",") + 1) . "]";
                }
                ?>
</a>       
       <input type="hidden" name="li[<?php 
                echo $ii;
                ?>
][catSelEd]" id="nxs_SC_LI<?php 
                echo $ii;
                ?>
" value="<?php 
                echo $options['catSelEd'];
                ?>
" />
    <br/><i><?php 
                _e('Only selected categories will be autoposted to this account', 'nxs_snap');
                ?>
</i></div> 
    <br/>
    <?php 
            }
            ?>
            
            <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 
                }
                ?>
            
            <a  href="<?php 
                echo $nxs_snapThisPageUrl;
                ?>
&auth=li&acc=<?php 
                echo $ii;
                ?>
">Authorize Your LinkedIn Account</a>  
            
            <?php 
                if (!isset($options['liAccessTokenSecret']) || $options['liAccessTokenSecret'] == '') {
                    ?>
 <div class="blnkg">&lt;=== 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;">  <span style="color:#800000; font-size: 14px;"> <b>Beta</b>, please <a target="_blank" href="http://www.nextscripts.com/support/">report</a> any problems.</span><br/><br/>              
          <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>           
            <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'] != '') {
                ?>
            <?php 
                wp_nonce_field('rePostToLI', 'rePostToLI_wpnonce');
                ?>
            <br/><b><?php 
                _e('Test your settings', 'nxs_snap');
                ?>
:</b>&nbsp;&nbsp;&nbsp; <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">&lt;=== Click "Test" to finish setup ===</div> <?php 
                }
                ?>
            
              <br/><?php 
            }
            ?>
            <div class="submit"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
            _e('Update Settings', 'nxs_snap');
            ?>
" /></div>  
            </div>
        </div>
        <?php 
        }
Esempio n. 8
0
        function showNTSettings($ii, $gpo, $isNew = false)
        {
            global $nxs_plurl;
            ?>
            <div id="doWP<?php 
            echo $ii;
            ?>
Div" class="insOneDiv<?php 
            if ($isNew) {
                echo " clNewNTSets";
            }
            ?>
" style="background-image: url(<?php 
            echo $nxs_plurl;
            ?>
img/wp-bg.png);  background-position:90% 10%;">     <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', 'nxs_snap'), $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', 'nxs_snap');
            ?>
:</strong> <i><?php 
            _e('Just so you can easely identify it', 'nxs_snap');
            ?>
</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($gpo['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" /><br/>
            <?php 
            echo nxs_addQTranslSel('wp', $ii, $gpo['qTLng']);
            echo nxs_addPostingDelaySel('wp', $ii, $gpo['nHrs'], $gpo['nMin']);
            ?>
            
             <?php 
            if (!$isNew) {
                ?>
    <div style="width:100%;"><strong><?php 
                _e('Categories', 'nxs_snap');
                ?>
:</strong>
       <input value="0" id="catSelA<?php 
                echo $ii;
                ?>
" type="radio" name="wp[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $gpo['catSel'] != 1) {
                    echo "checked";
                }
                ?>
 /> All                                  
       <input value="1" id="catSelSWP<?php 
                echo $ii;
                ?>
" type="radio" name="wp[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $gpo['catSel'] == 1) {
                    echo "checked";
                }
                ?>
 /> <a href="#" style="text-decoration: none;" class="showCats" id="nxs_SCA_WP<?php 
                echo $ii;
                ?>
" onclick="jQuery('#catSelSWP<?php 
                echo $ii;
                ?>
').attr('checked', true); jQuery('#tmpCatSelNT').val('WP<?php 
                echo $ii;
                ?>
'); nxs_markCats( jQuery('#nxs_SC_WP<?php 
                echo $ii;
                ?>
').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php 
                if ($gpo['catSelEd'] != '') {
                    echo "[" . (substr_count($gpo['catSelEd'], ",") + 1) . "]";
                }
                ?>
</a>       
       <input type="hidden" name="wp[<?php 
                echo $ii;
                ?>
][catSelEd]" id="nxs_SC_WP<?php 
                echo $ii;
                ?>
" value="<?php 
                echo $gpo['catSelEd'];
                ?>
" />
    <br/><i><?php 
                _e('Only selected categories will be autoposted to this account', 'nxs_snap');
                ?>
</i></div> 
    <br/>
    <?php 
            }
            ?>
            
            <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($gpo['wpURL'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" />
            <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;">http://YourUserName.wordpress.com/xmlrpc.php</b> (replace YourUserName with your user name - for example <i style="color: #005800;">http://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($gpo['wpUName'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" />                
            <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($gpo['wpPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($gpo['wpPass'], 5)) : $gpo['wpPass'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" />  <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', 'nxs_snap');
            ?>
</strong>               
(<a href="#" id="apWPMsgTFrmt<?php 
            echo $ii;
            ?>
HintInfo" onclick="mxs_showHideFrmtInfo('apWPMsgTFrmt<?php 
            echo $ii;
            ?>
'); return false;"><?php 
            _e('Show format info', 'nxs_snap');
            ?>
</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($gpo['wpMsgTFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            }
            ?>
" /> <?php 
            nxs_doShowHint("apWPMsgTFrmt" . $ii);
            ?>
  
            </div>            
            <div id="altFormat" style="">
              <div style="width:100%;"><strong id="altFormatText"><?php 
            _e('Post Text Format', 'nxs_snap');
            ?>
</strong>               
              (<a href="#" id="apWPMsgFrmt<?php 
            echo $ii;
            ?>
HintInfo" onclick="mxs_showHideFrmtInfo('apWPMsgFrmt<?php 
            echo $ii;
            ?>
'); return false;"><?php 
            _e('Show format info', 'nxs_snap');
            ?>
</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($gpo['wpMsgFormat'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            }
            ?>
</textarea>
  <?php 
            nxs_doShowHint("apWPMsgFrmt" . $ii);
            ?>
  
            </div><br/>    
            
            <?php 
            if ($gpo['wpPass'] != '') {
                ?>
            <?php 
                wp_nonce_field('rePostToWP', 'rePostToWP_wpnonce');
                ?>
            <b><?php 
                _e('Test your settings', 'nxs_snap');
                ?>
:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('WP', '<?php 
                echo $ii;
                ?>
'); return false;"><?php 
                printf(__('Submit Test Post to %s', 'nxs_snap'), $nType);
                ?>
</a>      
               
            <?php 
            }
            ?>
<div class="submit"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
            _e('Update Settings', 'nxs_snap');
            ?>
" /></div></div><?php 
        }
Esempio n. 9
0
        function showNTSettings($ii, $fbo, $isNew = false)
        {
            global $nxs_plurl, $nxs_snapThisPageUrl, $plgn_NS_SNAutoPoster;
            if ((int) $fbo['fbAttch'] == 0 && (!isset($fbo['trPostType']) || $fbo['trPostType'] == '')) {
                $fbo['trPostType'] = 'T';
            }
            if (!isset($plgn_NS_SNAutoPoster)) {
                return;
            }
            $gOptions = $plgn_NS_SNAutoPoster->nxs_options;
            if (!isset($fbo['nHrs'])) {
                $fbo['nHrs'] = 0;
            }
            if (!isset($fbo['nMin'])) {
                $fbo['nMin'] = 0;
            }
            if (!isset($fbo['catSel'])) {
                $fbo['catSel'] = 0;
            }
            if (!isset($fbo['catSelEd'])) {
                $fbo['catSelEd'] = '';
            }
            ?>
 
    <div id="doFB<?php 
            echo $ii;
            ?>
Div" class="insOneDiv<?php 
            if ($isNew) {
                echo " clNewNTSets";
            }
            ?>
" style="background-image: url(<?php 
            echo $nxs_plurl;
            ?>
img/fb-bg.png);  background-position:90% 10%;">   <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: 322px; 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/setup-installation-facebook-social-networks-auto-poster-wordpress/"><?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 easely 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($fbo['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" /><br/>
    <?php 
            echo nxs_addQTranslSel('fb', $ii, $fbo['qTLng']);
            ?>
    <?php 
            echo nxs_addPostingDelaySel('fb', $ii, $fbo['nHrs'], $fbo['nMin']);
            ?>
    
    <?php 
            if (!$isNew) {
                ?>
    <div style="width:100%;"><strong><?php 
                _e('Categories', 'nxs_snap');
                ?>
:</strong>
       <input value="0" id="catSelA<?php 
                echo $ii;
                ?>
" type="radio" name="fb[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $fbo['catSel'] != 1) {
                    echo "checked";
                }
                ?>
 /> All                                  
       <input value="1" id="catSelSFB<?php 
                echo $ii;
                ?>
" type="radio" name="fb[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $fbo['catSel'] == 1) {
                    echo "checked";
                }
                ?>
 /> <a href="#" style="text-decoration: none;" class="showCats" id="nxs_SCA_FB<?php 
                echo $ii;
                ?>
" onclick="jQuery('#catSelSFB<?php 
                echo $ii;
                ?>
').attr('checked', true); jQuery('#tmpCatSelNT').val('FB<?php 
                echo $ii;
                ?>
'); nxs_markCats( jQuery('#nxs_SC_FB<?php 
                echo $ii;
                ?>
').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php 
                if ($fbo['catSelEd'] != '') {
                    echo "[" . (substr_count($fbo['catSelEd'], ",") + 1) . "]";
                }
                ?>
</a>       
       <input type="hidden" name="fb[<?php 
                echo $ii;
                ?>
][catSelEd]" id="nxs_SC_FB<?php 
                echo $ii;
                ?>
" value="<?php 
                echo $fbo['catSelEd'];
                ?>
" />
    <br/><i><?php 
                _e('Only selected categories will be autoposted to this account', 'nxs_snap');
                ?>
</i></div> 
    <br/>
    <?php 
            }
            ?>
    <div style="width:100%;"><strong style="font-size: 16px;">Facebook Settings:</strong> </div>
    
    <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($fbo['fbURL'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" />                
    <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($fbo['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($fbo['fbAppSec'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" /><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($fbo['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>&lt;-- (<a id="showShAtt" onmouseout="hidePopShAtt('<?php 
            echo $ii;
            ?>
X');" onmouseover="showPopShAtt('<?php 
            echo $ii;
            ?>
X', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php 
            _e('What\'s the difference?', 'nxs_snap');
            ?>
</a>)  </div>                      
<div style="margin-left: 10px;">
        
        <input type="radio" name="fb[<?php 
            echo $ii;
            ?>
][fbPostType]" value="T" <?php 
            if ($fbo['fbPostType'] == '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;
            ?>
][fbPostType]" value="I" <?php 
            if ($fbo['fbPostType'] == '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');
            ?>
:&nbsp;</strong> 
             <input value="2" id="apFBImgUplAPP<?php 
            echo $ii;
            ?>
" type="radio" name="fb[<?php 
            echo $ii;
            ?>
][apFBImgUpl]" <?php 
            if ((int) $fbo['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) $fbo['imgUpl'] != 2) {
                echo "checked";
            }
            ?>
 /> 
              <?php 
            _e('Timeline', 'nxs_snap');
            ?>
 &lt;-- (<a id="showShAtt" onmouseout="hidePopShAtt('<?php 
            echo $ii;
            ?>
I');" onmouseover="showPopShAtt('<?php 
            echo $ii;
            ?>
I', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php 
            _e('What\'s the difference?', 'nxs_snap');
            ?>
</a>)      
          </div>        
        
        <input type="radio" name="fb[<?php 
            echo $ii;
            ?>
][fbPostType]" value="A" <?php 
            if (!isset($fbo['fbPostType']) || $fbo['fbPostType'] == '' || $fbo['fbPostType'] == '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');
            ?>
:&nbsp;</strong> <input value="2"  id="apFBAttchShare<?php 
            echo $ii;
            ?>
" type="radio" name="fb[<?php 
            echo $ii;
            ?>
][apFBAttch]" <?php 
            if ((int) $fbo['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) $fbo['fbAttch'] == 1) {
                echo "checked";
            }
            ?>
 /> 
              <?php 
            _e('Attach your blogpost', 'nxs_snap');
            ?>
 &lt;-- (<a id="showShAtt" onmouseout="hidePopShAtt('<?php 
            echo $ii;
            ?>
');" onmouseover="showPopShAtt('<?php 
            echo $ii;
            ?>
', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php 
            _e('What\'s the difference?', '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($fbo['fbAttchAsVid']) && (int) $fbo['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>
     <strong><?php 
            _e('Attachment Text Format', 'nxs_snap');
            ?>
:</strong><br/> 
      <input value="1"  id="apFBMsgAFrmtA<?php 
            echo $ii;
            ?>
" <?php 
            if (trim($fbo['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 ($fbo['fbMsgAFrmt'] == '') {
                echo "display:none;";
            }
            ?>
" >&nbsp;&nbsp;&nbsp; <?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($fbo['fbMsgAFrmt'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" /><br/></div>
</div><br/>
   </div>
   <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 ($gOptions['riActive'] == '1') {
                ?>
   <input value="1"  id="apFBMsgAFrmtA<?php 
                echo $ii;
                ?>
" <?php 
                if (trim($fbo['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($fbo['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 - Other Settings', 'nxs_snap');
            }
            ?>
   
   </div>
  
  <br/><br/>
  
<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.jpg" width="600" height="271" 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 ($fbo['fbPgID'] != '') {
                ?>
<div style="width:100%;"><strong>Facebook Page ID:</strong> <?php 
                _e(apply_filters('format_to_edit', htmlentities($fbo['fbPgID'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
                ?>
 </div><?php 
            }
            ?>
            <?php 
            if ($fbo['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($fbo['fbAppAuthUser']) && $fbo['fbAppAuthUser'] > 0) {
                    ?>
            <?php 
                    _e('Your Facebook Account has been authorized.', 'nxs_snap');
                    ?>
 User ID: <?php 
                    _e(apply_filters('format_to_edit', htmlentities($fbo['fbAppAuthUser'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
                    ?>
.
            <?php 
                    _e('You can', 'nxs_snap');
                    ?>
 Re- <?php 
                }
                ?>
            
            <a href="https://www.facebook.com/dialog/oauth?client_id=<?php 
                echo trim($fbo['fbAppID']);
                ?>
&client_secret=<?php 
                echo trim($fbo['fbAppSec']);
                ?>
&scope=publish_stream,user_photos,photo_upload,friends_photos,offline_access,read_stream,manage_pages&redirect_uri=<?php 
                echo trim(urlencode($nxs_snapThisPageUrl . '&auth=fb&acc=' . $ii));
                ?>
">Authorize Your Facebook Account</a> 
            <?php 
                if (!isset($fbo['fbAppAuthUser']) || $fbo['fbAppAuthUser'] < 1) {
                    ?>
 <div class="blnkg">&lt;=== <?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($fbo['fbAppAuthUser']) && $fbo['fbAppAuthUser'] > 0) {
                ?>
            <?php 
                wp_nonce_field('rePostToFB', 'rePostToFB_wpnonce');
                ?>
            <br/><br/><b><?php 
                _e('Test your settings', 'nxs_snap');
                ?>
:</b>&nbsp;&nbsp;&nbsp; <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 class="submit"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
            _e('Update Settings', 'nxs_snap');
            ?>
" /></div>
            
          </div>        
        <?php 
        }
Esempio n. 10
0
        function showNTSettings($ii, $options, $isNew = false)
        {
            global $nxs_plurl;
            ?>
            <div id="doSU<?php 
            echo $ii;
            ?>
Div" class="insOneDiv<?php 
            if ($isNew) {
                echo " clNewNTSets";
            }
            ?>
" style="background-image: url(<?php 
            echo $nxs_plurl;
            ?>
img/su-bg.png);  background-position:90% 10%;">     <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', 'nxs_snap'), $nType);
            ?>
</a></div>
            
            <div style="width:100%;"><strong><?php 
            _e('Account Nickname', 'nxs_snap');
            ?>
:</strong> <i><?php 
            _e('Just so you can easely identify it', 'nxs_snap');
            ?>
</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")), 'nxs_snap');
            ?>
" /><br/>
            <?php 
            echo nxs_addQTranslSel('su', $ii, $options['qTLng']);
            echo nxs_addPostingDelaySel('su', $ii, $options['nHrs'], $options['nMin']);
            ?>
            
             <?php 
            if (!$isNew) {
                ?>
    <div style="width:100%;"><strong><?php 
                _e('Categories', 'nxs_snap');
                ?>
:</strong>
       <input value="0" id="catSelA<?php 
                echo $ii;
                ?>
" type="radio" name="su[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $options['catSel'] != 1) {
                    echo "checked";
                }
                ?>
 /> All                                  
       <input value="1" id="catSelSSU<?php 
                echo $ii;
                ?>
" type="radio" name="su[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $options['catSel'] == 1) {
                    echo "checked";
                }
                ?>
 /> <a href="#" style="text-decoration: none;" class="showCats" id="nxs_SCA_SU<?php 
                echo $ii;
                ?>
" onclick="jQuery('#catSelSSU<?php 
                echo $ii;
                ?>
').attr('checked', true); jQuery('#tmpCatSelNT').val('SU<?php 
                echo $ii;
                ?>
'); nxs_markCats( jQuery('#nxs_SC_SU<?php 
                echo $ii;
                ?>
').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php 
                if ($options['catSelEd'] != '') {
                    echo "[" . (substr_count($options['catSelEd'], ",") + 1) . "]";
                }
                ?>
</a>       
       <input type="hidden" name="su[<?php 
                echo $ii;
                ?>
][catSelEd]" id="nxs_SC_SU<?php 
                echo $ii;
                ?>
" value="<?php 
                echo $options['catSelEd'];
                ?>
" />
    <br/><i><?php 
                _e('Only selected categories will be autoposted to this account', 'nxs_snap');
                ?>
</i></div> 
    <br/>
    <?php 
            }
            ?>
            
            <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")), 'nxs_snap');
            ?>
" />                
            <div style="width:100%;"><strong>StumbleUpon Password:</strong> </div><input 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")), 'nxs_snap');
            ?>
" />  <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', 'nxs_snap');
            ?>
</strong> (<a href="#" id="apSUMsgFrmt<?php 
            echo $ii;
            ?>
HintInfo" onclick="mxs_showHideFrmtInfo('apSUMsgFrmt<?php 
            echo $ii;
            ?>
'); return false;"><?php 
            _e('Show format info', 'nxs_snap');
            ?>
</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")), 'nxs_snap');
            }
            ?>
</textarea>
              
              
              <?php 
            nxs_doShowHint("apSUMsgFrmt" . $ii);
            ?>
            </div><br/>    
            
            <?php 
            if ($options['suPass'] != '') {
                ?>
            <?php 
                wp_nonce_field('rePostToSU', 'rePostToSU_wpnonce');
                ?>
            <b><?php 
                _e('Test your settings', 'nxs_snap');
                ?>
:</b>&nbsp;&nbsp;&nbsp; <a href="#" class="NXSButton" onclick="testPost('SU', '<?php 
                echo $ii;
                ?>
'); return false;"><?php 
                printf(__('Submit Test Post to %s', 'nxs_snap'), $nType);
                ?>
</a>      
               
            <?php 
            }
            ?>
<div class="submit"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
            _e('Update Settings', 'nxs_snap');
            ?>
" /></div></div><?php 
        }
Esempio n. 11
0
        function showNTSettings($ii, $gpo, $isNew = false)
        {
            global $nxs_plurl;
            ?>
            <div id="doFF<?php 
            echo $ii;
            ?>
Div" class="insOneDiv<?php 
            if ($isNew) {
                echo " clNewNTSets";
            }
            ?>
" style="max-width: 1000px; background-color: #EBF4FB; background-image: url(<?php 
            echo $nxs_plurl;
            ?>
img/ff-bg.png);  background-position:90% 10%; background-repeat: no-repeat; 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 easely 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($gpo['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" /><br/>
            <?php 
            echo nxs_addQTranslSel('ff', $ii, $gpo['qTLng']);
            echo nxs_addPostingDelaySel('ff', $ii, $gpo['nHrs'], $gpo['nMin']);
            ?>
            
            <?php 
            if (!$isNew) {
                ?>
    <div style="width:100%;"><strong><?php 
                _e('Categories', 'nxs_snap');
                ?>
:</strong>
       <input value="0" id="catSelA<?php 
                echo $ii;
                ?>
" type="radio" name="ff[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $gpo['catSel'] != 1) {
                    echo "checked";
                }
                ?>
 /> All                                  
       <input value="1" id="catSelSFF<?php 
                echo $ii;
                ?>
" type="radio" name="ff[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $gpo['catSel'] == 1) {
                    echo "checked";
                }
                ?>
 /> <a href="#" style="text-decoration: none;" class="showCats" id="nxs_SCA_FF<?php 
                echo $ii;
                ?>
" onclick="jQuery('#catSelSFF<?php 
                echo $ii;
                ?>
').attr('checked', true); jQuery('#tmpCatSelNT').val('FF<?php 
                echo $ii;
                ?>
'); nxs_markCats( jQuery('#nxs_SC_FF<?php 
                echo $ii;
                ?>
').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php 
                if ($gpo['catSelEd'] != '') {
                    echo "[" . (substr_count($gpo['catSelEd'], ",") + 1) . "]";
                }
                ?>
</a>       
       <input type="hidden" name="ff[<?php 
                echo $ii;
                ?>
][catSelEd]" id="nxs_SC_FF<?php 
                echo $ii;
                ?>
" value="<?php 
                echo $gpo['catSelEd'];
                ?>
" />
    <br/><i><?php 
                _e('Only selected categories will be autoposted to this account', 'nxs_snap');
                ?>
</i></div> 
    <br/>
    <?php 
            }
            ?>
            
            <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($gpo['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($gpo['ffPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($gpo['ffPass'], 5)) : $gpo['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($gpo['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($gpo['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) $gpo['attchImg'] == 1) {
                echo "checked";
            }
            ?>
 /> <strong><?php 
            _e('Attach Image to FriendFeed Post', 'nxs_snap');
            ?>
</strong></p>
    <br/>
            
            <?php 
            if ($gpo['ffPass'] != '') {
                ?>
            <?php 
                wp_nonce_field('rePostToFF', 'rePostToFF_wpnonce');
                ?>
            <b><?php 
                _e('Test your settings', 'nxs_snap');
                ?>
:</b>&nbsp;&nbsp;&nbsp; <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 class="submit"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
            _e('Update Settings', 'nxs_snap');
            ?>
" /></div></div><?php 
        }
Esempio n. 12
0
        function showNTSettings($ii, $options, $isNew = false)
        {
            global $nxs_plurl, $nxs_snapThisPageUrl;
            if ((int) $options['attch'] == 0 && (!isset($options['trPostType']) || $options['trPostType'] == '')) {
                $options['trPostType'] = 'T';
            }
            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'] = '';
            }
            ?>
 
    <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 easely 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']);
            ?>
    <?php 
            echo nxs_addPostingDelaySel('vk', $ii, $options['nHrs'], $options['nMin']);
            ?>
    
    <?php 
            if (!$isNew) {
                ?>
    <div style="width:100%;"><strong><?php 
                _e('Categories', 'nxs_snap');
                ?>
:</strong>
       <input value="0" id="catSelA<?php 
                echo $ii;
                ?>
" type="radio" name="vk[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $options['catSel'] != 1) {
                    echo "checked";
                }
                ?>
 /> All                                  
       <input value="1" id="catSelSVK<?php 
                echo $ii;
                ?>
" type="radio" name="vk[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $options['catSel'] == 1) {
                    echo "checked";
                }
                ?>
 /> <a href="#" style="text-decoration: none;" class="showCats" id="nxs_SCA_VK<?php 
                echo $ii;
                ?>
" onclick="jQuery('#catSelSVK<?php 
                echo $ii;
                ?>
').attr('checked', true); jQuery('#tmpCatSelNT').val('VK<?php 
                echo $ii;
                ?>
'); nxs_markCats( jQuery('#nxs_SC_VK<?php 
                echo $ii;
                ?>
').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php 
                if ($options['catSelEd'] != '') {
                    echo "[" . (substr_count($options['catSelEd'], ",") + 1) . "]";
                }
                ?>
</a>       
       <input type="hidden" name="vk[<?php 
                echo $ii;
                ?>
][catSelEd]" id="nxs_SC_VK<?php 
                echo $ii;
                ?>
" value="<?php 
                echo $options['catSelEd'];
                ?>
" />
    <br/><i><?php 
                _e('Only selected categories will be autoposted to this account', 'nxs_snap');
                ?>
</i></div> 
    <br/>
    <?php 
            }
            ?>
    
    <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>      
            <!-- <a href="http://api.vkontakte.ru/oauth/authorize?client_id=<?php 
                echo $options['vkAppID'];
                ?>
&scope=offline,wall,photos,pages&redirect_uri=<?php 
                echo urlencode($nxs_snapThisPageUrl . '&auth=vk&acc=' . $options['ii']);
                ?>
">Authorize Your vKontakte(VK) Account</a>  -->
            <?php 
                if (!isset($options['vkAppAuthUser']) || $options['vkAppAuthUser'] < 1) {
                    ?>
 <div class="blnkg">&lt;=== <?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 
            } 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> &lt;-- (<a id="showShAtt" onmouseout="hidePopShAtt('<?php 
            echo $ii;
            ?>
VKX');" onmouseover="showPopShAtt('<?php 
            echo $ii;
            ?>
VKX', event);" onclick="return false;" class="underdash" href="http://www.nextscripts.com/blog/"><?php 
            _e('What\'s the difference?', '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');
                ?>
&nbsp;</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;";
                }
                ?>
" >&nbsp;&nbsp;&nbsp; <?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) {
                ?>
            <?php 
                wp_nonce_field('rePostToVK', 'rePostToVK_wpnonce');
                ?>
            <br/><br/><b><?php 
                _e('Test your settings', 'nxs_snap');
                ?>
:</b>&nbsp;&nbsp;&nbsp; <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 class="submit"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
            _e('Update Settings', 'nxs_snap');
            ?>
" /></div>
            
          </div>        
        <?php 
        }
Esempio n. 13
0
        function showNTSettings($ii, $yto, $isNew = false)
        {
            global $nxs_plurl;
            ?>
            <div id="doYT<?php 
            echo $ii;
            ?>
Div" class="insOneDiv<?php 
            if ($isNew) {
                echo " clNewNTSets";
            }
            ?>
" style="background-image: url(<?php 
            echo $nxs_plurl;
            ?>
img/yt-bg.png);  background-position:90% 10%;">     <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/setup-installation-google-plus-social-networks-auto-poster-wordpress/"><?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 easely 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($yto['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" /><br/>
            <?php 
            echo nxs_addQTranslSel('yt', $ii, $yto['qTLng']);
            echo nxs_addPostingDelaySel('yt', $ii, $yto['nHrs'], $yto['nMin']);
            ?>
            
            <?php 
            if (!$isNew) {
                ?>
    <div style="width:100%;"><strong><?php 
                _e('Categories', 'nxs_snap');
                ?>
:</strong>
       <input value="0" id="catSelA<?php 
                echo $ii;
                ?>
" type="radio" name="yt[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $yto['catSel'] != 1) {
                    echo "checked";
                }
                ?>
 /> All                                  
       <input value="1" id="catSelSYT<?php 
                echo $ii;
                ?>
" type="radio" name="yt[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $yto['catSel'] == 1) {
                    echo "checked";
                }
                ?>
 /> <a href="#" style="text-decoration: none;" class="showCats" id="nxs_SCA_YT<?php 
                echo $ii;
                ?>
" onclick="jQuery('#catSelSYT<?php 
                echo $ii;
                ?>
').attr('checked', true); jQuery('#tmpCatSelNT').val('YT<?php 
                echo $ii;
                ?>
'); nxs_markCats( jQuery('#nxs_SC_YT<?php 
                echo $ii;
                ?>
').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php 
                if ($yto['catSelEd'] != '') {
                    echo "[" . (substr_count($yto['catSelEd'], ",") + 1) . "]";
                }
                ?>
</a>       
       <input type="hidden" name="yt[<?php 
                echo $ii;
                ?>
][catSelEd]" id="nxs_SC_YT<?php 
                echo $ii;
                ?>
" value="<?php 
                echo $yto['catSelEd'];
                ?>
" />
    <br/><i><?php 
                _e('Only selected categories will be autoposted to this account', 'nxs_snap');
                ?>
</i></div> 
    <br/>
    <?php 
            }
            ?>
            
            <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($yto['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($yto['ytPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($yto['ytPass'], 5)) : $yto['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($yto['ytPageID'], 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($yto['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 ($yto['ytPass'] != '') {
                ?>
            <?php 
                wp_nonce_field('rePostToYT', 'rePostToYT_wpnonce');
                ?>
            <b><?php 
                _e('Test your settings', 'nxs_snap');
                ?>
:</b>&nbsp;&nbsp;&nbsp; <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 class="submit"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
            _e('Update Settings', 'nxs_snap');
            ?>
" /></div></div><?php 
        }
Esempio n. 14
0
        function showNTSettings($ii, $options, $isNew = false)
        {
            global $nxs_plurl, $nxs_snapThisPageUrl;
            ?>
    <div id="doPK<?php 
            echo $ii;
            ?>
Div" class="insOneDiv<?php 
            if ($isNew) {
                echo " clNewNTSets";
            }
            ?>
" style="background-image: url(<?php 
            echo $nxs_plurl;
            ?>
img/pk-bg.png);  background-position:90% 10%;">   <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 easely 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']);
            echo nxs_addPostingDelaySel('pk', $ii, $options['nHrs'], $options['nMin']);
            ?>
            
             <?php 
            if (!$isNew) {
                ?>
    <div style="width:100%;"><strong><?php 
                _e('Categories', 'nxs_snap');
                ?>
:</strong>
       <input value="0" id="catSelA<?php 
                echo $ii;
                ?>
" type="radio" name="pk[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $options['catSel'] != 1) {
                    echo "checked";
                }
                ?>
 /> All                                  
       <input value="1" id="catSelSPK<?php 
                echo $ii;
                ?>
" type="radio" name="pk[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $options['catSel'] == 1) {
                    echo "checked";
                }
                ?>
 /> <a href="#" style="text-decoration: none;" class="showCats" id="nxs_SCA_PK<?php 
                echo $ii;
                ?>
" onclick="jQuery('#catSelSPK<?php 
                echo $ii;
                ?>
').attr('checked', true); jQuery('#tmpCatSelNT').val('PK<?php 
                echo $ii;
                ?>
'); nxs_markCats( jQuery('#nxs_SC_PK<?php 
                echo $ii;
                ?>
').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php 
                if ($options['catSelEd'] != '') {
                    echo "[" . (substr_count($options['catSelEd'], ",") + 1) . "]";
                }
                ?>
</a>       
       <input type="hidden" name="pk[<?php 
                echo $ii;
                ?>
][catSelEd]" id="nxs_SC_PK<?php 
                echo $ii;
                ?>
" value="<?php 
                echo $options['catSelEd'];
                ?>
" />
    <br/><i><?php 
                _e('Only selected categories will be autoposted to this account', 'nxs_snap');
                ?>
</i></div> 
    <br/>
    <?php 
            }
            ?>
            
            <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 (isset($options['pkAccessTocken']) && isset($options['pkAccessTocken']['oauth_token_secret']) && $options['pkAccessTocken']['oauth_token_secret'] !== '') {
                    ?>
            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_snapThisPageUrl;
                ?>
&auth=pk&acc=<?php 
                echo $ii;
                ?>
">Authorize Your Plurk Account</a> 
              <?php 
                if (!isset($options['pkOAuthTokenSecret']) || $options['pkOAuthTokenSecret'] == '') {
                    ?>
 <div class="blnkg">&lt;=== Authorize your account ===</div> <?php 
                }
                ?>
            
            <?php 
            }
            ?>
            
            
            
            <?php 
            if (isset($options['pkOAuthTokenSecret']) && $options['pkOAuthTokenSecret'] != '') {
                ?>
            <?php 
                wp_nonce_field('rePostToPK', 'rePostToPK_wpnonce');
                ?>
            <br/><br/><b><?php 
                _e('Test your settings', 'nxs_snap');
                ?>
:</b>&nbsp;&nbsp;&nbsp; <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 class="submit"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
            _e('Update Settings', 'nxs_snap');
            ?>
" /></div>  
            
        </div>
        <?php 
        }
Esempio n. 15
0
        function showNTSettings($ii, $gpo, $isNew = false)
        {
            global $nxs_plurl;
            ?>
            <div id="doLJ<?php 
            echo $ii;
            ?>
Div" class="insOneDiv<?php 
            if ($isNew) {
                echo " clNewNTSets";
            }
            ?>
" style="background-image: url(<?php 
            echo $nxs_plurl;
            ?>
img/lj-bg.png);  background-position:90% 10%;">     <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 easely 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($gpo['nName'], ENT_COMPAT, "UTF-8")), 'nxs_snap');
            ?>
" /><br/>
            <?php 
            echo nxs_addQTranslSel('lj', $ii, $gpo['qTLng']);
            echo nxs_addPostingDelaySel('lj', $ii, $gpo['nHrs'], $gpo['nMin']);
            ?>
            
             <?php 
            if (!$isNew) {
                ?>
    <div style="width:100%;"><strong><?php 
                _e('Categories', 'nxs_snap');
                ?>
:</strong>
       <input value="0" id="catSelA<?php 
                echo $ii;
                ?>
" type="radio" name="lj[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $gpo['catSel'] != 1) {
                    echo "checked";
                }
                ?>
 /> All                                  
       <input value="1" id="catSelSLJ<?php 
                echo $ii;
                ?>
" type="radio" name="lj[<?php 
                echo $ii;
                ?>
][catSel]" <?php 
                if ((int) $gpo['catSel'] == 1) {
                    echo "checked";
                }
                ?>
 /> <a href="#" style="text-decoration: none;" class="showCats" id="nxs_SCA_LJ<?php 
                echo $ii;
                ?>
" onclick="jQuery('#catSelSLJ<?php 
                echo $ii;
                ?>
').attr('checked', true); jQuery('#tmpCatSelNT').val('LJ<?php 
                echo $ii;
                ?>
'); nxs_markCats( jQuery('#nxs_SC_LJ<?php 
                echo $ii;
                ?>
').val() ); jQuery('#showCatSel').bPopup({ modalClose: false, appendTo: '#nsStForm', opacity: 0.6, follow: [false, false], position: [75, 'auto']}); return false;">Selected<?php 
                if ($gpo['catSelEd'] != '') {
                    echo "[" . (substr_count($gpo['catSelEd'], ",") + 1) . "]";
                }
                ?>
</a>       
       <input type="hidden" name="lj[<?php 
                echo $ii;
                ?>
][catSelEd]" id="nxs_SC_LJ<?php 
                echo $ii;
                ?>
" value="<?php 
                echo $gpo['catSelEd'];
                ?>
" />
    <br/><i><?php 
                _e('Only selected categories will be autoposted to this account', 'nxs_snap');
                ?>
</i></div>     
    <?php 
            }
            ?>
            <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($gpo['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($gpo['ljPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($gpo['ljPass'], 5)) : $gpo['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($gpo['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($gpo['ljSrv']) || $gpo['ljSrv'] == '' || $gpo['ljSrv'] == 'LJ') {
                ?>
 selected="selected" <?php 
            }
            ?>
 value="LJ">LiveJournal.com</option>
      <option <?php 
            if (isset($gpo['ljSrv']) && $gpo['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($gpo['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($gpo['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) $gpo['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 ($gpo['ljPass'] != '') {
                ?>
            <?php 
                wp_nonce_field('rePostToLJ', 'rePostToLJ_wpnonce');
                ?>
            <b><?php 
                _e('Test your settings', 'nxs_snap');
                ?>
:</b>&nbsp;&nbsp;&nbsp; <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 class="submit"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
            _e('Update Settings', 'nxs_snap');
            ?>
" /></div></div><?php 
        }