Jump to content

Macrura

PW-Moderators
  • Posts

    2,766
  • Joined

  • Last visited

  • Days Won

    40

Everything posted by Macrura

  1. Astounding! I'm installing now on several sites! Working great so far, had to change line 195 to support textarea, as that's what i use for the info $text_fields = $this->wire('fields')->find('type=FieldtypeText|FieldtypeTextarea'); Testing the single select now, but noticing that the options don't have the data-info attribute, so there is no way to update the selected option's description by javascript – do you think it is possible to add the data-info to the options on plain selects?
  2. Recently I have been trying to improve the user friendliness of various page select fields, including single select and checkboxes. The issue comes down to the fact that if say for example you have a single checkbox, you can explain what the effect of checking that box is. But if you are using checkboxes on a page select field, there is no way to have any extended information about the option. An example of where something like this is already in use is on the Status field - each option has the title of the option, e.g. Unpublished, and then additional info, like "Not visible on site". Currently my solution is to use a custom inputfield that extends the primary inputfield, which extends the attributes for each option, and then use javascript for handling the display. On checkboxes, adding uk-tooltip to the checkbox labels with the data-description on the option becoming the tooltip content. (see screenshot below) On single selects, i have some JS replace the field description with the info about the selected option. (see screenshot). The reason i'm posting this here is to see if there is any simpler/better way to do this, e.g. hook into the creation of the options for any page field and add the custom attributes, without having to change the inputfield type. And i thought this could be a good candidate for AOS. To better illustrate how it works, i have included some screenshots and links to the repos for the select extended and checkboxes extended. Select Extended: nothing selected Option selected, with option's description showing: https://github.com/outflux3/InputfieldSelectExtended ----- Checkboxes Extended hovering over any option shows the option's description: https://github.com/outflux3/InputfieldCheckboxesExtended
  3. The caching though won't work if you are using wireRenderFile and reusing the same file with different variables that influence the markup when outputting. There would need to be another option where you could set some type of ID for the cache; Right now, if i have files being used with different options for output based on supplied variables, like a page builder, it will just render the 1st one over and over if i render the same file in succession.
  4. yeah for selecting icons there is a version of FieldtypeFontIconPicker floating around somewhere (possibly not the one in the directory) that works really well, will gave to dig that one up.. Edit - this is the one i use for icons, thanks to @OLSA
  5. Inputfield Selectize is the way to go.. it can do basically anything... here's a screenshot example; colors, icons all no problem..
  6. ok i'll be able to work on it starting next week, and will check back in here once i have something to report... Doh! just checked the modules directory and Ryan already made the switch... thx @ryan! Will proceed with testing now for ensuring we don't break things with the refactored code, might take a week or so on this...
  7. maybe I should just replace my version with @nbcommunication's code and then see about replacing the current module with mine in the directory, or alternately, if Chris wants to keep the new version under their purview, then they could replace it. I guess we need to ask Ryan to intervene here and be able to backend edit that module record to deprecate Pierre-Luc's version... In terms of the compatibility, I'd say that it might be preferable to (if possible) run a version check and then only utilize functionality apropos the compatible version; I do think it is a problem to have a module that is in the directory that could possibly break an installation, though if the new version does state min version required, that should be enough to prevent users from inadvertently upgrading to an incompatible version...
  8. Here are some: https://themeforest.net/item/lovely-corporate-creative-multipurpose-html-template/19515847?s_rank=11 http://themedemo.indonez.com/?theme=Fina http://torbara.com/demo/?theme=HTML-GB
  9. No, you can't use the same field multiple times on a template... There are repeatable fields, like Profields Multiplier, Repeater, PageTable, or even Profields Textareas, etc, for when you need to have multiple iterations of a field on the same template...
  10. I had this issue yesterday - client says they added something to a page table, and then it disappeared. In this case we are not adding as children, but have set a parent. My suspicion is that the client had multiple tabs open, and saved the record later on another tab where they didn't have the item added. This then creates the orphaned page. so, same code as adrian posted, i'm using basically to fix these orphans... $p = $pages->get(####); $p->of(false); $p->page_table->add($pages->get(####)); $p->save('page_table'); though i think it will probably be better at some point for me to save the value of the page that created the record into that page table item, and then have a hook that runs and checks for orphans (not children) and adds those to the table.
  11. I've seen mod_sec trigger a request was aborted on servers with overzealous settings. sometimes the server contains a log of which rule triggered the condition.
  12. @nbcommunication wow thanks for this, and especially for working on the todos and cleaning up the code! Looking forward to using your improved version.
  13. thanks, ok yes that was it, i force reloaded the page (not in modal) and was able to uncache the js.
  14. Can't trash items in version 6 – click trash on the item, save and it stays put.
  15. wow awesome, thanks a million! Will get this downloaded and installed and let these particular users know, they will be happy! Edit: So how do i get this, i can't seem to find my order number, or the email receipt i was sent.. Also, i think my subscription expired?
  16. sounds tricky... not sure about that; don't want to make it too hard for you, so hopefully this doesn't present issues... I do see the underlying snafus with the modal being a separate process which needs to communicate with the page and the field specifically to display status of the items in the lister... but i don't know enough about how that's working; in the case of these users that i'm working with, they are flexible enough that if i explain how something works, they can handle some small amount of quirkiness here and there, so i can just let them know that the list won't really reflect which items are already in the field...
  17. is there any way to add an attribute to the items that are added by ajax save so i can do a check on the front end, and that would solve that.. not sure, just thinking out loud.. Maybe i need to hook somehow.. This is using AdminThemeUIKit; i will check again to see if the background changes on this one.
  18. Hi @kongondo, Hope all is well! Running into a couple of glitches here with VPS, and these were discovered in a meeting yesterday, more or less watching the client/users interacting with the field and having to sort of 'apologize' for the complexity and/or the peculiarities of the field. To sum up the current issues: (1) It seems that when adding an item to the field, there is some sort of ajax save going on (?) - this is contrary to a standard page field where the stored value of the field is not modified until the page is saved. The issue here is that the frontend is possibly updating to reflect that saved state of the field, prior to the user having a chance to save the page. An example use case illustrating why this is a problem would be say if your field is being used for selecting slides for a slider. The user may want to add slides, remove others, reorder the slides, possibly edit the slides all prior to wanting these changes to be reflected in the front end. With the current behavior, the newly added items appear on the front end prior to the user saving the page, and they found this to be unexpected behavior. (2) Users are still confused about the process of adding items from the lister. One issue is that they don't know when/if an item is selected, as there appears to be no indicator of that at the row level, so they would select something, then inadvertently unselect it in a vain attempt to get some visual feedback that the item they want is selected; Once they have an item selected, they need to scroll to the top of the modal window, and hit the plus button to get the item to add to the field. Not sure how else this could be handled but it is something they also have to remember rather than it being intuitive. (3) the process of removing items is also a 2 step process – they have to trash the item, then hit the remove button; this is fine, and as long as i add instructions on the top of the field it should be ok; But maybe there should be some visual feedback once they have 1 or more items selected for trashing that they now need to click the X button to actually remove them – saving the page with those items marked for trash (which would be the images field behavior) does not seem to remove them, so this inconsistency between similar looking fields is also causing confusion among the users. Currently I don't know of any better way than this field to allow these users to select items (such as images, videos, or other image driven content). The ability for them to use a lister to select items is great, and once you get used to the steps, it's basically fine, though some small tweaks that might address some of the current concerns could be nice polish for this. But currently the fact that items are pushed to the front end without users saving is the biggest issue that I need to resolve for this particular project/scenario..
  19. i'm getting errors when this module is installed, using the latest version of PW. Had to uninstall it to remove the error; this is ok in my situation as i wasn't doing anything complex; but would be good to see if this can be fixed somehow.. TIA
  20. I do a lot with $cache, it's great and super flexible, and easy to implement. I expect i'll be using it more and more in the future. I don't use markup or template cache much; I always use ProCache, but i think it's still important to have pages load pretty fast without it, as the first page load that generates the cache needs to be something reasonable that doesn't overload the server, or bounce the visitor. One thing i did recently on a few challenging situations was to use the $page to store markup. For example, using something like wireRenderFile, you can generate the some bit of markup and store it with the page, in a hidden field; this markup can be regenerated on save of the page using a hook, and then it doesn't have to wait to get regenerated on the front end. Another thing that is interesting to do is $cache within $cache, ... had to do it in a few places, it was tricky, but it really made a difference in speed..
  21. tracy didn't help with this, but turned out i was missing a closing parenthesis on one of the dozens of conditions and there was an extra one later, so the api call was triggering the warning, but not any error...?‍♂️
  22. PHP Warning: array_key_exists(): The first argument should be either a string or an integer in .../wire/core/Wire.php:954 I'm running an addHookAfter on saveReady to check for changed to some fields, and set some cache fields as a result. But every time a page is saved (usually by a non-superuser), the above warning is generated.. Some of the fields being checked are text, others are table, or page reference... not sure how to troubleshoot this one...
  23. i guess we do need to cleanup the checkboxes then, but i just copied the other checkbox config stuff for the new checkbox; I didn't realize that would make it checked by default; I guess this means that all of the checkboxes for this module are checked by default when you install;
×
×
  • Create New...