Re: [PHP] Two PHP questions
on 03/10/02 10:55 PM, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: Secondly, is there any way of counting how long in pixels my page runs? Basically, my situation is this: I want to know if my page runs more than a screen and a half (or so... still deciding) of the user's screen so that I can put a Go to Top link on the bottom if it's useful. Any ideas? U, it's too hard to tell -- if not impossible!! There are too many variables... font size, leading, etc etc to calculate how long your page will be and then you'd have to get information back about screen size/resolution from javascript (yuk). Perhaps you could do it in a simpler way, based on the length of the main body of content... in the case of an article/tutorial/news based site, you could evaluate the length of the main content (article for ex), and if it's more than 500 words or something, put a link in not as pin-point as you want though. Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Two PHP questions
U, it's too hard to tell -- if not impossible!! There are too many variables... font size, leading, etc etc to calculate how long your page will be and then you'd have to get information back about screen size/resolution from javascript (yuk). I thought there might be a way to compare the pixel height of the output (?? Hey, why not?) to the screen resolution returned by some setting (Browscap setting? I'm still looking into it). Hope so...! Perhaps you could do it in a simpler way, based on the length of the main body of content... in the case of an article/tutorial/news based site, you could evaluate the length of the main content (article for ex), and if it's more than 500 words or something, put a link in not as pin-point as you want though. Yeah, that's not exactly as pinpoint as I would have hoped. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Two PHP questions
First of all, what exactly is get/set_magic_quotes_runtime? (I know what a get/set function does, and I know what magic_quotes does, but I'm unclear about what magic_quotes_runtime is as opposed to _gpc). Does it get the magic_quotes setting at runtime, before anything has been set_magic_quotes_runtime'd? I sort of get that it has to do with returning slashes with quotes in a function as opposed to doing it when a function is called. Any clarifications? The only comment on the PHP list says that it's being turned off, so I guess it's not that important. magic_quotes_runtime boolean If magic_quotes_runtime is enabled, most functions that return data from any sort of external source including databases and text files will have quotes escaped with a backslash. If magic_quotes_sybase is also on, a single-quote is escaped with a single-quote instead of a backslash. http://www.php.net/manual/en/printwn/ref.info.php#ini.magic-quotes-runtime Secondly, is there any way of counting how long in pixels my page runs? Basically, my situation is this: I want to know if my page runs more than a screen and a half (or so... still deciding) of the user's screen so that I can put a Go to Top link on the bottom if it's useful. Any ideas? Not with PHP. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php