This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| "use strict"; | |
| Timeblocker.Storage.Base = Marionette.Controller.extend({ | |
| // The core localStorageDb object | |
| api: false, | |
| // Table columns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {exp:channel_search:results id="Clubs" orderby="distance" sort="asc" limit="1000"} | |
| {if has_searched} | |
| {club_latitude} | |
| {club_longitude} | |
| {/if} | |
| {if has_not_searched} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public function trigger($data, $member_id) | |
| { | |
| // The $data variable contains the member data passed by the hook itself | |
| // The $member_id available is also available. | |
| // Lets say you want to pass additional data to the template aside | |
| // from the member data already given to you. So... | |
| // Assign the data var to a new variable name, I like to use $parse_vars |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // This is a module method. Use it like so... | |
| // {exp:module_name:class_achievements course_url_title="{segment_3}"} | |
| public function class_achievements() | |
| { | |
| // Course is a model I created. findUrlTitle() is an inherited static method | |
| if(!$course = Course::findByUrlTitle($this->param('course_url_title'))) | |
| { | |
| // If no course is found, return the noResults() method. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.fn.markerList = function(options) { | |
| var titles = {}; | |
| var geocoder = new google.maps.Geocoder(); | |
| var _default = { | |
| map: {}, | |
| bounds: new google.maps.LatLngBounds(), | |
| lat: false, | |
| lng: false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public function notification_action() | |
| { | |
| $this->EE->load->library('postmaster_notification', array( | |
| 'base_path' => PATH_THIRD.'postmaster/notifications/' | |
| )); | |
| $id = $this->EE->input->get_post('id'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $subject = 'your_col_name'; | |
| $has_no_value = TRUE; | |
| foreach($array as $index => $value) | |
| { | |
| if($index == $subject && !empty($value)) | |
| { | |
| $has_no_value = FALSE; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Addon_name { | |
| public function __construct() | |
| { | |
| $this->EE->load->add_package_path(PATH_THIRD . 'channel_data'); | |
| $this->EE->load->driver('channeldata', array( | |
| 'directories' => array( | |
| PATH_THIRD . 'addon_name/models' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| * An proposed spec for Channel Data v1.0 | |
| * Inspired by Eloquent ORM | |
| */ | |
| // Event is a channel. Basically you create a model per channel. Each model is just a class. | |
| // The only thing that is required to be set in the class is the $channel property. | |
| $entry = new Event(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h3>Categories</h3> | |
| {exp:channel_search:form id="Category Search" method="post"} | |
| <ul> | |
| {categories} | |
| <li><label><input type="checkbox" name="category[]" value="{category_url_title}" {checked} /> {category_name}</label></li> | |
| {/categories} | |
| </ul> |