Help - Search - Members - Calendar
Full Version: TrackBack form
Movable Type Community Forum > Additional Resources > Tips and Tricks
engel5
If you want to set up a form where people can ping an entry even if they don't have TrackBack  sad.gif  here is an example I am using on my Individual Archives:
CODE
<MTEntryIfAllowPings><form method="post" action="<$MTCGIPath$><$MTTrackbackScript$>" id="trackbacks_form">
<fieldset>
<legend class="comments-head">Report a remote comment</legend>
<input type="hidden" name="tb_id" value="<$MTEntryID$>" />

<label for="title">Title:</label><br />
<input id="title" name="title" value="Post Title" /><br />

<label for="blog_name">Your Blog Title:</label><br />
<input id="blog_name" name="blog_name" value="Blog Title" /><br />

<label for="url">Entry URL:</label><br />
<input id="url" name="url" value="http://example.org/someentry/1.php" /><br />

<label for="excerpt">Excerpt:</label><br />
<textarea id="excerpt" name="excerpt" rows="10" cols="50">Summarize your entry here - Note: current TrackBack technology limits this to 255 characters.</textarea><br />
<p>This form will not redirect currently. I am looking for away to take care of that, but for now, please use your browsers BACK features.</p>
<input type="submit" value="Report" /><br />
</fieldset></form></MTEntryIfAllowPings>


If someone can tell me how to handle that redirect, I'd be thankful.

David
girlie
CODE
<input type="hidden" name="static" value="http://www.yoururl.com/" />


Does that work?
engel5
QUOTE
CODE
<input type="hidden" name="static" value="http://www.yoururl.com/" />


Does that work?

No - that doesn't do it. If you look at MT-TB.CGI, you can see that it's designed to return an XML page (for the error checking feature) and that's what I end up receiving at the browser.

I wonder if I need to switch to using the standalone version for this.
engel5
I realized the tb_id being set to MTEntryID is giving me problems, as well. It doesn't associate the TrackBack with the correct entry necessarily. It needs to somehow be the same as the last number in the TrackBack URL.

Oh, now I feel like removing this whole thread.  :angry:
engel5
I figured out how to get the TrackBack associated with the correct entry using PHP string manipulation on the EntryTrackbackLink. The current template for the form is:

CODE
<form method="post" action="<$MTCGIPath$><$MTTrackbackScript$>" id="trackbacks_form">
<fieldset>
<legend class="comments-head">Report a remote comment</legend>
<input type="hidden" name="tb_id" value="
<?php
$fullstr = '<$MTEntryTrackbackLink$>';
echo substr($fullstr,strrpos($fullstr,"/")+1,strlen($fullstr)-strrpos($fullstr,"/")-1);
?>
" />

<label for="title">Title:</label><br />
<input id="title" name="title" value="Post Title" /><br />

<label for="blog_name">Your Blog Title:</label><br />
<input id="blog_name" name="blog_name" value="Blog Title" /><br />

<label for="tburl">Entry URL:</label><br />
<input id="tburl" name="url" value="http://example.org/someentry/1.php" /><br />

<label for="excerpt">Excerpt:</label><br />
<textarea id="excerpt" name="excerpt" rows="10" cols="50">Summarize your entry here - Note: current TrackBack technology limits this to 255 characters.</textarea><br />
<p>This form will not redirect currently. I am looking for away to take care of that, but for now, please use your browsers BACK features.</p>
<input type="submit" value="Report"/><br />
</fieldset></form>


I don't know if there is a PHP solution for the redirect or not.  ???
mistersugar
engel5 - I don't seem to find this form on your site - are you using it, or did you give up on the project?

Is this still the best solution to accomplish what is done very well at Blogroots Blogpopuli? I'm setting up the new Tar Heel Bloggers site and I need a way for anyone to submit TrackBack entries.

Please advise me, and thanks in advance.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.