horst

Module
Pia - Pageimage Assistant

45 posts in this topic

Pia - Pageimage Assistant

Hello, today I can tell you that Pia Ballerina want to assist you with Pageimages   pia-ballerina_titel.jpg
and that can become really helpful! :)
.
.
.
Pia, in its current state, version 1.0.0, provides:

  • a GUI (the module config screen) for quick and easy changes to the sitewide Pageimage default options
     
  • an alternative way for calling the Pageimage resizing methods with PW selector strings
     
  • three new methods as shortcuts to the resizing functions
     
  • a new method called retinafy and its alias hiDPI, (introduced in version 0.2.0)

.
.
.
2) Instead of ->width(), ->height(), ->size() you can call ->pia() now. With a PW selector string you tell Pia what image variation you want to have :
.

$image->pia("width=100, quality=80, sharpening=medium")->url;

.
If you want process ->width() just define width.
If you want process ->height() only define height.
If you want process ->size() just define width and height.
If you want process ->size() with equal values for width and height, just define only size, or use the alias square:
.

$image->pia("width=480")->url;
$image->pia("height=320")->url;
$image->pia("width=400, height=300")->url;
$image->pia("size=350")->url;
$image->pia("square=350")->url;

.
So, yes, - I see. Now you may think: "Ok, nice looking girl, - and she can dance very well, - but for what should it be good that she is involved here? My very old buddies width, height and size - and me, - we don't need any Ballerinas between us!"
.
Yeah, I see what you mean. But this above is not what Pia is good for, this is just a little warming up for you. :)
.
In some cases one need to specify more than just width and / or height. If it comes to that you need explicitly populated options with the individual pageimages, Pia will become faster and more comfortable at some point. Also the code is looking more readable with Pia, at least to me:
.

// regular style #1:

$image->width(800, array("upscaling" => false, "cropping" => true, "quality" => 80, "sharpening" => "strong"));

// or regular style #2:

$options = array("upscaling" => false, "cropping" => true, "quality" => 80, "sharpening" => "strong");
$image->width(800, $options);

// now lets Pia dance:

$image->pia('width=800, upscaling=0, cropping=1, quality=80, sharpening=strong');

$image->pia('width=800, upscaling=off, cropping=on, quality=80, sharpening=strong');

.
For me it is that not only Pia begin to dance, my fingers do so too when writing selector strings instead of the regular array code. :)
.  
Ok, last thing before we can go to stage: "You already may have noticed that Pia accepts few different values for boolean expression, yes?"

  • for TRUE you can write these strings: "1, on, ON, true, TRUE, -1"
  • for FALSE you may use one out of "0, off, OFF, false, FALSE"

Ready? Ok, lets go to stage.
.
.
.
3) Pia provide three new methods as shortcuts. This means that when using one of the shortcuts you have pre-populated options, regardless of the sitewide default settings:

  • crop :: does what the name says
     
  • contain :: is equal to the regular method: ->size($width, $height, array("cropping" => false))
     
  • cover :: this, Pias third child, is a new kid on the block :)

.
Let's have a closer look and compare it. We use Pias image from above as source for this example. (It's dimensions are 289 x 400 px)
.
.
* crop

$image->crop('square=100'); 

.
pia-ballerina_titel.100x100-piacrop.jpg    it is 100 x 100 px    and the name is:  pia-ballerina_titel.100x100-piacrop.jpg
.
.
.
* contain

$image->contain('square=100');

.
pia-ballerina_titel.100x100-piacontain.j    it is 73 x 100 px   and the name is:  pia-ballerina_titel.100x100-piacontain.jpg
.
.
.
* cover

$image->cover('square=100'); 

.
pia-ballerina_titel.100x139-piacover.jpg    it is 100 x 139 px   and the name is:  pia-ballerina_titel.100x139-piacover.jpg
.
.
.
Ok, you got it?
.
"Crop" crop out the area, "Contain" fits the image into the area, and "Cover" calculates the needed dimensions for the image so that the area is completly covered by it.
.
Following is a link with lots of those crop-, contain-, cover- variations. I have stress-tested it a bit: much variations
.
----------
.
.
Later Additions:
.
* contain with option weighten
Since version 0.0.6 contain can take an additional param called "weighten". (read more here)
.
.
.

