summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVesa Palmu2008-09-06 10:17:06 (GMT)
committer Vesa Palmu2008-09-06 10:17:06 (GMT)
commitb1a05da92cefbd18bbf70feeed91589f5e893de5 (patch)
tree4db41858964fa0e86430ca73f457c5aa6bfe7d31
parent537e3a7e2be1df5710f671c12f8e8eef40b7b4ae (diff)
Minor tweaks to keep in line with Drupal coding standards
-rw-r--r--addthis.admin.inc6
-rw-r--r--addthis.module17
2 files changed, 15 insertions, 8 deletions
diff --git a/addthis.admin.inc b/addthis.admin.inc
index b400699..0c4437a 100644
--- a/addthis.admin.inc
+++ b/addthis.admin.inc
@@ -1,4 +1,10 @@
<?php
+// $Id$
+
+/**
+ * @file
+ * Administration settings for AddThis button integration
+ */
/**
* Administration settings form.
diff --git a/addthis.module b/addthis.module
index 42bafd4..41a5afc 100644
--- a/addthis.module
+++ b/addthis.module
@@ -22,12 +22,12 @@ function addthis_link($type, $node=NULL, $teaser = FALSE) {
$links = array();
if ($type === 'node' && user_access('view addthis')) {
- if (! $teaser || variable_get('addthis_display_in_teasers', '0')) {
- $links['addthis'] = array(
- 'title' => _addthis_create_button($node, $teaser),
- 'html' => TRUE,
- );
- }
+ if (! $teaser || variable_get('addthis_display_in_teasers', '0')) {
+ $links['addthis'] = array(
+ 'title' => _addthis_create_button($node, $teaser),
+ 'html' => TRUE,
+ );
+ }
}
return $links;
@@ -108,7 +108,8 @@ function _addthis_create_button($node=NULL, $teaser = FALSE) {
variable_get('addthis_image_height', '16'),
variable_get('addthis_image_attributes', 'alt=""')
));
- } else {
+ }
+ else {
return ( sprintf('
<div class="addthis"><a href="http://www.addthis.com/bookmark.php"
onmouseover="return addthis_open(this, \'\', \'%s\', \'%s\')"
@@ -116,7 +117,7 @@ function _addthis_create_button($node=NULL, $teaser = FALSE) {
onclick="return addthis_sendto()"><img src="%s" width="%d" height="%d" %s /></a></div>
<script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"></script>
',
- $teaser ? url('node/'.$node->nid, array('absolute' => 1) ) : '[URL]',
+ $teaser ? url('node/'. $node->nid, array('absolute' => 1) ) : '[URL]',
$teaser ? addslashes($node->title) : '[TITLE]',
variable_get('addthis_image', 'http://s9.addthis.com/button1-share.gif'),
variable_get('addthis_image_width', '125'),