I'm using a sub-theme which has a header region. However it is not working either in footer nor in header. It is displayed on the top of the node's body.

I also have a panel customizing a node type. This node type does not display +1 anywhere.

It would be very interesting if the admin could choose other places to insert +1. For example, in node titles.

Comments

corbacho’s picture

Hi Mac,

The header / footer setting is about where to include the javascript file, it's not the button placement.

The button placement depends more about the weight (relative to node body) and the css. You can play with negative margins or position:absolute to make more "radical" placements.

I haven't tested with Panels but I know someone said in this issue queue about showing it in Panels through "node links". So try to enable this view mode in the settings of g.plusone.

btw, what Panels version are you using? I will try to test it during next days.

Mac_Weber’s picture

I'm still think it would be interesting if admin could choose where the div would be inserted and using CSS just to do minor adjustments.

About Panels, I'm using 7.x-3.0-alpha3. I added a node link as you said, but it just displayed a normal link.

corbacho’s picture

I can't do anything else from a module. The degree of manipulation in the placement of the button that you want, demands that you print it yourself in the node.tpl.php

If you want to print it before print render($content);, just put this <?php print render($content['google_plusone']); ?>

If it's AFTER the content is printed, you will need to hide it first:

      hide($content['google_plusone']);
      print render($content);

I will test it with Panels, soon I will report here.

BenK’s picture

Keeping track of this

corbacho’s picture

I tested with Panels 7.x-3.0-alpha3.

There are different Panels types... I tested these two and both worked fine:

Panel node
Creating a "Panel node" it creates a new content type -> Enable it this content type in Google Plus One settings and that's all.

Panel page
For this you need the Page Manager enabled, this sub-module of Panels requires Ctools (Tested with 7.x-1.0-beta1)
Then I did this:

* go to admin/structure/panels
* Under "Manage pages" enable "Node template" then click on edit link
* Click on the "Add a new variant" link
* Name it, select Panel and didn't check anything else there
* Select a builder. Continue
* Continue Add Variant
* In the little cog -> Add content -> Node -> Node content (Other possibility is Node Links)
* Disable the checkbox Extra
* Update and save

Make sure that the view mode when adding the Node content in the panel matches with Google +1 Settings :
* Full content -> In google settings Full content
* Teaser -> in google+1 settings Teaser
* Node Links -> In google +1 settings Node Links

Please, report if it worked for you guys. I think the only difficulty was that "Extra" checkbox, easily can be overlooked. It says:

Check here to disable additions that modules might make to the node, such as file attachments and CCK fields; this should just display the basic teaser or body.

kscheirer’s picture

Issue summary: View changes
Status: Active » Fixed

Nice follow-up, that sounds like it would fix the issue.

Status: Fixed » Closed (fixed)

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