* retinafy
Since version 0.2.0 retinafy is added. It returns a markup string, e.g. a HTML img tag, where placeholders are populated with property values from the pageimage. Default properties are: URL, WIDTH, HEIGHT, DESCRIPTION. The method also can take an optional array with CustomPropertyNames. You also can use the alias HiDPI if you like. (read more here)

.
.
----------
.
.
You can get the module from the modules directory or from the repo on Github:
.

git clone https://github.com/horst-n/PageimageAssistant.git your/path/site/modules/PageimageAssistant

.
.
Bye! 
.

 

pia-ballerina_outro.jpg

Classical ballet performance at the Aalto Theatre in Essen, in the context of the Red Dot Award ceremony 26 June 2007,
Act III, Sleeping Beauty, the wedding reception
Photos: Horst Nogajski - www.nogajski.de

 

34 people like this

Share this post


Link to post
Share on other sites

It is incredible how it is in this PW forum, You go to sleep, you wake up, turn the computer on, and you find another jewel! It is all around the globe so magic just never stops! It is like a new year every day with presents under the tree. Thank you, mr. Horst!

And something on the substance:

1) It would be usefull in many cases (at least for me) to have a 4th method, which would act like contain, but would fill with adjustable color spaces to the left and right (or to the up and down if it is horisontal) making the thumb a squre, but still containing the whole of the image. Like this:

post-2275-0-94617800-1416728404.jpg

2) Could you please write a bit about how you work with images. We now have options from you: pim and pia (not forgetting about core methods). How do they work together? Should we use both or just one of them and in what cases?

2 people like this

Share this post


Link to post
Share on other sites

It is incredible how it is in this PW forum, You go to sleep, you wake up, turn the computer on, and you find another jewel! It is all around the globe so magic just never stops! It is like a new year every day with presents under the tree. Thank you, mr. Horst!

So true.  :rolleyes: Thanks horst. Pia is one fine lady.

1 person likes this

Share this post


Link to post
Share on other sites

1) It would be usefull in many cases (at least for me) to have a 4th method, which would act like contain, but would fill with adjustable color spaces to the left and right (or to the up and down if it is horisontal) making the thumb a squre, but still containing the whole of the image. Like this:

2) Could you please write a bit about how you work with images. We now have options from you: pim and pia (not forgetting about core methods). How do they work together? Should we use both or just one of them and in what cases?

thanks for the nice words.

1) unfortunately Pia only assist with preparing and delegating values to the images engines. She isn't able to process images her self.

What you are requesting is "canvas", it is provided by Pim. I don't know yet if Pia dynamically should support shortcuts depending on other installed modules or not. It can become a bit confusing. On the other hand I see how comfortable it could be if Pia would assist here too.

2) I will do so when finding a bit time for it.

So true.  :rolleyes: Thanks horst. Pia is one fine lady.

yes, she is! 

pia--one-fine-lady.jpg

2 people like this

Share this post


Link to post
Share on other sites

Updated to version 4

- I had to fix the forceNew option what may be used during site develope.

- also have changed a bit on the GUI: it detects if you have Fieldtype RangeSlider installed and uses that over a regular Integer Inputfield for Quality-Setting

If you are already using it, please update too.

Edited by horst
added change to version 4
2 people like this

Share this post


Link to post
Share on other sites

Hey horst - looks awesome, but I am running php 5.3.28 on my dev server (just to pick up on things like this) and get a parse error due to:

InputfieldRangeSlider::getModuleInfo()['version'] on line 345

Something like this takes care of it:

if($modules->isInstalled('InputfieldRangeSlider')) $rangeSliderInfo = InputfieldRangeSlider::getModuleInfo();
$hasSlider = $modules->isInstalled('InputfieldRangeSlider') && version_compare($rangeSliderInfo['version'], '1.0.4', '>=');
One minor typo while I think of it:
here you can set sitewide options, - this overrides the options from site/config.php
 
