imagine kitty magazine

Skip over navigation
  • Categories

    • ASP.NET
    • Bible tags
    • Christianity
    • Classic ASP
    • Firearms
    • Humor
    • Random
    • Trackbacks
    • Web design
    • Web standards
    • Why I am the way I am
    • Wordpress
  • Pages

    • Bible verse tags 2.0
    • Portfolio
    • Steps to building a proper web page
  • Blogroll

    • benthack
    • ASP.NET Resources
    • Bible Dude
    • Cake Wrecks
    • Church Communications Pro
    • Creating Passionate Users
    • Dossy’s Blog
    • Gary Turner’s html & css workshop
    • I Will Teach You To Be Rich
    • Pescatarian Cooking
    • SystemDotWeb
    • The Nice Jewish Website
    • The Sneeze
    • Tyssen Design
  • Info

    • home
    • Log in
    • contact mark
    • blogs that link here*
    • valid xhtml
    • valid css
    • valid rss2
    • rss feed
Sigarms P229

spam this

« Upgraded to WP 2.0.1
Cartoon of bloggers »

Changes to execute-pings.php

In my disagreement with the powers-that-be of the Wordpress creators and coders, I expressed the need for Trackbacks to take precedence over Pingbacks. They marked my trac ticket as WONTFIX so I did it myself.

I simply rearranged the order in which the pings are sent putting trackbacks before pingbacks:
<?php
require_once(’../wp-config.php’);
// Do Enclosures
while ($enclosure = $wpdb->get_row(”SELECT * FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = ‘_encloseme’ LIMIT 1″)) {
$wpdb->query(”DELETE FROM {$wpdb->postmeta} WHERE post_id = {$enclosure->ID} AND meta_key = ‘_encloseme’;”);
do_enclose($enclosure->post_content, $enclosure->ID);
}
// Do Trackbacks
$trackbacks = $wpdb->get_results(”SELECT ID FROM $wpdb->posts WHERE CHAR_LENGTH(TRIM(to_ping)) > 7 AND post_status != ‘draft’”);
if ( is_array($trackbacks) ) {
foreach ( $trackbacks as $trackback ) {
do_trackbacks($trackback->ID);
}
}
// Do pingbacks
while ($ping = $wpdb->get_row(”SELECT * FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = ‘_pingme’ LIMIT 1″)) {
$wpdb->query(”DELETE FROM {$wpdb->postmeta} WHERE post_id = {$ping->ID} AND meta_key = ‘_pingme’;”);
pingback($ping->post_content, $ping->ID);
}
?>

It seems to be working and it makes much more sense this way.

You can download the updated file here.

You may then test this out by using this post. If you include a trackback and a ping back the trackback will be sent out first ensuring its reception.

This post is considered “Open Trackback” with no time limits.

The following have linked to this article:

  • Diane’s Stuff » Blog Archive » Imagine Kitty- Smart Cat! pinged this post.
  • MacBros’ Place » Nanny McPhee pinged this post.
  • MacBros’ Place trackbacked with Wiiiiizzzz Zooooom!…

This entry was posted on 07Feb06 @ 0840 and is filed under Wordpress. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

8 Responses to “Changes to execute-pings.php”

On 7Feb06 at 1417 WordPress Station » Blog Archive »
Trackbacks vs Pingbacks
said:

[...] ★imaginekitty★ [...]

On 7Feb06 at 1738 David said:

Thanks! I’ll give this a whirl.

On 9Feb06 at 1347 jimmyb said:

Wow.
I’m impressed!!

On 11Feb06 at 1331 Diane's Stuff » Blog Archive » Imagine Kitty- Smart Cat! said:

[...] This morning I was on his site reading this post, “Changes to execute-pings.php” and I thought I’d try his fix. This involved changing the execute-pings.php as one might surmise, and I did so, then uploaded it to overwrite the old file. I then put it to the test by trackbacking to “third world county“. Yesterday I sent a trackback to David’s Friday OTA–more later post and it showed as a ping. The one I sent for the test to the same post showed as a trackback as it should have. Smart kitty [...]

On 11Feb06 at 2309 MacBros' Place » Nanny McPhee said:

[...] ——————— OTA links: Stop The ACLU OTA Weekend And Open Thread Point Five 7 Deadly Sins Gribbit’s World imaginekitty imaginekitty Test TB [...]

On 11Feb06 at 2312 MacBros said:

This doesn’t seem to work for me. So I went back to WP version.

On 11Feb06 at 2336 Mark said:

Mark

It’s probably my fault because I copied the code and Wordpress took out the opening <?php (as it should). I fixed my posts to include it. Sorry for the mixup.

I’m going to post a copy for download.

On 1Nov06 at 1022 MacBros' Place said:

Wiiiiizzzz Zooooom!…

Wow! Has anybody noticed how much faster WordPress 2.0.5 - Ronan is? Pages are opening up nice and fast compared to the previous versions. It's making my site appear faster anyway.  Just thought I'd ask.  yo can all go back to doing w…

Sponsored links

Site5 $5 Hosting Dealemail address

Amazon Wishlist

Hello, friends! I've decided to put my Amazon wishlist online. If you feel nice today you can purchase one of the items listed and it will be shipped to my door. My birthday is May 13th and I will gladly accept gifts for any Christian or Jewish holiday. Thank you for your support.

  • RESTful .NET - $26.39
  • jQuery in Action - $21.36
  • People Are Idiots and I Can Prove It!: The 10 Ways You Are Sabotaging Yourself and How You Can Overcome Them - $16.50
  • Programming ASP.NET MVC - $29.69
  • Digital TENS Unit - Powerful Multi-mode TENS - One Week Sale! - $59.99
  • Learning WCF: A Hands-on Guide - $25.18
  • Top Secret! - $4.09
  • Kentucky Fried Movie - $4.48
  • The Normal Christian Life - $2.51
  • The Holy Spirit and Reality - $2.52
  • The Richest Man in Babylon - $2.29
  • Tough Guys Don't Dance - $3.63
  • Get Crazy - n/a
  • Don't Let The Irs Destroy Your Small Business: Seventy-six Mistakes To Avoid - $6.88
  • Don't Make Me Think: A Common Sense Approach to Web Usability, 2nd Edition - $23.30
  • Dress Your Best: The Complete Guide to Finding the Style That's Right for Your Body - $10.10
  • Perfect Pushup - Original - $29.99
  • Pro ASP.NET MVC Framework (Pro) - $34.64
  • Benny Hill - Complete & Unadulterated Megaset (1969-1989) - $54.99
  • Young Doctors In Love - $2.78
  • Great White North - $6.43
  • Transylvania 6-5000 - $4.26
  • The Party - $6.21
  • Circuit-Bending: Build Your Own Alien Instruments (ExtremeTech) - $11.92

Disclaimer: All product data in this section belongs to Amazon.com or respective site(s). No guarantees are made as to accuracy of prices or product information. Prices listed are accurate as of the date/time indicated or otherwise within the last 24 hours. Prices and product availability are subject to change. Any price displayed on the Amazon website at the time of purchase will govern the sale of this product.

Site search and links

I'm a friend of Israel

Open Trackback Alliance Logo


Widgetize!
WWW is deprecated
no-WWW class B
*blogs that link here powered by Technorati

©2008 imaginekittymagazine