19 Comments

  1. Posted September 20, 2007 at 12:13 am | Permalink

    Thank you for the mention :)

  2. knupNET (2 comments.)
    Posted September 20, 2007 at 3:38 am | Permalink

    Thanks for the heads up Andy. Great plugin that I’ll utilize on my sites!

  3. James D Kirk (24 comments.)
    Posted September 20, 2007 at 7:45 am | Permalink

    Hey Andy,

    Guess you haven’t had the chance to review my recode of that DDC plugin (with sidebar widget built in) yet? Do let me know if you think it’s worth while. I am using (and styling, nicely) it by the way at my site, BoldlyGoing.com

    • Andy Beard (1685 comments.)
      Posted September 20, 2007 at 10:25 am | Permalink

      James I haven’t had a chance to look at it yet, but it might well be an improvement

  4. mblair (15 comments.)
    Posted September 20, 2007 at 10:04 am | Permalink

    Andy – I just scanned the code of that plugin the other day and when glancing over it it seemed that it was scraping DDC on every page load. If so, I wonder if it might lead to performance issues of any kind. I might be wrong — was just wondering if you had a chance to look under the hood yet on it and get your thoughts.

    • Andy Beard (1685 comments.)
      Posted September 20, 2007 at 10:31 am | Permalink

      I plan to have a look under the hood today, but James sent me an improved version not long after I posted this.

    • Posted September 20, 2007 at 10:32 pm | Permalink

      The scrap is only grabbing 3 lines of words. It’s not big and should be okay. Doing a cron daily would make the plugin even more difficult to install for some of the people who are not technical.

      • mblair (15 comments.)
        Posted September 20, 2007 at 10:42 pm | Permalink

        Thanks Gary! I was just thinking that a bunch of high traffic blogs running it might flood DDC with too many requests making the responses erratic and maybe a touch slow. I’m not really an expert in that area by any means though. Rather than with a cron, is it possible to just “cache” the response to an area to store plugin settings within Wordpress so that only one call to DDC per day or whatever interval is selected is made? Please forgive me if I am being naive — an you may actually be doing something like that already and I didn’t notice.

        • Posted September 20, 2007 at 10:50 pm | Permalink

          Sounds like it would be cool to have something like that. I just don’t know how :)

          Sorry it’s my first plugin and learning as I go.

        • mblair (15 comments.)
          Posted September 20, 2007 at 10:53 pm | Permalink

          Wow! Great job with your first plugin! Congrats! Looks like it is becoming a hit :-)

      • Andy Beard (1685 comments.)
        Posted September 20, 2007 at 10:52 pm | Permalink

        Just write the data to a location on the server, check the date and time, if it is more than 1 hour old, then fetch data again.

        That way you refresh cache every hour

        No need for cron or databases.

        • Posted September 20, 2007 at 10:58 pm | Permalink

          Hmmm I don’t like writting scripts that write to the server (must be the host in me).

          If someone wants to add that ability into the plugin post it on the blog and I will add it.

        • mblair (15 comments.)
          Posted September 20, 2007 at 11:11 pm | Permalink

          Another option might actually be just saving it to the Wordpress options system since it is a small amount of data. Sorry, I know this is straying :-) As I said again, great plugin! If I have any opportunity to play with it I’ll let you know.

      • Andy Beard (1685 comments.)
        Posted September 20, 2007 at 11:03 pm | Permalink

        Here is some code that will help you a little

        [code]
        $cache_time = 60 * 60 * 24; // 1 day, seconds * minutes * hours
        $xml_cache_time = 7 * 60 * 60 * 24; //cache xml for 7 days
        $cache_file = "./thumbs/blogcatalog-thumb-" . $blogcatalog_url . ".txt"; // where to save cache file and save it as
        $img_cache_file = "./thumbs/blogcatalog-thumb-" . $blogcatalog_url . ".jpg"; // where to save image cache file and save it as
        $local_xml = "./thumbs/" . $blogcatalog_url . ".xml"; // where to save xml cache file and save it as

        // End of Settings - Do not edit below this line - unless you want to that is ;)

        if ($blogcatalog_key != "" && $blogcatalog_url != "") {
        if (file_exists($cache_file) && (time() - $cache_time < filemtime($cache_file))) {
        include_once($cache_file);
        echo "\n";
        }
        else {

        // You need to scrape them and write it to file - you should be able to manage the rest

        [/code]

        Yes I have been playing with the Blogcatalog API a little

  5. swollenpickles (5 comments.)
    Posted September 26, 2007 at 1:20 pm | Permalink

    They posted another link on their blog to an alternative wordpress plugin that worked from the RSS feed. Didn’t look like a good fit for me, but other people might like it.
    I had a crack at putting together a banner. Happy for other people to use it if they like.

    • Andy Beard (1685 comments.)
      Posted September 26, 2007 at 5:33 pm | Permalink

      You know it is silly

      They are using Wordpress
      They have all the products in a specific category
      Wordpress creates RSS feeds for categories just by adding /feed/

      Yet all the plugins are having to scrape them

      The category feed doesn’t contain a decent excerpt, it is just using the_excerpt_rss, which generates an ugly automatic excerpt without formatting or images.

      All they need to do is use a plugin to automatically create decent custom excerpt with images, and that could be used extensively.

      All the solutions so far are junk compared to what should be possible.

      • Posted September 26, 2007 at 5:42 pm | Permalink

        We asked DealDotCom to setup this…

        http://www.dealdotcom.com/wp

        for our plugin to work. Have you considered asking them to make a page that does the same thing but wraps it as xml?

        I don’t feel our plugin is junk personally. If you have suggestions or constructive critism though I am all ears.

        • mblair (15 comments.)
          Posted September 26, 2007 at 5:59 pm | Permalink

          Gary,
          Thanks by the way for getting them to setup that page. I’ve used it as part of the way I’ve rolled my own RSS feeds. What they need to do is setup something similar in RSS 2.0 format that people can use if they want to subscribe via RSS and get product titles and price. You can see the feed I rolled together here (be aware — it has my affiliate code in it)

          http://feeds.feedburner.com/DealDotComToday

          I’ve also been trying to get a hold of them to see if they could setup and extended datafeed page that includes as much data as possible — like original price, salesletter URL, etc. Unfortunately, I haven’t heard back from them yet… Any tips on getting a hold of them would be appreciated.

          Also, I wanted to followup from my last post and say that I’ve seen how you’ve updated the plugin — as I said before, great job! :-)

  6. Andy Beard (1685 comments.)
    Posted September 26, 2007 at 7:02 pm | Permalink

    I said it is junk compared to what could be done, there is a significant difference, and that doesn’t necessarily reflect on you. A WP plugins is after all only usable by people using Wordpress.

    In the post I wrote

    They should really be delivering banners of various sizes to us every day without having to change any code, and an RSS or XML feed to play around with.
    It needs to be a graphic without using any javascript, so it can be used anywhere.

    I know the DDC guys read my blog, they have told me this a number of times in the past, and I would say there is a 99% chance that at least someone from DDC has read this article.
    I am not sure there is a need to email them directly, and I would be amazed if they haven’t already got Marc coming up with some kind of automatic banner creator.