Help - Search - Members - Calendar
Full Version: Displaying Trackbacks In Popups
Movable Type Community Forum > Using Movable Type > TrackBacks and Pings
laklappen
I would like to display trackbacks in a popup window but have been unable to do so. In MT 2.* I used to be able to acccomplish this using the following template code:

CODE
<a href="<$MTCGIPath$>mt-tb.cgi?__mode=view&entry_id=<$MTEntryID$>" onclick="OpenTrackback(this.href); return false">TrackBack</a>


and the following java script:

CODE
<script type="text/javascript">
<!--
function OpenTrackback (c) {
    window.open(c,
                'trackback',
                'width=480,height=480,scrollbars=yes,status=yes');
}
//-->
</script>


but this no longer works in MT 3.* and I get the following error message when I click on the TrackBack link generated by the code above:

Got an error: Can't call method "path_info" on an undefined value at lib/MT/App.pm line 1193.

Does anyone know how trackbacks can be displayed in popups in MT 3.*?

Thanks,
Laura
justG
3.x is too vague, the point release matters. I am experiencing this also, but not in a popup. As far as I can tell, the trackback syntax has changed between v3.2 and v3.31. I'm guessing that once I correct it, everything will be okay again. I don't know whether you are using v3.2 or v3.31; if the latter, check out the trackback documentation, and see if it helps.

.g
laklappen
Thank you for the info. I'm using MT-3.3b-FRC2. Though I don't recall it working in 3.2 either. I checked the trackback doc you mentioned (thank you) but I still couldn't find where it talks about the URL for the trackback listing for an entry, for example I suspect there needs to be an updated version of the following:

CODE
<a href="<$MTCGIPath$>mt-tb.cgi?__mode=view&entry_id=<$MTEntryID$>" onclick="OpenTrackback(this.href); return false">TrackBack</a>


I tried the following (because I recall reading in the 3.3 beta doc that MTEntryBasename should be used instead of MTEntryID in some instances):

CODE
<a href="<$MTCGIPath$>mt-tb.cgi?__mode=view&entry_id=<$MTEntryBasename$>" onclick="OpenTrackback(this.href); return false">TrackBack</a>


But this did not work either.

Alternatively, there may be a bug in lib/MT/App.pm line 1193. I'm not a code person so I can't really debug if that's the case.

Laura
justG
Hi Laura,

Did you check the 3.31 final default templates to see the code that is used to list trackbacks? This is what I see in the new default individual entry archive template:

CODE
<MTIfPingsActive>
  <div class="trackbacks">
    <h3 id="trackback" class="trackbacks-header">TrackBack</h3>
    <div id="trackbacks-info">
      <MTIfPingsAccepted><p>TrackBack URL for this entry:<br />
      <$MTEntryTrackbackLink$></p></MTIfPingsAccepted>
    </div>
    <MTPings>
      <MTPingsHeader>
      <div class="trackbacks-content">
        <p>Listed below are links to weblogs that reference <a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a>:</p>
      </MTPingsHeader>
      <a id="p<$MTPingID pad="1"$>"></a>
      <div class="trackback" id="ping-<$MTPingID$>">
        <div class="trackback-content">
          <p>
            » <a rel="nofollow" href="<$MTPingURL$>"><$MTPingTitle$></a> from <$MTPingBlogName$><br />
            <$MTPingExcerpt$> <a rel="nofollow" href="<$MTPingURL$>">[Read More]</a>
          </p>
        </div>
        <p class="trackback-footer">
          Tracked on <a href="#ping-<$MTPingID$>"><$MTPingDate$></a>
        </p>
      </div>
      <MTPingsFooter>
        </div>
      </MTPingsFooter>
    </MTPings>
  </div>
</MTIfPingsActive>


I haven't had time to troubleshoot this myself yet, but I'm 99% sure that it's just something we have to update in our templates, rather than a bug in the code. New container tags? New syntax? I dunno for sure, but hope the above helps you.

.g
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.