psy

Members
  • Content count

    230
  • Joined

  • Last visited

  • Days Won

    2

psy last won the day on August 9 2017

psy had the most liked content!

Community Reputation

386 Excellent

1 Follower

About psy

  • Rank
    Sr. Member

Contact Methods

  • Website URL
    http://www.clipmagic.com.au

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

2,433 profile views
  1. Yep, not much activity in this forum so as a new Padloper user, thought I'd share my feedback on this module here, originally posted in the Padloper forum:
  2. psy

    @Tom re ecommerce stuff...I've used WooCommerce and come out blue, battered & beaten at the other end. I've also integrated the BigCommerce API with PW. Am now working on site with the PW premium module Padloper. IMHO: WooCommerce is horrible on every level BigCommerce and any other SAAS platform, eg Shopify, are easy enough to integrate into PW and while they dont always have the perfect workflow solution, suit bigger shops Premium ecommerce PW module Padloper is raw, pure PW, takes a bit of getting used to and is great for smaller shops
  3. @PCuser not sure if it's related but I've often had similar errors when copy/pasting sample code from the PW docs/forums. Maybe it picks up some 'invisible' extra code or spaces? Now I copy/paste to a plain text editor first before adding to my template - same as I'd do for MS Word - and it seems to fix the problem
  4. psy

    @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
  5. @darrenc Yes 'pw-remove' works. Maybe it's about being consistent? Try using the <region> tag for all rather than mix-n-matching <region> & <div> Instead of using <div id="sidebar"></div> use <region id="regSidebar"> <div id="Sidebar">xxx</div> </region><!--regSidebar--> Then in your template where you don't want to display the sidebar, simply put <region id="regSidebar"></region> This has always worked for me and helps me keep track of the regions. Many roads up the mountain
  6. @kongondo I purchased Padloper last week and would like access to the subforum too please
  7. psy

    Yes @pwired have heard all the arguments. The thing that annoys me most of all is Google. Google sprouts the importance of clean code, speed, well formed HTML, blah blah blah. My PW sites deliver and yet WP sites that fail with unrecoverable HTML errors, are barely responsive, have yawningly slow load times still rate in SERP pages. How does that work?
  8. Rather than saving the entire page when you're updating the 'mark' field, try 'setAndSave'. This will save only the nominated field and not trigger another page save event. https://processwire.com/api/ref/page/set-and-save/
  9. psy

    Quick update... my site already had a service worker registration file, PWABuilder. Each site can only have one service worker registration. With PushAlert's help, I managed to overcome this issue. Their software dictates that they register the service worker with a predefined file name, sw.js. Politely suggested they rethink this approach as other sites will have their own service worker registration files and who knows what problems may ensue if all vendors insist on their app registering the service worker? Awaiting outcome of that recommendation. Next, using the PushAlert cURL code, got notifications working on FF & Chrome. Haven't ventured into Safari territory yet as it involves a whole lot of baloney with Apple certificates. Sending notifications works well providing you don't mind getting double notifications when PWABuilder is installed with page cache/offline configured. Sigh... Plan is to continue development of PW integration with PushAlerts and, until service worker fluff is resolved, offer clients either push notification OR offline/fast page load. Will also do best to make calls to PushAlerts using WireHttp instead of their cURL code. Stay tuned!
  10. psy

    Thanks for the replies and all food for thought. Just to get things going, I've used the PushAlert's CURL code for now in the module and it's working fine. Will experiment more with WireHTTP later. Cheers
  11. psy

    Thanks @arjen I tried that with Postman and it didn't work. Suspect I had the right idea and wrong execution
  12. This may be a question for @ryan but will ask here as it relates to module development. I've begun development on a module to integrate PushAlert (https://pushalert.co/) with ProcessWire. Had a few hiccoughs along the way due mainly to the fact that my website already had a service worker. PushAlert support has been fabulous and I can now send push notifications from my PW website via their console and still use my own service worker code for offline cache. There are two PushAlert APIs - JS API and a REST API. Both are needed for my module and it's a WIP. Plan is when a visitor 'Allows' notifications from my site, the PA javascript API will capture the subscription ID and store it in a PW field on the user template. That bit is still to be written. First step is to send a push notification via the PushAlert REST API to all subscribers. PushAlert doesn't have a PHP library in GitHub but its doco does have examples, eg to send a broadcast notification to all subscribers: <?php $title = "Notification Title"; $message = "Notification Message"; $icon = "https://yourwebsite.com/icon.png"; $url = "https://yourwebsite.com/"; $apiKey = "YOUR_API_KEY"; $curlUrl = "https://api.pushalert.co/rest/v1/send"; //POST variables $post_vars = array( "icon" => $icon, "title" => $title, "message" => $message, "url" => $url, ); $headers = Array(); $headers[] = "Authorization: api_key=".$apiKey; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $curlUrl); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_vars)); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($ch); $output = json_decode($result, true); if($output["success"]) { echo $output["id"]; //Sent Notification ID } else { //Others like bad request } ?> To send to an individual subscriber or nominated subscribers uses the same code with a few extra items in the $options array. The module config will store the API Key and the base API URL. The functions will allow the developer to enter the appropriate slugs, eg 'send'. All good so far... I could use their recommended CURL stuff but would rather use WireHttp. Questions are: Is it possible to convert the above CURL stuff into a WireHttp post and if so, how, especially how to code the custom headers? I saw in the WireHttp class that the 'sendCURL' function was commented out with: /** * Send using CURL (coming soon) * * @param string $url * @param string $method * @param array $options * @return bool|string * protected function sendCURL($url, $method = 'POST', $options = array()) { 3. If not (1), then when is 'soon'? All help welcome. psy
  13. psy

    Heads up for any PW developers who use parallax images on the front end of their sites. Chrome v67 has introduced a bug - grrrrr. A quick search found the solution for me: https://productforums.google.com/forum/#!topic/chrome/DC4IFvGXdIA;context-place=topicsearchin/chrome/category$3Awindows-10%7Csort:relevance%7Cspell:false In your CSS: /* google chrome 67 parallax bug fix */ .parallax { transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); }
  14. @neophron If I read your original post correctly, you want to target each subpage individually for CSS styling, eg background colour, after it's rendered on the home page. If so, then I would add a class of the page name and/or template name and/or page id to the subpage template, eg: // Sub page template <div id="p<?=$page->id?>" class="<?=$page->name?> <?=$page->template?>"> // Your field output stuff here... </div> This ensures each home page section has unique style classes and ids to target. Then use your first method to render the subpages on the home page, ie: <?php foreach($page->children() as $p){ echo $p->render(); // will render the above } ?> Your CSS would then look something like: .subpage-1 {background-color: blue;} .subpage-2 {background-color: red;} .subpage-3 {background-color: green;}