How to design user habits


Created by: Adam Patterson

Posted in: Video

Tags:

Geo Location update


I have made some subtle but important updates to the GEO api used for statistics.

Previously geo.tentaclecms.com was pulling from another API, this "Worked" but occasionally would throw an error caused by a hiccup in the connection.  After downloading a rather large geo location database and creating my own service I decided to benchmark the two versions of the API using Wbench I was able to get a average response time down from 1300ms to 100ms.

Not to shabby, and hopefully this will solve some of the errors people were experiencing.

Created by: Adam Patterson

Posted in: Code Performance

Tags: API geo

A new Event API


Here is an overview of the event API in Tentacle, One thing that was really important to use was the ability to chain methods giving us the ability to filter and process a chain of events.

At the moment there are a number of hooks and triggers throughout the system responsible for triggering actions in the site.

Registering an event:

function method_one (){
echo 'one ';
}
function method_two (){
echo 'two ';
}
event::on('event_trigger', 'method_one', 2);
event::on('event_trigger', 'method_two', 1);
event::trigger('event_trigger');

Turning events off:

event::off('event_trigger');
event::off('event_trigger', 'method_two');
event::off(null, 'method_one');

Test if an event exists:

var_dump(event::exists('event_trigger'));

boolean true

Trigger an event:

function method_name ( )
{
echo 'my method name';
}
event::on('event_name', 'method_name');
event::trigger('event_name');

my method name

Trigger an event and pass data to it:

function method_data ( $text = '' )
{
echo ' 1  my method data is '.$text;
}
function method_data_two ( $text = '' )
{
echo ' 2 my method data is '.$text;
}
event::on('event_data', 'method_data', 1);
event::on('event_data', 'method_data_two', 2);
event::trigger('event_data', 'this');

1 my method data is this 2 my method data is this

Triggering a class and passing data to the method

class my
{
static function method_name ( $text = '' )
{
echo 'my class method name is '.$text;
}
}
event::on('event_class', 'my::method_name');
event::trigger('event_class', 'Lary');

my class method name is Lary

Event chaining

function method_sad ( $text = '' )
{
return str_replace('blah', "sad", $text);
}
function method_happy ( $text = '' )
{
return str_replace('sad', "happy", $text);
}
event::on('event_mood', 'method_sad', 1);
event::on('event_mood', 'method_happy', 2);
echo event::filter('event_mood', 'I am blah!');

I am happy!

Created by: Adam Patterson

Posted in: Announcements Code

Tags: API php event trigger

Milestones and some pebbles.


After a few issues last week in dealing with a JavaScript update that broke a number of other plugins, I had to take a good look at what we were using and scrap a number of "test" plugins.

CKEditor is now implemented into the site, along with CodeMirror syntax highlighting.

This could replace the HTML mode on its own, but I think it still needs to be tested. Out of the box is not as nice as what we already have.

I re-wrote the Media manager and is now JavaScript based rather than posting a form request.  In the end I think this will help in a move towards something like Backbone JS.

As the backend matures the front end will start to take shape,  The UX of Tentacle will also begin to take shape.

Hurdles

I have given a few demos of the CMS to a few different kinds of people. Developers, Copy Writers and people responsible for pitching to clients. It became clear to me that we have a great tool here but need to beef up the documentation, provide examples, and get some themes ready.

The next phase coming up will be design centered around the UI and UX of the admin section as well as creating a core theme for the site its self, This will include documenting the process.

Created by: Adam Patterson

Posted in: Announcements Code Update

Tags: CKEditor

Digital Ocean


digital-ocean-logo-4x3
After many happy years at my old host I finally took the plunge and moved to a VPS server at Digital Ocean. For $5 a month giving me 512mb of ram and 20 gigs of SSD space its hard to go wrong.

This would be my first production VPS, I have played with them in the past but the price was always a little to much for me.

If you notice something wrong please let me know: hello@tentaclecms.com

Created by: Adam Patterson

Posted in: Announcements

Tags: Hosting vps server