I'd like to add a custom parameter to the node url before sharing or shorten url:
like www.mydomain.com/mynode/ ----> www.mydomain.com/mynode/?mcp=mycustomparameter

Thank you in advance

Comments

TheCrow’s picture

Status:Active» Fixed

I just added this feature in dev, if doesn't work as you thought reopen this issue please :)

jmesam’s picture

Thank you very much, I'll try it

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jmesam’s picture

Status:Closed (fixed)» Active

Hi,
I have tested this feature, but when I try to append multiple parameters with bit.ly shorten service, it only append the first parameter ignoring the second one. I also noticed the ampersands symbols are html encoded: &, maybe that is the reason of the bug.

Thank you in advance

TheCrow’s picture

Tried it with another service, either without short url?
Since i tried bit.ly directly and seem work with 2 params, i think could depend from shorten module...

jmesam’s picture

I have tried it with tinyurl.com and it pass more than 1 parameter, so it only happen with bit.ly.

The & (ampersand) encode problem still there.

Thank you for your support

TheCrow’s picture

file service_links.module, subst the commented row how i did below:

<?php
function _service_links_load_settings() {
  static
$settings = NULL;

  if (!isset(
$settings)) {
    ...
   
//$settings['text_to_append'] = check_plain(variable_get('service_links_append_to_url', ''));
   
$settings['text_to_append'] = strip_tags(variable_get('service_links_append_to_url', ''));   
     ...
  }

  return
$settings;
}
?>
jmesam’s picture

Now I'm travelling, I'll test it at home. Thanks again.

jmesam’s picture

Status:Active» Closed (fixed)

It works, thank you very much.

TheCrow’s picture

Commited!

queryblitz’s picture

Status:Closed (fixed)» Active

Rather than opening up a new issue, can I add a related request? I'd like to be able to replace the link entirely with a custom string. Can you make that an option too? Reason being, I actually want the current page to be appended as a destination parameter.

TheCrow’s picture

Simon Georges’s picture

Status:Active» Closed (fixed)

Getting back to "fixed" as there seems to be another issue for the last request.