Index  | Recent Threads  | Unanswered Threads  | Who's Active  | Guidelines  | Search
 

Quick Go »
No member browsing this thread
Thread Status: Active
Total posts in this thread: 7
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 853 times and has 6 replies Next Thread
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Badges on my homepage?

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?
[Mar 22, 2009 5:19:08 AM]   Link   Report threatening or abusive post: please login first  Go to top 
JmBoullier
Former Community Advisor
Normandy - France
Joined: Jan 26, 2007
Post Count: 3716
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Badges on my homepage?

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.
----------------------------------------
Team--> Decrypthon -->Statistics/Join -->Thread
[Mar 22, 2009 6:24:44 AM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Badges on my homepage?

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
[Mar 23, 2009 4:32:26 AM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Badges on my homepage?

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 :


<?php
$xml = simplexml_load_file('http://www.worldcommunitygrid.org/stat/viewMe...acrux&xml=true');
print_r($xml);
?>


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;
//Must done acrux


After, to each badge, you must do a "boucle"
[Mar 23, 2009 1:01:11 PM]   Link   Report threatening or abusive post: please login first  Go to top 
JmBoullier
Former Community Advisor
Normandy - France
Joined: Jan 26, 2007
Post Count: 3716
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Badges on my homepage?

After, to each badge, you must do a "boucle"

Or a loop if you prefer. smile

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 smile ) but it's the way to go.

Cheers. Jean.
----------------------------------------
Team--> Decrypthon -->Statistics/Join -->Thread
[Mar 24, 2009 3:47:37 AM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Badges on my homepage?

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.
[Mar 26, 2009 3:00:17 AM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Badges on my homepage?

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 biggrin

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 smile
[Mar 27, 2009 8:05:21 PM]   Link   Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Post new Thread