Jump to content

psy

Members
  • Content Count

    419
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by psy

  1. Shouldn't that statement have a == ?
  2. 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
  3. 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.
  4. 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
  5. After your error message, try $this->exit() which halts all further processing, including the save function.
  6. 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); }
  7. Thanks @Zeka, think you're onto something there. I searched but could not find
  8. 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
  9. @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?
  10. 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.
  11. Lots of PW goodness in this one too: https://processwire-recipes.com/
  12. 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?
  13. psy

    SeoMaestro

    Hi @teppo, yes had field named 'seo' of FieldtypeSeoMaestro assigned to a number of templates and publicly viewable pages
  14. 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
  15. 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...
  16. 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!
  17. 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
  18. psy

    SeoMaestro

    Thanks @teppo realised I'd posted in the wrong forum and didn't know how to change it
  19. psy

    SeoMaestro

    1. I'm getting the following error on a number of sites running PW3.0.142+ Failed to generate the XML sitemap Even though the API should have write access to the site root (unless something has changed in .htaccess?). I know others have raised this issue but I cannot figure it out. 2. The module default values do not parse PW vars while per page SeoMaestro fields do, eg in the field default Meta section: literally displays {title} in the browser tab. However if on a page seo override I uncheck the Inherit default value checkbox and enter: on page output, it correctly parses headline (1st priority) or page title (2nd priority) text in the browser tab. Help to fix both issues much appreciated.
  20. All good. Did you know about: $page->images->first and $page->images->last I often use $pages->images->last when client uploads images and wants the last one to display. To get really specific, you can call the image within a Pageimages array by calling the image by its index. Pageimages derives from WireArray which allows you to call an item by its index https://processwire.com/api/ref/wire-array/eq/
  21. @Kiwi Chris not sure I got all that but I had a scenario where what users could see depended on their roles, ie different data sets. I achieved this with RockFinder (now is RockFinder2). Maybe @bernhard can help?
  22. @franciccio-ITALIANO welcome to the forum and ProcessWire. ProcessWire is not a 'cookie-cutter-fill-in-the-blanks' website builder. Quite the opposite. Any and every field, whether generated by the profile you chose in install, or afterwards can do or be whatever you want. It's a mind shift... That's the beauty of ProcessWire. YOU are in control
  23. Untested but may something like: <?php $tags = $page->tags->implode(','); ?> <meta name='keywords' content=<?=$tags>' ?>
  24. @Chris B there are a couple of ways. 1. The most secure... use a hook to add the value to the FB after submit (or whatever hook works for you best). See https://processwire.com/store/form-builder/hooks/ 2. In your template, use the options array to populate the page id into a hidden field that's rendered but not displayed, eg: $forms->embed ('my-form', array('postulate_job' => $page->id));
  25. @cjx2240 yep. LoginRegister & ProcessForgotPassword modules could do with some serious re-work. Especially awkward when the user registers in a browser that's not their default or on a different device
×
×
  • Create New...