xAjax in CB Component - Anyone already done this?

17 years 11 months ago #13200 by Caspar
I am using do modules for joomla that use AJAX
A shoutbox...works great.
And a "Who is Online" module, which updates the users every 30 sekonds. Very nice. After 5 minutes the name fades away and says "aways" behind his name. Just like ICQ! And also the guests online are updated as well!

check it out at: www.st-sebastian-beckum.de

Do me a favour an go to www.st-sebastian-beckum.de and click on the green image, which says TOP 50 and vote for the page. Thanks!

Please Log in to join the conversation.

17 years 5 months ago #25822 by pointri
Ah, this is a thread worth bumping.

I'm in the middle of developing a CB plugin using XAJAX at first, and likely using Phil Taylor's XAJAX system plugin second. It's a proof of concept that just allows for updating a database table and returning responses based on those updates without refreshing the page: nothing too fancy.

It's behaving as expected with XAJAX included within the plugin package, but I'm running into a brick wall about where exactly I should point the URI to get at the function in or around the plugin that handles the response.

[code:1]$xajax->setRequestURI($mosConfig_live_site.'/index2.php?option=com_comprofiler&task=userProfile&tab=mytab&no_html=1')[/code:1]

and nearly any other permutation of this except 'task=done' returns the component's HTML output (&task=done returns nothing, as expected). Pointing the URI back to the plugin obviously doesn't work, either.

Is there some effective way to use the CB API to listen for XAJAX calls? Is this possible without hacking comprofiler.php with a new task?

Post edited by: pointri, at: 2006/11/29 20:24

Joomlapolitan zealot and a somewhat stealthy, rather passive CB3PD developer.
www.constructionlounge.com Construction Lounge: Online resource and networking portal for the construction and remodeling industries.

Please Log in to join the conversation.

17 years 5 months ago #25829 by geeffland
pointri,

If you go to cbconnector.com and register I will set you up with access to an alpha version of the cb connector which uses a modified version of Phil's xajax mambot and provide some guidance as to how the xajax part works.

Unfortunately Phil has not updated his mambot (and J1.5 plugin) lately... I have sent him modifications that will allow it to read xajax modules from CB plugins as well as the components that he already does that for...

My plugin originally included its own copy of xajax but my co-developer was using some of Phil's other software on one of his sites and saw that the 2 xajax instances interfered with each other... so I modified ours to use Phil's mambot...

Some of the issues you are running into sound familiar... now I keep the php functions that I am hitting with xajax in seperate files to avoid html issues... will explain more when you take a peek... (Should have posted info here a long time ago... seems like you never have enough time)

Greg

CB3PD Developer - CB Connector (formerly phpBB Connector) plugin

Please Log in to join the conversation.

17 years 5 months ago #25833 by pointri
geeffland wrote:

If you go to cbconnector.com and register I will set you up with access to an alpha version of the cb connector which uses a modified version of Phil's xajax mambot and provide some guidance as to how the xajax part works.


Thanks, sounds fantastic! I'll be over there shortly.

Some of the issues you are running into sound familiar... now I keep the php functions that I am hitting with xajax in seperate files to avoid html issues... will explain more when you take a peek... (Should have posted info here a long time ago... seems like you never have enough time)


I figured that a solution might have something to do with keeping the response functions away from the plugin class, but I can certainly identify with the not having enough time part. Explaining the solution sometimes takes longer than the solution itself, so I appreciate having the opportunity to look at the code.

Joomlapolitan zealot and a somewhat stealthy, rather passive CB3PD developer.
www.constructionlounge.com Construction Lounge: Online resource and networking portal for the construction and remodeling industries.

Please Log in to join the conversation.

17 years 5 months ago #26029 by pointri
So the end result: I took your advice, rearranged the plugin to depend upon your revised XAJAX mambot, and I can testify that having XAJAX work in a CB plugin is marvelous. Used frugally to speed up the interface, it can greatly enhance the workflow for profile editing. Thanks for all of your efforts, Greg.

Unfortunately Phil has not updated his mambot (and J1.5 plugin) lately... I have sent him modifications that will allow it to read xajax modules from CB plugins as well as the components that he already does that for...


Maybe he's waiting on the outcome of the 0.5 beta of XAJAX released not too long ago? Either that or a stable version of the plugin would imply a way to register functions in mambots and modules as well?

Post edited by: pointri, at: 2006/12/02 01:52

Joomlapolitan zealot and a somewhat stealthy, rather passive CB3PD developer.
www.constructionlounge.com Construction Lounge: Online resource and networking portal for the construction and remodeling industries.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.677 seconds

Facebook Twitter LinkedIn