This file contains 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 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 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 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
ul.pt-pill { display: inline-block; margin: 5px 0; padding: 0; list-style-type: none; height: 18px; cursor: default; white-space: nowrap; | |
-webkit-user-select: none; -moz-user-select: none; } | |
ul.pt-pill li { float: left; margin: 0 -1px 0 0; padding: 0 7px; border: 1px solid #a8b1b3; line-height: 18px; background: #fff url(../images/option_bg.gif) repeat-x; cursor: pointer; } | |
ul.pt-pill li:first-child { -webkit-border-top-left-radius: 3px; -webkit-border-bottom-left-radius: 3px; -moz-border-radius: 3px 0 0 3px; } | |
ul.pt-pill li:last-child { -webkit-border-top-right-radius: 3px; -webkit-border-bottom-right-radius: 3px; -moz-border-radius: 0 3px 3px 0; } | |
ul.pt-pill li.selected { background: #fff; position: relative; z-index: 1; text-shadow: 0 1px #fff; cursor: default; | |
background: url(../images/selected_bg.gif) repeat-x; |
This file contains 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
// Add Autosave support | |
if(typeof EE.publish == "object" && EE.publish.autosave == "object" && EE.publish.autosave.interval > 10) | |
{ | |
// 3 seconds before the defined interval | |
interval = (EE.publish.autosave.interval - 3) * 1000; | |
setInterval({ | |
run: function() { | |
// Do whatever you need to do here, probably an ajax request, to save data to custom table. | |
} |
This file contains 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
ALTER TABLE exp_channel_titles ADD INDEX sdi(sticky, entry_date, entry_id) |
This file contains 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 () { | |
function c() { | |
var e = document.createElement("link"); | |
e.setAttribute("type", "text/css"); | |
e.setAttribute("rel", "stylesheet"); | |
e.setAttribute("href", f); | |
e.setAttribute("class", l); | |
document.body.appendChild(e) | |
} | |
function h() { |
This file contains 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:form channel="pages" return="forms/channel-edit/ENTRY_ID" entry_id="{segment_3}" | |
include_jquery="yes" | |
include_assets="yes" | |
error_handling="inline" | |
use_live_url="yes" | |
datepicker="no"} | |
{field_errors}{error}{/field_errors} | |
<label for="title">Title</label> |
This file contains 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: | |
install: '1' | |
version: '56' | |
composer: '1' | |
composer_home: '' | |
modules: | |
php: | |
- cli | |
- intl | |
- mcrypt |
This file contains 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
backend default { | |
# .host = "XXX.XXX.XXX.XXX"; | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
} | |
sub vcl_recv { | |
# Forward client's IP to backend | |
remove req.http.X-Forwarded-For; |
OlderNewer