Hello please add support for more than one set of buttons, allowing more than one block. For example:

  • 1 for "Share" and
  • 1 for "follow us"

Thanks

Comments

mariusm created an issue. See original summary.

adamps’s picture

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

Yes, it's a good idea, thanks.

Could even make it so that you could add as many sets of buttons as you want. Each one could be configured separately as follow/share with a choice of buttons. The node form could have an input to choose which set of buttons, and each set of buttons could have a block.

Patches welcome. I've set to v2.x, because new features will likely go in the new branch. Sorry, I haven't written up any instructions for it yet.

himanshu-dixit’s picture

Version: 7.x-2.x-dev » 8.x-2.x-dev

@AdamPS I guess we could implement this feature in the 8.x-2.x branch first. What do you think?

adamps’s picture

Title: Add 2 Block ( 1 for Share + 1 for follow us) » Support multiple buttons sets (for example 1 for Share + 1 for follow us)
Issue summary: View changes

Here's what I have in mind

  • /admin/config/content/rrssb: page listing all the available blocks, with links to edit or add new
  • /admin/config/content/rrssb/{set}/edit: page to edit button set - much like existing form, but add a description field and maybe a checkbox to enable/disable the block.
  • /admin/config/content/rrssb/new: exact same form as edit page but creates a new item
  • /admin/config/content/rrssb/{set}/delete: confirm delete page
  • hook_form_FORM_ID_alter: use a select list instead of a checkbox
  • RRSSBBlock: add a config setting to choose which button set
  • Config: need to change schema and install
  • Caching: must now be indexed by button set, NB several types of cache
  • Migration: automatically convert sites from old config to new. However can skip this if we make the change soon whilst we are still on alpha.
adamps’s picture

Issue summary: View changes

@himanshu-dixit Now would be a good time to start this work. The rest of the code is fairly stable, and it's early enough still that we could avoid the migration code.

**** Please do not check code into 8.x-2.x until it has been fully tested and reviewed ****

You can either create a feature branch in git on Drupal.org or use your own git repository and post a patch for review.

himanshu-dixit’s picture

Assigned: Unassigned » himanshu-dixit

Assigning this issue to myself. I would provide the patch soon for this issue (by using my own sperate git repo)

ajayg’s picture

Do we really need edit? If creating the block requires only checking relevant checkboxes, we can skip edit. If someone wants change they can simply delete and create a new one. Unless I am missing a feature you had in mind with edit. What exactly the user could do in edit? A) change the order B) disable a button C) change the follow or share text. What else ?

I am thinking loudly here. If you create a block(drupal core block) with the button selection set in the order and name that block, that is all you need. Because multiple blocks can be created and assigned to multiple regions. Showing which block to show on which content type is handled by core. Deleting blocks handled by core.
Module will be much simpler. Same block can be used in Panels etc.

ajayg’s picture

Here is a case that is for providing edit feature.
By default the Google analytics module does not provide/record social share events. These had to be implemented by website owners.
So after each button you can allow to attach a custom input box to send event to google and admin can enter whatever javascript they wish to enter (By default it would be blank.)
ga('send', 'social', 'Facebook', 'like', 'http://myownpersonaldomain.com');
More details here
https://developers.google.com/analytics/devguides/collection/analyticsjs...

adamps’s picture

@ajayg edit is definitely required. /admin/config/content/rrssb is a complex form. Deleting and creating again to make a small change is not acceptable, especially as that would likely break any content types and blocks that were using the button set. Everywhere on Drupal you see it: create, edit and delete.

adamps’s picture

@himanshu-dixit Have you had any time to make progress?

I think we are ready to make a RC release now. After that I would still welcome this feature, but there would need to be a hook_update to migrate existing sites. I am happy to wait a few weeks if you that would give you time to complete the code. Let me know - thanks!

adamps’s picture

Assigned: himanshu-dixit » Unassigned

I am a site that needs this so have started work.

  • AdamPS committed 003fefb on 8.x-2.x
    Issue #2827868 by AdamPS: Support multiple buttons sets (for example 1...
adamps’s picture

Status: Needs work » Fixed

NB If updatedb fails with "Failed: Incomplete or missing schema for rrssb.button_set.default" please rerun and it should work

I will add this text to the release note when I create the next release.

Status: Fixed » Closed (fixed)

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