Jump to content

formulate

Members
  • Posts

    141
  • Joined

  • Last visited

Everything posted by formulate

  1. Tried this for an hour, didn't resolve the issue.
  2. SOLVED. Ugh, yes something as simple as sessions that I overlooked. I'm running two copies of PW on the same domain and forgot to change the session name in config.php. There was cookie conflict because of the same session names. Changing the session name seems to have solved my issue. I will test and if there's any further issues, report back. Too good to be true... still having the logout issue, just took longer than normal this time.
  3. Yes, I've read the zillion other threads about this same issue. No, nothing in those threads resolves my issue. I'm really frustrated. I have 30+ PW sites all running on the same server, all various different versions of PW. They all work fine, but twice now I've had a site that just refuses to keep me logged in. It will constantly log me out of the admin and only keeps me logged in anywhere from 15 seconds to 3ish minutes. I have other PW sites of the same version running on the same server that do not do this. I have no idea why this is happening and I'm pulling my hair out! I've tried everything in the other threads and it still does it. At this point, I'm just going to try re-installing everything from scratch. Any thoughts or advice on why this is happening?
  4. While this didn't solve the problem, I really appreciate the more elegant date selector. I will update my code post above to reflect the new selector. Now, to get this silly paging to work!
  5. Here's the code: // bunch of stuff happens first to get search variables and build a selector to filter units // get all units using matching unitSelector & ensure owner is active $active = $users->find("accountstatus='Active'"); $unitsAll = $pages->find("owner=$active,$unitSelector"); $results = $pages->find("sort=unitRateWeekdayBase,owner=$active,limit=$limit,$unitSelector"); // get dates and convert to unix time stamp $frontStartDate = $input->get->startDate; $frontEndDate = $input->get->endDate; $input->whitelist('endDate', $input->get->endDate); $input->whitelist('startDate', $input->get->startDate); $frontStartDate = strtotime($frontStartDate); $frontEndDate = strtotime($frontEndDate); // if end date specified, further filter results by date if($frontEndDate){ $unitSelector2 = "template=unit"; $unitList = ''; foreach($unitsAll as $unit){ $dateSelector = "bookingEndDate>=$frontStartDate, (bookingEndDate<=$frontEndDate), (bookingStartDate<=$frontEndDate)"; // check if unit has any bookings using dateSelector $tmp = $pages->find("template=booking,unitID=$unit->id,limit=1,$dateSelector"); // if no bookings, add the unit to a list that will be used for a new selector if(count($tmp) == 0){ $unitList .= $unit->id.'|'; } } // add date filtered units to new unit selector $unitSelector2 .= ",id={$unitList}"; // generate results based on units filtered by date using the new unit selector $results = $pages->find("limit=$limit,$unitSelector2"); } // generate output if(count($results) == 0){ $out = '<h2>No Availability</h2>'; $out .= '<p>Please revise your search options.</p>'; } else{ $out .= "<h2>{$results->getTotal()} Available</h2>"; foreach($results as $unit){ $building = wire("pages")->get("$unit->buildingID"); $out .= unitData($unit,$building); } $out .= $results->renderPager(); }
  6. I have a search form on the following page: http://www.mtwashingtonaccommodation.com/list/ Everything works as expected. Paging works (just browsing, no search) and if I search by criteria such as "Hot Tub", etc. everything is all good. When I specify an end-date, I get the correct results on page 1. As soon as I go to page 2 the pager seems to increase my results count by some random amount of results that should not be included as they don't meet the end-date criteria. I haven't been able to figure out any rhyme or reason to this arbitrary number nor the more major issue of why the pager seems to mess up after page 1 when there's an end date specified. Essentially, on pages after 1, the pager disregards my end-date and randomly adds any results it wants. Yes I have URL numbering on, white listing my search variables, etc. The search and paging works great for everything *but* my end-date. My code is admittedly a bit chaotic and there's probably better ways of doing things, but essentially I'm doing the following: Use $input->get to grab the variables from the search form. White list the variables. Get all units that match the search criteria (ie: hot tub, etc.) If no end date specified then render the output with paging (this works fine) If there's an end date then go through all the bookings and get only available units then render the output with paging (this only works for page 1 of the results) I'll post my crazy code in a separate post just to keep it out of this one. Maybe some fresh eyeballs and some higher level understanding of what's going on will help me out. Thanks!
  7. In the above scenario, what do you use for handling menus? I'm still on the look-out for good stand-alone menu code that collapses to mobile well and has good backward compatibility. I find most framework's menu/nav modules to be flawed in some ways. In an ideal world my menu code would be: - CSS only (maybe a bit of javascript with graceful fallback) - IE9+ - mobile collapse (with custom breakpoint) - drop-down capability - icon friendly (a lot of menus suck when using icons AND text) - easy to style - minimal animation / fast - minimal filesize - fixed support - sticky support - ability to have sticky when menu not at absolute top (ie: below logos, etc.) - bonus points for mega menu capability Currently I'm using Sky Menu for some projects these days. It addresses most of my needs, but feels heavy (lots of built-in themes) and redundant (it uses it's own grid system for mega menus).
  8. Wow, these look amazing. Going to use them on my next project. Thanks for posting these Beluga.
  9. Pure is actually pretty great. I've used it on a few projects and it really suits my desire for something minimalist and solid. My only beef with it is the navigation. I feel navigation is handled better in other frameworks (especially mobile / off-canvas). With Base, I've heard nothing but positive ravings about it. My problem with it is that it uses LESS. Not only is LESS on it's way out the door (SASS is killing it), I'm not a fan of frameworks that force me to use a compiler for the CSS. Another suggestion would have been GUMBY, but sadly they've closed up shop. Which brings up a point: it's probably worth sticking to a major framework as you will be more assured that it sticks around.
  10. I've used a metric ton of different CSS frameworks on a wide variety of projects. I'm always searching for "the one" and I have yet to find it. They all have let me down badly in one way or another. My bread and butter framework is Foundation, but that's only because it's the devil I know. Personally, I hate it. I could go off about so many things that are wrong with Foundation and other frameworks. A framework that is modular is an absolute must! The problem with frameworks is that they enforce too much of their own way of doing things (I guess that's the point). While a couple of their "modules" may be great, others are a complete let down and you end up having to roll-in all sorts of 3rd party tools to get the job done. MaterializeCSS is an excellent example of this: their modals suck. Sure they're gorgeous, but the lack of control over them is brutal. I always end up having to bring in FancyBox2 just so I can have the level of control I want. That's just the start with MaterializeCSS, like other frameworks a lot of their "modules" are half-baked implementations. Sure, everyone gets the grid and typography right (more or less), but there's so much more to it than that. In the end my projects always feel like bastardized gluing together of a framework I'm only using part of along with a bunch of other code all slammed together and then I hope it all plays nice. My leaning these days is to just find some majorly stripped down framework to handle the basics and then bring in anything I need on a modular / piece-meal basis. To that end, I'm looking heavily at Google's Material Design Lite, but I absolutely hate how they handle grids among other issues. There's a few SASS frameworks out there that look really great, but my SASS knowledge sucks. Sorry this wasn't constructive. I'll be following this topic closely. Please, someone, save us from CSS framework hell!
  11. Thanks for these modules. When I try using the Stripe module, I get the following error: Fatal error: Exception: Method PaymentStripe::embed does not exist or is not callable in this context I can see at the end of the module code the default for the switch is calling this. It appears as though it's here that determines the "step" and should reload with the appropriate get variable in the URL. I'm not sure how to go about making this work. Any help would be appreciated. Thanks. Scratch all that. I was forgetting to call the charge url with ?step=process. Rookie mistake. Works great!
  12. I absolutely need a solid front-end user system solution. Of the 20+ PW sites I've built, 2 have required extensive front-end user systems and I've had to kludge together crazy solutions built from bits and pieces of code strewn throughout this forum. It's hack, bad and just waiting to fall apart. PW is such an awesome solid system and it makes me sad that it's so let down by this one critical area. Almost all other major CMS/CMF's ship with some decent front-end user management. I would easily pay $100 for an up-to-date decent system. Or $30 with a yearly subscription like Ryan's other modules. Ryan could probably bang this out in one night (haha ok I'm kidding, but I'm sure he could do it easy enough). Ryan please! There's a desperate need for this. The existing half-implemented modules and bits of code are NOT a solution at all! Please save me from having to use ModX again just because of front-end user management.
  13. Ok, so this solution isn't 100% bullet-proof. I found an unusual case scenario where a result will return false when it should be true. If a back-end datefrom has a date before the front-end datefrom AND the back-end dateto is > front-end dateto, it won't return a result even though it should. Example: I have a back-end date range of October 1 to October 5. On the front-end if I specify October 2 as my start and October 4 as my end, the resulting selector will return no result. However, if I change my front-end Oct 4 to something greater than the back-end October 5, it works as expected. OR if I change my front-end October 2 to something before the back-end October 1, it works as expected. I'm not sure I can wrap my head around a solution to this obscure circumstance. It hurts my brain trying to come up with proper range selectors involving dates. Ugh. For now I'm just going to live with it as it is, but I figured you should know LostKobrakai as you use this code yourself and may want to fix it. If you come up with something, let me know.
  14. THIS WORKED! Wow, thank you so much! You have saved me enormous amounts of time and stress. I owe you a beer (or a lot of beers)!
  15. Yeah, this didn't work. Thanks for trying to help though. Maybe I need to completely re-think how I'm storing the data in the first place. It seems to me there has to be a way to compare two separate date ranges without a ton of separate loops and processing overhead. Maybe someone else can chime in either with a different selector or advice on a different approach? I'm open to anything.
  16. I'm really struggling with crafting a selector that will look for matches between two separate date ranges. I have a template called "booking" and the following date inputfields: "bookingStartDate" and "bookingEndDate". Pages using the "booking" template specify a start and end date range using the above 2 date inputfields. On the front-end I have a form that submits dates to the following variables: "frontStartDate" and "frontEndDate". All dates are using unix timestamp and I have verified that I can craft single date selectors that work with the date formats from both the front and back ends, so I know it's not a timestamp formatting issue. Basically, I want to find all pages that have any overlap in date ranges. If the front-end start and end dates are entirely outside of any back-end date ranges, then no matches. If even one day is matched, then return the page. Below is my incredibly gimpy selector that is very broken. I have tried much simpler variations of this without success. $tmp = $pages->find("template=booking,bookingStartDate>=$frontStartDate,bookingStartDate<=$frontEndDate|bookingEndDate<=$frontEndDate,bookingEndDate>=$frontStartDate"); Please help! Thanks!
  17. Hi Martijn, I wasn't able to get this to work with dev 2.5.22. All it does is swap the places of the delete and settings tabs. Any advice? Thanks, K.
  18. I'm having this exact issue. Reno, I'm presuming by this point you somehow resolved this. What was the solution? I've tried everything I can think of and I just can't get the quality setting to actually work. Tried several different development sites with bare-bones default installs. Ensured I was using jpg's, etc.
  19. Recently completed a bunch of ModX to PW conversions and a couple new smaller sites in PW. Some highlights: http://www.edibleisland.ca http://www.claddaghestates.com http://tofinofishingclub.com Currently working on a massive ModX to PW conversion of a Food Industry related site that has over 50,000 pages and a lot of custom functionality. Also working on a new membership site in PW. Front-end membership functionality in PW is driving me crazy and is PW's weak spot (IMHO), but that's another topic. Working on a smaller oil industry related site. Lastly and more exciting is a large web app conversion I'm doing from ModX to PW. More of a complete re-write really. It's exciting to be able to leverage the power and ease of PW where before I was handcuffed by ModX when I first built the app. And if all that wasn't enough, I'm still squeezing in the cracks smaller ModX to PW conversions. Lots on the go!
  20. Hi Mel, Did you ever get a solution together for dealing with the JSON data? I have a similar situation and am searching around for how best to grab the JSON and then display the data. Thanks.
  21. I'm a dinosaur. I use Photoshop for all my prototyping and design (although this is becoming more of a problem now that everything is responsive). For HTML/CSS, I hate things like SASS, Bootstrap, grids, frameworks, etc. I like being as close to the raw code as possible and having full control over everything I do. I find things like SASS just get in the way and it's just more stuff I have to learn. I'd rather just learn and know actual HTML & CSS to the highest level possible. I realize I could probably save time and make my life easier if I picked up a framework, but... ugh, I'm just not in that headspace. However, I do love jQuery and leverage that. Also, on the back-end of things I obviously don't do things from scratch and use CMS/CMF's like PW, ModX, etc. My typical workflow: 1. Client Engagement / Project Initiation stuff 2. Client fills out Creative Brief, we skype and discuss the brief 3. I create a 100% fully realized design for the home page, standard content page and any special pages. 4. I present the above designs as background PNG's in a basic HTML page so clients can review in their browser. This way the client sees in their browser exactly what they'll see once the site is built. Of course none of the links, etc. work, being a static image. 5. Revise designs according to feedback. Once all design work is signed off on, I then proceed with production. 6. Production stuff... 7. SEO / SocialMedia / Rep Marketing stuff... 8. Revisions, final tasks, backups, etc. 9. Project wrap-up I realize steps 3, 4 and 5 are seriously flawed this day and age. Especially with responsive design. I need to alter my front-end design workflow, but I've been so consumed by this thing called ProcessWire that's taking up all my learning time
  22. Wow! You guys are amazing! PW is awesome, but the community really is the killer "feature". Thanks guys
  23. Wow, great stuff Diogo! I'll give this code a whirl and report back. Thanks!
  24. Awesome! Thanks Soma. In ModX I couldn't save an individual field, I had to save the entire page. Didn't realize with PW I could just save a single field. I guess my next question is: Is this the best approach? Should I be storing all the field data on one page or would it make more sense to have each field as it's own page? What if I need to add more fields or more users?
×
×
  • Create New...