This is under the main config and also the advances section. As well as the missing "s", probably also don't need the comma and the hyphen.
2 people like this

Share this post


Link to post
Share on other sites

@Adrian: thanks for the feedback. Here she is a bit to modern I believe. I will change this soon! ^-^

5 people like this

Share this post


Link to post
Share on other sites

Hi Horst,

Many times I need to output a lot of logo's. Those logo's need to have the same visual weight. Some logo's need to be wider others need to be higher. May I purpose a new method 'logo' or something ?

Pia is dancing nicely with crop contain and cover, but could you let her swing with logo ?

I have a starting point here that works great (used it many times)

3 people like this

Share this post


Link to post
Share on other sites

Hi Martijn,

you mean you have a module that outputs images of different aspect ratios in a visual weighted manner?

This would be nice to have, once we have discussed on that already.

Regarding the name 'logo' I'm not sure. Can we find a more descriptive one?

visualWeighted is to long, :lol:

1 person likes this

Share this post


Link to post
Share on other sites

Yep that is what it does and yes that's a bad name. Logo was just a name to explain the method the best I guess.

1 person likes this

Share this post


Link to post
Share on other sites

New addition to contain: weighten!
 
If you want to put some images of different aspect ratio onto a webpage and you want that they are displayed more equal visual weightened, you can use this method and options now:
.
* contain with option weighten

$image->contain('square=90, weighten=on');

.
.
There is also the possibility to prioritize portrait or landscape oriented images:
.

$image->contain('square=90, weighten=x1');  // landscapes are a bit larger than portraits

$image->contain('square=90, weighten=x2');  // landscapes are a bit more larger than portraits

$image->contain('square=90, weighten=y1');  // portraits are a bit larger than landscapes 

$image->contain('square=90, weighten=y2');  // portraits are a bit more larger than landscapes 

.
.
Have a look to this output here:
.
pia_weighten_overview.jpg
.
.
.
.
PS:
@Martijn: I have taken your code for the calculations and set the percent value hard coded to 38. This way we only need to turn weighten on or off and have not to deal with values here. The only thing I have added to the calculation is an adjustment to fit better with the largest dimension into the initial bounding box dimensions. (Github)

7 people like this

Share this post


Link to post
Share on other sites

Big thanks Horst

 

The only thing I have added to the calculation is an adjustment to fit better with the largest dimension into the initial bounding box dimensions. (Github)

 

Thats why I used a rectangular box in the Gist to control it.

1 person likes this

Share this post


Link to post
Share on other sites

Thats why I used a rectangular box in the Gist to control it.

Yes, I know and I have used it initially that way. And you also can do it now: when passing width and height instead of square, the other possible options are ignored and the result should be similar to what you have got with the gist code, but maybe a bit larger. (20%)

I thought it would be easier and less confusion for average users to just have a switch for on/off and if they define a square of 120 that they get back the largest possible image with 120px.

If you also like / need the comp param dynamically to define, it can be easily added as a 'silent' option. :)

1 person likes this

Share this post


Link to post
Share on other sites
If you also like / need the comp param dynamically to define, it can be easily added as a 'silent' option. :)
 

Great ! :-) 

Share this post


Link to post
Share on other sites

I have updated the module to Version 0.1.0 beta and it has a new addition to the weighten option that can be used together with contain.
 
The initial code I have taken for weighten calculations is from Martijn. I have changed it to simplify its usage so that you only need to specify a bounding square and have to switch it on, or additionaly prioritize landscape oriented images in two favours: x1, x2 or do the same for portrait oriented images with: y1, y2. (read more in the posts above)
 
But if you (@Martijn ;) ) like to use more different options, like with the original ImageFitBoundaries.module, you can use it by specifying different values for width and height together with the new value "comp##". For ## you set the value for compression like comp20, comp30, comp40 or whatever you like.

