" tags and the highlighting is generated 'server side'. With forums where syntax highlighting is extensively used, it wo..."> " tags and the highlighting is generated 'server side'. With forums where syntax highlighting is extensively used, it wo...">
Previous Thread
Next Thread
Print Thread
Hop To
#188600 06/24/2007 7:11 PM
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD
Offline
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.

SD #188605 06/24/2007 8:06 PM
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
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...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Gizmo #188630 06/25/2007 12:11 AM
Joined: Jun 2006
Posts: 196
I
enthusiast
enthusiast
I Offline
Joined: Jun 2006
Posts: 196
Originally Posted by Gizmo
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
SD
Offline
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.

SD #188632 06/25/2007 12:38 AM
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
But you can reply, you can login, you can use the basic underlying system, without Javascript being enabled...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Gizmo #188635 06/25/2007 12:51 AM
Joined: Jun 2006
Posts: 196
I
enthusiast
enthusiast
I Offline
Joined: Jun 2006
Posts: 196
actually you can't post.

(Boy, that really ruined your reasoning, didn't it? tongue )

Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
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...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 196
I
enthusiast
enthusiast
I Offline
Joined: Jun 2006
Posts: 196
I think UBB.Threads should detect IE4 and delete your account

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD
Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
i'm for ie 5.5 laugh (no seriously though)..

Giz, js is inevitable. you're advocating an AJAX registration and probably tons other Ajax stuff..

i know you realize what the J in Ajax really is wink

and you do realize that the < and > and & characters are replaced, so there is no possibility of hax0ring there wink

SD #188642 06/25/2007 3:25 AM
Joined: Jun 2006
Posts: 1,344
G
veteran
veteran
G Offline
Joined: Jun 2006
Posts: 1,344
I say IE all together tongue

Last edited by gliderdad; 06/25/2007 3:25 AM.
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
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...



I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
I have a solution, lets have an agent tracker ban IE from loading the new post page, shoutbox, quick reply, and everything else :x


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 1,344
G
veteran
veteran
G Offline
Joined: Jun 2006
Posts: 1,344
Lets do it it. I already denied any new aol user from registering tongue

Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
been there, done that... though i banned ip classes vs email addrs...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 1,344
G
veteran
veteran
G Offline
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,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
It was an abuse deterrant for us; we just banned their proxy ranges and where done with it wink... thats a lotta banning!


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 1,344
G
veteran
veteran
G Offline
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,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
rofl, thats really sad, that AOL bans your site that you work at because the site staff are on aol and over quota...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 1,344
G
veteran
veteran
G Offline
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 laugh

Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
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."


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jul 2006
Posts: 4,057
Joined: Jul 2006
Posts: 4,057
Hey i got the same with MSN Live mail too wink
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 wink


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Lol I'd like to see a way to enter a domain and remove notification emails for all users using that domain...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
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,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Domain blacklisting would be so much fun lol... I may make a drop in (non-mod) to do this just for giggles wink...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 1,344
G
veteran
veteran
G Offline
Joined: Jun 2006
Posts: 1,344
Originally Posted by Gizmo
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.
Originally Posted by Mark S
Hey i got the same with MSN Live mail too wink
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 wink
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
SD
Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
hrm what was this topic about again? :shrug:

SD #188718 06/25/2007 7:33 PM
Joined: Jul 2006
Posts: 4,057
Joined: Jul 2006
Posts: 4,057
Syntax highlighting - Oops i blame gizmo smile


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Yeh, i can derail any topic wink


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 1,344
G
veteran
veteran
G Offline
Joined: Jun 2006
Posts: 1,344
Me too, sorry :X

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD
Offline
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.

Clicky

I at first thought he was using their stuff, but when it came down to it, they decided to use HIS.

He must be proud. wink

SD #188762 06/26/2007 12:28 AM
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
.... 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):
Quote
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.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Gizmo #188765 06/26/2007 12:36 AM
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.

Gizmo #188766 06/26/2007 12:37 AM
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD
Offline
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! wink

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 wink

ps: on a side note, i wonder if he has a brother with 1st name Michail (gorbachev) laugh

SD #188767 06/26/2007 1:00 AM
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
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:


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
PS, i'd rather be referanced as stalin than gorbichav...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD
Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
i was talking about the author: Alex Gorbachev wink

you are simply the Giz

SD #188770 06/26/2007 2:09 AM
Joined: Aug 2006
Posts: 1,358
Y
Veteran
Veteran
Y Offline
Joined: Aug 2006
Posts: 1,358
Originally Posted by Sirdude
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.


[Linked Image from siemons.org]
Joined: Jun 2006
Posts: 196
I
enthusiast
enthusiast
I Offline
Joined: Jun 2006
Posts: 196
Originally Posted by Gizmo
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,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Now theres a sugguestion I can get behind, code tag spoilers with on-demand highlighting...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
0 members (), 868 guests, and 467 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)