By James Hertsch on
I like the Drupal Trackback module, but the Trackback URL box is mucking with Image Attach image placement (haven't themed either). I decided I'd like to put the Trackback URL in the block that the Trackback module generates. I opened up trackback.module, but not being a PHP programmer, I have no idea what to tweak.
The relevant code sections are (I think):
function theme_trackback($trackback, $links = array()) {
$output = '<div class="trackback" id="trackback-'. $trackback->trid .'">'."\n";
$output .= '<h3 class="title">'. l($trackback->subject, $trackback->url) .'</h3>'."\n";
$output .= '<span class="submitted">'. t('from %sitename on @date', array('%sitename' => $trackback->name, '@date' => format_date($trackback->created))) .'</span>'."\n";
$output .= '<div class="content">'. check_markup($trackback->excerpt) .'</div>'."\n";
if ($links) {
$output .= '<div class="links">'. theme('links', $links) .'</div>'."\n";
}
$output .= '</div>'."\n";
return $output;
}
function theme_trackbacks($trackbacks) {
$output = '<div id="trackbacks">'."\n";
$output .= $trackbacks ."\n";
$output .= '</div>'."\n";
return $output;
}
function theme_trackback_url($url) {
return '<div id="trackback-url">'. theme('box', t('Trackback URL for this post:'), $url) .'</div>';
}and
function trackback_block($op = 'list', $delta = 0, $edit = array()) {
if ($op == 'list') {
$blocks[0]['info'] = t('Recent trackbacks');
if (variable_get('trackback_view', 0) == 2) {
$blocks[1]['info'] = t('Trackbacks');
$blocks[1]['cache'] = BLOCK_CACHE_PER_PAGE | BLOCK_CACHE_PER_ROLE;
}
return $blocks;
}
Any idea what I should move where?
Comments
Add Trackback URL into Block
Hi, I've integrated this feature inside my edits to Trackback module. Read about full list of changes here:
http://drupal.org/node/297487#comment-1073709
You'll find a patch to get this edits! Let me know!
Regards
-thePanz-
-thePanz-