Skip to content

Commit

Permalink
Moving to folder
Browse files Browse the repository at this point in the history
Moving to its own folder for easy of git

Signed-off-by: thebestsophist <bernardy@enguin.com>
  • Loading branch information
thebestsophist committed Mar 6, 2012
0 parents commit c58d999
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
50 changes: 50 additions & 0 deletions screen_detection/extension.driver.php
@@ -0,0 +1,50 @@
<?php

Class Extension_ScreeDetection extends Extension {

public function about() {
return array(
'author' => array(
'email' => 'hello@enguin.com',
'name' => 'Enguin Design',
'website' => 'http://enguindesign.com'
),
'description' => 'This extention adds user screen information to the symphony param pool for server-side optimizations for responsive web design.',
'name' => 'Screen Detection',
'release-date' => '2012-03-06',
'version' => '2012.03.01'
);
}

public function install() {
Symphony::Configuration()->set('screen_detection_enabled', 'true', 'screen_detection');
}

public function uninstall() {
Symphony::Configuration()->remove('screen_detection');
}

public function getSubscribedDelegates(){
return array(

array(
'page' => '/frontend/',
'delegate' => 'FrontendParamsResolve',
'callback' => 'addParam'
)
);
}


public function addParam($context) {

$screen_height = !empty($_COOKIE['screen-height']) ? $_COOKIE['screen-height'] : 0;
$screen_width = !empty($_COOKIE['screen-width']) ? $_COOKIE['screen-width'] : 0;
$screen_orientation = !empty($_COOKIE['screen-orientation']) ? $_COOKIE['screen-orientation'] : 0;


}

}

?>
1 change: 1 addition & 0 deletions screen_detection/readme.md
@@ -0,0 +1 @@
# Screen detection

0 comments on commit c58d999

Please sign in to comment.