Ajax For All WordPress Blogs
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.
WordPress plugin demos are disabled as I don't use WordPress on this site any more.
Tried out the demo page. Best use of Ajax + Wordpress I've seen yet!
great work
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.
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
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.
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
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.
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
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.
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.
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
Hi Nichola , I'm trying to use your plugin but when a link is clicked the site simply hangs displying the loader... Any ideas?
Thanks Nicolas for your answer,
I will wait for you to include this function in one of your next version.
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.
Here is the link with an anchor
http://ronluna.com/wordpress/?page_id=2#wordpress
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.
The plugin doesn't seem to be active.
New transitions have been added in 0.4. Enjoy.
Upps... I've deactivated by mistake... But now is active... Click anywhere on the blog to duplicate behavior..
It's off again. I'll do a few tests over here, maybe it's related to your URL structure, just guessing. Odd.
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/
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.
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...
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
updated to php 5.2.10 and working like a charm..
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.
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.....
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?
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.
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......
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...
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.
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.
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...
Ok, thanks for your feedback. I'll look into this as soon as possible.
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 www.schachplatz.de läuft das noch nicht so geschmeidig wie er eigentlich sollte.
Hast du noch ne Idee?
ciao, Frank
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)
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.
Wordpress error log shows nothing that could be related to this problem. :(
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!!
Hi Bo, thanks for your report! I think I know how to fix this.
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
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.
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!
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.
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...
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.
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)..
Hm, it should, but I'll look into that. Maybe the edit links are outside the main content div?
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..
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.
Hi Nicolas, It works with IIS version? I used the IIS version and it can't work... I used the motion theme.
Hi Hi,
I'm afraid I don't know anything about IIS, I have never used it.
Oh, I found many fields in DB named like "_transient_". Are they uesd by the plugin?
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 !
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
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
I don't think so, but I' not sure. The plugin should only use the wp_options table afaik.
Ok, thank you!
Yeah, that sounds like a good idea. External links should already work, but there's need to run some JavaScript for all of them.
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.
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 ..
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.
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.
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 ;-)
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.
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...
Hey!
First of I love your feature here, gives an nice proffesional look to sites.
However I stumbled across a problem.
I'm using Widget logic and specified that the widgets should only appear in "blog" section. However when using your plugin, it either removes all Widgets or make em stay on each and every page on my site. Since widgets are an important part of several blogs, including mine, I think there may have to be a fix on this :)
Other than that, I love the plugin!
Keep up the good work!
-Tor
Hello Tor,
if the widgets are outside the div that the plugin updates, they won't update of course. This could be changed by manipulating the theme, I think that's covered in the plugin's docs.
Thanks!
didn't wanted to use wordpress, i was searching for ajax scripts for my new blog. found this. and i am switching to wordpress again. awesome plugin man!
Hey :-)
I'm glad you like it, but keep in mind that various users ran into problems with this plugin, and I don't really have the time to work on it at the moment. But I think that I mention all limitations in the readme.
Hey Nicolas,
First of all I want to thank you for this plugin. It is great to finally see correct Ajax implementation in Wordpress. Thou Im having same problems as 郭橐驼 with #respond, #comments and other anchors in links. I will wait with great excitement for a new update for this plugin.
Another problem which I encountered, is that when you click on "older posts" second time plugin reloads whole page and add to the URL "?ajax_for_all_curl_user=admin&ajax_for_all_curl_nonce=a98ba34525" this part. From this point plugin stops functioning at all...
And BTW it happens only when logged in.
Hey, yeah, I have seen this but have been unable to reproduce the problem. Anyway, I think I'll have to rewrite the plugin completely if I want it to work on every blog out there.
Ajax isn't that hard to implement, but making it work on all sites is another matter :-)
Well yes... It's like more you analyze, more problems occur. Thou I hope you will not put your hands down :]
I have problem with link "comments", when i click comment i get 404 page and after this my other link not working. Sorry for my english.
Hi Nicolas. I have decided to create a template under your plugin, can id = “content” in the form of the frame will more optimal decision?
Hello is development of this plugin still in progress or it has stopped ?
Hi, Aleksey, I'm afraid I don't know what you mean.
I plan to update the plugin, if I find a decent solution to the described problems. Unfortunately I don't have much time atm to work on this.
Hey,
Another common problem with implementing Ajax is that content loaded through Ajax does not trigger other plugins, or Java scripts. I managed to solve this temporarily just by modifying some plugins by adding LiveQuery. But as you can see it is not optimal solution, cause you need to manually edit other plugins. I don't know is there any other solution for this, but I thought you should know that :]
Oh I have different ideas for how to fix this, but I just don't have the time. Thanks though :-)
Hi Nicolas, thanks for the great plugin, I use it on all my blogs, it adds a little something that missing from a lot of pages out there. Who wants to see your screen flash white and then slowly load a page that looks almost the same as the page you were just on? Not I!
If you could take a look at my site I'd appreciate it. I am using the "Audio Player" plugin and everything works fine until you click on one of the page links, then the player disappears on the page refresh! It's still there in the source, but just isn't visible anymore. Any help with this would be appreciated.
~Xanthe
This is what made me not activate the plugin yet. Really great plugin though ;)
hi nicolas,
im using your plugin but i have got a problem.
when i active the plugin and changing the page my account log out. When i put the login page on footer its OK no problem because footer doesnt change when i change the pages. what can i do siderbar or logout problem ?
im sorry for my bad english
Can you please tell me a theme that works fine with this plugin?
It is possible to use this plugin with some theme and avoid the resfresh of the header and the sidebar at all?
Example: If if have a flash element on my sidebar or in my header, this element will stay the same after the resfresh of the content? Or it will load again?
I hope you can help me.
Thanks!
The plugin works with all themes I tested. However, no, your sidebar most likely won't be updated. Basically, at the moment the plugin only works on very simple sites that use no other plugins that use JavaScript.
I think Ajax is very powerful given your demo. I will try it myself.
Hello Sir,
Will this plugin also work with Thesis?
thx
I haven't tried thesis. The plugin runs in admin-only mode by default, so that you can test it.
Thx for the prompt reply.
I'll do just that and let you know what happens!
thx again
Great plugin, thanks! I have a conflict in IE browsers. I'm using curvycorners.js to produce rounded corners in Internet Explorer browsers. However, when the page refresh happens, the body length with the curves pretty much stays the length of the front page. For instance the contact page. If I remove curvycorners.js, everything works well. Any thoughts?
Not really, I don't use javascript to make round corners. I hope to get to work on this plugin again over the holidays.
Hi! It's a great plugin!
But I found a problem for my wordpress!
When I click any homepage posts(not top and sidebar links),it's can not load the post and shows white page...
but I click [top] and [sidebar] link,it normal!
how can I fix this problem?
google chrome shows :
Uncaught SyntaxError: Unexpected token <
sidebar link is the same
Hi Nicolas
Do you know of any issues related to opening a new window using the target=_blank? I have several links to google maps I want to open in new windows, but the seem to open in the same window. Thanks and have a great holiday season!
Hey Ted,
thanks for reporting this. I have fixed the bug and am just uploading a new release.
I also fixed the history back/forward buttons at last. And it is now possible to bookmark a page that was accessed through ajax as well.
Wow, never expected such a great turnaround! OK, I installed the new version but doesn't seem to work.
The link is on aryanalaw.btwimages.com under office locations, code:
<a href="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=2010+Corporate+Ridge+Suite+700+McLean,+Virginia+22102&sll=37.0625,-95.677068&sspn=56.375007,85.078125&ie=UTF8&hq=&hnear=2010+Corporate+Ridge+%23700,+McLean,+Fairfax,+Virginia+22102&z=17" rel="nofollow">View Map</a>
Thanks!
Oops, you're right. I accidentally removed that code while fixing the back button. I'll upload a fix in a minute.
I'm on it like white on rice! Works great, you rule! Thank you!
The updates in v0.5 that seem deal with the page location seem to conflict with the address tracking scripts I was already using prior to the update [ http://www.asual.com/jquery/address/ ]. In the current configuration at lest my blog does not work correctly anymore when v0.5 is activated.
My suggestion is that you make your address features a setting that people can turn off if they don't want it?
That's interesting. Yeah, I see how 0.5 could interfere with such plugins. I suggest you downgrade for now, I'll upload an update later this week. Thanks for reporting this.
Yeah, it's me again...any report from folks on the interface becoming unresponsive after a certain peruiod, kinda like it needs to wake up? I see it both on windows and a mac, after leaving the window, the menu buttons need to be clicked several times after the focus returns before anything happens.
Thanks!
Hm. This sounds like a server timeout to me. I'll look into how to work around this, thanks for reporting!
Nicolas, thanks for the update, the new URL's make a lot more sense. However, the ability to leave comments from the main page still appears to be broken.
Hi,Nicolas
Thanks For the great plugin but let me tell you that when activated(Ajax For All) it starts working but link clicked in my blog after that returns back to home-page after a short interval of time.
Can you help me out
Thanks!
Thanks for the report. I don't have comments enabled on sites where I use this plugin, but I'll look into this.
Hm, I can't reproduce this.
I am also seeing this bug on my blog. After navigating to a different page, or after entering a url to visit; a short amount of time will pass then the ajax area will load the homepage.
I thought this was the conflict with my plugin i reported before. I've disabled my address plugin to test, and this homepage loading bug is still happening.
I'm using a custom class for the area that loads, is Aman? Perhaps that is a rootcause / reason why you can not reproduce it? But I have no idea
Hello,
Thank you for the plugin.
I have a question. Your plugin is activated and I want to use a slideshow on my home page.
The slideshow loads well the first time (first visit on the site or after a refresh). But after visiting other page and go back to the home page, the slideshow didn't load well.
So is it possible to deactivate your plugin just for the Home link (or home page)?
Hi,
no, that's not possible at the moment. But I guess it could add a feature that disables the plugin on links that have a certain class/ID. I think that would solve your problem?
I could as well limit it to some class/ID. Hm, yeah, I think I'll add that in the next release.
Sounds good :)
Thank you for your reply. I will wait the next release.
I was able to modify ajax-for-all.js so that it will run all the jquery commands normally run when a document is ready. This makes it possible to allow newly loaded pages to have lightbox galleries, etc. on them.
In ajax-for-all.js just add
$(document).trigger('ready');
after line 32.
so.
<pre>
if ( this.completed == 3 ) {
div.reveal(this.tmp);
this.completed = 0;
}
</pre>
becomes
<pre>
if ( this.completed == 3 ) {
div.reveal(this.tmp);
this.completed = 0;
$(document).trigger('ready');
}
</pre>
btw, this plugin is AMAZING!!!!
Cool, thanks, I'll look into adding this as well. The next release will take a little time though.
:-)
Hi, this plugin is working great, unfortunately it doesn't load my thumbnails on each new page. Is there some sort of img code I can add to the plugin's js for it to load them?
Site: http://chopur.com
(deactivated for now)
Hm, that's rather odd. I don't see why this wouldn't work, except maybe that you use background images instead of real images. I'll investigate once I get around to work on the plugin. Thanks for reporting this.
Ah, that's probably the culprit. Great, I'm looking forward to seeing more things from you, thank you.
var objProperties = ''; function AjaxForAllCallback(tmp) { // This updates the currently selected tab after an AJAX reload: CheckToHighlightTab(tmp.href, 25, 50); } function CheckToHighlightTab(tabIdentifier, maxAttempts, attemptFreq) { if (jQuery('#menu-main > li').length > 0 && jQuery('a[href="' + tabIdentifier + '"]').length > 0) { jQuery('#menu-main > li').each(function() { jQuery(this).removeClass("current-menu-item"); }) jQuery('a[href="' + tabIdentifier + '"]').parent().addClass("current-menu-item"); return; } else if (maxAttempts > 0) { maxAttempts--; setTimeout("CheckToHighlightTab('" + tabIdentifier + "', " + maxAttempts + ", " + attemptFreq + ")", attemptFreq); } }
Works perfectly! Hope this helps others.