"Medium traffic" = able to handle around 50 concurrent users on average.
If you want to handle 100+ concurrent users with the same modest hardware see the Varnish section below.
- 4096 MB memory
- 125GB SSD
- 4 CPUs
- Cpanel
"Medium traffic" = able to handle around 50 concurrent users on average.
If you want to handle 100+ concurrent users with the same modest hardware see the Varnish section below.
Here are a few common tasks you might do in your templates, as they would be written in ExpressionEngine vs. Craft CMS.
<?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' |
<?php | |
// from http://php.net/manual/en/function.debug-backtrace.php#111255 | |
// adapted for codeigniter | |
// database/DB_driver.php method query() | |
//... | |
// Save the query for debugging | |
if ($this->save_queries == TRUE) | |
{ | |
$this->queries[] = $sql . "\n# ".get_caller_info(); |
<?php | |
class MyCompany_MyModul_Model_Observer | |
{ | |
/** | |
* | |
* | |
*/ | |
public function addDisableValidatFromKey(Varien_Event_Observer $observer) | |
{ |
{paginate} | |
{pagination_links} | |
<ul> | |
{previous_page} | |
<li><a href="{pagination_url}" class="page-previous"><</a></li> | |
{/previous_page} | |
{first_page} | |
<li><a href="{pagination_url}" class="page-first">1</a> …</li> | |
{/first_page} |
{exp:stash:set_list name="entries" parse_tags="yes"}
{exp:channel:entries channel="my_channel" orderby="date" sort="desc" dynamic="no" limit="999"}
{stash:title}{title}{/stash:title}
{stash:date_day}{entry_date format="%d"}{/stash:date_day}
{stash:date_month}{entry_date format="%m"}{/stash:date_month}
{stash:date_year}{entry_date format="%Y"}{/stash:date_year}
{stash:date_sort}{entry_date format="%Y-%F"}{/stash:date_sort}
{stash:date_machine}{entry_date}{/stash:date_machine}
{/exp:channel:entries}
{/exp:stash:set_list}
<?php | |
/** | |
* @file | |
* Class PdfParser | |
* | |
* @author : Sebastien MALOT <[email protected]> | |
* @date : 2013-08-08 | |
* | |
* References : |
##Create an alias to MAMP's PHP installation
To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.
Within the terminal, run:
nano ~/.bash_profile
This will open nano with the contents, at the top in a blank line add the following line:
<?php | |
// Backwards-compatibility with pre-2.6 Localize class | |
$format_date_fn = (version_compare(APP_VER, '2.6', '>=')) ? 'format_date' : 'decode_date'; | |
echo $this->EE->localize->{$format_date_fn}('%Y-%m-%d', $this->EE->localize->now); | |
// 2013-04-18 |