Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Pixrael last won the day on April 29 2020

Pixrael had the most liked content!

Profile Information

  • Gender
  • Location
    Florida, USA

Recent Profile Visitors

4,455 profile views

Pixrael's Achievements

Sr. Member

Sr. Member (5/6)



  1. Check: https://processwire.com/api/ref/wire-input/url/
  2. @ryan did you consider https://imperavi.com/ products?
  3. or.. you can use the Shopify Webhooks subscriptions too. For REST AI check here: https://shopify.dev/api/admin-rest/2022-07/resources/webhook
  4. If you plan to export and import pages at some point, ex. development to production. I recommend that you never use page IDs in selectors, or in other places where they acts as hard data. Because (during the import) the ID value of the source can change depending on the availability of the number in the destination, and that can destroy your code logic.
  5. Also you can check this https://processwire.com/modules/process-wire-bootstrap4/ and look at the _func.php file, this was for BS4 but maybe you can adapt it easily to your BS version
  6. try to use $page->viewable() instead of asking for the user role.. and report back to us Note: if you want the logged user to only be able to check his own profile, you must add this check also, comparing the ID from the urlSegment with the ID of the current user
  7. @ryan a possible solution for future enhancements to MarkupRegions is that only comments starting with <!--# are the ones that will be removed in the process and the original html comments will be kept. @gebeer you can try to make that modification in your copy of the code.
  8. You can also create a new template (ex. api) with just the title field. Create the template file (ex. api.php) and publish a page on your site without access restriction (ex. domain.com/api) and that's it. In your template file (which is your entry point) you can use: $input->post(), $input->get() or urlSegments to get the request data, and then you can include files, or execute functions or whatever you want. Finally you print everything in JSON format, or in html format if you want to use htmx. Piece a cake! ?
  9. I did something similar in a project, using this library: https://github.com/Rct567/DomQuery to manipulate the content of the SVG file (it's basically XML), using file_get_contents (from file), and then modifying texts, assigning/removing css classes, hiding/removing elements, etc. In this particular case, I ended rendering the modified SVG to PNG using Imagick for the final output (delivered by AJAX). The SVG document must be prepared in advance for that. Using the proper IDs and classes. Visual styles were applied by CSS classes and not directly on elements, in order to manipulate them. Modifications were not interactive, they were captured with a form.
  10. I think in pages that need this paragraph changes you can use different fields for each region, and render the field according to the current region. Ex. body_america, body_europe, etc. You can create a function that determines to which region it belongs according to the country. If you have a license for ProFields you can use Textareas field type to handle that more easily. Pseudo code: $http = new WireHttp(); $country = $http->getJson("http://ip-api.com/json/{$session->getIP()}?fields=countryCode"); $region = getRegion($country); echo $page->body_$region; function getRegion($country) { // Set a default $output (europe) // Using an in_array, switch, etc. find the current related region to override it (america, asia, africa, etc.) return $output; }
  11. hum.. looks like the second call uses POST too: secondAJAXXHR.open('POST', '', true); do you fill the $action variable in the "some logic" code? // some logic $response['action'] = $action; if not, will be empty for a GET request
  12. class Test extends \Wireframe\Controller { public $var; ...... etc } maybe?
  13. Not really, but what I wanted is to help you to have material, to review, because it's difficult to have an idea of future needs ahead of time. You could discard the ones that don't make sense of course
  14. @bernhard check this custom filters for PW, maybe you wan to add this to your module: https://github.com/rolandtoth/TemplateLatteReplace/wiki/Additional-filters
  15. That template engine is great, in my beginnings with Processwire I was testing with this excellent module developed by @tpr it's very complete, with many additions and filters to extend it. But I finally ended up using Markup Regions when it came out around the same time. I wasn't that ready yet for that "advanced" PHP. I'll keep an eye on your module, maybe I'll try again with Latte ?
  • Create New...