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
<snippet> | |
<content><![CDATA[ | |
/** | |
* Get $2 | |
* | |
* @return ${3:[type]} $2 | |
*/ | |
$1.prototye.get${1/(.*)/\u$2/} = function() | |
{ | |
return this.${2:$SELECTION}; |
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 core_template_route($uri_string) | |
{ | |
ee()->your_lib_or_model->load_routes(); | |
// Rest of your hook processing, if any. | |
} | |
public function load_routes() |
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
#!/bin/bash | |
set -o errexit | |
# Author: David Underhill | |
# http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/ | |
# Script to permanently delete files/folders from your git repository. To use | |
# it, cd to your repository's root and then run the script with a list of paths | |
# you want to delete, e.g., git-delete-history path1 path2 | |
if [ $# -eq 0 ]; then |
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
This is a test case based on a discussion with @jacobrussel. He states that all EE sites | |
should prefix links with a single /, relative to the domain root. I argue that you should | |
not assume all developers work from the root of a development domain. With MAMP its easy | |
to setup a vhost, and hard code all your template links such as href="/some/path", but | |
this completely breaks if someone has to run the site on a server in which they can't | |
run it at the root of the domain, such as http://dev.server.com/~user/the-site/. | |
I recommend that links should use {path="some/page"} or more preferablly {site_url}some/page | |
for maximum portability, but Jacob states that adds extra overhead to parse all the {site_url} | |
variables. To test this case, I created a blank template in EE, and put in {site_url} 1000 times. |
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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/* | |
This is the file unique to each environment type, can be: | |
config.local.php | |
config.production.php | |
config.staging.php | |
*/ | |
/* |
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
diff --git a/third_party/publisher/libraries/Publisher/Publisher_parser.php b/third_party/publisher/libraries/Publisher/Publisher_parser.php | |
index fb703a5569cd7dfd85094563159c1dfd31ff5bb8..0d1aa66df547d92315a8f8a68339925e69cda4f9 100644 | |
--- a/third_party/publisher/libraries/Publisher/Publisher_parser.php | |
+++ b/third_party/publisher/libraries/Publisher/Publisher_parser.php | |
@@ -321,22 +321,30 @@ class Publisher_parser { | |
$form_tag_full = str_replace($content_matches[0][$k], $str, $form_tag_full); | |
} | |
// Low Search specific, don't like doing this. Abstract it out later. | |
+ // Ideally there would be a hook in the form method in EE. | |
elseif ($name == 'params' && array_key_exists('low_search', ee()->addons->get_installed('modules'))) |
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
First, create a couple new folders: | |
cd ~/ | |
mkdir Scripts | |
mkdir Screenshots | |
cd Screenshots | |
mkdir cron | |
cd ~/Scripts | |
vim screencapture.sh |
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 my_tag() | |
{ | |
$this->_prep_no_results('prefix:no_results'); | |
... | |
return $tagdata; | |
} |
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 install_move_data() | |
{ | |
set_time_limit(2400); | |
$sql = array(); | |
$sql[] = "CREATE TABLE `{$this->EE->db->dbprefix}publisher_titles` LIKE `{$this->EE->db->dbprefix}channel_titles`"; | |
$sql[] = "INSERT INTO `{$this->EE->db->dbprefix}publisher_titles` SELECT * FROM `{$this->EE->db->dbprefix}channel_titles`"; | |
$sql[] = "CREATE TABLE `{$this->EE->db->dbprefix}publisher_data` LIKE `{$this->EE->db->dbprefix}channel_data`"; |