AJAX action token regenerator

Warning: This plugin has't been updated in over 9 years. It may no longer be maintained.

What you can do to help:

Creates a new token available to all javascript methods to get a valid action token

Last updated
Recommended Releases
Elgg Release Download Date Links
1.61.314159265 (7.37 kB)2010-Feb-01
Show all releases

Basically this plugin is used to regenerate Elgg Actions Tokens for long running AJAX based pages. It will automatically go get a new token every interval.

You only need this plugin if you're using lots of AJAX calls which are validated via the action_gatekeeper() and the pages which those AJAX calls run on could last longer than the default timeout for an action token (i.e. 1 hour).

Use getElggTimeStamp() and getElggToken() in your JavaScript code to get the more recent token, the token is (by default) updated every 50 minutes (although this can be customised in the plugin's settings), so in JQuery you might so something like:

$.get("/action/your/ajax/action", { __elgg_ts: getElggTimeStamp(), __elgg_token: getElggToken() } );

 

 

Stats

  • Category: Tools
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 907
  • Recommendations: 1

Other Projects

View Milan's plugins