- Timestamp:
- Nov 13, 2009, 11:03:53 PM (15 years ago)
- Location:
- trunk/xpressme_integration_kit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/blocks/block_common.php
r435 r436 147 147 endif; 148 148 149 if(!function_exists("comment_type_select")): 150 function comment_type_select($option_name = '',$value='') 151 { 152 $selected = explode(',' , $value); 153 $isAll = (count($selected)==0||empty($selected[0]))?true:false; 154 155 $option = "<option value=\"0\" "; 156 if ($isAll) $form .= " selected=\"selected\""; 157 $option .= ">"._MB_XP2_ALL ."</option>"; 158 159 $option .= "<option value=\"1\" "; 160 if (in_array(1, $selected)) 161 $option .= " selected=\"selected\""; 162 $option .= ">"._MB_XP2_COMMENT ."</option>"; 163 164 $option .= "<option value=\"2\" "; 165 if (in_array(2, $selected)) 166 $option .= " selected=\"selected\""; 167 $option .= ">"._MB_XP2_TRUCKBACK ."</option>"; 168 169 $option .= "<option value=\"3\" "; 170 if (in_array(3, $selected)) 171 $option .= " selected=\"selected\""; 172 $option .= ">"._MB_XP2_PINGBACK ."</option>"; 173 174 $output = _MB_XP2_COM_TYPE . "<br />\n"; 175 $output .= "<input type='hidden' name='$option_name' value='$value' />\n"; 176 $output .= ' <select name="com_type" multiple="multiple" onclick="ComTypeSelect()">' ."\n"; 177 $output .= $option; 178 $output .= '</select><br />'; 179 $output .= ' 180 <script type="text/javascript"> 181 function ComTypeSelect(){ 182 var idx=new Array(); 183 var sel=document.forms["blockform"].elements["com_type"].options; 184 for(var i=0, n=0; i<sel.length; i++){ 185 if(sel[i].selected){ idx[n++]=sel[i].value; } 186 } 187 if(idx.length>0){ 188 document.forms["blockform"].elements["' .$option_name . '"].value = idx; 189 } 190 } 191 </script> 192 '; 193 194 return $output; 195 196 } 197 endif; 198 199 149 200 ?> -
trunk/xpressme_integration_kit/blocks/recent_comments_block.php
r232 r436 23 23 $date_format = empty( $options[4] ) ? '' : $options[4] ; 24 24 $time_format = empty( $options[5] ) ? '' : $options[5] ; 25 $selected = array_slice($options,6); // get allowed cats25 $com_select = empty( $options[6] ) ? '0' : $options[6] ; 26 26 27 27 $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; … … 37 37 $form .= _MB_XP2_TIME_FORMAT .": <input type='text' name='options[5]' value='" . $time_format . "' /><br />\n"; 38 38 $form .= "<br />\n"; 39 $form .= _MB_XP2_COM_TYPE . "<br />\n"; 40 $isAll = (count($selected)==0||empty($selected[0]))?true:false; 41 $form .= " <select name=\"options[]\" multiple=\"multiple\">"; 42 $form .= "<option value=\"0\" "; 43 if ($isAll) $form .= " selected=\"selected\""; 44 $form .= ">"._MB_XP2_ALL ."</option>"; 45 46 $form .= "<option value=\"1\" "; 47 if (in_array(1, $selected)) 48 $form .= " selected=\"selected\""; 49 $form .= ">"._MB_XP2_COMMENT ."</option>"; 50 51 $form .= "<option value=\"2\" "; 52 if (in_array(2, $selected)) 53 $form .= " selected=\"selected\""; 54 $form .= ">"._MB_XP2_TRUCKBACK ."</option>"; 55 56 $form .= "<option value=\"3\" "; 57 if (in_array(3, $selected)) 58 $form .= " selected=\"selected\""; 59 $form .= ">"._MB_XP2_PINGBACK ."</option>"; 60 $form .= "</select><br />"; 61 // $form .="<br /><input type='text' size='60' name='options[5]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />"; 39 $form .= comment_type_select('options[6]' , $com_select); 62 40 63 41 -
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_comments_block_theme.php
r360 r436 10 10 $date_format = empty( $options[4] ) ? '' : $options[4] ; 11 11 $time_format = empty( $options[5] ) ? '' : $options[5] ; 12 $selected = array_slice($options,6); // get allowed cats 12 $com_select = empty( $options[6] ) ? '0' : $options[6] ; 13 14 $selected = explode(',' , $com_select); 13 15 14 16 $mydirpath = get_xpress_dir_path();
Note: See TracChangeset
for help on using the changeset viewer.