-
Notifications
You must be signed in to change notification settings - Fork 1
/
shurly_integration.theme.inc
24 lines (22 loc) · 1.02 KB
/
shurly_integration.theme.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php // $Id: shurly_integration.theme.inc $
/**
* @file
* Theme functions for Oxf.am integration tools.
*/
/**
* Theme function for Tweet This block.
*
* @return $output String of content output.
*/
function theme_shurly_tweet_this($node) {
$path = drupal_get_path('module', 'shurly_integration') .'/images/tweet-this.png';
$alt = $title = t('Tweet this');
$status = array('status' => $node->title .' | '. variable_get('site_name', '') .' '. $node->shurl['short_url']);
$image = theme('image', $path, $alt, $title, array('class' => 'img tweet-this tweet-this-img', 'id' => 'oxf-am-tweet-this-img'));
$output = l($image, 'http://twitter.com/', array('html' => TRUE, 'attributes' => array('title' => $title, 'target' => '_blank', 'class' => 'tweet-this tweet-this-anchor', 'id' => 'oxf-am-tweet-this'), 'query' => $status));
return $output;
}
function theme_shurly_permalink($node) {
$output = t('<strong>Permalink:</strong> !url', array('!url' => l($node->shurl['short_url'], $node->shurl['short_url'])));
return $output;
}