stay zblogphp theme function Design Some modules need to call the articles specified by the webmaster, such as CMS topic, topic sidebar module, recommendation article module, etc. The common practice in topic configuration is to set the article ID number to be displayed, and separate multiple articles with small commas in English. Although this method can achieve the effect, it is still not flexible enough to operate, so you need to query the article ID number. So today I wrote another method, which we can try if we think it is appropriate.
1. Mount the article editing page interface in include.php
Add_Filter_Plugin('Filter_Plugin_Edit_Response5','umWm_postType');
2. Add the interface configuration field in include.php
function umWm_postType() { global $zbp, $article; if($article->Type=="0"){ $postType='Join the first promotion | Join the selection '; $array=explode('|',$postType); foreach ($array as $v) { echo ' <input type="hidden" name="meta_'.$v.'" value=""/> <label> <input type=" checkbox "name="meta_'.$ v.'" value="'. html specialchars($v).' " '; if ($article->Metas->$v == $v){echo 'checked="checked"';} echo ' class="'.$v.'" /> '.$ v.'</label><br />'; } } }
This is hidden content, please review the hidden content after comments, thank you!