Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/07/2018 in all areas

  1. This has got to be the craziest website I have ever seen: http://zoomquilt2.com/ http://zoomquilt.org/ It's like infinite zooming. Contains some questionable content, may be NSFW.
    3 points
  2. Hey @adrian and @zoeck, Sorry for not responding to this – I've been kind of tied elsewhere, and totally forgot this question. Bad excuse for bad communication, I know ? I'll have to dig into this. I didn't intentionally strip any features from 2.0, but it's entirely possible that something in Admin Theme Uikit (assuming that you're using that) or the updates I did for 2.0 did indeed disable Repeater Matrix support. I had to put the development of this module on hold since there were some difficult (or at least time-consuming) UI issues to tackle, and I just didn't have the bandwidth for that. I'll do my best to try to find some time soon(ish). Sorry, but can't really promise any kind of timeframe right now.
    3 points
  3. v18 adds a plugin that can sync page fields with rockgrid columns: Example Setup Adding the asm in a processmodule. $fs is a fieldset where we add our InputField to. $gridname is the name of the grid that is connected. // which lists to show $this->wire->config->scripts->append($this->wire->urls($this) . "scripts/manageLists.js"); $fs->add([ 'type' => 'InputfieldAsmSelect', 'name' => 'listsToShow', 'label' => __('Show list membership for...'), 'attr' => ['data-grid' => $gridname], 'asmOptions' => ['sortable'=>false], ]); $f = $fs->getChildByName('listsToShow'); $f->setAsmSelectOption('sortable', false); foreach($pages->get('template=rockmailer_lists')->children as $item) { $f->addOption($item->id, $item->title); } And the portion of the javascript file: // sync ASM field with displayed lists in grid // attach event listener when document is ready $(document).ready(function() { var $select = $('#Inputfield_listsToShow'); var colPrefix = 'rockmailer_list_'; RockGrid.plugins.syncAsmSelect({ asm: $('#Inputfield_listsToShow'), grid: RockGrid.getGrid($select.data('grid')), colName: function(pageId) { return colPrefix + pageId; }, colDef: function(col) { col = RockGrid.colDefs.yesNo(col, { isYes: function(params) { var pageId = String(params.column.colId).replace(colPrefix, ''); var lists = String(params.data.rockmailer_lists).split(','); return lists.indexOf(pageId) > -1 ? true : false; } }); col.pinned = 'left'; return col; } }); }); In this case we set a custom callback to modify the colDef for the column. It uses the yesNo plugin to show icons instead of true/false values:
    2 points
  4. I solved it ? $client = $roles->get('client'); $s_template = $templates->get("my-template"); if ($page->my_checkbox) { if ($client->hasPermission('my-permission')) { $client->of(false); $client->removePermission('my-permission'); $client->save(); $s_template->revokePermissionByRole("page-add", $client); $s_template->save(); } } else { if (!$client->hasPermission('my-permission')) { $client->of(false); $client->addPermission('my-permission'); $client->save(); $s_template->addPermissionByRole("page-add", $client); $s_template->save(); } }
    2 points
  5. Hey @thlinna, thanks for the report. I'll schedule some maintenance time to later today ?
    2 points
  6. Check out devilbox. I just installed php on my system and use that one. Here is how to use the php inside the docker container.
    2 points
  7. I tried to replace the Google geocoder (for the module settings i.e.) with Nominatim in the dev version of the module. Still beta but i seems to work. https://github.com/madebymats/FieldtypeLeafletMapMarker/tree/dev
    2 points
  8. If that's your concern you could always use $page->getUnformatted('datefield') in your templates and use the outputformatting just for the backend formatting.
    2 points
  9. Minimal Fieldset Adds a config option to Fieldset/FieldsetGroup/FieldsetPage to render the fieldset without label or padding in Page Edit. When a neighbouring field in the same row is taller than the fieldset the extra height is distributed evenly among rows within the fieldset. Requires ProcessWire v3 and AdminThemeUikit. Why? This module allows you to create layouts in Page Edit that would not be possible without it. It's useful when you want a layout that has two or more fields as rows that are themselves within a row in Page Edit. It's also useful when you have some fields that you want to add to a template as a group (i.e. via FieldsetGroup or FieldsetPage) but having a heading and visible wrapper for the fieldset in Page Edit would be redundant. Example: Installation Install the Minimal Fieldset module. Usage In the field settings for any Fieldset/FieldsetGroup/FieldsetPage, tick the "Remove label and padding for this fieldset" checkbox. https://github.com/Toutouwai/MinimalFieldset https://modules.processwire.com/modules/minimal-fieldset/
    1 point
  10. DEPRECATED If you are interested in the new version (commercial module launching in 2023) write me a PM --- Some of you might have followed the development of this module here: https://processwire.com/talk/topic/15524-previewdiscussion-rockdatatables/ . It is the successor of "RockDataTables" and requires RockFinder to get the data for the grid easily and efficiently. It uses the open source part of agGrid for grid rendering. WHY? ProcessWire is awesome for creating all kinds of custom backend applications, but where it is not so awesome in my opinion is when it comes to listing this data. Of course we have the built in page lister and we have ListerPro, but none of that solutions is capable of properly displaying large amounts of data, for example lists of revenues, aggregations, quick and easy sorts by the user, instant filter and those kind of features. RockGrid to the rescue ? Features/Highlights: 100k+ rows Instant (client side) filter, search, sort (different sort based on data type, eg "lower/greater than" for numbers, "contains" for strings) extendable via plugins (available plugins at the moment: fullscreen, csv export, reload, batch-processing of data, column sum/statistics, row selection) all the agGrid features (cell renderers, cell styling, pagination, column grouping etc) vanilla javascript, backend and frontend support (though not all plugins are working on the frontend yet and I don't plan to support it as long as I don't need it myself) Limitations: While there is an option to retrieve data via AJAX the actual processing of the grid (displaying, filtering, sorting) is done on the client side, meaning that you can get into troubles when handling really large datasets of several thousands of rows. agGrid should be one of the most performant grid options in the world (see the official example page with a 100k row example) and does a lot to prevent problems (such as virtual row rendering), but you should always have this limitation in mind as this is a major difference to the available lister options that do not have this limitation. Currently it only supports AdminThemeUikit and I don't plan to support any other admin theme. Download: https://gitlab.com/baumrock/FieldtypeRockGrid Installation: https://gitlab.com/baumrock/RockGrid/wikis/Installation Quikckstart: https://gitlab.com/baumrock/RockGrid/wikis/quickstart Further instructions: https://gitlab.com/baumrock/RockGrid/wikis/quickstart#further-instructions German Translation File: site--modules--fieldtyperockgrid--fieldtyperockgrid-module-php.json Changelog: https://gitlab.com/baumrock/FieldtypeRockGrid/raw/master/changelog.md Module status: alpha, License: MIT Note that every installation and uninstallation sends an anonymous google analytics event to my google analytics account. If you don't want that feel free to remove the appropriate lines of code before installation/uninstallation. Contribute: You can contribute to the development of this and other modules or just say thank you by testing, reporting issues and making PRs at gitlab liking this post buying me a drink: paypal.me/baumrock/5 liking my facebook page: facebook.com/baumrock hiring me for pw work: baumrock.com Support: Please note that this module might not be as easy and plug&play as many other modules. It needs a good understanding of agGrid (and JavaScript in general) and it likely needs some looks into the code to get all the options. Please understand that I can not provide free support for every request here in the forum. I try to answer all questions that might also help others or that might improve the module but for individual requests I offer paid support (please contact me via PM). Use Cases / Examples: Colored grid cells, Icons, Links etc. The Grid also has a "batcher" feature built in that helps communicating with the server via AJAX and managing resource intensive tasks in batches: Filters, PW panel links and instant reload on panel close: You can combine the grid with a chart library like I did with the (outdated) RockDataTables module:
    1 point
  11. Bingo! In case someone needs it: // Activity form if($page->template == 'activity') { $forms->addHookBefore('FormBuilderProcessor::renderReady', function($e) { $form = $e->arguments(0); if($form->name == 'activity_form') { $page = wire('page'); // IS THIS RIGHT? $selected = array(); // IS THIS RIGHT? $selected['selected'] = 'selected'; // IS THIS RIGHT? // Get Atividade field $inputfield = $form->getChildByName('atividade'); // Get InputfieldPage $select_field = $inputfield->getInputField(); // Get the correspondent InputfieldSelect $select_field->addOption($page->id, $page->title, $selected); // Add current page as selected option } }); $activity_form = $forms->render('activity_form'); } Thanks for your help @elabx, it made all the difference!
    1 point
  12. Thinking about this alternative. This might work better. So now I have a working code inside _init.php: // Activity form if($page->template == 'activity') { $forms->addHookBefore('FormBuilderProcessor::renderReady', function($e) { $form = $e->arguments(0); if($form->name == 'activity_form') { // Get Atividade field $inputfield = $form->getChildByName('atividade'); // I NEED TO INSERT A SELECTED OPTION HERE // something something = $page->id; } }); $activity_form = $forms->render('activity_form'); } Getting close. Can someone help?
    1 point
  13. Since ProcessWire's default is english, it should be sufficient to delete all translation files. However, any custom programming may have strings in German, so best try this with a local copy first.
    1 point
  14. If other changes can be successfully saved, it may well be an issue of apache mod_security being active. I'm assuming the site is running on apache, of course. Try to add the following to your .htaccess to see if that's the culprit: <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule> If it doesn't work, or if you're unsure, best talk to the server admin / shared hosting provider.
    1 point
  15. It is quite trippy. I find myself staring at the center of the screen getting hypnotized. ??
    1 point
  16. I prefer laradock for its popularity and support. And run and monitor everything from command line (you should too since you're on Linux anyway). For VS Code language server I use locally installed php from standard repository like @fbg13 suggested. P.S. Docker based solutions make it really easy to switch php/mysql/anything really versions in seconds and let you easilly try things you never expected you would other ways, so do give it one more try)))
    1 point
  17. Here is the first part for simply removing/adding a permission from specific role: $client = $roles->get('client'); if ($page->my_checkbox) { if ($client->hasPermission('my-permission')) { $client->of(false); $client->removePermission('my-permission'); $client->save(); } } else { if (!$client->hasPermission('my-permission')) { $client->of(false); $client->addPermission('my-permission'); $client->save(); } } @Zeka What I don't understand is how to remove permission "page-add" from template "my-template" from role "client".
    1 point
  18. Another possibility: https://wodby.com/docs/stacks/php/local/ I use one of their containers for my more exotic Docker setup. I like to keep my PW files (and MariaDB database) on my host so everything is clearer.
    1 point
  19. @PWaddict https://processwire.com/api/ref/role/
    1 point
  20. This worked for me: Alternatively this also worked, in /site/modules/InputfieldCKEditor/config.js: CKEDITOR.editorConfig = function( config ) { config.colorButton_colors = 'CF5D4E,454545,FFF,CCC,DDD,CCEAEE,66AB16'; };
    1 point
  21. These are already excluded from the autocomplete as far as I can tell. // ProcessPageEditLink > Link to URL: exclude pages using templates without template file and unpublished pages $wire->addHookBefore('InputfieldPageAutocomplete(name=link_page_url)::render', function(HookEvent $event) { $inputfield = $event->object; $fileless_templates = []; foreach($this->wire()->templates as $template) { if(!$template->filenameExists()) $fileless_templates[] = $template->id; } $inputfield->findPagesSelector .= ', status!=unpublished, template!=' . implode('|', $fileless_templates); }); // ProcessPageEditLink > Select Page / Select Child Page: prevent selection of pages using templates without template file and unpublished pages $wire->addHookAfter('ProcessPageEditLink::execute', function(HookEvent $event) { $css = '.PageListStatusUnpublished .PageListActionSelect, '; foreach($this->wire()->templates as $template) { if(!$template->filenameExists()) $css .= ".PageListTemplate_{$template->name} .PageListActionSelect, "; } $css = rtrim($css, ', '); $css .= ' { display:none !important; }'; $event->return .= "<style>$css</style>"; });
    1 point
  22. AFAIK you cannot do it out of the box but with the AdminOnSteroids module it is possible, see Allow markup tokens for "List of fields to display" here: https://github.com/rolandtoth/AdminOnSteroids/wiki/PageListTweaks ({date_created}|date:%Y/%m/%d)
    1 point
  23. I can't reproduce that on my secure sites - for me the panel and modal load pages over HTTPS. Normally for an HTTPS-only site you would enable the HTTPS redirection in .htaccess: https://github.com/processwire/processwire/blob/341342dc5b1c58012ae7cb26cffe2c57cd915552/htaccess.txt#L91-L95 So that would be something to check.
    1 point
  24. There's no way to hook anything in regards to the session starting. This all happens in processwire's bootstrap part, before even the earliest hooks would run. But with Ryan having a processwire javascript api on the roadmap it may be time to discuss if pw 3.0 shouldn't support authentication without session.
    1 point
×
×
  • Create New...