cat_ID] = $tp_cat->category_nicename; } $categories_tmp = array_unshift($tp_categories, "Select a category:"); $tp_categories_obj = get_categories('hide_empty=0&depth=-1'); foreach ($tp_categories_obj as $tp_cat) { $tp_pcategories[$tp_cat->cat_ID] = $tp_cat->category_nicename; } function filter_where($where = '') { //posts in the last 30 days $where .= " AND post_date > '" . date('Y-m-d', strtotime('-300 days')) . "'"; return $where; } add_filter('posts_where', 'filter_where'); $tp_post_obj = query_posts('post_type=post&posts_per_page=10&orderby=comment_count&order=DESC'); foreach ($tp_post_obj as $tp_pos) { $tp_post_id[$tp_pos->ID] = $tp_pos->ID; } $posts_tmp = array_unshift($tp_post_id, "Select a Post:"); //wp_reset_query(); /*================================================================================*/ $number_entries = array("Select a Number:","1","2","3","4","5","6","7","8","9","10", "11","12", "13", "14", "15" ); $menu_entries = array("Select a Menu Type:","Page","Category"); $highpanop = array("Show","Hide"); $hierarchyop = array("Parent","Parent&Child"); $yesnoop = array("Yes","No"); $excludeop = array("Exclude"); $options = array ( //Header Image array( "name" => "Header Area Options", "type" => "mainheading"), array( "name" => "Header Image Settings", "type" => "heading", "desc" => "Customizes header image."), array( "name" => "Path for the header image", "desc" => "Type the path for the image you want as your site banner For best result image size should be 900X190. For Example: http://www.knowhowto.com.au/wp-content/themes/shadow/images/header.jpg", "id" => $shortname."_headerimg", "std" => "", "type" => "text"), // Main Content Area array( "name" => "Content Area Options", "type" => "mainheading"), array( "name" => "Headline Panel Settings", "type" => "heading", "desc" => "This section customizes the Headline Panel."), array( "name" => "Custom Title for Headline Panel", "desc" => "Type the title you want for this section. For example: \"Headline\" or \"Today's Headline\"", "id" => $shortname."_hltitle", "std" => "", "type" => "text"), array( "name" => "Headline Post", "desc" => "Select the category that you would like to have displayed on the Headline Area. By default the posts from the last 30 days will be appreared in this dropdown menu.", "id" => $shortname."_hlcat", "std" => "Select a category:", "type" => "select", "options" => $tp_post_id), array( "name" => "Panel Display Option", "desc" => "The option to select whether you want this panel to be displayed. It will appear in main content area.", "id" => $shortname."_headop", "type" => "radiobutton", "options" => $highpanop), array( "name" => "Featured Panel Settings", "type" => "heading", "desc" => "This section customizes the Featured panel area."), array( "name" => "Custom Title for Featured Panel", "desc" => "Type the title you want for this section. For example: \"Featured News\"", "id" => $shortname."_ftitle", "std" => "", "type" => "text"), array( "name" => "Featured Panel category", "desc" => "Select the category that you would like to have displayed on the featured panel.", "id" => $shortname."_featcat", "std" => "Select a category:", "type" => "select", "options" => $tp_categories), array( "name" => "Panel Display Option", "desc" => "The option to select whether you want this panel to be displayed. It will appear in main content area.", "id" => $shortname."_featop", "type" => "radiobutton", "options" => $highpanop), //Latest Posts array( "name" => "Latest Posts Panel Settings", "type" => "heading", "desc" => "This section customizes the Latest Post panel area."), array( "name" => "Custom Title for Latest Post Panel", "desc" => "Type the title you want for this section. For example: \"Latest News\"", "id" => $shortname."_ltitle", "std" => "", "type" => "text"), // Menu Option array( "name" => "Menu Options", "type" => "mainheading"), array( "name" => "Top Menu Options", "type" => "heading", "desc" => "This section Selects the Type of menu you want."), array( "name" => "Menu Option", "desc" => "Select the type of menu that you would like to have displayed as main menu on top of you web site", "id" => $shortname."_menuopt", "std" => "Select a Menu Type:", "type" => "select", "options" => $menu_entries), // Sidebar Options array( "name" => "Sidebar Options", "type" => "mainheading"), array( "name" => "Highlighted Panel Settings", "type" => "heading", "desc" => "This section customizes the Highlighted panel area."), array( "name" => "Custom Title for Highlighted Panel", "desc" => "Type the title you want for this section. For example: \"Highlighted News\"", "id" => $shortname."_hgtitle", "std" => "", "type" => "text"), array( "name" => "Highlighted Panel category", "desc" => "Select the category that you would like to have displayed on the highlighted panel.", "id" => $shortname."_highcat", "std" => "Select a category:", "type" => "select", "options" => $tp_categories), array( "name" => "Number of Articles", "desc" => "Select the number of Articles to display .", "id" => $shortname."_nbrart", "std" => "Select a Number:", "type" => "select", "options" => $number_entries), array( "name" => "Panel Display Option", "desc" => "The option to select whether you want this panel to be displayed. It will appear on sidebar.", "id" => $shortname."_highop", "type" => "radiobutton", "options" => $highpanop), array( "name" => "Image Galery Settings", "type" => "heading", "desc" => "Settings for Image Gallery."), array( "name" => "Custom Title for Image Gallery Panel", "desc" => "Type the title you want for this section. For example: \"Image Gallery\"", "id" => $shortname."_igtitle", "std" => "", "type" => "text"), array( "name" => "Image Gallery category", "desc" => "Select the category that you would like to have displayed on the Image Gallery panel.", "id" => $shortname."_imgcat", "std" => "Select a category:", "type" => "select", "options" => $tp_categories), array( "name" => "Number of Images", "desc" => "Select the number of images to display .", "id" => $shortname."_nbrimg", "std" => "Select a Number:", "type" => "select", "options" => $number_entries), array( "name" => "Panel Display Option", "desc" => "The option to select whether you want this panel to be displayed. It will appear on sidebar.", "id" => $shortname."_imgop", "type" => "radiobutton", "options" => $highpanop), array( "name" => "Exclude this category", "desc" => "If you dont want the posts in Image Gallery category to be displayed in \"Latest Post\" Section on home page and \"Recent Post\" section on bottom panel then select \"Exclude\".", "id" => $shortname."_exop", "type" => "checkbox", "options" =>$excludeop), array( "name" => "Video Galery Settings", "type" => "heading", "desc" => "Settings for Video Gallery."), array( "name" => "Custom Title for Video Gallery Panel", "desc" => "Type the title you want for this section. For example: \"Video Gallery\"", "id" => $shortname."_vidtitle", "std" => "", "type" => "text"), array( "name" => "Video Gallery category", "desc" => "Select the category that you would like to have displayed on the Video Gallery panel.", "id" => $shortname."_vidcat", "std" => "Select a category:", "type" => "select", "options" => $tp_categories), array( "name" => "Number of Videoes", "desc" => "Select the number of Video links to display .", "id" => $shortname."_nbrvid", "std" => "Select a Number:", "type" => "select", "options" => $number_entries), array( "name" => "Panel Display Option", "desc" => "The option to select whether you want this panel to be displayed. It will appear on sidebar.", "id" => $shortname."_vidop", "type" => "radiobutton", "options" => $highpanop), array( "name" => "Exclude this category", "desc" => "If you dont want the posts in Video Gallery category to be displayed in \"Latest Post\" Section on home page and \"Recent Post\" section on bottom panel then select \"Exclude\".", "id" => $shortname."_exvidop", "type" => "checkbox", "options" =>$excludeop), array( "name" => "Page - Widget", "type" => "heading", "desc" => "This section customizes Page widget on sidebar."), array( "name" => "Display Option", "desc" => "The option to select whether you want this widget to be displayed on sidebar.", "id" => $shortname."_pageop", "type" => "radiobutton", "options" => $highpanop), array( "name" => "Hierarchy Option", "desc" => "Select which way you want the page lists to be appeared in the widget.", "id" => $shortname."_pagehierop", "type" => "radiobutton", "options" => $hierarchyop), array( "name" => "Category - Widget", "type" => "heading", "desc" => "This section customizes Category widget on sidebar."), array( "name" => "Display Option", "desc" => "The option to select whether you want this widget to be displayed on sidebar.", "id" => $shortname."_cateop", "type" => "radiobutton", "options" => $highpanop), array( "name" => "Hierarchy Option", "desc" => "Select which way you want the Category lists to be appeared in the widget.", "id" => $shortname."_catehierop", "type" => "radiobutton", "options" => $hierarchyop), array( "name" => "Show Article Counts", "desc" => "Select Yes if you want to show article counts for each category", "id" => $shortname."_countop", "type" => "radiobutton", "options" => $yesnoop), array( "name" => "Show Empty Categories", "desc" => "Select Yes if you want to show Categories with no articles", "id" => $shortname."_emptyop", "type" => "radiobutton", "options" => $yesnoop), array( "name" => "Archive - Widget", "type" => "heading", "desc" => "This section customizes Archive widget on sidebar."), array( "name" => "Display Option", "desc" => "The option to select whether you want this widget to be displayed on sidebar.", "id" => $shortname."_archop", "type" => "radiobutton", "options" => $highpanop), array( "name" => "Show Article Counts", "desc" => "Select Yes if you want to show article counts for each archive", "id" => $shortname."_countarc", "type" => "radiobutton", "options" => $yesnoop), array( "name" => "Tags - Widget", "type" => "heading", "desc" => "This section customizes Tags widget on sidebar."), array( "name" => "Display Option", "desc" => "The option to select whether you want this widget to be displayed on sidebar.", "id" => $shortname."_tagop", "type" => "radiobutton", "options" => $highpanop), array( "name" => "AD Options", "type" => "heading", "desc" => " Setup the ad banners for your blog."), array( "name" => "Large AD on Sidebar", "desc" => "Link 195X195 AD on Sidebar. Example: http://www.knowhowto.com.au", "id" => $shortname."_ad1", "std" => "", "type" => "text"), array( "name" => "Large AD Image", "desc" => "Locate the Image For AD. Example: http://www.knowhowto.com.au/wp-content/themes/shadow/images/SampleAd1.jpg", "id" => $shortname."_ad1img", "std" => "", "type" => "text"), array( "name" => "Small AD 1 on Sidebar", "desc" => "Link 195X80 AD on Sidebar. Example: http://www.knowhowto.com.au", "id" => $shortname."_ad2", "std" => "", "type" => "text"), array( "name" => "Small AD 1 Image", "desc" => "Locate the Image For AD. Example: http://www.knowhowto.com.au/wp-content/themes/shadow/images/SampleAd1.jpg", "id" => $shortname."_ad2img", "std" => "", "type" => "text"), array( "name" => "Small AD 2 on Sidebar", "desc" => "Link 195X80 AD on Sidebar. Example: http://www.knowhowto.com.au", "id" => $shortname."_ad3", "std" => "", "type" => "text"), array( "name" => "Small AD 2 Image", "desc" => "Locate the Image For AD. Example: http://www.knowhowto.com.au/wp-content/themes/shadow/images/SampleAd1.jpg", "id" => $shortname."_ad3img", "std" => "", "type" => "text"), array( "name" => "Small AD 3 on Sidebar", "desc" => "Link 195X80 AD on Sidebar. Example: http://www.knowhowto.com.au", "id" => $shortname."_ad4", "std" => "", "type" => "text"), array( "name" => "Small AD 3 Image", "desc" => "Locate the Image For AD. Example: http://www.knowhowto.com.au/wp-content/themes/shadow/images/SampleAd1.jpg", "id" => $shortname."_ad4img", "std" => "", "type" => "text"), // Bottom Section Options array( "name" => "Bottom Section Options", "type" => "mainheading"), array( "name" => "Bottom Section Display Option", "desc" => "Select \"Show\" if you want to display this section at the bottom of your blog", "id" => $shortname."_botop", "type" => "radiobutton", "options" => $highpanop), array( "name" => "Recent Post Panel Settings", "type" => "heading", "desc" => "This section customizes the Recent Post panel in Bottom Section."), array( "name" => "Number of Titles", "desc" => "Select the number of Titles to display .", "id" => $shortname."_nbrrec", "std" => "Select a Number:", "type" => "select", "options" => $number_entries), array( "name" => "Most Viewed Post Panel Settings", "type" => "heading", "desc" => "This section customizes the Most viewed panel in Bottom Section."), array( "name" => "Number of Titles", "desc" => "Select the number of Titles to display .", "id" => $shortname."_nbrview", "std" => "Select a Number:", "type" => "select", "options" => $number_entries), array( "name" => "Most Commented post Panel Settings", "type" => "heading", "desc" => "This section customizes Most Commented Post Panel in Bottom Section."), array( "name" => "Number of Titles", "desc" => "Select the number of Titles to display .", "id" => $shortname."_nbrcom", "std" => "Select a Number:", "type" => "select", "options" => $number_entries), // Other Options array( "name" => "Other Options", "type" => "mainheading"), array( "name" => "Feedburner Settings", "type" => "heading", "desc" => "You can setup feedburner subscription setting here"), array( "name" => "Feedburner URI", "desc" => "Enter your feedburnerURI here.", "id" => $shortname."_feed", "std" => "", "type" => "text"), ); ?>