Jump to content

benbyf

Members
  • Posts

    796
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by benbyf

  1. Another new site only recently finished (so there still might be bugs :)

    http://www.ethicalby.design/

    Ethical by Design is my new personal project. I've been running a podcast called the Machine Ethics Podcast: about the social impact of AI. Over the last few years I've learnt alot and I'm now hoping to help businesses learn about or implemented AI responsibly.

    Branding done by Nick Willsher, and the site was designed and coded by myself.

    Hoping to spin this one out into a more configurable site profile for the community soon.

    banner.thumb.jpg.69ac578e35d3ae608d19fb46fbb36a15.jpg

     

    • Like 7
  2. Not new, but a website I've worked on for a year or so in continous development.

    http://supercarownerscircle.com/

    I originally inherited the site from another web design company - upgraded PW and over the year added ecommerce using the Stripe module and a custom integration, revamped the frontend and added lots of new templates.

    Also did some frontend work on the shopify shop.

    1062312384_Screenshot2018-04-3013_30_07.thumb.png.665c452db84c26696d3c691bbc3cb779.png

     

     

    • Like 7
  3. 3 minutes ago, alexmercenary said:

    @benbyf I'm using WireMailChimp and using it in conjunction with Login/Register to create accounts on the front end.

    Cool. I think it only signs up users with role "subscriber" set, or a different role setup in my subscriber module (not required). So you can change this in the code, or add the role when they register.

    They also must have a vaild email, and mailchimp API keys and list name setup in the module config

  4. not sure if we have our wires crossed but providing the file wasnt really the issue, other wise I would just link to the location, it was capturing statistics on file access where range-headers needed to be provided. This was mainly as itunes at teh time didnt supply any podcast data – they've changed their tune abit since but still what they track is limited and to this day my podcast still says "Not Enough Data" sooooo still super annoying.

  5. HELLO, found that AIOM is not compiling the following code which is pretty annoying, if any one knows of any works around that would be great.

    Think i got it working now, for some reason i couldnt see it but might have been a caching issue. ?

    @supports(display: grid) {
        .two-up {
            @media screen and (min-width: @small-screen) {
                display: grid;
            }
        }
    }

    // edit

    was given this by @Christophe which was super useful to anyone using css grid

    https://www.smashingmagazine.com/2017/06/building-production-ready-css-grid-layout/

    "The challenge is Microsoft Edge, the only modern browser that, as of this writing, still uses the old grid specification. It returns true for @supports (display: grid) {}, even though its grid support is spotty and non-standard. Most relevant for our example is the lack of support for the grid-template-areas and grid-area properties and for the minmax() function. As a result, a feature query targeting display: grid would not exclude Microsoft Edge, and users of this browser would be served a broken layout. To resolve this issue and serve up grid layouts to Microsoft Edge only when the browser gets full support for the specification, target one of the unsupported features instead:

    @supports (grid-area: auto) {}

  6. HELLO!

    I've created a new admin page which after moving into the admin section of the page list, the items appears on the top nav in the admin. However adding "normal" pages as children doesnt not yield a dropdown in the top menu like Setup for example. is there something I can change / hook into to add subnav links with edit links to the topmenu? (using teh new AdminThemeUikit).

  7. HELLO!

    This is an old thread now, but just got a requirement into to do some shopify integration with PW, anyone done anything like this and created a module at all? If not I'll get on it. I mainly want to get product info from shopify to show in PW.

    • Like 1
  8. Hi @MarcoPLY.

    I love this module and use it alot but find that it needs a lot of TLC after not having much activity over the last few years. I usually work on my own copy of it for different needs as my pull requests never get looked at. https://github.com/benbyford/PaymentStripe

    My suggestion is to make a copy and work on the code yourself or pay someone to add the functionality you need. The currency options never worked for me either simply becuase it was never really implemented in the module (not sure about the paypal one as i never use it).

    • Like 1
  9. 19 minutes ago, benbyf said:

    $resultTime = intval($currentTime) - intval($seconds);

    $log->message("result ".$resultTime); // save user page

    $user->set($this->fieldName, $resultTime);

    $this->users->save($user); }

    think i fixed it! adding

    $user->setOutputFormatting(false);

    GRRRRRRRRRRRRR OF() trips me up everytime. is there a good reason why this is here?? can't it default to not always being a pain :(

  10. Hello, having trouble getting PW to save my user or field in cron hook.

    It seems to report the same field info each time unchanged. It should be counting down in seconds.

    	public function init() {
    
    		// set to every30Seconds in settings
    		$this->defaultInterval = $this->cron_check;
    
    		// add hooks to CRON
    	    $this->addHookAfter("LazyCron::{$this->defaultInterval}", $this, 'checkUserSubscription');
    	}
    
    	public function ___checkUserSubscription(HookEvent $e){
    
    		// seconds since last lazycron
    		$seconds = $e->arguments[0];
    
    		$log = wire('log');
    
    		$field = $this->exclusiveRole;
    
    		// users with specific role and field
    		$users = $this->users->find("roles=$field");
    		foreach ($users as $user) {
    
    			// get stored time
    			$currentTime = $user->get($this->fieldName);
    
    			// if time not null
    			if($currentTime){
    
    				// evalute stored time minus time past
    				$resultTime = intval($currentTime) - intval($seconds);
    
    				$log->message("result ".$resultTime);
    
    				// save user page
    				$user->set($this->fieldName, $resultTime);
    				$this->users->save($user);
    		}
    	}
    }

     

  11. Hi @kaba86 as @dragan mentioned you can simply add another foreach loop to check another level down. I would defiantly check out some tutorials on using processwire to get yourself kickstarted in the right direction and theres lots of quality tutorials not to mention some of my own. https://processwire.com/docs/tutorials/

    <?php
    				$children = $pages->get('/')->children;
    				foreach($children as $child){
    					$class = "";
    					if($page->id == $child->id){
    						$class = " current";
    					}
    					if($child->id == $page->parent->id){
    						$class = " parent";
    					}
    					// echo nav links
    					echo '<a name="'.$child->title.'" class="ajax-link'.$class.'" href="'. $child->url .'">'. $child->title . '</a>';
                      	
    	                // new code below
                        $childChildren = $child->children;
                        foreach($childChildren as $subChild){
                          	$class = "";
    	  					if($page->id == $subChild->id){
    							$class = " current";
    						}
    						if($child->id == $page->parent->id){
    							$class = " parent";
    						}
                          
                          echo "<div class='sub-item'>";
                          echo '<a name="'.$subChild->title.'" class="ajax-link'.$class.'" href="'. $subChild->url .'">'. $subChild->title . '</a>'; 
                          echo "</div>";
                        }
    				}
    			?>

    The above is not optimised or elegent - just off the top of my head. I seem to remember one of the default themes has a funciton in it's _func.php file that gives you a nest page list given a page varible (and optional max depth) so you could use that too. Hope that helps (also please post you website when its done :)

    • Like 3
    • Thanks 1
  12. Sure this has been asked a million times but cant find a simple answer.

    Trying to set the page to redirect to after login in the front end - i.e. not on the admin login page.

    some reason this works for super users but not normal users redirecting to a page which is viewable by members not guest role users.

     

    $showLoginError = false;
        if($input->post->user && $input->post->pass) {
        	$username = $sanitizer->username($input->post->user);
        	$pass = $input->post->pass;
    
            try {
    
    			$session->login($username, $pass);
    
    			// redirect user
    			$session->redirect("/events/");
    
            } catch (\Exception $e) {
                $showLoginError = true;
            }
        }

     

  13. 2 minutes ago, MarcoPLY said:

    Please, someone can explain me how I can customize the style of the Stripe payment form? :)

    I try to use the same class but doesn't work. I looking inside the module but not have find any css file. If the style come from Stripe how I can change it?
    I see the Stripe doc, but I don't have understand well, the module works differente, there isn't one page with the form. or not? 

    Thank you.

    ? think you have to make the form yourself, no? or do you meand the Stripe button? not sure you can style much coming direct from Stripe.

×
×
  • Create New...