Jump to content

psy

Members
  • Posts

    654
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by psy

  1. Hi @Jozsef The module defines a special fieldtype of FieldtypePushAlert - this generates the message title, content etc sub-fields in the template for the push notification. It's used in various ways under the hood to send and gather/display stats about the notification. So, no, you can't use the existing title, headline, summary fields with this module.
  2. I used Canvas HTML theme which overlaid Bootstrap then added my own customisations which often overrode the Canvas theme CSS which overrode Bootstrap. The code bloat was stupid. Going back to pure SCSS/CSS with smarter use of CSS Grid, Flex & media queries. Can now place things where I want depending on screen size/device without unnecessary HTML for purely structural purposes, eg floated divs etc and much less CSS download. The page file size difference is incredible. Also trying to wean self off jQuery. That may take a little longer especially as PW is so dependent on it.
  3. [SOLVED] I've used this module in the past and it's been great but now I'm having problems. Scenario Page to output as PDF is different to current page so included link in the template as per instructions Created template in pages2pdf/ templates dir with same name as page template Configured module to use header & footer Set Cache time to 1 to minimise caching while testing Configured Creation Mode to "On click..." as there is no need to store the PDF's on the server All good so far. Just needed to tweak the topMargin to that the header didn't overlap the main content. That's where I got into trouble. To eliminate any caching issues, I change $config->debug to true and this was the result: It went on with a lot of garbage and nothing was downloaded. Switched $config->debug back to false and at least got the download happening. I need to increase the size of the header so it doesn't overlap the main content. Read the doco and tried to implement the recommendations in every place possible without success. Question: How do I change the top margin without hacking the default "30" in the module? Using PW v3.0.148 and Pages2PDF v1.1.7 Solution: WirePDF requires the pdf to be saved in order to apply any config changes such as the top margin.
  4. @prestoav I needed something similar however I did not want to give the front end users all the features available in the PW CKEditor menu. It was more difficult for me to reduce the feature set than start afresh for the front end and I chose TinyMCE over CKEditor. In the form, I created a textarea field with no textformatters and a limit of 5000 characters. In my template: <script src="<?=$config->urls->templates?>scripts/tinymce/tinymce.min.js"></script> <script> // NoMinify tinymce.init({ selector: '#Inputfield_introduction', height: 300, menubar: false, plugins: [ 'advlist autolink lists link image charmap print preview anchor', 'searchreplace visualblocks code fullscreen', 'insertdatetime media table paste code help wordcount' ], toolbar: 'undo redo | formatselect | bold italic backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help', setup: function(ed) { var maxlength = parseInt($("#" + (ed.id)).attr("maxlength")); var count = 0; ed.on("keydown", function (e) { count++; if (count > maxlength) { alert("You have reached the character limit"); e.stopPropagation(); return false; } }) } }); </script> And the end result on the front end: Data is saved correctly in the DB and all good. PS: If anyone tries to add in a sneaky <script>, it throws 403 Forbidden error
  5. psy

    ProcessWire on the web

    Another thing I love about PW is the friendly, supportive forum. I certainly don't want to be accused of trolling the guy. He put his opinion out there based on his experiences, as is his right. Should he venture here though, I'd be more than happy to help him with his PW site
  6. psy

    ProcessWire on the web

    https://dougmcarthur.net/
  7. psy

    ProcessWire on the web

    "You can't fix 'stupid'" is an old saying. Sure PW is not for everyone and as the guy said, "Great for developers (I assume), pretty bad for everyone else". What got up my nose was he presents himself as a web developer/designer/guru and his own site is technically bad. Done well, PW is great for everyone. I suspect where he got lost was "assuming" that PW was a load the app, apply a FE theme, bung in a few plugins, squeeze your content to fit the theme and away you go. The thing I love most about PW is the exact opposite. I have complete freedom to build my sites, backend, frontend & user-friendliness
  8. psy

    ProcessWire on the web

    After looking at his site, my guess is "You can't fix 'stupid'"
  9. I usually do a combination of both - separate 'Business Info' page that stores stuff like logo versions, etc and a functional field that stores common text phrases. All editable by admin on that page and (I believe as don't use it), editable for multi-lang sites. Even go so far sometimes to make the page a link in the admin main menu, with or without a custom module
  10. Hi @3fingers, thank you. As mentioned, it's not an out-of-the-box solution. Read the Dropbox API doco. Maybe: Dropbox app/yourclientfolder/subfolder-by-pw-user ? Or, List files in the Dropbox folder as checkbox options in the client's private page admin area- tick for each needed by user? Or, As you mentioned, copy/paste links in a repeater on the client's page There are lots of options. Think of these API's as toolboxes that allow you to create the scenario that suits your client's requirements.
  11. Definitely NOT an out-of-the-box solution to your specific requirement but there is this module which may be a good starting point: It acts as a wrapper for the Dropbox API, giving you access to Dropbox features such as uploading to folder(s), user access, etc in conjunction with @benbyf's https://github.com/benbyford/InputfieldDropbox
  12. After your error message, try $this->exit() which halts all further processing, including the save function.
  13. Solved! Thanks @Zeka Solution: <?php // in my auto-loaded custom module public function init() { $this->addHookAfter('ProcessPageView::pageNotFound', $this, "unpublishedProfile"); } public function unpublishedProfile (HookEvent $event) { $page = $event->arguments(0); if ($page->isUnpublished() && $page->template == 'profile') $this->wire('session')->redirect($this->wire('pages')->get(1312)->url); }
  14. Thanks @Zeka, think you're onto something there. I searched but could not find
  15. For pages with a particular template, I would like them to display/redirect to a different page from the normal http404 page when status is unpublished. Can't figure out what to hook and where. Un-working code is: <?php // in my auto-loaded custom module public function init() { // this hook doesn't catch... returns the normal http404 page for unpublished template=profile pages $this->addHookBefore('Page("template=profile")::loaded', $this, "unpublishedProfile"); } public function unpublishedProfile (HookEvent $event) { $page = $event->arguments(0); if ($page->isUnpublished()) $this->wire('session')->redirect($this->wire('pages')->get(1312)->url); } Also tried to hook After page loaded with same result, ie default Page Not Found shown. Help & suggestions to fix much appreciated. Cheers psy
  16. @rick Rather than use the problematic PW front-end image uploads, I went for uppy and with @Robin S' amazing help, got it working. Tus/Uppy has a nice drag-n-drop user interface, overcomes file size limits, allows for resumable uploads + more. In Robin's example, he saves the images to a new page. In my case, I prepended the page id and an underscore to the filename in the Uppy js code. Then, in the uppy server page code, identify the required page by exploding the filename on the underscore. Maybe time to get a new horse?
  17. Great addition to FB, thanks @BitPoet Small problem when using FB40a with PW3.0.145 to remember form entries in a cookie. On revisiting the form displays the number of rows I've added but they're empty of data.
  18. Lots of PW goodness in this one too: https://processwire-recipes.com/
  19. psy

    SeoMaestro

    Thanks again @teppo. I tried a few things with my limited knowledge of Apache including changing root dir privileges to 777 (scary I know!) for testing purposes to see if the error message was correct. Didn't change anything so switched the root dir privileges back to PW preferred settings. Obviously something is amiss and fairly certain it's not that SeoMaestro cannot create the file. I even saved a dummy sitemap.xml file (updated module prefs to same file name) in the root dir and still no luck. I've used this module before with success on other sites with earlier PW versions. Problem reared its head with PW1.0.142+. Wondering if maybe latest .htaccess or other is affecting things? @Wanze?
  20. psy

    SeoMaestro

    Hi @teppo, yes had field named 'seo' of FieldtypeSeoMaestro assigned to a number of templates and publicly viewable pages
  21. psy

    SeoMaestro

    Problem didn't go away for me. It still exists and no solution found. Turned off sitemap.xml generation to lose the error message. Still hoping for a fix
  22. Thanks @dragan will give it a try. Another idea I had was to use FormBuilder for the login form - again hackish. Really wish PW had a solid Login/Register module...
  23. psy

    Personal Website

    Nice ? home page nav was a bit confusing for me, eg when clicking on 'About', it scrolled to your About section but the menu disappeared. There was no obvious way to get back to the top of the page. When I scrolled up, the menu had disappeared. Using iMAC with wide screen. Going into phone mode in Chrome dev tools made it a bit easier... Otherwise, well done you!
  24. I want to have both a login form and a registration form on the same page. After much tweaking in CSS & Hooks, I managed to get @ryan's LoginRegister module to display as required. All goes well until it doesn't, ie if there is an error in the form submission. Each form has the wrapper ID hardcoded to "LoginRegister". Problem is when both forms are on the same page, both forms get the error messages and the Login form turns into a Register form. See attached before-and-after images and my code is in the 'spoiler'. Help to fix much appreciated
×
×
  • Create New...