Little Fighter Empire - Forums
.dat syntax highlighting for the [code] tag - Printable Version

+- Little Fighter Empire - Forums (https://lf-empire.de/forum)
+-- Forum: Empire Zone (https://lf-empire.de/forum/forumdisplay.php?fid=1)
+--- Forum: Website Improvements (https://lf-empire.de/forum/forumdisplay.php?fid=5)
+--- Thread: .dat syntax highlighting for the [code] tag (/showthread.php?tid=1132)

Pages: 1 2


.dat syntax highlighting for the [code] tag - YinYin - 09-20-2008

i think ive asked before - but i cant remember when
could we have the code tag to highlight .dat syntax like the data changer?
the current code tag is rather bare:
Code:
boring colorless code
<frame> 1337 nonhilghligtedmove:( <frame_end>
however the php one is all colorful by default:
PHP Code:
colorcode
#comment 
i dont know how hard/easy it is to create a new highlighting tag (but i cant imagine it being that hard)
in any case ive found a plugin for an older version with several languages:
http://mybbhacks.zingaburga.com/showthread.php?tid=33
and also that you can apparently create your own tags easily:
http://community.mybboard.net/thread-12008.html

so there should be no discussing yourself out by saying its not possible :p

and these would be all the things we need to highlight:
    DC-Code:
/C1"Frames" #0000A0
<bmp_begin> <bmp_end> <boss> <background> <background_end>
<end>
<frame> <frame_end> <file_editing> <file_editing_end>
<object> <object_end>
<phase> <phase_end>
<stage> <stage_end> <soldier>
<weapon_strength_list> <weapon_strength_list_end>
 
/C2"Attributes" #800000
attacking: aaction: action: act: arest:
backhurtact: bdefend: bound:
col: centerx: centery: cover: catchingact: caughtact: cc: c1: c2:
dash_height dash_distance dash_distancez dvx: dvy: dvz: decrease: dircontrol:
effect: entry:
file fronthurtact: fall: facing: file:
heavy_walking_speed heavy_walking_speedz heavy_running_speed heavy_running_speedz h: head: hit_a: hit_d: hit_j: hit_Fa: hit_Ua: hit_Da: hit_Fj: hit_Uj: hit_Dj: hit_ja: hurtable: hp: height:
id: injury:
jump_height jump_distance jump_distancez join:
kind:
loop:
mp: music:
name: next:
oid:
pic:
running_frame_rate running_speed running_speedz rowing_height rowing_distance row: ratio: rect: reserve:
small: state: sound: shadow: shadowsize:
taction: throwvx: throwvy: throwvz: throwinjury: times: type: transparency:
vaction: vrest:
walking_frame_rate walking_speed walking_speedz w: wait: weaponact: weapon_hit_sound: weapon_drop_sound: weapon_broken_sound: weapon_hp: weapon_drop_hurt: width: when_clear_goto_phase:
x:
y:
zwidth: zboundary:
 
/C3"Tags" #008040
bpoint: bpoint_end: bdy: bdy_end:
cpoint: cpoint_end:
itr: itr_end:
layer: layer_end
opoint: opoint_end:
wpoint: wpoint_end:



RE: .dat syntax highlighting for the [code] tag - MH-Razen - 09-20-2008

well, I really like this idea but my last search was with no result - the module you found well, outdated and the request for update from another guy was not heard by anybody.

I requested help in another forum and will see what happens...


RE: .dat syntax highlighting for the [code] tag - YinYin - 09-20-2008

you see i thought you could simply make a copy of the build in php syntax and change the tags and colors - for the shortest and easiest way
i didnt think we would need much outside help to do it ourselves


RE: .dat syntax highlighting for the [code] tag - Silverthorn - 09-20-2008

yea, I've seen that thread on my search through a custom syntax highlighter...
Seems that I'll have to write one (because I always wanted to write one^^), that one thread gave me some hope :P


RE: .dat syntax highlighting for the [code] tag - MH-Razen - 09-20-2008

well, I got answer: only work via plugin, not via simple code edits like I tryed (and wasted time :() - well, this button you find in the full edit now is a preparation in case I can go on, but I doubt this now...


RE: .dat syntax highlighting for the [code] tag - YinYin - 09-21-2008

(09-20-2008, 03:08 PM)Blue-Phoenix Wrote:  Seems that I'll have to write one (because I always wanted to write one^^), that one thread gave me some hope :P
in any case you can download that v1.2 one
http://mods.mybboard.net/archive/view/syntax-highlighting
and try to port it to v1.4
http://community.mybboard.net/showthread.php?tid=24122

after that you only have to change the word lists in the highlighter.php i guess


RE: .dat syntax highlighting for the [code] tag - MH-Razen - 09-25-2008

ok BP worked on it and the result is this:

1. the syntax highlighter work on 1.4 without any changing, so in (php) we would have highlighting of knbown languages

PHP Code:
if else false true 

DC Tags
injuryitropoint:

test sdfg sdfg 

(color changing shouldn't be hard I think, but theme dependent will be another problem)

2. the problem: '\' are deleted or hidden and we don't know why

3. would be cool to change it so the highlighting work in (dc) and not (php) tags.

But in the support forum noone helps so far. I'l see what I can do, but wanted to inform you about the situation :p


RE: .dat syntax highlighting for the [code] tag - Silverthorn - 09-25-2008

I just got the idea to remove php totally and instead replace it with DC code. Modifying tags isn't the problem and I assume that editing the highlighter is easier than adding a new feature to it ;)
And if I don't become an idiot over the mess of code, this will even work =P


RE: .dat syntax highlighting for the [code] tag - Azriel - 09-26-2008

(09-25-2008, 06:58 AM)MH-Razen Wrote:  2. the problem: '\' are deleted or hidden and we don't know why
PHP Code:
"\" 
works if u make the \ as a string thingy (in double quotes). doesn't work as a character (single quotes).




Azriel~



RE: .dat syntax highlighting for the [code] tag - Silverthorn - 09-26-2008

I'm taking a new script as a basis, in the hope it'll work then. At least it looks easier than the other one. Testing............