|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
[ php ] tags
Some character sequences in PHP code (e.g. : ( without the spaces) are being replaced by smilies.
Further I would like to see a tag for other languages besides PHP, eg a general [ code ] tag for fi javascript. You don't need to highlight these code, but can simply put in in between <pre> tags. |
|
#2
|
|||
|
|||
|
RE: [ php ] tags
but we already have [code] tags. in fact, they where here before [php] tags.
(in fact, someone suggested coloring code inside [code] tags as if it was php, and i suggested a new set of tags, just for php code, since php is the main topic of this site, and there should be a general [code] tag.. so..) |
|
#3
|
|||
|
|||
|
RE: [ php ] tags
test:
Code:
var allowedTags;
function strip_tags(strString, allowed) {
allowedTags = allowed.toLowerCase();
strString = strString.replace(/</?([a-z]+)(>|.*?[w'" /]>)/gi, function($0, $1, allowedTags) { return check_allowed($0, $1); } );
return strString;
}
function check_allowed(fullmatch, tag) {
var reg = new RegExp('<'+tag.toLowerCase()+'>');
if (allowedTags.match(reg)) return fullmatch;
return '';
}
to be honest: I had no idea this tag existed, I think it is rarely used and I haven't found a faq with an overview of all available tags and such on this forum yet (but I might be looking with my nose). anyway, this is still messing up my layout; I would prefer to have it between <pre>, and also between [ code ] smilies shouldn't be parsed: Code:
document.write(':(');
|
|
#4
|
|||
|
|||
|
RE: [ php ] tags
When you go to post (or reply) a message, there is a link to the left of the message textarea entitled 'eF Code & Smilies Guide'. This will show you the tags.
As for smilies being parsed in code tags, I agree. I will look into it. About the <pre> tags. I specifically don't use those. The reason being is that people tend to post code that has very long lines. This makes the layout of the entire site unusable for that thread. So, I allow the breaking of lines to make sure the layout stays intact.... |
|
#5
|
|||
|
|||
|
RE: RE: [ php ] tags
Quote:
yes, but now my indenting is gone, which makes it a whole less readable. An alternative would be to place a div with a fixed width and with the overflow property set to auto, which will generate a scrollbar in case of long code. As a bonus you could also add linenumbers! ;) Thanks for showing me where to find the codes, I've overlooked it more than 300 times |
|
#6
|
|||||
|
|||||
|
RE: [ php ] tags
Testing indent....
php Code:
|
|
#7
|
|||
|
|||
|
RE: [ php ] tags
I agree with the ident...seems that my php tags do the indent...i believe they convery spaces to non-breaking spaces...i'll look into correcting the ident problem with the normal code tag...
As for a div and adding line numbers, etc...I know I shouldn't worry about netscape 4...but I still do...I can't help it ;) |
|
#8
|
|||
|
|||
|
RE: [ php ] tags
Netscape 4 should have been burried and forgotten a long time ago. What is it with those version 4 browsers having a lifespan so much longer than their ancestors?
Honestly, I gave up NS4 support already two years ago and it made my life so much easier ;) I do hope you can fix the problem with the indenting, now I'm mostly misusing the [ php ] tag to get my code straight ;) |
![]() |
| Viewing: Codewalkers Forums > Forum Information > Suggestions & Feedback > [ php ] tags |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|