Jump to content

NikNak

Members
  • Posts

    79
  • Joined

  • Last visited

Everything posted by NikNak

  1. Just tested this and it solves the issue completely. I just set it to work on 'Event' templates and use /{$page->id}/ for the id format and it does the trick. Thanks so much Adrian.
  2. Thanks so much for the steer Adrian. I'll check that out - fingers crossed I will be able to work up a solution with this. All the best Nik
  3. Hi there I have a an events section using urls such as: /events/1234/text-generated-from-headline where 1234 is the page id of the event and 'text-generated-from-headline' is a url-segment for SEO purposes only Once an event is passed, it is automatically moved to: /events/past-events/1234/text-generated-from-headline I did this so that the event could always be found using the page id, regardless of the extra url segment text which sometimes makes for a long and ugly url, and the likelihood of the event title being updated, without the user changing the page 'name' correspondingly. The problem I've found now, is that anyone with a 'current' URL for an event that has now passed, is getting a 404 error, because page path history cannot follow the correct path, unless the url segment is removed. ie '/events/1234/' will redirect to '/events/past-events/1234/' but '/events/1234/blah' will not redirect to '/events/past-events/1234/blah' My question is whether there is a way to intercept the Page Not Found, run a routine to test if the URL looks like an event, and remove the url segments and redirect again. I've tried something akin to $wire()->addHook('ProcessPageView::pageNotFound', null, 'RedirectEvent') but its not getting me anywhere. I could always add code to the 404 page template, but this would mean two re-directs being performed, which I guess would be bad for SEO. Many thanks Nik
  4. Hi again. In case anyone is wondering... this module doesn't currently work with the new image field upgrade in 3.0.17 :-( As Ryan points out here https://processwire.com/blog/posts/major-images-field-upgrade Many thanks Nik
  5. Many thanks... Well the old version works just fine... and not pre-defining output sizes but regions of interest gives a lot more flexibility than the other options (imho). I'll be v careful to test any future upgrade. Thanks for your help Nik
  6. Hi again... I am about to go live with a website using your module - but not the dev version that has the schema changes. I'm happy with the way it is currently working, but wanted to understand what is better in the dev version. It isn't a simple upgrade if all your previous crops are lost when you uninstall the old module. If I were to upgrade, I guess I would have to find a way to save the crop data first, then re-import it after the new installation - assuming the data is in the same format. Can you cast any light on this. Thanks again Regards Nik
  7. Hi Teppo - thanks for the great module In my setup for a site with membership - I set member user 'names' (not admins) with a numerical value to match their unique membership id for the organisation (not set within pw). Your module however logs users with a numerical 'name' as nonexistant, stores their $user->id as 0 and logs the login as a failure when it has been successful Kind regards Nik
  8. Ahhh - thanks Soma for shedding light on this. Not a bug at all - just the way things are. I think perhaps the answer for me is to convert dashes to underscores in the API - or simpler - to tell the customer not to use the hyphens. Thanks so much Kind regards Nik
  9. Thanks Soma Agreed - that returns the pages. But the same pages would be returned for ->find("images.tags%=sport") and ->find("images.tags%=port-1") So I cannot be certain that the pages returned contain exactly the search term requested - only a 'like' search. In my particular case this could mean pulling in the wrong logo for a company. Currently I'm looking at telling a customer to not use hyphens - but it feels like the wrong answer. Kind regards Nik
  10. Hi Horst and Soma Is this something I should report as a bug? I can't see it mentioned that hyphens can't be used in tags. Kind regards Nik
  11. Thanks interrobang I have to say that for my needs, this method of controlling image cropping is the most useful and flexible I have come across. Keep up the good work. Regards Nik
  12. Thanks horst Yes - that returns the page - but it also returns the page for ->find("images.tags%=sport") and ->find("images.tags%=port-1") - which in my case stops it being of any use. Kind regards Nik Hi Soma $pages->find("images.tags~='sport-1'") doesn't return anything either. Regards Nik
  13. Hi again I've noticed a couple of further small glitches to your most helpful module. Transparent PNG's are flattened (with black replacing transparent areas). When no focus area is set, then pngs are output correctly. When I try to use a standard $image->size($x,$y,array('cropping'=>'false')), without this module this used to return an uncropped image that fitted within the area $x, $y. However, this now returns a cropped image under some circumstances. This is even happening on images that have no focus area set. Many thanks Nik
  14. Hi Many of my image tags are hypehenated - which is currently causing problems finding them using the API. For example - say I have an image with tags 'sport-1', using the example provided on the pw site but adding a hyphen to the tag: // Find pages containing an image with at least tag: sport-1 // This will match "sport" but not "sports". $mypages = $pages->find("images.tags~=sport-1"); This doesn't return the page. $mypages = $pages->find("images.tags=sport-1"); does return the page. But if the image has multiple tags 'sport-1 green' for example - you cannot use just the = operator to find the image So - my question is, how do I find the image with tag 'sport-1' when the image I'm looking for has tags 'sport 1 green'; Many thanks Nik
  15. Hi interrobang This is great stuff - really appreciated and I am certain I will use this. One thing: I've just downloaded v 0.4 but the Grid Mode still doesn't work for me. Many thanks Nik
  16. Hi Ryan I have a series of fields that I wanted to only show to superusers. I used this module to set access to a fieldsetTab group and lo and behold - the tab and all its contents were hidden from other users. However, as I added other tabs, this behaviour stopped working - I think some glitch had made it work originally. Might it be an idea to enable this behaviour - ie a protected fieldsetTab or fieldset also protects any fields it contains. Just a thought - it would make things cleaner in the admin interface. This is obviously v v low priority. Thanks again Ryan. Many thanks Nik
  17. H MindFull Using the supplied 'lite' api from aMember is fine for getting login details into PW. My main ambition was to be able to get the site html and nav to wrap the aMember output, from the PW site into aMember templates without having to resort to a static html copy. The 'include' had been called using the absolute server path. I echoed the calculated path to make sure it was calling the right file. I have tried with htaccess disabled (removing the .htaccess and changing the method within aMember). Perhaps I need to try on a real server rather than MAMP. TBH at the moment, I think I need to really check whether aMember can do the other things I need. It doesn't seem to have logic for only offering a certain product to people in a certain group - ie for student discounts. The only logic available is to restrict the product based on a current product the user has. Back to their helpdesk! Thanks so much for the help and encouragement.
  18. Thanks Mindfull So, I wrote to aMember tech support saying: - PW has an API that can be bootstrapped from other scripts - The Server Error wasn't generating any logs - I don't want to use static html as an alternative Their response this morning: - PW is not developed to to be included from external scripts - Look at your server logs - You should use static html !!!!!!! With help like this - I think getting this to work in tandem with PW is looking very unlikely. I think what I can offer my client here may end up half baked and ugly with aMember being more of a standalone bolt-on. Regards Nik
  19. Thanks Mindfull Thanks - they say in their wiki that your scripts should ideally be put in a certain php file at the top level. However, this file doesn't seem to be called from aMember as far as I can tell. I tried it, and even just put an echo statement in there to see if there was any output - but nothing. I've just looked again and found another wiki entry saying you should put your scripts in a completely different file. This time the file is called, but the same error occurs. The protection method was New_rewrite. I ust accidentally switched it to htpassword and have now been locked out of the site completely. Time to go home I think!! I'll try and find how to get back in tomorrow! :-( Many thanks for your suggestions. Nik
  20. I've tried within the aMember template files, and within the aMember index file and aMember bootstrap file.
  21. Hi there I am trying to configure aMember (amember.com) alongside PW for a membership website. The two systems live alongside eachother in the root directory. Within PW, using aMember's api, I can check whether a member has logged in to the aMember system, so can restrict access etc which is all good. However, from within the aMember system templates, I want to be able to access the PW api. I have implemented the PW bootsrapping as shown here http://processwire.com/api/include/ Unfortunately this immediately causes an Internal Server Error - with no more details shown or within any logs. I've tested the PW bootstrap within a separate script and it all works fine. I can't tell where the conflict might be or where to start looking to resolve the issue. I've approached aMember to see if there's anything I can try from there side but I thought I might also see if there's anything I can try from the PW side. If anyone has any suggestions of where I could start I'd love to hear. Regards Nik
  22. I'm appraising aMember at the moment Ollie but am hitting a brick wall with regards to getting PW content into aMember templates. As soon as you try to bootstrap PW from within aMember (as explained here http://processwire.com/api/include/) you get an Internal Server Error. The PW bootstrap part of it works, just not from within aMember. I can't fathom out where the conflict is. If you came accross this and resolved it, I'd love to hear how. Kind regards Nik EDIT: I have started a new post regarding this: https://processwire.com/talk/topic/6039-bootstrapping-pw-within-amember/
  23. Very interesting Ollie - I'll definitely check that out. Is linking PW users to aMember users simple enough?
  24. Thanks very much Pete. I think from the responses here I am encouraged enough to tell them that I can handle this functionality, and that I can find help if needed. And well done for being so busy! Kind regards Nik
  25. Stripe does look like a good option at first glance. I'm not holding out too much hope of finding a PW freelancer at the moment but at least I am feeling a tiny bit more confident of being able to sort it myself now. Many thanks for the suggestions
×
×
  • Create New...