|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
you don't want to have to deal with the [`code] and [`php] scrollbars that occur, when the pasted content exceeds 150px in height (hardwired in ubbthreads.inc.php) and the css for the style you are using has a width that isn't fluid. just do this: go to your firefox profile/chrome directory .. Linky Poo <-- locate where your profile is edit a file and call it 'userContent.css' (you'll already see one in there named 'userContent.css-example' that came with the FF install. simply paste the following in there:
.ubbcode-block, .ubbcode-header, .ubbcode-body {
width: auto ! important;
height: auto ! important;
}
*poof* scroll bars gonzo. there is also a solution for Opera that i know of too, but i won't include that here. only apply this IF you are a firefox user and you don't want scroll bars and you are slightly geeky . it doesn't do anything else than that. ps: you have to restart FF for it to take effect
|
|
|
|
Joined: Nov 2006
Posts: 3,095 Likes: 1
Carpal Tunnel
|
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095 Likes: 1 |
Let's give it a try and see how it works. Break On
"Memory info on local computer:" ?
"Location Capacity Speed" ?
For each $memModule in PhysicalMemoryInfo('msea001')
$memModule[0] chr(9) chr(9) $memModule[1] chr(9) chr(9) $memModule[4] ?
Next
? "Done."
get $
Function PhysicalMemoryInfo(optional $sComp)
dim $fF,$mT,$oWMI,$oM,$tMem[0]
if not $sComp
$sComp = "."
endif
$fF="Unknown","Other","SIP","DIP","ZIP","SOJ","Proprietary","SIMM","DIMM","TSOP","PGA",
"RIMM","SODIMM","SRIMM","SMD","SSMP","QFP","TQFP","SOIC","LCC","PLCC","BGA","FPBGA","LGA"
$mT="Unknown","Other","DRAM","Synchronous DRAM","Cache DRAM","EDO","EDRAM","VRAM","SRAM",
"RAM","ROM","Flash","EEPROM","FEPROM","EPROM","CDRAM","3DRAM","SDRAM","SGRAM","RDRAM","DDR"
$oWMI = GetObject("winmgmts:\\" + $sComp + "\root\cimv2")
if @error exit @error endif
For each $oM in $oWMI.ExecQuery("Select * from Win32_PhysicalMemory",,48)
$tMem[ubound($tMem)]=$oM.DeviceLocator,1 * $oM.Capacity / 1048576,
$fF[$oM.FormFactor], $mT[$oM.MemoryType], $oM.Speed,$oM.DataWidth
redim preserve $tMem[ubound($tMem)+1]
Next
if 0<ubound($tMem)
redim preserve $tMem[ubound($tMem)-1]
endif
$PhysicalMemoryInfo=$tMem
EndFunction
Looking sweet in preview mode. Thanks SD looks great when posted for me
Last edited by ntdoc; 07/16/2007 6:04 PM.
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
you're welcome nt
|
|
|
|
Joined: Nov 2006
Posts: 3,095 Likes: 1
Carpal Tunnel
|
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095 Likes: 1 |
Test 2 Break On
"Memory info on local computer:" ?
"Location Capacity Speed" ?
For each $memModule in PhysicalMemoryInfo('msea001')
$memModule[0] chr(9) chr(9) $memModule[1] chr(9) chr(9) $memModule[4] ?
Next
? "Done."
get $
Function PhysicalMemoryInfo(optional $sComp)
dim $fF,$mT,$oWMI,$oM,$tMem[0]
if not $sComp
$sComp = "."
endif
$fF="Unknown","Other","SIP","DIP","ZIP","SOJ","Proprietary","SIMM","DIMM","TSOP","PGA",
"RIMM","SODIMM","SRIMM","SMD","SSMP","QFP","TQFP","SOIC","LCC","PLCC","BGA","FPBGA","LGA"
$mT="Unknown","Other","DRAM","Synchronous DRAM","Cache DRAM","EDO","EDRAM","VRAM","SRAM",
"RAM","ROM","Flash","EEPROM","FEPROM","EPROM","CDRAM","3DRAM","SDRAM","SGRAM","RDRAM","DDR"
$oWMI = GetObject("winmgmts:\\" + $sComp + "\root\cimv2")
if @error exit @error endif
For each $oM in $oWMI.ExecQuery("Select * from Win32_PhysicalMemory",,48)
$tMem[ubound($tMem)]=$oM.DeviceLocator,1 * $oM.Capacity / 1048576,
$fF[$oM.FormFactor], $mT[$oM.MemoryType], $oM.Speed,$oM.DataWidth
redim preserve $tMem[ubound($tMem)+1]
Next
if 0<ubound($tMem)
redim preserve $tMem[ubound($tMem)-1]
endif
$PhysicalMemoryInfo=$tMem
EndFunction
do some more code....
Break On
"Memory info on local computer:" ?
"Location Capacity Speed" ?
For each $memModule in PhysicalMemoryInfo('msea001')
$memModule[0] chr(9) chr(9) $memModule[1] chr(9) chr(9) $memModule[4] ?
Next
? "Done."
get $
Function PhysicalMemoryInfo(optional $sComp)
dim $fF,$mT,$oWMI,$oM,$tMem[0]
if not $sComp
$sComp = "."
endif
$fF="Unknown","Other","SIP","DIP","ZIP","SOJ","Proprietary","SIMM","DIMM","TSOP","PGA",
"RIMM","SODIMM","SRIMM","SMD","SSMP","QFP","TQFP","SOIC","LCC","PLCC","BGA","FPBGA","LGA"
$mT="Unknown","Other","DRAM","Synchronous DRAM","Cache DRAM","EDO","EDRAM","VRAM","SRAM",
"RAM","ROM","Flash","EEPROM","FEPROM","EPROM","CDRAM","3DRAM","SDRAM","SGRAM","RDRAM","DDR"
$oWMI = GetObject("winmgmts:\\" + $sComp + "\root\cimv2")
if @error exit @error endif
For each $oM in $oWMI.ExecQuery("Select * from Win32_PhysicalMemory",,48)
$tMem[ubound($tMem)]=$oM.DeviceLocator,1 * $oM.Capacity / 1048576,
$fF[$oM.FormFactor], $mT[$oM.MemoryType], $oM.Speed,$oM.DataWidth
redim preserve $tMem[ubound($tMem)+1]
Next
if 0<ubound($tMem)
redim preserve $tMem[ubound($tMem)-1]
endif
$PhysicalMemoryInfo=$tMem
EndFunction
As long as it stays just all code it's great. Works very well here, but not quite as good over on my site which is running 7.1b5
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
ideally, we'll have a true syntax highlighter at some point. i've already implemented one using code:c#, code:php, code:python... etc tags... but i believe Ian has mentioned slamming his version of it in at some point down the road.. which will be real cool, imo.. i have a forum, within a board for just programming and having the highlighting makes a world of difference ..but not quite as good over on my site which is running 7.1b5 if you point me to a specific, it may be a real simple fix.. my fix assumes some things about the ubbcode-xxx tags and the how the style handles it. yours may be slightly different and might have to also take into account height-max: xxx or whatever.. just a thought
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
What's sad is that this is easily "fixable" by putting the css code back to how it initially was in threads before the "ie fix" that made the default that sets a max height and width which was basically just a workaround for a horrid implimentation of standardization by Microsoft in IE (or as I like to call it, "creative interpretation of standardization")
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
nt, i posted a fix for you on your site.. it was as i guessed. good luck!
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
What's sad is that this is easily "fixable" by putting the css code back to how it initially was in threads before the "ie fix" that made the default that sets a max height and width which was basically just a workaround for a horrid implimentation of standardization by Microsoft in IE (or as I like to call it, "creative interpretation of standardization") The problem with this Gizzy is that since this site is used to actually promote the product we can't do that. We still have a good chunk of users that visit our forum using IE, and when they came to the forum with the old css settings and visited a topic that had code/php tags, any long strings would cause their entire browser to stretch. That's not a good way to promote the product Yes, the new way it's handled doesn't look as good in other browsers, but at least it's visible and doesn't give an extremely bad impression than when you need to scroll the whole entire window from side to side
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
<snicker> how about a browser detecter, that when it finds wonky crap browsers it shows them wonky crap code and the rest of us have something cool? lol...
|
|
|
|
Joined: Nov 2006
Posts: 3,095 Likes: 1
Carpal Tunnel
|
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095 Likes: 1 |
Actually what about an on the fly Java browser check and change in place? If IE 5.5 use x, If IE6 use x-a, If IE7 use x-c, if FF or other use y
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
That's what i was pointing at in my post (made just before you made yours lol)
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
Rick, you make a good point and it makes a lot of sense to accommodate the #1 browser by far (in terms of # users). I was just suggesting that there be a non-default style (so new users aren't using it by design at first), that is selectable upon sign-up and negotiating to user prefs. They then select the "Dark theme Mozilla style" or whatever and *poof* all is well as far as their browsing experience goes with code and php tags. Since i didn't see that as a possibility, where i initially brought it up, the 'fix' was born. I know that suggesting that we add another style is also a bummer, because that means there are more styles to maintain/upgrade. So the ideal solution is to have the css do the detecting and then act accordingly. That's easy peasy to do in css. Once implemented, i would then think that we should remove the hardwired 'safety net' for the inline style of "height=150px". If anything, that should be just moved over to existing ubbcode-body style anyway.. Thus a win/win, imho
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
ok to be fair, Ian Spence better explained the reason for the height= value. Thanks Ian. i can see why you need it in the code as an IE safety net as well as a VARIABLE value. my bad on that one. sooo... 2 possibilities come to mind: first, the HTML solution:
...
<!--[if lt IE 7]>
<style type="text/css">
.ubbcode-iebody {
height: {$height}em;
}
</style>
<![endif]-->
<div class="ubbcode-body ubbcode-pre ubbcode-iebody" >
...
second, the css one. you can also avail yourself of the IE only processing of the expression() property in the css.
...
.ubbcode-body{
height:auto; /* for non-IE */
height:expression(*[computational javascript] or [150+"px"]); /* for IE */
...
}
...
* this javascript can be DOM aware and do the '\n' counting in the container div's innerHTML to determine height in ems or px (like do_markup() does now) the height:expression(xx); will be ignored by all but IE. keep in mind that it's not for just height.. it's for much more.. Linky Poo to Microsoft dynamic properties. ps: these ideas can also be applied to the avatar height/width issues as well (imho)
|
|
|
|
Joined: Nov 2006
Posts: 3,095 Likes: 1
Carpal Tunnel
|
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095 Likes: 1 |
PM to Rick for same idea on do x if x detected.
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
I believe limiting it to IE only is a valid fix; in fact i'm pretty sure i referanced this elsewhere well before... Again, why should non-IE users be punished because of their creative interpretation of web standards?
|
|
|
|
Joined: Nov 2006
Posts: 3,095 Likes: 1
Carpal Tunnel
|
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095 Likes: 1 |
Well I think Rick will revisit how it's currently handled in 7.3 Hopefully at that time maybe get an updated routine
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
Would love to see it, then the IE users can have it "fixed" for them, and we can have it "sane" for us!
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
since i can't edit the original css proposed solution, i'd like to add that it wouldn't work, so the HTML conditional is really the only one that is workable.
additionally, using an inline class won't work either for the HTML solution, because it can have more than one [code] tag on a page. so the inline 'height=xx' would need to be surrounded by conditional(s) instead to allow for stripping at the output side.
that makes it viable.
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
bleh, it would work actually. from what i see, the html solution could simply use the $i counter to name the class and make it work. so do_markup() should be able to do the job, without having to require smarty to the rescue.. not enough coffee, when i posted earlier
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
|
|
|
0 members (),
919
guests, and
149
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|