Help - Search - Members - Calendar
Full Version: Changing the  URL sent with a Trackback
Movable Type Community Forum > Additional Resources > Tips and Tricks
shasta
I use mod:rewrite on my server to change all of the urls from http://www.mcshasta.com/blog/archives/000000.php into http://www.mcshasta.com/archives/s/000000 (for cosmetic reasons). I was wondering if their is a way that I could change what a site I ping sees from the first url to the second.
Soulhuntre
I cheat smile.gif

I put the FULL URL I want to use in the configuration file, then change the code in Context.pm to take that as a literal instead of appending it to the cgi path.

The sub below replaces the sub of the same name... note, it works for me and is only temporary till MT moves to a more flexible URL definition configuration.

CODE
sub _hdlr_entry_tb_link {
   my $e = $_[0]->stash('entry')
       or return $_[0]->_no_entry_error('MTEntryTrackbackLink');
   require MT::Trackback;
   my $tb = MT::Trackback->load({ entry_id => $e->id })
       or return '';
   my $cfg = MT::ConfigMgr->instance;
   # my $path = $cfg->CGIPath;
   # $path .= '/' unless $path =~ m!/$!;
   # $path . $cfg->TrackbackScript . '/' . $tb->id;
   my $path = $cfg->TrackbackScript . '/' . $tb->id;
}
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.