MyBB Community Forums

Full Version: Code Parsing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys

What I'm trying to do is writing a simple mod that parses code between [vkp] and [/vkp]. The problem is that I need to get each line with a different color, an example would be:

;K810 SW-R8BA024 OrG
;MegaBass
;v1
;(c)diezil
+44140000
f4639a: 042D 052D
f463bc: 0420 0520
f46558: 0521 0621
f4658a: 0521 0621
f465f8: 0421 0521
f46628: 0528 0628
f4f142: 0528 0628
f4f254: 052B 062B
f4f2ac: FC91BC45 0421CF45
f46364: F071BC45 EC20CF45
1bb20ec: 00000000000000000000000000000000 8B1000003F10000074100000E1100000
1bb20fc: 00000000000000000000000000000000 BF100000FFFF00000000000000050000
1bb210c: 00000000000000000000000000000000 00030E00000003000000060000000000
1bb211c: 00 06

All quoted lines (Starting with ; ) have to be green, the base (Starting with + ) has to be orange and the patch itself (Starting with hex offsets) has to be some other color.

How could I do this?
Yeah, that's kind of obvious, but how could I process the text line by line?
Is there a plugin for GeSHi which understands this code dialect?
Did you at least give a try? Rolleyes

I did this in about 2 minutes by using Regular Expression only. Dodgy

http://www.tatodev.netsons.org/forum/sho...php?tid=20

Regards
Thank you very much!

But the name is VKP patch =P not KVP =D anyway, thanxx!!

http://www.se-developers.net/showthread....31#pid1531

You have credits!
My mistake. Wink
I fixed.

Happy new year!
Happy new year to you too and anyone reading this thread Smile

Mods you can close this thread, thx.

PS: flash.tato you have a PM Wink