Tom.

Members
  • Content Count

    384
  • Joined

  • Last visited

  • Days Won

    6

Tom. last won the day on September 5

Tom. had the most liked content!

Community Reputation

508 Excellent

About Tom.

  • Rank
    Sr. Member
  • Birthday 11/01/1992

Profile Information

  • Gender
    Male
  • Location
    England
  • Interests
    ProcessWire

Recent Profile Visitors

2,835 profile views
  1. I'm integrating FoxyCart SSO at the moment, I want to make it so when someone registers using ProcessWire it also registers them for the Store. To do this I have to set FoxyCart up to use the same encrypting method as ProcessWire. I know it uses a hash and a salt. But I was wondering if anyone has done this before? I'm struggling to utilise the ProcessWire API to pass FoxyCart the hash and salt for a particular user.
  2. Tom.

    Worked a charm - thanks! EDIT: Spoke to soon, in this case it must be = because if you have an empty selector that means that product variation doesn't exist. So selecting colour=blue isn't enough, but *= will still make a selection.
  3. I'm having a strange issue here where my selector is case sensitive on a default install with no modification MySQL. The selector is as follows: $vars = explode("?", $_SERVER[REQUEST_URI])[1]; $selector = implode(", ", explode("&", $vars)); echo $selector; $variation = $page->wc_variations->get("wc_variation_value='$selector'"); This doesn't work `$selector` outputs `size=14, colour=blue` If I was to change the value given to `Size=14, Colour=Blue` it then finds the repeater item. Anyone else come across this issue before? EDIT: Seems like there is an inconsistency between database searches and in memory searches. I've just done an extra: foreach($page->wc_variations as $variation) $variation->wc_variation_value = strtolower($variation->wc_variation_value); Before doing the selector. Not great, but it works.
  4. Yeah, I usually just copy the code over the CSS just for that utility then customise it to how I want it to look. It also means I only get the CSS for the utilities I'm using. Very few utilities actually require CSS. Things like masonry grid, grid filtering and parallax don't require UIKits CSS. You can get to the CSS of just a component on GitHub: https://github.com/uikit/uikit/blob/develop/src/less/components/slider.less
  5. Well, I use personally use UIkit 3 + TailwindCSS. Tailwind you are going to hear a whole lot more about in the upcoming months. I know you are talking about file size and this is exactly why UIkit + Tailwind is great! I don't really use UIkit's CSS at all. I just use the JavaScript because the amount of utilities they have manage to pack into 130kb (less than most images) is amazing. I'm talking Parallax, Sliders, Lazy Loading Images, Srcset utilities, placeholder generators, scrollspy, sticky. Most of which can be and usually is utilised in any project. I challenge you to get all of that under 130kb. Also it doesn't have any dependencies. Tailwind you can get down to about 3KB per website using Purge and Gulp/Webpack. It truly is amazing and Utility first CSS is such a refreshing way to work with CSS. I know all the arguments, and I'm a minimalist. I don't like all the classes too. But Tailwind's benifits out weigh the cost. 1. You don't have to struggle with inherited styles, or coming up with class names to define each section, some of which may look the same but be very different in content. 2. Consistency, it puts pressure on you to keep things consistent. So you hardly stray to loads of different type sizes and colours. 3. With Purge, you can have an entire website styles in ~3kb. I believe Ryan chose UIkit 3 because he has learnt the classes and is confident with the framework, and is impressed with the JavaScript utilities. And because you can build website much quicker using it. I see it as a hybrid between utility and a standard framework. It offers many utility classes. You could also Purge UIkit's CSS and get it around 160KB. I don't believe that this isn't a good fit for ProcessWire as you have previously mentioned. Many who use ProcessWire love UIkit. It follows the same philosophy: A powerful framework, that is easy to understand and learn to get things done quicker. Just like ProcessWire gives developers confidence in that they can do challenging bits of functionality easily with the power of ProcessWire's amazing API (like seriously, I built a real estate system using ProcessWire, something I wouldn't have dreamed of doing on any other platform). Well UIkit also gives that confidence to the front-end. But if I was to choose for myself, I much prefer pairing Tailwind for the CSS and UIkit for the JavaScript. That ~140KB (Tailwind + UIkit) covers me for most websites I build.
  6. Tom.

    @adrian Hi Adrian, I know you have done the latest version of this module. I'm having a few issues using your folk on 3.0, not entirely sure if it's me. 1. You mentioned that it sets a sleep value of the page ID, so if the URL is to ever change it will be update. This doesn't seem to be working at all. I can set it to a local url but it does not update if I change the url. 2. It doesn't seem to store ID's at all on a local install. I think both of the above is because it's installed on a folder: I mean the domain is http://dev.agency.com/client - so the url is /client/link/to/page and exactly why I need 1 or 2 for when it goes live. I'm going to do a folk and fix that. Let me know if you want to merge.
  7. Tom.

    As in a user has an article in that category? So your structure in the backend would be: Articles - Post - Post - Post Categories - Category - Category The Template Post will hold the User or I guess "Published by"? And a Category will be a page reference on the Post template? If this is your structure this will work. Also lets assume a Post can be in multiple Categories. $results = $pages->find("template=post, title%=$searchTerm"); foreach($results as $result) { foreach($result->category as $category) { $categories[$category->title][] = $result->published_by; } } // Show Results foreach($categories as $key => $value) { echo "<h3>$key</h3>"; foreach(array_unique($value) as $user) { echo $user; } } I haven't tested this at all, but using my imagination I think it might work. If not it will definitely send you on the right track. I'm sure there is more efficient ways of doing this. However, this is what comes into my head first.
  8. I've used ProcessWire for very similar things, and will continue to use ProcessWire for those things in future. In fact I have a project coming up soon for competition entries and will be using ProcessWire. I always see ProcessWire as a Content Management Framework over a Content Management System.
  9. Tom.

    @Gideon So I also can't seem to download 3.0.116. Both the Website and ProcessWireUpgrade module report 3.0.115 being latest.
  10. @Robin S Thanks for your response - this has now been fixed: https://github.com/processwire/processwire-issues/issues/716#issuecomment-427372423
  11. Hey, I'm having an issue where you see different output based on whether you are logged in or not: <div class="px-1"> <div class="flex flex-wrap -ml-1 -mt-1" uk-scrollspy="target: > div; cls: fade-up; delay: 100;"> <?php foreach($value as $item): $item->block = $blocks[$item->size->value]; ?> <?php if($item->size->value != 'half' || $item->prev()->size->value != 'half'): ?> <div class="pl-1 mt-1 <?=$item->block['class']?>"> <?php if($item->size->value == 'half'): ?> <div class="flex flex-wrap -ml-1 -mt-1"> <?php endif; ?> <?php endif; ?> <?php if($item->size->value == 'half'): ?> <div class="pl-1 mt-1 w-1/2 lg:w-full"> <?php endif; ?> <?=$item->render()?> <?php if($item->size->value == 'half'): ?> </div> <?php endif; ?> <?php if($item->size->value != 'half' || $item->next()->size->value != 'half'): ?> <?php if($item->size->value == 'half'): ?> </div> <?php endif; ?> </div> <?php endif; ?> <?php endforeach; ?> </div> </div> This works great when you are logged in! It keeps the 'half' sized blocked grouped together when they are next to each other. See output: <div class="pl-1 mt-1 w-full lg:w-1/3 uk-scrollspy-inview fade-up" style=""> <div class="flex flex-wrap -ml-1 -mt-1"> <div class="pl-1 mt-1 w-1/2 lg:w-full"> <a href="[hidden]" class="block-half block no-underline relative bg-grey bg-cover overflow-hidden"> <div class="group absolute pin p-3 md:p-6" style="background-color: rgba(0, 0, 0, 0.15)"> <h2 class="text-base md:text-lg xl:text-2xl lg:w-2/3 text-white uk-scrollspy-inview fade-up" style="">About us </h2> <h2 class="text-base md:text-lg xl:text-2xl lg:w-2/3 text-black uk-scrollspy-inview fade-up" style="">Our practice</h2> <span class="absolute pin-b pin-l ml-3 md:ml-6 mb-3 md:mb-6 xl:text-xl flex items-center opacity-0 group-hover:opacity-100 transition text-white">View About us</span> </div> </a> </div> <div class="pl-1 mt-1 w-1/2 lg:w-full"> <a href="[hidden]" class="block-half block no-underline relative bg-grey bg-cover overflow-hidden"> <div class="group absolute pin p-3 md:p-6"> <h2 class="text-base md:text-lg xl:text-2xl lg:w-2/3 text-yellow uk-scrollspy-inview fade-up" style="">Feed </h2> <span class="absolute pin-b pin-l ml-3 md:ml-6 mb-3 md:mb-6 xl:text-xl flex items-center opacity-0 group-hover:opacity-100 transition text-yellow">View Feed</span> </div> </a> </div> </div> </div> Perfect! However, when you are logged in it displays like this: <div class="pl-1 mt-1 w-full lg:w-1/3 uk-scrollspy-inview fade-up" style=""> <div class="flex flex-wrap -ml-1 -mt-1"> <div class="pl-1 mt-1 w-1/2 lg:w-full"> <a href="[hidden]" class="block-half block no-underline relative bg-grey bg-cover overflow-hidden"> <div class="group absolute pin p-3 md:p-6" style="background-color: rgba(0, 0, 0, 0.15)"> <h2 class="text-base md:text-lg xl:text-2xl lg:w-2/3 text-white uk-scrollspy-inview fade-up" style="">About us </h2> <h2 class="text-base md:text-lg xl:text-2xl lg:w-2/3 text-black uk-scrollspy-inview fade-up" style="">Our practice</h2> <span class="absolute pin-b pin-l ml-3 md:ml-6 mb-3 md:mb-6 xl:text-xl flex items-center opacity-0 group-hover:opacity-100 transition text-white">View About us</span> </div> </a> </div> </div> </div> <div class="pl-1 mt-1 w-full lg:w-1/3 uk-scrollspy-inview fade-up" style=""> <div class="flex flex-wrap -ml-1 -mt-1"> <div class="pl-1 mt-1 w-1/2 lg:w-full"> <a href="[hidden]" class="block-half block no-underline relative bg-grey bg-cover overflow-hidden"> <div class="group absolute pin p-3 md:p-6"> <h2 class="text-base md:text-lg xl:text-2xl lg:w-2/3 text-yellow uk-scrollspy-inview fade-up" style="">Feed </h2> <span class="absolute pin-b pin-l ml-3 md:ml-6 mb-3 md:mb-6 xl:text-xl flex items-center opacity-0 group-hover:opacity-100 transition text-yellow">View Feed</span> </div> </a> </div> </div> </div> Which breaks the layout completely. I have ProCache & ProDrafts installed but both are turned off. I've tried Incognito mode both logged in and out to see if it's a caching issue, however it seems completely down to be logged in or not? Strange one. Anyone know what's going off here? I'm going to try `->next("include=all")` as that's the only thing I can think off at this point. If it works then it must be a bug. EDIT: ->next("include=all") fixes it. This is a bug as all repeater items are published.
  12. Tom.

    Perfect response, thank you very much I just couldn't get my head around the logic for some reason.
  13. Tom.

    I have no idea why, but I can't solve this haha! I have a block system that groups two half blocks together. So it checks what comes before or after it to create the markup <div class="masonry flex flex-wrap -ml-1 -mt-1"> <div class="masonry-sizer w-1/2 lg:w-1/3"></div> <?php foreach($value as $item): $item->block = $blocks[$item->size->value]; ?> <?php if($item->size->value == 'half' && $item->prev()->size->value == 'half'): ?> <?php else: ?> <div class="pl-1 mt-1 <?=$item->block['class']?>"> <?php endif; ?> <?=$item->render()?> <?php if($item->size->value == 'half' && $item->next()->size->value == 'half'): ?> <?php else: ?> </div> <?php endif; ?> <?php endforeach; ?> </div> So I've got the logic down, however I don't want the else. Easy solution, I just turn it into a false. <div class="masonry flex flex-wrap -ml-1 -mt-1"> <div class="masonry-sizer w-1/2 lg:w-1/3"></div> <?php foreach($value as $item): $item->block = $blocks[$item->size->value]; ?> <?php if($item->size->value != 'half' && $item->prev()->size->value != 'half'): ?> <div class="pl-1 mt-1 <?=$item->block['class']?>"> <?php endif; ?> <?=$item->render()?> <?php if($item->size->value != 'half' && $item->next()->size->value != 'half'): ?> </div> <?php endif; ?> <?php endforeach; ?> </div> I assumed that would work. I thought wrong! hahaha. Maybe my brain just isn't on it today. Anyone know what's happening here?
  14. Tom.

    @ryan that doesn't sound pleasent! I hope you make a full recovery!
  15. Tom.

    <div uk-grid> <div class="uk-width-1-6"> </div> <div class="uk-width-expand"> </div> <div class="uk-width-1-6"> </div> </div> 1/6 is about as close to 15% you'll get I think. For 25% just use uk-width-1-4.