Jump to content

szabesz

Members
  • Posts

    2,922
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by szabesz

  1. Plain text in YAML ? http://sangsoonam.github.io/2017/03/13/yaml-vs-json.html "Use YAML for configuration files since YAML is really human-readable." And we could use a diff tool to compare (my favorite is Beyond Compare, btw ? ).
  2. If I was Ryan – which I'm not ? – I would create a short intro for newcomers (I do not use the word "beginners" on purpose because a pro PHP developer can still be new to ProcessWire) and even this short intro should be clearly divided into two sections: one for frontend development recommended best practices and one for module development recommended best practices. At the end of this introductory article, I would link to this verbose one we currently have.
  3. Introduced in ProcessWire 3.0.117 https://processwire.com/blog/posts/processwire-3.0.117-core-updates/
  4. I recommend @arjen's fork instead: https://github.com/arjenblokzijl/FieldtypeDecimal as @sforsman seems to have abandoned his module.
  5. Hi, if you can tell me how to test this quickly (eg. by using some online service) without any convoluted software installation requirements then I'm happy to test it for you. Otherwise I am not using their service all the time, only for certain occasions. So far I cannot complain.
  6. Me too. I also think that "mixing it up" for a newcomer the various ways to use the API is not a good idea, even the tabbed interface idea (which is great) feels a bit too much to present to a beginner. If the function API is the preferable one on the frontend, then all frontend examples should use that one only and only module related docs should use another one (which one is preferable in that case). There should be an article explaining all the other ways to do the very similar, and only in the "advanced" category. BTW, some docs tag pages/tutorials as beginner/intermediate/advanced. I think ProcessWire docs could use those too.
  7. Yeah, the only concern of mine is just this, so that I (we) can search google like "Admin Actions" and "Admin Tools" separately ? Haha ? it would be okay for an application or a module since it is a made up word but not so good for something descriptive as much as possible like a panel's name.
  8. Quick Actions Utility Actions Shortcut Actions Tracy Shortcuts Utilities
  9. Thanks as always, the new panel does sound useful indeed. However, you already have a module called Admin Actions. It might be confusing in some circumstances that these share the same name, don't you think?
  10. Hi @benbyf See this comment: https://processwire.com/talk/topic/15691-warning-about-server-locale-after-update-from-3052-3053-help/?do=findComment&comment=143552 and the related docs: https://processwire.com/api/ref/languages/set-locale/ Does this help?
  11. At least he spawned a fruitful discussion this time by accident... Otherwise his/her posts are kinda strange, I agree.
  12. I forgot to mention that I also use the free https://www.spectacleapp.com/ "window-size manager" application. In the case of the Finder I use it in a semi-automatic way to quickly setup a "two-pane layout" for the Finder. I create a new window with half of the vertical size of the desktop ('cos I prefer landscape/horizontal windows for column view) and right away following that I create a new window because the Finder clones the last not-yet-resized window's dimensions, and I only need to reposition the two, similarly sized windows. Since I rarely move Finder windows around I do not need to do it too often.
  13. Happy and productive new year! ? I opt for this one: Please do not try to take on too much work before the initial release regarding the GUI. I think one layout is just enough to start with. Besides, if we have two layouts then it will make creating docs an tutorials more complex as we need to account for both. Configurable layout is less desirable than and easy to use one right from the beginning. I would not like to see an app like behaviour as that implies mobile only experience which can never be as productive as a well tailored desktop GUI. Sure, it should be usable on mobiles without any irritating issues but that is of second concern to me.
  14. True, but it can "free you up from Woocommerce eventually" ? and freedom in development means great possibilities to earn you money in the long run ?
  15. I'm a TotalFinder user which is not a replacement but an "extension" injecting runtime mods into the Finder. It's "used-to-be free" alternative is XtraFinder which I also used for years but was a bit too buggy to my taste so I switched to TotalFinder a few years ago which is more reliable. I use Yummy FTP Pro and Beyond Compare as well.
  16. Sort of but not really. "Yesterday" we had options. I've never been a Windows nor Office user, for example. If Google takes over the web, then we will have no choice but to follow Google's rules.
  17. Hi @rareyush This forum's Rich Text Editor has a "Spoiler" feature which can be used by clicking on the "eye" icon in the toolbar. Could you please move your two config file code snippets into "spoilers" to make this thread more readable. Thanks in advance.
  18. Hi, You might want to ask a moderator to move this issue into Form Builder's forum as you can get more attention there.
  19. Hello, Could you be more specific by showing us the actual code in action?
  20. Hi @PWaddict Could you please make the thread readable by putting your long trace of logs into "spoilers"? This one and the another one:
  21. Hi, https://jobs.antarctica.gov.au/ is currently in the state of "404 Not Found, nginx"
  22. Should Google really be the ruler of the web? Great effort and results, anyway! ?
  23. CKEditor is a nasty beast when it comes to configuring it, but I will try to help ? First things first, how to configure it: https://github.com/processwire/processwire/blob/dev/wire/modules/Inputfield/InputfieldCKEditor/README.md#custom-editor-css-file You probably did this but to make things clear: the field's type is Textarea, while the inputfield's type is CKEditor. So far so good ? On the Details tab: content type is recommended to be Markup/HTML and it should be. "Markup/HTML (Content Type)" option can be configured as required, as they do not affect the CSS we are dealing with. The things in question be configured on the Input tab, under the CKEditor settings, so here come the interesting bits. Available core toolbar items are listed there, and as an example, here is what I often use: PWImage, Format, Styles, RemoveFormat, Bold, Italic, NumberedList, BulletedList, PWLink, Unlink, Table, SpecialChar, Sourcedialog Format and Styles are needed to make those dropdowns show up. If you do not have too many CKEditor fields on the edit page then I recommend setting them to "Regular Editor". We have a thread of discussing settings, BTW: https://processwire.com/talk/topic/17862-share-your-ckeditor-settings/ Turning ACF and HTML Purifier on is generally recommended, however, they might make things harder in terms of keeping those HTML bits intact when saving the page. In the case of ACF, you need to deal with "extra allowed content" so that your code actually gets saved as intended. Here are some forum topics to tackle some issues that may arise: https://processwire.com/talk/topic/19519-ckeditor-and-extra-allowed-content/ https://processwire.com/talk/topic/19918-modify-ckeditor-image-markup-via-hook/?do=findComment&amp;comment=172616 https://processwire.com/talk/topic/12773-ckeditor-does-not-reapply-styles/#entry116174 Normally I turn ACF on, but keep HTML Purifier off in some cases, as I usually use "Regular Editor" instead of "Inline" and have trusted users. However, HTML Purifier is good for making sure only valid code is saved, so it is a trade off not to turn it on. When I do use HTML Purifier, then I sometimes temporarily turn it off during development but I make sure to turn in on for the production site, even for trusted users. If you run into troubles, try turning it on and off to see what it changes in the source. Sadly, HTML Purifier is not yet configurable in ProcessWire. You can give this request a thumb's up though: https://github.com/processwire/processwire-requests/issues/226 Setting up Format Tags is self explanatory, usually I use at least the minimum of p;h2;h3;h4;h5 (h1 is always generated by the template file so no need to include it). Extra Allowed Content is very important, normally I use this: p(*)[*]{*};div(*)[*]{*};li(*)[*]{*};ul(*)[*]{*};i(*)[*]{*};tr(*)[*]{*};*[id];*(class); *[id] and *(class) are somewhat redundant as they allow any IDs and any classes while (*)[*] also allow any of those in the case of the element they are applied to. Now we are getting to the bits you are probably concerned with: Custom Editor CSS File (regular mode) - which can be used to style the HTML of content editor itself as opposed to the frontend Custom Editor JS Styles Set - this is the file you need when you want to define styes for the Style toolbar dropdown Custom Config Options - the notes of the field read: these settings can also be set in one of these files (e.g.) ...config.js and ...config-body.js and this is what I normally use. To configure these options properly this is what you need to tripple check: Make sure: you did create the directory /site/modules/InputfieldCKEditor/ and copied the file called mystyles.js from /wire/modules/Inputfield/InputfieldCKEditor/ to its counterpart: /site/modules/InputfieldCKEditor/ Make sure: files in the directory /site/modules/InputfieldCKEditor/ are named exactly as the ones configured in the options. In the case of Custom Editor JS Styles Set, make sure that in the JS file the function parameter reflects the name you defined in the admin. The default is "mystyles", defined this way: mystyles:/site/modules/InputfieldCKEditor/site_styles.js which means that in the JS file you need CKEDITOR.stylesSet.add( 'mystyles', [... but if you want to use a different string, then replace "mystyles" both in the admin's configuration filed and the accompanying JS file, something like: cke_extra:/site/modules/InputfieldCKEditor/my_extra.js and CKEDITOR.stylesSet.add( 'cke_extra', [... Regarding the configuration files themselves, here is an example for config-body.js: CKEDITOR.editorConfig = function (config) { // Define changes to default configuration here. For example: // config.uiColor = '#AADC6E'; //config.enterMode = CKEDITOR.ENTER_BR; // stops new <p> tags from being added, adds <br /> instead. config.protectedSource.push(/<i[a-z0-9\=\'\"_\- ]*><\/i>/g); // needed for empty <i> tags (icons) config.protectedSource.push(/@/g); // needed for empty <i> tags (icons) /* If this one is enabled: * config.allowedContent = true; * then it is not possible to stop adding widht and height to images */ config.disallowedContent = 'img[width,height]'; // to stop adding widht and height to images }; CKEDITOR.dtd.$removeEmpty['i'] = 0; // needed for empty <i> tags (icons) Regarding mystyles:/site/modules/InputfieldCKEditor/mystyles.js here is one approach for UIkit 3: CKEDITOR.stylesSet.add( 'cke_extra', [ { name: 'Normal Paragraph', element: 'p', attributes: {'class': 'site-paragraph'} }, { name: 'Clear runaround', element: 'p', attributes: {'class': 'uk-clearfix'} }, { name: 'Warning Paragraph', element: 'p', attributes: {'class': 'uk-alert-warning', 'data-uk-alert': ''} }, { name: 'Success Paragraph', element: 'p', attributes: {'class': 'uk-alert-success', 'data-uk-alert': ''} }, { name: '1/2 left align', element: 'img', attributes: {'class': 'align_left uk-float-left uk-width-1-2@s site-body-img'} }, { name: '1/2 right align', element: 'img', attributes: {'class': 'align_right uk-float-right uk-width-1-2@s site-body-img'} }, { name: '1/3 left align', element: 'img', attributes: {'class': 'align_left uk-float-left uk-width-1-3 site-body-img'} }, { name: '1/3 right align', element: 'img', attributes: {'class': 'align_right uk-float-right uk-width-1-3 site-body-img'} }, { name: '1/4 left align', element: 'img', attributes: {'class': 'align_left uk-float-left uk-width-1-4 site-body-img'} }, { name: '1/4 right align', element: 'img', attributes: {'class': 'align_right uk-float-right uk-width-1-4 site-body-img'} }, { name: 'center image', element: 'img', attributes: {'class': 'align_center uk-align-center site-body-img'} }, ]); This method above defines classes for the Style toolbar dropdown in a way that more than one class or attribute is applied to the selected element. For example align_left is applied because the default ProcessWire CKEditor class for left align is this (see this post). However, to make sure that in the frontend the same element is also aligned to the left, I also apply uk-float-left uk-width-1-2@s to it. This is just a dead simple approach but you can make it more sophisticated. If you want to turn CKEditor into a WYSIWYG editor then you need do some extra work, because you need to make sure your contents.css defines the classes and styles also used on the fronted. I have not ventured too far in this direction though. Normally I use UIkit 3 on the frontend and not in the admin so I simply mimic the most important subset of the frontend's styles in contents.css. I will need to improve on this practice but only after I have switched from the Reno Admin Theme to Admin Theme UIkit. I hope I cleared up a few things for you. I you want even more tips form others, I recommend using google to search like this: https://www.google.hu/search?q=CKEditor+site%3Aprocesswire.com%2Ftalk&amp;oq=CKEditor
  24. Hello, There are basically three approaches you can choose from: 1. "Styles" dropdown: Make use of CKEditor's "Styles" dropdown, and define the styles the editors must apply to each image: https://processwire.com/talk/topic/19465-ckeditor-styles-dropdown-tips/ https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/modules/Inputfield/InputfieldCKEditor/README.md#advanced-tips 2. by using Hanna Codes: This approach is not for everyone but very versatile: https://processwire.com/talk/topic/11549-insert-any-html-tag-with-attributes-using-hanna-code/ http://modules.processwire.com/modules/process-hanna-code/ 3. automatically manipulate CKEditor content via custom coding: https://processwire.com/talk/topic/19918-modify-ckeditor-image-markup-via-hook/?do=findComment&amp;comment=172616 http://modules.processwire.com/modules/textformatter-fluid-images/ http://modules.processwire.com/modules/textformatter-make-links/ https://processwire.com/talk/topic/14835-module-textformatter-for-uikit-images/ Hope this helps.
  25. Hi, regarding creating groups, we have various discussions in the forum, for example: https://processwire.com/talk/topic/18775-fun-with-hooks-pagearraygroupby/ https://processwire.com/talk/topic/14129-list-pages-by-year-similar-to-blog-archive/ https://processwire.com/talk/topic/15369-group-pages-by-field/?tab=comments#comment-137442
×
×
  • Create New...