can you help me fix this new ajax plugin?

i have just uploaded the current working version of the supajax plugin to github here:
https://github.com/propertunist/elgg-supajax

the plugin is not finished and i am stuck with a strange bug that i have not yet been able to resolve and am looking for any coders to help fix it.. 

overview:
the plugin replaces tabbed areas of pages in elgg with ajax loaded tabs.. plus i am adding in other features, such as sorting/filter tools for lists that are also ajaxed.

the bugs:

the listing for groups (groups/all) currently has an ajax issue where for some reason the tabs for group lists that are added via the group_tools plugin are causing the whole page to be loaded twice (once inside the tabbed list view - instead of loading only the list data).. this was ok in earlier versions of the code, so something i have changed has caused this.. to recreate the bug you will probably need to install group_tools. the other issue is that the filter box i have added (currently only for the tidypics page) does not properly handle the combination of filter parameters, tabs and url addressing.. i haven't yet added the elgg_ajax view approach to the way ajax is coded, so maybe that will help the situation. any tips welcomed. the main issue i am asking for help with is the groups one since it is 'bugging' me! ;)

the other lists mostly are working ok.. so this is quite odd..

the code is very rough presently, once the bugs are ironed out i will go through and optimise the structure of the code and improve the efficiency.

anyone is welcome to test this in elgg 1.8 - do not run it on a production site - some parts are broken. ;)

  • @rvr - thanks for those.

    i did install evan's plugin and saw that it was incomplete and that he had identified unresolved bugs with that approach.. i see he pointed to glitches with text editors for example..

    i did not know the full details or effectiveness/completeness of the history API approach when i started coding supajax, so i used what i already knew to be effective. since there has been very little open discussion of this topic and his thread is nearly 1 year 'old' - i was not particularly inspired to go that route. i am interested now though - i particlarly want to add support for audio to my site that is uninterupted as pages are changed.. (and that is paused when youtube videos are played etc.). i am thinking that the ajaxify/history api would aid in that.. (plus maybe the html5 audio stuff).

    is there a reason why this history api approach is not already integrated into a plugin for elgg?
    are you or pawel interested in doing so? maybe the structure of this plugin i have evolved would be a beginning for that? (or maybe just for inspiration)... is anyone interested in joining in to make that plugin a reality?

  • i just downloaded the ajaxify code from webgalli's github page.. and tested it.
    i saw that the entire pages are being loaded via ajax so that the only observable difference with the code active is that the page fades out on page change and that the url now contains all the parameters instead of being a simple parameterless string..
    so i'm not seeing how that is an improvement..

    i think of ajax as being used to load page elements, not entire pages.. though maybe i am missing some aspect of that webgalli code.

  • this gave my dev environment a white screen

  • i wasn't the last one to update to the github repo, but it should be ok. 

    what is the php error that caused the issue for you? (you may need to enable php error notification)

  • @ [cim], The reason why you are getting the white screen is that in   elgg-supajax-master from github should be renamed supajax in your mod folder move the whole plugin from mod, flush the catch then

     in the start.php line 10 replace:

    require_once($CONFIG->path .'ChromePhp.php'); 

    with this:

    //ChromePhp is a PHP library for the Chrome Logger Google Chrome extension.

     require_once(dirname(__FILE__) . '/lib/ChromePhp.php');

    Then go to this address https://github.com/ccampbell/chromephp and grab ChromePhp.php file and place it inside mod/supajax/lib/ChromePhp.php

    Now you can activate the plugin and test it.

    Hope this will help

  • ah i thought juho had removed the chrome reference which i left in by accident... thanks tom.

  • nice, now it works. thanks tom.

    @ura the sliding effect isn't necessary lol

  • i think there are 2 different modes for the page loading and i had it set that one that makes the slide.. i haven't looked at this code for a few weeks now and don't recall exactly which one does what. you can change it in the js config.

  • the plugin is great but doesn't seem to play nice with my theme