Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

What color scheme do you prefer for scripts in the forum?


  • Please log in to reply
43 replies to this topic

Poll: Which color scheme do you prefer for scripts? (see below for visual examples) (25 member(s) have cast votes)

Which color scheme do you prefer for scripts? (see below for visual examples)

  1. I like it the way it was: green for the entire script. (0 votes [0.00%])

    Percentage of vote: 0.00%

  2. It doesn't matter to me much as long as it's legible. (2 votes [8.00%])

    Percentage of vote: 8.00%

  3. Medium blue with green (its blue is RGB #0000C0) (this is the current setting). (8 votes [32.00%])

    Percentage of vote: 32.00%

  4. Bright blue with green (its blue is RGB #0000FF). (2 votes [8.00%])

    Percentage of vote: 8.00%

  5. Dark blue with green (its blue is RGB #000080). (9 votes [36.00%])

    Percentage of vote: 36.00%

  6. Blue for text but make the comments gray instead of green. (3 votes [12.00%])

    Percentage of vote: 12.00%

  7. Some other color scheme (please describe it). (1 votes [4.00%])

    Percentage of vote: 4.00%

Vote Guests cannot vote
SKAN
  • Administrators
  • 9115 posts
  • Last active:
  • Joined: 26 Dec 2005

javascript:void(document.cookie = "ahk_comm-single=color: #555555;");
javascript:void(document.cookie = "ahk_comm-multi=color: #555555;");


Cannot this be effected to be permanent?
I lose the grey comments after a reboot .. :roll:

Regards, :)
kWo4Lk1.png

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
For the record, I repeat the info given in the other topic: if you want to put several styles attributes, you have to separate them with %253B in place of the regular semi-colon:
javascript:void(document.cookie = "ahk_comm-single=color: #888%253B font-family: Comic Sans MS;");
javascript:void(document.cookie = "ahk_comm-multi=color: #777%253B font-family: Georgia;");

For those not familiar with CSS, you can get bold fonts with font-weight: bold and italics with font-style: italic. Use font-size: xxx to play with size, were xxx can be xx-small, x-small, small, medium, large, x-large, xx-large, or, for relative changes, smaller and larger. It can be a number too, but explaining CSS units is too long... ;-)
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
It would be useful if the CSS styles can be changed via the forum somehow. The profile is a good place to put this option, but Guests won't see it. If you have an idea I could help you write a mod.

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
Since it is cookies that can be generated by JavaScript for the current Web site, I suppose Chris can setup a page outside the forum, where users can change settings to their liking, then validate to write the cookie...
We just have to write this page... :-)
I wonder if Titan's code can be adapted to change the current style of code sections (ie. non-comment code), using a third cookie. I believe it is possible, I will research. I am not a Dom expert... :-)
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012

I wonder if Titan's code can be adapted to change the current style of code sections (ie. non-comment code), using a third cookie. I believe it is possible, I will research. I am not a Dom expert... :-)

That would be possible if I wrapped the entire code in another span but you could edit/override the main CSS yourself instead.

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
I mean that the script can alter the live CSS of the tr.code style... And again, I don't want a solution for me alone but something easy for all users.

An alternative to creating a Web page is to make a script to be downloaded. Perhaps easier to do, but less convenient (and harder to support all browsers).
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Right now, I'm reluctant to spend much time on more forum improvements because:

1) There doesn't seem to be a big demand to have a code-color other than the current dark blue. It's true that some people prefer brighter or darker, but it's my impression that the current setting is acceptable to at least 80% of visitors (if in doubt, more polls are always possible).

2) phpBB v3 might be adopted sometime in the next 6 months. If so some of the effort put into v2 might be wasted.

3) I'd like to focus on improving AutoHotkey itself, which has been without any major new features for about 4 months now. Of special note is the planning for version 2, which will require considerable time and concentration from anyone who chooses to participate.

Now this doesn't rule out complete, ready-made solutions that I can apply in 10 minutes and not have to worry about testing (e.g. simple scripts or PHP mods that are known to work well across browser versions).

Thanks.

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
Actually, if I even find time to implement my idea (an HTML page with JS to set cookies after some user choices), it can be hosted anywhere. Making it official can be cool, but it can go in my AutoHotkey.net account as well.
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Great. :)

holomind
  • Members
  • 341 posts
  • Last active: Aug 23 2015 03:27 PM
  • Joined: 11 Mar 2006
