| Index | Recent Threads | Unanswered Threads | Who's Active | Guidelines | Search |
| World Community Grid Forums
|
| No member browsing this thread |
|
Thread Status: Active Total posts in this thread: 7
|
|
| Author |
|
|
Former Member
Cruncher Joined: May 22, 2018 Post Count: 0 Status: Offline |
Is it possible to get the current badge icons I have earned onto a homepage? Or can you only see then inside the WCG pages and forums?
|
||
|
|
JmBoullier
Former Community Advisor Normandy - France Joined: Jan 26, 2007 Post Count: 3716 Status: Offline Project Badges:
|
They are normal pictures, so you can place them in your home page if you want.
----------------------------------------If you want to automate the process you can use a command like that http://www.worldcommunitygrid.org/stat/viewMe...ame=acrux%20&xml=true to get your current status. Cheers. Jean. |
||
|
|
Former Member
Cruncher Joined: May 22, 2018 Post Count: 0 Status: Offline |
Thanks Jean,
I went to the link you gave and it just showed me a lot of source code XML?? I don't know how to put this onto my webpage but I think I can find someone at work here who will know what this means. My homepage is a simple HTML one at present. Binocular webpage www.binoscope.co.nz |
||
|
|
Former Member
Cruncher Joined: May 22, 2018 Post Count: 0 Status: Offline |
Hi,
What language are allowed on your website ? Php ? If php is allowed, i can help you if you want (you just need to parse XML feed, and extract the informations wanted, after it's juste some php, and html). See some function : SimpleXML You can try this :
With this code, you will be able to see in an array all informations of you feed (http://www.worldcommunitygrid.org/stat/viewMe...erName=acrux&xml=true) Each informations will normaly come like : echo $xml->MemberStats->MemberStat->Name; After, to each badge, you must do a "boucle" |
||
|
|
JmBoullier
Former Community Advisor Normandy - France Joined: Jan 26, 2007 Post Count: 3716 Status: Offline Project Badges:
|
After, to each badge, you must do a "boucle" Or a loop if you prefer. acrux, as you noticed the XML file that is returned is not meant to be directly displayed, but it contains all pieces of information appropriately tagged, so it allows retrieving precisely what you want with the language of your choice. I don't mean that it is easy for the plain user, depends on your skills (or your friends' skills ) but it's the way to go.Cheers. Jean. |
||
|
|
Former Member
Cruncher Joined: May 22, 2018 Post Count: 0 Status: Offline |
Thanks guys, this is beyond me, so thanks anyway. I may revisit it at a later date but at least I know it is possible.
|
||
|
|
Former Member
Cruncher Joined: May 22, 2018 Post Count: 0 Status: Offline |
Actually I did not know about this xml page, so I build the same feature using a couple of Curl requests that log in as me and then go to my stats page.
While that works it's actually quite slow, cause I need to parse complete (quite messy) html pages to get the badges I need. I guess I should rewrite my tool to use this XML page acrux if you're hosting allows you to run php I'm happy to give you a copy of what I'll make so you can use that on your homepage ![]() |
||
|
|
|