Search results

  1. W

    PHP RSS Feed aggregation changing date to todays date everytime feed is aggregated

    Actually found the original documentation via the Wayback Machine > https://web.archive.org/web/20191228101238/http://rssphp.net
  2. W

    PHP RSS Feed aggregation changing date to todays date everytime feed is aggregated

    Hey, was wondering if someone might be able to rummage through the following and provide some insight as to why this custom RSS feed aggregation code is returning the current date and not the actual pub date? The key variable here is $cleanDate I believe. This is using some older RSS aggregation...
  3. W

    PHP How do I limit the for loop count?

    I think this? // read feed from xml function xmlFeed($section) { $rss = new rss_php; $feedURL = site_url().'/'.$section.'.xml'; $rss->load($feedURL); return $rss->getItems(); } Can I just add something to the first snippet like for ($i = 0; $i < count($items) < 12; $i++) { or...
  4. W

    PHP How do I limit the for loop count?

    Hi, limit the number of feed posts pulled into the output. Now it just pulls unlimited.
  5. W

    PHP How do I limit the for loop count?

    Hi, the following works fine but I’d like to limit the max number of items pulled at a given time? Wondering how to do this? function rssNews() { $items = xmlFeed('research'); $items = orderByDate($items); $output = ''; $output = '<ul id="rssnews">'; if (count($items) >= 2)...
  6. W

    JavaScript Uncaught TypeError using hammer.js

    Hey, I am working on an old site that was using hammer.js v1.0.5 (https://hammerjs.github.io/) and jQuery 1.8.3. I am currently trying to upgrade hammer to the newest version (v2.0.8 > https://hammerjs.github.io/dist/hammer.min.js) and jQuery 1.12.4 w/ Migrate and am getting an Uncaught...
  7. W

    PHP WordPress/Advanced Custom Fields/ PHP Rand

    Took out $paperCounter for now to try and get 1 random one pulled and have it functioning with the exception of the get_image_with_alt line. Any clue how I could pull 2 randoms, and adjust that line? Feel like I am getting close but need a bit of help. function getLatestPhotos() {...
  8. W

    PHP WordPress/Advanced Custom Fields/ PHP Rand

    Hey, I have this PHP/ACF code for WP that pulls the latest 2 entries and am wondering how to adjust this so it would just pull random entries instead. Thanks! function getLatestPhotos() { if(get_field('photos', 34)) { $latestPhotos = '<ul class="photo-list">'; $paperCounter...
  9. W

    PHP Help with if/else statement for WordPress function

    If i remove the break it just repeats the check back soon text 10 times. If i leave the break, it shows it once, but if I add an upcoming event, I don't see the event I just see the check back soon text. I tried revising the first if to add this else but it didn't do anything if ( have_posts()...
  10. W

    PHP Help with if/else statement for WordPress function

    Hey folks, I've got some code that pulls several upcoming events posts and displays them on a home page. It work fine but if there are no upcoming events scheduled then there is nothing that shows up and I’d like to revise this so it displays a little ‘No events currently scheduled’ text. Any...
  11. W

    Downtime Cron that sends an email?

    Hey, wondering if anyone has any ideas that might be better than this one I yanked off Github. Looking for a bash script I can run a cron on several times a day that auto checks a list of domains to see if any are down. #!/bin/bash # List of URLs to check. urls=( https://www.google.com...
  12. W

    JavaScript calling jQuery and Migrate these days

    is jQuery(window).on('load', function () { a decent replacement for jQuery(window).load(function () {??
  13. W

    JavaScript calling jQuery and Migrate these days

    actually, forget the 2nd issue, someone forked the original abandoned script and fixed that issue. Only interested in the first issue.
  14. W

    JavaScript calling jQuery and Migrate these days

    Nice, ok, I am running Migrate and it has picked up a couple of deprecated errors. Wondering if anyone might have input how to update. 1. JQMIGRATE: jQuery.fn.load() is deprecated jQuery(window).load(function () { initMyFunction1(); initMyNewFunction2(); initAnotherFunction3()...
  15. W

    JavaScript calling jQuery and Migrate these days

    Do people just use straight JS these days? Should I not bother calling it from the external URL and just get rid of that extra check? I probably don't have thousands of visitors daily to this site.
  16. W

    JavaScript calling jQuery and Migrate these days

    Hey, I am upgrading an older site that was using jQuery 1.8.3 and am bumping jQuery to 1.12.4 and using the 1.4.1 migrate plugin for the time being. I see that jQuery had been called the following way <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> <script>window.jQuery...
  17. W

    JavaScript Leave input:hover active if input has focus

    That isn’t working for me. If I do something like this the .on state functions but when I click off it doesn't work. What am I missing here? // search input focus jQuery('#search-form').on('click', function searchInputFocus(event) { $(".search-slide").css({ "left": "auto", "right": "100%"...
  18. W

    JavaScript JS working in Firefox not Chrome/Safari

    Removed the scrollTo dependency and changed it to... // back to top scrollings function initTopLink() { $(window).scroll(function() { var height = $(window).scrollTop(); if (height > 100) { $('#back2Top').fadeIn(); } else {...
  19. W

    JavaScript Leave input:hover active if input has focus

    Hey, I have an input field .search-form input[type="text"] and it is hidden until the following :hover css .search-slide { left: -9999px; position: absolute; top: -9999px; white-space: nowrap; } .search-form:hover .search-slide { left...
  20. W

    JavaScript JS working in Firefox not Chrome/Safari

    Thanks, I'll try this out.
Top