diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/ocmx-create-options.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/ocmx-create-options.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,506 @@ + "Custom Logo", "description" => "Full URL or folder path to your custom logo.", "name" => $input_prefix."custom_logo", "default" => "/images/layout/logo.gif", "id" => "", "input_type" => "file"), + array("label" => "Color Options", "description" => "Select your desired colour option.", "name" => $input_prefix."theme_style", "default" => "blue", "id" => "", "input_type" => "select", "options" => array("Blue (Default)" => "blue", "Sea Blue" => "sea-blue", "White Rose" => "white-rose", "Blue & Black" => "black-blue", "Black & Green" => "black-green", "Black & Red" => "black-red")), + array("label" => "Home Page Posts", "description" => "Number of Posts to display on the Home Page.", "name" => $input_prefix."home_page_posts", "default" => "5", "id" => "", "input_type" => "select", "options" => array("1" => "1", "2" => "2", "3" => "3", "4" => "4", "5" => "5", "6" => "6", "7" => "7", "8" => "8", "9" => "9", "10" => "10", "15" => "15", "20" => "20")), + array("label" => "Home Page Categories", "description" => "Which Category will we display on the Home Page?", "name" => $input_prefix."home_page_categories", "default" => "", "id" => "", "input_type" => "select", "options" => "loop_categories"), + array("label" => "Home Page Images", "description" => "This will automatically generate an image for your posts on the home page if you have not specified an image in the 'image url' field when adding/updating a post.", "name" => $input_prefix."auto_home_images", "default" => "yes", "id" => "", "input_type" => "select", "options" => array("Yes" => "yes", "No" => "no")), + array("label" => "Site Analytics", "description" => "Enter in the Google Analytics Script here.","name" => $input_prefix."googleAnalytics", "default" => "", "id" => "","input_type" => "memo") + ); + +$social_media_options = + array( + array( + "main_section" => "RSS Details", + "main_description" => "This will allow visitors to subscribe to your custom RSS feed, as well as your Feedburner Feed via e-mail.", + "sub_elements" => + array( + array("label" => "RSS URL", "description" => "", "name" => $input_prefix."rss_url", "default" => "", "id" => "", "input_type" => "text"), + array("label" => "Feedburner ID", "description" => "", "name" => $input_prefix."feedburner_id", "default" => "", "id" => "", "input_type" => "text") + ) + ), + array("label" => "Promote Post Options", "description" => "This will allow you to include Digg, Moo, Bump and Tweetmeme links in your posts.", "name" => $input_prefix."promote_posts", "default" => "yes", "id" => $input_prefix."promote_posts", "input_type" => "select", "options" => array("Yes" => "yes", "No" => "no")) + ); + +$auto_advert_options = + array( + array( + "main_section" => "3rd Party Adverts", + "main_description" => "These settings allow you to manage your 3rd party (eg. BuySellAds, Afrigator etc.) adverts which display in the right side bar, and underneathe the Article in your home and post pages.", + "sub_elements" => + array( + array("label" => "Post Page Script", "description" => "", "name" => $input_prefix."main_ad_buysell_ads", "default" => "0", "id" => $input_prefix."main_ad_buysell_ads", "input_type" => "select", "options" => array("On" => "on", "Off" => "off")), + array("label" => "Insert Page Script", "description" => "", "name" => $input_prefix."main_ad_buysell_id", "default" => "", "id" => $input_prefix."main_ad_buysell_id", "input_type" => "memo"), + array("label" => "Right Sidebar Script", "description" => "", "name" => $input_prefix."small_buysell_ads", "default" => "0", "id" => $input_prefix."small_buysell_ads", "input_type" => "select", "options" => array("On" => "on", "Off" => "off")), + array("label" => "Insert Sidebar Script", "description" => "", "name" => $input_prefix."small_buysell_id", "default" => "", "id" => $input_prefix."small_buysell_id", "input_type" => "memo") + ) + ) + ); + +$custom_advert_options = + array( + array( + "main_section" => "Post Page Ads", + "main_description" => "These settings allow you to manage your custom adverts which display in the post pages of your site. (Recommended size for the post ad is 560px by 60px.)", + "sub_elements" => + array( + array("label" => "Advert Title", "description" => "", "name" => $input_prefix."post_ad_title", "default" => "", "id" => $input_prefix."post_ad_title", "input_type" => "text"), + array("label" => "Advert Link", "description" => "", "name" => $input_prefix."post_ad_link", "default" => "", "id" => $input_prefix."post_ad_link", "input_type" => "text"), + array("label" => "Image URL", "description" => "", "name" => $input_prefix."post_ad_image", "default" => "", "id" => $input_prefix."post_ad_image", "input_type" => "text") + ) + ), + array( + "main_section" => "Sidebar Ads", + "main_description" => "These settings allow you to manage your custom adverts which display in the right side bar. Use the \"Media\" section to upload you ad image, and paste the image url into the \"Image url\" text field. (Recommended width is 125px by 125px.)", + "sub_elements" => + array( + array("label" => "Number of Small Ads", "description" => "", "name" => $input_prefix."small_ads", "default" => "0", "id" => $input_prefix."small_ads", "input_type" => "select", "options" => array("None" => "0", "1" => "1", "2" => "2", "3" => "3", "4" => "4", "5" => "5", "6" => "6", "7" => "7", "8" => "8", "9" => "9", "10" => "10")) + ) + ) + ); +$menu_options = array(array("label" => "Menu Order", "description" => "Would you like to list your pages or categories first?", "name" => $input_prefix."page_category_order", "default" => "pages_first", "id" => "", "input_type" => "select", "options" => array("Pages First" => "pages_first", "Categories First" => "categories_first"))); +$page_menu_options = + array( + array( + "main_section" => "Pages", + "main_description" => "Order your pages by the following.", + "sub_elements" => + array( + array("label" => "Order By", "description" => "", "name" => $input_prefix."page_order", "default" => "", "id" => $input_prefix."page_order", "input_type" => "select", "options" => array("Title" => "post_title", "Page Order" => "menu_order", "Creation Date/Time" => "post_date", "Modified Date/Time" => "post_modified", "Page ID" => "ID", "Post Slug" => "post_name")), + array("label" => "Direction", "description" => "", "name" => $input_prefix."page_updown", "default" => "", "id" => $input_prefix."page_updown", "input_type" => "select", "options" => array("Ascending" => "ASC", "Descending" => "DESC")) + ) + ) + ); +$category_menu_options = + array( + array( + "main_section" => "Categories", + "main_description" => "Order your categories by the following.", + "sub_elements" => + array( + array("label" => "Order By", "description" => "", "name" => $input_prefix."category_order", "default" => "ID", "id" => $input_prefix."category_order", "input_type" => "select", "options" => array("Category ID" => "ID", "Name" => "name")), + array("label" => "Direction", "description" => "", "name" => $input_prefix."category_updown", "default" => "", "id" => $input_prefix."category_updown", "input_type" => "select", "options" => array("Ascending" => "ASC", "Descending" => "DESC")) + ) + ) + ); +// Set the global var to see which array we're dealing with + +/*********************************************************************************/ +/* Below we create the form containers, according to our arrays in functions.php */ +function fetch_options($which_array) + { + + global $input, $counter, $label_class; + if($which_array) : + foreach($which_array as $input) + { + // This option Has Sub Options, so loop them and give them slightly different classes + if($input['description'] !== "") : +?> +

+ +
+ +

+ + +

+ +
+
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+ + " id=""> + + + + + $value) + { + // Set the $value and $label for the options + if($input["options"] == "loop_categories") : + $use_value = $value->slug; + $label = $value->cat_name; + elseif($input["options"] == "loop_pages") : + $use_value = $value->ID; + $label = $value->post_title; + else : + $use_value = $value; + $label = $option_label; + endif; + //If this option == the value we set above, select it + if($use_value == $input_value) + {$selected = " selected='selected' ";} + else + {$selected = " ";} +?> + + + + +
+ +
+ +
+ +
+ + + + " id="" value="" /> +

+ Current Image +
+ ') no-repeat center;" href="" class="std_link" rel="lightbox" target="_blank"> + +
+ + + " id="" value="" /> + + " id="" value="" /> + +
+ get_option("ocmx_page_order"), "sort_order" => get_option("ocmx_page_updown")); + $fetch_pages= get_pages($page_args); +?> + +
+
+ +
+
+ +
+
+
Advert Title
+
+
+
+
+
+
Advert Link
+
+
+
+
+
+
Image URL
+
+
+
+
+
+
 
+ +
+
+ + \ No newline at end of file