Project Euler widget for your blog/website

Announcements, comments, ideas, feedback, and "How do I... ?" questions
Post Reply
rmadhuram
Posts: 9
Joined: Sat Mar 21, 2009 6:04 pm

Project Euler widget for your blog/website

Post by rmadhuram »

I'm glad to announce the availability of a widget you can add on your blog/website that shows your current Project Euler score.

http://geekraj.com/wordpress/?p=278

Please try it out and let me know if you need more features. Your feedback would be appreciated!

regards,
Raj
Last edited by rmadhuram on Tue Mar 24, 2009 5:32 pm, edited 1 time in total.
barneyb
Posts: 6
Joined: Thu Feb 05, 2009 6:16 pm

Re: Project Euler widget for your blog/website

Post by barneyb »

Do keep in mind that not everyone necessarily wants their score exposed to the world, which your widget allows.
rmadhuram
Posts: 9
Joined: Sat Mar 21, 2009 6:04 pm

Re: Project Euler widget for your blog/website

Post by rmadhuram »

Thanks for the feedback!
Yes, but only people who would like to expose their scores to outside world would probably use my widget!
zdavkeos
Posts: 2
Joined: Fri Mar 06, 2009 2:57 am

Re: Project Euler widget for your blog/website

Post by zdavkeos »

Thanks for the effort! Your widget is pretty slick, but I don't know if it allows enough customization - not all people want the same identical looking widget. After checking out the source I see how it would be easy to roll-your-own but, I am still left with the question of why the middle man? It seems like this should be the task of ProjectEuler, not of your own server. Still, I am very happy to some work getting done on this, and hope to see future progress!
rmadhuram
Posts: 9
Joined: Sat Mar 21, 2009 6:04 pm

Re: Project Euler widget for your blog/website

Post by rmadhuram »

Hi,

Thanks for your encouraging comments! I happened to see it just now, so sorry for the late response...

The reasons behind the widget are:

1. I wanted to display my score on my blog for my friends to see, and also for them to display theirs, so that we can have an exciting & healthy competition.

2. As ProjectEuler does not currently offer such a widget, I started to write my own.

3. At the same time, I was exploring cross site scripting and this served as a perfect candidate, so I whipped one up in a couple of days.

4. As it came out of my necessity, I thought there could be more people who might have the same need, and hence I made it public, and hosted it out of my own server. As you rightly said, if Project Euler can host this, there is no need of a middle man and the stupid tricks I had to do to retrieve other people's scores :D

I would be more than happy if Project Euler can host this, and would contribute as much as possible for the development (including more customizations). Ever since I rolled this one out, I have moved on to do other things. If there is enough interest in this, I can volunteer to help.

Best Regards,
Raj
Yelonek
Posts: 2
Joined: Tue Jul 14, 2009 3:27 pm

Re: Project Euler widget for your blog/website

Post by Yelonek »

I've been looking for a link to my profile page as a proof of my achievements in the Project, but it turns out I can't get to it without logging in. Since anyone can register and anyone registered can look at others' scores then this is not secret data, right?
Thanks for the widget. It's so cool. :) I'd love to have an image that I could append to posts at forums like this one. It's very motivating.

One more thing - please check how your widget looks at blogspot - http://szkodaczasu.blogspot.com/ Could you advise how to change text colour so it's more readable?
User avatar
Georg
Posts: 157
Joined: Mon Jan 21, 2008 7:00 am
Location: Mannheim, Germany
Contact:

Re: Project Euler widget for your blog/website

Post by Georg »

Yelonek wrote:One more thing - please check how your widget looks at blogspot - http://szkodaczasu.blogspot.com/ Could you advise how to change text colour so it's more readable?
The white color for the text is caused by

Code: Select all

#sidebartop-wrap {
[...]
color:#ffffff;
}
and for the links by

Code: Select all

#sidebartop a {
color: #ffffff;
}
#sidebartop a:hover {
color: #ffffff;
}
#sidebartop a:visited {
color: #ffffff;
}
You could change the color in your html code.
rmadhuram
Posts: 9
Joined: Sat Mar 21, 2009 6:04 pm

Re: Project Euler widget for your blog/website

Post by rmadhuram »

Hi Yelonek,

Thanks for the comments!
As Georg pointed out, it is inheriting the color from the surrounding <div> tags. One way to change the color is to wrap the widget like this:

Code: Select all

   <div style="color:black">
      <script type="text/javascript" src="http://www.geekraj.com/euler/euler.js">
      </script>
      <script>
         var es = new EulerScore('Yelonek');
      </script>
   </div>
I'll work on more customization options in the near future and make a new release. Stay tuned!

Best Regards,
Raj
Yelonek
Posts: 2
Joined: Tue Jul 14, 2009 3:27 pm

Re: Project Euler widget for your blog/website

Post by Yelonek »

Thanks, it looks much better now. Definitely will stay tuned.
houbysoft
Posts: 2
Joined: Wed Oct 21, 2009 12:10 am

Re: Project Euler widget for your blog/website

Post by houbysoft »

Hi, thanks for the widget!

I thought that it would be cool for it to show levels, so I created a simple modification which now shows a small image corresponding to your level next to the displayed score.

You can see how it looks and works by going to http://houbysoft.com/en/about.php and scrolling down on the page, that is where my badge is displayed.

To use it, just replace http://www.geekraj.com/euler/euler.js with http://houbysoft.com/scripts/euler.js in the original code, so you would write this:

Code: Select all

<script src="http://houbysoft.com/scripts/euler.js"
         type="text/javascript"> </script>
<script>
   var es = new EulerScore('houbysoft');   // replace with your id.
</script>
@rmadhuram : I am of course open to you adapting my patch and replacing your euler.js with mine, only please keep the note in the source and give me a small mention somewhere :) Thanks a lot for running the backend and making the original code!

Feedback is welcome.
rmadhuram
Posts: 9
Joined: Sat Mar 21, 2009 6:04 pm

Re: Project Euler widget for your blog/website

Post by rmadhuram »

Thanks Jan! It looks awesome. I had it on my roadmap, but you beat me on this one :) I can open up a repository in sourceforge or something so we can collaborate and have more nice additions.

@euler had extended his help in opening up web service access sometime back. I was caught up with quite a bit of work and couldn't get back to him yet. Your work has encouraged me to spend more time on this. We will get this going soon.

Regards,
Raj
bucko
Posts: 3
Joined: Sat Jan 16, 2010 1:25 am

Re: Project Euler widget for your blog/website

Post by bucko »

Poke on this front: I've been running an RSS feed to keep track of my own and my friends progress, and I'd rather not have to hit your server so many times to keep it up to date...
Post Reply