• Hey Nick,

    I have problem with the posts. I am getting submitted the same post many times.. This is not really good, specially about SEO!

    As I see in the code (run.php):

    // max days to check for feed items.
    $numberOfDays = $lnx_lifestream_options['feeddbsize'];
    $numberOfDaysInSeconds = ($numberOfDays*24*60*60);
    $expireDate = time() - $numberOfDaysInSeconds;

    and then:

    $keys = array_keys($savedItems);
    foreach($keys as $key)
    {
          if($savedItems[$key]['date'] < $expireDate)
           {
            	unset($savedItems[$key]);
           }
    }

    What means that every post which is newer than my ‘feeddbsize’ (20 days) will be submitted again and again.. and it is! I have the same posts repeated up to 8 times even if I delete them manually, so I have disabled the cron untill this is resolved.
    Please let me know if I am in wrong. But that’s how I see it.
    In my opinion this option ‘feeddbsize’ is not necessary. On it’s place you should save the last update time(), and compare with it.

    if($savedItems[$key]['date'] < $lastUpdate){
            	unset($savedItems[$key]);
           }

    However you know better your code.. I hope there will be solution for that.

    Cheers,
    Nick

    https://www.ads-software.com/extend/plugins/linickx-lifestream/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Nick,

    Yep you’re right I’m having an issue with multi-posts on my site too but I’m finding that it doesn’t happen for all feeds… perhaps that was a red herring.

    I will continue testing and let you know ??
    Cheers,
    Nick

    Hello Again,

    I’ve been pondering over your logic, and don’t think what you’ve found is the issue.

    time() is a continuously growing number (in seconds) – so …

    now for me is 1257872836
    1 day is 24*60*60 = 43200

    Therefore yesterday = 1257872836 – 43200 = 1257829636

    if($savedItems[$key]['date'] < $expireDate

    … checks if the time-stamp is less than the time-stamp 20days (or whatever) ago, thus it is older than we need to store.

    Please note that earlier up in run.php (line 108) we have…

    // if item is too old dont even look at it
     if($item->get_date('U') < $expireDate)
     continue;

    So if the time-stamp is older than 20days we don’t create the post.

    … I’m still pondering over your other suggestion ??

    Hi Nick (nm2net)

    I’ve just pushed a new change to the trunk for you to try … overwrite your run.php with the latest version.

    I’m looking to push this change out as version 0.1.4 but I’d like someone to test it 1st.

    The story for me is that I had my digg feed and google feed streaming just fine, but as soon as I added my WP Trac Feed all posts doubled/tripled/etc… I noticed a load of white space in the Trac Feed so I’ve cleaned it out and am testing this version of run.php on linickx.com.

    Hope it works!
    Nick

    Thread Starter nm2net

    (@nm2net)

    Hey Nick ??

    Thanks for the updates! I really have no time last days, but I will try to test it over the weekend or next few days, and I will post my thoughts here.

    Hello,
    I’ve just released version 0.2 which should resolve this issue.
    Cheers,
    Nick

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: LINICKX LifeStream] multiple posts’ is closed to new replies.