Ajax Registration Feedback

Started by Hambil, March 19, 2007, 06:55:27 PM

Previous topic - Next topic

GodOfWonders

Tested in both Mozilla and IE 6.

Hambil


www.catnine.net/smf


Hambil

Error: response has no properties
Source File: http://www.sofakinggamers.com/forums/Themes/classic/AjaxRegFed.js
Line: 37

So the ajax is working fine. However, xml isn't being returned correctly. Is there anything in the admin error log?

www.catnine.net/smf

GodOfWonders

Nothing pertaining to the mod that I see....a few errors from some stray code left behind by mods I hadn't noticed but that's about it.

Hambil

I'll need an admin login/ftp access to do much more I'm afraid :( If you are willing I'll be happy to help though.

www.catnine.net/smf

GodOfWonders


Hambil

It looks like a joomla issue. If you go to your forum page, and click on register from there, instead of using the link in the joomla/portal registration box, it works great.

www.catnine.net/smf

GodOfWonders

hmmm so looks like I might have to alter an option or some code in Joomla then?

Hambil

That's my guess. I don't know how joolma works though. However, it is definitely not an issue with the mod. Still, that said, if we can figure this out it could help others with similar portal issues.

www.catnine.net/smf

GodOfWonders

Well I'll take a look at the smf bridge, the mod, and joomla to see if I can see where the conflict lies.  More hours of staring at code. Oh well you want something to work you gotta stare at it for awhile.  ;D

Hambil

What I can tell you, is that it looks like a url issue. The ajax code just uses a relative path, e.g. index.php?action=ajaxreg_checkusername&xml=true&username=Hambil

It would appear that joomla, or the portal/bridge, is doing some redirection (embedding the forum inside itself in a frame or something) and that is causing the problem.

www.catnine.net/smf

GodOfWonders

So would it be possible to make the AJAX code do the same thing or no?

Hambil

javascript does not have access to your php vars like $forumdir. In addition, I'm not sure how it would know where it is being called from. I don't think this is a problem that can be fixed from the mod, but, I'm still looking into it and thinking about it.

www.catnine.net/smf

Niteblade

Quote from: Harro on March 20, 2007, 08:42:25 AM
Nice!
Definatly something that should be a default feature in the future!

Yes, it should.
affiliate blog

GodOfWonders

ok I fixed the problem. It works fine now. Basically I just edited the AjaxRegFed.js file.  As you can see the SMF bridge is a component adding com_smf to the link so if I take:

http.open('GET', 'index.php?action=ajaxreg_checkusername&xml=true&username=' + document.creator.user.value);

and change it to:

http.open('GET', 'index.php?option=com_smf&Itemid=26&action=ajaxreg_checkusername&xml=true&username=' + document.creator.user.value);

it calls from the right url.  Thus working for SMF integrated into Joomla. :)

Hambil

Nice, thanks :)

What is Itemid? Is there a significance to 26? If I wanted to make a joomla fix for this, how would I know the proper Itemid to use?

www.catnine.net/smf

GodOfWonders

hmmm not really sure what the Itemid is. I'll look into it but apparently it's important cause when I removed it from the url the ajax stopped working. :/


diegolyanky

Quote from: Hambil on March 31, 2007, 10:29:31 PM
Copy the AjaxRegFed.js to your Helios_multi directory.

Thanks ... Solved.

I see the code and I think: this archive, could be on my theme folder ... Then, I  see this reply and I copied the file .

Now is working.

Thanks !!
SMF ... SimpleMachines ... Simple, but complete if you want it ;)

Advertisement: