Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/01/2021 in all areas

  1. Same as @diogo already said... I don't know and don't understand almost anything you wrote @hellomoto but eitherway... I know how it feels to be lost in some kind. Never had to deal with things you wrote in your first post (I read it, but won't cite it as you deleted it). All I can say, which is almost what Diogo already said... I won't make fun of you. Never. You are part of this community which is more important that anything else. Yet... I'll offer you an "open ear" for conversation, talks, exchange for all kinds of topics. I remember a time I needed something like that but haven't had anyone... so... the thing I can offer you is... someone to talk to. If needed and wanted. We all have some kind of daemon or daemons which follow us in some kind or another. Either in real life or in mind which disrupts our real life. No judgement or anything like that. Talk to me about the things that keep you in trouble. Drop me a PN for contact details. We can talk via whereby, Skype... whatever. Let me know. I won't let someone from this community go down a dark spiral. Talk to me. We are friends. Even though we don't know each other. Yours, Alex!
    8 points
  2. 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.
    4 points
  3. Don't mess with @teppo. He sees and knows almost everything and therefore we love him so much (but don't tell him). Thank you as well for your module. This might and will be a great addition for a lot of us.
    2 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; })
    1 point
  5. 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.
    1 point
  6. What I've found out, that if you have a Form builder form on your site, a cookie will be set even with the config setting mentioned above. To avoid this you have to disable the cross site scripting protection.
    1 point
  7. Thank you for making it easier to style the admin theme. This is way better than building it every time with node. ? Is it possible to provide also a source map file in addition to the css? I like to search for the variables with the developer tools and this would help me a lot. I know I can look through the admin theme style, but for example the reno theme uses many own variables instead of the UIkit variables. Regards, Andreas
    1 point
  8. Miss Monique (on YouTube)... awesome sets.
    1 point
  9. 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
  10. It's working here for me. $config->sessionAllow = true; $config->sessionAllow = false;
    1 point
  11. @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
  12. You still didn't say what is the result of echoing setlocale(LC_ALL, 'de_DE.UTF8', 'de.UTF8', 'de_DE.UTF-8', 'de.UTF-8') ? Fair enough that you don't want to continue trying. Just keep in mind the purpose of this check, in case you have a related problem in the future. Has written in the code: * Warning about servers with locales that break UTF-8 strings called by basename * and other file functions, due to a long running PHP bug If you don't have ssh access to the server, you can also do this inside php var_dump(\ResourceBundle::getLocales(''));
    1 point
  13. @szabesz No need new Module for Uikit source files ! Node example only for theme development, if you need admin theme customizations you can import uikit source files on your side. Node usage example is not for ProcessWire users, its only for theme development by @ryan or @bernhard. User can import uikit source files inside : /site/templates/admin.less You can add @uikit-source-path variable on wire/modules/AdminTheme/AdminThemeUikit/uikit-pw/pw.less You can change variable value normally on lately loaded file on less. // Import uikit, use less variable for uikit source @uikit-source-path: "../../node_modules/uikit/src/less/uikit.less" @import $uikit-source-path; Change @uikit-source-path variable /site/templates/admin.less @uikit-source-path: 'source/to/uikit/less/uikit.less'; div { border: 1px solid red; }
    1 point
  14. What sort of field is user_id? If it's an integer or text field that only stores the ID (I assume it is because of the name and way you are getting the user page via the ID) then you should change to a "user_page" Page Reference field that will hold the actual User page object. On the Advanced tab of the settings for the user_page field tick the Autojoin checkbox. That way the User object associated with each portfolio-detail page will automatically be loaded in a single database query when you do... $profiles = $pages->find("template=portfolio-detail"); ...rather than needing multiple database queries within the foreach. In the foreach you will get the field values from the User object like this: echo $portfolio->user_page->firstname;
    1 point
×
×
  • Create New...