Operation Flashpoint Dragon Rising OFDR Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Regg's OffTopic

3 posters

Go down

Regg's OffTopic Empty Regg's OffTopic

Post by Regg Tue 28 May 2013, 22:17

There's been some griping here about the colors used for the code () boxes. Green text on a white background can be difficult to read. So I'm asking for suggestions for a new color scheme. Post your ideas, and if we can reach a consensus, I'll update the CSS.
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

Regg's OffTopic Empty Re: Regg's OffTopic

Post by TheGeneral Wed 29 May 2013, 01:05

Which ever colour schem is picked a contrast of a dark background with a light coloured text is what is needed I think. Dark bluebg/ white text, blackbg/ white text, etc. if it is possible to get the code written like the editor that would be even better. Highlighting the various syntax etc.
TheGeneral
TheGeneral
Admin

Points : 780
Reputation : 35
Join date : 2012-12-15

http://maniacaldog.wix.com/keepdralive

Back to top Go down

Regg's OffTopic Empty Re: Regg's OffTopic

Post by Regg Wed 29 May 2013, 02:46

I was looking around the forumotion.com help forum, but couldn't find anything about syntax highlighting other than 'we support it'. I'm trying to get an account on that forum so I can post a question.
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

Regg's OffTopic Empty Re: Regg's OffTopic

Post by TheGeneral Wed 29 May 2013, 11:32

here is the thread I started on the help forum.

http://help.forumotion.com/t118162-how-can-i-change-the-colour-of-text-in-code

Here is a link that I was sent to see if this could help:

http://www.avacweb.com/t324-10-syntax-highlighting-with-panda
TheGeneral
TheGeneral
Admin

Points : 780
Reputation : 35
Join date : 2012-12-15

http://maniacaldog.wix.com/keepdralive

Back to top Go down

Regg's OffTopic Empty Re: Regg's OffTopic

Post by Regg Wed 29 May 2013, 21:16

Been trying to get this Panda syntax highlighter working, but it looks like Forumotion.com is actually breaking the Panda code! Forumotion.com offers this warning:
Be careful, your javascript code must be functional when published. In effect, we compress the code in order to improve your forum pages loading time.
But whatever 'compression' method they are using is actually breaking the code, as Firefox logs a syntax error and aborts the script. Since the bastards locked the topic without providing any resolution, I'm trying to start a new thread, but still waiting on my account to be approved.
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

Regg's OffTopic Empty Re: Regg's OffTopic

Post by Regg Wed 29 May 2013, 21:33

FYI -- when I make my own web page and include the Panda JavaScript code, there are no syntax errors! It is quite clear that Forumotion.com's so-called compression is screwing up the code.
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

Regg's OffTopic Empty Re: Regg's OffTopic

Post by Regg Thu 30 May 2013, 02:59

I was able to figure out what was going on with the Panda script and get it resolved! We now have syntax highlighting in the code boxes! I still need to get it working properly for Lua, though.
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

Regg's OffTopic Empty Re: Regg's OffTopic

Post by TheGeneral Thu 30 May 2013, 10:44

thats looking great dude! just a prompt about the bg colour though, if you can change that and the colour of the text to suit I think you're on to a winner there.

Your help is greatly appreciated.

Cheers

MD
TheGeneral
TheGeneral
Admin

Points : 780
Reputation : 35
Join date : 2012-12-15

http://maniacaldog.wix.com/keepdralive

Back to top Go down

Regg's OffTopic Empty Re: Regg's OffTopic

Post by Regg Fri 31 May 2013, 07:49

Those colors looking any better mate?

I'm slowly adding the Lua keywords and functions.
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

Regg's OffTopic Empty Re: Regg's OffTopic

Post by TheGeneral Fri 31 May 2013, 09:48

Code:
function testcode()
    OFP:move("unit","waypointp","ADDTOFRONT")
    OFP:defend("unit","bunker",50,"ADDTOEND")
    MDG:kickSomeAss("unit","pla","allgunsblazing","fragthefuckers","OVERRIDE")
end

function onHit()
    if unit == myunit then
          MDG:yourfucked("unit","Dead")
    end
end
TheGeneral
TheGeneral
Admin

Points : 780
Reputation : 35
Join date : 2012-12-15

http://maniacaldog.wix.com/keepdralive

Back to top Go down

Regg's OffTopic Empty Re: Regg's OffTopic

Post by TheGeneral Fri 31 May 2013, 09:52

looking at my test code above, I'm not sure what it looks like on other colour varients in peoples editors, but I have white and blue the other way around, all the variables are in white too and red for the strings in the parenthesis.

Liking the background colour and the line numbering too.

funny isn't it, how we seem to be the only ones discussing this matter when other people were complaining about it. Thought this was an open forum?? scratch
TheGeneral
TheGeneral
Admin

Points : 780
Reputation : 35
Join date : 2012-12-15

http://maniacaldog.wix.com/keepdralive

Back to top Go down

Regg's OffTopic Empty Re: Regg's OffTopic

Post by John J. Stevens Fri 31 May 2013, 10:25

looking great - I tried playing with PANDA as well but became a bit frustrated with the recursive discussions of the threads - now I know it has something to do with the way forummotion handles its BBS code.

Either case it is looking good and like others, appreciate seeing these different skill sets being shared!
John J. Stevens
John J. Stevens
Admin

Location : WV/PA
Points : 285
Reputation : 22
Join date : 2012-12-19

Back to top Go down

Regg's OffTopic Empty Re: Regg's OffTopic

Post by Regg Sat 01 Jun 2013, 19:02

Thanks for the kind words. I'm glad I found an interesting place to share my skills!

Forumotion's Javascript 'optimizer' strips out all comments and attempts to remove white-space in scripts in order to cut down the total file size. But it was removing a space where it was needed. Adding a back-slash before the space fixed it!

There is still an issue with the Panda script not recognizing comments in posted code, and I'm not sure if I'll be able to get that one worked out. Its not just comments in Lua, but even the built-in defaults. Anyone here familiar with Regular Expressions and/or Javascript?
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

Regg's OffTopic Empty Re: Regg's OffTopic

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum