Como criar um BBCode personalizado que colora as palavras?

2 participantes

Ver o tópico anterior Ver o tópico seguinte Ir para baixo

Tópico resolvido Como criar um BBCode personalizado que colora as palavras?

Mensagem por oMatBR 24.05.15 17:06

Queria criar um código BBCode pro meu fórum que colorisse algumas palavras por exemplo um código:
<gml>If keyboard_check(vk_right){x+=4}</gml>
Quando comentasse ficaria assim:
If keyboard_check(vk_right){x+=4}

Um código que substitua todas as palavras IF por IF Vermelho...
Como no fórum gmbr.forumeiros.com


Última edição por iChees em 29.05.15 5:29, editado 4 vez(es) (Motivo da edição : Resolvido)
oMatBR

oMatBR
Novo Membro

Membro desde : 24/05/2015
Mensagens : 6
Pontos : 12

http://gmstuto.forumeiros.com/

Ir para o topo Ir para baixo

Tópico resolvido Re: Como criar um BBCode personalizado que colora as palavras?

Mensagem por RafaelS. 25.05.15 14:37

Olá amigo!

Crie um novo JavaScript com investimento em todas as páginas:

Código:
new function(){var Z=0,Y=0,X="",K=["","",""],W,c;function V(){if(Y==1)X+="</b>";if(Y==2){X+="</span>"}else if(Y)X+="</span>"};function U(T){E=T.replace(/&gt;/gi," Yajirushinokyokai-sen ")+" ";E=E.replace(/&lt;/gi," Modoruyajirushi ");var i,c,R,S=[32,60,62,58,59,47,126,94,91,93,180,92,124,34,39,33,45,61,43,42,46,44,40,41,35,13,10,123,125],Q,P;X="";Z=0;Y=0;K=["","",""];W='';P=["if","xor","for","return","var","global","globalvar","else","switch","case","break","default","div","mod","do","until","begin","end","and","exit","continue","then","with","while"];O=["MCI_command","abs","action_another_room","action_bounce","action_cd_pause","action_cd_play","action_cd_playing","action_cd_present","action_cd_resume","action_cd_stop","action_change_object","action_color","action_create_object","action_create_object_motion","action_create_object_random","action_current_room","action_draw_arrow","action_draw_background","action_draw_ellipse","action_draw_ellipse_gradient","action_draw_gradient_hor","action_draw_gradient_vert","action_draw_health","action_draw_life","action_draw_life_images","action_draw_line","action_draw_rectangle","action_draw_score","action_draw_sprite","action_draw_text","action_draw_text_transformed","action_draw_variable","action_effect","action_end_game","action_end_sound","action_execute_script","action_font","action_fullscreen","action_highscore_clear","action_highscore_show","action_if","action_if_aligned","action_if_collision","action_if_dice","action_if_empty","action_if_health","action_if_life","action_if_mouse","action_if_next_room","action_if_number","action_if_object","action_if_previous_room","action_if_question","action_if_score","action_if_sound","action_if_variable","action_inherited","action_kill_object","action_kill_position","action_linear_step","action_load_game","action_message","action_move","action_move_contact","action_move_point","action_move_random","action_move_start","action_move_to","action_next_room","action_partemit_burst","action_partemit_create","action_partemit_destroy","action_partemit_stream","action_partsyst_clear","action_partsyst_create","action_partsyst_destroy","action_parttype_color","action_parttype_create","action_parttype_gravity","action_parttype_life","action_parttype_secondary","action_parttype_speed","action_path","action_path_end","action_path_position","action_path_speed","action_potential_step","action_previous_room","action_replace_background","action_replace_sound","action_replace_sprite","action_restart_game","action_reverse_xdir","action_reverse_ydir","action_save_game","action_set_alarm","action_set_caption","action_set_cursor","action_set_friction","action_set_gravity","action_set_health","action_set_hspeed","action_set_life","action_set_motion","action_set_score","action_set_timeline","action_set_timeline_position","action_set_timeline_speed","action_set_vspeed","action_show_info","action_show_video","action_sleep","action_snap","action_snapshot","action_sound","action_splash_image","action_splash_settings","action_splash_text","action_splash_video","action_splash_web","action_sprite_color","action_sprite_set","action_sprite_transform","action_timeline_pause","action_timeline_set","action_timeline_start","action_timeline_stop","action_webpage","action_wrap","arccos","arcsin","arctan","arctan2","background_add","background_add_background","background_assign","background_create_color","background_create_from_screen","background_create_from_surface","background_create_gradient","background_delete","background_duplicate","background_exists","background_get_height","background_get_name","background_get_texture","background_get_width","background_name","background_replace","background_replace_background","background_save","background_set_alpha_from_background","cd_close_door","cd_init","cd_length","cd_number","cd_open_door","cd_pause","cd_paused","cd_play","cd_playing","cd_position","cd_present","cd_resume","cd_set_position","cd_set_track_position","cd_stop","cd_track","cd_track_length","cd_track_position","ceil","choose","chr","clipboard_get_text","clipboard_has_text","clipboard_set_text","collision_circle","collision_ellipse","collision_line","collision_point","collision_rectangle","color_get_blue","color_get_green","color_get_hue","color_get_red","color_get_saturation","color_get_value","cos","d3d_draw_block","d3d_draw_cone","d3d_draw_cylinder","d3d_draw_ellipsoid","d3d_draw_floor","d3d_draw_wall","d3d_end","d3d_light_define_direction","d3d_light_define_point","d3d_light_enable","d3d_model_block","d3d_model_clear","d3d_model_cone","d3d_model_create","d3d_model_cylinder","d3d_model_destroy","d3d_model_draw","d3d_model_ellipsoid","d3d_model_floor","d3d_model_load","d3d_model_primitive_begin","d3d_model_primitive_end","d3d_model_save","d3d_model_vertex","d3d_model_vertex_color","d3d_model_vertex_normal","d3d_model_vertex_normal_color","d3d_model_vertex_normal_texture","d3d_model_vertex_normal_texture_color","d3d_model_vertex_texture","d3d_model_vertex_texture_color","d3d_model_wall","d3d_primitive_begin","d3d_primitive_begin_texture","d3d_primitive_end","d3d_set_culling","d3d_set_depth","d3d_set_fog","d3d_set_hidden","d3d_set_lighting","d3d_set_perspective","d3d_set_projection","d3d_set_projection_ext","d3d_set_projection_ortho","d3d_set_projection_perspective","d3d_set_shading","d3d_start","d3d_transform_add_rotation_axis","d3d_transform_add_rotation_x","d3d_transform_add_rotation_y","d3d_transform_add_rotation_z","d3d_transform_add_scaling","d3d_transform_add_translation","d3d_transform_set_identity","d3d_transform_set_rotation_axis","d3d_transform_set_rotation_x","d3d_transform_set_rotation_y","d3d_transform_set_rotation_z","d3d_transform_set_scaling","d3d_transform_set_translation","d3d_transform_stack_clear","d3d_transform_stack_discard","d3d_transform_stack_empty","d3d_transform_stack_pop","d3d_transform_stack_push","d3d_transform_stack_top","d3d_vertex","d3d_vertex_color","d3d_vertex_normal","d3d_vertex_normal_color","d3d_vertex_normal_texture","d3d_vertex_normal_texture_color","d3d_vertex_texture","d3d_vertex_texture_color","date_compare_date","date_compare_datetime","date_compare_time","date_create_date","date_create_datetime","date_create_time","date_current_date","date_current_datetime","date_current_time","date_date_of","date_date_string","date_datetime_string","date_day_span","date_days_in_month","date_days_in_year","date_get_day","date_get_day_of_year","date_get_hour","date_get_hour_of_year","date_get_minute","date_get_minute_of_year","date_get_month","date_get_second","date_get_second_of_year","date_get_week","date_get_weekday","date_get_year","date_hour_span","date_inc_day","date_inc_hour","date_inc_minute","date_inc_month","date_inc_second","date_inc_week","date_inc_year","date_is_today","date_leap_year","date_minute_span","date_month_span","date_second_span","date_time_of","date_time_string","date_valid_date","date_valid_datetime","date_valid_time","date_week_span","date_year_span","degtorad","directory_create","directory_exists","discard_include_file","disk_free","disk_size","display_get_colordepth","display_get_frequency","display_get_height","display_get_width","display_mouse_get_x","display_mouse_get_y","display_mouse_set","display_reset","display_set_all","display_set_colordepth","display_set_frequency","display_set_size","display_test_all","distance_to_object","distance_to_point","draw_arrow","draw_background","draw_background_ext","draw_background_general","draw_background_part","draw_background_part_ext","draw_background_stretched","draw_background_stretched_ext","draw_background_tiled","draw_background_tiled_ext","draw_button","draw_circle","draw_circle_color","draw_clear","draw_clear_alpha","draw_ellipse","draw_ellipse_color","draw_get_alpha","draw_get_color","draw_getpixel","draw_healthbar","draw_highscore","draw_line","draw_line_color","draw_line_width","draw_line_width_color","draw_path","draw_point","draw_point_color","draw_primitive_begin","draw_primitive_begin_texture","draw_primitive_end","draw_rectangle","draw_rectangle_color","draw_roundrect","draw_roundrect_color","draw_set_alpha","draw_set_blend_mode","draw_set_blend_mode_ext","draw_set_circle_precision","draw_set_color","draw_set_font","draw_set_halign","draw_set_valign","draw_sprite","draw_sprite_ext","draw_sprite_general","draw_sprite_part","draw_sprite_part_ext","draw_sprite_stretched","draw_sprite_stretched_ext","draw_sprite_tiled","draw_sprite_tiled_ext","draw_surface","draw_surface_ext","draw_surface_general","draw_surface_part","draw_surface_part_ext","draw_surface_stretched","draw_surface_stretched_ext","draw_surface_tiled","draw_surface_tiled_ext","draw_text","draw_text_color","draw_text_ext","draw_text_ext_color","draw_text_ext_transformed","draw_text_ext_transformed_color","draw_text_transformed","draw_text_transformed_color","draw_triangle","draw_triangle_color","draw_vertex","draw_vertex_color","draw_vertex_texture","draw_vertex_texture_color","ds_grid_add","ds_grid_add_disk","ds_grid_add_grid_region","ds_grid_add_region","ds_grid_clear","ds_grid_copy","ds_grid_create","ds_grid_destroy","ds_grid_get","ds_grid_get_disk_max","ds_grid_get_disk_mean","ds_grid_get_disk_min","ds_grid_get_disk_sum","ds_grid_get_max","ds_grid_get_mean","ds_grid_get_min","ds_grid_get_sum","ds_grid_height","ds_grid_multiply","ds_grid_multiply_disk","ds_grid_multiply_grid_region","ds_grid_multiply_region","ds_grid_read","ds_grid_resize","ds_grid_set","ds_grid_set_disk","ds_grid_set_grid_region","ds_grid_set_region","ds_grid_shuffle","ds_grid_value_disk_exists","ds_grid_value_disk_x","ds_grid_value_disk_y","ds_grid_value_exists","ds_grid_value_x","ds_grid_value_y","ds_grid_width","ds_grid_write","ds_list_add","ds_list_clear","ds_list_copy","ds_list_create","ds_list_delete","ds_list_destroy","ds_list_empty","ds_list_find_index","ds_list_find_value","ds_list_insert","ds_list_read","ds_list_replace","ds_list_shuffle","ds_list_size","ds_list_sort","ds_list_write","ds_map_add","ds_map_clear","ds_map_copy","ds_map_create","ds_map_delete","ds_map_destroy","ds_map_empty","ds_map_exists","ds_map_find_first","ds_map_find_last","ds_map_find_next","ds_map_find_previous","ds_map_find_value","ds_map_read","ds_map_replace","ds_map_size","ds_map_write","ds_priority_add","ds_priority_change_priority","ds_priority_clear","ds_priority_copy","ds_priority_create","ds_priority_delete_max","ds_priority_delete_min","ds_priority_delete_value","ds_priority_destroy","ds_priority_empty","ds_priority_find_max","ds_priority_find_min","ds_priority_find_priority","ds_priority_read","ds_priority_size","ds_priority_write","ds_queue_clear","ds_queue_copy","ds_queue_create","ds_queue_dequeue","ds_queue_destroy","ds_queue_empty","ds_queue_enqueue","ds_queue_head","ds_queue_read","ds_queue_size","ds_queue_tail","ds_queue_write","ds_set_precision","ds_stack_clear","ds_stack_copy","ds_stack_create","ds_stack_destroy","ds_stack_empty","ds_stack_pop","ds_stack_push","ds_stack_read","ds_stack_size","ds_stack_top","ds_stack_write","effect_clear","effect_create_above","effect_create_below","environment_get_variable","event_inherited","event_inherited","event_perform","event_perform_object","event_user","execute_file","execute_program","execute_shell","execute_string","exp","export_include_file","export_include_file_location","external_call","external_call0","external_call1","external_call2","external_call3","external_call4","external_call5","external_call6","external_call7","external_call8","external_define","external_define0","external_define1","external_define2","external_define3","external_define4","external_define5","external_define6","external_define7","external_define8","external_free","file_attributes","file_bin_close","file_bin_open","file_bin_position","file_bin_read_byte","file_bin_rewrite","file_bin_seek","file_bin_size","file_bin_write_byte","file_close","file_copy","file_delete","file_eof","file_eoln","file_exists","file_find_close","file_find_first","file_find_next","file_open_append","file_open_read","file_open_write","file_read_real","file_read_string","file_readln","file_rename","file_text_close","file_text_eof","file_text_eoln","file_text_open_append","file_text_open_read","file_text_open_write","file_text_read_real","file_text_read_string","file_text_readln","file_text_write_real","file_text_write_string","file_text_writeln","file_write_real","file_write_string","file_writeln","filename_change_ext","filename_dir","filename_drive","filename_ext","filename_name","filename_path","floor","font_add","font_add_sprite","font_delete","font_exists","font_get_bold","font_get_first","font_get_fontname","font_get_italic","font_get_last","font_get_name","font_get_size","font_name","font_replace","font_replace_sprite","frac","game_end","game_load","game_restart","game_save","get_color","get_directory","get_directory_alt","get_integer","get_open_filename","get_save_filename","get_string","highscore_add","highscore_add_current","highscore_clear","highscore_name","highscore_set_background","highscore_set_border","highscore_set_Q","highscore_set_font","highscore_set_strings","highscore_show","highscore_show_ext","highscore_value","ini_close","ini_key_delete","ini_key_exists","ini_open","ini_read_real","ini_read_string","ini_section_delete","ini_section_exists","ini_write_real","ini_write_string","instance_activate_all","instance_activate_object","instance_activate_region","instance_change","instance_copy","instance_create","instance_deactivate_all","instance_deactivate_object","instance_deactivate_region","instance_destroy","instance_exists","instance_find","instance_furthest","instance_nearest","instance_number","instance_place","instance_position","instance_sprite","io_clear","io_handle","irandom","irandom_range","is_real","is_string","joystick_axes","joystick_buttons","joystick_check_button","joystick_direction","joystick_exists","joystick_has_pov","joystick_name","joystick_pov","joystick_rpos","joystick_upos","joystick_vpos","joystick_xpos","joystick_ypos","joystick_zpos","keyboard_check","keyboard_check_direct","keyboard_check_pressed","keyboard_check_released","keyboard_clear","keyboard_get_map","keyboard_get_numlock","keyboard_key_press","keyboard_key_release","keyboard_set_map","keyboard_set_numlock","keyboard_unset_map","keyboard_wait","lengthdir_x","lengthdir_y","ln","load_info","log10","log2","logn","make_color","make_color_hsv","make_color_rgb","max","max3","mean","median","merge_color","message_alpha","message_background","message_button","message_button_font","message_caption","message_input_color","message_input_font","message_mouse_color","message_position","message_size","message_text_font","min","min3","motion_add","motion_set","mouse_check_button","mouse_check_button_pressed","mouse_check_button_released","mouse_clear","mouse_wait","mouse_wheel_down","mouse_wheel_up","move_bounce","move_bounce_all","move_bounce_solid","move_contact","move_contact_all","move_contact_solid","move_outside_all","move_outside_solid","move_random","move_random","move_snap","move_towards_point","move_wrap","mp_grid_add_cell","mp_grid_add_instances","mp_grid_add_rectangle","mp_grid_clear_all","mp_grid_clear_cell","mp_grid_clear_rectangle","mp_grid_create","mp_grid_destroy","mp_grid_draw","mp_grid_path","mp_linear_path","mp_linear_path_object","mp_linear_step","mp_linear_step_object","mp_potential_path","mp_potential_path_object","mp_potential_settings","mp_potential_step","mp_potential_step_object","mplay_connect_status","mplay_data_mode","mplay_data_read","mplay_data_write","mplay_end","mplay_init_ipx","mplay_init_modem","mplay_init_serial","mplay_init_tcpip","mplay_ipaddress","mplay_message_clear","mplay_message_count","mplay_message_id","mplay_message_name","mplay_message_player","mplay_message_receive","mplay_message_send","mplay_message_send_guaranteed","mplay_message_value","mplay_player_find","mplay_player_id","mplay_player_name","mplay_session_create","mplay_session_end","mplay_session_find","mplay_session_join","mplay_session_mode","mplay_session_name","mplay_session_status","object_add","object_delete","object_event_add","object_event_clear","object_exists","object_get_depth","object_get_mask","object_get_name","object_get_parent","object_get_persistent","object_get_solid","object_get_sprite","object_get_visible","object_is_ancestor","object_name","object_set_depth","object_set_mask","object_set_parent","object_set_persistent","object_set_solid","object_set_sprite","object_set_visible","ord","parameter_count","parameter_string","part_attractor_clear","part_attractor_create","part_attractor_destroy","part_attractor_destroy_all","part_attractor_exists","part_attractor_force","part_attractor_position","part_changer_clear","part_changer_create","part_changer_destroy","part_changer_destroy_all","part_changer_exists","part_changer_kind","part_changer_region","part_changer_types","part_deflector_clear","part_deflector_create","part_deflector_destroy","part_deflector_destroy_all","part_deflector_exists","part_deflector_friction","part_deflector_kind","part_deflector_region","part_destroyer_clear","part_destroyer_create","part_destroyer_destroy","part_destroyer_destroy_all","part_destroyer_exists","part_destroyer_region","part_emitter_burst","part_emitter_clear","part_emitter_create","part_emitter_destroy","part_emitter_destroy_all","part_emitter_exists","part_emitter_region","part_emitter_stream","part_particles_clear","part_particles_count","part_particles_create","part_particles_create_color","part_system_automatic_draw","part_system_automatic_update","part_system_clear","part_system_create","part_system_depth","part_system_destroy","part_system_draw_order","part_system_drawit","part_system_exists","part_system_position","part_system_update","part_type_alpha","part_type_alpha1","part_type_alpha2","part_type_alpha3","part_type_blend","part_type_clear","part_type_color","part_type_color1","part_type_color2","part_type_color3","part_type_color_hsv","part_type_color_mix","part_type_color_rgb","part_type_create","part_type_death","part_type_destroy","part_type_direction","part_type_exists","part_type_gravity","part_type_life","part_type_orientation","part_type_scale","part_type_shape","part_type_size","part_type_speed","part_type_sprite","part_type_step","path_add","path_add_point","path_append","path_assign","path_change_point","path_clear_points","path_delete","path_delete_point","path_duplicate","path_end","path_exists","path_flip","path_get_closed","path_get_kind","path_get_length","path_get_name","path_get_number","path_get_point_speed","path_get_point_x","path_get_point_y","path_get_precision","path_get_speed","path_get_x","path_get_y","path_insert_point","path_mirror","path_name","path_reverse","path_rotate","path_scale","path_set_closed","path_set_kind","path_set_precision","path_shift","path_start","place_empty","place_free","place_meeting","place_snapped","point_direction","point_distance","position_change","position_destroy","position_empty","position_meeting","power","radtodeg","random","random_get_seed","random_range","random_set_seed","randomize","real","registry_exists","registry_exists_ext","registry_read_real","registry_read_real_ext","registry_read_string","registry_read_string_ext","registry_set_root","registry_write_real","registry_write_real_ext","registry_write_string","registry_write_string_ext","room_add","room_assign","room_duplicate","room_exists","room_get_name","room_goto","room_goto_next","room_goto_previous","room_instance_add","room_instance_clear","room_name","room_next","room_previous","room_restart","room_set_background","room_set_background_color","room_set_caption","room_set_code","room_set_height","room_set_persistent","room_set_view","room_set_view_enabled","room_set_width","room_tile_add","room_tile_add_ext","room_tile_clear","round","screen_redraw","screen_refresh","screen_save","screen_save_part","screen_wait_vsync","script_execute","script_exists","script_get_name","script_get_text","script_name","set_application_title","set_automatic_draw","set_program_priority","set_synchronization","show_debug_message","show_error","show_image","show_info","show_menu","show_menu_pos","show_message","show_message","show_message_ext","show_question","show_question","show_text","show_video","sign","sin","sleep","sound_3d_set_sound_cone","sound_3d_set_sound_distance","sound_3d_set_sound_position","sound_3d_set_sound_velocity","sound_add","sound_background_tempo","sound_delete","sound_discard","sound_effect_chorus","sound_effect_compressor","sound_effect_echo","sound_effect_equalizer","sound_effect_flanger","sound_effect_gargle","sound_effect_reverb","sound_effect_set","sound_exists","sound_fade","sound_get_kind","sound_get_name","sound_get_preload","sound_global_volume","sound_isplaying","sound_loop","sound_name","sound_pan","sound_play","sound_replace","sound_restore","sound_set_search_directory","sound_stop","sound_stop_all","sound_volume","splash_set_adapt","splash_set_border","splash_set_caption","splash_set_close_button","splash_set_color","splash_set_cursor","splash_set_fullscreen","splash_set_interrupt","splash_set_main","splash_set_position","splash_set_scale","splash_set_size","splash_set_stop_key","splash_set_stop_mouse","splash_set_top","splash_show_image","splash_show_text","splash_show_video","splash_show_web","sprite_add","sprite_add_from_screen","sprite_add_from_surface","sprite_add_sprite","sprite_assign","sprite_collision_mask","sprite_create_from_screen","sprite_create_from_surface","sprite_delete","sprite_duplicate","sprite_exists","sprite_get_bbox_bottom","sprite_get_bbox_left","sprite_get_bbox_right","sprite_get_bbox_top","sprite_get_height","sprite_get_name","sprite_get_number","sprite_get_texture","sprite_get_width","sprite_get_xoffset","sprite_get_yoffset","sprite_merge","sprite_name","sprite_replace","sprite_replace_sprite","sprite_save","sprite_save_strip","sprite_set_alpha_from_sprite","sprite_set_offset","sqr","sqrt","string","string_char_at","string_copy","string_count","string_delete","string_digits","string_format","string_height","string_height_ext","string_insert","string_length","string_letters","string_lettersdigits","string_lower","string_pos","string_repeat","string_replace","string_replace_all","string_upper","string_width","string_width_ext","surface_copy","surface_copy_part","surface_create","surface_exists","surface_free","surface_get_height","surface_get_texture","surface_get_width","surface_getpixel","surface_reset_target","surface_save","surface_save_part","surface_set_target","tan","texture_exists","texture_get_height","texture_get_width","texture_preload","texture_set_blending","texture_set_interpolation","texture_set_priority","texture_set_repeat","tile_add","tile_delete","tile_delete_at","tile_exists","tile_find","tile_get_alpha","tile_get_background","tile_get_blend","tile_get_depth","tile_get_height","tile_get_left","tile_get_top","tile_get_visible","tile_get_width","tile_get_x","tile_get_xscale","tile_get_y","tile_get_yscale","tile_layer_delete","tile_layer_delete_at","tile_layer_depth","tile_layer_find","tile_layer_hide","tile_layer_shift","tile_layer_show","tile_set_alpha","tile_set_background","tile_set_blend","tile_set_depth","tile_set_position","tile_set_region","tile_set_scale","tile_set_visible","timeline_add","timeline_clear","timeline_delete","timeline_exists","timeline_get_name","timeline_moment_add","timeline_moment_clear","timeline_name","transition_define","transition_exists","variable_global_array2_get","variable_global_array2_set","variable_global_array_get","variable_global_array_set","variable_global_exists","variable_global_get","variable_global_set","variable_local_array2_get","variable_local_array2_set","variable_local_array_get","variable_local_array_set","variable_local_exists","variable_local_get","variable_local_set","window_center","window_default","window_get_caption","window_get_color","window_get_cursor","window_get_fullscreen","window_get_height","window_get_region_height","window_get_region_scale","window_get_region_width","window_get_showborder","window_get_showicons","window_get_sizeable","window_get_stayontop","window_get_visible","window_get_width","window_get_x","window_get_y","window_handle","window_mouse_get_x","window_mouse_get_y","window_mouse_set","window_set_caption","window_set_color","window_set_cursor","window_set_fullscreen","window_set_position","window_set_rectangle","window_set_region_scale","window_set_region_size","window_set_showborder","window_set_showicons","window_set_size","window_set_sizeable","window_set_stayontop","window_set_visible","window_view_mouse_get_x","window_view_mouse_get_y","window_view_mouse_set","window_views_mouse_get_x","window_views_mouse_get_y","window_views_mouse_set"];CONSTANTS=["argument","argument0","argument1","argument10","argument11","argument12","argument13","argument14","argument15","argument2","argument3","argument4","argument5","argument6","argument7","argument8","argument9","argument_relative","background_alpha","background_blend","background_color","background_foreground","background_height","background_hspeed","background_htiled","background_index","background_showcolor","background_visible","background_vspeed","background_vtiled","background_width","background_x","background_xscale","background_y","background_yscale","caption_health","caption_lives","caption_score","current_day","current_hour","current_minute","current_month","current_second","current_time","current_weekday","current_year","cursor_sprite","debug_mode","error_last","error_occurred","event_action","event_number","event_object","event_type","fps","game_id","gamemaker_pro","gamemaker_registered","gamemaker_version","health","instance_count","instance_id","keyboard_key","keyboard_lastchar","keyboard_lastkey","keyboard_string","lives","mouse_button","mouse_lastbutton","mouse_x","mouse_y","program_directory","room","room_caption","room_first","room_height","room_last","room_persistent","room_speed","room_width","score","secure_mode","show_health","show_lives","show_score","temp_directory","transition_color","transition_kind","transition_steps","view_angle","view_current","view_enabled","view_hborder","view_hport","view_hspeed","view_hview","view_object","view_vborder","view_visible","view_vspeed","view_wport","view_wview","view_xport","view_xview","view_yport","view_yview","working_directory","alarm","bbox_bottom","bbox_left","bbox_right","bbox_top","depth","direction","friction","gravity","gravity_direction","hspeed","id","image_alpha","image_angle","image_blend","image_index","image_number","image_single","image_speed","image_xscale","image_yscale","mask_index","object_index","path_endaction","path_index","path_orientation","path_position","path_positionprevious","path_scale","path_speed","persistent","solid","speed","sprite_height","sprite_index","sprite_width","sprite_xoffset","sprite_yoffset","timeline_index","timeline_loop","timeline_position","timeline_running","timeline_speed","visible","vspeed","x","xprevious","xstart","y","yprevious","ystart","all","bm_add","bm_dest_alpha","bm_dest_color","bm_inv_dest_alpha","bm_inv_dest_color","bm_inv_src_alpha","bm_inv_src_color","bm_max","bm_normal","bm_one","bm_src_alpha","bm_src_alpha_sat","bm_src_color","bm_subtract","bm_zero","c_aqua","c_black","c_blue","c_dkgray","c_fuchsia","c_gray","c_green","c_lime","c_ltgray","c_maroon","c_navy","c_olive","c_orange","c_purple","c_red","c_silver","c_teal","c_white","c_yellow","cr_appstart","cr_arrow","cr_arrrow","cr_beam","cr_cross","cr_default","cr_drag","cr_handpoint","cr_help","cr_hourglass","cr_hsplit","cr_multidrag","cr_no","cr_nodrop","cr_none","cr_size_all","cr_size_nesw","cr_size_ns","cr_size_nwse","cr_size_we","cr_sqlwait","cr_uparrow","cr_vsplit","dll_cdecl","dll_stdcall","ef_cloud","ef_ellipse","ef_explosion","ef_firework","ef_flare","ef_rain","ef_ring","ef_smoke","ef_smokeup","ef_snow","ef_spark","ef_star","ev_alarm","ev_animation_end","ev_boundary","ev_close_button","ev_collision","ev_create","ev_destroy","ev_draw","ev_end_of_path","ev_game_end","ev_game_start","ev_global_left_button","ev_global_left_press","ev_global_left_release","ev_global_middle_button","ev_global_middle_press","ev_global_middle_release","ev_global_press","ev_global_release","ev_global_right_button","ev_global_right_press","ev_global_right_release","ev_joystick1_button1","ev_joystick1_button2","ev_joystick1_button3","ev_joystick1_button4","ev_joystick1_button5","ev_joystick1_button6","ev_joystick1_button7","ev_joystick1_button8","ev_joystick1_down","ev_joystick1_left","ev_joystick1_right","ev_joystick1_up","ev_joystick2_button1","ev_joystick2_button2","ev_joystick2_button3","ev_joystick2_button4","ev_joystick2_button5","ev_joystick2_button6","ev_joystick2_button7","ev_joystick2_button8","ev_joystick2_down","ev_joystick2_left","ev_joystick2_right","ev_joystick2_up","ev_keyboard","ev_keypress","ev_keyrelease","ev_left_button","ev_left_press","ev_left_release","ev_middle_button","ev_middle_press","ev_middle_release","ev_mouse","ev_mouse_enter","ev_mouse_leave","ev_mouse_wheel_down","ev_mouse_wheel_up","ev_no_button","ev_no_more_health","ev_no_more_lives","ev_other","ev_outside","ev_right_button","ev_right_press","ev_right_release","ev_room_end","ev_room_start","ev_step","ev_step_begin","ev_step_end","ev_step_normal","ev_trigger","ev_user0","ev_user1","ev_user10","ev_user11","ev_user12","ev_user13","ev_user14","ev_user15","ev_user2","ev_user3","ev_user4","ev_user5","ev_user6","ev_user7","ev_user8","ev_user9","fa_archive","fa_bottom","fa_center","fa_directory","fa_hidden","fa_left","fa_middle","fa_readonly","fa_right","fa_sysfile","fa_top","fa_volumeid","false","global","local","mb_any","mb_left","mb_middle","mb_none","mb_right","noone","other","pi","pr_linelist","pr_linestrip","pr_pointlist","pr_trianglefan","pr_trianglelist","pr_trianglestrip","ps_change_all","ps_change_motion","ps_change_shape","ps_deflect_horizontal","ps_deflect_vertical","ps_distr_gaussian","ps_distr_invgaussian","ps_distr_linear","ps_force_constant","ps_force_linear","ps_force_quadratic","ps_shape_diamond","ps_shape_ellipse","ps_shape_line","ps_shape_rectangle","pt_shape_circle","pt_shape_cloud","pt_shape_disk","pt_shape_explosion","pt_shape_flare","pt_shape_line","pt_shape_pixel","pt_shape_ring","pt_shape_smoke","pt_shape_snow","pt_shape_spark","pt_shape_sphere","pt_shape_square","pt_shape_star","se_chorus","se_compressor","se_echo","se_equalizer","se_flanger","se_gargle","se_none","se_reverb","self","true","ty_real","ty_string","vk_add","vk_alt","vk_anykey","vk_backspace","vk_control","vk_decimal","vk_delete","vk_Te","vk_down","vk_end","vk_enter","vk_escape","vk_f1","vk_f10","vk_f11","vk_f12","vk_f2","vk_f3","vk_f4","vk_f5","vk_f6","vk_f7","vk_f8","vk_f9","vk_home","vk_insert","vk_lalt","vk_lcontrol","vk_left","vk_lshift","vk_multiply","vk_nokey","vk_numpad0","vk_numpad1","vk_numpad2","vk_numpad3","vk_numpad4","vk_numpad5","vk_numpad6","vk_numpad7","vk_numpad8","vk_numpad9","vk_pagedown","vk_pageup","vk_pause","vk_printscreen","vk_ralt","vk_rcontrol","vk_return","vk_right","vk_rshift","vk_shift","vk_space","vk_subtract","vk_tab","vk_up"];Q=["orange","red","green","green","blue","black","blue","rgb(128,0,0)"];for(i=0;i<E.length;i++){c=E.charAt(i);R=E.charCodeAt(i);if(S.indexOf(R)==-1)W+=c;else{if(Z==0){if(W==parseInt(W)){X+="<span style='color:rgb(64,128,255)'>"+W+"</span>";W=""}if(P.indexOf(W)!=-1){if(Y!=1){V();Y=1;X+="<b>";if(c!=""&&c!=" "){K[1]+="</b>";Y=0}}}else if(O.indexOf(W)!=-1){if(Y!=2){V();Y=2;X+="<span style='color:"+Q[6]+"'>";if(c!=" "||c!=""){K[1]+="</span>";Y=0}}}else if(CONSTANTS.indexOf(W)!=-1){if(Y!=3){V();Y=3;X+="<span style='color:"+Q[7]+"'>";if(c!=" "||c!=""){K[1]+="</span>";Y=0}}}else{V();Y=0}}TRY=(c==">"&&E.charAt(i-1)=="r"&&E.charAt(i-2)=="b"&&E.charAt(i-3)=="<");if(c=="'"){if(Z==0){V();K=["","<span style='color:"+Q[0]+"'>",""];Z=1}else if(Z==1){Z=0;K[2]+="</span>"}}else if(c=='"'){if(Z==0){V();K=["","<span style='color:"+Q[1]+"'>",""];Z=2}else if(Z==2){Z=0;K[2]+="</span>"}}else if(c=="/"&&E.charAt(i+1)=="/"){if(Z==0){K=["","<span style='color:"+Q[2]+"'>",""];Z=3}}else if(R==10||TRY){;if(Z==3){Z=0;K[2]+="</span>"};if(!TRY)K[2]+="<br>"}else if(c=="/"&&E.charAt(i+1)=="*"){if(Z==0){K[1]+="<span style='color:"+Q[3]+"'>";Z=4}}else if(c=="/"&&E.charAt(i-1)=="*"){if(Z==4){K[2]+="</span>";Z=0}}if(Z!=0){V();Y=0}else if(Y==0){if(c=="{"||c=="}"){V();K[1]+="<b>";Y=1}else{V();Y=0}}X+=K[0]+W+K[1]+c+K[2];K=["","",""];W=""}}V();X=X.replace(/ Yajirushinokyokai-sen /gi,"&gt;");X=X.replace(/ Modoruyajirushi /gi,"&lt");return(X)}$(document).ready(function(){$(".codebox>dd>code").after(function(){this.style.color="black";this.innerHTML=U(this.innerHTML)})})}

Flecha ajudeiros Para que funcione deve utilizar as seguintes tags:
Código:
[code][/code]

Abraços Piscada
avatar

RafaelS.
Membro Entusiasta

Membro desde : 26/04/2014
Mensagens : 5746
Pontos : 7156

http://techmais.forumeiros.com/

Ir para o topo Ir para baixo

Tópico resolvido Re: Como criar um BBCode personalizado que colora as palavras?

Mensagem por RafaelS. 29.05.15 5:27

Questão marcada como Resolvida ou o Autor solicitou que ela fosse arquivada.
Tópico marcado como Resolvido e movido para Questões resolvidas.
avatar

RafaelS.
Membro Entusiasta

Membro desde : 26/04/2014
Mensagens : 5746
Pontos : 7156

http://techmais.forumeiros.com/

Ir para o topo Ir para baixo

Ver o tópico anterior Ver o tópico seguinte Ir para o topo

- Tópicos semelhantes

Permissões neste sub-fórum
Não podes responder a tópicos