Problem with the Get Object
Now the Get Object seems to be working wonderfully...however I have a slight conundrum that I cannot seem to figure out.
I am using the Get object to pass the username from a currently logged in PHPBB3 message board to MMF2.
I am "getting" a php script and returning the echoed text.
However, it seems that the echoed text is not what I was expecting.
When I navigate to the php file on my server (once logged into the site) my username is echoed just fine.
However, I always receive the username of "Anonymous" with the Get object.
"Anonymous" is echoed when a user hasn't logged in.
Now normally I would just create a login system within the MMF2 application, but this certain application is embedded within the message boards and it needs to immediately have access to the username that is logged in.
My PHP script works perfectly...but I think using the Get object isn't passing along sessions/cookies.
Is there any alternative to the Get object that I could use to achieve what I am trying to do?
Possibly passing cookies from the current website to MMF2?
Re: Problem with the Get Object
Maybe you could use a workaround with vitalize, javascript, and the global function object, where you have your vitalize app using java script to communicate with the PHP script, then the vitalize app sends the data to the main app via the global function object. It might not work but it's definantly worth a try until Jamie can give his input. :)
Re: Problem with the Get Object
I was able to solve my problem...but only when using Vitalize.
Basically I got rid of my entire php script and just used the Vitalize Plug-in's "Call Function". I added this small script right before I embedded the MMF2 app
<script type="text/javascript">
// Get user name
function GetUserName(){
return "{S_USERNAME}";
}
</script>
Since PHPBB3 uses templates and whatnot, it automatically changes {S_USERNAME} into the currently logged in username.
It works perfectly and the username is readily available to the MMF2 app.
The only problem I now face is if I can use this method by having my app as a java application.
Is there an extention other than Vitalize that can use the "Call Function"?
Re: Problem with the Get Object
I've further expanded my app, but I am still restricted to the Vitalize Plug-in. Is there any working java extension that can use the "Call Function"?
I know the Vitalize and Flash extensions can do "Call Function".
Any java ones?
Re: Problem with the Get Object
"However, I always receive the username of "Anonymous" with the Get object."
SpineRaptor, maybe the login system of PHPBB save the navigator hash for security and use cookies, and with Get Object, the cookies of the navigator aren't used, this can explain why you fail at login. Try to pass POST elements (Add POST data)
Re: Problem with the Get Object
I have already solved the login problem by using the "Call Function" with the Vitalize extension, as my previous post states.
I am now trying to find a way to build the application as a java app. I just need to find an extension that can do a "Call Function" like the Vitalize and Flash extensions, but work when exported to java.
Any further help?
Re: Problem with the Get Object
The Vitalize object works in Java. It isn't meant only for the Vitalize plugin.
Re: Problem with the Get Object
When I try and export the app as a jar file I get the message,
"Impossible to save the JAR File: the Java version of the following extensions is missing:
Vitalize! Plug-in (kcplugin.mfx)
Install these extensions and then try again."
So it would seem that the Vitalize object does not work in java.
Is this correct? Can anyone confirm this?
Re: Problem with the Get Object
Hm strange, it lets me export it just fine...
Re: Problem with the Get Object
I found another thread about this problem, but that was back in March, and it doesn't seem like anyone found a solution to it then either.
I guess I am missing the kcplugin.jar file? If there even is one.
They were saying it might have been removed by accident in the most recent update?
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=179622