Objetivo de las charlas
Entendiendo la arquitectura MVC * Models * Views
| import re | |
| m = re.search('(?<=abc)def', 'abcdef') | |
| # Getting first match | |
| m.group(0) # -> 'def' | |
| m = re.search('(?<=-)\w+', 'spam-egg') | |
| m.group(0) # -> 'egg' |
| <?php | |
| // Create array | |
| $a = array(); | |
| // Add an item to it | |
| $a[] = 1; | |
| // Point to the last index of the array | |
| end( $a ); |
| <?php | |
| /** | |
| * Function that will handle post insertion with data from | |
| * POST request. | |
| * | |
| * <code> | |
| * | |
| * // Sample returned response | |
| * ( object ) array( 'status'=> 200, 'post_id' => 10 ); |
| <?php | |
| /** | |
| * Return the key of the first elements | |
| * greater than the one passed. | |
| * | |
| * <code> | |
| * | |
| * // Get the index of the first number greater than 15. | |
| * // returns "1" |
| /** | |
| * Components - Misc | |
| */ | |
| // Floating actions | |
| .floating-actions { | |
| width: 80px; | |
| min-height: 150px; | |
| margin-top: 15px; |
| diff --git a/application/controllers/comment.php b/application/controllers/comment.php | |
| index 099c043..70a8603 100644 | |
| --- a/application/controllers/comment.php | |
| +++ b/application/controllers/comment.php | |
| @@ -45,6 +45,7 @@ class Comment_Controller { | |
| // 'comment_content' => wp_generate_password( 50, false, false ) | |
| 'comment_content' => $req->content | |
| , 'comment_post_ID' => $req->post_id | |
| + , 'comment_parent' => $req->parent_id | |
| ); |
| diff --git a/assets/js/handlers/comment.js b/assets/js/handlers/comment.js | |
| index 4cd330d..bb08dd5 100644 | |
| --- a/assets/js/handlers/comment.js | |
| +++ b/assets/js/handlers/comment.js | |
| @@ -8,6 +8,12 @@ | |
| initialize: function() { | |
| + // Bind to global event `user.login`. | |
| + // window.Bppl.Event.on( 'user.login', this.functionToCall ); |
| diff --git a/application/helpers/user.php b/application/helpers/user.php | |
| index ce949c5..bf40944 100644 | |
| --- a/application/helpers/user.php | |
| +++ b/application/helpers/user.php | |
| @@ -1,4 +1,4 @@ | |
| -<?php | |
| +<?php | |
| /** | |
| * | |
| * Helper functions are intended for being accessible |
| diff --git a/assets/js/helpers/utilities.js b/assets/js/helpers/utilities.js | |
| index a34e884..21330fc 100644 | |
| --- a/assets/js/helpers/utilities.js | |
| +++ b/assets/js/helpers/utilities.js | |
| @@ -297,6 +297,18 @@ | |
| } | |
| /** | |
| + * Converts a cammelcased string to dashed one one | |
| + * `sampleString`, `sample-string` |