-
Posts
14,780 -
Joined
-
Last visited
-
Days Won
43
Everything posted by .josh
-
My point is that it's simply not fair to keep blackballing IE, treating it like the redheaded stepchild nobody loves, because they have gotten their shit together and to a point where IE is currently on par with the other browsers. But again, it's not going to be exactly the same, there will never be some single magic wand line of code or html or css rule etc.. that will work with all browsers, because they are different products made by different companies (even though these days, most of the time there actually is). I have had PLENTY of "works in FF but not Chrome" issues, where I've had to tweak accordingly. Each browser has its caveats, because they are different browsers. And who gives a shit if Firefox or Chrome has been supporting feature xyz since version 1.0 alpha, and IE is "just now catching up...." you are missing the point that IE has caught up! People keep complaining about how IE sucks and what they are really complaining about is having to support older versions of IE! Please do not mistake me for an IE fanboy. My personal go-to browser is FireFox, though Philip is slowly but surely seducing me to use Chrome full-time. Once upon a time it was actually fair to say IE sucked. Now it's not. It's just that we, as developers, have to keep putting up with older versions of IE, because of users not upgrading. People who complain about IE still sucking...I mean really, I have to question how much client-side dev work you really do...because I mean just getting rid of IE6 support (even still supporting 7+) is a HUGE step forward, to the point that most professional devs will be more than happy if they could at least ditch IE6 support.
-
No, it's more like, "It works fine in every other browser ever, but not in IE..." But that's really not true anymore, except for catering to older versions of IE!
-
Then where did my content go? Learn to program proper? Learn how to QA? It's a different product. Things will be slightly different. It's like opening a file in different text editors. If you are seriously running with the argument with "It works fine in Chrome but not in IE so IE must suck"...
-
I think people need to stop w/ the IE bashing. For real, that shit is getting old. Most of this hate is a relic from IE6 and somewhat from IE7. IE8 was a HUGE leap forward with MS getting with the program. IE9 is great, and IE10 will be better. I mean honestly, MS has gotten their shit together for quite a while now, there's really no reasonable argument to say "IE sucks" at this point, other than just regurgitating shit like it's 1999. At this point, the only thing that really sucks about IE is that so many people use older versions of it instead of upgrading, and who's fault is that? Of course, it's totally Microsoft's fault, because, Microsoft is evil and sucks. /rolleyes.
-
I use it sometimes but tbh I'm not some diehard fanboy about it like some people seem to be. I like keyboard commands and shortcut keys to an extent but IMO being able to use a mouse more...like for highlighting shit...rightclick > context menus are a lot better in many cases and I don't get to do that w/ vim :/
-
well for one thing, it has an "m" on the end.
-
Wallboard / Dashboard MySQL database driven
.josh replied to jhottinger's topic in Application Design
I'm going to assume that you have a database that always shows the up-to-date info, that part is taken care of by some other system, yes? The way I would go about it: Have a page that shows your design, call it "status.php" or whatever. This is where you will have your design/layout as shown in your picture. In a separate script, let's call it getInfo.php, use php to query the db for the relevant info and output it as a JSON object. The script should be relatively simple, it would be basic db connection, query and echo. Now back on status.php, I would have a javascript function thrown in a setInterval to be triggered every X amount of time. In this javascript function I would use javascript's AJAX method to make a request to getInfo.php to get the latest info, and then update the areas of your page with the latest info. All this is pretty trivial with the use of a framework like jQuery. Anyways, if this doesn't work out, can I have that 50" screen? -
As a public service, I am closing this thread before heads esplode trying to come up with a suitable reply to this thread...
-
Because this is phpfreaks, not perlfreaks. Though admittedly the latter rolls of the tongue better...
-
hey now, I made an irc bot in php!
-
you don't need preg_match for this, you can use stripos
-
No, the mbstring regex functions are not deprecated. Was that an oversight, or did they specifically decide to make an exception?
-
2 legit use cases, both SEO related: 1) When you link to another site, you are giving that site "power" in search engine rankings. Search engine bots crawl your site and see links to xyz.com and it increase's xyz.com's rankings. To an extent, it also hurts your ranking, because it puts you more into "middleman" territory, which is BAD, especially since link exchange/farms sites utterly ruined that territory for everybody else. In short, you are flagging yourself as a site that is NOT the ultimate goal of a surfer, when performing a query, which is a huge part of moving up natural search rankings. 2) You don't want other sites looking at who is referring to them...and then selling spamming the fuck out of you, or selling your info to other sites who will happily spam the fuck out of you. Also, they will see that traffic comes from you and adjust their own SEO efforts accordingly. Bid on some keywords more directly related to you, even if they don't necessarily relate to them. This can hurt you because a) you could be bidding on those same keywords, b) it may moreso pit you against them in natural search rankings. In short, websites will happily step on other websites to gain higher ground, and this sort of thing is you bending over and holding out your hands to hoist them up. Is it "bad practice" to do this? Not necessarily. Afterall, that is kind of why the "no follow" thing was added. The problem is, it doesn't really stop #2 from happening.
-
We get posts asking about this error on a fairly regular basis, so here's a sticky detailing the error and what to do to fix it. PHP has a number of POSIX regex functions for performing regex matching/replacing/splitting. All of these functions are deprecated, which means they are currently still available in php, but are going to eventually be removed from a future version of PHP. This is an "annoyance" to you now, because it causes an error, which may or may not show up, depending on what your error reporting settings are. This is bad news for you in the future, because your code will break when you upgrade to a future version of PHP that no longer supports these functions. The solution is to convert the POSIX functions to one of the PCRE regex functions instead. Here is the manual entry summarizing the differences, as well as what the PCRE function replacements are. For most cases, you simply have to pick the PCRE equivalent and wrap a delimiter around your pattern. You may also need to use the i modifier if you are using a case-insensitive POSIX function (eg: eregi vs. ereg). Example: Check if a username is only numbers, letters (case-insensitive) and 6-12 chars long. POSIX regex if ( eregi("[a-z0-9]{6,12}",$username) ) { // good username! } else { // bad username! } PCRE regex if ( preg_match("~[a-z0-9]{6,12}~i",$username) ) { // good username! } else { // bad username! } In the PCRE regex example, I use ~ as the delimiter and added the i modifier to make the regex case-insenstive. If doing this doesn't fix your problem, then more than likely your pattern itself has POSIX-specific stuff in it, and you will need to change that, in which case, feel free to post in this forum asking for help.
-
Okay well in my head, "hide the referrer" and make it "thinks the referer is the first Iframe" (from OP) are two different things. If you want to "hide" or obfuscate the referring URL from the target page, the bottom line is there is no elegant, 100% way to do this (see ignace's post for a link to what you can do).
-
Okay, you need to be a little bit more proactive in a) explaining what you actually want, b) being our eyes as far as what is actually happening. Do you see your div update with that 'Retrieving...' message? In firebug there is a Net tab. Do you see a request being made to your script when you click the button? If so, does the request show your data? Don't just tell us "It doesn't work," tell us what you DO see happening.
-
Doctor Who Red Dwarf Hyperdrive Green Wing
-
We can discuss it internally, but I for one am not a fan of letting users reorganize the order of the forums. Well okay, let me rephrase: as long as we can make it to where we can always have xyz forum on top no matter what, and users can reorganize anything else under that, then I am fine with that. Basically I always want the announcements/question/comments/etc.. forums to be on top.
-
It is not. It is a general principle, language agnostic. I'm actually surprised to see coders who haven't heard of GIGO...I guess it's an "old school" term not really used anymore? Which is kinda odd to me, since it still holds true as a principle to this day... wtf do classes teach you kids these days?!? And on that note... How is any less vague than the OP? MOAR GIGO.
-
iframes will show the immediate parent page as the referring URL. So to answer your question exactly, if you have iframe content within iframe content, yes, that inner iframe will show the iframe as the referring URL. However, I suspect what you may really mean is, "Is there a way to make the 2nd iframe think the referrer is the top/parent page?" And the short answer is no. The more complicated answer is no, there's no way to make it think the referring url is the parent page, but you may possibly be able to find out that parent url, if the iframed page you want to act on, is on the same domain as the parent domain. Basically you will run into XSS issues if on different domains. But if the pages are on the same page, you can work your way up the DOM ladder to the parent page and get the url (or in case the "middle-man" iframe is diff domain, you can do top.location.href on the inner iframe). But if the inner iframe page is on different domain than the top page, only way to find that out, is to explicitly pass the top URL as a query string param to each iframe src attrib and grab it from there. In any case, this: <iframe src='http://www.google.com'> <iframe src='http://www.phpfreaks.com'></iframe> </iframe> ...is not possible, that's not how iframes work. The stuff you put between an iframe tag only gets rendered if iframes are disabled or are otherwise not renderable in the browser. Basically it's the equivalent of a noscript tag, used to show alternate content in the event that the iframe will not render. Example: <iframe src='http://www.google.com'> sorry, your browser doesn't support iframes! </iframe> This will attempt to load the contents of google.com on your page (within the iframe boundary...normally you specify height and width attribs in the tag...). But if for some reason your browser hates iframes, it will instead show that "sorry, your browser doesn't support iframes!" message. Here is an example of how a real iframe-within-an-iframe works. Make 3 pages: test.php hello from page 1! <br/> <iframe height='50%' width='50%' src='test2.php'></iframe> test2.php hello from page 2! <br/> referring url: <script type='text/javascript'> document.write(document.referrer); </script> <br/> top url: <script type='text/javascript'> document.write(top.location.href); </script> <br/> <iframe height='50%' width='50%' src='test3.php'></iframe> test3.php hello from page 3! <br/> referring url: <script type='text/javascript'> document.write(document.referrer); </script> <br/> top url: <script type='text/javascript'> document.write(top.location.href); </script> This will output something like this: In this example, all pages are on the same crayonviolent.com domain, so you can see the both referring and top url values. But lets say the pages were located at: site1.com/test.php site2.com/test2.php site3.com/test3.php You will still see document.referrer showing the url the script was included on, but the top url will no longer work. It will either display nothing or undefined depending on the browser, and you will see an access denied error thrown (XSS). But you can do for example: site1.com/test.php site2.com/test2.php site1.com/test3.php Since test3 and test are both on the same domain, you will be able to get the top url.
-
IMO the issue here basically boils down to "I have no idea what I want to build (or else I'm not telling you), but can you tell me which tool is better for the job?" GIGO.
-
At best, the question is too vague.
-
Nope, you haven't. And that's why you continue to get trollish answers. If you want better answers, ask a better question.