As recommended on http://drupal.org/node/188351 I am requesting to consider my extended, reorganised and partly recoded "ping.module" as an approach to a more dynamical, flexible module. Since I am not a Drupal-master (~2 months experience with Drupal), the code should be examined thoroughly. Nevertheless, I can confirm here that the same code worked on http://mpub.mobi (MobilePublisher, the first MoZine_3.0; focus on Mobile Web) well and the watchdog-module registered the activities. I hope, my little contribution can improve the basic promotional / communicational abilities of Drupal in a massive way !!

CommentFileSizeAuthor
ping.module.txt9.82 KBBlooniverse

Comments

merlinofchaos’s picture

Status: Needs review » Needs work

Well, since you emailed me:

1) We prefer patches to posting whole modules
2) You need to conform to the coding standards
3) Can't you do everything you intend to do just by implementing hook_ping in a module and sending the pings you want? Basically what you need is a module, say, 'mega_ping' and it implements 'mega_ping_ping()' which then does all of the pings you list here.

merlinofchaos’s picture

Additionally, it seems like it would be better to have an array:

  function mega_ping_services() {
    return array(
      "http://ping.blo.gs/",
      "http://blogsearch.google.com/ping/RPC2",
      ...
    );
  }

  function mega_ping_ping() {
    foreach (mega_ping_services() as $service) {
      ... do ping ...
    }
  }
zoo33’s picture

There is already a patch which allows admins to specify the sites that should be notified: 11148. Does this version add anything else that warrants another patch?

Blooniverse’s picture

Let me verify / check your responses and the patch. It will take some time ... capacity-problems. As soon as I can I'll give my humble feedback.

Blooniverse’s picture

Dear zoo33, I am sorry to say that the recommended ping-patch 11148 doesn't work with/on my system (Drupal v5.3). I'll check it out later again an I'll scan the code. Maybe I/we could merge the the two codes somehow?

Something else: in your recommended patch 11148 there is NO ping_cron() ! Is this intended?

zoo33’s picture

@MobilePublisher: Yes, ping.module has a ping_cron(). The patch doesn't remove it.

Make sure you use the patch in comment #8, the other ones are for Drupal 4.6/4.7. It may be that it doesn't apply any more because of other changes to the module. Haven't tried it recently.

I mentioned the other patch only to avoid duplicate work. There is already a solution for letting admins add their own ping services. So my question is, did you change anything else in ping.module that should also be taken into account?

You should also know that neither your version or mine will result in a new ping.module in Drupal 5 or 6 as these versions are closed for new features. If you want to see a new version included in Drupal, you should aim for Drupal 7. Or you could release it as a contributed module with a different name than Ping.

catch’s picture

Version: 5.x-dev » 7.x-dev
Status: Needs work » Active
lilou’s picture

Status: Active » Closed (fixed)

Ping module was removed from core : #231437: Remove ping module from core