function addtoany_link in AddToAny Share Buttons 6
Same name and namespace in other branches
- 5.2 addtoany.module \addtoany_link()
- 5 addtoany.module \addtoany_link()
- 6.3 addtoany.module \addtoany_link()
- 6.2 addtoany.module \addtoany_link()
File
- ./
addtoany.module, line 17
Code
function addtoany_link($type, $node = NULL, $teaser = FALSE) {
global $base_url;
$string = 'share ' . $node->type . ' content';
drupal_add_css(drupal_get_path('module', 'addtoany') . '/addtoany.css', $type = 'module', $media = 'all', $preprocess = TRUE);
$links = array();
$output .= '<a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?linkname=' . variable_get("site_name", "") . '&linkurl=' . $base_url . '">
<img src="http://www.addtoany.com/bookmark.gif" width="91" height="16" border="0" alt="Bookmark"/></a>
<script type="text/javascript">a2a_linkname="' . variable_get("site_name", "") . '";a2a_linkurl="' . $base_url . '";</script>
<script type="text/javascript" src="http://www.addtoany.com/js.dropdown.js?type=page"></script>';
if (!$teaser && user_access($string)) {
$links['addtoany'] = array(
'title' => '<div class="addtoany" style="display:inline">' . $output . '</div>',
'href' => '#',
'html' => TRUE,
);
}
return $links;
}