-
Posts
10,902 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
Right - I guess I was just worried what would happen if someone applied that setting to an existing template on their site accidentally. Maybe unlikely and not a big deal, but is there any reason not to change to my version?
-
Hi @BitPoet - love the response time on this Just a oversight I know, but can I make a suggestion that you please change: $parent->children("template={$template}")->count() > 0; to: $parent->count("template={$template}") > 0; The execution time on a parent with a lot of children is going to be a problem otherwise.
-
Module FrontendUser: login, logout and register users / members
adrian replied to pwFoo's topic in Modules/Plugins
Not meaning to take away from this module, and I am also not certain of its exact features, but we also have this new one from Ryan: http://modules.processwire.com/modules/login-register/ -
Yes of course - nice one
-
Thanks Robin - looks good for backend, but if you are using the form API on the frontend, and relying on the HTML5 "required" attribute to trigger your JS validation then this will break it. This is my frontend hack: $f->options = array('' => 'Choose One') + $f->options;
-
Ryan, I am not convinced this really works. The problem is that I want the field to be required, but I don't want anything preselected. Unless I am missing something there doesn't seem to be a way to do this. I actually think this is an issue not just with this fieldtype, but with the select type inputfields in general.
-
Front-end custom form: how to retrieve an inputfield css class
adrian replied to Federico's topic in General Support
To follow up on @Robin S's Tracy example, you can also access this without even needing to do an manual dump call. If you go to edit the field in the backend, you will see this in the Request Info panel. In this case you can quickly see that the inputfield is "InputfieldCheckboxes". You can also find this when viewing a page on the frontend if you go to Request Info > Field List & Values where you will see this, which is just one row of a table which shows the same info for all fields on the page. -
I used to use that module, but these day I prefer AdminOnSteroids for that functionality.
-
Thanks for those reports @godmok - should all be fixed in the latest version, although I didn't quite understand so could you please check that is working now as well. I assume it was related to the leading zero issue which is now fixed.
-
Thanks to you Bernhard - you're an integral part of this community too - the stats tell us one of the top 5 for the year
-
Searching repeaters only works in Chrome strangely
adrian replied to Pablos's topic in General Support
The browser can't affect this Are you sure it's not finding the matches? Is it possible there is some JS involved in displaying the matches that is failing? The first thing I would do is confirm that $search_term_string is the same when working vs not - where does that come from? -
Howto change Textarea field to CKeditor field and keep formatting
adrian replied to lpa's topic in General Support
If you're not comfortable doing this manually, take a look at this action in the AdminActions module: Copy Content to Other Field This action copies the content from one field to another field on all pages that use the selected template. This can be useful if you decide you need to split one field into two to allow different settings on different templates. It also makes it easy to move content from one field type to another one that is incompatible. -
@mel47 - I just committed the version that supports FormBuilder so you can now start using this version again.
-
Hi @Juergen - it's all about output formatting. It is off by default when bootstrapping. So just do this: $p = $pages->get(n); $p->of(true); $p->fieldname->formattedNumber // OR $p->fieldname Remember that calling $p->fieldname will actually return a formatted version by default - you don't need to explicitly specify ->formattedNumber If you don't want to turn on output formatting for the entire response, you can also use PW's getFormatted like this: $p->getFormatted('fieldname');
-
If there is some renewed interest, I was thinking that it might also be a good if I extended the "Shared JSON Packages" import option in Migrator to also supportt zip packages which can then include template/css/js files and assets/files. Anyway, just throwing it out there as an option to see if there is any interest.
-
Yeah, Site Profiles are nice, but what I like about my poorly named "Page Lists" is that they can be applied one-by-one as components as needed and also added to a site after initial PW install. I'd really like to build these out if we can get some community contributions.
-
You might also find this post: https://processwire.com/talk/topic/11499-admin-restrict-branch/?do=findComment&comment=144184 by @kixe useful - it talks about using that module with the multi-site module - I think this combination will help with what you want to achieve.
-
Thanks @Robin S - appreciate the help, but it's actually not quite that simple - that works on a new install of Tracy before you have ever run any console code, but once you have, those quotes mess things up. I have a fix ready here - I also need to add to the new File Editor and then I'll post in that PM thread for you. Hopefully I can get that new version released to everyone sometime next week.
-
Thanks for the report. I think I might have actually fixed this error in 4.9 (the closed beta I shared with a few of you last week). Would you mind testing with that version and let me know if the problem still exists. Sorry, I don't have a PW 2.x install at the moment - my dev machine is ridiculously low on space and I cleaned out a lot of unnecessary stuff recently. If it's not fixed, I'll have to get set up with 2.x again.
-
Thanks @Robin S - I have made that change along with some code cleanup and making all the module setting strings translatable.
-
I built ProcessWirePageLists a long time ago - it works with Migrator and lets you install the fields and templates (and in some cases pages) for getting started quickly. https://github.com/adrianbj/ProcessWirePageLists The `person.json` file is probably the most relevant to the question you are asking. You could easily build one-click installs of templates/files all sorts of things, like a blog, hotel booking field/templates, news articles, image gallery, ecommerce - whatever really. Maybe I should commit some more myself, but my original plan was to get user contributions to that repo. This is how you "install" them. They are pulled in at runtime directly from Github, so new ones are always available. This is what the JSON looks like for "person": { "templates":[ { "template":"person", "data":{ "useRoles":0, "childrenTemplatesID":0, "sortfield":"", "noChildren":"", "noParents":"", "childTemplates":[ ], "parentTemplates":[ ], "allowPageNum":0, "allowChangeUser":0, "redirectLogin":0, "urlSegments":0, "https":0, "slashUrls":1, "altFilename":"", "guestSearchable":0, "pageClass":"", "pageLabelField":"", "noGlobal":0, "noMove":0, "noTrash":0, "noSettings":0, "noChangeTemplate":0, "noShortcut":0, "noUnpublish":0, "nameContentTab":0, "noCacheGetVars":"", "noCachePostVars":"", "useCacheForUsers":0, "cacheExpire":0, "cacheExpirePages":[ ], "label":"", "tags":"" } } ], "fields":[ { "name":"title", "label":"Title", "description":null, "template":"person", "flags":13, "type":"FieldtypePageTitle", "data":{ "required":1, "textformatters":[ null ], "size":0, "maxlength":255 } }, { "name":"first_name", "label":"First Name", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":50, "size":0, "maxlength":2048 } }, { "name":"last_name", "label":"Last Name", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":50, "size":0, "maxlength":2048 } }, { "name":"portrait", "label":"Portrait", "description":null, "template":"person", "flags":0, "type":"FieldtypeImage", "data":{ "extensions":"gif jpg jpeg png", "maxFiles":1, "inputfieldClass":"InputfieldImage", "descriptionRows":1, "adminThumbs":1, "defaultGrid":0, "fileSchema":2 } }, { "name":"position", "label":"Position", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":50, "size":0, "maxlength":2048 } }, { "name":"department", "label":"Department", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":50, "size":0, "maxlength":2048 } }, { "name":"email", "label":"E-Mail Address", "description":null, "template":"person", "flags":9, "type":"FieldtypeEmail", "data":{ "size":70, "maxlength":255, "columnWidth":50 } }, { "name":"website", "label":"Web site", "description":null, "template":"person", "flags":0, "type":"FieldtypeURL", "data":{ "noRelative":0, "addRoot":0, "columnWidth":50, "size":0, "maxlength":1024 } }, { "name":"phone", "label":"Phone", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":33, "size":0, "maxlength":2048 } }, { "name":"mobile", "label":"Mobile Phone", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":34, "size":0, "maxlength":2048 } }, { "name":"fax", "label":"Fax", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":33, "size":0, "maxlength":2048 } }, { "name":"po_box", "label":"PO Box", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":50, "size":0, "maxlength":2048 } }, { "name":"address_1", "label":"Address", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":50, "size":0, "maxlength":2048 } }, { "name":"address_2", "label":"Address", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "size":0, "maxlength":2048 } }, { "name":"city", "label":"City", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":33, "size":0, "maxlength":2048 } }, { "name":"state", "label":"State", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":34, "size":0, "maxlength":2048 } }, { "name":"country", "label":"Country", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":33, "size":0, "maxlength":2048 } }, { "name":"skype", "label":"Skype", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":33, "size":0, "maxlength":2048 } }, { "name":"twitter", "label":"Twitter", "description":null, "template":"person", "flags":0, "type":"FieldtypeURL", "data":{ "noRelative":0, "addRoot":0, "columnWidth":34, "size":0, "maxlength":1024 } }, { "name":"facebook", "label":"Facebook", "description":null, "template":"person", "flags":0, "type":"FieldtypeURL", "data":{ "noRelative":0, "addRoot":0, "columnWidth":33, "size":0, "maxlength":1024 } } ] }
-
is it possible to show a field on a specific page id() ?
adrian replied to adrianmak's topic in General Support
Check out this great module by @Robin S http://modules.processwire.com/modules/custom-inputfield-dependencies/ -
The page export process should sort by the number of segments in the path to each page so that when you import they will be created in the correct order. At least that is how I handle it in Migrator: https://github.com/adrianbj/ProcessMigrator/blob/eaf8255aded36033bcd468c59b235b9a0eb6b785/ProcessMigrator.module#L379-L387 This sounds like a bug to report on Github.
- 1 reply
-
- 2
-
ProcessFileEdit is fantastic and I think ProcessFileManager has a useful role as well when you need to create/delete/move files around and don't have your dev machine with you. Also, here's a sneak peak for the new File Editor Panel in Tracy (coming soon!). This comes with: Test (changes don't affect other users) and Restore functionality (in case you save and made a major mistake) for all file types and even continues to work if you accidentally introduced a fatal error into the code you just saved - this allows you to recover without needing FTP access. Of course this doesn't replace the functionality of ProcessFileManager at all, but another tool in the arsenal.