-
Posts
10,912 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
Sorry about that - I already adjusted one short array syntax issue with the Performance panel plugin. I'll take care of that one too - update coming shortly.
-
I just added the stripTags and also the other missing option: newlineReplacement, to the docs: https://processwire.com/api/variables/sanitizer/#options-that-may-be-provided-to-the-text-and-textarea-functions
-
Just a bit of a followup here. Have you tried the stripTags option for the textarea sanitizer? echo $sanitizer->textarea('I <span style="color:red"><3</span> ProcessWire', array('stripTags' => false)); That will allow all tags, including <3 to be submitted. Of course I still think the purifier might be a better/safer option, but thought I'd mention in case you didn't know about it. It's actually not listed on the $sanitizer docs page, but you can see it here in the source code: https://github.com/ryancramerdesign/ProcessWire/blob/b95e36a8d3071139bea5ed72b8b5025b876df976/wire/core/Sanitizer.php#L430
-
Yeah I agree - maybe I need to implement something like this (http://jsfiddle.net/PtskU/) as a new Inputfieldtype in PW. ASM's just don't always cut it.
-
Thanks for your thoughts @tpr - I am going to take a look at the settings in the next couple of days and clean them up a little. In the meantime, the latest version has some enhancements to the PW Info Panel. In particular, the "Fields List" section has been extended to be "Fields List & Values". It now additionally shows: some key Settings (at the moment just the maxFiles value, but might add some other key ones at some point) the type of value that is returned: object, string, integer, etc the value of the field - which is really nice for easily seeing what properties are available - see the phone_number in the screenshot for a useful example.
-
strip_tags removes anything after a "<" until the closing ">". If it is never closed, then the rest of the content will be removed. I think the best option might be the purify sanitizer like you are already using. I get the feeling though that the textarea sanitizer should probably replace strip_tags with purify - obviously the way it currently works is not satisfactory because it will also delete <$20 and anything else similar and obviously valid.
-
Not sure if you read this: http://stackoverflow.com/questions/5055845/php-strip-tags-allow-3-text-hearts As you said, it's not possible to use the allowableTags option of the textarea sanitizer either because it's not actually a real tag. You could convert "<3" to "<3" during your form submission (before you sanitize) and then it will be preserved.
-
It's not exactly like the HTML fieldset tag, but PW has fieldsetOpen and fieldsetClose field types which you insert into your template to group the fields between them. Same goes for fieldsetTabs - you can actually create new tabs on the top of the edit window - after the Content and before the Settings tab. Is this what you are looking for?
- 1 reply
-
- 1
-
Sorry, I think I might be on a different wavelength to you guys - I already have the ASM for selecting and sorting the panels to be displayed. What other settings do you think would benefit from an ASM options? I honestly don't see it being a useful interface (compared with checkboxes) unless you need to have them sortable, or if there are a LOT of options - such that there are just too many checkboxes. But I am definitely keen to hear which ones you think would be better as ASM. I can definitely see that some collapsed fieldsets could be helpful to organize the settings into related sections - I'll have a think about this and figure out which settings belong together. I do have a habit of getting carried away with too many settings/options - thanks for reigning me in Thanks again for the feedback - we all work and debug differently so it's great to hear what you guys want for this - don't be shy!
-
I honestly don't know - I just tried replicating your setup with the "new TemplateFile" approach and it's working just fine. Anyway, it sounds like you are not using this, so maybe we don't need to worry about it at the moment
-
Hi Peter - welcome to the forums! I haven't used Modules Manager in that version of PW so not sure if it works, but I would expect it will. It general it won't be dangerous and there are rarely any issues with modules not working on newer versions of the 2.x branch of PW. PW3 has resulted in some modules not working, but not that many really. I would say go for it and if a module doesn't work in a new version please report it in the module's support thread.
-
No problem - I can stick with the ASM option - I just wasn't sure whether anyone was using the ordering option - now I know you are, it's only a small inconvenience to allow that ability.
-
Thanks - I'll revisit these shortly. As you say, even on Linux it is still not trivial getting the status flagging correct, but I guess I will need to disable on Windows and tweak regarding /wire - I forgot about it needing to be writable when using the upgrade module. Thanks for the feedback horst - really appreciated. I have split PHPInfo into its own panel so it can be easily disabled in the config settings. BTW I do already have an ASM field handling the display of each panel - I just didn't want to get into the various sections in each panel. I am not actually convinced about the ASM choice over a simple checkbox. It's nice having the ability to order panels, but it's harder to quickly see which ones aren't selected. As users upgrade they won't necessarily know there are new panels. The latest version also includes some CSS tweaks to the panels - I think they are a little friendlier now. I am contemplating adding more panels: Available upgrades: core and site modules Data from Google Analytics - like realtime visitors and other timely stuff MySQL info - number of current connections and other available info Custom links panel - lets you define links and link text - maybe direct link to analytics for the site, or whatever really. Custom panel - you can output anything you want here - it would have full access to wire(). This would be kinda like a permanent barDump() panel with the output defined from the config settings. Or it could be a set of instructions, or a direct link to edit a specific page in the admin, or whatever. Some of these are probably overkill - just brainstorming! Any thoughts on these, or do you have ideas for others? I am also considering having separate permissions for each panel so that if you allow non-superusers access, you could hide all the debugging/error reporting stuff and just display some of these custom panels to site editors. Does anyone think this would be useful, or should all authorized users be able to see everything?
-
Thanks for the feedback @matjazp - sorry, I spaced on "ls" not being available. I forgot that permissions are not the same on Windows - it's been a while for me As you say, maybe I shouldn't bother showing them. I also wonder how much it really matters - presumably 99% of Windows use cases are dev environments - is anyone actually hosting a live site on a Windows server these days? Anyone else with any Windows input on this? New version just posted has a new "Output Mode" indicator/panel - as a reminder of what Tracy mode you are in. If you are in DETECT mode, it will report the actual mode that Tracy determined is appropriate based on your IP Address. I also added a phpinfo() output to a new section on the Diagnostics panel - maybe this is too much? I don't really want to make the config settings anymore complicated - ie I don't really want to add the ability to determine what sections are included in a multi-section panel, but I would like everyone's feedback on this. Should the phpinfo section be removed, or maybe should it be its own panel - maybe one that you typically leave disabled, but enable if you need to take a quick look? Any thoughts?
-
Sorry, are you saying that it is reporting that install.php is set to 666, but that is not actually the case? What permissions is listed when you: ls -al install.php
-
Thanks for the feedback @matjazp, I am definitely still tweaking this stuff, but I do think that statement is correct because 0666 means that all users can read and write . If you read Ryan's recommendations for config.php (https://processwire.com/docs/security/file-permissions/#securing-your-site-config.php-file) he states that it should only be readable by the apache user, and no others. Ideally it should actually be 0400 or 0440 so that it isn't even writeable by apache, but that may not always be convenient. I will add that I am not sure I expect to ever has these status/notes comments perfect, but I would like them to be a useful flag for obvious problems. I definitely want as much feedback on this as possible, so thanks.
-
Roles question. Should I hook something to do this?
adrian replied to joer80's topic in General Support
Take a look at this Issues list for that module: https://github.com/ryancramerdesign/DynamicRoles/issues -
ProcessWire ApiGen (dynamic + up to date + all branches)
adrian replied to kongondo's topic in API & Templates
Any chance this can be used instead of this page: http://processwire.com/apigen/ I guess the best case scenario would be if Kongondo would be willing to maintain it there? Or maybe that URL can be an alias that points to this version? -
I am not sure why it's not working for you. I have been playing around with a setup similar to yours and getting it to output. I am wondering if there are some issues around the way you are rendering the TemplateFile. You say the the variables from the init.inc are throwing errors - do these go away if you don't use PageProtector, but otherwise the code is the same? I also see that the TemplateFile is a login form, so it looks like you are already replicating what the module is trying to output with $loginForm?
-
PageListSelectMultiple with additional search field?
adrian replied to wheelmaker24's topic in General Support
Given that you are doing this, it sounds to me like you might be able to use this instead: http://modules.processwire.com/modules/inputfield-select-multiple-transfer/ The search works - my only beef is that it needs some CSS tweaking: https://github.com/ryancramerdesign/InputfieldSelectMultipleTransfer/issues/1 -
@Vayu Robins - did you read through the PageProtector forum thread? @houseofdeadleg couldn't get it to work either, but I think he misunderstood what is required. Do you get any errors with DebugMode On or TracyDebugger installed?
-
Hi everyone, The latest version fixes the error on Windows, although I have had to remove the "Owner" details if that function isn't available. Thanks for the suggestion Kongondo, but I think it is more complicated than using "getenv". That allows you to get the current running user - what I need is the username of the ID returned by the "fileowner" function. It also seems that perhaps "fileowner" doesn't even work as expected on Windows: " - http://www.w3schools.com/php/func_filesystem_fileowner.asp I don't have a Windows dev environment to test, so if there is someone out there who wants to test this and submit a working PR, I'll happily include it. Please let me know if anyone has any problems with the latest version.
-
Sorry about the Windows issues guys - I'll have a fix shortly. Btw@flydev - by the look of the panels on your debugger bar, it looks like you haven't revisited the config settings - unless of course you intentionally turned off a couple of them.
-
Not sure that I am thinking this through fully, but is it at all related to this: https://github.com/ryancramerdesign/FieldtypeMapMarker/pull/4 Does making the change in that pull request help at all?
-
Latest version now includes a new Diagnostics /Debug panel. The diagnostics are currently just filesystem stuff - the idea coming from the excellent ProcessDiagnostics module (http://modules.processwire.com/modules/process-diagnostics/). I just wanted a way of making the filesystem stuff available on the frontend of live sites as a quick and easy way to check if there are any problems. Please help me to test the results this is returning and the logic regarding the Status and Notes - I expect this may not be perfect yet. I also added Owner (User:Group) and Permission (chmod) info for the template file of the current page to the Template Info section of the ProcessWire panel. I have moved the Debug section from the PW Info panel into the Debug panel because I thought the PW Info panel was getting too long. I have renamed a few classes and file includes, so you will probably need to revisit your "Show Panel" settings because some by now be hidden for you initially). The panels are also now orderable. PS Those results are not my real settings - just playing to get a variety of status and notes entries for you to look at