|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
Currently we have the "< php >" tags and the highlighting is generated 'server side'. With forums where syntax highlighting is extensively used, it would not only be nice to offload the server to the client side (php vs javascript), but to also add more than just php code as that being highlighted. There are .js libs out there to do the trick and they fall into various categories. Most important of which is licensing (FREE to use and add to commercial product). Two products (and there probably are more) that come to mind are: http://softwaremaniacs.org/soft/highlight/en/ (ty Ian) http://code.google.com/p/syntaxhighlighter/both fit the 'FREE' category. one being a short license blurb allowing it and the other with a full on GNU Lesser glob. This would be simple to add to the <? button as a dropdown to generate the appropriate class tags, allowing for all kinds of highlighting that is accomplished on the clients' machines. Thanks to Ian Spence for this idea.
|
|
|
|
Joined: Jun 2006
Posts: 16,373 Likes: 129
|
Joined: Jun 2006
Posts: 16,373 Likes: 129 |
I do like the idea of expanding on resource highlighting, but I'd like to sugguest we keep the php syntax highlighter as is as who's to say the user is going to have javascript enabled in the first place?
The benefit of server-side is that you don't have to depend on user security settings to relay the same content and have it appear as it should...
|
|
|
|
Joined: Jun 2006
Posts: 196
enthusiast
|
enthusiast
Joined: Jun 2006
Posts: 196 |
I do like the idea of expanding on resource highlighting, but I'd like to sugguest we keep the php syntax highlighter as is as who's to say the user is going to have javascript enabled in the first place?
The benefit of server-side is that you don't have to depend on user security settings to relay the same content and have it appear as it should... it should just be assumed that javascript is enabled, since it's pretty impossible to use the board to it's full potential without it anyway. You can't upload files, make polls, use the shoutbox, use any dropdown menus, preview your post, use quick reply, etc.
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
i agree. the days of having to degrade to a non .js and even non .css environment should be over.
|
|
|
|
Joined: Jun 2006
Posts: 16,373 Likes: 129
|
Joined: Jun 2006
Posts: 16,373 Likes: 129 |
But you can reply, you can login, you can use the basic underlying system, without Javascript being enabled...
|
|
|
|
Joined: Jun 2006
Posts: 196
enthusiast
|
enthusiast
Joined: Jun 2006
Posts: 196 |
actually you can't post. (Boy, that really ruined your reasoning, didn't it? )
|
|
|
|
Joined: Jun 2006
Posts: 16,373 Likes: 129
|
Joined: Jun 2006
Posts: 16,373 Likes: 129 |
That really sucks... You'd think at least THAT wouldn't rely on javascript... Looks like I'll never be posting on a UBB.T7 forum from my PDA running IE4 and it's crappy implimentation of life...
|
|
|
|
Joined: Jun 2006
Posts: 196
enthusiast
|
enthusiast
Joined: Jun 2006
Posts: 196 |
I think UBB.Threads should detect IE4 and delete your account
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
i'm for ie 5.5 (no seriously though).. Giz, js is inevitable. you're advocating an A JAX registration and probably tons other Ajax stuff.. i know you realize what the J in Ajax really is and you do realize that the < and > and & characters are replaced, so there is no possibility of hax0ring there
|
|
|
|
Joined: Jun 2006
Posts: 1,344
veteran
|
veteran
Joined: Jun 2006
Posts: 1,344 |
I say IE all together
Last edited by gliderdad; 06/25/2007 2:25 AM.
|
|
|
|
Joined: Jun 2006
Posts: 16,373 Likes: 129
|
Joined: Jun 2006
Posts: 16,373 Likes: 129 |
I know what the AJAX is, and I do feel it is the future, however I do also enjoy catering for users who don't have the ability to utilize such "new fangled toys"... You'd think something as simple as at least viewing posts wouldn't have to require js :x...
|
|
|
|
Joined: Jun 2006
Posts: 16,373 Likes: 129
|
Joined: Jun 2006
Posts: 16,373 Likes: 129 |
I have a solution, lets have an agent tracker ban IE from loading the new post page, shoutbox, quick reply, and everything else :x
|
|
|
|
Joined: Jun 2006
Posts: 1,344
veteran
|
veteran
Joined: Jun 2006
Posts: 1,344 |
Lets do it it. I already denied any new aol user from registering
|
|
|
|
Joined: Jun 2006
Posts: 16,373 Likes: 129
|
Joined: Jun 2006
Posts: 16,373 Likes: 129 |
been there, done that... though i banned ip classes vs email addrs...
|
|
|
|
Joined: Jun 2006
Posts: 1,344
veteran
|
veteran
Joined: Jun 2006
Posts: 1,344 |
I didnt want to go that far with it. It's there own fault if they want to view through AOL ;P
|
|
|
|
Joined: Jun 2006
Posts: 16,373 Likes: 129
|
Joined: Jun 2006
Posts: 16,373 Likes: 129 |
It was an abuse deterrant for us; we just banned their proxy ranges and where done with it ... thats a lotta banning!
|
|
|
|
Joined: Jun 2006
Posts: 1,344
veteran
|
veteran
Joined: Jun 2006
Posts: 1,344 |
Well cant do that yet since the owner of the site was using aol until today, and the other admin is on aol along with a few mods.When aol rejects emails from our site because it was over their quota, see ya later.
|
|
|
|
Joined: Jun 2006
Posts: 16,373 Likes: 129
|
Joined: Jun 2006
Posts: 16,373 Likes: 129 |
rofl, thats really sad, that AOL bans your site that you work at because the site staff are on aol and over quota...
|
|
|
|
Joined: Jun 2006
Posts: 1,344
veteran
|
veteran
Joined: Jun 2006
Posts: 1,344 |
Well with the members who have a bunch of watched topics, posts, users, etc and are set to get emails thats were the problem is. Aol received over 300 emails in a matter of minutes from our site. They consider that spam and they auto lock the domain for 24 hours. And when I told them the emails were subscription from my members, I was told basically oh well, wee will reopen you in 24 hours. So I got all the rejected emails from aol sent back to me on top of the sever emailing me saying the messages cannot be sent but will try every hour for the next 5 days. Man did that cause some back up in the mail system. So I am no longer taking registrations from aol
|
|
|
|
Joined: Jun 2006
Posts: 16,373 Likes: 129
|
Joined: Jun 2006
Posts: 16,373 Likes: 129 |
I figure you'd turn off all watched topics and post on your forum "all watched topic have been turned off, if you're an AOL user, please leave them that way due to abuse; if you're not an aol user you'll need to re-enable your watched topics."
|
|
|
|
Joined: Jul 2006
Posts: 4,057
|
Joined: Jul 2006
Posts: 4,057 |
Hey i got the same with MSN Live mail too Blocked my server and though it was spam. No one could send e-mails to msn accounts. And i had to fill in a HUGE please dont block me application form for them. And waited 24hrs and were allowed back in. Ricks addressing the e-mails in v7.3
BOOM !! Version v7.6.1.1 People who inspire me Isaac ME Gizmo
|
|
|
|
Joined: Jun 2006
Posts: 16,373 Likes: 129
|
Joined: Jun 2006
Posts: 16,373 Likes: 129 |
Lol I'd like to see a way to enter a domain and remove notification emails for all users using that domain...
|
|
|
|
Joined: Jul 2006
Posts: 4,057
|
Joined: Jul 2006
Posts: 4,057 |
i would like that too or an sql fix to turn off *@hotmail.com accounts watched stuff only.
Hey not funny, i didn't even know it had happened until my clients said.
BOOM !! Version v7.6.1.1 People who inspire me Isaac ME Gizmo
|
|
|
|
Joined: Jun 2006
Posts: 16,373 Likes: 129
|
Joined: Jun 2006
Posts: 16,373 Likes: 129 |
Domain blacklisting would be so much fun lol... I may make a drop in (non-mod) to do this just for giggles ...
|
|
|
|
Joined: Jun 2006
Posts: 1,344
veteran
|
veteran
Joined: Jun 2006
Posts: 1,344 |
Lol I'd like to see a way to enter a domain and remove notification emails for all users using that domain... I agree with that. Hey i got the same with MSN Live mail too Blocked my server and though it was spam. No one could send e-mails to msn accounts. And i had to fill in a HUGE please dont block me application form for them. And waited 24hrs and were allowed back in. Ricks addressing the e-mails in v7.3 We did that as well a few years back with AOL for the same thing, guess they didn't care any more. Back then they were a big browser, we had over 2,000 aol members so we couldn't do what I did back then. Now I am down to about 400 aol users and I will be pruning those soon.
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
hrm what was this topic about again? :shrug:
|
|
|
|
Joined: Jul 2006
Posts: 4,057
|
Joined: Jul 2006
Posts: 4,057 |
Syntax highlighting - Oops i blame gizmo
BOOM !! Version v7.6.1.1 People who inspire me Isaac ME Gizmo
|
|
|
|
Joined: Jun 2006
Posts: 16,373 Likes: 129
|
Joined: Jun 2006
Posts: 16,373 Likes: 129 |
Yeh, i can derail any topic
|
|
|
|
Joined: Jun 2006
Posts: 1,344
veteran
|
veteran
Joined: Jun 2006
Posts: 1,344 |
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
I was fooling around with the yui (yahoo UI library), that will be used in the next next release and noticed that they used the syntax highlighter that i mentioned in the first post. ClickyI at first thought he was using their stuff, but when it came down to it, they decided to use HIS. He must be proud.
|
|
|
|
Joined: Jun 2006
Posts: 16,373 Likes: 129
|
Joined: Jun 2006
Posts: 16,373 Likes: 129 |
.... ok, so i do like the line numeration and ability to specify your own colors... :cracks: However, I do NOT like this (off of their wiki): Performance SyntaxHighlighter uses regular expressions to parse the text. It's not extremely fast, in fact, it's pretty slow. If you are trying to highlight a few dozens lines of code, you won't see any problems. Trying to highlight 10kb worth of text will result in JavaScript being aborted because of long execution time.
|
|
|
|
Joined: Nov 2006
Posts: 3,095 Likes: 1
Carpal Tunnel
|
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095 Likes: 1 |
No like that, we post a LOT of code.
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
hehe, i think it would be quite easy to limit the size of the data being parsed per post. so that would save the javascript abort. and in normal use (at least in the threads forums where i already use it), people don't paste more than a page or two of code at a time, which the .js code (from what i see) handles in chunks between pre's or textareas. so the fear of having a long thread with 2 pages each per post breaking it probably isn't totally scary. matter of fact i just tried it on my test forum with 20 large copy/pastes of differing code types in one thread and it handles it, albeit perceptibly slowly (1-2 seconds to finally hump through all 20 posts) and also, that 2 seconds was ALL (huge percent) client time. imagine the server (php) having to do the same and serving it up to 100 users at a whack! but i will grant you that it might be slow on huge stuff. i'm glad you read his wiki and found that out. it's good info to take into account, when evaluating ps: on a side note, i wonder if he has a brother with 1st name Michail (gorbachev)
|
|
|
|
Joined: Jun 2006
Posts: 16,373 Likes: 129
|
Joined: Jun 2006
Posts: 16,373 Likes: 129 |
See, that javascript abort is the problem... for coding communities, people post WELL MORE than 10k per thread... Think, it's not just PER POST, it's per page...
Then you bring it to say "view all posts in this thread", posting numersous lines of code... you're aborting all code highlighting...
Ahh, whats that I hear, oh yes, me finding another reason why to handle things that CAN be done server-side being done server site :flex:
|
|
|
|
Joined: Jun 2006
Posts: 16,373 Likes: 129
|
Joined: Jun 2006
Posts: 16,373 Likes: 129 |
PS, i'd rather be referanced as stalin than gorbichav...
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
i was talking about the author: Alex Gorbachev you are simply the Giz
|
|
|
|
Joined: Aug 2006
Posts: 1,360 Likes: 1
Veteran
|
Veteran
Joined: Aug 2006
Posts: 1,360 Likes: 1 |
Currently we have the "< php >" tags and the highlighting is generated 'server side'. I don't see this as a big problem, since the syntax highlighting just needs to be done once when putting the message in the database.
|
|
|
|
Joined: Jun 2006
Posts: 196
enthusiast
|
enthusiast
Joined: Jun 2006
Posts: 196 |
See, that javascript abort is the problem... for coding communities, people post WELL MORE than 10k per thread... Think, it's not just PER POST, it's per page...
Then you bring it to say "view all posts in this thread", posting numersous lines of code... you're aborting all code highlighting...
Ahh, whats that I hear, oh yes, me finding another reason why to handle things that CAN be done server-side being done server site :flex: The problem is that server's have execution times as well. If the php script times out, the post never gets made. If the javascript times out, you get unhighlighted text. Honestly, I think there should be a button similar to the spoiler button that does the highlighting at request instead of by default.
|
|
|
|
Joined: Jun 2006
Posts: 16,373 Likes: 129
|
Joined: Jun 2006
Posts: 16,373 Likes: 129 |
Now theres a sugguestion I can get behind, code tag spoilers with on-demand highlighting...
|
|
|
1 members (Morgan),
69
guests, and
100
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|