hayw0027 Posted November 6, 2008 Share Posted November 6, 2008 Hey guys, need a little help im getting these errors and cant work out the problem. Fatal error: Cannot redeclare get_wpvers() (previously declared in /hsphere/local/home/..../wp-content/plugins/article-directory/article-directory.php:69) in /hsphere/local/home/...../wp-content/plugins/article-directory/article-directory.php on line 67 This is line 67 and 69: function get_wpvers() { global $wp_version; What is the problem? Thanx Quote Link to comment https://forums.phpfreaks.com/topic/131636-need-help-asap-simple-for-php-people/ Share on other sites More sharing options...
revraz Posted November 6, 2008 Share Posted November 6, 2008 post lines 65-70 Quote Link to comment https://forums.phpfreaks.com/topic/131636-need-help-asap-simple-for-php-people/#findComment-683685 Share on other sites More sharing options...
JonnoTheDev Posted November 6, 2008 Share Posted November 6, 2008 You have 2 functions with the same name included in your script. You cannot do this, rename one of them. Quote Link to comment https://forums.phpfreaks.com/topic/131636-need-help-asap-simple-for-php-people/#findComment-683687 Share on other sites More sharing options...
hayw0027 Posted November 6, 2008 Author Share Posted November 6, 2008 Thanks for answering guys. This is lines 60 - 75 $exclude_cat = array($exclude_cats); global $wpdb; $cal_tree = array(); if (!$column_count) $column_count = 1; function get_wpvers() { global $wp_version; preg_match("/\d\.\d/i", $wp_version, $match); // wpmu - increment version by 1.0 to match wp if (strpos($wp_version, 'wordpress-mu') !== false) { $match[0] = $match[0] + 1.0; Ok Neil, il start searching through the script to spot 2 of the same functions Quote Link to comment https://forums.phpfreaks.com/topic/131636-need-help-asap-simple-for-php-people/#findComment-683702 Share on other sites More sharing options...
flyhoney Posted November 6, 2008 Share Posted November 6, 2008 If you find the two functions and they are identical, you can solve this error by wrapping one of the functions with the following: <?php if (!function_exists('get_wpvers')) { function get_wpvers() { // ..... } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/131636-need-help-asap-simple-for-php-people/#findComment-683709 Share on other sites More sharing options...
JonnoTheDev Posted November 6, 2008 Share Posted November 6, 2008 Or you maybe including the same file twice in a script. Quote Link to comment https://forums.phpfreaks.com/topic/131636-need-help-asap-simple-for-php-people/#findComment-683710 Share on other sites More sharing options...
hayw0027 Posted November 6, 2008 Author Share Posted November 6, 2008 Ok, had a look and i couldnt see it repeated twice, Its a long script but im going to post the lot here. Hope dont get in trouble for it. Its a wordpress plugin and nobody else in the plugin comments have mentioned having this problem and i havent had any responce to mine. Sorry for the hassle people. <?php /* Plugin Name: Article Directory Plugin URI: http://articlesss.com/article-directory-wordpress-plugin/ Description: Displays the structured list of categories (like in article directory), which can be easily customized with CSS. Version: 0.9.3 Author: Dimox Author URI: http://dimox.name/ */ function artdir_get_version(){ return '0.9.3'; } add_action('init', 'artdir_textdomain'); function artdir_textdomain() { load_plugin_textdomain('article-directory', 'wp-content/plugins/article-directory'); } function artdir_plugin_description($string) { if (trim($string) == 'Displays the structured list of categories (like in article directory), which can be easily customized with CSS.') $string = __('Displays the structured list of categories (like in article directory), which can be easily customized with CSS. See an example at <a href="http://articlesss.com/">articlesss.com</a>.', 'article-directory'); return $string; } add_filter('pre_kses', 'artdir_plugin_description'); function article_directory() { // получаем вÑе опции $options = get_option('article_directory'); // проверÑем каждую опцию // еÑли Ð¾Ð¿Ñ†Ð¸Ñ ÐµÑÑ‚ÑŒ, то приÑваиваем её переменной, еÑли нет (, то дефолт $exclude_cats = isset($options['exclude_cats']) ? $options['exclude_cats'] : 0; $show_parent_count = isset($options['show_parent_count']) ? (int) $options['show_parent_count'] : 1; $show_child_count = isset($options['show_child_count']) ? (int) $options['show_child_count'] : 1; $hide_empty = isset($options['hide_empty']) ? (int) $options['hide_empty'] : 0; $desc_for_parent_title = isset($options['desc_for_parent_title']) ? (int) $options['desc_for_parent_title'] : 1; $desc_for_child_title = isset($options['desc_for_child_title']) ? (int) $options['desc_for_child_title'] : 1; $child_hierarchical = isset($options['child_hierarchical']) ? (int) $options['child_hierarchical'] : 1; $column_count = isset($options['column_count']) ? $options['column_count'] : 3; $sort_direction = isset($options['sort_direction']) ? (int) $options['sort_direction'] : 0; $no_child_alert = isset($options['no_child_alert']) ? (int) $options['no_child_alert'] : 1; $show_child = isset($options['show_child']) ? (int) $options['show_child'] : 1; $maximum_child = isset($options['maximum_child']) ? $options['maximum_child'] : 0; $forgot_the_cat = isset($options['forgot_the_cat']) ? (int) $options['forgot_the_cat'] : 1; $sel_only_one_cat = isset($options['sel_only_one_cat']) ? (int) $options['sel_only_one_cat'] : 1; $kinderloss = isset($options['kinderloss']) ? (int) $options['kinderloss'] : 1; $hide_blocks = isset($options['hide_blocks']) ? (int) $options['hide_blocks'] : 1; $using_wp_version = isset($options['using_wp_version']) ? (int) $options['using_wp_version'] : 1; $cat_block_height = isset($options['cat_block_height']) ? $options['cat_block_height'] : 200; $hide_tags_field = isset($options['hide_tags_field']) ? (int) $options['hide_tags_field'] : 0; $publish_terms = isset($options['publish_terms']) ? (int) $options['publish_terms'] : 0; $publish_terms_text = isset($options['publish_terms_text']) ? $options['publish_terms_text'] : ''; $exclude_cat = array($exclude_cats); global $wpdb; $cal_tree = array(); if (!$column_count) $column_count = 1; function get_wpvers() { global $wp_version; preg_match("/\d\.\d/i", $wp_version, $match); // wpmu - increment version by 1.0 to match wp if (strpos($wp_version, 'wordpress-mu') !== false) { $match[0] = $match[0] + 1.0; } return $match[0]; } if (get_wpvers() == '2.1' || get_wpvers() == '2.2') { error_reporting(0); $wpdb->show_errors = false; } global $rssfeeds; $feed = ''; if ($rssfeeds) { $feed = 'RSS'; $show_parent_count = 0; $show_child_count = 0; } if (get_wpvers() < '2.3') { // for WP < 2.3 $parent_cats = $wpdb->get_results("SELECT * FROM " . $wpdb->categories . " WHERE category_parent = 0 " . ( count($exclude_cat) ? ' AND cat_ID NOT IN (' . implode(',', $exclude_cat) . ') ' : '' ) . " ORDER BY cat_name"); foreach ($parent_cats as $parent) { $summ = "SELECT SUM(category_count) FROM " . $wpdb->categories . " WHERE category_parent = " . $parent->cat_ID; $child_summ = mysql_result(mysql_query($summ),0); $catid = $wpdb->get_var("SELECT cat_ID FROM " . $wpdb->categories . " WHERE category_parent = " . $parent->cat_ID); //определÑем ID подрубрики 1-го ÑƒÑ€Ð¾Ð²Ð½Ñ $sub_child_summ = (int)$catid ? $wpdb->get_var("SELECT SUM(category_count) FROM " . $wpdb->categories . " WHERE category_parent = " . $catid) : 0; //Ñчитаем кол-во Ñтатей в подрубрике 2-го ÑƒÑ€Ð¾Ð²Ð½Ñ $cat_name = get_the_category_by_ID($parent->cat_ID); $descr = sprintf(__("View all posts filed under %s"), $cat_name); if ($desc_for_parent_title == 1) { if (empty($parent->category_description)) { $descr = sprintf(__("View all posts filed under %s"), $cat_name); } else { $descr = $parent->category_description; } } $child_summ += $parent->category_count; //прибавлÑем к Ñумме родительÑкой рубрики Ñумму в подрубрике 1-го ÑƒÑ€Ð¾Ð²Ð½Ñ $child_summ += $sub_child_summ; //прибавлÑем к Ñумме родительÑкой рубрики Ñумму в подрубрике 2-го ÑƒÑ€Ð¾Ð²Ð½Ñ if ($show_parent_count == 1) { $parent_count = ' (' . $child_summ . ')'; } else { $parent_count = ''; } // перехват вывода ob_start(); wp_list_cats( ( count($exclude_cat) ? 'exclude=' . implode(',', $exclude_cat) : '' ) . '&optioncount=' . $show_child_count . '&hide_empty=' . $hide_empty . '&use_desc_for_title=' . $desc_for_child_title . '&child_of=' . $parent->cat_ID . '&hierarchical=1&feed=' . $feed); $echo = ob_get_contents(); ob_end_clean(); $cal_tree[] = array( 'cat' => array( 'href' => get_category_link($parent->cat_ID), 'title' => $descr, 'name' => $cat_name, 'count' => $parent_count ), 'cats'=> $echo ); } } // end for WP < 2.3 else { // for WP >= 2.3 $parent_cats = $wpdb->get_results("SELECT * FROM " . $wpdb->term_taxonomy . " term_taxonomy LEFT JOIN " . $wpdb->terms . " terms ON terms.term_id = term_taxonomy.term_id WHERE term_taxonomy.taxonomy = 'category' AND term_taxonomy.parent = 0 " . ( count($exclude_cat) ? ' AND terms.term_id NOT IN (' . implode(',', $exclude_cat) . ') ' : '' ) . " ORDER BY terms.name"); foreach ($parent_cats as $parent) { $summ = "SELECT SUM(count) FROM " . $wpdb->term_taxonomy . " WHERE taxonomy = 'category' AND parent = " . $parent->term_id; $child_summ = mysql_result(mysql_query($summ),0); //Ñчитаем кол-во Ñтатей в подрубрике 1-го ÑƒÑ€Ð¾Ð²Ð½Ñ $catid = $wpdb->get_var("SELECT term_ID FROM " . $wpdb->term_taxonomy . " WHERE taxonomy = 'category' AND parent = " . $parent->term_id); //определÑем ID подрубрики 1-го ÑƒÑ€Ð¾Ð²Ð½Ñ $sub_child_summ = (int)$catid ? $wpdb->get_var("SELECT SUM(count) FROM " . $wpdb->term_taxonomy . " WHERE taxonomy = 'category' AND parent = " . $catid) : 0; //Ñчитаем кол-во Ñтатей в подрубрике 2-го ÑƒÑ€Ð¾Ð²Ð½Ñ $cat_name = get_the_category_by_ID($parent->term_id); $descr = sprintf(__("View all posts filed under %s"), $cat_name); if ($desc_for_parent_title == 1) { if (empty($parent->description)) { $descr = sprintf(__("View all posts filed under %s"), $cat_name); } else { $descr = $parent->description; } } $child_summ += $parent->count; //прибавлÑем к Ñумме родительÑкой рубрики Ñумму в подрубрике 1-го ÑƒÑ€Ð¾Ð²Ð½Ñ $child_summ += $sub_child_summ; //прибавлÑем к Ñумме родительÑкой рубрики Ñумму в подрубрике 2-го ÑƒÑ€Ð¾Ð²Ð½Ñ if ($show_parent_count == 1) { $parent_count = ' (' . $child_summ . ')'; } else { $parent_count = ''; } $cal_tree[] = array( 'cat' => array( 'href' => get_category_link($parent->term_id), 'title' => $descr, 'name' => $cat_name, 'count' => $parent_count ), 'cats'=> wp_list_categories( ( count($exclude_cat) ? 'exclude=' . implode(',', $exclude_cat) : '' ) . '&show_count=' . $show_child_count . '&hide_empty=' . $hide_empty . '&use_desc_for_title=' . $desc_for_child_title . '&child_of=' . $parent->term_id . '&title_li=&hierarchical=' . $child_hierarchical . '&echo=0&feed=' . $feed) ); } } // end for WP >= 2.3 $_tree = array(); $count = count($cal_tree); if ($sort_direction) { $line_count = ceil( $count / $column_count ); $limit = $count - $line_count * $column_count % $count; for ($i = 0; $i < $count; $i++) { $index = floor($i / $line_count) + ($limit && $i > $limit ? 1 : 0); if (!isset($_tree[$index])) { $_tree[$index] = array(); } $_tree[$index][] = &$cal_tree[$i]; } } else { for ($i = 0; $i < $count; $i++) { $index = $i % $column_count; if (!isset($_tree[$index])) { $_tree[$index] = array(); } $_tree[$index][] = &$cal_tree[$i]; } } if (count($_tree)) { echo ' <div id="categories">'; for ($j = 0, $count = count($_tree); $j < $count; $j++) { // вывод Ñтолбца $write = ' <ul class="column"> '; // вывод рубрик Ð´Ð»Ñ Ñтолбца for ($i = 0, $icount = count($_tree[$j]); $i < $icount; $i++) { $catcount = $i + 11; if ($j == 1) $catcount = $i + 21; if ($j == 2) $catcount = $i + 31; if ($j == 3) $catcount = $i + 41; if ($j == 4) $catcount = $i + 51; if ($rssfeeds) { $write .= ' <li id="cat-'. $catcount .'"><div><a href="' . wp_specialchars($_tree[$j][$i]['cat']['href']) . '" title="' . wp_specialchars($_tree[$j][$i]['cat']['title']) . '">' . wp_specialchars($_tree[$j][$i]['cat']['name']) . '</a> (<a href="' . wp_specialchars($_tree[$j][$i]['cat']['href']) . '/feed/" title="' . wp_specialchars($_tree[$j][$i]['cat']['title']) . '">RSS</a>)</div>'; } else { $write .= ' <li id="cat-'. $catcount .'"><div><a href="' . wp_specialchars($_tree[$j][$i]['cat']['href']) . '" title="' . wp_specialchars($_tree[$j][$i]['cat']['title']) . '">' . wp_specialchars($_tree[$j][$i]['cat']['name']) . '</a>' . $_tree[$j][$i]['cat']['count'] . '</div>'; } // see wp-includes/category-template.php::276 // $output .= '<li>' . __("No categories") . '</li>'; $nocats = '<li>' . __("No categories") . '</li>'; if ($no_child_alert == 1) $nocats = ''; if ($_tree[$j][$i]['cats'] != $nocats && $show_child == 1) { $write .= ' <ul class="sub-categories">'; if ($maximum_child){ for ($s = 0, $strlen = strlen($_tree[$j][$i]['cats']), $counter = $maximum_child+1, $slevel = 0; $s < $strlen; $s++){ if (!$slevel && substr($_tree[$j][$i]['cats'], $s, 3) == '<li' && !(--$counter)) break; else if (substr($_tree[$j][$i]['cats'], $s, 3) == '<ul') $slevel++; else if ($slevel && substr($_tree[$j][$i]['cats'], $s-4, 4) == '/ul>') $slevel--; else if (!$slevel) $write .= substr($_tree[$j][$i]['cats'], $s, 1); } $licount = substr_count($_tree[$j][$i]['cats'], '<li'); if ( ($licount > $maximum_child) && ($_tree[$j][$i]['cats'] != '<li>' . __("No categories") . '</li>') ) { $write .= '<li>...</li>'; } } else $write .= $_tree[$j][$i]['cats']; $write .= ' </ul>'; } $write .= ' </li>'; } // печать одного Ñтолбца echo $write . ' </ul>'; } echo ' </div>'; } } function artdir_options_page() { if (function_exists('add_options_page')) { add_options_page('Article Directory', 'Article Directory', 8, __FILE__, 'artdir_options'); } } function artdir_options() { $options = $newoptions = get_option('article_directory'); //if update if (isset($_POST['artdir_update'])) { $newoptions['exclude_cats'] = stripslashes($_POST['exclude_cats']); $newoptions['show_parent_count'] = (int) stripslashes($_POST['show_parent_count']); $newoptions['show_child_count'] = (int) stripslashes($_POST['show_child_count']); $newoptions['hide_empty'] = (int) stripslashes($_POST['hide_empty']); $newoptions['desc_for_parent_title'] = (int) stripslashes($_POST['desc_for_parent_title']); $newoptions['desc_for_child_title'] = (int) stripslashes($_POST['desc_for_child_title']); $newoptions['child_hierarchical'] = (int) stripslashes($_POST['child_hierarchical']); $newoptions['column_count'] = stripslashes($_POST['column_count']); $newoptions['sort_direction'] = (int) stripslashes($_POST['sort_direction']); $newoptions['no_child_alert'] = (int) stripslashes($_POST['no_child_alert']); $newoptions['show_child'] = (int) stripslashes($_POST['show_child']); $newoptions['maximum_child'] = stripslashes($_POST['maximum_child']); $newoptions['forgot_the_cat'] = (int) stripslashes($_POST['forgot_the_cat']); $newoptions['sel_only_one_cat'] = (int) stripslashes($_POST['sel_only_one_cat']); $newoptions['kinderloss'] = (int) stripslashes($_POST['kinderloss']); $newoptions['hide_blocks'] = (int) stripslashes($_POST['hide_blocks']); $newoptions['using_wp_version'] = (int) stripslashes($_POST['using_wp_version']); $newoptions['cat_block_height'] = stripslashes($_POST['cat_block_height']); $newoptions['hide_tags_field'] = (int) stripslashes($_POST['hide_tags_field']); $newoptions['publish_terms'] = (int) stripslashes($_POST['publish_terms']); $newoptions['publish_terms_text'] = stripslashes($_POST['publish_terms_text']); $error=false; //check errors if(!preg_match("/^(\d+,)*\d+$/", $newoptions['exclude_cats'])){ $error .='<li>' . __('IDs of categories is incorrect.', 'article-directory') . '</li>'; $error1 = ' style="border: 1px solid #F00; background: #FFF5F4;"'; } if (!is_numeric($newoptions['column_count'])) { $error .='<li>' . __('You can only specify a digit in the "The number of columns for categories list".', 'article-directory') . '</li>'; $error2 = ' style="border: 1px solid #F00; background: #FFF5F4;"'; } elseif ($newoptions['column_count'] == 0) { $error .='<li>' . __('The number of columns should not be zero.', 'article-directory') . '</li>'; $error2 = ' style="border: 1px solid #F00; background: #FFF5F4;"'; } if (!is_numeric($newoptions['maximum_child'])) { $error .='<li>' . __('You can only specify a digit in the "The number of child categories to show".', 'article-directory') . '</li>'; $error3 = ' style="border: 1px solid #F00; background: #FFF5F4;"'; } if (!is_numeric($newoptions['cat_block_height'])) { $error .='<li>' . __('You can only specify a digit in the "The height of the categories block".', 'article-directory') . '</li>'; $error4 = ' style="border: 1px solid #F00; background: #FFF5F4;"'; } elseif ($newoptions['cat_block_height'] < 100) { $error .='<li>' . __('The height of the categories block can\'t be less than 100 pixels.', 'article-directory') . '</li>'; $error4 = ' style="border: 1px solid #F00; background: #FFF5F4;"'; } //if something went wrong we write an error message if ($error) { ?> <div class="error"> <p><strong><?php _e('Some Errors Occurred:', 'article-directory'); ?></strong></p> <ul><?php echo $error;?></ul> </div> <?php } else { // еÑли опции разные, то обновлÑем их if ( $options != $newoptions ) { $options = $newoptions; update_option('article_directory', $options); ?> <div class="updated"><p><?php _e('Options saved!', 'article-directory'); ?></p></div> <?php } } } //if reset elseif (isset($_POST['artdir_reset'])) { // проÑто добавлÑем дефолт $options = array( 'exclude_cats' => 0, 'show_parent_count' => 1, 'show_child_count' => 1, 'hide_empty' => 0, 'desc_for_parent_title' => 1, 'desc_for_child_title' => 1, 'child_hierarchical' => 1, 'column_count' => 3, 'sort_direction' => 0, 'no_child_alert' => 1, 'show_child' => 1, 'maximum_child' => 0, 'forgot_the_cat' => 1, 'sel_only_one_cat' => 1, 'kinderloss' => 1, 'hide_blocks' => 1, 'using_wp_version' => 1, 'cat_block_height' => 200, 'hide_tags_field' => 0, 'publish_terms' => 0, 'publish_terms_text' => '', ); update_option('article_directory', $options); ?> <div class="updated"><p><?php _e('Default values restored.', 'article-directory'); ?></p></div> <?php } // attribute_escape - удалÑет вÑе плохое при выводе в форме $exclude_cats = attribute_escape($newoptions['exclude_cats']); $show_parent_count = attribute_escape($newoptions['show_parent_count']); $show_child_count = attribute_escape($newoptions['show_child_count']); $hide_empty = attribute_escape($newoptions['hide_empty']); $desc_for_parent_title = attribute_escape($newoptions['desc_for_parent_title']); $desc_for_child_title = attribute_escape($newoptions['desc_for_child_title']); $child_hierarchical = attribute_escape($newoptions['child_hierarchical']); $column_count = attribute_escape($newoptions['column_count']); $sort_direction = attribute_escape($newoptions['sort_direction']); $no_child_alert = attribute_escape($newoptions['no_child_alert']); $show_child = attribute_escape($newoptions['show_child']); $maximum_child = attribute_escape($newoptions['maximum_child']); $forgot_the_cat = attribute_escape($newoptions['forgot_the_cat']); $sel_only_one_cat = attribute_escape($newoptions['sel_only_one_cat']); $kinderloss = attribute_escape($newoptions['kinderloss']); $hide_blocks = attribute_escape($newoptions['hide_blocks']); $using_wp_version = attribute_escape($newoptions['using_wp_version']); $cat_block_height = attribute_escape($newoptions['cat_block_height']); $hide_tags_field = attribute_escape($newoptions['hide_tags_field']); $publish_terms = attribute_escape($newoptions['publish_terms']); $publish_terms_text = attribute_escape($newoptions['publish_terms_text']); if (!isset($_POST['artdir_update'])) { // проверÑем каждую опцию // еÑли Ð¾Ð¿Ñ†Ð¸Ñ ÐµÑÑ‚ÑŒ, то приÑваиваем её переменной, еÑли нет (, то дефолт $exclude_cats = isset($options['exclude_cats']) ? $options['exclude_cats'] : 0; $show_parent_count = isset($options['show_parent_count']) ? (int) $options['show_parent_count'] : 1; $show_child_count = isset($options['show_child_count']) ? (int) $options['show_child_count'] : 1; $hide_empty = isset($options['hide_empty']) ? (int) $options['hide_empty'] : 0; $desc_for_parent_title = isset($options['desc_for_parent_title']) ? (int) $options['desc_for_parent_title'] : 1; $desc_for_child_title = isset($options['desc_for_child_title']) ? (int) $options['desc_for_child_title'] : 1; $child_hierarchical = isset($options['child_hierarchical']) ? (int) $options['child_hierarchical'] : 1; $column_count = isset($options['column_count']) ? $options['column_count'] : 3; $sort_direction = isset($options['sort_direction']) ? (int) $options['sort_direction'] : 0; $no_child_alert = isset($options['no_child_alert']) ? (int) $options['no_child_alert'] : 1; $show_child = isset($options['show_child']) ? (int) $options['show_child'] : 1; $maximum_child = isset($options['maximum_child']) ? $options['maximum_child'] : 0; $forgot_the_cat = isset($options['forgot_the_cat']) ? (int) $options['forgot_the_cat'] : 1; $sel_only_one_cat = isset($options['sel_only_one_cat']) ? (int) $options['sel_only_one_cat'] : 1; $kinderloss = isset($options['kinderloss']) ? (int) $options['kinderloss'] : 1; $hide_blocks = isset($options['hide_blocks']) ? (int) $options['hide_blocks'] : 1; $using_wp_version = isset($options['using_wp_version']) ? (int) $options['using_wp_version'] : 1; $cat_block_height = isset($options['cat_block_height']) ? $options['cat_block_height'] : 200; $hide_tags_field = isset($options['hide_tags_field']) ? (int) $options['hide_tags_field'] : 0; $publish_terms = isset($options['publish_terms']) ? (int) $options['publish_terms'] : 0; $publish_terms_text = isset($options['publish_terms_text']) ? $options['publish_terms_text'] : ''; } ?> <div class="wrap"> <h2><?php _e('Article Directory Options', 'article-directory'); ?></h2> <div style="text-align:center;"> <p>Article Directory v <?php echo artdir_get_version() ?> by <a href="http://dimox.name">Dimox</a>.</p> </div> <form method="post"> <h3><?php _e('Categories List Options', 'article-directory'); ?></h3> <table class="form-table"> <tr valign="top"> <th scope="row" style="width: 360px"><label for="exclude_cats"><?php _e('Comma separated IDs of categories, which should be excluded:', 'article-directory'); ?></label></th> <td width="130"> <input<?php echo $error1; ?> name="exclude_cats" type="text" id="exclude_cats" value="<?php echo $exclude_cats; ?>" size="15" /> </td> <td><?php _e('For example , "<tt>1,3,7</tt>" (without quotes). 0 - all categories will be displayed.', 'article-directory'); ?></td> </tr> <tr valign="top"> <th scope="row"><label for="show_parent_count"><?php _e('Show the number of articles in parent categories?', 'article-directory'); ?></label></th> <td> <select name="show_parent_count" size="1"> <option value="1"<?php selected('1', $show_parent_count); ?>><?php _e('Yes', 'article-directory'); ?></option> <option value="0"<?php selected('0', $show_parent_count); ?>><?php _e('No', 'article-directory'); ?></option> </select> </td> <td></td> </tr> <tr valign="top"> <th scope="row"><label for="show_child_count"><?php _e('Show the number of articles in child categories?', 'article-directory'); ?></label></th> <td> <select name="show_child_count" size="1"> <option value="1"<?php selected('1', $show_child_count); ?>><?php _e('Yes', 'article-directory'); ?></option> <option value="0"<?php selected('0', $show_child_count); ?>><?php _e('No', 'article-directory'); ?></option> </select> </td> <td></td> </tr> <tr valign="top"> <th scope="row"><label for="hide_empty"><?php _e('Hide empty categories?', 'article-directory'); ?></label></th> <td> <select name="hide_empty" size="1"> <option value="1"<?php selected('1', $hide_empty); ?>><?php _e('Yes', 'article-directory'); ?></option> <option value="0"<?php selected('0', $hide_empty); ?>><?php _e('No', 'article-directory'); ?></option> </select> </td> <td></td> </tr> <tr valign="top"> <th scope="row"><label for="desc_for_parent_title"><?php _e('Show description in the title of parent categories?', 'article-directory'); ?></label></th> <td> <select name="desc_for_parent_title" size="1"> <option value="1"<?php selected('1', $desc_for_parent_title); ?>><?php _e('Yes', 'article-directory'); ?></option> <option value="0"<?php selected('0', $desc_for_parent_title); ?>><?php _e('No', 'article-directory'); ?></option> </select> </td> <td></td> </tr> <tr valign="top"> <th scope="row"><label for="desc_for_child_title"><?php _e('Show description in the title of child categories?', 'article-directory'); ?></label></th> <td> <select name="desc_for_child_title" size="1"> <option value="1"<?php selected('1', $desc_for_child_title); ?>><?php _e('Yes', 'article-directory'); ?></option> <option value="0"<?php selected('0', $desc_for_child_title); ?>><?php _e('No', 'article-directory'); ?></option> </select> </td> <td></td> </tr> ?> Quote Link to comment https://forums.phpfreaks.com/topic/131636-need-help-asap-simple-for-php-people/#findComment-683726 Share on other sites More sharing options...
hayw0027 Posted November 6, 2008 Author Share Posted November 6, 2008 thats not all code because it was 2 big but half of it anyways. Quote Link to comment https://forums.phpfreaks.com/topic/131636-need-help-asap-simple-for-php-people/#findComment-683729 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.