Click to See Complete Forum and Search --> : [code] suggestion


aaron.martinas
03-24-2008, 10:03 AM
i would love to see either a client-side algorithm (which would of course reduce server burden) or a server side implementation which, at least in advanced post mode, counts the number of greater and less than signs. if it is more than say 4, and the phrase and are not found in the post, warn the user that they are about to commit terrorism and highly encourage them to rethink their actions.

chazzy
03-24-2008, 11:18 AM
i would love to see either a client-side algorithm (which would of course reduce server burden) or a server side implementation which, at least in advanced post mode, counts the number of greater and less than signs. if it is more than say 4, and the phrase and are not found in the post, warn the user that they are about to commit terrorism and highly encourage them to rethink their actions.

Ummm.. I'm pretty sure that not using [code] tags won't result in a terrorist action anyways.

aaron.martinas
03-24-2008, 11:30 AM
you've expeditiously failed.

JPnyc
03-24-2008, 11:44 AM
I actually prefer reading code that isn't in code tags. At least I can see the entire thing without scrolling.

aaron.martinas
03-24-2008, 11:53 AM
yea, but now the page explodes in size (most of the time) due to vertical scrolling. and then readability is diminished when random parts of the code turn into smiley faces.

but hey, not all outstanding, excellent ideas are well received. but they stand for themselves.

David Harrison
03-24-2008, 05:31 PM
Reading code in [code] tags is far easier, yeah there's some scrolling, but at least all the characters line up and all spaces are non-breaking so that the indentations are all still there.

It also should be a relatively easy thing to write for the client side, so if you decide to go for it JP, I'll volunteer to write it.

WebJoel
03-24-2008, 06:10 PM
I sometimes use my uber-moderator powers to add [code] or [html] or (more rarely, as I seldom visit the forum), [php] tags to user's posts with EDIT, -if nothing else, to prevent long javascript lines that have no 'whitespace' and force horizontal scroll on browsers. And I have noticed some SIGs that seem a bit oppressive towards nameless postees whom fail to use appropriate delimter tags for appropriate code snippettes posted...

And the color-coding is kinda nice too... make spotting the errors/warnings easier.

aaron.martinas
03-24-2008, 06:36 PM
ahhhhhhhhhhhh

chazzy
03-24-2008, 06:54 PM
ahhhhhhhhhhhh

I still don't understand why I failed.

aaron.martinas
03-24-2008, 08:46 PM
it's not a question of why, but rather how.

expeditiously.

scragar
03-24-2008, 09:13 PM
function test_code(ele){
var x = document.getElementById(ele).value;
if(x.match(/(.*[<>]){4}/))
if(! x.match(/\[(php|code|html)\].*\[\/\1\]/))
return confirm('you look to be submiting some code without using any of the forums many code related tags, are your sure you wish to continue?');
return true;
};works in theory, and for these forums it would be called as:
test_code('vB_Editor_QR_textarea')

I should test it first though.

edited(and fixed) version:
function test_code(){
var x, i, l = arguments.length;
for(i = 0; i < l; i++)
if(x = document.getElementById(arguments[i]))
break;
x = x.value;
if(x.match(/(.*[<>]){4}/))
if(! x.match(/\[(php|code|html)\].*\[\/\1\]/))
return confirm('you look to be submiting some code without using any of the forums many code related tags, are your sure you wish to continue?');
return true;
};
alert(test_code('vB_Editor_QR_textarea', 'vB_Editor_001_textarea'));

JPnyc
03-25-2008, 07:59 AM
We're not in favor of forcing formatting on users. If you don't want to read unformatted code, you don't have to.

aaron.martinas
03-25-2008, 10:24 AM
this wouldnt be forcing. this would be suggesting. and based on responses i see (from mods no less, ahhh) they would agree that a reminder would be appropriate.

it is obvious that you "dont have to read the code", but that is somewhat counterproductive considering the scope of this forum. but i can see the beligerent stubbornness forming, and this outstanding idea which arguably has no negative side effects will remain unimplemented.

what a shame. and for no good reason, either.

WebJoel
03-26-2008, 07:32 AM
You could always create your own forum (and install vBulletin or whatever) and make it whatever you want it to be.. :)

http://www.**********.com/

