Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Requests

[+Request+] Wikipedia!!

Author Message
mattchou



Joined: 20 Apr 2005
Posts: 1

Posted: Wed Apr 20, 2005 - 1:09 pm    Post subject: [+Request+] Wikipedia!! Reply with quote

World's best encyclopedia deserve world's best widget!

Very Happy
View user's profile Send private message Send e-mail Widgets
islayer



Joined: 21 Apr 2005
Posts: 66

Posted: Thu Apr 21, 2005 - 5:01 pm    Post subject: Reply with quote

Im sure many developers have thought about doing one.
if no one else does one i will do one however.
View user's profile Send private message Send e-mail Widgets
sean



Joined: 22 Apr 2005
Posts: 67
Location: Duluth, MN

Posted: Fri Apr 22, 2005 - 9:50 pm    Post subject: Reply with quote

I just started work on this today. I've been coding php for a while, but I'm new to javascript, so it's coming along slowly. Anyway, I doubt I'll have the time to bring something to the quality we would all like to see by myself, so I'll share the (very limited) beginnings I have.

I'm picturing something similar to Apple's dictionary widget (I'm sure I'm not alone here). I was planning to begin with just returning the content of the first paragraph to the user, and adding a link to the full article at the end, to pop open Safari, or possibly extending the widget to show the entire article content.

Here's a basic function to pull the content from en.wikipedia, and put it into a div:

Code:

function processRequest(search_term) {
    var req;
    req = new XMLHttpRequest();
   
    var url = "http://en.wikipedia.org/wiki/" + search_term;
    req.open("GET", url ,false);
    req.send(null);
   
    var response = req.responseText;
    var start = response.indexOf("<p>");
    var end = response.indexOf("</p>");
    output = response.substring(start, end);
   
    //stripping out the tags might not be the best idea (no links)
    //but it cleans up the output for now
    var stripped = output.replace(/(<([^>]+)>)/ig,"");
   
    document.getElementById('content').innerText = stripped;
}


Anyway, I'd be more than happy to have some help, especially with the graphics. Or, if someone wants to take the lead, or already has, I'd be happy to pitch in where I can.

Sean
View user's profile Send private message Send e-mail Visit poster's website Widgets
sean



Joined: 22 Apr 2005
Posts: 67
Location: Duluth, MN

Posted: Sat Apr 23, 2005 - 3:29 am    Post subject: Reply with quote

I've posted an early version of my wikipedia widget to the showcase. Check it out and let me know what you think. It still needs work. I've put in a solid day's worth, lots of trial and error, I'm new at this. If anyone's interested, I wouldn't mind a hand with the graphics and some other features.

I didn't look through the page source of too many wikipedia articles, so there may be a better phrase to search for to pull up the content, and there might be certain articles that screw it up. We'll see. Cmd-R resets widgets in case something goes wrong, by the way.

Anyone have any brilliant wikipedia widget names up their sleeves?
View user's profile Send private message Send e-mail Visit poster's website Widgets
macmanluke



Joined: 15 Apr 2005
Posts: 16
Location: SA

Posted: Sat Apr 23, 2005 - 3:33 am    Post subject: Reply with quote

Didnt a wikipedia widget win the dashboard contest? isnt that going to be bundled with tiger?
View user's profile Send private message Widgets
sean



Joined: 22 Apr 2005
Posts: 67
Location: Duluth, MN

Posted: Sat Apr 23, 2005 - 3:56 am    Post subject: Reply with quote

macmanluke wrote:
Didnt a wikipedia widget win the dashboard contest? isnt that going to be bundled with tiger?


You scared me there for a minute, I thought I wasted a good chunk of time on this sucker... But I googled and:

Quote:
Apple has announced the winners of its Dashboard Widget Contest. The two winners were Alco Blom for Send SMS, and Michael Robinette for WikityWidget. "Send SMS provides the ability to send a message on the spur of the moment to someone without having to launch the Address Book application. Send SMS combines the instantly available Tiger Dashboard with Short Message Service, or SMS... WikityWidget is a personal notepad with automatic linking. Using a simple notebook-style interface, WikityWidget lets you easily jot down and organize notes with hypertext links so they're easy to find and instantly available via the Mac OS X Tiger Dashboard. It applies Wiki technology in a new and interesting way on the Mac and demonstrates the powerful potential of Widgets to leverage technologies in Tiger."

-MacMinute

In a way I would be glad if someone did win the contest with a wikipedia widget, because it would sure as hell be better than mine, but no such luck.
View user's profile Send private message Send e-mail Visit poster's website Widgets
macmanluke



Joined: 15 Apr 2005
Posts: 16
Location: SA

Posted: Sat Apr 23, 2005 - 4:04 am    Post subject: Reply with quote

ah i see now Razz
View user's profile Send private message Widgets
Jeremy
Administrator


Joined: 27 Mar 2005
Posts: 62
Location: Melbourne, Australia

Posted: Sun Apr 24, 2005 - 5:49 pm    Post subject: Reply with quote

Two Wikipedia Widgets on the site now:



View user's profile Send private message Send e-mail Visit poster's website Widgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Powered by phpBB © 2001, 2002 phpBB Group