Jump to content

Robin S

Members
  • Posts

    5,008
  • Joined

  • Days Won

    333

Everything posted by Robin S

  1. Thanks for the documentation updates! The text/background contrast in the code blocks is a little low - could the background be lightened, or text colours darkened? Or maybe switch to a dark theme for the code blocks? Thanks.
  2. Adding to this: ...so long as you are starting with the "blank" profile. If you have installed a profile that is based on Uikit such as the new blog profile then the frontend will use Uikit.
  3. @thetuningspoon, I just pushed another small change in v0.1.1 to remove any manual line breaks that a user might insert inside a textarea. Manual line breaks cannot be supported because they break the CKEditor tag widget.
  4. v0.1.0: this time hopefully...
  5. I had thought it would be nicer if the module decided automatically based on the length of the attribute value you give it, but now that you mention this I can see that my idea won't work very well when inserting a new tag, where the length will be zero until it is populated. So in v0.0.9 I have removed that breakpoint idea and now you can manually specify the textarea inputfield type for an attribute, e.g. myattribute__type=textarea
  6. If the image is in the HTML source as opposed to a CSS background image, then maybe it is not cropped to a square ratio?
  7. Will it though? That's true for $pages>find() selectors but I think for a repeater field the whole PageArray is loaded to memory regardless. Or is there another efficiency?
  8. @thetuningspoon, thanks, I couldn't reproduce the issue exactly as you're seeing it but I think I have found the source of the problem. For some reason I didn't anticipate using long strings of text for attribute values. So I've added support for that in v0.0.8 and now if the length of a value is greater than 50 characters a textarea is used in the dialog instead of a text input. The breakpoint at which a textarea is used is configurable in the module settings. Please let me know if this doesn't fix the issue for you.
  9. That's a bug, sorry. I missed something in the JS in a recent update. Should be fixed now in v0.0.7. Yes, the module should work for existing Hanna codes. I can't reproduce that issue here. If the v0.0.7 update doesn't fix things for you could you give me some more info: any JS console errors, the PW version, TextformatterHannaCode version, and an export of a Hanna code that you see the issue with? Edit: also please let me know how the Hanna tag looks in your CKEditor field - i.e. are the attribute values inside quotes, single or double?
  10. @alan, besides BatchChildEditor another handy module for this purpose is ImportPagesCSV. You select a template and parent, then in "Paste in CSV data" you just paste in a list of page titles and put 'title' on the first row (to indicate it is a list of titles).
  11. I think there is some confusion because the word 'tree' has in the past sometimes been used to refer to the page list (ProcessPageList) but now labels the dropdown 'Tree' menus. To be clear, the intention behind my module is not about preventing roles from accessing the page list, it's about removing the dropdown menus which I consider to be a confusing UI for roles with limited editing access. There is a related GitHub issue open here: https://github.com/processwire/processwire-issues/issues/231
  12. Well it wasn't something I tested for specifically, but it was pretty easy to add support for ProFields Textareas so I have done that in v0.0.6.
  13. @Ibrahim El Haddad, maybe you have a rule in .htaccess that redirects to the www subdomain? Either the one in the default PW .htaccess... # ----------------------------------------------------------------------------------------------- # 13. OPTIONAL: Redirect users to the 'www.' version of the site (uncomment to enable). # For example: http://processwire.com/ would be redirected to http://www.processwire.com/ # ----------------------------------------------------------------------------------------------- # RewriteCond %{HTTP_HOST} !^www\. [NC] # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] ...or some custom rule.
  14. If you force the session variable to 1 whenever the templates list is viewed then it makes the "Show systems templates?" filter toggle non-functional. But I suppose you could take the view that if that AOS option is selected then you never want to hide the system templates, even temporarily.
  15. Yes, PW uses a session cookie, and that's how session cookies work: https://en.wikipedia.org/wiki/HTTP_cookie#Session_cookie You can use the LoginPersist module to stay logged in across browser sessions.
  16. I also dislike editing code outside of my IDE. The workaround currently is pretty simple - just set this for all your PHP Hanna codes: include($config->paths->templates . 'hannas/' . $hanna->name . '.php'); But I'm in favour of anything that would make it even easier.
  17. Not sure I understand fully, but wouldn't that be reinventing the wheel? Hanna Code already does a great job of allowing the result of any custom code/function to be inserted into a textarea. Do you mean so you could have certain tags that are available only on certain pages? Because that is what the getDropdownTags() hook allows for:
  18. v0.0.5 released. Allows use of the dropdown/dialog in CKEditor fields that do not have the Hanna Code textformatter applied to them, in order to support $hanna->render() usage.
  19. Thanks for the report. Are you running PHP 7.1? I think that's the version that started enforcing stricter numeric values and throwing errors like this. I tested in PHP7.1 and I can't reproduce this issue. Also, I can't see how this error could be connected to HannaCodeDialog. From what I've read the "non well formed numeric value" error occurs when some arithmetic or other operation that expects an integer receives a string instead. And line 118 of Database.php is: $timerTotalSinceStart = Debug::timer() - $timerFirstStartTime; So probably Debug::timer() or $timerFirstStartTime is not an integer, but this is core code that relates to the debug mode tools and HannaCodeDialog has nothing to do with that. Do you see the error as soon as you install HannaCodeDialog? Do you see it if you have no Hanna codes defined when the module is installed (I'm wondering if the problem is with one of your Hanna codes rather than the module itself)? If you uninstall HannaCodeDialog does the error go away? I will support this in the next version. The intention was to avoid needlessly attaching the plugins to every instance of CKEditor if the textformatter wasn't applied to that field, but I guess to support $hanna->render() there's no way to know if a CKEditor field needs the plugins or not. I'm having trouble understanding exactly what's going wrong for you here. Make sure you meet the prerequisites and have completed the installation process: TextformatterHannaCode must be installed. TextformatterHannaCode must be applied as a textformatter to your CKEditor field. You must have at least one Hanna code created. Install HannaCodeDialog module. Edit the settings for your CKEditor field and in "Input > CKEditor Settings > CKEditor Toolbar" add "HannaDropdown" (to be precise, with a comma space separating it from the other items there)
  20. @tpr, is it possible to have the ListerTweaks submodule activated (to get the benefits of the "Lister options" section) without the submodule interfering with the columns of the Find and Users lister? Even after emptying the "Users lister columns" it shows "DEFAULTS" and prevents columns being added within the columns tab of the Users lister itself. Could there be checkboxes to turn off the column options within AOS?
  21. Do you mean a repeater field that you tried to import, or one that you are creating afresh via Setup > Fields > Add New? When you create a repeater field it should create a (system) template for itself automatically so weird that you are getting that error. If you don't already have a lot of repeaters created I would try deleting all repeater fields, uninstalling FieldtypeRepeater, then reinstall FieldtypeRepeater and start over with your repeater fields.
  22. Not sure but perhaps because you are not checking the process property of $this->page, i.e. instead of this... || $this->wire("process") == 'ProcessLogin' ...try... || $this->page->process == 'ProcessLogin'
  23. There is limited (and undocumented) AJAX 'dependent selects' support built into Page Reference fields. You must use the 'Custom find' or 'Selector string' option for defining selectable pages, and reference the source Page Reference field (that exists on the same page) using syntax like this: parent=page.page_reference_field_name Based on testing I have found: It only works for Select, Select Multiple or AsmSelect inputfields It does not work inside a repeater item
  24. Nice! Several features would be covered already by ListerPro but I take it this will be a free module so that's cool. I like the drag box for selection and the stepping through selected pages in the modal - ListerPro doesn't offer those features. Looking forward to trying it out!
  25. Hi and welcome @ren! I recommend you install the Tracy Debugger module as you'll find this an essential tool when developing. Then you can dump the $page object above your if() conditional and explore what its properties are (parent, url, etc). It should be obvious then why $page will or will not match those conditions you have set. // do not redirect if page matches: bd($this->page, 'page'); if($this->page->template != "admin" // any non-admin page || $this->page->is($this->redirectPage) // the dashboard page (prevent infinite loop) || $this->page->parent->is('/admin/login/') // various attempts to allow logging out || $this->wire("process") == 'ProcessLogin' || strpos($this->page->url, $this->wire('config')->urls->admin . 'login/logout') !== false ) { return; }
×
×
  • Create New...