nxs_snapClassDI

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

Defined (1)

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

/inc-cl/di.php  
  1. if (!class_exists("nxs_snapClassDI")) { class nxs_snapClassDI { 
  2. //#### Show Common Settings 
  3.  
  4. function showGenNTSettings($ntOpts) { global $nxs_plurl; $ntInfo = array('code'=>'DI', 'lcode'=>'di', 'name'=>'Diigo', 'defNName'=>'diUName', 'tstReq' => false); ?>  
  5. <div class="nxs_box"> 
  6. <div class="nxs_box_header">  
  7. <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']; ?> 
  8. <?php $cbo = count($ntOpts); ?>  
  9. <?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 } ?> 
  10. </div> 
  11. </div> 
  12. <div class="nxs_box_inside"> 
  13. <?php 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.  
  30. //#### Show NEW Settings Page 
  31. function showNewNTSettings($mgpo) { $options = array('nName'=>'', 'doDI'=>'1', 'diUName'=>'', 'diInclTags'=>'1', 'diAttch'=>'', 'diAPIKey'=>'', 'diPass'=>''); $options['ntInfo']= array('lcode'=>'di'); $this->showNTSettings($mgpo, $options, true);}  
  32.  
  33. //#### Show Unit Settings 
  34. function showNTSettings($ii, $options, $isNew=false) { global $nxs_plurl; $nt = $options['ntInfo']['lcode']; $ntU = strtoupper($nt);  
  35. 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'] = '';  
  36. if (!isset($options['nDays'])) $options['nDays'] = 0; if (!isset($options['qTLng'])) $options['qTLng'] = ''; ?> 
  37. <div id="doDI<?php echo $ii; ?>Div" class="insOneDiv<?php if ($isNew) { ?> clNewNTSets<?php } ?>"> <input type="hidden" name="apDoSDI<?php echo $ii; ?>" value="0" id="apDoSDI<?php echo $ii; ?>" />  
  38.  
  39. <div class="nsx_iconedTitle" style="float: right; background-image: url(<?php echo $nxs_plurl; ?>img/di16.png);"><a style="font-size: 12px;" target="_blank" href="http://www.nextscripts.com/setup-installation-diigo-social-networks-auto-poster-wordpress/"><?php $nType="Diigo"; printf( __( 'Detailed %s Installation/Configuration Instructions', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a></div> 
  40.  
  41. <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="di[<?php echo $ii; ?>][nName]" id="dinName<?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/> 
  42. <?php echo nxs_addQTranslSel('di', $ii, $options['qTLng']); ?> 
  43.  
  44. <br/> 
  45. <ul class="nsx_tabs"> 
  46. <li><a href="#nsx<?php echo $nt.$ii ?>_tab1"><?php _e('Account Info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a></li>  
  47. <?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 } ?> 
  48. </ul> 
  49. <div class="nsx_tab_container"><?php /** ######################## Account Tab ####################### */ ?> 
  50. <div id="nsx<?php echo $nt.$ii ?>_tab1" class="nsx_tab_content" style="background-image: url(<?php echo $nxs_plurl; ?>img/<?php echo $nt; ?>-bg.png); background-repeat: no-repeat; background-position:90% 10%;"> 
  51.  
  52.  
  53.  
  54. <div id="altFormat" style=""> 
  55. <div style="width:100%;"><strong id="altFormatText">Diigo API Key:</strong> <span style="font-size: 11px; margin: 0px;">Get it from <a target="_blank" href="http://www.diigo.com/api_keys/">http://www.diigo.com/api_keys</a>.</span></div> 
  56. <input name="di[<?php echo $ii; ?>][apDIAPIKey]" id="apDIAPIKey" style="width: 60%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['diAPIKey'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /> <br/>  
  57. </div>  
  58. <div style="width:100%;"><strong>Diigo Username:</strong> </div><input name="di[<?php echo $ii; ?>][apDIUName]" id="apDIUName" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities($options['diUName'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" />  
  59. <div style="width:100%;"><strong>Diigo Password:</strong> </div><input autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" name="di[<?php echo $ii; ?>][apDIPass]" id="apDIPass" type="password" style="width: 30%;" value="<?php _e(apply_filters('format_to_edit', htmlentities(substr($options['diPass'], 0, 5)=='n5g9a'?nsx_doDecode(substr($options['diPass'], 5)):$options['diPass'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g') ?>" /> <br/>  
  60.  
  61. <?php if ($isNew) { ?> <input type="hidden" name="di[<?php echo $ii; ?>][apDoDI]" value="1" id="apDoNewDI<?php echo $ii; ?>" /> <?php } ?><br/>  
  62. <p style="margin-bottom: 20px;margin-top: 5px;"><input value="1" id="diInclTags" type="checkbox" name="di[<?php echo $ii; ?>][diInclTags]" <?php if ((int)$options['diInclTags'] == 1) echo "checked"; ?> />  
  63. <strong><?php _e('Post with tags', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> <?php _e('Tags from the blogpost will be auto posted to Diigo', 'social-networks-auto-poster-facebook-twitter-g'); ?>  
  64. </p> 
  65.  
  66. <div id="altFormat" style=""> 
  67. <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Title Format', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> (<a href="#" id="apDIMsgTFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apDIMsgTFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div> 
  68. <input name="di[<?php echo $ii; ?>][apDIMsgTFrmt]" id="apDIMsgTFrmt<?php echo $ii; ?>" style="width: 50%;" value="<?php if ($isNew) echo "%TITLE%"; else _e(apply_filters('format_to_edit', htmlentities($options['diMsgTFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?>" onfocus="mxs_showFrmtInfo('apDIMsgTFrmt<?php echo $ii; ?>');" /><?php nxs_doShowHint("apDIMsgTFrmt".$ii); ?> 
  69. </div><br/>  
  70.  
  71. <div id="altFormat" style=""> 
  72. <div style="width:100%;"><strong id="altFormatText"><?php _e('Post Text Format', 'social-networks-auto-poster-facebook-twitter-g'); ?></strong> (<a href="#" id="apDIMsgFrmt<?php echo $ii; ?>HintInfo" onclick="mxs_showHideFrmtInfo('apDIMsgFrmt<?php echo $ii; ?>'); return false;"><?php _e('Show format info', 'social-networks-auto-poster-facebook-twitter-g'); ?></a>)</div> 
  73.  
  74.  
  75. <textarea cols="150" rows="3" id="di<?php echo $ii; ?>SNAPformat" name="di[<?php echo $ii; ?>][apDIMsgFrmt]" style="width:51%;max-width: 650px;" onfocus="jQuery('#di<?php echo $ii; ?>SNAPformat').attr('rows', 6); mxs_showFrmtInfo('apDIMsgFrmt<?php echo $ii; ?>');"><?php if ($isNew) echo "%EXCERPT%"; else _e(apply_filters('format_to_edit', htmlentities($options['diMsgFormat'], ENT_COMPAT, "UTF-8")), 'social-networks-auto-poster-facebook-twitter-g'); ?></textarea> 
  76.  
  77. <?php nxs_doShowHint("apDIMsgFrmt".$ii); ?> 
  78. </div><br/>  
  79.  
  80. <?php if ($options['diPass']!='') { ?> 
  81.  
  82. <b><?php _e('Test your settings', 'social-networks-auto-poster-facebook-twitter-g'); ?>:</b>    <a href="#" class="NXSButton" onclick="testPost('DI', '<?php echo $ii; ?>'); return false;"><?php printf( __( 'Submit Test Post to %s', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?></a> <?php }  
  83. ?> 
  84. </div> 
  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. </div> <?php } ?> <?php /** #### End of Tab #### */ ?> 
  93. </div><br/> <?php /** #### End of Tabs #### */ ?> 
  94.  
  95. <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> 
  96. </div><?php 
  97. //#### Set Unit Settings from POST 
  98. function setNTSettings($post, $options) { $code = 'DI'; $lcode = 'di';  
  99. foreach ($post as $ii => $pval) {  
  100.  
  101. if (!empty($pval['apDIUName']) && !empty($pval['apDIPass'])) { if (!isset($options[$ii])) $options[$ii] = array(); 
  102. if (isset($pval['apDIUName'])) $options[$ii]['diUName'] = trim($pval['apDIUName']); 
  103. if (isset($pval['nName'])) $options[$ii]['nName'] = trim($pval['nName']); 
  104. if (isset($pval['apDIPass'])) $options[$ii]['diPass'] = 'n5g9a'.nsx_doEncode($pval['apDIPass']); else $options[$ii]['diPass'] = '';  
  105. if (isset($pval['apDIAPIKey'])) $options[$ii]['diAPIKey'] = trim($pval['apDIAPIKey']);  
  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['diInclTags'])) $options[$ii]['diInclTags'] = $pval['diInclTags']; else $options[$ii]['diInclTags'] = 0; 
  111. if (isset($pval['apDIMsgTFrmt'])) $options[$ii]['diMsgTFormat'] = trim($pval['apDIMsgTFrmt']); 
  112. if (isset($pval['apDIMsgFrmt'])) $options[$ii]['diMsgFormat'] = trim($pval['apDIMsgFrmt']); 
  113. if (isset($pval['apDoDI'])) $options[$ii]['doDI'] = $pval['apDoDI']; else $options[$ii]['doDI'] = 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 = 'di'; $ntU = 'DI'; 
  125. foreach($ntOpts as $ii=>$ntOpt) { $pMeta = maybe_unserialize(get_post_meta($post_id, 'snapDI', true)); if (is_array($pMeta)) $ntOpt = $this->adjMetaOpt($ntOpt, $pMeta[$ii]);  
  126. $doDI = $ntOpt['doDI'] && (is_array($pMeta) || $ntOpt['catSel']!='1');  
  127. $isAvailDI = $ntOpt['diUName']!='' && $ntOpt['diPass']!=''; $diMsgFormat = htmlentities($ntOpt['diMsgFormat'], ENT_COMPAT, "UTF-8"); $diMsgTFormat = htmlentities($ntOpt['diMsgTFormat'], ENT_COMPAT, "UTF-8");  
  128. ?>  
  129. <tr><th style="text-align:left;" colspan="2"> 
  130. <?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 } ?> 
  131. <?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 } ?> 
  132. <?php if ($isAvailDI) { ?><input class="nxsGrpDoChb" value="1" id="doDI<?php echo $ii; ?>" <?php if ($post->post_status == "publish") echo 'disabled="disabled"';?> type="checkbox" name="di[<?php echo $ii; ?>][doDI]" <?php if ((int)$doDI == 1) echo 'checked="checked" title="def"'; ?> />  
  133. <?php if ($post->post_status == "publish") { ?> <input type="hidden" name="di[<?php echo $ii; ?>][doDI]" value="<?php echo $doDI;?>"> <?php } ?> <?php } ?> 
  134.  
  135. <div class="nsx_iconedTitle" style="display: inline; font-size: 13px; background-image: url(<?php echo $nxs_plurl; ?>img/di16.png);">Diigo - <?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" 
  136. if ($post->post_status == "publish" && $isAvailDI) { ?><input alt="<?php echo $ii; ?>" style="float: right;" onmouseout="hidePopShAtt('SV');" onmouseover="showPopShAtt('SV', event);" onclick="return false;" type="button" class="button" name="rePostToDI_repostButton" id="rePostToDI_button" value="<?php _e('Repost to Diigo', 'social-networks-auto-poster-facebook-twitter-g') ?>" /> 
  137. <?php } ?>  
  138. <?php if (is_array($pMeta) && is_array($pMeta[$ii]) && isset($pMeta[$ii]['pgID']) ) {  
  139. ?> <span id="pstdDI<?php echo $ii; ?>" style="float: right; padding-top: 4px; padding-right: 10px;"> 
  140. <a style="font-size: 10px;" href="http://www.diigo.com/user/<?php echo $ntOpt['diUName']; ?>" target="_blank"><?php $nType="Diigo"; printf( __( 'Posted on', 'social-networks-auto-poster-facebook-twitter-g' ), $nType); ?> <?php echo (isset($pMeta[$ii]['pDate']) && $pMeta[$ii]['pDate']!='')?(" (".$pMeta[$ii]['pDate'].")"):""; ?></a> 
  141. </span><?php } ?>  
  142. </td></tr> 
  143. <?php if (!$isAvailDI) { ?><tr><th scope="row" style="text-align:right; width:150px; padding-top: 5px; padding-right:10px;"></th> <td><b>Setup your Diigo Account to AutoPost to Diigo</b> 
  144. <?php } else { if ($post->post_status != "publish" && function_exists('nxs_doSMAS5') ) { $ntOpt['postTime'] = get_post_time('U', false, $post_id); nxs_doSMAS5($nt, $ii, $ntOpt); } ?> 
  145.  
  146. <?php if ($ntOpt['rpstOn']=='1') { ?>  
  147.  
  148. <tr id="altFormat1" style=""><th scope="row" class="nxsTHRow"> 
  149. <input value="0" type="hidden" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]"/><input value="nxsi<?php echo $ii; ?>di" type="checkbox" name="<?php echo $nt; ?>[<?php echo $ii; ?>][rpstPostIncl]" <?php if (!empty($ntOpt['rpstPostIncl'])) echo "checked"; ?> /> 
  150. </th> 
  151. <td> <?php _e('Include in "Auto-Reposting" to this network.', 'social-networks-auto-poster-facebook-twitter-g') ?>  
  152. </td></tr> <?php } ?> 
  153.  
  154. <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> 
  155. <td><input value="<?php echo $diMsgTFormat ?>" type="text" name="di[<?php echo $ii; ?>][SNAPformatT]" style="width:60%;max-width: 610px;" onfocus="jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apDIMsgTFrmt<?php echo $ii; ?>');"/><?php nxs_doShowHint("apDIMsgTFrmt".$ii, '', '58'); ?></td></tr>  
  156. <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> 
  157. <td>  
  158. <textarea cols="150" rows="1" id="di<?php echo $ii; ?>SNAPformat" name="di[<?php echo $ii; ?>][SNAPformat]" style="width:60%;max-width: 610px;" onfocus="jQuery('#di<?php echo $ii; ?>SNAPformat').attr('rows', 4); jQuery('.nxs_FRMTHint').hide();mxs_showFrmtInfo('apDIMsgFrmt<?php echo $ii; ?>');"><?php echo $diMsgFormat; ?></textarea> 
  159. <?php nxs_doShowHint("apDIMsgFrmt".$ii, '', '58'); ?></td></tr> 
  160. <?php }  
  161. //#### Save Meta Tags to the Post 
  162. function adjMetaOpt($optMt, $pMeta) { if (isset($pMeta['isPosted'])) $optMt['isPosted'] = $pMeta['isPosted']; else $optMt['isPosted'] = ''; 
  163. if (isset($pMeta['SNAPformat'])) $optMt['diMsgFormat'] = $pMeta['SNAPformat'];  
  164. if (isset($pMeta['SNAPformatT'])) $optMt['diMsgTFormat'] = $pMeta['SNAPformatT'];  
  165. if (isset($pMeta['imgToUse'])) $optMt['imgToUse'] = $pMeta['imgToUse'];  
  166. if (isset($pMeta['timeToRun'])) $optMt['timeToRun'] = $pMeta['timeToRun']; if (isset($pMeta['rpstPostIncl'])) $optMt['rpstPostIncl'] = $pMeta['rpstPostIncl'];  
  167. if (isset($pMeta['doDI'])) $optMt['doDI'] = $pMeta['doDI'] == 1?1:0; else { if (isset($pMeta['SNAPformat'])) $optMt['doDI'] = 0; }  
  168. if (isset($pMeta['SNAPincludeDI']) && $pMeta['SNAPincludeDI'] == '1' ) $optMt['doDI'] = 1;  
  169. return $optMt; 
  170. }  
  171. }}