Ajax For All WordPress Blogs

Tagged WordPress plugin

This is a new plugin of mine that will turn many existing WordPress blogs and their themes into Ajax-powered blogs. The best way to see what this plugin does is to look at the live demo.

The theme on that site wasn’t tweaked at all to make the Ajax functionality work (except some irrelevant CSS changes). It works out of the box on most WordPress themes that follow the theme coding recommendations, see the plugin’s readme.txt for details.

Downloads are available at WordPress.org.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay

Related posts:

  1. Creating a valid WordPress theme
  2. Theme switch and preview plugin
  3. Visitor Movies for WordPress

66 Comments

  • Posted by EnlightenMental on 22. July 2010 at 20:46.

    Tried out the demo page. Best use of Ajax + WordPress I’ve seen yet!

    great work

    • Posted by nicolas on 22. July 2010 at 21:46.

      Thanks! I hope it will be approved soon so that it will be available for download. I should probably make another demo site with twentyten to show that the plugins works on many themes. And if not, most themes should be easy to modify.

  • Posted by François on 24. July 2010 at 20:45.

    Hi Nicolas,
    Thats a wonderful plugin. Exactly what I was looking for. There is one thing that I didn’t found how to do with it. How to put the class "current_page_item" on the page I’m on. If you know the solution, It will be Wow !
    Thanks again

    • Posted by nicolas on 25. July 2010 at 09:31.

      Hi Francois,

      there’s a JavaScript callback ‘AjaxForAllCallback’ that will be called after the Ajax request is done. You can create a function with that name, although I haven’t put all the data in there that would make this easier. It’s on my todo though and I’ll document it with an example script later. Might even include it, seems like an important feature.

      The other todo is to fix history back/forward.

      • Posted by François on 26. July 2010 at 00:42.

        Thanks Nicolas for your answer,
        I will wait for you to include this function in one of your next version.

  • Posted by Franky on 25. July 2010 at 11:33.

    Hi Nicolas,

    funktioniert gut und gefällt mir.

    Vielleicht könnte man noch das Scrollen des Plugins durch ein Fading/Einblenden ersetzten? Ggf. wahlweise im Adminmenü?

    Wäre glaub ich auch ein super Effekt.

    Gruß
    Franky

    • Posted by nicolas on 25. July 2010 at 13:34.

      Thank you. Adding different transitions is on the todo as well.

      The plugin doesn’t work on your site btw, it looks like your wp_footer() call is inside the content div, it should be just before the closing </body> tag.

      • Posted by Franky on 25. July 2010 at 14:21.

        Hi Nicolas,

        habe ich jetzt hingesetzt. Seh aber keinen Unterschied zu vorher. Funktioniert genauso.

        Was mir aufgefallen ist: Im IE funkioniert jetzt der "weiter" Link im Artikel nicht mehr. Page not found.

        im Opera übrigens auch nicht. Im FF slidet die Seite nicht rein, sondern wird sofort aufgebaut.

        ciao
        Frank

        • Posted by nicolas on 25. July 2010 at 22:42.

          Yeah, looks like the animation doesn’t work properly in opera. Will look into that. For the other questions please provide a link to the page with the bug (and make sure the links work when the plugin is inactive). Thanks.

      • Posted by nicolas on 26. July 2010 at 14:57.

        New transitions have been added in 0.4. Enjoy.

        • Posted by Franky on 26. July 2010 at 17:21.

          Hi Nicolas,

          und hattest du mal Zeit dir das bei mir anzuschauen? Den Plugin hab ich ja wie gewünscht deaktiviert.

          Übrigens wärs gut, bei deinen Antworten ein @franky o.ä. vornedran zu setzen, damit man weiß, wen du jetzt eigentlich mit deiner Antwort meinst ;-)

          ciao…..

          • Posted by nicolas on 26. July 2010 at 19:03.

            Hallo Franky, click doch einfach auf "Reply to this comment" wenn du auf einen Beitrag antworten möchtest. Verstehe auch nicht wie hier unklar sein kann wem ich antworte…

            Das mit dem Fehler werde ich mir bei Gelegenheit mal anschauen, passiert anscheinend bei mehreren.

            • Posted by Franky on 26. July 2010 at 19:23.

              dann musst du deine Page mal etwas übersichtlicher gestalten. Bei den vielen Strichen auf der Seite weiß kein Mensch, auf was du dich gerade beziehst. Oder man muss eben genau die Striche zählen ;-)

              Nix für ungut……

              • Posted by nicolas on 26. July 2010 at 19:26.

                Nee also ich muß hier gar nichts. Wenn du mal mein Kunde sein solltest kannst du gerne Dinge von mir verlangen, aber nicht wenn ich Sachen in meiner Freizeit mache. Und so schwer ist’s doch wirklich nicht…

                • Posted by Franky on 28. July 2010 at 12:02.

                  langsam, jetzt sei mal nicht überempfindlich!

                  War nur ein Hinweis. Auch wenn man in der Benachrichtigungsmail auf den Link klickt, landet man nicht in seinem Thread hier, sondern am Anfang der Seite und muss dann den Thread wieder suchen.

                  So, jetzt nochmal zum Plugin. Also von 3 (vailden) Seiten funktiniert er nur richtig auf einer (www.sonjakay.de). Auf http://www.schachplatz.de läuft das noch nicht so geschmeidig wie er eigentlich sollte.

                  Hast du noch ne Idee?

                  ciao, Frank

  • Posted by 郭橐驼 on 25. July 2010 at 19:50.

    Hi Nicolas, no offendence but it seems this plugin is not working well with comments?
    e.g. it’s ok to load gtt.ideahere.info/2010/07/sorry-im-wrong/
    but when it turns to gtt.ideahere.info/2010/07/sorry-im-wrong/#comments or #respond , readers are guided to the 404 page and all the links in this page are unavailable.
    when i’m guided to the 404 page, the search button is available but other links are not.

    I don’t know why, is it due to my theme or the plugin itself?

    Browser:ChromePlus1.4 (Chromium 5.0)

    BTW, I’d like to contribute a translation of Simplified Chinese. Just tell me about the steps.

    • Posted by nicolas on 25. July 2010 at 22:46.

      Hi, hm, can you post a link to a page that has the faulty link on it and put the anchor into your comment? Your site is a little hard to navigate for me :-)

      I will release an update to the plugin shortly that includes the files that are necessary for translations. Stay tuned. You can read an introduction to i18n at http://codex.wordpress.org/Translating_WordPress

      • Posted by 郭橐驼 on 26. July 2010 at 05:34.

        it’s a little bit hard for me to explain it clearly in this text-only comment box… so i post a guide with snap pictures. Please turn to:
        http://gtt.ideahere.info/2010/07/how-to-catch-the-bug-of-ajax-for-all/

        Thanks for your patient answering.

        • Posted by nicolas on 26. July 2010 at 14:50.

          Hm, that’s odd. Can you send me a copy of the your theme? If yes please use my contact form and I’ll reply you so that you can send me the theme.

          • Posted by 郭橐驼 on 27. July 2010 at 19:36.

            Hi Nicolas, I’m coming again…
            I’ve upgraded to 0.4.1 and it is not disabled automatically. Does that means that my php version >= 5.2? But the problem with #comments, #respond, #more and #anything is still there…

            • Posted by nicolas on 27. July 2010 at 21:16.

              Ok, thanks for your feedback. I’ll look into this as soon as possible.

  • Posted by Ron on 25. July 2010 at 23:17.

    Hi Nichola , I’m trying to use your plugin but when a link is clicked the site simply hangs displying the loader… Any ideas?

    • Posted by Ron on 26. July 2010 at 07:17.

      Here is the link with an anchor

      http://ronluna.com/wordpress/?page_id=2#wordpress

      • Posted by nicolas on 26. July 2010 at 14:51.

        The plugin doesn’t seem to be active.

        • Posted by Ron on 26. July 2010 at 16:10.

          Upps… I’ve deactivated by mistake… But now is active… Click anywhere on the blog to duplicate behavior..

          • Posted by nicolas on 26. July 2010 at 16:22.

            It’s off again. I’ll do a few tests over here, maybe it’s related to your URL structure, just guessing. Odd.

            • Posted by Ron on 26. July 2010 at 16:26.

              This is what the error_log says

              PHP Fatal error: Call to undefined function filter_var() in httpdocs/wordpress/wp-content/plugins/ajax-for-all/inc/admin.php on line 176, referer: http://ronluna.com/wordpress/

              • Posted by nicolas on 26. July 2010 at 16:40.

                Oh, ok. Thanks for the report. Which PHP version are you using? I might just bump the version requirement to 5.2 and not activate the plugin if that isn’t met.

                • Posted by Ron on 26. July 2010 at 16:42.

                  yep… that’s what the problem is…I’m on CentOS 5.4 server with php version 5.1.6

                  Trying to upgrade php as we speak…

                • Posted by Ron on 26. July 2010 at 17:04.

                  updated to php 5.2.10 and working like a charm..

  • Posted by Wolfgang on 26. July 2010 at 17:04.

    Hallo,
    ich habe gerade Ihr Ajax-plugin installiert.
    sehr schönes plugin. Ein richtiger Eyecatcher.
    Was mir gerade auffällt ist, dass die seo-links sowohl im header als auch in der Suchleiste sich nicht ändern. Ist so richtig oder habe ich da was falsch gemacht? Ist das überhaupt relevant? Ich bin leider noch völliger Neuling in seo,php und html. habe allerdings überall gelesen, dass es wichtig für SUMA’s ist das sich bei klick auf die Seiten sich immer o.a. ändern soll.

    gruß
    Wolfgang

    • Posted by nicolas on 26. July 2010 at 17:13.

      Das ist richtig, durch die Aktualisierung der Inhalte mittels Ajax werden meta-info etc. nicht angerührt. Für die Suchmaschinen ist das in diesem Fall aber nicht relevant, da sie das JavaScript des plugins ignorieren. Die Seite funktioniert auch weiterhin in Browsern die kein JavaScript unterstützen.

      • Posted by Wolfgang on 26. July 2010 at 17:25.

        Super,
        das heißt ich kann das plugin bedenkenlos nutzen ohne das ich mir sorgen machen muß das ich nicht gefunden werde. Blöde frage aber ich lerne jeden Tag dazu.
        Ich bin mir halt nicht sicher, weil man soviel über SUMA und SEO ließt. Dies und Das ist/muß.
        Außerdem denke ich das WP auf suma/seo ausgelegt. Das Plugin – xml-sitemap habe ich auch installiert.
        Ergo – Alles gut – oder?

  • Posted by eakew on 27. July 2010 at 12:02.

    Hi, nice plugin!

    But I’ve a problem in "Continue reading" links, more tag (<!–more–>)

    Not Found

    Sorry, but you are looking for something that isn’t here.

    • Posted by nicolas on 27. July 2010 at 17:13.

      Hello eakew,

      I have just released 0.4.1 which will disable the plugin on all PHP versions < 5.2. I’m curious if the #more link problem is due to running older versions. Please report back if the problem persists.

  • Posted by Kar on 28. July 2010 at 12:58.

    Hello
    thanks for making this plugin but I have a problem with it.

    I have my own WP theme but Im sure that its made properly for use with this plugin. Everything that I need to refresh is in one div ..
    I have your plugin enabled. When I click on my WP page on any link, content of chosen div fades out, loading bar appears but thats everything :( Nothing will load.
    This happens even if I try to load for example older posts on my homepage (that means that the layout is absolutely the same as previous page)

    • Posted by nicolas on 28. July 2010 at 20:07.

      Hello Kar,

      I think I’ll have to add some kind of remote debugging ability to the plugin. Unfortunately I can’t find out what’s happening on your server. If you have access to the log files it would be good to take a look at the error log. Let me know if you find anything.

      • Posted by Kar on 28. July 2010 at 22:05.

        Wordpress error log shows nothing that could be related to this problem. :(

  • Posted by Bo on 29. July 2010 at 21:32.

    Hi,

    Just set up a fresh wp3/php 5.3.2/nginx 0.8.46. on a Win XP. Default theme. Installed Ajax For All, default settings. Upon post click, post disappears and spinner comes up. Then it’s stuck.

    Log:

    [29-Jul-2010 19:11:25] PHP Fatal error: Maximum execution time of 30 seconds exceeded in C:\nginx\html\wp3raw\wp-content\plugins\ajax-for-all\inc\admin.php on line 238
    [29-Jul-2010 19:11:25] PHP Fatal error: Maximum execution time of 30 seconds exceeded in C:\nginx\html\wp3raw\wp-includes\wp-db.php on line 560

    Hopefully this comes to some use. Great plugin!!

  • Posted by Ben on 30. July 2010 at 12:48.

    Hi Nicolas,

    I really like your plugin, however, my one issue is that once I click on an individual blog post, the URL remains as /blog. Is there any way to fix this.

    Thanks,
    Ben

    • Posted by nicolas on 30. July 2010 at 15:33.

      Hi Ben, this is very high on my todo list. I hope I can work on the plugin again soon. I want to fix the browser’s back/forward button, maybe that will fix the URL display as well. I’m not sure though.

  • Posted by nzr on 30. July 2010 at 14:42.

    Good day, nice plugin? thanx for it! I got only one question about it, is it possible somehow to turn it off on certain page? The reason why i’m asking is because i got trobles with image gallery (i’m using nextgen gallery plugin) & when i’m clicking on the image it opens in a blank window, instead of using lightbox. Probably you’ve got a solution for it. Thanks in advance.

    • Posted by nicolas on 30. July 2010 at 15:31.

      Hi, no, I don’t have a solution for that yet. I’m aware that this might happen, but haven’t found a workaround yet. Thanks for the report!

  • Posted by Kar on 2. August 2010 at 13:10.

    Ha, I found what was responsible for my problem. (please delete my last post, it has nothing to do with subdomains)

    http://codex.wordpress.org/Administration_Over_SSL

    If I’m using WP administration over forced SSL (as is descripted in link above)your plugin doesn’t work !
    Obviously plugin is trying to load something via http but it could be accessible only by https

    Can you fix this ? I need SSL…

    • Posted by nicolas on 2. August 2010 at 15:21.

      Hm, you can try to set the constant AFA_HTTP_CREDENTIALS to something. My dev server is on SSL + password protected. Please report if that helps.

      • Posted by Kar on 5. August 2010 at 13:07.

        Sorry but I dont know where to set it. If you tell me Ill test it.

        But you are running whole your web under SSL ?
        I use SSL only for administration. If I use command from link that Ive posted above, administration couldnt be reached without ssl. So the problem is that public web is under http and configuration files under https.
        If I run it http/http or https/https it works.
        Not in http/https configuration !

        • Posted by nicolas on 6. August 2010 at 00:29.

          Actually, http + https will probably never work because ajax requests must go to the same server the current website is on. See http://en.wikipedia.org/wiki/Same_origin_policy I guess.

          This is the problem with the WordPress ajax handler itself, and that WordPress simply doesn’t have one that’s outside wp-admin/. I’m afraid my plugin won’t work in that setup, no ajax plugin should work.

  • Posted by Gijs on 4. August 2010 at 09:43.

    Great great Ajax plugin, however it seems not to use the user credentials.. (all the Edit links below pages and posts are not available) (using the 2010 theme)..

    • Posted by nicolas on 4. August 2010 at 14:02.

      Hm, it should, but I’ll look into that. Maybe the edit links are outside the main content div?

      • Posted by Gijs on 4. August 2010 at 18:21.

        I’m not a template guru but I’ve had a look into page.php of the theme. The edit link ( with some parameters is in the content div. An other thing I’ve noticed and that confirms that the site things the user is not logged in : The user is shown a full commenting window (name, email, website etc) even when logged in..

        • Posted by nicolas on 4. August 2010 at 23:04.

          Hm, ok, thanks for the update. Can you send me a list of plugins you use? The comment form should be displayed correctly when a user is logged in, but I’ll have to verify that again.

          • Posted by Gijs on 5. August 2010 at 16:20.

            For your comfort I’ve tried to disable all the plugins installed, with no diference at the end. An overview of my WP system:
            WP 3.0.1
            plugin (all latest version):
            Akismet
            Flash MP3 Player JW2.3
            Login With Ajax

            I don’t really think it has something to do with the plugins,;..
            Schreikasten
            WP-Table reloaded

            • Posted by nicolas on 6. August 2010 at 00:24.

              Ok, thank you!

              • Posted by Gijs on 9. August 2010 at 16:28.

                I looked again into the plugins, and the theme and to my rookie eye they seemed to be fine.. This theme should be compliant since it’s the standard theme of WP 3 ..

                • Posted by nicolas on 9. August 2010 at 18:30.

                  Hey, yes, I’ve seen some glitches on my dev server as well. Unfortunately I didn’t have the time to look into it yet. Hopefully at the end of this wekk.

  • Posted by Hi on 5. August 2010 at 01:58.

    Hi Nicolas, It works with IIS version? I used the IIS version and it can’t work… I used the motion theme.

    • Posted by nicolas on 5. August 2010 at 09:59.

      Hi Hi,

      I’m afraid I don’t know anything about IIS, I have never used it.

      • Posted by Hi on 5. August 2010 at 10:28.

        Oh, I found many fields in DB named like “_transient_”. Are they uesd by the plugin?

        • Posted by nicolas on 6. August 2010 at 00:24.

          I don’t think so, but I’ not sure. The plugin should only use the wp_options table afaik.

  • Posted by Kar on 5. August 2010 at 14:38.

    And suggestion for new feature :)
    Make possible to define some div in which your plugin wouldn’t catch clicks on links.
    If I have links for other sites it would be usefull

    • Posted by nicolas on 6. August 2010 at 00:26.

      Yeah, that sounds like a good idea. External links should already work, but there’s need to run some JavaScript for all of them.

  • Posted by John on 10. August 2010 at 00:19.

    hi,

    great plugin mate but their some errors, though their is a sliding animation but my browser refreshes all the time. visit my website to see more what i’m trying to say.

  • Posted by 7stars on 21. August 2010 at 22:05.

    Hi there,
    please, how to use it with Mystique Theme from digitalnature, and with adsense support? Nothing to do with adsense? Thank you very much ;-)

    • Posted by nicolas on 21. August 2010 at 22:51.

      It’s not possible at the moment to use the plugin with adsense. I’m working on a total rewrite, but that’s wont fix that either as far as I know. Google prevents moving ads around, so a generic plugin will have problems with this. A custom solution might work though.

      • Posted by 7stars on 23. August 2010 at 07:22.

        Hi Nicolas :-)
        i tried with the default twenty ten theme and it works but i have problem with Shadowbox Js plugin…images and video don’t work in overlay mode anymore. How to solve incompatibility? Then…if into the post there is a youtube video, it appears two times before fade out…

Leave a Reply

Your email is never shared. Required fields are marked *

*
*