fmgujju Posted June 20, 2013 Share Posted June 20, 2013 I would like to know how to integrate Flourish with PW. I have read Flourish module thread and related post as well but it doesn't tell anything more than as below: then in your code: // in templates$modules->get('LibFlourish');// in modules$this->modules->get('LibFlourish');// anywhere elsewire('modules')->get('LibFlourish'); I am creating user registration and membership portal where I want to work with my own table structure which I created for membership project. I want to know how to use Flourish with PW to submit forms with Flourish validations. Do I have to create PW template first and then add into PW Template area using PW Admin panel and then create a page to use them? If so then how do the form submit (post action) work. I am confused. I follow same as I mentioned to create user registration page but none of the validation is working as expected. Also, I have to add post-action-template.php to PW in order to work but still not working. I am trying to build web application with Flourish with PW. I can do it without PW but then website style and look and feel, I need to maintain separately which I do not want it. If any one can give some example how can I do it that would be much appreciated. Link to comment Share on other sites More sharing options...
Pete Posted June 21, 2013 Share Posted June 21, 2013 Netcarver kindly helped me with this some time ago: http://processwire.com/talk/topic/1111-integrating-flourish-with-processwire/ I now use Flourish in a number of modules, but there's no reason you couldn't adapt it for use in a template I don't think - it just needs to run before you try using any other flourish functionality. Link to comment Share on other sites More sharing options...
alan Posted June 21, 2013 Share Posted June 21, 2013 @fmgujju it's a while since I last used it and it was my first use so apologies if my info is a bit 'thin', also it's not forms related but date related. I used flourish to give me natural gaps between dates such as "in 2 weeks" etc. I am using this Flourish functionality and this is a piece of PW code $out .= "<dd class='eventValue'>{$event_date_end->getFuzzyDifference($event_date)} ({$event_date_end->format('D d M Y')})</dd>"; Sorry that's in isolation, I'll be using Flourish again very soon and when I do I hope my use will be much clearer since the above was in my first PW and Flourish projects (and the code was not great). Hope that's of some help and sorry if not. Link to comment Share on other sites More sharing options...
SiNNuT Posted June 21, 2013 Share Posted June 21, 2013 @alanfluff Maybe you already know but for at least a couple of months (half a year?) now there is the function wireRelativeTimeStr in PW itself which allows for stuff like that. Haven't used it myself and maybe that Flourish function is somehow better or a different beast altogether but it is easy to overlook this kind of thing in PW. For reference: http://processwire.com/talk/topic/3597-how-to-display-relative-dates-in-pw/?hl=relative https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/core/Functions.php#L292 1 Link to comment Share on other sites More sharing options...
alan Posted June 21, 2013 Share Posted June 21, 2013 @SiNNuT Wow! Thanks I'll check that out as it looks like it does do what I had achieved with Flourish. One question; how did you know this? Is there a feature set for PW that I am somehow not following maybe? I am ashamed to admit that perhaps due to my weak PHPness in the past I have found the brevity of the PW cheatsheet usually left me unable to understand what I was reading or how to apply it (in case your answer is that you saw this on there). If you did see this on the cheatsheet then all the more reason for me to go back and try harder at 'getting' how to use it. Thanks again for pointing this out to me and thanks in advance if you're able to recall how you knew of this (and other) cool functions in PW I may not be aware of. Cheers, -Alan 1 Link to comment Share on other sites More sharing options...
SiNNuT Posted June 21, 2013 Share Posted June 21, 2013 It's good to realize that not every available function is on the cheatsheet. In this particular example i think i read it in the commit message. You can see that it was added 20 November 2012. I follow Processwire's github repository and every once in a while i pull in the changes and scan through the commit messages. A great way to keep up to date on the latest and greatest. Apart from that you can also just look through the PW source. Ryan has commented everything nicely and it's not that hard to understand what most things do. And of course always read carefully through the official release notes, which are very detailed. You could have read about wireRelativeTimeStr in there as well http://processwire.com/about/news/introducing-processwire-2.3/#newfunctions 2 Link to comment Share on other sites More sharing options...
alan Posted June 21, 2013 Share Posted June 21, 2013 Thanks VERY much SiNNuT for your wisdom. I am glad (at least) to say I *did* used to look through the commits but I had fallen out of the habbit. I will return to doing that! But I'd totally missed the official release notes; doh! Thanks! Link to comment Share on other sites More sharing options...
fmgujju Posted June 21, 2013 Author Share Posted June 21, 2013 Netcarver kindly helped me with this some time ago: http://processwire.com/talk/topic/1111-integrating-flourish-with-processwire/ I now use Flourish in a number of modules, but there's no reason you couldn't adapt it for use in a template I don't think - it just needs to run before you try using any other flourish functionality. I am using adamkiss's Flourish module in the PW. I can use individual functions without any issues but if I want to use as web application then I am having hard time to figuring out how to do it. As I said before, do I have to create each and every php file (PW called templates) into PW and create a page based on every php in order to use it on the front end for web application? Link to comment Share on other sites More sharing options...
Pete Posted June 29, 2013 Share Posted June 29, 2013 Yes, that's how you would do it. Think about it like this - each page in your web application presumably does something different, so needs a different page. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now