aaron.martinas
03-26-2008, 10:53 AM
thus defeating the purpose of the suggestion forum..

JPnyc
03-26-2008, 11:39 AM
No, the purpose of the suggestion forum was served. A suggestion was made, and it was heard. That's it's purpose.

WebJoel
03-26-2008, 11:53 AM
thus defeating the purpose of the suggestion forum.. Well your suggestion is getting alot of discussion in the private 'moderator's forum', I assure you. I have stepped-back from the conversation as it's a bit out of my league. :o
Whether or not your suggestion is ever implemented or not is another matter. Not every suggestion can be implemented despite the perceived or expected merits. Your suggestion is not being defeated or ignored. It may not be used, but it is not being ignored.
Myself, I would like to see TABLEs not used here for the layout of this forum as I feel that it would GREATLY speed-up the time it takes for any pages to resolve upon the screen and stop that particular 'jerking around' that TABLE-based layout is known for as they are being read and populated to the screen. Even at my T1-speed, I often have to wait 3 or 4 seconds for any page to resolve here before I can begin typing comments, lest the 'comment field' jump out from underneith my insertion-point for the text... (a bit difficult to explain but I'm sure that we've all seen this anomoly here).

But non-TABLE based re-do here brings up some monumentous, insurmountable legacy issues with the archives and probably over a decade's worth of posts would have to be handled as well so that idea was effectively shelved and labled 'hands off' for the immediate time being. :o

edit: I see JP was here and posted while I was typing.

JPnyc
03-26-2008, 12:03 PM
Well the tables are part of the vbulletin software, and since forums are basically tabular data, it shouldn't really be any other way. As for the other page elements, there's an argument for not using tables there.

WebJoel
03-26-2008, 04:43 PM
Yes. :) That is the part that I was referring to. I had asked this before (and jokingly suggested that I'd want to be on that team that tries), and received my answer, -of which I abide. :) Alot of this forum is 'tablular' and as such, is fine as-is. I was happy to have been heard and nothing more. Thnx.

aaron.martinas
03-26-2008, 05:41 PM
Well your suggestion is getting alot of discussion in the private 'moderator's forum', I assure you.

I appreciate that. Based on JPs comments, it seemed dead in the water based on personal (rather than professional) perception of usefulness. I certainly took exception to the "make your own forum" comment. I'd expect that in a less mature setting. It had "We don't care, so go somewhere else and shut up" overtones.

JPnyc
03-26-2008, 06:40 PM
I think it was certainly more controlled and polite than

this wouldnt be forcing. this would be suggesting. and based on responses i see (from mods no less, ahhh) they would agree that a reminder would be appropriate.

it is obvious that you "dont have to read the code", but that is somewhat counterproductive considering the scope of this forum. but i can see the beligerent stubbornness forming, and this outstanding idea which arguably has no negative side effects will remain unimplemented.

what a shame. and for no good reason, either.
Which suggests that if YOU can't see a good reason, there CAN BE none. Anyway, this matter has been heard, decided upon and this thread is closed.

WebJoel
03-26-2008, 06:44 PM
... I certainly took exception to the "make your own forum" comment. I'd expect that in a less mature setting. ... Lost in translation friend, for I offered that sincerely and with respect. If I had intended to slight you, there would be no misunderstanding of my intent. However, as a volunteer here, I guess that I am also representing JupiterMedia so if I cannot 'speak nice' to postees, I am duty-bound to refrain from speaking at all. In fact, as a 'volunteer' here in the 'super moderator' position, I am not even obligated to reply to posts. My 'duties' are to monitor posts for agressive posts, spam, abuse, and etc., with supervised discretionary permissions to 'lock threads' that are getting out of control, and not approve certain posts that are 'held' in moderation pending a review..

The undertaking you proposed is so great and those here whom run the forum maybe do not wish to tackle such a goliath at this time. What they currently have, seems to work. I merely meant that if you have the skills needed and could gather enough like-minded individuals together, you could re-create a web-coding forum in the image that you think it should be. We have a saying: "Build a better mousetrap and the world will beat a path to your door".
I have considered something similar myself , -creating my own forum, (not for web coding, but another subject near & dear to my hobbies). *I* just don't quite have enough skills yet to pull it off. :o It might be nice to know a few people whom have done this thing, before I try it..