energyfolks platform
Return to energyfolks.com
Fade_left_topfore

energyfolks integration examples

Loading the EF library
The following code should be placed on all pages that load EF content (ideally in the 'head'). This code will automatically add the EF login bar to the top of the page.
  <link href="/assets/energyfolks.css" media="all" rel="stylesheet" type="text/css" />
  <script src="/assets/energyfolks.js" type="text/javascript"></script>
The EF Sidebar
Some EF pages, such as the calendar and job boards, have an optional sidebar. If the sidebar is not included, no functionality is lost, but the features in the sidebar are moved to the top of the calendar or job board. If you want to embed the sidebar on any page, you can use the following code snippet at the location on the page where you want the EF sidebar to appear:
  <script language=javascript>
    EnergyFolks.Sidebar();
  </script>
Note that none of the examples on this page use the sidebar.
Embedded Content
To embed energyfolks content, you can use code like the code below:
  <script language=javascript>
    EnergyFolks.id = 0;  //This is your group's ID.  Contact us if you do not know it
    EnergyFolks.color = '249900';  //Hex color to use during load.  This is overwritten by your group color upon load
    EnergyFolks.showPage({ source: 'events', format: 'month'}); 
  </script>
The 'showPage' command is where the embed happens. Visit the documentation to learn about all the options for this command. For example, 'source' can be changed to other types (such as 'jobs') to embed other EF content on the page. Note that showPage can only be used once on a page. The code above creates the following embed:
Embedding Content with Filters
You can also embed content, similar to the above, with pre-defined filters or search terms. For example, the following code will restrict the 'job' board to content from the affiliate network only (not other networks), within 40 miles of Oakland, CA.
  <script language=javascript>
    EnergyFolks.id = 0;  //This is your group's ID.  Contact us if you do not know it
    EnergyFolks.color = '249900';  //Hex color to use during load.  This is overwritten by your group color upon load
    EnergyFolks.source_restrict = EnergyFolks.AFFILIATE_ONLY;
    EnergyFolks.map_location_lat = 37.8044;
    EnergyFolks.map_location_lng = -122.2708;
    EnergyFolks.map_location_radius = 40;
    EnergyFolks.showPage({ source: 'jobs', format: 'map'}); 
  </script>
View all options in the documentation.
Widgets
Small displays, or widgets, can be embedded as well. Widgets are embedded with the following code:
  <script language=javascript>
    EnergyFolks.id = 0;  //This is your group's ID.  Contact us if you do not know it
    EnergyFolks.showWidget('jobs', {title: 'EF Widget'});
  </script>
There are many optional arguments that can be passed to 'showWidget' that will alter the widget display or alter the data shown. All these options are explained in the documentation.
EF Comments
EnergyFolks has its own commenting system which can be used on any page. This allows you to embed a user commenting box on pages, where the user can only comment on the page when they are logged in. Comments are created with:
  <script language=javascript>
    EnergyFolks.Comments('EF Comment Box');
  </script>
This code has more options, as found in the documentation. The above code will produce:
Profile or login boxes
You can create a login link, profile box, or other user information screens using a variety of commands, as found in the documentation. The below is one example:
  <script language=javascript>
    EnergyFolks.SmallLoginBox();
  </script>
Fade_right_topfore


Platform Home | Affiliates | Documentation | Examples | energyfolks Home
About and Contact Us | Privacy Policy | Terms of Use
© Copyright 2024 EnergyfolksTM. All Rights Reserved.