Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
.dat syntax highlighting for the [code] tag
#1
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:
Reply
Thanks given by: MH-Razen
#2
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...
[Image: random.php?pic=random]
www.lf-empire.de
Once I had a fortune, it said: "Leave now. Life is short. Time is luck"
Don't dream your life, live your dream!
Reply
Thanks given by:
#3
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
Reply
Thanks given by:
#4
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
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:
#5
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...
[Image: random.php?pic=random]
www.lf-empire.de
Once I had a fortune, it said: "Leave now. Life is short. Time is luck"
Don't dream your life, live your dream!
Reply
Thanks given by:
#6
(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/sy...ghlighting
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
Reply
Thanks given by:
#7
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
[Image: random.php?pic=random]
www.lf-empire.de
Once I had a fortune, it said: "Leave now. Life is short. Time is luck"
Don't dream your life, live your dream!
Reply
Thanks given by:
#8
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
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:
#9
(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~
Reply
Thanks given by:
#10
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............
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:




Users browsing this thread: 5 Guest(s)