Jump to content

maxxd

Gurus
  • Posts

    1,657
  • Joined

  • Last visited

  • Days Won

    51

Posts posted by maxxd

  1. 4 hours ago, simona6 said:

    Why should it be avoided?

    Hidden text could be seen as keyword packing by search engines, and can hurt your ranking.

    WP Bakery is a paid plugin, so I'd honestly be a bit surprised if it doesn't do what it claims. The problem could be over-nested elements or, as requinix stated a couple times, the class is assigned to the wrong container element. If it truly doesn't handle the issue, request your money back and be vocal if the author gives you any guff about it.

  2. Given what you've posted, there isn't an action later in the page. You're checking for a value in $_POST, which will be set on page load after clicking a fomr's submit button (assuming that form's action parameter is set to 'post'). So you can check if $_POST['cat_title'] is set at the top of your page and redirect if it is. You don't want to render half a page then redirect a user anyway, right?

  3. 8 hours ago, NotionCommotion said:

    Potential drawback will be lack of persistence upon restarting Redis, but will highly consider using Redis.

    Not saying it's a perfect use case, but it does lend itself fairly well. Persistence is always a consideration with Redis, but honestly with ElastiCache for Redis and the like, restarts aren't that prevalent in my experience. That having been said, my last job abused the crap out of Redis so my attitude may be a bit skewed by Stockholm syndrome...

  4. It sounds like you're using procedural programming, in which case I'd go with defining the variables as you need them. If you're using OOP I recommend defining any class properties at top of the class, before the constructor - with PHP it's not technically necessary, but I find it cleaner.

    As far as the use of isset() on null or == "", try empty(). empty() returns true if the variable is false (which null and "" equates to) or if the variable doesn't exist, so it covers all your angles with one check.

  5. 8 hours ago, jasonc said:

    I did use the HTML5 but it is not supported on most andriod devices

    I don't know exactly what you mean by this, but android supports HTML 5 semantic markup.

     

    If you want to make sure the email actually exists, I believe there are services that can do this. I've not used one so I can't vouch for the accuracy or operation, but a Google search should return some good places to start.

  6. What you're describing sounds like a FOUC (Flash Of Unstyled Content) and is usually caused by any or all of a few things:

    • Slow-loading (typically remote) stylesheets
    • Stylesheet links at the bottom of the page instead of in the head
    • Javascript styling

    Does your site use jQuery or Google Fonts, for instance? I've had this issue pretty consistently with Google Fonts or Adobe Font Kit.

  7. 1. Honestly, no idea. I feel like at some point back in the day I made vertical-align work, but I haven't thought about it for so long that I have no idea how.

    2. flex or grid

    3. There's nothing wrong with the code you've posted, and using flexbox will get you the result you want. You just need to adopt it - there's not a browser available that can't handle it natively at this point and as you've clearly seen, the struggle is real without it.

  8. 14 hours ago, ChenXiu said:

    For example if I want to vertically center 3 items in a row and maybe have 2 of those items grouped together on the right, I have to implement an absolutely RIDICULOUS TANGLED mess of nested upon nested divs, floats, or flexes, blah blah blah, when all I need is a good ol' fashioned <table><tr><td>.

    Yeah, you want flexbox.

    There's also the idea that HTML should be semantic and a table should be used for tabular data output only. I don't know for sure that Google penalizes non-semantically correct HTML because Google prides themselves on not letting anyone know how they rank sites, but anecdotal evidence points to that being the case.

  9. Available at all on a select date or available within a given time frame on a select date? If the only spec is that there are no other appointments or events on that person's calendar on that specific date, that's a simple question of a subquery where select all events on date are null. If you're talking time, that gets complicated with start times, end times, and overlaps of either or both.

  10. 6 hours ago, TechnoDiver said:

    why is specifying a length required when an index was specifically used

    Just to avoid any confusion as it's not clear if you're referring to your $first_digit or $last_digit assignment, your second line will assume the third parameter is the length of the string - as kicken pointed out:

    3 hours ago, kicken said:

    If you don't specify what length, then it defaults to the end of the input string.

    Or, as stated in the manual:

    Quote

    If offset is negative, the returned string will start at the offset'th character from the end of string.

    So, if your $last_number assignment was this:

    $last

    $last_number = substr($num, -2);

    it would also return 27.

  11. Put your config file outside the document root, so put the file at /opt/lampp/config/config.php, then use

    require_once $_SERVER['DOCUMENT_ROOT'].'../config/config.php';

    in your code.

  12. I just want to point out that AD and MVC aren't mutually exclusive. Laravel, for instance, is an MVC framework with a built-in AR ORM (Eloquent). Patterns intermingle and build on each other to create a full code base, so you don't need to discount or dismiss AR if you decide to use MVC, and vice-versa.

×
×
  • 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.