Topic-icon SCSocial Widget: How to get responsive width?

Active Subscriptions:

None
7 years 4 months ago - 7 years 4 months ago #65000 by kimborg
I prefer SCSocial Widgets page plugin to SCSocial Stream, but it lacks capability for responsive width. The module can only be set to fixed px width, not 100%. How can I get it to adapt to the template the way SCSocial Stream does?
Last edit: 7 years 4 months ago by mel.
The topic has been locked.
Support Specialist
7 years 4 months ago #65006 by alzander
The SCSocialWidget module doesn't provide an option for width in the parameters because a module goes into a template position, which should be setting it's width. You should use the Module Class Suffix parameter in the module to create your own CSS class and then apply a width of 100% to that class.

I hope that helps, but if you need any assistance, please let us know a page where we can see the module you've placed and a description of what you're looking for.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
7 years 4 months ago #65008 by kimborg
Please have a look at these two screendumps, where the two modules are placed in the same module position. SCSocial Stream adapts easily to changes in browser width, and SCSocial Widgets does not. If you wish, I could pm you credentials for the site (its a staging page that is yet to be published).
1. Before browser width reduction: screenshots.firefox.com/XVfzjfmlcK5O1Txe/staging1.yogahuset.no
2. After reduced browser width: screenshots.firefox.com/aAh9yiY6zKCEKo5j/staging1.yogahuset.no
The topic has been locked.
Support Specialist
7 years 4 months ago #65013 by alzander
Ahh.. I understand more now. First off, the SCSocialWidget implements the Javascript widgets for each social network. Not all of those allow for flexible width settings, which is why we can't do it automatically. For instance, the Like buttons and such are all fixed width.

From your image though, it looks like you're using the Facebook -> Page Plugin widget, which does support a dynamic width. To use that, set the Width parameter to '100%' in the settings. Then, you'll need to make sure the column the module is set in is also set to to a dynamic width, but that should get you going.

One thing to note with the Page Plugin though is that it will not dynamically resize. It will set it's width on page load.. so you can shrink and grow it repeatedly, but you can shrink and reload the page.. which is how a mobile phone would load that page (a fixed, smaller width on load).

I hope that helps explain, but if you need anything else, just let us know.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
7 years 4 months ago #65014 by kimborg
Thanks for your reply. Unfortunately, setting module width to 100% leaves the module blank. It displays no content. Setting it back to a fixed px size, content is displayed again.
The topic has been locked.
Support Specialist
7 years 4 months ago #65018 by mel
Yes, it appears that 100% is no longer a valid value to pass to the widget. If you check out the plugin generator at developers.facebook.com/docs/plugins/page-plugin/, the same behavior is shown.

From this Page Plugin documentation, I would recommend that you could set the width to the maximum of 500px and enable the "Adapt to plugin container width" setting. On load, the page plugin will then adapt down its parent container's width.

The plugin will by default adapt to the width of its parent container on page load (min. 180px / max. 500px), useful for changing layout

If the width of the parent element is bigger than the Page plugin's width it will maintain the value defined in data-width

The plugin will never be smaller than 180px


So there will no going larger than 500px (by Facebook's design) and it will do it's best to resize down for a smaller parent. I think Facebook has just limited what's available for this plugin now.

-Melissa
The topic has been locked.
Active Subscriptions:

None
7 years 4 months ago #65020 by kimborg
Ok, thanks. I've done as described, and thats fine.
The topic has been locked.
Support Specialist
7 years 4 months ago #65024 by alzander
Awesome! We're glad to hear that got you going. If you need anything else, please let us know.

Finally, if you haven't already, please consider leaving a rating and review for JFBConnect, or our support, on the Joomla Extension Directory. It's certainly not required, but very appreciated:
extensions.joomla.org/extensions/extensi...l-display/jfbconnect

Thanks,
Alex
The topic has been locked.