-
Posts
10,902 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
Have you looked at the path to the image in the HTML? Did you add the ->url at the end? If it's a multiple images field, you will also need ->first() in there or a foreach loop to get each image individually.
-
@Oca2 - please try to avoid double posting and if you do, please follow up on both so people don't try to help you when you've already been helped. Thanks! Cheers, Adrian
-
It sounds like your site/assets/files folder is not writable. You can check out the Diagnostics panel in Tracy for info on the settings for each of the key directories.
-
You need to have a read of this: https://processwire.com/talk/topic/14251-upgrading-from-thumbnails-module-to-croppable-image-3/ Also note that once you have taken care of that, you need to add ->url to the end of your src - croppable image returns a pageimage object, not a url like the old module did.
-
I don't think Croppable image has this method - I think you'll have to updated your API calls for this module.
-
Me too.
-
Can anyone tell me the difference between the following pieces of code
adrian replied to SamC's topic in General Support
I haven't been following the conversation, but if it helps, here is what I see with @kongondo's code: -
Change field description in context via API
adrian replied to MichaMichaMicha's topic in API & Templates
I addition to the entityEncodeText that @bernhard mentioned, you might also find this useful: http://modules.processwire.com/modules/dynamic-description-notes/ -
Not yet - I haven't come across any issues that the file compiler (or some small minor conditional) doesn't take care of. Not sure I am ready to ditch 2.x support just yet, but I'll definitely keep in mind your argument re this module. Maybe I should just ask here - anyone using this module on 2.x? Would anyone mind if it was made 3.x only?
-
@godmok and @szabesz - well that took way too much time It's very rough, but please test the new version on the dev branch: https://github.com/adrianbj/FieldtypePhone/tree/dev This new version has lots of breaking changes, so please don't update an existing site. You'll need to uninstall and reinstall to get the new format for the default formats to show. You could I guess copy/paste them in from the module code to that field if you have data already that you can't lose. Format options now have a proper name associated with them, so if you change the pattern for a format, it should update the output everywhere. Also, you can now see exactly how each format will look based on the pattern, rather than you having to enter that in a comment at the end. When defining formats, follow this format. The category headings are optional. The key things is: name | pattern Now you can also call these formats separately from the API regardless of what the selected output format is. You can call like this: $page->phone->australiaWithCountryAreaCodeNoLeadingZero
-
@godmok - obviously an easy fix to ignore blank lines. The issue of the format not being updated is a little trickier - currently the selected format is stored by the format "code", rather than by a name, so changing the definition of a format won't update the format stored for a field. I should probably store formats by their "name" so the current definition for a format is called each time. I think this would be a good improvement for this module and would also be inline with your request to be able to call the format directly. The catch is making sure I don't break existing sites using this module, so I'll have to make this change with that in mind. I'll see what I can do.
-
In the module settings you can create your own format. Take a look at the Australia examples - the one with the country code has no leading zero for the area code. My initial suggestion to you would be to create your format based on that. I guess the contingency I never implemented is when you want to be able to call different formats for the same phone field. My initial thought for adding this is to allow you to call the format based on the name of the format in the commented part. So for example if you created a format like this: +1 (23) 456-7890 x321 /* My No Leading Zero With Country: +1 (11) 111-1111 x111 */ you would be able to call it via the API like this: $page->phone->formatted('MyNoLeadingZeroWithCountry'); That way you could create whatever custom formats you need, name them how you want, and call multiple versions on the same field because these wouldn't rely on the format chosen either in the module settings or the field settings. Does this sound ok?
-
No better feeling on earth when it's really good
-
Happily skiing the pow at -6C here in Canada - the more snow, the better Although having lived through a winter in Maryland where they are not prepared for the snow (the housing and the road crews), I do feel for what Ryan is going through!
-
Call the results of a Select Options field in its parent page
adrian replied to Reclus's topic in General Support
It looks like you never specify the name of the Options field. You probably want: foreach($page->children as $item) { foreach($item->optionsfield as $option) { echo '<p>'.$option.'</p>'; } } -
Changing labels for fields used within repeaters
adrian replied to mwjt42's topic in Getting Started
It should work the same as with fields in normal templates. Just click on the name/label of the field on the repeater Details tab. -
Looks like you are using the old thumbnails module (http://modules.processwire.com/modules/fieldtype-crop-image/). You will need to upgrade to: http://modules.processwire.com/modules/croppable-image3/
-
Just in case you guys haven't come across it, I have been using https://www.gitkraken.com/ but maybe I should give Tower a go one of these days.
- 242 replies
-
- 3
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with:
-
Ok, I'm on it
-
Taken care of that here - will push with the next update. Agreed - it will be in there with details and warnings. I am sure if it will ever be 100% reliable because of the way it works, but from my experience it only ever seems to be an problem when used within hooks. I see two possibilities here : a bdb() with some config settings to determine what the depth and length will be - I think the defaults should probably be 6 and 999 - any thoughts? or a simplified syntax for bd(), eg bd($page, [6, 999]) so you don't have to do bd($page, ['maxDepth' => 6, 'maxLength' => 999]) which is painful The problem with a fixed dbd() is that in the case of PW objects, anything more than 6 can results in out of memory errors (at least with my dev machine setup), but working with smaller objects/arrays, I often want 6 or 7. I have decided to go with this for now, which sets the maxDepth to 6. Obviously pre PHP 5.4 you will still need: array(6) bd($page, [6]); You still need to make the depth and length settings an array - this is because the second argument in the array can either be the "title" or the options array. It's get too confusing to take it any further away from that default. You can also do: bd($page, [6,999]); or: bd($page, 'Dump Title', [6,999]); How does that look to you? I'll post this to the closed beta version shortly.
-
Love it
-
New dedicated documentation website is up at https://adrianbj.github.io/TracyDebugger It's very early days still, but finally there is a home for doing a good job on the docs. It's easy to navigate with a top navbar and sidebar menu and a search term option. Once I get the key Debug Bar and Configuration settings added, I really want to do a good job on the "Tips" section because I there are a lot of users out there who are a little lost on all the things that can be achieved. Hopefully lots of updates coming in the next few days! PS - if you're more artistic than I am and you hate the logo, please let me know
-
Need help assigning specific Properties to a field in the repeater
adrian replied to Livius's topic in General Support
Try wrapping in curly braces: <a href='{$download->download_pdf->first()->url}'> -
Need help assigning specific Properties to a field in the repeater
adrian replied to Livius's topic in General Support
Unless your files field is set to have a max of 1 file, then it's an array and you need first(): $download->download_pdf->first()->url;