:)

6 people like this

Share this post


Link to post
Share on other sites

But if you (@Martijn ;) ) like to use more different options, like with the original ImageFitBoundaries.module, you can use it by specifying different values for width and height together with the new value "comp##". For ## you set the value for compression like comp20, comp30, comp40 or whatever you like.

Don't know if it is already in. But I used ImageFitBoundaries with a 'double' loop. Let me explane :-)

- looping several images through the Module and get the widest value. (No images are scaled, only values are returned)

- then I search the widest image, and take the percentage it is compaired to the box.

- I use that percentage to scale all images up.

1 person likes this

Share this post


Link to post
Share on other sites

Don't know if it is already in. But I used ImageFitBoundaries with a 'double' loop. Let me explane :-)

- looping several images through the Module and get the widest value. (No images are scaled, only values are returned)

- then I search the widest image, and take the percentage it is compaired to the box.

- I use that percentage to scale all images up.

No, it isn't in like you explained here, but it is somehow in without a double loop. But only when using a square boundary box and when the images are between the ratio aspects 1:2 -> 2:1. Images with more extreme ratio aspects are scaled none linear so that those are displayed smaller.

So, the normal usage of weighten works like your description but is assuming the ratio aspect isn't wider than 2:1 / 1:2.

When we add an additional param for the widest aspect ratio we should get the same effect as you described, I think.

You first have to run a loop through the images, fetching their aspect ratios, and afterwards pass the highest value to the contain-weighten call.

With images == photgraphs I think the average usage is well covered the way how it is setup now. But with logos it could be go much further with aspect ratios. Maybe you can drop in a small list of real logo usage aspect ratios (with extremes), so that I get a grasp of what we are talking here?

1 person likes this

Share this post


Link to post
Share on other sites

I've used the 'double loop' in pluimveeweb on the right side with the "Kennispartners" logo's. Now there's only 1 partner but when there are 3 or more (2 logo's always visible) it'll get to the widest value possible for the widest logo. 336px / 2 = 168px.

Here's some example code that will explain it better.

$compress = 40; // heavier images compress more
$x = 400; // box size, reference for image
$y = 280; // box size, reference for image
$max = 0; // calculation of the widests image, used to scale all others.

// calculate max width all images ( settings as wide as possible )
foreach($partners as $partner) {
    $image = $partner->generic_logo;
    if($image instanceof Pageimage) {
        $box = $modules->get("ImageFitBoundaries");
        $info = $box->load($image, $x, $y, $compress)->info();
        $max = $max < $info['width'] ? $info['width'] : $max;
    }
}

$percent = 168 * 100 / $max; // 2 X 168 = 336px width of the column

foreach($partners as $partner) {
    $image = $partner->generic_logo;
    
    if($image instanceof Pageimage) {
    
        $box = $modules->get("ImageFitBoundaries");
        $info = $box->load($image, $x, $y, $compress)->info();
        $width = (int) round($info['width'] / 100 * $percent);
        $height = (int) round($info['height'] / 100 * $percent);

        $options = array(
            'quality' => 100,
            'sharpening' => 'none'
        );

        $thumb = $image->size($width, $height, $options);
    }
}

I'm really happy how much you've implemented so far and I think you should not over complicate the module. I think you should leave it how it is now.

Thanks again for implementing weighten !

1 person likes this

Share this post


Link to post
Share on other sites

Thanks for giving those insights. I have made a note to the additional param for wider aspect ratios, what wouldn't be much work to implement, but will wait if other users request support for weighten with those wider aspect ratios.

Thanks for your help with this. :)

1 person likes this

Share this post


Link to post
Share on other sites

New addition: retinafy!

this was created on request from @jjozsi here in this post.
.
* retinafy

// create a pageimage with any method you like
$image = $page->images->first()->size(400, 300);  

// call retinafy on it
echo $image->retinafy();

// it outputs a markup string like this, where width and height is populated with half the sizes of the pageimage
<img src="/site/assets/files/1234/basename.400x300.jpg" width="200" height="150" alt="description" />

