WordPress.org

Ready to get started?Download WordPress

Forums

p2 Ajax updates for all visitors (10 posts)

  1. alexcoleman
    Member
    Posted 5 years ago #

    Is there a way to make the p2 theme automatically update in realtime for all visitors? Currently, it only updates for those who are registered and logged in.

  2. sheatsb
    Member
    Posted 5 years ago #

    I'm actually wondering the same thing. Any help with this would be very much appreciated.

  3. isamisam
    Member
    Posted 5 years ago #

    This patch will enable automatic post and comment updates for all users, but be warned that it might break something else in the js/theme. So far in my tests (wordpress 2.8 only) it works flawlessly, but I don't know why auto updates was off to begin with.

    Patch: http://code.biodegradablegeek.com/p2.diff

    To apply:
    $ cd site.com/public/wp-content/themes/p2/inc/
    $ patch < p2.diff p2.js

    Alternatively just open p2.js and near line 514, remove the "&& isUserLoggedIn" flag for both PostsUpdates and CommentsUpdates.

  4. sheatsb
    Member
    Posted 5 years ago #

    actually, I think this is what happened for the gizmodo liveblog - (live.gizmodo.com).

    anyway, i tested it out, works well. thanks!

  5. hal9000
    Member
    Posted 5 years ago #

    i dont think this live update thing work on my install of p2
    i havent seen it working in my tests

  6. cocteauboy
    Member
    Posted 5 years ago #

    @isamisam, I don't understand how to use the patch. I did try to delete the code in p2.js, but that didn't actually change anything for me. So I'm going to try the patch.

    Do upload the patch to my p2/inc folder?
    Where do I put the code:
    $ cd site.com/public/wp-content/themes/p2/inc/
    $ patch < p2.diff p2.js

    I presume the first line of code should be altered to reflect the correct path?

  7. alexcoleman
    Member
    Posted 5 years ago #

    See, I thought that was the solution as well, but it did not work. Maybe it has to do with some settings in the WP admin panel?

  8. alexcoleman
    Member
    Posted 5 years ago #

    ...seems like the p2 theme for wordpress.com has automatic updates for all

  9. noel
    Member
    Posted 5 years ago #

    Link to a blog suffering this problem would be very much appreciated.

  10. erikbeam
    Member
    Posted 4 years ago #

    My blog works flawlessly when I'm logged in, but I want any viewer to see the live updates.

    I've applied the change suggested by isamisam above, but it does not work for me.

Topic Closed

This topic has been closed to new replies.

About this Topic