Embedded Stats

Announcements, comments, ideas, feedback, and "How do I... ?" questions
Post Reply
Huggz
Posts: 4
Joined: Sat Oct 11, 2008 7:12 pm

Embedded Stats

Post by Huggz »

Is there any way to embed my project euler stats into another page, for the primary purpose of displaying how geeky I am? Manually entering them and updating doesn't count ;) I'm looking for auto updating display of the number of problems I've solved, my current rank, current performance ect.
traviscj
Posts: 1
Joined: Mon Oct 20, 2008 11:20 am

Re: Embedded Stats

Post by traviscj »

I'd really like something like this too. Even just a page to link to that I could regex around a little bit or some special address to access my profile page would be really cool.
Helen
Posts: 3
Joined: Mon Apr 07, 2008 6:26 pm

Re: Embedded Stats

Post by Helen »

I noticed that there is a URL to access a particular person's profile page, but profiles are only available to logged-in users. It could be useful if there was an option to make one's own profile available to guests.

For embedding, I've seen that done in some online games, where they provide an easy-to-parse plaintext version of the profile as well as the regular one.
3n1gm4
Posts: 34
Joined: Sun Jul 20, 2008 1:46 pm

Re: Embedded Stats

Post by 3n1gm4 »

Do you have GD lib support here?!? (i think only euler can answer this question)
User avatar
euler
Administrator
Posts: 5095
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

Re: Embedded Stats

Post by euler »

Yes, it is installed: 2.0.28 compatible with FreeType 2.2.1 and full image support enabled. I can see that dynamic images could be the way to go, but I must confess that I have no experience with using the library.
Image
impudens simia et macrologus profundus fabulae
3n1gm4
Posts: 34
Joined: Sun Jul 20, 2008 1:46 pm

Re: Embedded Stats

Post by 3n1gm4 »

I played with them a little. I've just seen there is an interesting lib that could make the job easier:
http://graphpite.sourceforge.net/
3n1gm4
Posts: 34
Joined: Sun Jul 20, 2008 1:46 pm

Re: Embedded Stats

Post by 3n1gm4 »

This is a "spoiler" of what could it be like:

Image
Image
Image
Image


Note that:
  • All values are random except the name (look at the img address for the cool part *)
  • Graphics sucks because of me :D I'd need a cool (and maybe bigger) background :D
  • Centering the text needs to be fixed :D
  • It has a prototype like:

    Code: Select all

    renderStats($background, $user, $level, $solvedProblems, $totalProblems, $performance)
    pretty simple if you have that data, or not?
I did not used GraPHPite yet, I don know what and how to plot it, only the performance bar?
Anyway if you like it how it is now all things you need is here

* If you did not understand, the cool part is the url. Just try to go to http://www.nigma.be/pe/whatever.png and it will render a fake stats of the whatever user :)
User avatar
elendiastarman
Posts: 410
Joined: Sat Dec 22, 2007 8:15 pm

Re: Embedded Stats

Post by elendiastarman »

Oh man! That's so cool! :P
Refreshing the page displays different stats... :D
I think this is a great idea overall...
Want some
3.14159265358979323846264338327950288419716939937510
58209749445923078164062862089986280348253421170679...?
Image
3n1gm4
Posts: 34
Joined: Sun Jul 20, 2008 1:46 pm

Re: Embedded Stats

Post by 3n1gm4 »

elendiastarman wrote:Oh man! That's so cool! :P
Refreshing the page displays different stats... :D
I think this is a great idea overall...
I said they are all random (except the username) :P I actually don't have that data (I did not write something that goes and get it from the site either :P )

Anyway it is just a demo of the potential, a better graphic is a must :P
User avatar
euler
Administrator
Posts: 5095
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

Re: Embedded Stats

Post by euler »

That is very clever, 3n1gm4. In addition to me, I suspect that many members will be very grateful for your help here. When I get some time I'll have a play and look at implementing it. Many thanks.
Image
impudens simia et macrologus profundus fabulae
3n1gm4
Posts: 34
Joined: Sun Jul 20, 2008 1:46 pm

Re: Embedded Stats

Post by 3n1gm4 »

euler wrote:That is very clever, 3n1gm4. In addition to me, I suspect that many members will be very grateful for your help here. When I get some time I'll have a play and look at implementing it. Many thanks.
It was a pleasure :)

PS: Don't be scared looking at my code, writing on images is pretty simple, I just did an unsuccessful try to write things centered, anyway feel free to contact me if you need any help with it :)
Post Reply