Loading...
 
(Cached)

Custom Share Module (version 0.1dev)

Custom Share Module creates and assigns a custom module featuring a "Custom Share Module".


Known Issues & Limitations

  • There are currently no known issues or limitations


Installation & Update

Put Installation and update info here, e.g.:
If you do an update please do not forget to unassign the previous version of the profile module in Modules, otherwise you will end up with multiple versions of the module applied.

By hitting the Apply Now button on Control PanelsProfiles control panel (or Forget and Re-apply if you want to do an update) the following YAML code will be applied:

YAML
objects:
 -
  type: module
  data:
   name: Custom Share Module 0.1dev
   position: pagetop
   order: 999
   params:
    nobox: y
   custom: |
    <style>{literal}.mod-share-item {float: none;}{/literal}</style><a href="#" class="fb-share btn-link" title="{tr}Share on Facebook{/tr}" target="_blank">{icon name="facebook"}</a>
    <a href="#" class="tw-share btn-link" title="{tr}Share on Twitter{/tr}" target="_blank">{icon name="twitter"}</a> {module module="share" share="y" email="y" icons="y"
    facebook="n"
    facebook_send="n"
    facebook_show_faces="n"
    facebook_colorscheme="light"
    twitter="n"
    linkedin="n"
    google="n"
    nobox="y" class="d-inline-flex mb-0"}
    
    {jq}
      var cp = encodeURIComponent(window.location);
      $('.fb-share').each(function() {
      	var	link = $(this),
      		href = cp;
    	link.attr('href', 'https://www.facebook.com/sharer.php?u=' + href + '');
      });
      $('.tw-share').each(function() {
      	var	link = $(this),
      		text = encodeURIComponent('Interesting stuff I found:'),
      		href = cp;
    	link.attr('href', 'https://twitter.com/intent/tweet?text=' + text + '&url=' + href + '');
      });
    {/jq}


Usage

Here go the usage instructions, e.g.: This profile creates a custom module with a "Custom Share Module" in it.
The module will be assigned to the pagetop zone.

Uninstall

Just unassign and delete the module on the Admin → Modules page.