.
.
The default markup template has the default replacements URL, WIDTH, HEIGHT and DESCRIPTION.

<img src="[URL]" width="[WIDTH]" height="[HEIGHT]" alt="[DESCRIPTION]" />

You can change that to any markup you like in the modules Configpage!

.
.
If you have additional properties populated with pageimages in your system, you can provide an array with those property names:

// if you need custom properties in your markup, define the template in the modules config page with those placeholders, 
// please only use UPPERCASE and wrapp these [ ] around them
<img src="[URL]" width="[WIDTH]" height="[HEIGHT]" data-custom1="[CUSTOM1]" data-custom2="[CUSTOM2]" />

// call retinafy with custom property names
$customPropertyNames = array("custom1", "custom2");
echo $image->retinafy($customPropertyNames);

// it outputs a markup string like this, where width and height is populated with half the sizes of the pageimage
<img src="/site/assets/files/1234/basename.400x300.jpg" width="200" height="150" data-custom1="custom-value-1" data-custom2="custom-value-2" />

.
.

Regarding to the technique described in the article @jjozsi linked to in his post it would make much sense to use a low quality setting sitewide by defining it in the ImageSizerOptions, also available on the Pia Configpage. Otherwise, if this is not possible, you need to call your images for that you want the retinafy markup with the quality option set:

// create a pageimage with any method you like
echo $page->images->first()->size(400, 300, array("quality"=>35))->retinafy(); 
Edited by horst
5 people like this

Share this post


Link to post
Share on other sites

Hi Horst,

I've used weighten in a newsletter tool for company logo's and it working great. Thanks again for implementing it !

2 people like this

Share this post


Link to post
Share on other sites

Have updated Pia to 0.2.2 because she also was affected by the same issue as CroppableImage. Recent PW versions now (can) log modules API actions into logfile modules.txt. This is suppressed now. If you use Pia and a recent PW dev version, please update to 0.2.2. http://modules.processwire.com/modules/pageimage-assistant/

