'projects' , // 'dataset_name_singular' => 'project' , // 'dataset_name_plural' => 'projects' , // 'dataset_title_singular' => 'Project' , // 'dataset_title_plural' => 'Projects' , // 'basepress_dataset_handle' => array(...) // ) ; // // ------------------------------------------------------------------------- // ========================================================================= // Define this dataset's BASEPRESS DATASET HANDLE... // ========================================================================= $basepress_dataset_uid = 'a6fa80a6-a282-464b-9b4f-f5d9d7164395' . '-' . '95e869f5-9de6-4785-b237-76efd35382b4' . '-' . '4f117e98-5f7f-4530-a3ce-de7edf72eea6' . '-' . '9c244a54-d68d-480d-bbd4-c2494714435a' ; // ------------------------------------------------------------------------- $basepress_dataset_handle = array( 'nice_name' => 'adSwapper_byFernTec_siteProfile' , 'unique_key' => $basepress_dataset_uid , 'version' => '0.1' ) ; // ========================================================================= // Support... // ========================================================================= require_once( dirname( __FILE__ ) . '/site-resources.php' ) ; require_once( dirname( __FILE__ ) . '/site-profile-field-groups.php' ) ; require_once( dirname( __FILE__ ) . '/site-profile-get-new-field-value-functions.php' ) ; // ========================================================================= // Record Structure... // ========================================================================= $array_storage_record_structure = array( // --------------------------------------------------------------------- array( 'slug' => 'created_server_datetime_utc' , 'array_storage_value_from' => array( 'add' => array( 'method' => 'created-server-datetime-utc' ) , 'edit' => array( 'method' => 'dont-change' ) ) , 'constraints' => array( array( 'method' => 'unix-timestamp' ) ) ) , // --------------------------------------------------------------------- array( 'slug' => 'last_modified_server_datetime_utc' , 'array_storage_value_from' => array( 'add' => array( 'method' => 'last-modified-server-datetime-utc' ) , 'edit' => array( 'method' => 'dont-change' ) ) , 'constraints' => array( array( 'method' => 'unix-timestamp' ) ) ) , // --------------------------------------------------------------------- array( 'slug' => 'key' , 'array_storage_value_from' => array( 'add' => array( 'method' => 'unique-key' ) , 'edit' => array( 'method' => 'dont-change' ) ) , 'constraints' => array( array( 'method' => 'unique-key' ) ) ) , // --------------------------------------------------------------------- array( 'slug' => 'site_title' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'site_title' ) ) , 'constraints' => array() ) , // --------------------------------------------------------------------- array( 'slug' => 'home_page_url' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'home_page_url' ) ) , 'constraints' => array() ) , // --------------------------------------------------------------------- array( 'slug' => 'general_description' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'general_description' ) ) , 'constraints' => array() ) , // --------------------------------------------------------------------- array( 'slug' => 'ads_wanted_description' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'ads_wanted_description' ) ) , 'constraints' => array() ) , // --------------------------------------------------------------------- array( 'slug' => 'sites_wanted_description' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'sites_wanted_description' ) ) , 'constraints' => array() ) , // --------------------------------------------------------------------- array( 'slug' => 'categories_available' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'categories_available' ) ) , 'constraints' => array() ) , // --------------------------------------------------------------------- array( 'slug' => 'categories_wanted' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'categories_wanted' ) ) , 'constraints' => array() ) , // --------------------------------------------------------------------- array( 'slug' => 'geoip_continents_incl' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'geoip_continents_incl' ) ) , 'constraints' => array() ) , // --------------------------------------------------------------------- array( 'slug' => 'geoip_continents_excl' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'geoip_continents_excl' ) ) , 'constraints' => array() ) , // --------------------------------------------------------------------- array( 'slug' => 'geoip_countries_incl' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'geoip_countries_incl' ) ) , 'constraints' => array() ) , // --------------------------------------------------------------------- array( 'slug' => 'geoip_countries_excl' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'geoip_countries_excl' ) ) , 'constraints' => array() ) , // --------------------------------------------------------------------- array( 'slug' => 'geoip_regions_incl' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'geoip_regions_incl' ) ) , 'constraints' => array() ) , // --------------------------------------------------------------------- array( 'slug' => 'geoip_regions_excl' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'geoip_regions_excl' ) ) , 'constraints' => array() ) , // --------------------------------------------------------------------- array( 'slug' => 'geoip_cities_incl' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'geoip_cities_incl' ) ) , 'constraints' => array() ) , // --------------------------------------------------------------------- array( 'slug' => 'geoip_cities_excl' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'geoip_cities_excl' ) ) , 'constraints' => array() ) , // --------------------------------------------------------------------- array( 'slug' => 'max_ads_per_site_per_page' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'max_ads_per_site_per_page' ) ) , 'constraints' => array() ) , // 1+, 0 = unlimited, default = 1 // --------------------------------------------------------------------- array( 'slug' => 'max_repetitions_per_ad_per_page' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'max_repetitions_per_ad_per_page' ) ) , 'constraints' => array() ) , // 1+, 0 = unlimited, default = 1 // --------------------------------------------------------------------- array( 'slug' => 'question_auto_approve_new_ads' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'question_auto_approve_new_ads' ) ) , 'constraints' => array() ) , // default = FALSE (for security reasons) // --------------------------------------------------------------------- array( 'slug' => 'test_method' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'test_method' ) ) , 'constraints' => array() ) , // "none", "ip", "cookie" // --------------------------------------------------------------------- array( 'slug' => 'test_ip' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'test_ip' ) ) , 'constraints' => array() ) , // --------------------------------------------------------------------- array( 'slug' => 'show_ads_list_reload_buttons' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'show_ads_list_reload_buttons' ) ) , 'constraints' => array() ) , // --------------------------------------------------------------------- array( 'slug' => 'question_disable_incoming_ads' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'question_disable_incoming_ads' ) ) , 'constraints' => array() ) , // Don't show other site's ads on this site. // --------------------------------------------------------------------- array( 'slug' => 'question_disable_outgoing_ads' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'question_disable_outgoing_ads' ) ) , 'constraints' => array() ) , // Don't show this site's ads on other sites. // --------------------------------------------------------------------- array( 'slug' => 'license_key' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'license_key' ) ) , 'constraints' => array() ) , // --------------------------------------------------------------------- array( 'slug' => 'question_manual_update_approval' , 'array_storage_value_from' => array( 'add-edit' => array( 'method' => 'post' , 'instance' => 'question_manual_update_approval' ) ) , 'constraints' => array() ) // --------------------------------------------------------------------- ) ; // ========================================================================= // Zebra-Form Form Definition... // ========================================================================= // ------------------------------------------------------------------------- // \greatKiwi_byFernTec_adSwapper_local_v0x1x208_standardDatasetManager\get_add_edit_form_cancel_href_and_onclick( // $caller_app_slash_plugins_global_namespace , // $question_front_end , // $dataset_slug // ) // - - - - - - - - - - - - - - - - - - - - - - - - - - - // RETURNS // o On SUCCESS! // - - - - - - // array( // $cancel_href STRING // $onclick STRING // ) // // o On FAILURE! // - - - - - - // $error_message STRING // ------------------------------------------------------------------------- // $result = \greatKiwi_byFernTec_adSwapper_local_v0x1x208_standardDatasetManager\get_add_edit_form_cancel_href_and_onclick( // $caller_app_slash_plugins_global_namespace , // $question_front_end , // 'teasers' // ) ; // // // ------------------------------------------------------------------------- // // if ( is_string( $result ) ) { // return $result ; // } // // // ------------------------------------------------------------------------- // // list( // $cancel_href , // $onclick // ) = $result ; // ------------------------------------------------------------------------- $get_cancel_button_onclick_attribute_value_function_name = '\\greatKiwi_byFernTec_adSwapper_local_v0x1x208_standardDatasetManager' . '\\get_cancel_button_onclick_attribute_value' ; // ------------------------------------------------------------------------- /* $help_markdown = <<help EOT; // ------------------------------------------------------------------------- $help_bbcode = <<help EOT; */ // ------------------------------------------------------------------------- // $focus_field_slug = 'site_owners_ad_swapper_user_id' ; $focus_field_slug = 'site_title' ; // if ( function_exists( '\\greatKiwi_byFernTec_adSwapper_local_v0x1x208_pluginSetup\\is_export_version_short_slug' ) // && // \greatKiwi_byFernTec_adSwapper_local_v0x1x208_pluginSetup\is_export_version_short_slug( 'std' ) // ) { // $focus_field_slug = 'original_url' ; // } // ------------------------------------------------------------------------- // $help_text_site_owners_ad_swapper_user_id = <<Ad Swapper Central, you can get your Ad Swapper // User ID from the "Maintain Your Ad Swapper User Profile" option. // EOT; // ------------------------------------------------------------------------- // $help_text_site_url = <<{$home_url} // EOT; // // $site_url = \site_url() ; // // if ( $site_url !== $home_url ) { // // $help_text_site_url .= <<{$site_url} // EOT; // // } // ------------------------------------------------------------------------- $wp_site_title = \get_bloginfo( 'name' ) ; $help_text_site_title = <<name/title you want the site to be known by (on the Ad Swapper network).  You'll probably use the site's WordPress Site Title - ie; {$wp_site_title} - in most cases.  But you can call the site something different if you want to. EOT; // ------------------------------------------------------------------------- $help_text_home_page_url = <<home page.  In other words, the URL that users should use, to visit the site.  Other Ad Swappers might visit this URL - if they want to check out your site before placing their ads on it, for example (or accepting your ads on theirs).  NOTE!  The home page URL specified here, ISN'T used as the link URL for your ads.  You specify that link URL, when creating/editing your ads (and for each of your ads, separately). EOT; // ------------------------------------------------------------------------- $help_text_site_description = <<Enter the two-letter country code(s) of the country or countries you want to target this site's ads at.
Click here for a list of two letter country codes (in alphabetical order - opens in new tab/window)
If there's more than one country, enter the codes in a comma-separated list (eg; AU,NZ). EOT; // ------------------------------------------------------------------------- $continent_codes_table = <<
Continent Code Continent Name
AF Africa
AN Antarctica
AS Asia
EU Europe
NA North America
OC Oceania
SA South America
EOT; // ------------------------------------------------------------------------- // $help_text_geoip_continents_incl = <<Generally, you should leave this field empty.  Only use it if you // want to target this site's ads at one or more continents.  But // please, only target continents if you really need to (because it's a lot of Ad // Swapper advertising resources you're requesting/hogging).  So if you can // target your ads at something more specific than continents (eg; // countries, regions/states or cities), then please do so // (and leave this field empty).
// To target continents, please enter the relevant two-letter continent // codes (from the table below), into this field. // {$continent_codes_table} // If there's more than one continent, enter the codes in a comma-separated list // (eg; AF,EU,OC). // EOT; $help_text_geoip_continents_incl = <<Generally, you should leave this field empty.  Only use it if you want to target this site's ads at one or more continents.  But please, only target continents if you really need to (because - apart from Antarctica - it's a lot of Ad Swapper advertising resources you're requesting/hogging).
Note that continent names can be somewhat misleading.  Europe, for example, includes Russia and much of the former Soviet Union.  While Asia, includes the Middle East (apart from Egypt and some other North African countries) - and the rest of the former Soviet Union.  So you may need to fine-tune your selection with the help of the Countries You DON'T Want To Show This Site's Ads In field below. To target continents, please enter the relevant two-letter continent codes (from the table below), into this field. {$continent_codes_table} If there's more than one continent, enter the codes in a comma-separated list (eg; AF,EU,OC). EOT; // ------------------------------------------------------------------------- // $help_text_geoip_continents_excl = <<If you're targeting this site's ads at something more specific than // continents (eg; countries, regions/states or cities), then // you can either;
    //
  • Leave this field empty, or;
  • //
  • Enter the two-letter continent codes of the continents you // DON'T want to target (just to make sure you've definitely gotten // rid of them).
  • //
