Hi,
i am using the sexybookmark module and I have one problem:
I have multiple node on main page and all sexybookmark buttons link only to my blogs main url, not to
the nodes.

Comments

rocky1138’s picture

Title: Wron Url on mainpage » Wrong URL on mainpage

I have the same problem. Any fix?

Norberto Ostallo’s picture

Version: 7.x-2.0-beta2 » 7.x-2.0
klagler’s picture

I had the same issue, my frontpage is a view showing the newest nodes as teasers and the sexybookmarks buttons only link to the main url.

I changed the following code in the modules/sexybookmarks/includes/field_ui.inc file to fix this problem:

function sexybookmarks_entity_view($entity, $type, $view_mode, $langcode) {
  ctools_include('export');
  $profile = ctools_export_crud_load('sexybookmarks_profiles', variable_get("{$type}_sexybookmarks_profile_{$entity->content['#bundle']}", 'default'));
  if (!empty($profile)) {
    $uri = entity_uri($type, $entity);
    $entity->content['sexybookmarks'] = array(
      '#markup' => theme('sexybookmarks', array(
		'url' => url($uri['path'],  array('absolute' => TRUE)),
        //'url' => isset($entity->uri['path']) ? url($entity->uri['path'], array('absolute' => TRUE)) : '',
        'title' => isset($entity->title) ? $entity->title : '',
        'profile' => $profile->name,
      )),
      '#weight' => 100,
    );
  }
manoloka’s picture

Hi klagler,

Thanks that sorted it for me too.

Will this be ported to the module?

Thanks

shareaholic’s picture

Issue summary: View changes

SexyBookmarks module is no longer being actively maintained. It was a port of Shareaholic for WordPress, and Shareaholic has since released an official Drupal module:

http://drupal.org/project/shareaholic

Please migrate to the official Shareaholic for Drupal module, which has updated buttons, styles, services, 100% mobile-ready and much more! You can learn more here: https://blog.shareaholic.com/drupal-module/

shareaholic’s picture

Version: 7.x-2.0 »
Status: Active » Closed (fixed)