2 people like this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By ethfun
      I've created a Process Module, and its execute() function renders the HTML response to an AJAX request. The AJAX request is being made outside of the admin panel, and in all likelihood will be made by "guest" users.
      Within my ModuleName.info.json file, I have added these lines:
      "permission": "generate-thumbnails", "permissions": { "generate-thumbnails": "Generate Thumbnails" }, Then within the Admin panel, I gave guests access to run that module.
      Unless logged in, the response to the AJAX request is always the login form's HTML, rather than the HTML my execute() function creates.
      So two questions:
      Is it possible to give non-logged-in users the ability to run that function via the AJAX request, or Is there a better ProcessWire way to create HTML to use as an AJAX response? Thank you!
    • By Robin S
      I have had this module sitting in a 95% complete state for a while now and have finally made the push to get it out there. Thanks to @teppo for his Hanna Code Helper module which I referred to and borrowed from during development.
      http://modules.processwire.com/modules/hanna-code-dialog/
      https://github.com/Toutouwai/HannaCodeDialog
      HannaCodeDialog
      A module for ProcessWire CMS/CMF. Provides a number of enhancements for working with Hanna Code tags in CKEditor. The main enhancement is that Hanna tags in a CKEditor field may be double-clicked to edit their attributes using core ProcessWire inputfields in a modal dialog.
      Requires the Hanna Code module.
      Installation
      Install the HannaCodeDialog module using any of the normal methods.
      For any CKEditor field where you want the "Insert Hanna tag" dropdown menu to appear in the CKEditor toolbar, visit the field settings and add "HannaDropdown" to the "CKEditor Toolbar" settings field.
      Module configuration
      Visit the module configuration screen to set any of the following:
      Exclude prefix: Hanna tags named with this prefix will not appear in the CKEditor toolbar dropdown menu for Hanna tag insertion. Exclude Hanna tags: Hanna tags selected here will not appear in the CKEditor toolbar dropdown menu for Hanna tag insertion. Background colour of tag widgets: you can customise the background colour used for Hanna tags in CKEditor if you like. Dialog width: in pixels Dialog height: in pixels Features
      Insert tag from toolbar dropdown menu
      Place the cursor in the CKEditor window where you want to insert your Hanna tag, then select the tag from the "Insert Hanna tag" dropdown.

      Edit tag attributes in modal dialog
      Insert a tag using the dropdown or double-click an existing tag in the CKEditor window to edit the tag attributes in a modal dialog.

      Tags are widgets
      Hanna tags that have been inserted in a CKEditor window are "widgets" - they have a background colour for easy identification, are protected from accidental editing, and can be moved within the text by drag-and-drop.

      Options for tag attributes may be defined
      You can define options for a tag attribute so that editors must choose an option rather than type text. This is useful for when only certain strings are valid for an attribute and also has the benefit of avoiding typos.
      Add a new attribute for the Hanna tag, named the same as the existing attribute you want to add options for, followed by "__options". The options themselves are defined as a string, using a pipe character as a delimiter between options. Example for an existing attribute named "vegetables":
      vegetables__options=Spinach|Pumpkin|Celery|Tomato|Brussels Sprout|Potato You can define a default for an attribute as normal. Use a pipe delimiter if defining multiple options as the default, for example:
      vegetables=Tomato|Potato Dynamic options
      Besides defining static options as above, you can use one Hanna tag to dynamically generate options for another. For instance, you could create a Hanna tag that generates options based on images that have been uploaded to the page, or the titles of children of the page.
      Your Hanna tag that generates the options should echo a string of options delimited by pipe characters (i.e. the same format as a static options string).
      You will probably want to name the Hanna tag that generates the options so that it starts with an underscore (or whatever prefix you have configured as the "exclude" prefix in the module config), to avoid it appearing as an insertable tag in the HannaCodeDialog dropdown menu.
      Example for an existing attribute named "image":
      image__options=[[_images_on_page]] And the code for the _images_on_page tag:
      <?php $image_names = array(); $image_fields = $page->fields->find('type=FieldtypeImage')->explode('name'); foreach($image_fields as $image_field) { $image_names = array_unique( array_merge($image_names, $page->$image_field->explode('name') ) ); } echo implode('|', $image_names); Choice of inputfield for attribute
      For attributes which you have defined options for, you can choose the inputfield that is used to select from the options.
      Inputfields that support the selection of a single option are select (this is the default inputfield for attributes with options so it isn't necessary to specify it if you want it) and radios.
      Inputfields that support the selection of multiple options are selectmultiple, asmselect and checkboxes.
      You can also specify a checkbox inputfield - this is not for attributes with defined options but will limit an attribute to an integer value of 1 or 0.
      The names of the inputfield types are case-insensitive.
      Example for an existing attribute named "vegetables":
      vegetables__type=asmselect Descriptions and notes for inputfields
      You can add a description or notes to an attribute and these will be displayed in the dialog.
      Example for an existing attribute named "vegetables":
      vegetables__description=Please select vegetables for your soup. vegetables__notes=Pumpkin and celery is a delicious combination. Notes
      When creating or editing a Hanna tag you can view a basic cheatsheet outlining the HannaCodeDialog features relating to attributes below the "Attributes" config inputfield.
      Troubleshooting
      HannaCodeDialog includes and automatically loads the third-party CKEditor plugins Line Utilities and Widget. If you have added these plugins to your CKEditor field already for some purpose and experience problems with HannaCodeDialog try deactivating those plugins from the CKEditor field settings.
    • By gRegor
      Updated 2017-03-27:
      Version 1.1.3 released
      Updated 2016-04-11:
      Version 1.1.2 released

      Updated 2016-02-26:
      Officially in the module directory! http://modules.processwire.com/modules/webmention/

      Updated 2016-02-25:
      Version 1.1.0 is now released. It's been submitted to the module directory so should appear there soon. In the meantime, it's available on GitHub: https://github.com/gRegorLove/ProcessWire-Webmention. Please refer to the updated README there and let me know if you have any questions!
      ------------
      Original post:
       
      This is now out of date. I recommend reading the official README.
       
      I've been working on this one for a while. It's not 100%, but it is to the point I'm using it on my own site, so it's time for me to release it in beta. Once I finish up some of the features described below, I will submit it to the modules directory as a stable plugin.
      For now, you can install from Github. It works on PW2.5. I haven't tested on PW2.6, but it should work there.
      Feedback and questions are welcome. I'm in the IRC channel #processwire as well as #indiewebcamp if you have any questions about this module, webmention, or microformats.
      Thanks to Ryan for the Comments Fieldtype which helped me a lot in the handling of webmentions in the admin area.
      ProcessWire Webmention Module
      Webmention is a simple way to automatically notify any URL when you link to it on your site. From the receiver's perspective, it is a way to request notification when other sites link to it.
      Version 1.0.0 is a stable beta that covers webmention sending, receiving, parsing, and display. An easy admin interface for received webmentions is under development, as well as support for the Webmention Vouch extension.
      Features
      * Webmention endpoint discovery
      * Automatically send webmentions asynchronously * Automatically receive webmentions * Process webmentions to extract microformats   Requirements * php-mf2 and php-mf2-cleaner libraries; bundled with this package and may optionally be updated using Composer. * This module hooks into the LazyCron module.   Installation Github: https://github.com/gRegorLove/ProcessWire-Webmention

      Installing the core module named "Webmention" will automatically install the Fieldtype and Inputfield modules included in this package.   This module will attempt to add a template and page named "Webmention Endpoint" if the template does not exist already. The default location of this endpoint is http://example.com/webmention-endpoint   After installing the module, create a new field of type "Webmentions" and add it to the template(s) you want to be able to support webmentions. Sending Webmentions
      When creating or editing a page that has the Webmentions field, a checkbox "Send Webmentions" will appear at the bottom. Check this box and any URLs linked in the page body will be queued up for sending webmentions. Note: you should only check the "Send Webmentions" box if the page status is "published."   Receiving Webmentions This module enables receiving webmentions on any pages that have have "Webmentions" field, by adding the webmention endpoint as an HTTP Link header. If you would like to specify a custom webmention endpoint URL, you can do so in the admin area, Modules > Webmention.   Processing Webmentions (beta) Currently no webmentions are automatically processed. You will need to browse to the page in the backend, click "Edit," and scroll to the Webmentions field. There is a dropdown for "Visibility" and "Action" beside each webmention. Select "Process" to parse the webmention for microformats.   A better interface for viewing/processing all received webmentions in one place is under development.   Displaying Webmentions (beta) Within your template file, you can use `$page->Webmentions->render()` [where "Webmentions" is the name you used creating the field] to display a list of approved webmentions. As with the Comments Fieldtype, you can also generate your own output.   The display functionality is also under development.   Logs This module writes two logs: webmentions-sent and webmentions-received.   Vouch The Vouch anti-spam extension is still under development.   IndieWeb The IndieWeb movement is about owning your data. It encourages you to create and publish on your own site and optionally syndicate to third-party sites. Webmention is one of the core building blocks of this movement.   Learn more and get involved by visiting http://indiewebcamp.com.   Further Reading * http://indiewebcamp.com/webmention * http://indiewebcamp.com/comments-presentation * http://indiewebcamp.com/reply
    • By kixe
      This morning I pushed a module to github which extends the page api with moving and sorting capability.
      https://github.com/kixe/PageSortMove
      /** * CALLABLE * PageSortMove::execute($pageID, $newIndex = 0, $parentID = null); * $modules->get('PageSortMove')->execute($pageID, $newIndex = 0, $parentID = null); * * EXTENDED PAGE API * @property $page->first // under same parent * @property $page->last * * @method $page->first($parentID = null) * @method $page->last($parentID = null) * @method $page->sort($newIndex) * @method $page->move($newIndex, $parentID = null) */ Have a nice weekend.