Search Blog

Recent Comments
Re: Stats plugin ported to Model-Glue (by J.mihai at 12/14 8:52 AM)
Re: CFC DAO Generator (by rui at 7/04 5:42 AM)
Re: Updates to the DAO, Bean and Gateway generator (by rui at 7/04 4:49 AM)
Re: CFC DAO Generator (by fwscott at 6/22 7:03 PM)
Re: CFC DAO Generator (by dan at 6/22 12:38 PM)
Re: Trip to Thailand (by fwscott at 3/27 2:10 AM)
Re: CFC DAO Generator (by fwscott at 3/27 2:03 AM)
Re: CFC DAO Generator (by Garry Harstad at 3/26 12:30 PM)
Re: Trip to Thailand (by Niqui Merret at 3/23 4:51 PM)
Re: Adding a blogger ping utility to BlogCFM (by fwscott at 2/20 9:01 PM)
Categories
Annoucements (1 entries)
BlogCFM (3 entries)
CFC Generator (5 entries)
Coldfusion (11 entries)
Fusebox (2 entries)
Greasemonkey (1 entries)
Misc (3 entries)
Archives
November 2005 (2 entries)
October 2005 (1 entries)
August 2005 (1 entries)
July 2005 (4 entries)
June 2005 (5 entries)
May 2005 (7 entries)

Powered by
BlogCFM v1.01

June 2005
Adding a blogger ping utility to BlogCFM
Post a Comment
Since MXNA is aggregating my feed now, I needed to have BlogCFM notify MXNA when a new post was done.

Previously , I showed how to add your own configuration options to BlogCFM.  This time I added a PING_ON_UPDATE configuration option, along with adding the field to the admin screen.

My SendPings function is very simple but could use some work for error checking and stuff.  Perhaps I will work in some error checking later but since it is only me using this function currently, I know I will type in the correct ping URLs.

I added the following to the BlogCFM.cfc but could be used in any blog really. It accepts one argument, a list of URLs to send to seperated by ";"

<cffunction name="SendPings" access="public" output="false" returntype="void">
    <cfargument name="UrlLIST" type="string" required="yes" hint="A list of URLs seperated by ;">
    <cfloop from="1" to="#listlen(arguments.UrlList,";")#" index="listindex">
        <cfhttp url="#listgetat(arguments.UrlList,listindex,";")#" throwonerror="no"></cfhttp>
    </cfloop>
</cffunction>


Next was to tell BlogCFM to send the pings.
I put the following below the notifications area of SaveEntry()

<cfif getBlogConfigValue(arguments.blog_id, "PING_ON_UPDATE") NEQ "">
   <cfset SendPings(getBlogConfigValue(arguments.blog_id, "PING_ON_UPDATE"))>
</cfif>
       

That did it!  Now BlogCFM will ping whatever URLs I type into the admin screen (MXNA).
Posted by fwscott at 9:47 PM | Comments (2)
 
Subscription Options

You are not logged in, so your subscription status for this entry is unknown. You can login or register here.

Re: Adding a blogger ping utility to BlogCFM
To get the ping to work, do you just put in a list of pinging places?

do you have to add something to the end of them like ?id=yourwebsite.com or something? thanks

Posted by chris on February 20, 2007 at 2:16 PM

Re: Adding a blogger ping utility to BlogCFM
Hi Chris,

The list of URLs passed into the function could contain a URL with a http://myaggregator.com/ping?yourwebsite.com. The URL you need to ping will be specified by the aggregator. I know with MXNA, a website id is passed as part of the URL.

Also, if your URL needs to contain the ';' character, you will need a different list seperator for the function to work.

Hope this helps, Francis "Scotty" Scott

Posted by fwscott on February 20, 2007 at 9:01 PM

Name:   Required
Email:   Required your email address will not be publicly displayed.

Want to receive notifications when new comments are added? Login/Register for an account.

Anti-spam key

Type in the text that you see in the above image:

Your comment:

Sorry, no HTML allowed!