KevinM1
Moderators-
Posts
5,222 -
Joined
-
Last visited
-
Days Won
26
Everything posted by KevinM1
-
I find things like Jira and Basecamp a bit pointless if you're in a small, self-sufficient team. I tried using Jira, and the process of setting up tasks, commenting on them, closing them out, etc. was really just busy work. It was far easier to just confer with my partner with, "Hey, is 'X' done? No? Cool."
-
It also doesn't help that you're using WordPress, which is a terrible brew of bad coding practices and hacks under the hood. Its ubiquity is in direct opposition with its quality.
-
Odd. I created the following test script: $time_now = 70000; $str = 66000; $close_reg = 16000; class testPost { public $register; } class testRow { public $register; } $post = new testPost; $post->register = "blah"; $row = new testRow; $row->register = "0"; if(($time_now < $str) && (($post->register == "0") || ($close_reg < $time_now))) { echo "online_reg_closed_message"; } else if(($str < $time_now) && (($row->register == "0") || ($auto_close_reg < $time_now))) { echo "reg_closed_message"; } else { echo "final_message"; } And it echoes "reg_closed_message" for me. My only conclusion is that your values aren't what you think they are at the moment of the conditonals. EDIT: Assigning a non-zero string to $row->register results in the same - "reg_closed_message" being echoed.
-
$time_now IS NOT less than $str.
-
You'll also find that not a lot of us use WordPress because it's pretty messy under the hood, and doesn't follow best practices at all.
-
Please don't play moderator.
-
Just be aware that this is harder to do with Windows 8+. You'll have to create a new boot configuration that does not turn on Hyper-V by default.
-
... You're kidding, right? If not, debugging is a term that means taking the steps necessary to remove the bugs (stuff that doesn't work like it should) from your code. mac_guyver was asking what steps have you taken to try to fix your problem?
-
Look into mod_rewrite and .htaccess
-
It's generally preferred that URLs be clean. It just looks better, and is easier for people to remember (assuming they're not just retrieving a particular page with a bookmark).
-
REST, at it's core, is really just about using the right HTTP verb for the job. GET, POST, PUT, DELETE all have meanings, and if something is described as being RESTful, all it really means is that the site/app in question adheres to those meanings. Clean URLs are nice, but they aren't REST. The fact that you're using GET to retrieve that info is what makes it RESTful. That said, friendly URLs are, well, friendly, and make it easier to facilitate REST. In your example, there is nothing wrong with something like: example.com/users/123. The URL conveys that you're retrieving (GET-ting) user 123. There's no need to specify that it's Bob. A real life example is Stack Overflow. Their URLs are shaped like: stackoverflow.com/questions/<question id>/<slug>, but, only the question id is used in retrieving the question. If you leave the slug off the end, it still gets the right one, and if you try retrieving a question with the slug alone, you'll get a 404.
-
Yeah, it really sucks when you don't get the free advice you're looking for.
-
To be honest, I doubt anyone here uses drag & drop, even if their editor of choice supports it.
-
I'm not saying it's not a GoDaddy problem, but like most big tech companies, their 'support' department is mainly filled with drones reading off a script. You won't find much help there. And, AFAIK, most, if not all, analytic programs/services would have to be installed on the server. I could be wrong with that, but common sense tells me that's the case. So, let's try to troubleshoot with the tools we have available. Maybe someone else reading this will know of tools that you don't have to have direct service access to use. So, with that said, some ideas: 1. Are the files that aren't working smaller than the max upload size set in the php.ini? 2. When are the uploads being attempted? 3. Do you have any access to the analytic tools GoDaddy supplies in its control panel? You can, at the very least, look at your site's traffic
-
You don't have access to the GoDaddy control panel?
-
Let me see if I can parse what you're saying, because you're not really clear on what the problem actually is: 1. You have a site on GoDaddy shared hosting 2. The site converts audio files 3. 3 out of 9 users have issues with the site Is that what you're trying to describe?
-
GoDaddy sucks. Full stop. And what do you mean by "Is there any server tools that don't require an installation in the server"?
-
Don't use W3Schools. Read this for why: http://www.w3fools.com The online PHP manual is a decent place to start. And if you find any other resources that use the word 'global' in their examples, run far far away from them.
-
Yup. A good example is Stripe, a payment handling/gateway API.
-
You should also ask if the software is written in classic ASP or ASP.NET. There's a big difference between the two. Like huge. Classic ASP is essentially Microsoft's attempt at something similar to PHP. ASP.NET is a weird beast that does all of its work through form submissions and a very particular lifetime sequence per request. And on the back end, it's either Visual Basic or C#.
-
Call PHP Function from within another function
KevinM1 replied to reptile's topic in PHP Coding Help
There are two possible things happening: 1. The other dropdowns' onchange use the XMLHttpRequest object, either directly or indirectly (JavaScript library, like jQuery or any of the others, including those created by other people at your job). You should be able to determine if that's the case by looking at the generated source and checking for the existence of either a JavaScript library or XMLHttpRequest in the raw itself. OR 2. All of the other dropdown data is retrieved at the first page request, and JavaScript is being used to simply hide/display the correct options. You should be able to determine that's the case by looking at the generated source and checking for all the other dropdown data. So, if it's case 1, you'll have to figure out how to adopt code that's already working and accessing the PHP code for your new dropdown/function. If it's case 2, you have a decision to make: pre-load all of the data you're concerned with, like the other dropdowns have done, or use AJAX to dynamically retrieve just the set you want. Either way, your first step is to actually examine what's going on when the dropdowns are played with, and that requires a trip to the generated source. Simple enough to do with your browser of choice and its web developer tools.- 14 replies
-
- php
- javascript
-
(and 2 more)
Tagged with:
-
Which one is better for a Login system, Sessions of Cookies
KevinM1 replied to Andor's topic in PHP Coding Help
More to the point, you should never use 'global' at all. Not in functions, not in class methods, nowhere. The whole point of functions and objects (especially) is to create modular pieces of code that can be used in a variety of situations. 'global' ties your function or method to its environment, nullifying that modularity. If a function or method needs data to complete its job, pass it through the argument list. That's why it's there. And if the resources (books, videos, tutorials) you're using to learn make use of 'global', consider them suspect and get better resources. -
Which one is better for a Login system, Sessions of Cookies
KevinM1 replied to Andor's topic in PHP Coding Help
Why are you using 'global' in classes? Why are you using 'global' at all? I can't believe that there are resources out there that use 'global'. It's just mind-boggling. -
Call PHP Function from within another function
KevinM1 replied to reptile's topic in PHP Coding Help
reptile, trust us, there is no way for PHP and JavaScript to directly interact except through AJAX. If your JavaScript code isn't using XMLHttpRequest (or, even better, library code that makes it a hell of a lot easier to use out of the gate, like jQuery's $.get()), then it's not talking to the PHP on the server. The thing that looks like it's working is likely being pre-populated with data at the time of page request, with the JavaScript merely manipulating the DOM after it's been rendered. In other words, it's an illusion, and not working the way you think it's working. So, again, just to drive the point home: no XMLHttpRequest object in your JS code/no using a library that wraps that object (like jQuery) = no direct communication between JS and PHP.- 14 replies
-
- php
- javascript
-
(and 2 more)
Tagged with: