Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/23/2020 in all areas

  1. Needed a really simple solution to embed audio files within page content and couldn't find a module for that, so here we go. Textformatter Audio Embed works a bit like Textformatter Video Embed, converting this: <p>https://www.domain.tld/path/to/file.mp3</p> Into this: <audio controls class="TextformatterAudioEmbed"> <source src="https://www.domain.tld/path/to/file.mp3" type="audio/mpeg"> </audio> The audio element has pretty good browser support, so quite often this should be enough to get things rolling ? GitHub repository: https://github.com/teppokoivula/TextformatterAudioEmbed Modules directory: https://modules.processwire.com/modules/textformatter-audio-embed/
    8 points
  2. Are you sure that it outputs plain text? Maybe it is html entity encoded by a defined Text Formatter in your field. You can check this under Fields > NameOfYourField > Details the first point is "Text Formatter". If there is something selected like HTML entity encoder, htmlspecialchars, then remove it and try again, (after a browser cache flush).
    3 points
  3. Think the issue may be in this line - no $ in front of id. Try: <?php if (!empty($input->get->id) // PW way of accessing $_GET $id = $sanitizer->int($input->get->id); // Clean it up to ensure it's an integer $alertspage = $pages->get($id); // You can also do $pages->get("id=$id") if (!$alertspage instance of NullPage) { // ensure the page exists echo $alertspage->title; } else { echo "There was a problem retrieving the page with ID $id"; }
    3 points
  4. Hello friends! I have another module for you, which will make your daily work as a Processwire developer easier. Introducing: AppApi This module helps you to create api-endpoints, to which an app or an external service can connect to. Features Simple routing definition Authentication - Three different authentication-mechanisms are ready to use. Access-management via UI Multiple different applications with unique access-rights and authentication-mechanisms can be defined The documentation has become quite extensive, so have a look at the Github repository for details: Installation Defining Applications Api-Keys PHP-Session (Recommended for on-site usage) Single JWT (Recommended for external server-calls) Double JWT (Recommended for apps) Creating Endpoints Output Formatting Error Handling Example: Listing Users Example: Universal Twack Api Routes Page Handlers File Handlers A special thanks goes to Thomas Aull , whose module RestApi was the starting point to this project. This module is not meant to replace this module because it does a great job. But if you want to connect and manage multiple apps or need other authentication methods, this module might help you. I am already very curious about your feedback and would be glad if the module helps you a little bit.
    2 points
  5. localtunnel and ngrok work great in this type of scenario. They expose a public URL that proxies requests to your local dev server so external services like Snipcart get access to it.
    2 points
  6. @michelangelo I don't think you can test an integration like this on localhost as it is not publicly available. Snipcart validates your products by reading the values from your website but in this case they try to connect to localhost. I'd advise you to setup a staging server somewhere, maybe on a subdomain and it should work.
    2 points
  7. Personally I think it's best not to let editors choose font family or font size at all, lest your website ends up looking like a dog's breakfast. But to answer your question, you can use the Custom Config Options in the field settings: https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-font_names https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-fontSize_sizes
    2 points
  8. SnipWire - Snipcart integration for ProcessWire Snipcart is a powerful 3rd party, developer-first HTML/JavaScript shopping cart platform. SnipWire is the missing link between Snipcart and the content management framework ProcessWire. With SnipWire, you can quickly turn any ProcessWire site into a Snipcart online shop. The SnipWire plugin helps you to get your store up and running in no time. Detailed knowledge of the Snipcart system is not required. SnipWire is free and open source licensed under Mozilla Public License 2.0! A lot of work and effort has gone into development. It would be nice if you could donate an amount to support further development: Status update links (inside this thread) for SnipWire development 2020-07-03 -- SnipWire 0.8.7 (beta) released! Fixes some small bugs and adds an indicator for TEST mode 2020-04-06 -- SnipWire 0.8.6 (beta) released! Adds support for Snipcart subscriptions and also fixes some problems 2020-03-21 -- SnipWire 0.8.5 (beta) released! Improves SnipWires webhooks interface and provides some other fixes and additions 2020-03-03 -- SnipWire 0.8.4 (beta) released! Improves compatibility for Windows based Systems. 2020-03-01 -- SnipWire 0.8.3 (beta) released! The installation and uninstallation process has been heavily revised. 2020-02-08 -- SnipWire 0.8.2 (beta) released! Added a feature to change the cart and catalogue currency by GET, POST or SESSION param 2020-02-03 -- SnipWire 0.8.1 (beta) released! All custom classes moved into their own namespaces. 2020-02-01 -- SnipWire is now available via ProcessWire's module directory! 2020-01-30 -- SnipWire 0.8.0 (beta) first public release! (module just submitted to the PW modules directory) 2020-01-28 -- added Custom Order Fields feature (first SnipWire release version is near!) 2020-01-21 -- Snipcart v3 - when will the new cart system be implemented? 2020-01-19 -- integrated taxes provider finished (+ very flexible shipping taxes handling) 2020-01-14 -- new date range picker, discount editor, order notifiactions, order statuses, and more ... 2019-11-15 -- orders filter, order details, download + resend invoices, refunds 2019-10-18 -- list filters, REST API improvements, new docs platform, and more ... 2019-08-08 -- dashboard interface, currency selector, managing Orders, Customers and Products, Added a WireTabs, refinded caching behavior 2019-06-15 -- taxes provider, shop templates update, multiCURL implementation, and more ... 2019-06-02 -- FieldtypeSnipWireTaxSelector 2019-05-25 -- SnipWire will be free and open source Plugin Key Features Fast and simple store setup Full integration of the Snipcart dashboard into the ProcessWire backend (no need to leave the ProcessWire admin area) Browse and manage orders, customers, discounts, abandoned carts, and more Multi currency support Custom order and cart fields Process refunds and send customer notifications from within the ProcessWire backend Process Abandoned Carts + sending messages to customers from within the ProcessWire backend Complete Snipcart webhooks integration (all events are hookable via ProcessWire hooks) Integrated taxes provider (which is more flexible then Snipcart own provider) Useful Links SnipWire in PW modules directory SnipWire Docs (please note that the documentation is a work in progress) SnipWire @GitHub (feature requests and suggestions for improvement are welcome - I also accept pull requests) Snipcart Website ---- INITIAL POST FROM 2019-05-25 ----
    1 point
  9. Namespace issue?? Try adding namespace ProcessWire at the very top
    1 point
  10. The products from your product pages will be added to the Snipcart dashboard when you save a product page within ProcessWire. But this will only work if your site is reachable from web. So within a MAMP system it doesn't work unless you provide a way to redirect requests to your internal MAMP server.
    1 point
  11. You don't need to fiddle with the ports really. Pass ngrok your local origin (localhost:8888) and then it returns an https domain without a port, i.e. on port 80. Paste that portless domain into Snipcart. That should do it. If it doesn't, it might be a problem with how you declare your product data.
    1 point
  12. 1 point
  13. Good grief! I knew I shouldn't have been working on this at night! How did I miss that? Thanks for your help.
    1 point
  14. hello @bernhard Thanks a lot for this dreamy, powerful and simple migrations module ? It's great and I begun to use it with succes ! I have however one problem ? : I created a module and I use the auto-update system from RockMigrations (0.0.1.php). All is OK with the install and the uninstall. I create a 0.0.2.php and update the version of the module ('version' => '0.0.2'). But when I refresh modules from Processwire, my module update in 0.0.2, but no RockMigrations is executed. When I debug it with Tracy Debuger, I have many errors like this : array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead on line: 171 in /var/www/html/wire/core/WireData.php and another error like this one Maximum function nesting level of '256' reached, aborting! on line: 1733 in /var/www/html/wire/core/Wire.php Any idea to resolve it ? I tried to increase the maximum function nesting level, but it's the same... ? Thanks for your help
    1 point
  15. Ah, you are talking of the secondary languages path name. So, as it is the Homepage, what resides in the root, you previously have set it and now have to change it in the homepage under Settings Tab > Name:
    1 point
  16. The ImportPagesCSV module does not include a permission in the getModuleInfo() method, so you would need to edit the module file to add one. Bear in mind that this would be overwritten if you later update the module. public static function getModuleInfo() { return array( 'title' => 'Import Pages from CSV', 'version' => 106, 'summary' => 'Import CSV files to create ProcessWire pages.', 'singular' => true, 'autoload' => false, 'permission' => 'import-csv', ); } Refresh the module cache, create custom permission 'import-csv' and give that permission to any role that is allowed to use the module.
    1 point
  17. Sorry If i was a bit confusing earlier. What I was trying to do was create one form, where the "send to" could be changed dynamically (as this will be used on seperate pages). I got the form set up with one small issue. I cant seem to figure out to "echo" the email address into the email: <?php include("./head.inc"); echo $page->body; $sent = false; $error = ''; $emailTo = 'email@gmail.com'; // or pull from PW page field // sanitize form values or create empty $form = array( 'fullname' => $sanitizer->text($input->post->fullname), 'email' => $sanitizer->email($input->post->email), 'comments' => $sanitizer->textarea($input->post->comments), ); // check if the form was submitted if($input->post->submit) { // determine if any fields were ommitted or didn't validate foreach($form as $key => $value) { if(empty($value)) $error = "<p class='error'>Please check that you have completed all fields.</p>"; } // if no errors, email the form results if(!$error) { $msg = "Full name: $form[fullname]\n" . "Email: $form[email]\n" . "Comments: $form[comments]"; mail($emailTo, "Contact Form", $msg, "From: $form[email]"); // populate body with success message, or pull it from another PW field echo "<h2>Thank you, your message has been sent.</h2>"; $sent = true; } } if(!$sent) { // sanitize values for placement in markup foreach($form as $key => $value) { $form[$key] = htmlentities($value, ENT_QUOTES, "UTF-8"); } // append form to body copy echo <<< _OUT $error <form action="./" method="post"> <fieldset> <p> <label for="fullname">Your Name</label><br /> <input style="width:300px;" type="text" id="fullname" name="fullname" value="$form[fullname]" /> </p> <p> <label for="email">Your Email</label><br /> <input style="width:300px;" type="email" name="email" id="email" value="$form[email]" /> </p> <p> <label for="comments">Comments</label><br /> <textarea style="width:300px;" id="comments" name="comments" rows="6">$form[comments]</textarea> </p> <p><input type="submit" name="submit" value="Submit" /></p> </fieldset> </form> _OUT; } // include site's footer include("./foot.inc"); The way my install is set up: I have multiple copies of the same page, all with a different header called (header_select). Header_select contains the field "contactAddress". I need to get the contactAddress (based upon which header is chosen for that given page), and then pass that to the $emailTo field.
    1 point
×
×
  • Create New...