Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 7    Views: 55

CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
09/26/13 08:37 PM (12 years ago)

Showing high scores

Using the following instructions http://www.buzztouch.com/appdata/sample-scoreboard.txt. I created a database in mysql then pasted the script in the database on phpadmin and made sure all the tables were there.next I made a .php script using the example and uploaded it to my server.I made sure to enter db credentials in php script. Next I pasted the url of the script(i.e. http://www.myurl.com/myphpscript.php) in a webview plugin .I then pasted the example url with brackets of data to send on the part that says "send results to url".I did change the url to my specific one.I have a button well on a list view on the menu that opens of the webview.I ran through my quiz and it said invalid request as if it never sent amything? Can anyone point me in the right direction?
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
09/26/13 09:21 PM (12 years ago)
this is the url I used for the send results to url space http://www.coffeineera.com/802hiscores.php?command=getQuizScoreboardData&appGuid=[buzztouchAppId]&apiKey=[buzztouchAPIKey]&screenId=[screenId]&deviceModel=[deviceModel]&deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&totalPoints=[totalPoints]&totalSeconds=[totalSeconds]&numberOfQuestions=[numberOfQuestions]&numberCorrect=[numberCorrect]&numberIncorrect=[numberIncorrect]
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/26/13 10:20 PM (12 years ago)
Have you done anything manually using a regular browser? I'll usually check my scripts first via a web browser or http client to ensure it works, and then start with the app... This is the one I use: http://ditchnet.org/httpclient/ I think it's free, but if it isn't there ARE free ones in the app store... might take a little searching, but I've seen'em looking for other stuff. Cheers! -- Smug putting your url in the client, I get this: <br /> <b>Fatal error</b>: Call to undefined function fncreateguid() in <b>/home/chrisc18/public_html/coffeineera.com/802hiscores.php</b> on line <b>210</b><br /> when the url string is 'unedited' and when I put this in: http://www.coffeineera.com/802hiscores.php?command=getQuizScoreboardData&appGuid=EA1BC605F816C71920E33A6E4&totalPoints=7&totalSeconds=60&numberOfQuestions=10&numberCorrect=9&numberIncorrect=1 (I did cut out some of the superfluous data) I got this: {"childItems":[ ]} It's working; almost. I may not have the right variable values to get a valid response. So it'll take a little testing on your side. Let me know if I can help somehow.
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
09/26/13 10:51 PM (12 years ago)
Cool thanks I have an android though.im using the nad quiz plugin.I think that the one for android.ill look to see if there is any android versions of the recommendation.I assumed It worked since I got the invalid request text.idk
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/27/13 03:38 AM (12 years ago)
But, php on the server is platform independent. I wasn't using my iPhone or Android tablet to test this; I used my laptop. If you're running on Windows, not Macintosh, then I'm certain there is an equivalent package around... This might work; it's java based... http://code.google.com/p/rest-client/ Cheers! -- Smug
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
09/27/13 06:08 AM (12 years ago)
O ok thanks!
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
09/27/13 07:19 AM (12 years ago)
I also dont have a login for the user as I see in the script..can I use the login plugin when my app starts? I couldnt get that configured
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/27/13 04:35 PM (12 years ago)
I haven't messed with that either, but you'll need to figure out a way to differentiate one user (or device) from another, so that the scores entered/retrieved would be the correct ones. Cheers! -- Smug
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.