nxs_snapClassDA

The NextScripts: Social Networks Auto-Poster nxs snapClassDA class.

Defined (1)

The class is defined in the following location(s).

/inc-cl/da.php  
  1. if (!class_exists("nxs_snapClassDA")) { class nxs_snapClassDA { 
  2. //#### Show Common Settings 
  3. function showGenNTSettings($ntOpts) { global $nxs_plurl; $ntInfo = array('code'=>'DA', 'lcode'=>'da', 'name'=>'deviantART', 'defNName'=>'daUName', 'tstReq' => false); ?>  
  4. <div class="nxs_box"> 
  5. <div class="nxs_box_header">  
  6. <div class="nsx_iconedTitle" style="margin-bottom:1px;background-image:url(<?php echo $nxs_plurl;?>img/<?php echo $ntInfo['lcode']; ?>16.png);"><?php echo $ntInfo['name']; ?> 
  7. <?php $cbo = count($ntOpts); ?>  
  8. <?php if ($cbo>1) { ?><div class="nsBigText"><?php echo "(".($cbo=='0'?'No':$cbo)." "; _e('accounts', 'social-networks-auto-poster-facebook-twitter-g'); echo ")"; ?></div><?php } ?> 
  9. </div> 
  10. </div> 
  11. <div class="nxs_box_inside"> 
  12. <?php if(!function_exists('doConnectToDeviantART')) {?> deviantART doesn't have a built-in API for automated posts yet. <br/>You need to get a special <a target="_blank" href="http://www.nextscripts.com/deviantart-automated-posting">library module</a> to be able to publish your content to deviantART.  
  13. <?php } else foreach ($ntOpts as $indx=>$pbo) { if (trim($pbo['nName']=='')) $pbo['nName'] = $pbo[$ntInfo['defNName']]; ?> 
  14. <p style="margin:0px;margin-left:5px;"> <img id="<?php echo $ntInfo['code'].$indx;?>LoadingImg" style="display: none;" src='<?php echo $nxs_plurl; ?>img/ajax-loader-sm.gif' /> 
  15. <input value="0" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="hidden" />  
  16. <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <input type="radio" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" id="rbtn<?php echo $ntInfo['lcode'].$indx; ?>" value="1" checked="checked" onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);" /> <?php } else { ?>  
  17. <input value="1" name="<?php echo $ntInfo['lcode']; ?>[<?php echo $indx; ?>][apDo<?php echo $ntInfo['code']; ?>]" type="checkbox" <?php if ((int)$pbo['do'.$ntInfo['code']] == 1 && $pbo['catSel']!='1') echo "checked"; ?> /> 
  18. <?php } ?> 
  19. <?php if (isset($pbo['catSel']) && (int)$pbo['catSel'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popOnlyCat');" onmouseover="nxs_showPopUpInfo('popOnlyCat', event);"><?php echo "*[".(substr_count($pbo['catSelEd'], ", ")+1)."]*" ?></span><?php } ?> 
  20. <?php if (isset($pbo['rpstOn']) && (int)$pbo['rpstOn'] == 1) { ?> <span onmouseout="nxs_hidePopUpInfo('popReActive');" onmouseover="nxs_showPopUpInfo('popReActive', event);"><?php echo "*[R]*" ?></span><?php } ?> 
  21. <strong><?php _e('Auto-publish to', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php echo $ntInfo['name']; ?> <i style="color: #005800;"><?php if($pbo['nName']!='') echo "(".$pbo['nName'].")"; ?></i></strong> 
  22.   <?php if ($ntInfo['tstReq'] && (!isset($pbo[$ntInfo['lcode'].'OK']) || $pbo[$ntInfo['lcode'].'OK']=='')) { ?><b style="color: #800000"><?php _e('Attention requred. Unfinished setup', 'social-networks-auto-poster-facebook-twitter-g'); ?> ==></b><?php } ?><a id="do<?php echo $ntInfo['code'].$indx; ?>AG" href="#" onclick="doGetHideNTBlock('<?php echo $ntInfo['code'];?>' , '<?php echo $indx; ?>');return false;">[<?php _e('Show Settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a>   
  23. <a href="#" onclick="doDelAcct('<?php echo $ntInfo['lcode']; ?>', '<?php echo $indx; ?>', '<?php if (isset($pbo['bgBlogID'])) echo $pbo['nName']; ?>');return false;">[<?php _e('Remove Account', 'social-networks-auto-poster-facebook-twitter-g'); ?>]</a> 
  24. </p><div id="nxsNTSetDiv<?php echo $ntInfo['code'].$indx; ?>"></div><?php // $pbo['ntInfo'] = $ntInfo; $this->showNTSettings($indx, $pbo);  
  25. }?> 
  26. </div> 
  27. </div> <?php  
  28. }  
  29. //#### Show NEW Settings Page 
  30. function showNewNTSettings($options) { $nto = array('nName'=>'', 'doDA'=>'1', 'daUName'=>'', 'daPageID'=>'', 'daCommID'=>'', 'postType'=>'A', 'daPass'=>''); $nto['ntInfo']= array('lcode'=>'da'); $this->showNTSettings($options, $nto, true);} 
  31. //#### Show Unit Settings 
  32. function showNTSettings($ii, $options, $isNew=false) { global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt);  
  33. if (!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'] = '';  
  34. if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; ?> 
  35. <div id="doDA<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) echo " clNewNTSets"; ?>"> <input type="hidden" value="0" id="apDoS<?php echo $ntU.$ii; ?>" /> 
  36.  
  37. <div style="color:red;padding:5px;margin:5px; border: 1px solid darkred;">DeviantArt API is being extremely unstable and buggy on their side for the last several months. Until further notice DeviantArt connector is provided "as is". Please use it on your own risk. This may cause numerous of different issues including disapering posts, broken accounts, messed up posts, etc...<br/></div> 
  38.  
  39. <?php if(!function_exists('doConnectToDeviantART')) {?><span style="color:#580000; font-size: 16px;"><br/><br/> 
  40. <b><?php _e('deviantART API Library not found', 'social-networks-auto-poster-facebook-twitter-g'); ?></b> 
  41. <br/><br/> <?php _e('deviantART doesn\'t have a built-in API for automated posts yet.', 'social-networks-auto-poster-facebook-twitter-g'); ?> <br/><?php _e('<br/>You need to get a special <a target="_blank" href="http://www.nextscripts.com/deviantart-automated-posting"><b>API Library Module</b></a> to be able to publish your content to deviantART.', 'social-networks-auto-poster-facebook-twitter-g'); ?></span></div> 
  42. <?php return; }; ?>  
  43.  
  44. <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/da16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-deviantart-social-networks-auto-poster-wordpress/"><?php $nType="deviantART"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div> 
  45.  
  46. <div style="width:100%;"><strong><?php _e('Account Nickname', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> <i><?php _e('Just so you can easily identify it', 'social-networks-auto-poster-facebook-twitter-g'); ?></i> </div><input name="da[<?php echo $ii; ?>][nName]" id="danName<?php echo $ii; ?>" style="font-weight: bold; color: #005800; border: 1px solid #ACACAC; width: 40%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['nName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /><br/> 
  47. <?php echo nxs_addQTranslSel('da', $ii, $options['qTLng']); ?> 
  48.  
  49.  
  50. <br/> 
  51. <ul class="nsx_tabs"> 
  52. <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  
  53. <?php if (!$isNew) { ?> <li><a href="#nsx<?php echo $nt.$ii ?>_tab2"><?php _e('Advanced', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li> <?php } ?> 
  54. </ul> 
  55. <div class="nsx_tab_container"><?php /** ######################## Account Tab ####################### */ ?> 
  56. <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat; background-position:90% 10%;"> 
  57.  
  58.  
  59. <div style="width:100%;"><strong>deviantART Username or Email:</strong> </div><input name="da[<?php echo $ii; ?>][uName]" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['daUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  
  60. <div style="width:100%;"><strong>deviantART Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="da[<?php echo $ii; ?>][uPass]" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['daPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['daPass'], 5)):$options['daPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /> <br/>  
  61. <br/>  
  62.  
  63. <div id="altFormat" style=""> 
  64. <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> (<a href="#" id="daTitleFormat<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('daTitleFormat<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div> 
  65. <input name="da[<?php echo $ii; ?>][daTitleFormat]" id="daTitleFormat<?php echo $ii; ?>" style="width: 50%;" value="<?php if ($isNew) echo "%TITLE%"; else _e(apply_filters('format_to_edit', htmlentities($options['daTitleFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?>" onfocus="mxs_showFrmtInfo('daTitleFormat<?php echo $ii; ?>');" /><?php nxs_doShowHint("daTitleFormat".$ii); ?> 
  66. </div><br/>  
  67.  
  68. <div id="altFormat" style="margin-left: 0px;"> 
  69. <div style="width:100%;"><strong id="altFormatText"><?php _e('Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</strong> (<a href="#" id="daTextFormat<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('daTextFormat<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>) 
  70. </div> 
  71.  
  72. <textarea cols="150" rows="3" id="da<?php echo $ii; ?>SNAPformat" name="da[<?php echo $ii; ?>][daTextFormat]" style="width:51%;max-width: 650px;" onfocus="jQuery('#da<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apDAMsgFrmt<?php echo $ii; ?>');"><?php if ($isNew) _e("%FULLTEXT%", 'social-networks-auto-poster-facebook-twitter-g'); else _e(apply_filters('format_to_edit', htmlentities($options['daTextFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea> 
  73.  
  74. <?php nxs_doShowHint("daTextFormat".$ii); ?> 
  75. </div><br/>  
  76.  
  77.  
  78. <?php if ($isNew) { ?> <input type="hidden" name="da[<?php echo $ii; ?>][apDoDA]" value="1" id="apDoNewDA<?php echo $ii; ?>" /> <?php } ?> 
  79. <?php if ($options['daPass']!='') { ?> 
  80.  
  81. <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>    <a href="#" class="NXSButton" onclick="testPost('DA', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a> <?php }  
  82. ?> 
  83. </div> 
  84.  
  85. <?php /** ######################## Advanced Tab ####################### */ ?> 
  86. <?php if (!$isNew) { ?> <div id="nsx<?php echo $nt.$ii ?>_tab2" class="nsx_tab_content"> 
  87.  
  88. <?php nxs_showCatTagsCTFilters($nt, $ii, $options);  
  89. nxs_addPostingDelaySelV3($nt, $ii, $options['nHrs'], $options['nMin'], $options['nDays']);  
  90. nxs_showRepostSettings($nt, $ii, $options); ?>  
  91.  
  92.  
  93. </div> <?php } ?> <?php /** #### End of Tab #### */ ?> 
  94. </div><br/> <?php /** #### End of Tabs #### */ ?> 
  95.  
  96. <div class="submitX nxclear" style="padding-bottom: 0px;"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g') ?>" /></div> 
  97.  
  98. </div><?php 
  99. //#### Set Unit Settings from POST 
  100. function setNTSettings($post, $options) { $code = 'DA'; $lcode = 'da';  
  101. foreach ($post as $ii => $pval) {  
  102. if (!empty($pval['uName']) && !empty($pval['uPass'])) { if (!isset($options[$ii])) $options[$ii] = array(); 
  103. if (isset($pval['uName'])) $options[$ii]['daUName'] = trim($pval['uName']); 
  104. if (isset($pval['nName'])) $options[$ii]['nName'] = trim($pval['nName']); 
  105. if (isset($pval['uPass'])) $options[$ii]['daPass'] = 'n5g9a'.nsx_doEncode($pval['uPass']); else $options[$ii]['daPass'] = '';  
  106.  
  107. if (isset($pval['catSel'])) $options[$ii]['catSel'] = trim($pval['catSel']); else $options[$ii]['catSel'] = 0; 
  108. if ($options[$ii]['catSel']=='1' && trim($pval['catSelEd'])!='') $options[$ii]['catSelEd'] = trim($pval['catSelEd']); else $options[$ii]['catSelEd'] = ''; 
  109.  
  110. if (isset($pval['daTitleFormat'])) $options[$ii]['daTitleFormat'] = trim($pval['daTitleFormat']); 
  111. if (isset($pval['daTextFormat'])) $options[$ii]['daTextFormat'] = trim($pval['daTextFormat']); 
  112.  
  113. if (isset($pval['apDoDA'])) $options[$ii]['doDA'] = $pval['apDoDA']; else $options[$ii]['doDA'] = 0;  
  114.  
  115. $options[$ii] = nxs_adjRpst($options[$ii], $pval);  
  116.  
  117. if (isset($pval['delayDays'])) $options[$ii]['nDays'] = trim($pval['delayDays']); 
  118. if (isset($pval['delayHrs'])) $options[$ii]['nHrs'] = trim($pval['delayHrs']); if (isset($pval['delayMin'])) $options[$ii]['nMin'] = trim($pval['delayMin']);  
  119. if (isset($pval['qTLng'])) $options[$ii]['qTLng'] = trim($pval['qTLng']);  
  120. } elseif ( count($pval)==1 ) if (isset($pval['apDo'.$code])) $options[$ii]['do'.$code] = $pval['apDo'.$code]; else $options[$ii]['do'.$code] = 0;  
  121. } return $options; 
  122. }  
  123. //#### Show Post->Edit Meta Box Settings 
  124. function showEdPostNTSettings($ntOpts, $post) { global $nxs_plurl; $post_id = $post->ID; $nt = 'da'; $ntU = 'DA';  
  125. foreach($ntOpts as $ii=>$ntOpt) { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapDA', true)); if (is_array($pMeta) && !empty($pMeta[$ii])) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]);  
  126. $doDA = $ntOpt['doDA'] && (is_array($pMeta) || $ntOpt['catSel']!='1');  
  127. $isAvailDA = $ntOpt['daUName']!='' && $ntOpt['daPass']!=''; $daMsgFormat = htmlentities($ntOpt['daTextFormat'], ENT_COMPAT, "UTF-8"); $daMsgTFormat = htmlentities($ntOpt['daTitleFormat'], ENT_COMPAT, "UTF-8");  
  128.  
  129. ?>  
  130. <tr><th style="text-align:left;" colspan="2"> 
  131. <?php if ($ntOpt['catSel']=='1' && trim($ntOpt['catSelEd'])!='') { ?> <input type="hidden" class="nxs_SC" id="nxs_SC_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['catSelEd']; ?>" /> <?php } ?> 
  132. <?php if (!empty($ntOpt['tagsSelX'])) { ?> <input type="hidden" class="nxs_TG" id="nxs_TG_<?php echo $ntU; ?><?php echo $ii; ?>" value="<?php echo $ntOpt['tagsSelX']; ?>" /> <?php } ?> 
  133. <?php if ($isAvailDA) { ?><input class="nxsGrpDoChb" value="1" id="doDA<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="da[<?php echo $ii; ?>][doDA]" <?php if ((int)$doDA == 1) echo 'checked="checked" title="def"'; ?> />  
  134. <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="da[<?php echo $ii; ?>][doDA]" value="<?php echo $doDA;?>"> <?php } ?> <?php } ?> 
  135.  
  136. <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/da16.png);">deviantART - <?php _e('publish to', 'social-networks-auto-poster-facebook-twitter-g') ?> (<i style="color: #005800;"><?php echo $ntOpt['nName']; ?></i>)</div></th> <td><?php //## Only show RePost button if the post is "published" 
  137. if ($post->post_status == "publish" && $isAvailDA) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToDA_repostButton" id="rePostToDA_button" value="<?php _e('Repost to deviantART', 'social-networks-auto-poster-facebook-twitter-g') ?>" /> 
  138. <?php } ?> 
  139.  
  140. <?php if (is_array($pMeta) && !empty($pMeta[$ii]) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) {  
  141.  
  142. ?> <span id="pstdDA<?php echo $ii; ?>" style="float: right;padding-top: 4px; padding-right: 10px;"> 
  143. <a style="font-size: 10px;" href="<?php echo $pMeta[$ii]['postURL']; ?>" target="_blank"><?php $nType="deviantART"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?> <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a> 
  144. </span><?php } ?> 
  145.  
  146. </td></tr>  
  147.  
  148. <?php if (!$isAvailDA) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your deviantART Account to AutoPost to deviantART</b></td></tr> 
  149. <?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?> 
  150.  
  151. <?php if ($ntOpt['rpstOn']=='1') { ?>  
  152.  
  153. <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"> 
  154. <input value="0" type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>da" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]" <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> />  
  155. </th> 
  156. <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>  
  157. </td></tr> <?php } ?> 
  158.  
  159.  
  160. <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Title Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th> 
  161. <td><input value="<?php echo $daMsgTFormat ?>" type="text" name="da[<?php echo $ii; ?>][SNAPformatT]" style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apDAMsgTFrmt<?php echo $ii; ?>');"/><?php nxs_doShowHint("apDAMsgTFrmt".$ii, '', '58'); ?></td></tr>  
  162.  
  163. <tr id="altFormat1" style=""><th scope="row" style="vertical-align:top; padding-top: 6px; text-align:right; width:60px; padding-right:10px;"><?php _e('Text Format:', 'social-networks-auto-poster-facebook-twitter-g') ?></th><td>  
  164.  
  165. <textarea cols="150" rows="1" id="da<?php echo $ii; ?>SNAPformat" name="da[<?php echo $ii; ?>][SNAPformat]" style="width:60%;max-width: 610px;" onfocus="jQuery('#da<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apDAMsgFrmt<?php echo $ii; ?>');"><?php echo $daMsgFormat ?></textarea>  
  166.  
  167. </td></tr> 
  168. <?php }  
  169. //#### Save Meta Tags to the Post 
  170. function adjMetaOpt($optMt, $pMeta) { if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else $optMt['isPosted'] = '';  
  171. if (isset($pMeta['SNAPformat'])) $optMt['daTextFormat'] = $pMeta['SNAPformat']; if (isset($pMeta['SNAPformatT'])) $optMt['daTitleFormat'] = $pMeta['SNAPformatT'];  
  172. if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];  
  173. if (isset($pMeta['timeToRun'])) $optMt['timeToRun'] = $pMeta['timeToRun']; if (isset($pMeta['rpstPostIncl'])) $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];  
  174. if (isset($pMeta['doDA'])) $optMt['doDA'] = $pMeta['doDA'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doDA'] = 0; }  
  175. if (isset($pMeta['SNAPincludeDA']) && $pMeta['SNAPincludeDA'] == '1' ) $optMt['doDA'] = 1;  
  176. return $optMt; 
  177. }  
  178. }}