break; // If this was a ability request // If this was a ability request case 'abilities': $key_counter = array_search($this_token, array_keys($mmrpg_database_abilities)); $temp_ability_info = $mmrpg_database_abilities[$this_token]; $temp_ability_markup = rpg_ability::print_database_markup($temp_ability_info, array('show_key' => $key_counter)); $temp_ability_markup = preg_replace('/\\s+/', ' ', $temp_ability_markup); echo 'success : ' . $temp_ability_markup; break; // If this was a field request // If this was a field request case 'fields': $key_counter = array_search($this_token, array_keys($mmrpg_database_fields)); $temp_field_info = $mmrpg_database_fields[$this_token]; $temp_field_markup = rpg_field::print_database_markup($temp_field_info, array('show_key' => $key_counter)); $temp_field_markup = preg_replace('/\\s+/', ' ', $temp_field_markup); echo 'success : ' . $temp_field_markup; break; // If this was a item request // If this was a item request case 'items': $key_counter = array_search($this_token, array_keys($mmrpg_database_items)); $temp_item_info = $mmrpg_database_items[$this_token]; $temp_item_markup = rpg_ability::print_database_markup($temp_item_info, array('show_key' => $key_counter)); $temp_item_markup = preg_replace('/\\s+/', ' ', $temp_item_markup); echo 'success : ' . $temp_item_markup; break; // If this was a type request // If this was a type request case 'types':
// If we're in the index view, loop through and display all fields if (empty($this_current_token)) { // Loop through the field database and display the appropriate data $key_counter = 0; foreach ($mmrpg_database_fields as $field_key => $field_info) { // If a type filter has been applied to the field page $temp_field_types = array(); if (!empty($field_info['field_type'])) { $temp_field_types[] = $field_info['field_type']; } if (!empty($field_info['field_type2'])) { $temp_field_types[] = $field_info['field_type2']; } if (empty($temp_field_types)) { $temp_field_types[] = 'none'; } if (isset($this_current_filter) && !in_array($this_current_filter, $temp_field_types)) { $key_counter++; continue; } // Collect information about this field $this_field_image = !empty($field_info['field_image']) ? $field_info['field_image'] : $field_info['field_token']; if ($this_field_image == 'field') { $this_seo_fields = 'noindex'; } // Collect the markup for this field and print it to the browser $temp_field_markup = rpg_field::print_database_markup($field_info, array('layout_style' => 'website_compact', 'show_key' => $key_counter)); echo $temp_field_markup; $key_counter++; } }