Hi,

I have a custom template file and would like to print the 'Share' site content button, does anyone know what code be required to do this?

Thanks,

Evelyn

Comments

geokat’s picture

You can call the PHP function rpx_js_social(); that will take care of
placing the required Javascript on the page.

To get the button itself, you need to place the contents returned by
_rpx_share_button() on the page. This function accepts the node object
as its argument.

Hope this helps,
George

nyleve101’s picture

Hi,

is there any pre developed code for this? I'm not a coder I thought there might be a snippet like there is for the fivestar widget.
print $node->content['fivestar_widget']['#value'];

Thanks for getting back to me!

Evelyn

brunorios1’s picture

i need this too...

venusrising’s picture

Yes we too were wondering how to get the login on or near the comment form

nyleve101’s picture

Hi,

can any further light be shed on this. I've tried checking for available variables in the node.tpl.php

    print '<pre>';
    print var_export($form);
    print '</pre>';
  

Thanks,

Evelyn

nyleve101’s picture

Hi,

is the "Share" button or link available in the D6 version of this module?

Thanks,

Evelyn

nyleve101’s picture

Status: Active » Closed (fixed)
brunorios1’s picture

Status: Closed (fixed) » Active
nyleve101’s picture

Hi,

sorry to reopen this, I've managed to get the share button to print using print _rpx_share_button($node); . However; when clicking on the button the janrain popup doesn't appear. I've checked in firebug and the following error is present:

rpx.js a non-null share_display string is required

Does anyone know what could be causing this? The button works perfectly on node types that I haven't placed manually printed the button in the template.

Thanks,

Eve

gargsuchi’s picture

@nyleve101
were u able to find a solution to this?

Thx
Suchi

nyleve101’s picture

Hi Suchi,

unfortunately I wasn't able to find a solution after much digging. Sorry i can't be of more help.

nyleve101’s picture

Hi Suchi,

unfortunately I wasn't able to find a solution after much digging. Sorry i can't be of more help.

Max_Headroom’s picture

As pointed out in #1. You have to run another function to load js as well. This works in a block on a node page:

 rpx_js_social();
$node = node_load(arg(1));
print _rpx_share_button($node);