Jump to content

All Activity

This stream auto-updates     

  1. Yesterday
  2. Oon some browser+OS combos that button does not work, unfortunately. I actually have debug on, since we haven't launched yet, but I'm also starting to lean into problem being in server side configurations. I managed to accomplish this in CKEditor's config.js by adding config.disallowedContent = '*{*}'; which does it automatically when pasting. It was also enough to keep server happy aswell!
  3. Hello, i have installed Frontend Edit. After this i got errors on the web page. Before the install i could call the title field like "$pageobject->title". After the install the title was rendered in an additioanl ARRAY. Now i need to call the title field like this "$pageobject->data[title]". But even with unstalling the Frontend Edit Module this error was is not corrected. I can go on and change all code but wanted to ask if somebody knows the reason for this and also a easy solution. (Sorry for my bad English)
  4. @iipa Pasting stuff from Word should be no problem ... I think most of our clients likely do this. So you definitely shouldn't get an internal server error from PW at least. Though you might try setting $config->debug=true; in your /site/config.php file (temporarily) and trying again, just in case — that will make it produce a verbose error message. But it's more likely that it is coming from mod_security or some other Apache or PHP module on the server that is monitoring input and halting the request when it comes across something it doesn't like. I don't blame it, as MS word can produce some pretty sketchy looking markup. But between CKEditor and htmlpurifier, PW should be able to clean it up just fine once the server lets it through. But if it's an Apache/PHP module doing this (which seems likely) then nothing you adjust in PW can fix it since the module examines the request before PW even boots, so you'd instead have to disable or configure the Apache module (mod_security, suhosin, or whatever it might be).
  5. ok, thanks elabx for the hint to look at this.. I compared the html output against a working datetime inputfield... the solution is, I have to set the class by hand... I tought it works automatically by setting $field>datepicker... but thats not true $field->attr("class", "FieldtypeDatetime InputfieldDatetimeDatepicker InputfieldDatetimeDatepicker1"); // I have to set the datepicker class by hand (1, 2 or 3) $field->datepicker = InputfieldDatetime::datepickerClick; // this is not needed, because it´s not working so... I have a working date/time picker now, by setting the right class like this
  6. You're correct that AdminBar only applies to users who are logged in. There's no "guest user" when it comes to AdminBar – only superusers and users with the "adminbar" permission will see anything out of the ordinary. Regardless, since AdminBar outputs features visible on the front-end, it's very much connected with everything else happening there. What you're missing here is that being logged in won't disable those browser extensions or nullify the effects of third party libraries – so it's not true that those features would only apply to users who aren't logged in. As such, it's very important that admin bar is as "tolerant" as possible, so that it won't break or cause new problems if you decide to implement a new JavaScript library on your site (or enable a browser feature/plugin).
  7. Does it render with InputfieldDateTimeDatePicker class to initialize? Are the Inputfield scripts loaded?
  8. Last week
  9. Unfortunately I moved away from Berlin. I hope to catch one in the future if I am back.
  10. Affinity used it in a clever way. I like(d) their software.
  11. d0h... I'll be in Hamburg that day but please have a beer "auf meinen Deckel"! @marcus is there a https://www.buymeacoffee.com/ or beer button we can join in for the meetup?
  12. First off all... I stumbled across this by accident and didn't follow the whole conversation... more or less... but as far as I understand the Adminbar (module) is only available to those who are logged in. So why bother with any libraries, browser extensions and such that (in most cases) only apply to those who aren't logged in? There are many modules that behave differently when compared to logged in users and guests. Sorry if I miss an important point here!
  13. https://affinityspotlight.com/article/comedy-wildlife-photography-awards-2019-the-best-entries-so-far/
  14. Jamie... put it on the screen!
  15. For a custom fieldtype/inputfield that contains two datetime variables (start + end) I want use two datetime inputfields in the render method. Everything works, except the datepicker does not appear... does anybody know why? public function ___render() { $name = $this->attr('name'); $value = $this->attr('value'); //getting values for start and end $start = $value->data["start"]->toDateTimeString();; $end = $value->data["end"]->toDateTimeString(); //preparing inputfield $field = $this->modules->get('InputfieldDatetime'); $field->set("label", __("Date")); $field->attr("class", "uk-form-width-medium "); $field->required = true; $field->datepicker = InputfieldDatetime::datepickerClick; $field->dateInputFormat = 'Y-m-d'; $field->timeInputFormat = 'H:i'; $field->timeInputSelect = 1; //setting first inputfield $field->attr("id+name",$name."_start"); $field->attr("value",$start); $renderedFieldStart = $field->render(); //setting second inputfield $field->attr("id+name",$name."_end"); $field->attr("value",$end); $renderedFieldEnd = $field->render(); $out = $renderedFieldStart.$renderedFieldEnd; return $out; }
  16. Using CTRL + SHIFT + V instead of just CTRL + V (on Windows), you can still paste the content and CKEditor will recognize basic stylings such as line-breaks and bold/italic, lists etc. without all the extra MS-Word proprietary stuff that @bernhard mentioned. That is intentional, since MS-Office documents and your website don't use the same styling, and you really don't want to end up with strange-looking parts in your website because of such author actions.
  17. You're right in that it's nearly impossible to tell which page to edit just from the URL. I think the only reliable way of getting the correct edit link is to render the admin bar server-side using wire('page'). No need to make it overly complex, I guess, by going the JS route. If somebody decides to do partial content replacement in their frontend, I feel like that's just something they have to take care of themselves by including the admin bar in the list of replaceable containers. The more I think about it, the more I feel like my case applies to that rule as well. If I want the links to force a full reload instead of a replacement, I need to configure my frontend accordingly. My only remaining gripe is probably the logout button that shouldn't be an anchor 🤡 As far as I know, it wouldn't make a difference since most libraries don't care too much about accessibility and tend to define their own cancellation methods (data-no-turbolinks="true", etc.).
  18. Hi @iipa, here are some useful links: I use the hook from Ryan since a few weeks and it works really good: Maybe one can this adapt to match more than inline styles. (?)
  19. Thank you! The module is this one by @David Karich https://modules.processwire.com/modules/page-hit-counter/
  20. It was like that on the previous version and I didn't implemented it yet on the new. Some small details like that I'm still working on. For instance, just upload a change do add PMI's logo at the top nav (the CEO requested it).
  21. ok... I am answering my own (stupid) question in case it's of any help to somebody. To add a class in the ul of each submenu. Use the 'submenu_css_class' in the $option array.
  22. @Sergio Why are you using anchors for the FAQ headings? Is it supposed to be used as toggle / show-hide? Because if yes, then that is not working as intended. Everything is visible, and you can't toggle anything (at least not with Chrome).
  23. Impressive site! Which "page hits"-module did you use?
  24. Hi iipa Does the user use the "Paste from Word"-button?
  25. You're right that browse isn't really a link – that's definitely one that shouldn't be represented by <a> tag 👍 Logout is a border case: technically it can be a link, just like it is right now, but you're right that it probably shouldn't be. On the other hand even changing it to a form isn't, in my opinion, quite enough – it should also provide and validate some sort of nonce/token, just to be sure that it can't be abused. There's no redirect after logout at the moment either, so that's not a major problem. Anyway, I'll figure something out for the next minor release of the module. Create is one of the cases where a link usually makes sense: it should be a link to the "new page" view in Admin in case the modal mode is disabled or JavaScript is for whatever reason out of equation. That being said, I've almost never used the "name format" option, so I didn't even think of that – that behaviour is indeed problematic and needs to be addressed somehow 🙂 It just occurred to me that my earlier explanation was flawed 😞 If you reload, say, just the <main> element within your <body>, and Admin Bar remains as-is, the links/buttons there will point to the wrong page. As such using such plugins you probably would need to reload Admin Bar as well. I could add support for modifying target/parent IDs with JavaScript, but that would still require extra steps for the developer anyway. Also thought about using URL in this case, but that wouldn't help, as Admin Bar can't know for sure if you're using "real" URLs or some custom format (via URL segments, History API, or something else.) Currently I'm thinking that an option for reloading / re-rendering Admin Bar via JavaScript might actually be the best option here: in most situations the module would work right out-of-the-box, but if you do use some sort of front-end routing / transition code, you could somehow tell it to update. Not a perfect solution, so any suggestions are welcome. -- By the way, if – and only if – it turns out that one/some links can't be easily switched to buttons without sacrificing something else, do you know if role="button" would help at all? I wouldn't use that unless I really have to (reinventing <button> with ARIA attributes is almost always just plain dumb), but this might be one of those cases where it's actually the most sensible approach – it would be an improvement in terms of accessibility, but I've no idea if it would help with preload/prefetch/etc. features 🙂
  26. Thanks. Yes, I have also purchased ProFields. This is great.
  27. @teppo Those are some good points. I agree the admin link itself and the edit link should stay anchor tags. Create, browse and logout, however, aren't semantically speaking links since they potentially have side effects (create, logout) or only trigger module JS (browse). There is one case that will create pages by merely following a link: when a template is configured to use the »Name format for children« setting in order to skip the page-add step. In that case, a new empty page is created every time the link is opened. I use that setting on most templates, that's probably why I noticed. The logout could be implemented using just a form and a submit button, using the form action for the logout URL. Not sure if ProcessWire currently supports custom redirect URIs after logout or if you might have to hook into the logout process for that. Turbolinks in particular switches out the whole body, but the problem here is that since there's no actual reload, stylesheets and scripts stay active on the page, so you mostly need to make sure that you don't cross between frontend and backend with any of these libraries, whatever part of the HTML they switch out. I've found a hacky solution by canceling any AJAX page visits if the URL matches the ProcessWire admin URL, but that means the frontend code needs to have a 3rd-party backend module in mind, which feels wrong.
  1. Load more activity
×
×
  • Create New...