I wanted to get my wiki noticed on weblogs.com, blo.gs, and the like, so I found a place that accepts HTTP GET requests and pings a multitude of these services. pingomatic.com will take the name of your "weblog" and the url as part of a request, and will ping a variety of various ping services.

So, I wrote a little custom class to spawn a new thread and run an http get at pingomatic.com (so the entire process runs in the background). Put the attached jarfile into your WEB-INF/lib directory, and change Edit.jsp to add the following code after the call to saveText():

            // send http request to pingurl
            Properties props = wiki.getWikiProperties();
            String pingurl = props.getProperty("jspwiki.pingurl");
            if(pingurl != null) {
                try {
                        com.encodedrecords.http.PingThread pt = new com.encodedrecords.http.PingThread(pingurl);
                        pt.start();
                } catch(Exception pingex) { System.err.println(pingex.toString()); }
            }

Then, in jspwiki.properties, add:


jspwiki.pingurl = http://pingomatic.com/ping/?title=(YourApplicationNameHere)&blogurl=http%
3A%2F%2Fyoururlhere.com%2Fwiki%2F&chk_weblogscom=on&chk_blogs=on&chk_technorati=o
n&chk_feedburner=on&chk_syndic8=on&chk_blogshares=on&chk_rootblog=on&chk_myyahoo
=on&chk_pubsubcom=on&chk_blogchatter=on&chk_geourl=on&chk_blogrolling=on&chk_blo
gstreet=on&chk_rubhub=on&Submit=Submit+Pings

Note in the above, there are two things that need to be edited: change title= to the name of your wiki, and change blogurl= to a url-encoded form of your wiki's url.

This is a fairly simple application, and I'd be happy to take suggestions on how to improve, etc.

Discussion#

Did you notice the PingWeblogsComFilter that comes with the 2.1 alphas?

-- JanneJalkanen

Hmm, no, I've really only been working against 2.0.52. I should take a look at those.

-- MarkBeeson

Add new attachment

In order to upload a new attachment to this page, please use the following box to find the file, then click on “Upload”.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
jar
pingurl.jar 1.5 kB 1 21-Sep-2004 22:02 MarkBeeson
« This page (revision-3) was last changed on 23-Sep-2004 01:22 by MarkBeeson