Jump to content

maxxd

Gurus
  • Posts

    1,698
  • Joined

  • Last visited

  • Days Won

    53

Everything posted by maxxd

  1. Why not resize the full-size image to thumbnail when serving the thumbnail images? You upload and save the path to the full-size image, then pass that image through some GD functions on the gallery page. That way you're only storing the big image and can have thumbnails of different sizes if necessary. It's been a while since I've done it this way, but it worked well for me.
  2. @scootstah - Hunh. In the past (and granted, I don't use @font-face often - I tend to go Google fonts or system fonts), I've just named them differently: @font-face { font-family: 'SomeFont'; src: url('SomeFont.ttf') format('truetype'); } @font-face { font-family: 'SomeFontLight'; src: url('SomeFont-Light.ttf') format('truetype'); } @font-face { font-family: 'SomeFontBold'; src: url('SomeFont-Bold.ttf') format('truetype'); } I seem to recall it working. And if it's one font with different styles embedded, I thought that was just controlled in the tag definition. Thanks for pointing that out - I didn't realize it worked that way! Definitely makes for more streamlined markup.
  3. You need to surround associative array indexes with quotes, unless they're a variable. So, $Events_info[id], $events_info[Event_Type] needs to be either $Events_info['id'], $events_info['Event_Type'] or $Events_info[$id], $events_info[$Event_Type] As for the second error type, you're assigning an associative array into an indexed array on line 45, so $label in your foreach() on line 53 is actually an array still.
  4. Don't put the font-style and font-weight properties in the @font-face selector. @font-face{ font-family: 'Pixelated'; src: url('Pixelated.ttf') format('truetype'); } h1{ font-family: Pixelated; font-weight: 300; font-style: normal; } Just to ask the obvious questions I'm sure you've considered already, does the browser you're using support True Type fonts - you may have to create and load a .woff, .woff2, or .eot font as a fallback? Is the path to the font file correct on the server? In lieu of all that, you could always try @import for the font file.
  5. You can't animate the background-image property with straight css (see here -scroll down for 'background'). However, you can layer images over one another and fade the top one in and out on hover. Check here - good information on cross-fading images, including keyframe, timed, and delayed information.
  6. Definitely turn on error reporting. On everything you dev, always. I don't see anything obviously wrong with the query, which leads me to think it's something in the PHP instead. Error reporting will tell you.
  7. I haven't had a chance to take a look at the code for the plug-in yet, so I'm not sure what exactly it's doing. Thanks for taking a look, mac_gyver - I very much appreciate the extra effort and time! I'll dig into it and see how it can be improved upon - if it's really just setting a cookie, I can't imagine it'll take long for bots to figure that one out, too, and then we'll be right back where we were to begin with... Thanks again for the advice and help, y'all!
  8. Same thing in Firefox. Just right click the element, choose 'Inspect Element', and check it out. You can also (in both Chrome and FF) turn attributes off, change their values, and add new attributes, so you can play around with things to see what it's going to look like before you commit the change to the CSS.
  9. You've also got another typo - you define the query string in $RelHol_sql, then pass $Rel_Hol_sql to the query() method.
  10. Thanks for the advice - we tried a captcha, but that didn't slow it down at all. So we removed that and added Goodbye Captcha, which seems to have done the trick so far. @QuickOldCar: thanks for the code - I'll give that a shot, too. Obviously too much protection isn't enough these days. @scootstah: can a bot actually do that - click a link in a received email?!? I had no idea. Damn, Skynet's getting closer daily...
  11. Hey y'all. I'm having some strange goings-on happening and was wondering if anyone here had come across a similar issue, or heard of a similar issue, or knew of a voodoo ritual I might try - you know, what ever. I'm open. I have a US client on a WordPress site - updated to the most recent version, all plugins updated - using the MailChimp plugin by ibericode. We are using the double opt-in feature so that the user, after filling out their email address on the client site is sent a confirmation email and must click the provided link in the email to be sent to another web page, in order to verify the submitted email before being added to my client's list. Looking at the code, it appears as though the plugin is validating not only a honeypot, but a WordPress nonce before submitting the subscription request and subsequently sending the verification email. However, my client is getting hundreds of verified subscriptions per hour, all apparently from France and using Yahoo.com addresses. Which is weird, right? Especially as Google Analytics shows 1 user from France in the past month. Again, the user has to wait for the confirmation email, open it, and click the provided link to the verification page before the address is added to the list. Personally, I can't think of a way for a bot to handle this, nor can I imagine someone sitting at home in France - or anywhere else, for that matter - and doing this intentionally; my client's cool and all, but they're not that big and they're in a fairly niche market without any online sales.
  12. In addition to ginerjm's observation about the quotes, you instantiate the PDO object as $dbo, then use $conn to run the query. What's $conn?
  13. You might want to check in to Zoomify (http://www.zoomify.com/). Sounds like it's what you're looking for.
  14. maxxd

    Stick an element

    You can use 'position: fixed;' to keep the element where it is, regardless of scroll position.
  15. Turn on error reporting. Add error_reporting(-1); ini_set('display_errors',true); to the top of your script. As for the <? ?> versus <?php ?> tags, there's a couple things that could be going on there. Short tags (<?) used to be OK to use, but they're really frowned upon nowadays, and many servers have turned off the ability to parse them as PHP script tags. However, '<?=' is still a completely acceptable opening tag when you want to simply print a PHP variable or function output. For example, <? echo $myVariable; ?> most likely will not work on the majority of modern servers. <?php echo $myVariable; ?> absolutely will work on all servers. Also, <p>This is HTML, and PHP says <?= $myVariable; ?> because I told it to!</p> will work on all servers, and print the value of $myVariable into the HTML, much like using <p>This is HTML, and PHP says <?php echo $myVariable; ?> because I told it to!</p> Long story short, if you're changing '<?' to '<?php', you shouldn't have any trouble. However, if you're changing '<?=' to '<?php', output will start to disappear.
  16. Glad it's working. I haven't used -prefix-free (thanks for the link - I'll check it out!) but I am slowly building a .less library of mixins to make things like animations, transforms, and resets easier to do. It's got some limitations (my setup, not .less), but it's working for me so far...
  17. No one is going to give you the code - coding is what most of us get paid to do. Start with the APIs and documentation that QuickOldCar link to above, Google, and try some things. When you get stuck, come on here and tell us what you've tried, show us the code you've written, and we'll help where we can.
  18. Personally, I'd use 2 different classes with right: values, as such: .sidbar{ position: absolute; right: -250px; transition: right 0.5s ease; } .open{ right: 0px; } Then use JQuery (or JavaScript) to toggle the 'open' class on and off by click() event. Adding the transition attribute will animate the div position - don't forget to use browser prefixes for this as some browsers are still playing catch-up (iPad Safari, I'm looking at you...)
  19. The logic is pretty straight-forward; check the current status of the driver - if it's 'started' or 'waiting', disable the driver name selector. I didn't download the attachment to see the actual code you're working with - don't take it personally, it's not that I specifically don't trust you, I don't trust anyone on the Internet.
  20. Couple things here. First and foremost, print the value of $path to screen - that way you can see (and show us) exactly what the variable $path contains. Secondly, why are you trying to put a div in the title attribute of an image?
  21. I'm not quite sure what you're asking here. Are you trying to target DOM elements with a class of 'reg_errors' and/or 'chpw_errors', or are you trying to target the selectors themselves? If I'm reading your post correctly, that's not how nth-child() works - take a look here and here. Explain a bit more about what you're trying to do, what you expect to happen, and what's happening right now, and we'll be better able to help.
  22. Give the footer a z-index to float it above the dynamic data. You may have to add a lower z-index to the dynamic data as well.
  23. You're ending your query string 3 different times. Try $sql = " SELECT a.player_id, a.online, a.playtime, a.name, b.exp_total FROM stats_players a, stats_misc_info_players b where a.player_id=b.exp_total "; Also, add ini_set('display_errors',true); error_reporting(-1); at the top of your script. Blank white pages mean there's an error in the code, and the above lines will force those errors to display.
  24. Just to be clear, the database itself will still be a MySQL database - MySQL's not going anywhere. MySQLi is a php class that's replacing the deprecated MySQL php functions. So it has nothing to do with the database itself, but rather with the way you interact with the database in php. All the mysql_somethingfunction() that you see in the code itself need to be updated to use mysqli_comparativefunction().
  25. Try joining the tables instead of running queries within a loop (which is typically a bad idea. The following is untested and hastily put together, but it looks like it could work for your purposes: SELECT a.id_art ,a.denom2 ,a.exist ,a.marca AS articulosMarca ,m.id_marca ,m.marca AS marcasMarca FROM equiva e LEFT JOIN articulous a ON (a.id_art = e.codigo1 OR a.id_art = e.codigo2) LEFT JOIN marcas m ON m.id_marca = a.marca WHERE ((e.codigo1 LIKE %$artic%) OR (e.codigo2 LIKE %$artic%)) Again, it's untested, but I think I covered your criteria.
×
×
  • 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.