Skip to content

Instantly share code, notes, and snippets.

@haroldSanchezb
Created August 8, 2014 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haroldSanchezb/e3cf99ec59ad3435915a to your computer and use it in GitHub Desktop.
Save haroldSanchezb/e3cf99ec59ad3435915a to your computer and use it in GitHub Desktop.
Add This Custom Drupal
<?php
Mymodule_preprocess_node(){
$variables['url_share'] = url(current_path(), array('absolute' => TRUE));
drupal_add_js('http://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-get-pubid', 'file'); //get public id
}
<div class="addthis-more">
<div class="addthis_toolbox addthis_default_style"><a class="addthis_counter addthis_pill_style" addthis:url='<?php print $url_share; ?>'></a></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment