More bookmarks links

Carlitus - April 9, 2008 - 17:28
Project:Service links
Version:6.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

¿Can you put more bookmarks links or you want only the more popular english bookmarks links?

If you want to add some spanish bookmarks links (meneame, barrapunto and fresqui) here are the code:

In service_links.module in the function service_links_admin_settings

  $form['what_links_to_show']['service_links_show_meneame'] = array(
    '#type' => 'checkbox',
    '#title' => t('Show Meneame link'),
    '#return_value' => 1,
    '#default_value' => variable_get('service_links_show_meneame', 1),
  );
  $form['what_links_to_show']['service_links_show_fresqui'] = array(
    '#type' => 'checkbox',
    '#title' => t('Show Fresqui link'),
    '#return_value' => 1,
    '#default_value' => variable_get('service_links_show_fresqui', 1),
  );
  $form['what_links_to_show']['service_links_show_barrapunto'] = array(
    '#type' => 'checkbox',
    '#title' => t('Show Barrapunto link'),
    '#return_value' => 1,
    '#default_value' => variable_get('service_links_show_barrapunto', 1),
  );

and in the function service_links_render

  if (variable_get('service_links_show_meneame', 0)) {
    $links['service_links_meneame'] = theme('service_links_build_link', t('Meneame'), "http://www.meneame.net/submit.php?url=$url", t('Menea este post en meneame.net.'), 'images/meneame.png', $nodelink);
  }
if (variable_get('service_links_show_fresqui', 0)) {
    $fresqui = theme('service_links_build_link', t('fresqui'), "http://tec.fresqui.com/post?url=$url&title=$title", t('Submit this post on tec.fresqui.com.'), 'images/fresqui.png', $nodelink);
    $fresqui = str_replace("?url=http:",'?url=http%3A',$fresqui);  /* Si ponemos no ponemos %3A en lugar de : muestra el error warning: parse_url*/
    $links['service_links_fresqui'] = $fresqui;
  }
  if (variable_get('service_links_show_barrapunto', 0)) {
    $links[] = theme('service_links_build_link', t('barrapunto'), 'http://barrapunto.com/submit.pl?story=He+leido+en+' ."$site_name" .'+el+articulo+<a href="' ."$url" .'">' ."$title</a>&subj=$title.", t('Publish this post on barrapunto.com.'), 'images/barrapunto.png', $nodelink);
  }

The images are attached.

The authors of this code and images (well, the images maybe not) are Bytecoders

AttachmentSize
barrapunto.png1.13 KB
fresqui.png340 bytes
meneame.png1017 bytes

#1

wayland76 - May 2, 2008 - 01:48

I'd suggest that resolving this bug:

http://drupal.org/node/253758

...would also fix these problems, and in a more flexible way.

#2

davebv - May 12, 2008 - 16:34

I would like you to add those new links (meneame, barrapunto and fresqui),please, for those popupular spanish networks. I'd appreciate it really much! thank you!!

#3

c-c-m - June 11, 2008 - 21:07

Is it possible to implement this code (#1) into version 5.x? I'm willing to have a meneame button!

#4

wayland76 - July 8, 2008 - 07:13

If you're referring to the link to WIJI, then the answer is no, unless someone backports the WIJI module to 5.x (currently only exists for 6.x).

 
 

Drupal is a registered trademark of Dries Buytaert.