2017 © Pedro Peláez
 

contao-module contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

image

heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  • Tuesday, May 29, 2018
  • by digitales@heimrich-hannot.de
  • Repository
  • 5 Watchers
  • 0 Stars
  • 350 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 30 Versions
  • 2 % Grown

The README.md

Share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules., (*1)

Features

  • news & calendar support
  • add syndication to modules and articles
  • syndication options:
    • print pdf
    • print by a custom module template or call the default browser print fun
    • ical-event
    • mailto
    • feedback
    • facebook share
    • twitter share
    • googleplus share

Usage

Setup for modules

Add Share to your module palette

Add {share_legend},addShare; to your model default palette., (*2)

Example:, (*3)

$dca = &$GLOBALS['TL_DCA']['tl_module'];
$dca['palettes']['newsreader'] = str_replace(
    '{image_legend',
    '{share_legend},addShare;{image_legend',
    $dca['palettes']['newsreader']
);
Generate share output

To show the share buttons in your module, you need to add the return of Settings->generate() to your template., (*4)

Example:, (*5)

// Module class: 

public function compile()
{
    ...
    $this->generateShare();
    ...
}

protected function generateShare()
{
    if ($this->addShare)
    {
        $objShare = new \HeimrichHannot\Share\Share($this->objModel, [Entity to print]);

        $this->template->share = $objShare->generate();
    }
    return null;
}

// Template file:

= $this->share ?>

Add Share urls to your template

// Add this to the generateShare method from above, after calling generate():
if ($this->module->share_addTemplateLinks)
{
    $this->template->shareUrls = $objShare->generateShareUrls();
}

This will add an array to the template with following key containing just the urls: * mailto * facebook * twitter * linkedin * whatsapp, (*6)

Setup for articles

Since version 1.5 you can also print complete articles., (*7)

  1. Setup a new model, which has share enabled (=has addShare added to the module palette, the module type doesn't matter). This module will hold the settings for the article., (*8)

  2. Check "Add Syndication" on the article settings page and choose the module setup before., (*9)

  3. Echo $this->share in your article template., (*10)

Custom name for your pdf files

Your module has to implement ModulePdfReaderInterface. The return-value of getFileName() is used as pdf file name. Don't add .pdf, it will be added by the module itself., (*11)

1, (*12)

To address your custom module print layout, the url must contain the print parameter with the module id as value. (Example: ?print=57). The default print link will do that for you and will create a new tab/window and close it immediately after the window was printed by the user. To debug the print layout, add the pDebug=1 parameter to your print url (Example: ?print=57&pDebug=1)., (*13)

For regions within your templates that should not be printable, add <!-- print::stop --> before that region and <!-- print::continue --> afterwards., (*14)

<!-- print::stop -->
DO NOT PRINT THIS!
<!-- print::continue -->

It is also possible to simple call the browser print windows to print the complete page by checking 'printWithoutTemplate' withing the syndication selection in module settings., (*15)

The Versions

29/05 2018

dev-master

9999999-dev https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

29/05 2018

1.7.0

1.7.0.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

21/03 2018

1.6.0

1.6.0.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

19/02 2018

1.5.2

1.5.2.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

19/02 2018

1.5.1

1.5.1.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

17/01 2018

v2.x-dev

2.9999999.9999999.9999999-dev https://github.com/heimrichhannot/contao-share

A bundle to provide extended pdf, print and social share functionality for contao.

  Sources   Download

LGPL-3.0+

The Requires

 

The Development Requires

symfony facebook pdf twitter contao share googleplus

16/01 2018

1.5.0

1.5.0.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

11/10 2017

1.4.1

1.4.1.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

10/10 2017

1.4.0

1.4.0.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

25/09 2017

1.3.6

1.3.6.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

21/08 2017

1.3.5

1.3.5.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

08/08 2017

1.3.4

1.3.4.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

08/08 2017

1.3.3

1.3.3.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

08/08 2017

1.3.2

1.3.2.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

01/08 2017

1.3.1

1.3.1.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

31/07 2017

1.3.0

1.3.0.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

19/07 2017

dev-mpdf-migration

dev-mpdf-migration https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

17/07 2017

1.2.6

1.2.6.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

14/07 2017

1.2.5

1.2.5.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

12/07 2017

1.2.4

1.2.4.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

03/07 2017

1.2.3

1.2.3.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

03/07 2017

1.2.2

1.2.2.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

03/07 2017

1.2.1

1.2.1.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

09/05 2017

1.1.1

1.1.1.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

05/04 2017

1.1.0

1.1.0.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

24/01 2017

1.0.4

1.0.4.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

05/12 2016

1.0.3

1.0.3.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

18/01 2016

1.0.2

1.0.2.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

13/10 2015

1.0.1

1.0.1.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus

24/04 2015

1.0.0

1.0.0.0 https://github.com/heimrichhannot/contao-share

A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.

  Sources   Download

LGPL-3.0+

The Requires

 

facebook pdf twitter contao share googleplus