Hello,

I like this module as it is fast and light (comparing to fbsocial ). Thank you !!!
BTW, Seems that fbsocial has an issue with cache - I did not see it here.

I mostly use the block-like as I have a lot of pages which are not nodes but Views generated.
For these pages - only the LIKE block is useful.

The feature I would like to have is that the whole URL will be used, and not just the default one (the site home page).

Many thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

VTM’s picture

Just found another issue for the default URL of the Like-Block:
If I click "like" to a page generated by Views, then browsing any page generated by view - will display the like button as if I clicked it already.
In another words - the first like you make to a none-node page applies to the rest pages who are none-nodes.

... and though I selected to "display face" - it does not show faces next to the Like-Block button. I does display faces next to the node Like button.

skizzo’s picture

duplicate of (or related to) http://drupal.org/node/1167194 ?

dmsmidt’s picture

#2 Yes it is related, it's also about the shift to allow block positioning for the current url - like button. It wouldn't work with pages generated with views though (they have no normal node-type).

The visibility settings are now based on node-type. It wouldn't be so hard to add an option: "Manual" next to all the node-types. In that case you can use the block page and the settings of the block to manage visibility.

But if you don't have different url-patterns for different node-types, it would be difficult managing.
So the per node-type options should be leading, and after that we would like to add urls or patterns on which we also want to show the block.

Another option is: including a list of views, and selecting on which views you want to show the block. But that could become messy with a lot of views.

dmsmidt’s picture

Title: Let the block use the current URL » Current URL - Like button on Views pages
Version: 6.x-1.6 » 7.x-1.x-dev
Component: Miscellaneous » Code

Title: This is mainly views related. Version: I think first we need to fix the 7.x branch and later try to back-port it.

VTM’s picture

Thanks.
Like button for nodes is primary. For views it is secondary - at least in my site.
Would be of additional functionality to have the Like button with URL per view.
I'll follow for upgrades.

Meanwhile - I'll use the block for the homepage.

dmsmidt’s picture

@VTM in #1 you mentioned that the like button showed as already liked on all your views pages. But this is due to the fact that you use the block with the default url. That is expected behavior because it likes 1 default url, and not the current URL. This could be handy if you want people to like your fanpage e.g.

The task to make it compatible for current views urls stays as it is. (I hope the maintainer will reply sometime..)

thomas.feichter’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Active » Needs work
FileSize
3.38 KB

Attached is a very simple patch against the latest 6.x-2.x-dev adding an option to show the Like button also on non-node pages like the default front page or views (as block). The current url will be used.
I use it on a few live sites together with the HTML5 implementation of the facebook like button (patch provided here).

lliss’s picture

I like the idea of added another like button option for the current page. This could be handled in one of a few ways. I want to add some views functionality to the module anyway but that's overkill for this particular issue. The easiest things to do for this issue are:

1. We could just duplicated the functionality from the static/global like button into yet another block that could be dropped on pages and would just grab the url from the current page. This would give another config page for the current page with options etc.

2. We could create another block that uses the global/static like button's options and the only difference would be that this one would pull the current url.

Thoughts.

dmsmidt’s picture

I introduced the static/dynamic names in this module, to make the difference more clear. In my opinion the like button is in this case dynamic (using the current url as an argument). The module is however still node-centered and needs to change.

Iliss, thanks for joining the forces.

Your option 1 would mean some overlapping on node displays. Displaying a block from the "Dynamic LB" and the "Current url LB". And adds to the clutter of configuration.

Option 2 seems very easy, and reduces extra, in my eyes, unnecessary configuration. In my opinion the settings of the Dynamic LB should be used (since it is dynamic).

We could add an option: "Enable Like button block on non-node pages". And add some help text: "On non-node pages the current URL will be liked."
This option also needs to disable the choices "Content area" and "Links area" in "Where do you want to show the Like button (full node view)?". Because otherwise we would get the overlapping mentioned in option 1.

Configure the settings for the Like button as it appears on individual nodes (liking that node).

Could become:

Configure the settings for the Like button as it appears on individual nodes, teasers and pages (liking that node).