Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/31/2021 in all areas

  1. Just a quick test: dark theme. For anyone interested, here's the admin.less file: admin.less
    10 points
  2. https://github.com/chrisbennett-Bene/AdminThemeTweaker Inspired by @bernhard's excellent work on the new customisable LESS CSS getting rolled into the core soon, I thought I would offer up the module for beta testing, if it is of interest to anyone. It takes a different approach to admin styling, basically using the Cascade part of CSS to over-ride default UiKit values. Values are stored in ModuleConfig Module creates a separate AdminThemeTweaker Folder at root, so it can link to AdminThemeTweaker.php as CSS AdminThemeTweaker.php reads the module values, constructs the CSS variables then includes the CSS framework Can be switched on and off with a click. Uninstall removes everything, thanks to bernhard's wonderful remove dir & contents function. It won't touch your core. It won't care if stuff is upgraded. You won't need to compile anything and you don't need to touch CSS unless you want to. It won't do much at all apart from read some values from your module config, work out the right CSS variables to use (auto contrast based on selected backgrounds) and throw it on your screen. You can configure a lot of stuff, leave it as it comes (dark and curvy), change two main colors (background and content background) or delve deep to configure custom margins, height of mastheads, and all manner of silly stuff I never use. Have been developing it for somewhere around 2 years now. It has been (and will continue to be) constantly tweaked over that time, as I click on something and find something else to do. That said, it is pretty solid and has been in constant use as my sole Admin styling option for all of those 2 years. If nothing else, it would be great if it can provide any assistance to @bernhard or other contributor's who may be looking to solve some of the quirkier UiKit behavior. Has (in my opinion) more robust and predictable handling of hidden Inputfields, data-colwidths and showIf wrappers. I am very keen to help out with that stuff in any way I can, though LESS (and any css frameworks/tools basically) are not my go. I love CSS variables and banging-rocks-together, no-dependency CSS you can write with notepad.
    8 points
  3. I'm not really sure if a forum about technology full of strangers is the best place for you to open up in this way, but I trust and hope that in this community you won't be made fun of. I won't pretend to have understood most of what you expressed – I didn't – and although I respect the vulnerable place you find yourself in, I don't think I could be of much help myself, so the purpose of this reply is solely to try to break a silence that must be heavy on you, and initiate a positive and respectful spirit on the responses.
    6 points
  4. (once again I was surprised to see a work of mine pop up in the newsletter, this time without even listing the module on PW modules website ?. Thx @teppo !) FieldtypeQRCode Github: https://github.com/eprcstudio/FieldtypeQRCode Modules directory: https://processwire.com/modules/fieldtype-qrcode/ A simple fieldtype generating a QR Code from the public URL of the page, and more. Using the PHP library QR Code Generator by Kazuhiko Arase. Options In the field’s Details tab you can change between .gif or .svg formats. If you select .svg you will have the option to directly output the markup instead of a base64 image. SVG is the default. You can also change what is used to generate the QR code and even have several sources. The accepted sources (separated by a comma) are: httpUrl, editUrl, or the name of any text/URL/file/image field. If LanguageSupport is installed the compatible sources (httpUrl, text field, ...) will return as many QR codes as there are languages. Note however that when outputting on the front-end, only the languages visible to the user will be generated. Formatting Unformatted value When using $page->getUnformatted("qrcode_field") it returns an array with the following structure: [ [ "label" => string, // label used in the admin "qr" => string, // the qrcode image "raw" => string, // the raw qrcode image (in base64, except if svg+markup) "source" => string, // the source, as defined in the configuration "text" => string // and the text used to generate the qrcode ], ... ] Formatted value The formatted value is an <img>/<svg> (or several right next to each other). There is no other markup. Should you need the same markup as in the admin you could use: $field = $fields->get("qrcode_field"); $field->type->markupValue($page, $field, $page->getUnformatted("qrcode_field")); But it’s a bit cumbersome, plus you need to import the FieldtypeQRCode's css/js. Best is to make your own markup using the unformatted value. Static QR code generator You can call FieldtypeQRCode::generateQRCode to generate any QR code you want. Its arguments are: string $text bool $svg Generate the QR code as svg instead of gif ? (default=true) bool $markup If svg, output its markup instead of a base64 ? (default=false) Hooks Please have a look at the source code for more details about the hookable functions. Examples $wire->addHookAfter("FieldtypeQRCode::getQRText", function($event) { $page = $event->arguments("page"); $event->return = $page->title; // or could be: $event->return = "Your custom text"; }) $wire->addHookAfter("FieldtypeQRCode::generateQRCodes", function($event) { $qrcodes = $event->return; // keep everything except the QR codes generated from editUrl foreach($qrcodes as $key => &$qrcode) { if($qrcode["source"] === "editUrl") { unset($qrcodes[$key]); } } unset($qrcode); $event->return = $qrcodes; })
    4 points
  5. AdminStyleRock Easily style your ProcessWire backend with two simple settings: Or via RockMigrations: $rm->installModule("AdminStyleRock", [ 'rockprimary' => '#0069B4', 'logo' => '/site/templates/img/kollar.svg', ]); ----------- Background: As of PW 3.0.179 we have a new style in AdminThemeUikit called "rock" style. This thread is here to report issues or ideas for improvement. The goal of the rock style is to make it as easy as possible to adapt your backend to the CI of your client. That's why it uses only ONE single main color and keeps all other design elements in a neutral grey. Download & Docs: https://github.com/baumrock/AdminStyleRock Here is an example screenshot using default uikit colors and a custom base font:
    2 points
  6. https://pwgeeks.com/
    2 points
  7. @Pete - I'd like to second this - is it an easy fix to show the full message in the email? Thanks!
    2 points
  8. Here is another little tutorial about files structure in ProcessWire. https://www.spiria.com/en/blog/web-development/tutorial-the-file-structure-in-a-processwire-site/ Comments welcome as always.
    1 point
  9. ProcessWire 3.0.179 adds great new admin theme customization tools that put you in full control over the admin styles, thanks to PR #189 from @bernhard — https://processwire.com/blog/posts/pw-3.0.179/
    1 point
  10. Thank you (and Ryan) for your work on AdminThemeUikit. What I'm missing is an option to select between styles quickly. I was expecting something like this: I create a folder /site/modules/AdminThemUikit/styles/ and copy many different less files. The core AdminThemeUikit would then scan for this folder and allow me to choose between them in the module settings, similar to what we have in AdminThemeDefault, where we can select different Color Sets (classic, Warm, Modern, Futura).
    1 point
  11. I updated and tested a site locally and it is working as expected with PW version 3.0.175 and 3.0.179 ! Only thing what happend once after changing / updating the wire-directory was an error screen about spoofed session. I think it had to do with the already existing cookies in my browser (generated with the previous PW version) that leads to that error. When changing the wire folder AND first delete all browser cookies before entering the login page and run a login, everything works as expected.
    1 point
  12. I wrote an article about IRC tech news (publication was delayed): https://www.ilmarilauhakangas.fi/irc_technology_news_from_the_second_half_of_2020/
    1 point
  13. Cool! Looks like we gotta gave a theme switcher module.
    1 point
  14. I found that it was necessary to do some uninstall/reinstall in order to undo AdminThemeBoss because of how it brings on board its own version of AdminThemeUikit in the /site/ directory. Disable the Boss theme Go to the UIKit module setting and selection the version in /wire/ rather than /site/ - this should upgrade the module to 0.3.3 from 0.3.0 Uninstall AdminThemeBoss, delete the plugin Delete the folder in the /site/ directory for AdminThemeUikit if it is still there Switch your admin profile theme to Default from Uikit Uninstall AdminThemeUikit from Modules/core Make sure the Less module is installed in site Reinstall UIKit in Modules/core This is what I had to do to get things to compile properly. Deleting the files on baremetal and clearing cache/compiled files etc, refreshing the wire directory from a fresh dev archive, etc. did not work. I had to uninstall and reinstall UIkit fromwithin processwire for the LESS compilations to occur. Took a little while to get this working, hopefully it saves other time who have experimented with other admin theme modules that mess with UIkit.
    1 point
  15. @Robin S Uikit 3 originally had LESS only, and we were an early adopter. I would have preferred SCSS at the time, as I didn't know much about LESS. But I soon learned that there's not that much difference between the two. If you know the basics of one, you already know the other. Now I regularly use both LESS and SCSS and consider them equals for my use cases at least, one of which is maintaining the Uikit PW admin theme. Given two choices I would almost always choose what's less popular. ? (I don't use WordPress either). It might be worthwhile for a major CSS framework to also add SCSS support like Uikit has done, but I think in our case it wouldn't be a good use of time. @ukyo There is some stuff we can delete, such as the /src/scss files and /src/js files, which we don't need. But prior to Bernhard's work, I was using Uikit with node and that's not something I'd want to go back to, it was really not a good solution for PW and was the main obstacle towards more happening with AdminThemeUikit. I'm sure it works fine for some, but for me and I imagine many PW users, we don't like having dependencies beyond PHP and PW, especially higher maintenance ones like node and the seemingly endless dependencies on top of it that result. Bernhard solved those obstacles so that now customization of Uikit is easily accessible to all PW users, and while it might consume a little more disk space for the .less files, it's well worth it in my mind. If someone wants to define their own uikit source path, that is also fine too, but the goal here has really been to make the whole thing as simple as possible, so I don't want to require people to download their own separate copy of Uikit, but will definitely get rid of some of the unnecessary files we don't need.
    1 point
  16. Exactly what Robin pointed to. Following is a slightly modified version in the site/config.php that also works in situations like accessing the site via CLI or bootstrap and is aware of admin page name changes. All session settings above the function can be modified to your needs for accessing your backend only.
    1 point
  17. Read about the $config->sessionAllow option here: https://processwire.com/blog/posts/multi-instance-pw3/#more-session-control
    1 point
  18. Thank you @bernhard and @ryan This is really brilliant and exactly the type of skinning ability that I think we've been missing!
    1 point
  19. The email notifications for subscribed topics now seem to be truncated when they used to include the full post. @Pete, is it possible to change a setting so that emails are not truncated?
    1 point
  20. This will take care of changing the published date: $query = $database->prepare("UPDATE pages SET published=:pub_date WHERE id=:page_id"); $query->execute([ ':pub_date' => $pubDate, ':page_id' => $pageId ]);
    1 point
×
×
  • Create New...