wouldnt it be possible to add it to the user-profile during registration for the forum?
eg: using the value "Board Style:" ???
which only changes the css for this user ?

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
It would probably be pretty easy to add, but I'm trying to postpone jobs like this until after some new features get added. However, if someone wants to create the mod, I'd be willing to apply it (if it's easy).

Thanks.

holomind
  • Members
  • 341 posts
  • Last active: Aug 23 2015 03:27 PM
  • Joined: 11 Mar 2006
i looked into the bbcode software and there is nothing which is near to vb or c++ (to simulate ahk) or similar to support code-highlight (but there is one mod to highlight php code, this mod could be used to extend it for ahk)

but i found another script which works quite good and is quite similar to the approach in this thread but much more advanced. (the colors and keywords dont fit yet but you can imagine the result when adding all keywords (eg from the isense ahk-script) and optimizing the reg-expressions. perhaps its also possible to provide a download-link near the plain-view, forcing a download as .ahk. (should be possible with some tricks)

http://www.dreamproj...taxhighlighter/

my modified version to display AHK-Code in color (within [ code ]-section of this forum, not my editor!)
looks like:
Posted Image
download ahk_syntax_highlighter_js.zip (zip containing 4 files .html , .css and 2x .js)

this script uses a list of keywords and some regular-match patterns to apply new css.

perhaps this could be used as a replace for the (code)(pre)..(/pre)(/code) hack. the process is very similar. as it uses a textarea to start with it should fallback nicely to old browsers with weak js-support.

JSLover
  • Members
  • 920 posts
  • Last active: Nov 02 2012 09:54 PM
  • Joined: 20 Dec 2004

I voted for grey (gray) comments... :-)

...omg we are seeing eye-to-eye?...did hell freeze over?...ok anyway...I voted for gray (ahem! -ay)...anything is better than green...but I really suggest 8080C0...however with the current blue & that color comment, it don't stand out much...but in my syntax highlighter I have black text & 8080C0 comments, so that works...examples...

[color=#0000a0]0000a0[/color]                   [color=#8080c0]8080c0[/color]
[color=#0000a0]msgbox, test[/color]             [color=#8080c0];comment[/color]

[color=black]black (000000)[/color]           [color=#8080c0]8080c0[/color]
[color=black]msgbox, test[/color]             [color=#8080c0];comment[/color]

[color=#0000a0]0000a0[/color]                   [color=gray]gray[/color]
[color=#0000a0]msgbox, test[/color]             [color=gray];comment[/color]

[color=darkblue]darkblue (00008b)[/color]        [color=#8080c0]8080c0[/color]
[color=darkblue]msgbox, test[/color]             [color=#8080c0];comment[/color]

[color=purple]purple (800080)[/color]          [color=#8080c0]8080c0[/color]
[color=purple]msgbox, test[/color]             [color=#8080c0];comment[/color]

[color=#8a2be2]8a2be2 (JSLurple)[/color]        [color=#8080c0]8080c0[/color]
[color=#8a2be2]msgbox, test[/color]             [color=#8080c0];comment[/color]
...um, can the bg of code (& quote) blocks be DBDBDB (DBDBDB)...light gray...my Notepad2 is light gray/DBDBDB)?

Edit: Getting the browser to remember your settings...

...is easy as pie!...

javascript:document.cookie="ahk_comm-single=color: gray[color=blue];expires=1-19-19 7:19:19pm[/color]";void(0)
javascript:document.cookie="ahk_comm-multi=color: gray[color=blue];expires=1-19-19 7:19:19pm[/color]";void(0)
...or (1-line)...

javascript:document.cookie="ahk_comm-single=color: gray[color=blue];expires=1-19-19 7:19:19pm[/color]";document.cookie="ahk_comm-multi=color: gray[color=blue];expires=1-19-19 7:19:19pm[/color]";void(0)

Hopefully someone familiar with cookies will post more details.

...hi!...:lol: :mrgreen:
Useful forum links: New content since: Last visitPast weekPast 2 weeks (links will show YOUR posts, not mine)

OMFG, the AutoHotkey forum is IP.board now (yuck!)...I may not be able to continue coming here (& I love AutoHotkey)...I liked phpBB, but not this...ugh...

Note...
I may not reply to any topics (specifically ones I was previously involved in), mostly cuz I can't find the ones I replied to, to continue helping, but also just cuz I can't stand the new forum...phpBB was soo perfect. This is 100% the opposite of "perfect".

I also semi-plan to start my own, phpBB-based AutoHotkey forum (or take over the old one, if he'll let me)
PM me if you're interested in a new phpBB-based forum (I need to know if anyone would use it)
How (or why) did they create the Neil Armstrong memorial site (neilarmstronginfo.com) BEFORE he died?

holomind
  • Members
  • 341 posts
  • Last active: Aug 23 2015 03:27 PM
  • Joined: 11 Mar 2006

...I voted for grey (gray) comments... :-)


sure grey ;) but did you realize there are more colors than blue and gray. something called "syntax-highlighting" and not only "black-text + green/gray-comments".
(functions, brackets, numbers, strings, keywords, etc. ?)

welcome in the world of colors and not only 2bit blue/grey ;)
the image above is from "web-browser" (code)..(/code) section, not my code-editor! (you should try the zip to see it yourself).

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
holomind, if you follow the other topic, you will see that Chris isn't hot to do full syntax highlighting in JS... And I agree, even simple comment coloring takes some time on modern computers, and last forever on older ones... Plus the JS file will get very big, and doing proper highlighting of AutoHotkey isn't as easy as it sound (certainly not with just a bunch of regexes).

JSLover, I found a while back the expires keyword, along with the domain one which can be handy for those going to the de.AutoHotkey.com forum too...
I thought the dates should be in GMT format, something looking like "expires=Sun, 01 Apr 1900 01:23:45 GMT". What is your format, and is it accepted by all browsers? Anyway, I will use the JS toGMTString() function, so the format will be always OK.
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")