How can we help you?

Publishing WODs with ExpressionEngine

Follow

Can you publish WODs using Expression Engine? Absolutely! Admins can leverage Wodify's API to post WODs to their ExpressionEngine site.  

In this Article, we will cover:

 

About Expression Engine

Expression Engine is a general-purpose content management system written in object-oriented PHP and using MySQL for data storage. Similar to WordPress, EE allows website administrators a means of managing their website without need the understand or use code, though it also offers features useful for practiced developers and designers.

 

PHP Example

Below is a php example, that pulls from Wodify's API:

<?php    
  if(!class_exists('GetWOD')) {        
    class GetWOD {            
      public $APIKey;            
      public $Date;            
      public $LocationText;            
      public $ProgramText;
             
      function __construct($apikey, $date, $locationtext, $programtext){         $this->APIKey = $apikey;                
        $this->Date = $date;                
        $this->LocationText = $locationtext;                
        $this->ProgramText = $programtext;            
      }        
    }    
  }
     
  $SOAPClient = new SoapClient("https://app.wodify.com/API/WOD_v1.asmx?wsdl", array('features' => SOAP_SINGLE_ELEMENT_ARRAYS));    
 
  // Call RemoteFunction ()     
  $error = 0;    
  $soapResponse = "";    
  try {        
    // CHANGE THE 'API KEY', 'LOCATION NAME', AND 'PROGRAM NAME' BELOW TO THE CORRECT VALUES!        
    $soapResponse = $SOAPClient->GetWOD(new GetWOD('API KEY', '{entry_date format="%Y-%m-%d"}', 'LOCATION NAME', 'PROGRAM NAME'));    
  } catch (SoapFault $fault) {        
    $error = 1;        
    print("Sorry, GetWOD returned the following ERROR: ".$fault->faultcode."-".$fault->faultstring);    
  }      
  if ($error == 0) {        
    if (is_null($soapResponse)) {            
      print("NULL response");        
    } else {            
      print($soapResponse->WOD->FormattedWOD);            
      print("<p><a href=\"https://app.wodify.com/PerformanceTracking/PublicWhiteboard.aspx?WhiteboardKey=mg4w0xd3xl&Date={entry_date format="%Y-%m-%d"}&ProgramName=CrossFit&LocationName=CFA\" target=\"_blank\"><img src=\"http://akroncrossfit.com/images/theme/wod-results-btn.png\" /></a></p>");        
    }    
  }
?>

 

If you need any additional assistance with publishing WODS with EE, feel free to reach out to us at support@wodify.com.

Comments

Check the current status of our products

View status