eventsmanager

Weather and other embeddable widgets

Nov 29th, 2018
354
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!--
  2. This is a proof-of-concept on how to leverage our placeholder formatting and combine it with embeddable code provided by other services to provide useful widgets on your site related to an event.
  3.  
  4. In this case, we take the weather embed widget service from https://darksky.net/widgets/default
  5.  
  6. Grabbing the provided embed code, we simply replace the coordinates with our placeholders to produce the below result.
  7.  
  8. To use, copy the code below, and insert it into an event or location format in Events > Settings > Formatting. You could wrap this with {has_location} in events so only events with a location will show the right weather stats.
  9. -->
  10.  
  11. <script type='text/javascript' src='https://darksky.net/widget/default/#_LOCATIONLATITUDE,#_LOCATIONLONGITUDE/us12/en.js?height=500&title=Full Forecast&textColor=333333&bgColor=FFFFFF&skyColor=333&fontFamily=Default&units=us&htColor=333333&ltColor=C7C7C7&displaySum=yes&displayHeader=yes'></script>
RAW Paste Data