Leaderboard


Popular Content

Showing content with the highest reputation on 08/13/2018 in all areas

  1. 3 points
    Not sure at what point this was added, but if you click the name of the image in admin, you can edit it in context. Save, and the filename will change. Personally I prefer sorting items in the order they appear in the admin. This way you can simply drag the images to the correct order, no need to tweak filenames
  2. 2 points
    I'm wondering how people here are responding to the new pricing for Google Maps: https://cloud.google.com/maps-platform/pricing/sheet/ For existing projects that stay within the $200 free monthly credit you can get away with not entering credit card details, but as I discovered today all new projects require you to enter credit card details. This is pretty infuriating IMO if you don't want to use the platform beyond the free credit. I'd be willing to have my API access cut off if I exceed the free credit, but forcing you to enter credit card details seems like it is designed to catch people out. I know you can add request caps but those are only for per user per second and per day whereas your credit is per month. It's hard not to be cynical about this and see it as a deliberate attempt to profit from accidental oversights of users. So how are you responding to this? Do you... Require clients to create their own developer accounts? Can't see that being workable. Require clients to supply credit card details that you enter into your own developer account? That would be a problem for me, because most of my clients are NGOs that are run by volunteer administrators, and I think most of them won't have a credit card for the organisation. Plus people can be nervous about sharing their card details with others. Enter your own credit card details? In which case what safeguards are you putting in place to protect yourself from excess usage? Switch to a different mapping platform? Any suggestions for a (free) substitute for Google Maps with similar features and a well-documented API?
  3. 2 points
    Just switch to Here https://developer.here.com/plans 250k transactions per month for free....
  4. 2 points
    Oh my code, I feel quite silly here. How come I have missed this ? Just dragging the images ..... Thanks Teppo
  5. 2 points
    As @OLSA explained above, that's not how Repeaters work. In order to connect more than one instance of a specific field, behind the scenes they create pages, and store field values on those new pages. The change you've suggested here wouldn't be a trivial one, at least. Calling field value ($page->field_name) when multiple fields have the same name is one issue, and selectors are another ($pages->find("field_name=value")). Probably a few other issues as well, but at least in those cases we'd need to do a lot more – that would ultimately add a ton of complexity for a use case that, in my humble opinion, is very rare. Now, getting back to your original issue: Although I think I get what you're trying to do here, you're approaching this in a really "non-ProcessWire" way. When using any given system, you'll eventually run into things that work in a certain, perhaps unique way – and that's where you can either try to work with the system, or work against it. The latter, obviously, is not particularly productive approach. In ProcessWire fields are most useful (considering data architecture, use in selectors, keeping your code readable, and so on) when each of them has a specific and semantic meaning: "this field stores phone number, so we'll call it phone_number – and this one stores a first name, so let's call it first_name". When you need to reuse multiple fields on a single page, we're often talking about some sort of a content block builder, even if in your case you need to predefine the number of items, the order of items, and so on. For such constructs ProcessWire provides two options right out of the box, Repeaters and PageTable. Both have their own benefits, but it essentially boils down to this: while Repeater UI is more embedded to the Page editing workflow, PageTable uses modal windows for editing content – and while PageTable supports multiple different content types, Repeaters only support one (although you can use showIf settings to define rules governing when a specific field is displayed). Commercial RepeaterMatrix field (part of the ProFields package) essentially provides the best of both worlds, at least in my opinion: in-context editing like Repeaters and proper support for multiple content types. That's what I usually use for my client sites when a content block builder is required. If you're looking for a free (as in beer) solution, PageTableExtended is definitely worth checking out as well. To summarise: it seems that your use case would greatly benefit from the use of a repeating field type (Repeater, PageTable, or RepeaterMatrix). If the number of items and the order of them is the main issue and things will fall apart if those two are wrong, I would try to find a programmatic solution to that: use hooks to force each new page to have specific items – and when a page is saved, make sure that those items are still there. You could also hide or disable features that sort items or remove/add them using some simple JS or CSS, which you can embed yourself (via hooks), or by using a module such as Admin Custom Files. Finally, if you're adamantly against the idea of using a repeating fieldtype, one more (commercial) solution you should check out would be the Table fieldtype, which is also included in the ProFields package. It's essentially a flexible fieldtype you can use to create new custom fieldtypes on the fly, so more or less what OLSA suggested above, but with a nice GUI. This way you can quite easily make each of your fieldsets a single field, and you'd have much fewer fields in total. --- Hope I didn't come out too smug, but while I do sympathise with your struggle with this particular use case, in my opinion it is something that ProcessWire already supports – it just doesn't do it exactly the way you'd like to. Also: while this is no doubt among the use cases that can be solved using ProcessWire, in some cases you have to face that ProcessWire might not be the best possible tool for the job. Given the wide variety of web based solutions, such situations are bound to pop up eventually
  6. 2 points
    I would simply switch to https://www.openstreetmap.org
  7. 2 points
    https://github.com/processwire/processwire-requests/issues/168
  8. 2 points
    Have a go and if it goes well, great, and if not, I'll try to find some time to pick up where you get stuck and get it working.
  9. 2 points
    This week the focus has been on fixing various issues in the queue at our GitHub processwire-issues repository. So while there aren't any new/exciting features to write a blog post about, there are a lot of commits in ProcessWire 3.0.110 that fix various minor issues. If you are running on the dev branch, the upgrade is definitely worthwhile. You can review this week's commits in our commit log in the date range from August 6 to August 10. Also a big thanks to @netcarver who is now helping to administer the processwire-issues repository.
  10. 1 point
    @Robin S Going through the same dilemma. Yes, I could do the kindly thing and add client sites to my google developer maps account but : how many until it impacts my map view limit? what happens when a site takes off and my gmap views go through the roof? how do I bill a client 5c and would they pay it? how do I work out which client to bill for minuscule amounts? how do I convince clients to sign up for a Google Developer account? I absolutely do not want to know my clients' credit card details for my sake as well as theirs Already have a couple of sites that I need to think about this but it's doing my head in, and yes, there are alternate website map solutions but they don't have the same power in google searches which is a key driver for including Google maps for local businesses on websites
  11. 1 point
    I’d love to see, as an option, a user-supplied character inserted between title and sitename. For instance, I usually use the pipe (|) character or sometimes a hyphen. And this character would only obviously be inserted if both title and sitename are used. If sitename isn't supplied, then the pipe or whatever gets stripped.
  12. 1 point
    @rareyush — Thanks! looks like I'll need to do some checking there, or maybe I should use curl. Will open an issue for this and try sort it out today.
  13. 1 point
    Is there a way to add an extra action to the ProcessPageEdit button? I tried calling $inputfieldSubmit->addActionLink() but get a weird result (image below), then I noticed that ProcessPageEdit seems to be rendering this options without the module's render methods? Getting this when adding an option through a hook to the InputfieldSubmit object of the edit form:
  14. 1 point
    I think this varies between card to card (prepaid Visa) so you need to read the terms & conditions. Also, it might be prudent to just put a minimal balance of $10 or something, as sometimes companies test out the registered card by debiting/crediting a small amount of money. In theory, they should tell you they do this test during your onboarding process/
  15. 1 point
    Fintechs have started offering products like a Prepaid Visa card, if you were particularly disinclined to give the traditional Banks more of your money. I applied for one influenced by some of the horror stories I've been reading from the Royal Commision into Banking (here in Aus)
  16. 1 point
    Can you add a Visa prepaid card with Zero balance on it? If so, then this should be a reasonable workaround, no?
  17. 1 point
    DarsVaeda sorry your project task It's not perfectly clear to me, but answer on last question is that repeaters create pages. That pages you can find deep inside Admin page tree (under title "Repeaters"). Repeater field has own table just like other PW fields and changes are happen inside cell "data" (rewirite when adding new repeater items), but also when we press "Add new" that add rows inside table_pages. Or, in short, repeaters also create nested pages. To get content from some repeater field PW need to get data from more rows inside more tables. Because of its complexity repeaters use more resources. ---- "...you generate one field but are able to use that one field several times.." I think that someone write about commercial, here is textareas maybe that? ----- I read this topic few times, and still it's not clear to me what you want to get, but if I want to get less fields (less database tables) and if that task about number of text-areas is static/fixed and never changed (eg. 15 textareas inputfields) I would go with custom fieldtype (eg. with columns "text_area_1", "text_area_2"...). On the other side, if that number is not fixed, and need flexibility, I would go with custom JSON field type. JSON is great in many cases, and as example you can on the fly create "columns/cells", or change/add new atributes, etc... ---- There is and one alternative solution, in theory I think that would work. In short, there is always option with PW to create fields using pages. If this is confused, concept is that inside pages tree, eg. "Fields types" we store pages with "field-types" definitions (eg: textarea-type-1: name, label, placeholder, maxchar, notes, pattern...), later using custom module (to add desired "fields" to "form-template") and through foreach dynamically - on page - create input fields / interface. After submit content could go to some textarea+markup divider in text format, or different, stored in JSON format. Regards.
  18. 1 point
    Well now it does perfectly! But I don't know how I got yesterday to a bunch of 404 pages. If I come accross the situation again I'll let you know.
  19. 1 point
    Thanks to twitch i started watching korean dramas. I couldn't sleep one day and decided to watch a little and really liked the show that was running, Goblin. Now i'm watching Pinocchio. Both are very good and Goblin has an amazing OST.
  20. 1 point
    In this example, if you already know that you need one field type multiple times, you could just use a repeater field. Inside this repeater field you could repeat a textarea field and maybe a page title field for better labeling the repeater items. That would be three fields in total instead of maybe 50. I know it is not always that easy but repeaters and the repeater matrix is one possibility to reuse fields on the same template. You could shorten this to: <?php if ($page->texarea_number_3): ?>
  • From Twitter

    • Get notified of updates

    • ProcessWire Weekly #236 - November 17 2018
      In the 236th issue of ProcessWire Weekly we introduce ProcessWire 3.0.119, provide an update on the new processwire.com website, introduce the ProcessFinder (aka elFinder) module, and check out the beautiful new website of The Camden Collection. Read on! / Subscribe / More at weekly.pw