Pipit Sharing v2

A major update is now available for the Sharing app.

While v2.0 is a major update, it does not introduce any breaking feature. The main reason it’s v2.0 and not v1.3 is because I’ve rewritten major parts of the app to make it testable, more maintainable and easier to add new features.

In order too make generating links in Perch template even easier, you now can use tag attributes to quickly add the link options from other fields available in the template:

<perch:sharing id="twitter" desc="{postTitle}">

You can also add static content:

<perch:sharing id="twitter" desc="Some static content">

You can also specify a URL different than the page the link is disaplyed on:

<perch:sharing id="twitter" url="https://example.com" include-domain="false">

Or a relative path:

<perch:sharing id="twitter" url="/contact" include-domain="true">

The link itself can be dynamic (e.g. if you’re adding sharing links in a blog post listing /blog for each post on the list and each post has a postURL):

<perch:sharing id="twitter" url="{postURL}" include-domain="true">

Up until now, the app only allowed links to be generated in Perch templates. The new version makes it possible to generate sharing links directly in PHP too.

pipit_sharing_link('twitter', [
    'desc' => 'Some text',
    'tags' => 'PHP,CMS'

Another new featuring introduced in the new update is the ability to generate calendar links (e.g. “Add to Google Calendar”). This is an experimental feature so you may encounter some bugs. If you do, please report on GitHub.

You can generate “add to” calendar links for:

You can generate the links in both PHP or a Perch template:

pipit_sharing_link('google_cal', [
    'title' => 'Dentist appointment',
    'from' => '2019-04-01 09:00',
    'to' => '2019-04-01 13:00',
<perch:sharing id="google_cal" title="Dentist appointment" from="2019-04-02 09:00" to="2019-04-02 10:00">

Visit the app’s documentation for more details on the new features.