Leaderboard
Popular Content
Showing content with the highest reputation on 07/14/2017 in all areas
-
This week's version includes some helpful UI updates to the tags feature available in our File and Image fields, which we'll be taking a closer look at in this post. Like many versions, this also includes some other updates consistent with submitted GitHub issue reports. Read on for all the details… https://processwire.com/blog/posts/processwire-3.0.67-upgraded-file-and-image-tags/9 points
-
Hi, since extra fields aren't regular ProcessWire fields you cannot access the labels using `->getLabel()` method or `->label` property. The extra field labels are saved in the regarding field settings (table fields, column data) using json and looks like this: {"otherFieldSettings":"{\"cf_label\":{\"cf_label__location\":\"Location\",\"cf_label__location__1012\":\"Ort\",\"cf_label__custom__1013\":\"Paikka\"}}"} You can get the label using this functionality: $fieldSettings = $fields->get('images')->otherFieldSettings; $settings = json_decode($fieldSettings); echo $settings->cf_label->cf_label__location; As you can see there is no error handling or fallback strategy. Therefore I updated the module and added a method called getExtraLabel(). Usage example: // outputs something like: "Location: Munich" echo $image->getExtraLabel('location') . ': ' . $image->location; // outputs something like: "Ort: München" echo $image->getExtraLabel('location', 'de') . ': ' . $image->location;3 points
-
FieldtypeColor is on github Fieldtype stores a 32bit integer value reflecting a RGBA value. Input 5 types of Inputfields provided Html5 Inputfield of type='color' (if supported by browser) Inputfield type='text' expecting a 24bit hexcode string (RGB). Input format: '#4496dd'. The background color of the input field shows selected color Inputfield of type='text' expecting 32bit hexcode strings (RGB + alpha channel) Input format: '#fa4496dd' Inputfield with Spectrum Color Picker (Options modifiable) Inputfield type='text' with custom JavaScript and/or CSS (since version 1.0.3) Output Define output format under 'Details' tab in field settings. Select from the following 9 options string 6-digit hex color. Example: '#4496dd' string 8-digit hex color (limited browser support). Example: '#fa4496dd' string CSS color value RGB. Example: 'rgb(68, 100, 221)' string CSS color value RGB. Example: 'rgba(68, 100, 221, 0.98)' string CSS color value RGB. Example: 'hsl(227, 69.2%, 56.7%)' string CSS color value RGB. Example: 'hsla(227, 69.2%, 56.7%, 0.98)' string 32bit raw hex value. Example: 'fa4496dd'(unformatted output value) int 32bit. Example: '4198799069' (storage value) array() array( [0] => 0-255, // opacity [1],['r'] => 0-255, [2],['g'] => 0-255, [3],['b'] => 0-255, ['rx'] => 00-ff, ['gx'] => 00-ff, ['bx'] => 00-ff, ['ox'] => 00-ff, // opacity ['o'] => 0-1 // opacity ) The Fieldtype includes Spectrum Color Picker by Brian Grinstead SCREENSHOTS Input type=text with changing background and font color (for better contrast) Input type=color (in Firefox) Javascript based input (Spectrum Color Picker) Settings Output Settings Input2 points
-
Markup CKEditor (for Form Builder) An inputfield for displaying markup editable via CKEditor. The module is intended for use with the Form Builder module. Allows blocks of static text to be included within a form, which can be edited in the form settings using CKEditor. Screenshots Usage Install the Markup CKEditor module. In the Form Builder module settings, add "MarkupCKEditor" to "Inputfield types to use with FormBuilder". In your form settings, add a new field of type "Markup CKEditor". Enter the text you want to show in this field using "Markup Text" on the "Details" tab. Configuration In the module config you can set items for the CKEditor toolbar that will apply to all Markup CKEditor fields. If you want to insert images in your markup field then add "Image" to the toolbar items to enable the standard CKEditor image plugin. The ProcessWire image plugin is not usable because in a FormBuilder form there is no page to store images in. Advanced There is a InputfieldMarkupCKEditor::ckeReady hookable method for users who want to do advanced customisation of the CKEditor inputfield. It receives three arguments: The InputfieldCKEditor object The form as a FormBuilderForm object The field as a FormBuilderField object Example $wire->addHookAfter('InputfieldMarkupCKEditor::ckeReady', function(HookEvent $event) { /** @var InputfieldCKEditor $cke */ $cke = $event->arguments(0); /** @var FormBuilderForm */ $form = $event->arguments(1); /** @var FormBuilderField $field */ $field = $event->arguments(2); if($form->name === 'test_form' && $field->name === 'my_cke_markup_field') { $cke->contentsCss = '/site/templates/MarkupCKEditor/contents.css'; $cke->stylesSet = 'ckstyles:/site/templates/MarkupCKEditor/ckstyles.js'; } }); http://modules.processwire.com/modules/inputfield-markup-ckeditor/ https://github.com/Toutouwai/InputfieldMarkupCKEditor2 points
-
just upgradet to the newest dev version and tested it. Loving it, Ryan! That's what is best about processwire; you are free like a bird and have countless possibilities to realise your ideas with core functions.2 points
-
Wow, i'm having Déjà vu... http://modules.processwire.com/modules/selectize-image-tags/ Glad this is in the core now though; personally i couldn't have done without my module version for the past year (used on dozens of sites). Wondering if i can now remove the dependency for the jQuerySelectize module and load the core selectize js in the module init. Questions would be: 1) does the new integration allow you to select the Selectize skin? 2) will the core selectize interfere in case you upgrade and have image fields set to use the module selectize image tags 3) can the limit of what tags can be used be set on the field settings, and can those tags preferences be over-ridden per template, like the module.1 point
-
I did something similar (if i understand your question correctly) on a calendar on this site: http://eketorp.se/evenemang/?datum=2017-09-29#pickedDate Only dates with events or opening hours are selectable. Active dates are json used by flatpickr: https://github.com/chmln/flatpickr1 point
-
@joe_g keep in mind that whenever you update your processwire installation this issue will return (if your hoster didn't change the config until then)1 point
-
Hi Mike I think I'll prioritise the 100 or so most important URLs and then I can work through the others gradually. Client confirmed that actually they don't rank terrible well anyway so it looks like a relatively fresh start and the pressure is off. Just have to upgrade to MySQL 5.6 as it's currently running 5.1.X1 point
-
Hi @AlyxGD and welcome to the forum. Do you need to install it if you're making changes to an existing site? And if so, what have you tried so far?1 point
-
yes it is doable however, you don't have to create a file anytime you create a new template in admin. you create a template file if you want to 'view' the page using that template1 point
-
took me some time today to find out why my page was not showing up... i ended up creating a hook that does what apeisa had in his mind some years ago // set all languages active automatically $wire->addHookAfter('Pages::added', function($event) { $page = $event->arguments(0); foreach ($this->wire->languages as $lang) $page->set("status$lang", 1); $page->save(); }); does anybody see any danger in that? i'm not so experienced with multilang yet... edit: somehow it seems that ->setAndSave(...) does NOT work in this situation. @Can or @dragan can you confirm that?1 point
-
Hi @eelkenet. Thanks for the purchase. Yes I am. This will be added in the next version. I'm working on it for the next couple of weeks. Thanks1 point
-
@derdogan In PW >= 3.0.39 you have the option to modify sql_mode via $config->dbSqlModes too. Have a look here: https://github.com/processwire/processwire/blob/master/wire/config.php#L879 Thanks @ryan to point this out.1 point
-
1 point