Jump to content

cjx2240

Members
  • Content Count

    54
  • Joined

  • Last visited

Community Reputation

17 Good

About cjx2240

  • Rank
    Full Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I've got a basic form with method="get" I use $input->get to retrieve the category, and show a list of pages based on this result. Works fine on PC, and on Mac Firefox. However on Safari and Chrome for Mac, I get nothing. If I try to var_dump($input->get), I get a white page, even if debug is enabled. It also works fine with $input->post Why does this work on one browser and not another, can anyone help please?
  2. Hi, I have quite an unusual method of selecting pages. I need to search against 3 pairs of "min" and "max" fields, and return anything that overlaps any of the ranges. The only way I can see that this is possible, is to exclude results where both fields fall outside of the ranges. This is quite hard to wrap your head around (I know, I've had a hard enough time myself) but I feel like I have the logic right. The integers used in this example are my search figures. $pages->get("parent=1042, (!comp0_min_high>200, !comp0_max_override<100), (!comp1_min_high>50, !comp1_max_override<10), (!comp2_min_high>50, !comp2_max_override<10)"); So what should happen, as far as I understand is (not A AND not B) AND (not C AND not D) AND (not E AND not F) However, using Tracy Debugger to dig into the query, it seems to use "OR" between each of those subqueries, instead of "AND". Is this my fault? I thought separating selectors by a comma was essentially "AND".
  3. On the off-chance that anyone else stumbles on this and thinks it's a solution for what they need, you should set the field to readonly, instead of disabled. Otherwise ProcessWire looks for a value, doesn't find one, and saves it as empty, meaning you'll wipe all the fields on a save.
  4. For me, it happens with any field. As soon as you set it to "Open when populated + Closed when blank + Locked (not editable)" - it vanishes from the CMS. While editable, it appears, with a 0 in it. Using HTML5 input doesn't help. The same thing happens if you set access level to view and not edit. The best thing I can think to do is leave the fields open and forcibly make them disabled with javascript or a hook instead. On a related note once I changed a textareas field to use HTML 5 input, I started getting this error on every save: InputfieldForm: Warning ('showIf' from 'Markup/HTML (Content Type)'): dependency field 'contentType' is not present in this form. - ProcessFieldEdit But my profields license expired a long time ago so I can't do much about this. Is there somewhere to report both these issues?
  5. I'm using this option on integer field types, however I have a bit of an issue In the CMS, if I set the field to "Open when populated + Closed when blank + Locked (not editable)" - the field does not appear at all - even the header - if the value is 0. As this data is managed by an import, I only want to display it in the CMS, not have it editable. The zero has saved, I can see it in the database. If it makes any difference this is a group of integer fields inside Profields:Textareas however I think they behave the same as any integer field, or at least any integer within a repeater or other group of fields. What's odd is that an empty text string doesn't have this problem on type: text. Seemingly there is some check that's happening, either when looping through the Profields:Textareas fields, or when simply checking for "Closed when blank", which is not taking the "0" as a number into account. Am I missing anything, is there something I could tweak to make this work properly?
  6. The answer was $page->tablefield->removeAll(); got there in the end 🙂
  7. Hi How can I empty, through code, a profields table field? I'm sure it's quite simple but setting it to null or an empty array/pagearray doesn't work Thanks
  8. Does anyone else think this is kind of a strange way to handle password reset? I've never seen this anywhere else. I've had a few very confused users caught out by this because they didn't read the full message, either they close the window or they open the email on a different device. Anyone changed this to work differently? This refers to ProcessForgotPassword.module if that was unclear.
  9. I hope you don't mind me giving a little constructive feedback, it's going to be a bit critical but it's just an aspect that I think is being overlooked in an otherwise excellent module. I think one thing that is holding me back from embracing this media manager (actually, we bought this in the past and then never used it -- and this is because there's no demo available) is that it really needs a little love in the styling department. Nothing fancy, but -- if we look at the screenshot above we can see just general CSS issues, alignment of the filter label top right, checkbox and sort icons are too close to the sort options, a lot of negative space between the filters and the nav, image count is too big and not aligned with pagination opposite. The spacing also between the types of media along the top is also not right when compared to how the CMS typically spaces out horizontal navigation. This is just in one screenshot, but these issues persist throughout in various places, such as notifications, upload boxes etc. Considering we have the UIKit CMS theme to base everything off, this kind of thing means that the media manager feels out of place in an otherwise quite neatly organised CMS. Now, people using this media manager for their personal projects will not care about these things, they will roll their eyes and say "why should we care, it's the back-end of the site, only functionality matters" (and in this, I must reiterate, you have done an outstanding job), however if I am building a CMS and handing it over to someone else, I need all aspects to have a consistency in quality because that is reassuring to clients.
  10. cjx2240

    Hanna Code

    I have, now! It worked a treat. The only consideration was that my title field was also being used to populate the <title> tag so I had to be a bit smarter, retain the original text that was being replaced in Hanna Code's replacement and strip tags in the page title.
  11. cjx2240

    Hanna Code

    Can I use Hanna Code in any field? Even a page title, or the title of a repeater? I have a site where someone wants to replace a snippet of text with an image wherever it appears, body, title, other text fields etc. - thinking this might be suitable.
  12. This must be really simple, I don't know what I'm doing wrong I'm trying to create a simple import for users, but it's not working. I want to check if they exist already, because I'll update their details if they do, and create them if they don't. Can someone tell me why this is returning true for $users->get("username") when the user definitely doesn't exist? I have tried various combos, with or without quotes, using "name=", but that shouldn't matter because it should be returning false either way.... Truthfully I think you're going to point out something really stupid/basic logic I'm missing which I'm blaming on sleep deprivation $users = wire('users'); foreach($newusers as $newuser) { if($users->get("$newuser->userid")) { echo $newuser->userid." already exists<br>"; } else { // create the user } } Edit: Why is it I frequently work these things out minutes after asking on here... 😛 The answer is that $users->get(name) returns a PageArray object regardless of whether it matches a user. You have to check if that user has an ID or such instead.
  13. Could someone point me in the right direction of where I might add new buttons alongside the page list when you log into the CMS? As in, near the "Add New" button that appears in the top right by default. I have issues with people not being able to find some links that they need to use regularly. Thanks in advance!
  14. How do I install or update a plugin such as the below? https://ckeditor.com/cke4/addon/pastefromword I have unhappy clients who want to paste a lot of content from Word
  15. Did CKEditor end up being updated in 3.0.107? I can't find it in the notes.
×
×
  • Create New...