MOD: Select All Code 1.0 - Postet den (2587 Views)
Average Member
SiSL
Innlegg: 671
671
Select All Code Mod 1.0
This mod allows users to select a code in [code] tags easily. Works with unlimited number of code tags even in a single post without adding any extra load to your pages. Implementation is very easy. Just copy a JS file in your forum, add a few lines to inc_header.asp and change 4 lines of code in inc_func_common.asp

Entire installation instructions are at Readme.html file in zip:

Download Select All Code Mod

Sample Screenshot:
NOTE: Following screenshot is modified style version of this mod. You can also modify it based on your forum style and taste from inc_header.asp where basic CSS tags added required for this mod.
   
 Sidestørrelse 
Postet den
Forum Admin
HuwR
Innlegg: 20611
20611
I implemented it on a copy of the code here, will tweak the styles a little and then copy the files across, I did however change where I inserted the code into inc_header.asp

in your readme you say to add it after line 91, that is incorrect, that section only gets dispalyed if there is an error with the dbtype it needs adding after line 222
Postet den
Average Member
SiSL
Innlegg: 671
671
Postet den
Forum Admin
HuwR
Innlegg: 20611
20611
you can take a peak here http://forum.snitz.com/forum_3407/topic.asp?TOPIC_ID=68511

will copy the changes over later, just off to make dinner
Postet den
Average Member
SiSL
Innlegg: 671
671
Looks great :) Updated current, added 4px padding in DT portion on top of other changes you did, to have a bit more loose look there :)
Postet den
Forum Admin
HuwR
Innlegg: 20611
20611
the scroll bars and max-height stuff works ok in FF, but for some reson is not working in IE (any version, not sure why as it normally works fine in IE7 and IE8, will have to have another look later)
Postet den
Average Member
SiSL
Innlegg: 671
671
Originally posted by HuwR
the scroll bars and max-height stuff works ok in FF, but for some reson is not working in IE (any version, not sure why as it normally works fine in IE7 and IE8, will have to have another look later)

it may because use of height, max-height together and not in PRE but on DD; with IE, I use such:

.code { min-height: 40px; }
.code dd { max-height: 300px; overflow: auto; /* no other height modification */ }
.code dd pre { display: block; /* no height modificiation */ }

So I limit max-height from DD but not giving any particular height to it, also min-height to main container.
That's why I say PRE is a PITA element, along with "<select>" that W3C is frowned upon. (If that does not work, it may be one of reasons I passed to CODE, been long)

Postet den
Forum Admin
HuwR
Innlegg: 20611
20611
height is for IE6, since IE6 doesn't respect max-height smile that is why there is a height: auto !important IE>6 and FF should use that instead of height:200px;
Postet den
Average Member
SiSL
Innlegg: 671
671
Yeah, however, using height: and max-height at same line, alerts IE8 as "this site should be used in compatible mode" , even for "overflow: scroll" which worked in IE6 eheh.. So I decided, I either code another CSS file for IE6 only, or let IE6 users dont have scrolls, since they should upgrade if they are not using it for business-applications... :)

I just hope with Win7, number of IE6 goes lower. My site has quite range from not only computer geeks but general (around 100-150k visits a day) so I can safely say there is still 30% IE6 users.
Postet den
Forum Admin
HuwR
Innlegg: 20611
20611
I doubt very much that Win7 will make that much difference, the problem is mainly one of cost and time, we have over 1000 PC's running XP and IE6, ( some of us the developers and IT community ~ 100 are allowed to use browsers other than IE6) but the cost in licensing and time to move everyone to win7 will just be too prohibitive, and that will be the same for everyone)

I will try seperating the styles into a CSS file as that seems to work ok in the .net version and the only difference is it is in an external css file

[rant]you can't just forget about 30% of your users, so support for IE6 is important, as is supporting IE7/8 and FF[/rant]
Postet den
Forum Admin
HuwR
Innlegg: 20611
20611
the size problem was caused by not having a doctype for the Snitz pages
Du må legge inn en melding