Trackback popup plugin
Well … looks like I’ve created my first, very own plugin for WordPress. The base install of WP gives you the option to have a comments popup. I was doing that on my MT blog, and wanted to do that here as well. Well, the default comments popup page showed both the trackbacks and the comments. THAT I didn’t want.
Well, in order to get ONLY the comments to show up on the comment popup page, I used the code that Scriptygoddess had for separating the trackbacks and comments on the wp-comments.php page.
That gave me what I wanted for the comments popup page, but how was I going to go about getting the trackback popup page? Well, I modified the code for the comments popup and created a plugin for it. You can download my plugin here. (I don’t think there was one already made. I couldn’t find anything like it.)
Now I needed a wp-trackback-popup.php file. Well, I modified the wp-comments-popup.php file and got this.
In order to get this to work, I put the following in the header …
<?php trackback_popup_script(); ?>
Then, I put the following in the index.php file where I wanted the popup to show up (this was inside of THE LOOP).
<?php trackback_popup_link('Trackbacks (0)', 'Trackbacks (1)', 'Trackbacks(%)'); ?>
It’s working fine for me so far. If you try this out and have any problems, please let me know. And if this post is too confusing, let me know, and I’ll try to explain things better.
If you do end up using this, let me know. I’m curious if anyone else wanted something like this.
Last Updated on: 25 Jun 04 at 1:21pm
Plugin file: trackback_popup.php
Other needed files: wp-trackback-popup.php - put this in the root directory
:: EDIT 25 Jun 04 1:21pm :: This should now give the correct number of pingbacks and trackbacks. I had to add an extra function to my plugin. It worked in my testing. If you still have trouble with this, please let me know.
accomplished
Just tried this, and it’s exactly what I’m looking for. But when I click on a trackback link, the window only says:
No input file specified.
How do I fix this?
I’m glad to hear someone else has a use for this.
Did you download the wp-trackback-popup.php file and put it in the main install directory? If you did and are still having trouble, let me know and I’ll try to troubleshoot for you.
WordPress Plugin: Trackback popup
Here’s another way to separate your comments from your trackbacks and show the number for each in WordPress.
[…] ndicator(1087998215); Filed under: WordPress Plugins|Google it! Here’s another way to separate your comments from your trackbacks and show the number […]
[…] ) Comment Leader plugin Lists the names of the people who comment the most on your blog Seperate Trackback Popup page Allows you to have your trackbacks on a […]
Hey thanks for this plugin–I like that I can mimic the MT function of separating trackbacks with this. However, on my site when I implemented it, it will show the wrong number of trackbacks–it displays the number of comments. However, when I click on the link to display the popup, it does correctly show the number of trackbacks ACTUALLY in my post. Any ideas why?
Jennifer - Is it showing a number too high or too low? I ask because I’m not using that functionality of it. I’m actually using Eric Meyer’s plugin for the number of comments and trackbacks on my site. I believe I had to tweak that just a bit to show me the number of trackbacks and pingbacks.
I changed the query I used in the plugin. It had just been counting trackbacks and not pingbacks. It SHOULD now give the correct number. If not, please let me know.
Well on most of my posts I actually don’t have any trackbacks or pingbacks, so it should be showing 0. Instead it is showing the number of comments, so I guess that means it’s counting too high. I figured that I would have to use the Eric Meyers plugin, but wasnt sure how. What did you tweak in his plugin, and how did you implement it on the index template?
I was missing a fuction in my plugin. I have added it and everything appears to be working correctly now (from my testing). If you still have any trouble, please let me know.
Oooh awesome I think that did the trick! Thanks so much for your help. This really is a useful plugin. :)
I’m glad you got it working. And thanks for helping me troubleshoot it.
[…] 找到了两个hack来稍微改变一下,分别是Separating Comments and Trackbacks和Trackback popup,这两个hack没有改变核心功能,只是在显 […]
Well it was working great but now the pop up shows this message at the end:
Fatal error: Call to undefined function: return_comment_type() in /home/mulligan/public_html/wp-trackback-popup.php on line 56
Any ideas?
[…] 37 pm
Just testing to see if the trackbacks now work. If they do you can thank WxGal’s World […]