Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. First step is to logs the contents of $data somewhere so you can look at what is in it.
  2. The page does say, but I'll admit it's not very clear about how. You've seen the server { } blocks, right? You can have more than one for different server_names and/or listens. On Debian-based Linux there is typically a /etc/nginx/sites-enabled and sites-available. sites-available is where multiple site configuration files are, and sites-enabled has a symlink to each one that should be enabled.
  3. Fair enough. I get the practicality of saying either/or, it's easy enough and doesn't require a variety of if/else checks. But usernames should be filtered to some degree - no "admin" or "administrator" or other misleading terms that may be relevant to the application (eg, "moderator", "author"), and allowing anything Unicode is funny when you consider emojis but scary if it also allows non-printables.
  4. Don't allow @s in usernames, then you can easily check what the value is supposed to represent and decide which column to check against. This is better than a simple "email = value or username = value" because... well, I don't know if I have concrete reasons that can be written out, but to me it feels better. Instinct.
  5. Depends, but the answer is probably that you have to figure it out for yourself. Typically by storing a list of the URLs you've hit then checking it whenever you think you want to crawl a new page.
  6. Windows and Microsoft tend to use AVI for some inexplicable reason. Use a tool like FFmpeg to transcode the video into something safe like H.264+MP3.
  7. MP4 is an extension. What matters is the underlying video and audio codecs being used. (And Windows' properties won't tell you what those are.) It also varies by browser.
  8. By reading the documentation? DOMNodeList Or by looking at your own code a couple lines lower.
  9. A security group shouldn't prevent DNS from working. Yes, you can do multiple websites. Guide
  10. Wow, the first thing you see when you get to that page is a huge blob of SEO keyword crap. Let's set aside the fact that you could generate a calendar yourself and How about copy and paste? If not that, exactly what are you trying to copy into a single column?
  11. Present the alert with Javascript so that you don't have to do multiple requests. That means embedding or otherwise constructing the "alert" HTML beforehand, then showing and/or hiding as necessary according to user action.
  12. IDs must be unique. You cannot reference multiple buttons by "btn" (which is a poor ID anyways). Change your onclick to clickvideo(this) then give your clickvideo a parameter with some descriptive name. That parameter will be the same as the "x" that you have there right now, so you don't have to try to get it some other way. The parameter is also going to be the HTML element as a whole. If you want its value then you can get it using .value.
  13. Please do include the original code, not something edited for your post. If the Javascript isn't working then that would be a Javascript problem, right? So what is that code? And have you done a View Source of your page to make sure that the HTML is correct?
  14. The server_name is the domain name of your website. If you want to go to http://ec2-whatever then your server_name would be ec2-whatever. If DNS isn't resolving yet and you're sure you typed it correctly (so copy/paste it), wait a while and try again.
  15. One thing at a time.
  16. It's possible you're not aware that PHP has its own default timezone, and if you try to format a date (timestamp) then it'll format according to the PHP timezone. $bp_date_to_format = date_create_from_format('Y-m-d\TH:i:sP', $date); echo date_format($bp_date_to_format, 'd-m-Y H:i'); On the first line PHP will parse the date as you'd expect, and come up with a time that is equivalent to 12pm GMT+2. On the second line you will format it, and since PHP is using the UTC timezone (also the default) it will give you 10pm GMT+0. First of all, a GMT offset and a timezone are not necessarily the same thing. Remember daylight savings? A timezone like Asia/Beirut will be GMT+2 in half of the year and GMT+3 in the other half. If people can choose their timezone according to location (as opposed to choosing by offset) then you need to stick with that everywhere so you can handle DST changes automatically. PHP has an API for dates. It's DateTime and related classes. (Or the procedural versions of the same class methods, but the OOP style is recommended.) On the server side you have two options: 1. Always deal with dates in UTC, and convert to/from the user's timezone when you want to show/get a date 2. Set PHP's default timezone to be the user's timezone, and if you need to work timezone-less dates (eg, MySQL's DATETIME) then you convert to/from UTC.
  17. So what you meant is that you want to validate a positive integer without leading zeroes? Then yes, that will do it; my answer would have been /^(0|[1-9]\d*)$/ but that's basically the same thing.
  18. Don't allow multiple consecutive zeros, or do but reduce them, but do allow multiple consecutive zeros after a number? What? What are some examples of good and of bad values, and what makes them good or bad?
  19. Yeah, after disabling the main a { text-decoration:none } pages seem alright. Some oddities, like sometimes link text includes spaces so it looks like Home instead of Home, and unfortunately the rule is on a and not a[href] or a:link so it does catch some non-links (and besides, there are some non-links that have href=# so that's already an annoyance). And some minor things that probably don't matter have their own overrides. Something to think about. Meanwhile the user popup thing should be fine to do, doesn't seem like there will be any problem with it.
  20. It's not obvious that the username in the post has some sort of action, either. It's black in color with no underlines or styling. The "Posted" date is a link too - the link to go directly to a post. Frankly I don't like the overly unintrusive "this is a link but make sure the user can't tell by looking at it" approach currently common to web design - I know when I design something that has occasional links among lots of plain text, I underline to make it clear there's something there. off-topic edit: the "it's a link but you can't tell" reminds me of a '90s RPG series of games where you could talk with NPCs, and the way to "navigate" through dialog was to click on words. Like, the NPC would say "There's a box over in the corner", where "box" and "corner" would lead into the next response. But they weren't styled differently so you couldn't just scan the text for where to go next. Had to actually read and guess what to talk about. Still some of my favorite games ever, and occasionally I think about setting up DOSBox or a Windows 98 emulator to play them. then a few years later they remade them with a new engine in 3D... just wasn't the same...
  21. The change would be that clicking (with Javascript enabled) does the popup instead. At least. Preferably clicking with the popup visible goes to the page like normal.
  22. Changing it to pop up on click is fine with me. I'll look into it - it's an IPB thing to do stuff on hover, and I'm not sure there is built-in support for doing popups like that on click.
  23. You know that "some action" includes just moving the mouse away, right?
  24. The $params are filling the placeholders when the query gets executed. They need to match with what the query is trying to do. Just before you execute the query, dump out the contents of $params and the SQL query itself. Compare the two to make sure $params has the values the query needs it to have.
  25. Presumably "the query you just demonstrated" would be the query you had included in the post immediately before mine: SELECT players.deal_id, COUNT(players.deal_id) AS TotalPlayersByDeal, SUM(affiliate_deals.cpa) * COUNT(players.deal_id) AS affiliate_cpa_earnings FROM players INNER JOIN affiliate_deals ON affiliate_deals.affiliate_deal_id=players.deal_id WHERE players.affiliate_id=1 AND affiliate_deals.type = 'CPA' AND players.program_id=1 AND players.status=1 AND DATE(players.ftd_matched_Date) BETWEEN '2019-02-01' AND '2019-02-28' AND players.ftd_matched=1 OR players.affiliate_id=1 AND affiliate_deals.type = 'Hybrid' AND players.program_id=1 AND players.status=1 AND DATE(players.ftd_matched_Date) BETWEEN '2019-02-01' AND '2019-02-28' AND players.ftd_matched=1 GROUP BY players.deal_id, players.player_id
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.