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
| <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
| <script type="text/javascript"> | |
| $(document).ready(function() { | |
| function submit(form, callback) { | |
| var action = form.attr('action'); | |
| var post = {}; | |
| form.find('input, select, textarea').each(function() { | |
| var $t = $(this); |
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 __call($method, $args) | |
| { | |
| foreach(array('/^get_/' => 'get_' , '/^set_/' => 'set_') as $regex => $replace) | |
| { | |
| if(preg_match($regex, $method)) | |
| { | |
| $property = str_replace($replace, '', $method); | |
| $method = rtrim($replace, '_'); |
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 | |
| /* | |
| Advanced Query with Channel Data | |
| Obviously the logic in this query is not something that anyone | |
| with any sense would actually use. Rather, this example simply | |
| shows the order of operations and everything that is possible | |
| with the new version of Channel Data (v.8.0). |
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 settings() | |
| { | |
| $this->EE->cp->set_right_nav(array( | |
| '← Back to Schemas' => $this->cp_url('schemas'), | |
| )); | |
| $fields = array( | |
| 'settings' => array( |
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:stash:set_value name="page_title" value="News"} | |
| {exp:stash:set name="page_content"} | |
| <section class="section grey-texture"> | |
| <div class="row"> | |
| <div class="nine 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:stash:set name="page_content" process="end"} | |
| <h1>Order History</h1> | |
| <ul class="orders"> | |
| {exp:channel:entries | |
| channel="orders" | |
| dynamic="no" | |
| author_id="CURRENT_USER" | |
| } |
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
| public function import_item_action() | |
| { | |
| $item = $this->EE->data_import_model->get_item($this->EE->input->get_post('schema_id')); | |
| $settings = $this->EE->data_import_model->get_setting($this->EE->input->get_post('schema_id')); | |
| $data = (array) json_decode($item->data); | |
| foreach(explode('|', $item->categories) as $category) | |
| { |
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
| // Results in this warning, "Creating default object from empty value" | |
| $some_var = 'some_property'; | |
| $options = (object) array(); | |
| $options->$some_var = TRUE; |
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:gmap:init id="map" scrollwheel="false" style="width:100%;height:500px"} | |
| {exp:channel:entries channel="bars" disable="member_data|pagination|categories|category_fields"} | |
| {bars_location id="map"} | |
| <h3>{title}</h3> | |
| <p>Beers here:</p> |
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:postmaster:delegate:newsletter:subscribe_form | |
| service="mailchimp" | |
| api_key="YOUR_API_KEY" | |
| list="YOUR_LIST_ID" | |
| class="newsletter" | |
| novalidate="novalidate" | |
| return="/thanks-for-subscribing" | |
| } | |
| <div class="row"> | |