-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By gebeer
I am happy to present my new fieldtype FieldtypeImageFromPage. It is made up of 2 modules:
Fieldtype Image Reference From Another Page is a Fieldtype that stores a reference to a single image from another page. The image can be selected with the associated Inputfield.
Inputfield Select Image From Page is an Inputfield to select a single image from images on a predefined page and it's children.
And there also is a helper module that takes care of cleanup tasks.
This module evolved out of a discussion about my other Module FieldtypeImagePicker. It caters for use cases where a set of images is being reused multiple times across a site. With this fieldtype these images can be administered through a chosen page. All images uploaded to that page will be available in the inputfield.
When to use ?
Let editors choose an image from a set of images that is being used site-wide. Ideal for images that are being re-used across the site.
Suited for images that are used on multiple pages throughout the site (e.g. icons).
Other than the native ProcessWire images field, the images here are not stored per page. Only references to images on another page are stored. This has several advantages:
one central place to organize images when images change, you only have to update them in one place. All references will be updated, too. (Provided the name of the image that has changed stays the same) Features
images can be manipulated like native ProcessWire images (resizing, cropping etc.) image names are fully searchable through the API orphaned references to images that get deleted are automatically removed. When you delete an image from one of the pages that hold your site-wide images, all pages that use this fieldtype will be searched. If any page contains a reference to the image you just deleted, that reference will be reset. You will get warning messages to edit those pages and add new image references there. How to install and setup
Download and install this module like any other modules in ProcessWire Create a page in the page tree that will hold your images. This page's template must have an images field Upload some images to the page you created in step 2 Create a new field. As type choose 'Image Reference From Another Page'. Save the field. In 'Details' Tab of the field choose the page you created in step 2 Click Save button Choose the images field name for the field that holds your images (on page template from step 2) Click Save button again Add the field to any template You are now ready to use the field View of the inputfield on the page edit screen:
View of the field settings
The module can be installed from this github repo. Some more info in the README there, too.
In my tests it was fairly stable. After receiving your valued feedback, I will eventually add it to the modules directory.
My ideas for further improvement:
- add ajax loading of thumbnails
Happy to hear your feedback!
-
By Robin S
A module created in response to the topic here:
Page List Select Multiple Quickly
Modifies PageListSelectMultiple to allow you to select multiple pages without the tree closing every time you select a page.
The screencast says it all:
https://github.com/Toutouwai/PageListSelectMultipleQuickly
https://modules.processwire.com/modules/page-list-select-multiple-quickly/
-
By gebeer
Hello all,
sharing my new module FieldtypeImagePicker. It provides a configurable input field for choosing any type of image from a predefined folder.
The need for it came up because a client had a custom SVG icon set and I wanted the editors to be able to choose an icon in the page editor.
It can also be used to offer a choice of images that are used site-wide without having to upload them to individual pages.
There are no image manipulation methods like with the native PW image field.
Module and full description can be found on github https://github.com/gebeer/FieldtypeImagePicker
Kudos to @Martijn Geerts. I used his module FieldTypeSelectFile as a base to build upon.
Here's how the input field looks like in the page editor:
Hope it can be of use to someone.
If you like to give it a try, I'm happy to hear your comments or suggestions for improvement. Eventually this will go in the module directory soon, too.
-
By bernhard
@Sergio asked about the pdf creation process in the showcase thread about my 360° feedback/survey tool and so I went ahead and set my little pdf helper module to public.
Description from PW Weekly:
Modules Directory: https://modules.processwire.com/modules/rock-pdf/
Download & Docs: https://github.com/BernhardBaumrock/RockPDF
You can combine it easily with RockReplacer:
See also a little showcase of the RockPdf module in this thread:
-
By ukyo
FieldtypeFontIconPicker
Supported Icon Libraries
FontAwesome 4.7.0 Uikit 3.0.34 IonicIcons 2.0.1 Cahangelog
NOTE: Module store data without prefix, you need to add "prefix" when you want to show your icon on front-end, because some of front-end frameworks using font-awesome with different "prefix".
Module will search site/modules/**/configs/IconPicker.*.php and site/templates/IconPicker.*.php paths for FieldtypeFontIconPicker config files.
All config files need to return a PHP ARRAY like examples.
Example config file : create your own icon set.
File location is site/configs/IconPicker.example.php
<?php namespace ProcessWire; /** * IconPicker : Custom Icons */ return [ "name" => "my-custom-icons", "title" => "My Custom Icon Set", "version" => "1.0.0", "styles" => array( wire("config")->urls->templates . "dist/css/my-custom-icons.css" ), "scripts" => array( wire("config")->urls->templates . "dist/js/my-custom-icons.js" ), "categorized" => true, "attributes" => array(), "icons" => array( "brand-icons" => array( "title" => "Brand Icons", "icons" => array( "google", "facebook", "twitter", "instagram" ) ), "flag-icons" => array( "title" => "Flag Icons", "icons" => array( "tr", "gb", "us", "it", "de", "nl", "fr" ) ) ) ]; Example config file : use existing and extend it.
File location is site/configs/IconPicker.altivebir.php
<?php namespace ProcessWire; /** * IconPicker : Existing & Extend */ $resource = include wire("config")->paths->siteModules . "FieldtypeFontIconPicker/configs/IconPicker.uikit.php"; $url = wire("config")->urls->templates . "dist"; $resource["scripts"] = array_merge($resource["scripts"], ["{$url}/js/Altivebir.Icon.min.js"]); $resource["icons"]["flag-icons"] = [ "title" => "Flag Icons", "icons" => array("tr", "en", "fr", "us", "it", "de") ]; $resource["icons"]["brand-icons"]["icons"] = array_merge($resource["icons"]["brand-icons"]["icons"], array( "altivebir" )); return $resource; After you add your custom config file, you will see your config file on library select box. Library Title (Location Folder Name).
If your library categorized and if you have categorized icons set like uikit and fontawesome libraries, you will have category limitation options per icon field or leave it empty for allow all categories (default).
Example : output
if ($icon = $page->get("iconField")) { echo "<i class='prefix-{$icon}' />"; } MarkupFontIconPicker Usage
// MarkupFontIconPicker::render(YourIconField=string, Options=array) echo MarkupFontIconPicker::render($page->YourIconField, [ 'prefix' => 'uk-icon-', // Icon class prefix, if you have different prefix, default is : "fa fa-" 'tag' => 'span', // Icon tag default is : "i" 'class' => 'fa-lg', // If you have extra cutom classes, for example : icons sizes, Array or Sting value 'style' => 'your custom styles if you have' // Array or String Value ]); Theme support
Search support
Category support
-