Custom Share Module (version 0.1dev)
Custom Share Module creates and assigns a custom module featuring a "Custom Share Module".Known Issues & Limitations
- Some sites upgraded to Tiki 29.x display the module title and border even though the module has set nobox=y param (a Tiki regression?)
Installation & Update
To add this Profile repository to your Tiki add the line below to your Admin (Control Panels) → "Profiles" → "Advanced" tab → "Repository URLs" text area:https://profiles.luciash.eu/profiles
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 Panels → Profiles 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
This profile creates a custom User module with some social media icons to share the current page on these.The module will be assigned to the pagetop zone.