All Activity

This stream auto-updates     

  1. Today
  2. teppo

    By the way, I was just wondering what might be the recommended alternative to defining custom API variables (particularly by modules) for the Functions API? Is there one? I for one have found these very useful, and they provide a way for module authors to add developer features that feel consistent with the "native" API. In case custom API variables are only feasible with the non-Functions API, then perhaps that should be documented as well; or am I just overthinking this?
  3. Gideon So

    It is very hard to tell because I don't know your template settings and page structure. Gideon
  4. mattcohen

    Thanks, Gideon, What I was hoping to do was to perform the same search but limit it at the lowest and highest ends of the spectrum (e.g. Highest price and lowest price). Does that make sense?
  5. Gideon So

    Hi @mattcohen, I see. But I think the title=$item_title selector may just return 1 page. This is the reason the found page is not sorted. Please provide more info, for exampe , your template settings, page structure and what you want to achieve. Gideon
  6. mattcohen

    Hi Gideon, the price field that it's been sorted by is the price field name.
  7. Gideon So

    Hi @Matt Cohen Deleted Gideon
  8. teppo

    Correction to this: in the blog post Ryan mentions the wire-prefixed Functions API methods and explains that they have the benefit of being always available regardless of config settings (essentially the same thing that the comments in the FunctionsWireAPI.php file say) – but there is a comment to the blog post in which he mentions that these are actually "for an internal core purpose". @ryan, this might be one of the things that should be clarified somewhere: if wire-versions of the Functions API methods are indeed not intended for public use, it should probably be mentioned somewhere (other than a single comment to the Functions API announcement blog post). If one reads the blog post and doesn't check all the comments, or checks the code / code comments directly (which is a common thing to do in our context), this is currently not obvious.
  9. @Autofahrn @Jan P. Thank you very much for your input. Besides the changes mentioned, did you need any additional rewrite rules in .htaccess?
  10. Hi Team, I am having trouble sorting prices in my foreach loop and am wondering is becasuse my price field is a text field and not a number field. My code is <?php $item_title = $item->title; $items = $pages->find ("template=Listing, limit=15, sort=title"); foreach ($items as $item?> <tr> <td>{item.brand}</td> <td>{item.model}</td> <td> <?php $item_title = $item->title; $store_price = $pages->find ("template=PriceSpy, sort=price, title=$item_title, limit=1") ; foreach ($store_price as $price) :?> {price.price} <?php endforeach ;?> </td> <td> <?php $item_title = $item->title; $store_price = $pages->find ("template=PriceSpy, sort=-price, title=$item_title, limit=1") ; foreach ($store_price as $price) :?> {price.price} <?php endforeach ;?> </td> </tr> <?php endforeach ;?> The offending page is this one: https://www.vapeprices.co.nz/price-guide/. Whereas you can see the Low and High columns are just not making sense I would really appreciate any help.
  11. Yesterday
  12. Upgraded a site and now all admin pages are timing out. The problem seems to be debug mode in combination with using WireCache for around 3,400 items. Confirmed on a fresh install, but would appreciate if anyone could try replicating before I file an issue... In config.php: $config->debug = true; $config->debugTools = array( 'pages', 'api', 'session', 'modules', 'hooks', 'database', 'db', 'timers', 'user', 'input', 'cache', ); Fill the cache with some dummy data: for ($i = 1; $i < 4000; $i++) { $cache->save($i, $i); } Then try and view any admin page. The issue goes away if 'cache' is removed from $config->debugTools , or if the site is downgraded to 3.0.98. Happens with or without Tracy.
  13. I've noticed that both the Reno and UIkit admin themes are responsive when accessing pages, but this doesn't apply to modals. If viewing on a relatively small screen (say iPhone 5), part of the modal is always off-screen. Is there a fully responsive theme anywhere? If not, what would be required to achieve it? Or is this a pipe dream? Thanks.
  14. @kongondo, thank you! New day here and taking another look. I noticed in the code that even though I'm only calling FormBuilder to get the entries, all the FB scripts & css are loading into the <head>. Digging deeper to see if this is causing a conflict. Grateful for your offer to look around the code if I can't resolve it. Will keep you posted. More: Yep, FormBuilder files seem to be the problem. Now to figure out how to use FB in admin area to get the entries without the scripts loading. SOLVED: One of the things my custom function 'formsMultiple' did was render the form and add the output to the final returned array. Works great on the front end but not needed here. Made the form rendering optional in the 'formsMultiple' function and in the RTM code, said don't do it. End result is RTM field and rest of the admin page display as expected. Thanks for the help & pointing me in the right direction.
  15. matjazp

    Hi, Thanks for this module. Nice and organized code! is there an option to disable session lifetime, like set it to 0? The minimal value is 1 due to how you check for 0. I see you are sending ajax requests to location.pathname.substring(1) + "/phcv1" but at least on my localhost location.pathname is /somepage/ so ajax is sent to http://localhost/mypage/mypage//phcv1 Shouldn't you use just location.pathname + "phcv1" ? Counter on the home page isn't working as you are passing an int to ctype_digit() function which expects a string. What I find odd is that ctype_digit(1) returns false while ctype_digit(1054) returns true. I'm not sure if ctype_digit is actually needed. The downside of this script is that sending ajax request put some load to the server itself and at least one findOne(). I'm not sure I like counters on the page list, would prefer table layout somewhere else.
  16. Thanx, @horst, I already tried this and some other hooks but they didn't change anythings. I dont think that the hook is the problem as setting the title works.
  17. @horst That looks interesting as well! Of course with pages it's easier to maintain, and clients can their own options. I usually only use pages for larger structures such as taxonomies, and Selectable Options for simpler display options, since it's a bit faster to set up. Maybe I'll try a "pure" setup with only pages for options next time ^^ Hm, this opens up some possibilities, something like creating setting groups or presets containing multiple other options .. I'll definitely play around with that one
  18. BFD Calendar

    I tried it before and it didn't work. Just now made a new api key and set it everywhere and it seems to work. Of course now anybody can get your api key.... I did restrict the usage in credentials but still.
  19. David Karich

    All right. I'll take a look and check.
  20. adrian

    Hey @Macrura - these sound like very useful additions - I haven't had to deal with multiple domains for the one site just yet, but I can see it coming up for me shortly. I'd love to see this module have a new life. I used to use WireMailSMTP with MailGun, but recently it started having issues with CC'ing so I decided to start using this and it's so much faster using the MailGun API compared with SMTP. I don't suppose you'd like to step up and take on supporting this? I'd like to, but I already have way too many modules. Cheers!
  21. adrian

    PS - you can also do this to get the second page of results. So 400 + 161 shows the total 561 modules currently in the directory. I still think we should be able to get all in one call, but this is still useful to know.
  22. wbmnfktr

    No... not quite, yet. In the module settings I enabled the homepage template (home). First try: The homepage page got a counter badge but counts didn't appear. It stayed and stays at zero. Second try: Tried another template on the homepage but the counter stays at zero. Other pages with that template work as expected.
  23. Macrura

    I also have made some simple customizations to this module that I feel are worth putting into the official version, and for at least 1 site that run this on, these changes are critical for the module to work. If anyone were to take it over, I could submit a pull request, or describe the change/requirement and let the maintainer implement in their interpretation of best practice. for one, you might notice that this module's config provides a field for the 'Domain Name'. However, in my case, the 'from' email may use different domains. My Mailgun account has many domains configured. So instead of the $options array item called CURLOPT_URL using the module's entered domain name, i need it to use the domain from the $mail instance's from/sender. To this end i created a method getDomainName() as follows: private function getDomainName() { return substr(strrchr($this->mail['from'], "@"), 1); } then replace the CURLOPT_URL with CURLOPT_URL => "{$this->apiUrl}" . $this->getDomainName() . "/messages", I guess for this module to be flexible enough going forward, there may need to be an additional setting, where you either enter a domain name in the module config, or you tell the module to 'auto' populate the domain name from the sender domain.
  24. adrian

    BTW, if you try 500, then you'll only get 10 returned. 400 is the highest valid limit. See my revised screenshot in the last post where you can see the 400 items.
  25. wbmnfktr

    <!-- your version now --> <script type='text/javascript' src='https://maps.googleapis.com/maps/api/js'></script> <!-- try this instead --> <script src="https://maps.googleapis.com/maps/api/js?key=YOURAPIKEYHERE"></script> Ok... please try this. That's how it works on my projects.
  26. David Karich

    Do I understand this correctly: A counter is displayed and tracked for your homepage template even though you have not configured the template? Or do you use a template for your homepage which is also used for other pages? Also a quick update: Version 1.2.0 with Sortable selector Version 1.2.0 is now available on the Dev-Branch, which makes it possible to sort the pages by hits. Please check the upgrade for test environments first, because the DB structure will be changed. Previously tracked data will be taken over, a new fieldtype will be installed. Simply replace all files and trigger a module refresh in the PW. Infos and download: https://github.com/FlipZoomMedia/PageHitCounter/tree/dev
  27. BFD Calendar

    Well I'm wrestling with this already for some time and just gave up for a while. I have an api key in the module configuration, I have billing enabled, my credit card is valid,.... no idea what's missing where.
  1. Load more activity
  • From Twitter

    • New post: In this week’s post, we’ll take a look a look at the new website and focus on some parts of it and how they were built. Then we’ll dive into the latest version of ProcessWire on the dev branch, version 3.0.124— processwire.com/blog/posts/pw-…
      11 January 2019
    • New ProcessWire main site rebuild ready for preview— processwire.com/talk/topic/205…
      4 January 2019
    • Happy Holidays! This latest master version of ProcessWire contains hundreds of new additions, fixes, optimizations and more. This post covers all the highlights— processwire.com/blog/posts/pw-…
      21 December 2018