-
Posts
11,185 -
Joined
-
Last visited
-
Days Won
372
Everything posted by adrian
-
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
-
Roles question. Should I hook something to do this?
adrian replied to joer80's topic in General Support
Take a look at what I did in AdminRestrictBranch: https://github.com/adrianbj/AdminRestrictBranch/blob/master/AdminRestrictBranch.module#L220 You can hook into Page::editable and set up your own logic to return true/false as needed. -
Maybe this moudule from Kongondo will take care of it for you: https://processwire.com/talk/topic/12050-module-jquery-file-upload/
-
Also, check out PageProtector (http://modules.processwire.com/modules/page-protector/) - gives you the flexibility to protect only specific pages and also to embed the login form inside your existing page templates.
-
How to hook into "view" links on tree and page edit
adrian replied to steveooo's topic in Module/Plugin Development
Are you just wanting to add a _blank target? If so, then the easiest option might be this: https://processwire.com/talk/topic/7588-admin-custom-files/?p=89331 which of course uses Martijn's AdminCustomFiles. -
Actually, you might want to look at PageProtector (http://modules.processwire.com/modules/page-protector/) instead. It let's you control access to just specific pages and also lets you embed the login form into your template so the login form sits within the existing look of your page.
-
Perhaps rather than initially redirecting them to the login page, you could simply add a login form to the page itself. You could do this manually in your template file, or make use of ProtectedMode (http://modules.processwire.com/modules/protected-mode/), either as is, or maybe you could lift some code to make something custom.
-
Hi @Dsquared and welcome to the forums. Go to the Details tab of your files field and check the "Overwrite existing files" option.
-
$input variable cannot get a two dimensional input form element
adrian replied to adrianmak's topic in General Support
A couple of relevant posts: https://processwire.com/talk/topic/691-wireinput-only-allows-one-dimensional-arrays-why/ https://processwire.com/talk/topic/7867-input-and-associative-array-issue/ From Ryan: -
What it measures is "user time used" (that is what PHP's "getrusage" function returns). We grab the amount of user time on page init() and the again when everything has finished loading and average the usage across this time period. So I guess the short answer is "Average".
-
Thanks @tpr - great idea. That horrible hover background highlighting was a result of the built-in Tracy css. It was on my list of things to tweak, but never got it. The latest version has your code in place and also contains a new CPU usage item on the System Info panel. I have submitted a PR to the Tracy project to see if they will include that in their package. I don't really want to have to maintain this addition every time they release an update - hopefully they will include it.
-
Tips on populating a dropdown from another dropdown
adrian replied to cb2004's topic in General Support
Admittedly I don't fully understand your needs, but PW has some inbuilt support for this if you are using Page fields. You can do something like this: parent=page.service for the page field's "define selector to find pages". This will create an ajaxified UI for field relations. It may not work for what you need, but thought I'd mention it just in case. -
Thanks Charles, I am glad you like it! It's funny really - I initially didn't expect to spend much time on it - I thought I would just implement it as is, but then kept having more and more ideas - and getting suggestions from lots of you guys (especially @tpr) and it just snowballed
-
If you can't get that to work, you could try adding a dedicated field to the content tab and adding a save hook to take it's value, sanitize it as a page name and then use it to populate the page name. I am also curious as to your reasoning for this - if it's to make it easier for editors to remember to update it, then maybe you should just install https://processwire.com/talk/topic/7724-page-rename-options/ - even if it's only installed during development of the site, and then uninstalled once live to protect URLs from changing automatically?
-
Not tested, but take a look at these: http://stackoverflow.com/questions/5127776/is-there-any-way-to-start-automatically-the-firebug-inspector-after-starting-fir https://getfirebug.com/wiki/index.php/Firebug_Preferences (in particular, the hideDefaultInspector setting.
-
"In addition, fields using a type of Repeater or PageTable are not currently supported for drafts (though support is planned). " https://processwire.com/api/modules/prodrafts/#drafts-and-fields
-
I just wanted to mention how great I think it is to use Horst's ALIF module (https://processwire.com/talk/topic/11666-alif-admin-links-in-frontend/) in conjunction with Tracy. The user switcher alone makes it invaluable! You'll notice that I disabled the Debug Mode indicator in ALIF because I have one in Tracy. I have also just added a new option to hide the panel labels which makes the debug bar much more compact and visually appealing: Here's the version with the panel labels which is the default just so you initially know what's what! Note that for positioning of ALIF, I am using Bottom, Right, and 23px for the value for Top | Bottom setting.
-
That's awesome news @Ipa - I was starting to go a little crazy! i just committed a new version which adds a "Allow Logging in Production Mode" setting. This restores the default behavior of the core Tracy debug tool. With this checked (the default), Tracy will still run in the background for all users (including guest access) - she will quietly capture and log any errors/warnings/notices/dumps etc to her log files, which of course you can be emailed about, or view via the Tracy Logs panel when you are logged in as a superuser. Please all take a look at the new option and let me know if you come across any inconsistencies between config setup and actual access. Thanks again everyone for your help with this!
-
You need to go to the main Modules page and install the new Theme module. If you have not renamed it, ie left it as AdminThemeDefault, then I think you should get the option to choose which one to use.