Jump to content

psy

Members
  • Posts

    624
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by psy

  1. Did you update the site/config.php file $config->httpHosts array to include the new domain name? And/or change the root dir in your .htaccess file? Had similar issue today where dev site on same server with same db was moved to new domain name and different site path, eg From: http://999.99.99.99/~myclient dir/ to http://www.myclientsite.com 1/ Make changes to the /site/config.php httpHosts whitelist to add the new domain name: /** * Installer: HTTP Hosts Whitelist * */ $config->httpHosts = array( 'www.mysite.com', 'mysite.com', '999.99.99.99' ); 2/ Make a change to the .htaccess file to update it from the old site root to the new site root: # ----------------------------------------------------------------------------------------------- # 11. OPTIONAL: Set a rewrite base if rewrites aren't working properly on your server. # And if your site directory starts with a "~" you will most likely have to use this. # ----------------------------------------------------------------------------------------------- # RewriteBase / # RewriteBase /pw/ # RewriteBase /~user/ # RewriteBase /~myclient/
  2. Module starting to come together. Will of course give credit to other devs whose module code I've studied and in some cases, unashamedly copied, including @elabx draft OnSignal and nico's MarkupSEO. Ready now to jump
  3. PushAlert4PW WIP.... Some more on the PushAlert REST API. Every sent alert requires a URL and it appears in the notification. Silly me thought that was 'just life'. Didn't realise until I chatted with Alex from PushAlert, that it is in fact the URL to which notification responses are sent. It does not have to be the page, eg an admin page, that sent the push notification. So cool! The URL also appears in the notifications so thinking about hooking into the front end home page URL to capture the json responses and save the data to a different page that connects the sending page with the message id. Onward & upward
  4. Yes, absolutely - same as sending email campaigns directly from the website vs going with an email-sending provider such as CampaignMonitor or MailChimp. This is a key decider for going with a notification-sending provider
  5. Thank you @dragan @PWaddict and @elabx for your detailed and considered opinions. Much appreciated. I investigated all your suggestions and all of you asked why I chose PushAlert. Simple really, it was the first I found some time last year. I searched for others but none of the solutions you presented came up. PushAlert seemed to have the best plans and I've found their tech support to be responsive and helpful. OneSignal appears to be the biggest and has the most fully documented solutions. However, like @elabx, I was uncomfortable with the fact that you had to pay for GDPR security??? The leap from free to US$99/mo for what should be a right not a privilege didn't sit well with me. I guess they make their money from selling the marketing data rather from their sender clients? Ended up going back to PushAlerts and they have a published GDPR Compliance page covering all plans, including free. https://pushalert.co/gdpr On the flip side, you don't get the detailed reporting but then I doubt 99.9% of clients would want it. They want to know how many notifications were sent, how many were successfully received, how many CTA's clicked and how many unsubscribed. All this info is provided by PushAlert while still protecting subscriber confidentiality. Works for me! @elabx would you consider sharing your code with me? Why reinvent the wheel and your ideas are exactly what I'm looking for to adapt to PushAlert. Thanks again
  6. Background I'm creating a module to integrate https://pushalert.co/ into ProcessWire. You actually don't even need a module. You could just use the "Other Websites" javascript provided by PushAlert for basic functionality, ie send a broadcast notification to all subscribers. This is essentially what all the other integrations, including WordPress, do. The WP integration installs a widget with a form enabling the admin to enter details such as title, message, etc from a blog post. It does not: collect any statistics within the CMS about the notification enable audience fine tuning to eg a particular subscriber or subscriber segment within WP. The admin needs to use the PA dashboard for that functionality PushAlert has a javascript and REST API. It's intended that this module will use both. https://pushalert.co/documentation What my module does so far: associate a subscription with a user. FE user clicks a button on the website front end to subscribe and/or agrees to the browser popup to accept notifications from this site send broadcast push alerts from a page within admin It doesn't have a 'widget' but easy enough to create a fieldsetpage with the relevant fields and add that fs page to any appropriate templates, then with a hook, send the notification. Need to be careful that once published/sent, the notification is not automatically re-sent on subsequent page edits. Looking for help/collaboration on how best: to send a notification, eg from a blog post, then track the statistics. Dilemma is that the push notification must come from the admin page. Responses go to the sending page which, as it's an admin page, is restricted and will not accept the https response. This is where the other CMS integrations stop. The only json response from PushAlert is the status, eg 'success', and the notification id. There is no opportunity at this point to capture the sending page id. handle, 'once sent on page publish', do not automatically resend on future page edits Am thinking along the lines that FS Page will have a @kongondo runtime markup field https://modules.processwire.com/modules/fieldtype-runtime-markup/ to pull the stats from PushAlert. Every time an admin visits the page, the stats will update. Once an admin checks the 'Send notification on page publish' checkbox, a hook creates new front end page that records the 'sender page', sends the notification request to PA, which then uses that newly created frontend page, as the response endpoint. Another rook re-associates the front end page with the admin page (eg blog post), to update the stats. Potential use cases: Notify individual and/or users with a particular role of an event, eg "New work opportunity" for job seekers; new blog post published; entries now open, etc... Looking for help/ideas/collaboration on this module. Please let me know if you're interested and as I do, believe this would be a great addition to ProcessWire
  7. @teppo totally agree. It's definitely not the answer to accessibility for the visually impaired. All sites should be readable by screen-readers. It's just another tool in toolbox and a nice addition ?
  8. Found this today: Wild, weird and out there, it's a big bonus to making PW sites more accessible... https://websitevoice.com/ Talk to me ProcessWire ?
  9. @MoritzLost Great tutorial I often use Repeater Matrix field with an added Fieldset Page containing the styling options for that section. FS page means it's easy to add a single field to different templates. Like you, I only give the client what options they need rather than the complete set. In the example below, the HTML theme is Canvas which is based on Bootstrap.
  10. @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.
  11. @kongondo thanks for chipping in ? My function is in a custom module and the code in the RTM field is: $custom = $this->wire('modules')->get('CustomFunctionsTBR'); return $custom->getJobSeekerData ($page); The function in CustomFunctionsTBR is: function getJobSeekerData ($page) { $skills = $this->formMultiple('jobseeker_skills', $page->user_id); $out = ""; $out .= "<h3 class='uk-h3'>Skills</h3>"; foreach ($skills['entries'] as $entry){ $out .= "<div class='uk-width-3-4'>" . $entry['skill_name'] . "</div><div class='uk-width-1-4'>" . $entry['skill_level']. "%</div>"; } return $out; } Where $this->formMultiple function queries the FormBuilder entries for records based on a user id saved (but not displayed) on the page. There are no errors in the dev console. Output from var_dump just prior to returning $out in the CustomFunctionsTBR FormBuilder entry: string(355) "<h3 class='uk-h3'>Skills</h3><div class='uk-width-3-4'>some other skill</div><div class='uk-width-1-4'>65%</div><div class='uk-width-3-4'>talking under water</div><div class='uk-width-1-4'>80%</div><div class='uk-width-3-4'>Yawning</div><div class='uk-width-1-4'>100%</div><div class='uk-width-3-4'>Balloon animals</div><div class='uk-width-1-4'>80%</div>" string(355) "<h3 class='uk-h3'>Skills</h3><div class='uk-width-3-4'>some other skill</div><div class='uk-width-1-4'>65%</div><div class='uk-width-3-4'>talking under water</div><div class='uk-width-1-4'>80%</div><div class='uk-width-3-4'>Yawning</div><div class='uk-width-1-4'>100%</div><div class='uk-width-3-4'>Balloon animals</div><div class='uk-width-1-4'>80%</div>" Seems to be rendering the output twice - have heard of this anomaly happening before, eg in certain repeater matrix situations...??? Or maybe it's late and I'm tired. Any/all suggestions to fix are welcome.
  12. @Chris Bennett thanks, a step in the right direction. Now can output direct HTML and it works fine but still problems when I try to construct the string from my function
  13. @Chris Bennett ummn, not sure... went to PW Modules to get it - version 0.0.2 According to the Modules site & @kongondo's github site, I am. There are a couple of modules that do similar. Please give me the URL to the one you used ? It's important to this site that I can "do stuff" in PHP/PW before outputting the string Thanks
  14. Looking for help on this one. I have a RuntimeMarkup field in a template. When I only return a string with no HTML markup, all is well. See image 1 where the RTM field is "Skills" and it's returning the title of an auto-generated FormBuilder entry with no HTML. When I try to output more info from the FormBuilder entry & format it, the page CSS loses the plot. Not only are the UiKit3 styles ignored, much of the page CSS is broken too - note the Save Edit button and the stacked-rather-than-styled fields above it. RTM CSS file is as default and all that's returned to the field is a valid string. I've even tried returning a valid HTML string with heading & paragraph tags to take FormBuilder out of the equation. The output string is: <div> <h3 class="uk-h3">Skills</h3> <div class="uk-width-3-4">some other skill</div> <div class="uk-width-1-4">65%</div> <div class="uk-width-3-4">talking under water</div> <div class="uk-width-1-4">80%</div> <div class="uk-width-3-4">Yawning</div> <div class="uk-width-1-4">100%</div> <div class="uk-width-3-4">Balloon animals</div><div class="uk-width-1-4">80%</div> </div> Actually doesn't seem to matter what HTML tags or classes I enter, as soon as I do, the page CSS breaks. Believe me, I tried lots! RuntimeMarkup is a @kongondo module Any suggestions on where and how to fix? PS: Text in the summary field comes from https://baconipsum.com/ - I like it spicy!
  15. @kuba2 after copying your files to the new location, did you change the $config->httpHosts array so PW knows were to look for the files?
  16. @kuba2 1. yes 2. yes, after you've uploaded all the PW files to the new domain name folder When the new website URL/domain name is on the same server/web hosting account and has access to the same database, all you need to change is the site/config.php https hosts array to accept the new URL(s). Easy, peasy, lemon squeezy ? PS: either put the new URL(s) at the start of the $config->httpHosts array to give them priority or remove the old ones to prevent PW confusion
  17. Yes, you can duplicate your site on a new domain. There are modules that will help you do this but I'm a bit old school and prefer to do it manually when moving PW sites. Take a copy of the database, either with the ProcessWire module, DatabaseBackups or via PhpMyAdmin and download to your PC Download all your PW files to your PC, especially site/config In your new site, create a MySQL database and make a note of the db credentials Import your database sql file via PhpMyAdmin Upload your files to the new domain Edit your site/config.php file to include the new database credentials and the http hosts to the new domain name Clear your cache, especially ProCache if you use it Should then be all good to go PS: It's important to use your original site/config.php file as it contains the password salt for the original database
  18. @anderson What the amazingly talented PW dev @bernhard said is true, especially the bit about it being different to point-n-click website builders. Keep in mind that ProcessWire offers so much more on so many levels. Whether you want to get into module development or not is up to you. See the showcase for examples: 1. A landing page site of mine that used a number of custom & pro modules, including Repeater Matrix 2. A landing page site from another PW dev that used nothing but core modules
  19. Yes, Bootstrap https://getbootstrap.com/, Zurb Foundation https://foundation.zurb.com/ & UiKit https://getuikit.com/ are good places to start if you're unfamiliar with responsive websites. Actually, even if you are, they can save you a lot coding time. ThemeForest is a good place to start. I often buy a license for Canvas, https://themeforest.net/item/canvas-the-multipurpose-html5-template/9228123 which is based on Bootstrap, then place all the files in site/assets and as mentioned previously, use overrides/changes in site/templates. ProcessWire uses UiKit3 as it's default responsive admin theme
  20. Gotta love ProcessWire... it's so flexible. You can put stuff where it works best for you. I prefer to create a folder for my original HTML theme in site/assets. That way I know it's always going to be clean, then any changes/overrides go in site/templates. Whatever works for you ?
  21. Agree. Search engines also don't like links that aren't descriptive, eg "more" or "read more", etc, for accessibility reasons. Maybe make it italic with "Learn more about ProcessWire"?
  22. Hi @anderson and welcome to ProcessWire In answer to your questions: 1. Short answer is yes, if you have 10 pages of which 2 have the same layout, then you will need 9 templates. HOWEVER, I recommend you read up on "Regions" and delayed output. You can have the _main.php template with all the common elements eg the header and footer, then you only need templates for the bits that are different, eg the page body. Alternatively, you can include files such as header.php and footer.php into each page template file. 2. Yes, Modules - Site (or other tabs on that page) 3. "PageTableExtended" is an Inputfield module. Create a new field and assign it as type PageTableExtended then add it to your template(s) 4. There is a core fieldtype called "Repeater". This is not installed by default. You can install it from Modules - Core. 'Repeater' is a prerequisite of the commercial module, "ProFields" https://processwire.com/store/pro-fields/ which includes a number of fieldtypes including 'Repeater Matrix'. 5. The '/site/assets' folder is automatically created on the web server when you install ProcessWire. It's used by PW for all sorts of stuff and you can add your own files/folders if you wish. Typically you would access it with FTP or similar. It's not visible in admin area by design and a good place to store files you don't want to change
  23. When creating the field, set is as not required. Then after adding it to your Events template, edit it to Required on the template. That will make it a required field for only that template.
  24. https://www.naturesextract.com.au/ Nature's Extract is an Australian manufacturer of water dispersible massage oils whose target market is professional massage clinics and day spas. They've had a BigCommerce web shop for a while. They decided to add a landing page to draw more customers to their online store. The store has the same domain name with .com extension. The landing page has .com.au extension to tweak geo-location oriented searches even though the .com site in Google Web Developers (or Search Console or whatever they call it now) is set to primary location is Australia. It is also hoped the .com.au extension will appeal to the targeted human audience. The client insisted that to reinforce buyer confidence, there should be a focus on the facts that the products are Australian made and that they've been in business for 25+ years. It's a single page site that grew a bit. Modules used: BigCommerce PHP API - pulls product images, descriptions & links from the BigCommerce store via the BC REST API Email Obfuscation ProFields - Repeater Matrix JSON-LD Schema ProCache MarkupSEO MarkupSitemap Database Backups Files Editor Upgrades It also uses PWABuilder code & icon images to make it a Progressive Web App. Google Lighthouse Report results are: Have done all I can think of to make the page pleasing to Google. Now for traffic, backlinks, recommendations, social media, influencers, etc. Almost makes me nostalgic for the days when to be found on the web, you only needed a web page with relevant content, attractive graphics and good page structure...
×
×
  • Create New...