// For the (two-letter) continent codes, see the table above.
If there's more // than one continent, enter the codes in a comma-separated list (eg; // AF,EU,OC). // EOT; $help_text_geoip_continents_excl = <<Generally, you should leave this field empty.  But if you're targeting this site's ads at one or more continents (using the field above), then you can enter the two-letter country codes of any COUNTRIES you don't want to target, into this field.
If there's more than one country, enter the codes in a comma-separated list (eg; SW,DE,NO). EOT; // ------------------------------------------------------------------------- /* $help_text_geoip_regions_incl = <<{$your_ip} EOT; } else { $your_ip = '' ; } // ------------------------------------------------------------------------- $help_text_test_method = <<test Ad Swapper ads on your site such that only you can see them.  Ie:-
  • With test method None, Ad Swapper ads will appear on your site normally (if you have any Ad Slots set up and enabled).
  • With test method IP Address, Ad Swapper ads will only appear on your site if you visit it from the IP address entered into the Test IP field below.
    {$your_ip}
  • With test method Cookie, Ad Swapper ads will only appear on your site when you visit it with the browser in which you stored the cookie.
NOTE!  Don't forget that with Test Method at IP Address or Cookie, Ad Swapper ads won't be displayed on your site (except to YOU).  Test Mode is to help you setup your Ad Slots (it lets you do this, without your readers seeing anything).  But once you're ready to go, don't forget to switch Test Method back to None (so that your ads start to display). EOT; // ------------------------------------------------------------------------- $help_text_test_ip = <<IP Address, above, then please enter the IP address of the person you want to view your site's Ad Swapper ads (into this field).
{$your_ip} EOT; // ------------------------------------------------------------------------- $help_text_ads_list_reload_buttons = <<show/hide the "Reload" buttons that appear - on LOCALHOST only - above each Ad Swapper ad widget's ads.  So if your website ISN'T running on LOCALHOST, then the setting in this field will have NO effect.  And if your website IS running on localhost, then the "Reload" buttons are a debugging tool - for the Ad Swapper plugin developers.  So; keep them hidden, and forget about them. EOT; // ------------------------------------------------------------------------- $help_text_question_manual_update_approval = <<unchecked - the database is automatically updated (without any notice to you; the user).  If the field is checked, you're given the opportunity to manually cancel or perform the update.  But this manual updating is intended for the use of the plugin developers (when testing and checking the plugin).  And we strongly recommend that you leave this field unchecked.  The plugin WON'T run until the update is performed.  And if you do the update manually, you may stuff things up. EOT; // ------------------------------------------------------------------------- $help_text_max_ads_per_site_per_page = <<one ad per site (on each page displayed).  But if your site doesn't have many other sites that it's advertising - or if you'd like to allow sites to have multiple ads per page - then you can increase this figure.  Can be useful when evaluating Ad Swapper.  To see how the "sidebar" and "grid" type ad slots (that can hold lots of ads,) will appear (when they're full), for example.
(1+, 0 = unlimited, default = 1) EOT; // ------------------------------------------------------------------------- $help_text_max_repetitions_per_ad_per_page = <<once per page.  But if you'd like to allow the same ad to be displayed more than once per page, then set this figure (to two or more).
(1+, 0 = unlimited, default = 1) EOT; // ------------------------------------------------------------------------- $help_text_question_auto_approve_new_ads = <<approve each new Ad Swapper ad (to be displayed on your site - before that ad will be displayed).  You can override this default setting here.  But while this may make life easier - it does open the door for unsavoury/unwelcome ads to appear on your site (though you can still manually disable such ads later, if they do). EOT; // ------------------------------------------------------------------------- $help_text_question_disable_incoming_ads = <<stop showing Ad Swapper ads (including your own), on this site. EOT; // ------------------------------------------------------------------------- $help_text_question_disable_outgoing_ads = <<stop showing this site's ads (on other Ad Swapper sites, including this site). EOT; // ------------------------------------------------------------------------- $help_text_license_key = << array( 'name' => 'add_edit_ad_swapper_site_profile' , 'method' => 'POST' , 'action' => '' , 'attributes' => array() , 'clientside_validation' => TRUE ) , 'field_specs' => array( /* */ // ----------------------------------------------------------------- array( 'form_field_name' => 'site_title' , 'zebra_control_type' => 'text' , 'label' => 'Site Title' , 'help_text' => $help_text_site_title , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array( 'required' => array( 'error' , // variable to add the error message to 'Field is required' // error message if value doesn't validate ) ) ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'home_page_url' , 'zebra_control_type' => 'text' , 'label' => 'Home Page URL' , 'help_text' => $help_text_home_page_url , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array( 'required' => array( 'error' , // variable to add the error message to 'Field is required' // error message if value doesn't validate ) ) ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'general_description' , // 'zebra_control_type' => 'textarea' , 'zebra_control_type' => 'hidden' , 'label' => 'General Description' , 'help_text' => $help_text_site_description , 'attributes' => array( 'style' => 'width:98%; height:200px' ) , 'rules' => array( // 'required' => array( // 'error' , // variable to add the error message to // 'Field is required' // error message if value doesn't validate // ) ) ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'ads_wanted_description' , // 'zebra_control_type' => 'textarea' , 'zebra_control_type' => 'hidden' , 'label' => 'Ads Wanted Description' , 'help_text' => $help_text_ads_wanted_description , 'attributes' => array( 'style' => 'width:98%; height:200px' ) , 'rules' => array( // 'required' => array( // 'error' , // variable to add the error message to // 'Field is required' // error message if value doesn't validate // ) ) ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'sites_wanted_description' , // 'zebra_control_type' => 'textarea' , 'zebra_control_type' => 'hidden' , 'label' => 'Sites Wanted Description' , 'help_text' => $help_text_sites_wanted_description , 'attributes' => array( 'style' => 'width:98%; height:200px' ) , 'rules' => array( // 'required' => array( // 'error' , // variable to add the error message to // 'Field is required' // error message if value doesn't validate // ) ) ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'categories_available' , 'zebra_control_type' => 'hidden' , 'label' => '' , 'help_text' => '' , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'categories_wanted' , 'zebra_control_type' => 'hidden' , 'label' => '' , 'help_text' => '' , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'geoip_countries_incl' , 'zebra_control_type' => 'text' , 'label' => 'COUNTRIES You Want To Show This Site\'s Ads In' , 'help_text' => $help_text_geoip_countries_incl , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'geoip_continents_incl' , 'zebra_control_type' => 'text' , 'label' => 'CONTINENTS You Want To Show This Site\'s Ads In' , 'help_text' => $help_text_geoip_continents_incl , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'geoip_continents_excl' , // 'zebra_control_type' => 'text' , 'zebra_control_type' => 'hidden' , 'label' => 'Continents You DON\'T Want To Show This Site\'s Ads In' , 'help_text' => $help_text_geoip_continents_excl , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'geoip_countries_excl' , 'zebra_control_type' => 'text' , 'label' => 'Countries You DON\'T Want To Show This Site\'s Ads In' , 'help_text' => $help_text_geoip_countries_excl , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- /* array( 'form_field_name' => 'geoip_regions_incl' , 'zebra_control_type' => 'text' , 'label' => 'REGIONS You Want To Show This Site\'s Ads In' , 'help_text' => $help_text_geoip_regions_incl , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'geoip_regions_excl' , 'zebra_control_type' => 'text' , 'label' => 'Regions You DON\'T Want To Show This Site\'s Ads In' , 'help_text' => $help_text_geoip_regions_excl , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'geoip_cities_incl' , 'zebra_control_type' => 'text' , 'label' => 'CITIES You Want To Show This Site\'s Ads In' , 'help_text' => $help_text_geoip_cities_incl , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'geoip_cities_excl' , 'zebra_control_type' => 'text' , 'label' => 'Cities You DON\'T Want To Show This Site\'s Ads In' , 'help_text' => $help_text_geoip_cities_excl , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array() ) , */ // ----------------------------------------------------------------- array( 'form_field_name' => 'geoip_regions_incl' , 'zebra_control_type' => 'hidden' , 'label' => '' , 'help_text' => '' , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'geoip_regions_excl' , 'zebra_control_type' => 'hidden' , 'label' => '' , 'help_text' => '' , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'geoip_cities_incl' , 'zebra_control_type' => 'hidden' , 'label' => '' , 'help_text' => '' , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'geoip_cities_excl' , 'zebra_control_type' => 'hidden' , 'label' => '' , 'help_text' => '' , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'license_key' , 'zebra_control_type' => 'text' , 'label' => 'License Key' , 'help_text' => $help_text_license_key , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'question_auto_approve_new_ads' , 'zebra_control_type' => 'checkbox' , 'label' => 'Auto-Approve New Ads ?' , 'help_text' => $help_text_question_auto_approve_new_ads , 'attributes' => array( // 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'max_ads_per_site_per_page' , 'zebra_control_type' => 'text' , 'label' => 'Max. Ads Per Site Per Page' , 'help_text' => $help_text_max_ads_per_site_per_page , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'max_repetitions_per_ad_per_page' , 'zebra_control_type' => 'text' , 'label' => 'Max. Repetitions Per Ad Per Page' , 'help_text' => $help_text_max_repetitions_per_ad_per_page , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'question_disable_incoming_ads' , 'zebra_control_type' => 'checkbox' , 'label' => 'Disable Incoming Ads ?' , 'help_text' => $help_text_question_disable_incoming_ads , 'attributes' => array( // 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'question_disable_outgoing_ads' , 'zebra_control_type' => 'checkbox' , 'label' => 'Disable Outgoing Ads ?' , 'help_text' => $help_text_question_disable_outgoing_ads , 'attributes' => array( // 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'test_method' , 'zebra_control_type' => 'select' , 'label' => 'Test Method' , 'help_text' => $help_text_test_method , 'form_field_value_from' => NULL , 'attributes' => array() , 'rules' => array() , 'type_specific_args' => array( 'options_getter_function' => array( 'function_name' => '\\' . __NAMESPACE__ . '\\get_test_method_selector_options' , 'extra_args' => NULL ) ) ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'test_ip' , 'zebra_control_type' => 'text' , 'label' => 'Test IP' , 'help_text' => $help_text_test_ip , 'attributes' => array( 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'question_manual_update_approval' , 'zebra_control_type' => 'checkbox' , 'label' => 'Manually Approve Database Updates ?' , 'help_text' => $help_text_question_manual_update_approval , 'attributes' => array( // 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'show_ads_list_reload_buttons' , 'zebra_control_type' => 'checkbox' , 'label' => 'Show Ads List Reload Buttons ?' , 'help_text' => $help_text_ads_list_reload_buttons , 'attributes' => array( // 'style' => 'width:98%' ) , 'rules' => array() ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'save_me' , 'zebra_control_type' => 'submit' , 'label' => NULL , 'attributes' => array() , 'rules' => array() , 'type_specific_args' => array( 'caption' => 'Submit' ) ) , // ----------------------------------------------------------------- array( 'form_field_name' => 'cancel' , 'zebra_control_type' => 'button' , 'label' => NULL , // 'attributes' => array( // 'onclick' => $onclick // ) , 'dynamic_attributes' => array( 'onclick' => array( 'function_name' => $get_cancel_button_onclick_attribute_value_function_name , 'extra_args' => NULL ) ) , 'rules' => array() , 'type_specific_args' => array( 'caption' => 'Cancel' , 'type' => 'button' ) ) // ----------------------------------------------------------------- ) , 'focus_field_slug' => $focus_field_slug , 'custom_add_edit_record_page_header_fn' => '\\' . __NAMESPACE__ . '\\get_custom_add_edit_record_page_header' , 'field_groups' => get_site_profile_field_groups() , 'validata_record_structure_slug' => 'ad-swapper-local-site-profile-submissions' ) ; // ========================================================================= // Dataset Records Table... // ========================================================================= $dataset_records_table_columns = array( // array( // 'base_slug' => 'xxx' // 'label' => 'Xxx' OR ''/NULL (means use "to_title( )" // 'question_sortable' => TRUE OR FALSE/NULL // 'raw_value_from' => array( // 'method' => 'array-storage-field-slug' , // 'instance' => "xxx" // ) , // --OR-- // array( // 'method' => 'special-type' , // 'instance' => "action" // ) , // --OR-- // array( // 'method' => 'foreign-field' , // 'instance' => "" // 'args' => array( // array( // 'pointer_field_array_storage_slug' => '' , // 'foreign_dataset' => '' // ) , // ... // ) // ) , // // 'width_in_percent' => 1 to 100 (All columns must add up 100%. Though // some columns may be left 0/NULL or unspecified - // in which case the leftover width will be evenly // distributed amongst these columns. // 'header_halign' => 'left' | 'center' | 'right' // 'header_valign' => 'top' | 'middle' | 'bottom' // 'data_halign' => 'left' | 'center' | 'right' // 'data_valign' => 'top' | 'middle' | 'bottom' // // 'data_field_slug_4_display' => "xxx" (generated automatically; DON'T specify) // 'data_field_slug_4_sort' => "xxx" (generated automatically; DON'T specify) // ) , // 'slug' => 'owner_key' , // 'slug' => 'site_url' , // 'slug' => 'site_title' , // 'slug' => 'site_description' , // 'slug' => 'ads_wanted_description' , // 'slug' => 'sites_wanted_description' , // 'slug' => 'categories_available' , // 'slug' => 'categories_wanted' , // array( // 'base_slug' => 'site_owners_ad_swapper_user_id' , // 'label' => 'Owner' , // 'question_sortable' => TRUE , // 'raw_value_from' => array( // 'method' => 'array-storage-field-slug' , // 'instance' => 'site_owners_ad_swapper_user_id' // ) , // 'display_treatments' => NULL // ) , array( 'base_slug' => 'site_title' , 'label' => 'Title' , 'question_sortable' => TRUE , 'raw_value_from' => array( 'method' => 'array-storage-field-slug' , 'instance' => 'site_title' ) , 'display_treatments' => NULL ) , array( 'base_slug' => 'home_page_url' , 'label' => 'URL' , 'question_sortable' => TRUE , 'raw_value_from' => array( 'method' => 'array-storage-field-slug' , 'instance' => 'home_page_url' ) , 'display_treatments' => NULL ) , /* array( 'base_slug' => 'categories_available' , 'label' => 'Categories Available' , 'question_sortable' => FALSE , 'raw_value_from' => array( 'method' => 'array-storage-field-slug' , 'instance' => 'categories_available' ) , 'display_treatments' => array( // array( // 'method' => 'wrapper' , // 'args' => array( // 'before' => '
' , // 'after' => '
' // ) // ) ) ) , array( 'base_slug' => 'categories_wanted' , 'label' => 'Categories Wanted' , 'question_sortable' => FALSE , 'raw_value_from' => array( 'method' => 'array-storage-field-slug' , 'instance' => 'categories_wanted' ) , 'display_treatments' => array( // array( // 'method' => 'wrapper' , // 'args' => array( // 'before' => '
' , // 'after' => '
' // ) // ) ) ) , */ /* array( 'base_slug' => 'original_media_url' , 'label' => 'Media' , 'question_sortable' => FALSE , 'raw_value_from' => array( 'method' => 'array-storage-field-slug' , 'instance' => 'original_media_url' ) , 'display_treatments' => array( array( 'method' => 'image' , 'args' => array( 'style' => 'height:80px' , ) ) ) ) , */ array( 'base_slug' => 'action' , 'label' => 'Action' , 'question_sortable' => FALSE , 'raw_value_from' => array( 'method' => 'special-type' , 'instance' => 'record-action' ) , 'display_treatments' => NULL ) ) ; // ------------------------------------------------------------------------- // The Complete "Dataset Records Table" Definition... // ------------------------------------------------------------------------- // 'data_field_defs' => array(...) OR array()/NULL (means default to columns suggested by dataset records) $dataset_records_table = array( // 'column_defs' => array(...) OR array()/NULL (means default to columns suggested by "data_field_defs") // 'rows_per_page' => 10 , // 'default_data_field_slug_to_orderby' => 'xxx' || ''/NULL (means orderby FIRST data field) // 'default_order' => 'asc' OR 'desc' OR ''/NULL (means default to "asc") // 'actions' => array( // 'edit' => 'edit' , // 'delete' => 'delete' // ) , // 'action_separator' => '    ' 'column_defs' => $dataset_records_table_columns , 'rows_per_page' => 10 , 'default_data_field_slug_to_orderby' => 'site_title' , 'default_order' => 'asc' , 'buttons' => array( array( 'type' => 'add_record' ) // array( // 'type' => 'custom' , // 'title' => 'Clone/Copy Built-In Layout' , // 'get_button_html_function_name' => '\\' . __NAMESPACE__ . '\\get_clone_built_in_layout_button_html' , // 'extra_args' => NULL // ) , // array( // 'type' => 'delete_all_records' // ) , // array( // 'type' => 'show_orphaned_records' // ) ) , 'record_actions' => array( array( 'type' => 'standard' , 'slug' => 'edit' , 'link_title' => 'edit' ) , array( 'type' => 'standard' , 'slug' => 'delete' , 'link_title' => 'delete' ) , // array( // 'type' => 'custom' , // 'slug' => 'post-teaser' , // 'link_title' => 'post' // ) ) , 'action_separator' => '    ' ) ; // ========================================================================= // CUSTOM ACTIONS // ========================================================================= // $custom_action_teaser_to_post_filespec = // dirname( __FILE__ ) . '/plugin.stuff/scripts/teaser-to-post.php' // ; // ------------------------------------------------------------------------- $custom_actions = array( // array( // 'slug' => 'post-teaser' , // 'args' => array( // 'include_filespec' => $custom_action_teaser_to_post_filespec , // 'namespace_and_function_name' => '\\greatKiwi_byFernTec_adSwapper_local_v0x1x208_teaserMaker\\teaser_to_post' // ) // ) ) ; // ========================================================================= // Define this dataset's details - as required by the dataset manager... // ========================================================================= $dataset_details = array( 'dataset_slug' => 'ad_swapper_site_profile' , 'dataset_name_singular' => 'ad_swapper_site_profile' , 'dataset_name_plural' => 'ad_swapper_site_profile' , 'dataset_title_singular' => 'Site Profile' , 'dataset_title_plural' => 'Site Profile' , 'basepress_dataset_handle' => $basepress_dataset_handle , 'dataset_records_table' => $dataset_records_table , 'zebra_forms' => array( 'default' => $zebra_form ) , 'array_storage_record_structure' => $array_storage_record_structure , 'array_storage_key_field_slug' => 'key' , 'custom_actions' => $custom_actions , // 'parent_details' => array( // 'type' => 'single-parent-key-field' , // 'type_specific_args' => array( // 'parent_dataset_slug' => 'teaser_categories' , // 'parent_dataset_key_field_slug' => 'parent_key' // ) // ) // // This dataset's records ***may*** optionally have a PARENT. // // o "parent_dataset_slug" must be a non-empty string. // // o The array storage record's:- // // "" // // field may contain either:- // // -- The empty string (in which case, this child // // record has NO parent), or; // // -- A "record key" from the parent dataset. // // // // The dataset records may have CHILDREN too (see // // "child_dataset_slugs", below). // 'pre_add_routine' => array( // 'fn' => '\\' . __NAMESPACE__ . '\\check_before_adding_ad_slot_record' , // 'extra_args' => array() // ) , // // 'pre_edit_routine' => array( // 'fn' => '\\' . __NAMESPACE__ . '\\check_before_editing_ad_slot_record' , // 'extra_args' => array() // ) , // // 'pre_delete_routine' => array( // 'fn' => 'xxx' , // 'extra_args' => array() // ) , 'post_add_routine' => array( 'fn' => '\\' . __NAMESPACE__ . '\\question_post_set_cookie_on_add' , 'extra_args' => array() ) , 'post_edit_routine' => array( 'fn' => '\\' . __NAMESPACE__ . '\\question_post_set_cookie_on_edit' , 'extra_args' => array() ) , // 'post_delete_routine' => array( // 'fn' => 'xxx' , // 'extra_args' => array() // ) 'max_records' => 1 , 'question_single_record_mode' => TRUE , 'default_record_functions_namespace_name' => __NAMESPACE__ , 'get_new_field_value_functions' => array( 'question_auto_approve_new_ads' => array( 'name' => '\\' . __NAMESPACE__ . '\\get_new_field_value_4_question_auto_approve_new_ads' , 'args' => array() ) , 'show_ads_list_reload_buttons' => array( 'name' => '\\' . __NAMESPACE__ . '\\get_new_field_value_4_show_ads_list_reload_buttons' , 'args' => array() ) , 'question_disable_incoming_ads' => array( 'name' => '\\' . __NAMESPACE__ . '\\get_new_field_value_4_question_disable_incoming_ads' , 'args' => array() ) , 'question_disable_outgoing_ads' => array( 'name' => '\\' . __NAMESPACE__ . '\\get_new_field_value_4_question_disable_outgoing_ads' , 'args' => array() ) , 'license_key' => array( 'name' => '\\' . __NAMESPACE__ . '\\get_new_field_value_4_license_key' , 'args' => array() ) , 'question_manual_update_approval' => array( 'name' => '\\' . __NAMESPACE__ . '\\get_new_field_value_4_question_manual_update_approval' , 'args' => array() ) , 'max_ads_per_site_per_page' => array( 'name' => '\\' . __NAMESPACE__ . '\\new_field_value_is_empty_string' , 'args' => array() ) , 'max_repetitions_per_ad_per_page' => array( 'name' => '\\' . __NAMESPACE__ . '\\new_field_value_is_empty_string' , 'args' => array() ) , 'test_method' => array( 'name' => '\\' . __NAMESPACE__ . '\\new_field_value_is_empty_string' , 'args' => array() ) , 'test_ip' => array( 'name' => '\\' . __NAMESPACE__ . '\\new_field_value_is_empty_string' , 'args' => array() ) ) ) ; // ========================================================================= // Return this dataset's details... // ========================================================================= return $dataset_details ; // ========================================================================= // That's that! // ========================================================================= } // ============================================================================= // That's that! // =============================================================================