Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Orchestra - fix syntax error #6

Open
wants to merge 32 commits into from

3 participants

@drnic

No description provided.

gwoo and others added some commits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 25, 2011
  1. @gwoo

    updating lithium

    gwoo authored
  2. @gwoo

    adding orchestra config

    gwoo authored
  3. @gwoo

    adding mongo connection

    gwoo authored
  4. @gwoo

    fixing error in bootstrap

    gwoo authored
  5. @gwoo

    adding default timezone

    gwoo authored
  6. @gwoo
  7. @gwoo

    updating copyright in the footer

    gwoo authored
  8. @gwoo

    changing mongo connection

    gwoo authored
  9. @gwoo

    updating mongo connection

    gwoo authored
Commits on Sep 14, 2011
  1. @gwoo
  2. @gwoo
  3. @gwoo

    adding version numbers to css.

    gwoo authored
  4. @gwoo
  5. @gwoo
  6. @gwoo
Commits on Sep 16, 2011
  1. @pointlessjon

    Orchestra db config

    pointlessjon authored
  2. @pointlessjon
  3. @pointlessjon

    Typo in hostname

    pointlessjon authored
  4. @pointlessjon
  5. @pointlessjon
Commits on Sep 19, 2011
  1. @pointlessjon
  2. @pointlessjon

    adding google analytics

    pointlessjon authored
Commits on Nov 9, 2011
  1. @pointlessjon
Commits on Apr 11, 2012
  1. @gwoo
Commits on Apr 13, 2012
  1. @gwoo
  2. @gwoo
  3. @gwoo

    updating orchestra connections

    gwoo authored
  4. @gwoo

    updating layout

    gwoo authored
  5. @gwoo
  6. @gwoo

    updating analytics

    gwoo authored
  7. @gwoo

    adding redis for sessions

    gwoo authored
Commits on Jul 20, 2012
  1. @drnic

    fix syntax double-colon

    drnic authored
This page is out of date. Refresh to see the latest.
View
5 config/bootstrap.php
@@ -6,6 +6,8 @@
* @license http://opensource.org/licenses/bsd-license.php The BSD License
*/
+date_default_timezone_set('America/Los_Angeles');
+
/**
* This is the primary bootstrap file of your application, and is loaded immediately after the front
* controller (`webroot/index.php`) is invoked. It includes references to other feature-specific
@@ -31,6 +33,9 @@
*/
require __DIR__ . '/bootstrap/libraries.php';
+/* Add Orchestra Configuration */
+require __DIR__ . '/bootstrap/orchestra.php';
+
/**
* The error configuration allows you to use the filter system along with the advanced matching
* rules of the `ErrorHandler` class to provide a high level of control over managing exceptions in
View
16 config/bootstrap/connections.php
@@ -10,20 +10,26 @@
Connections::add('default', array(
'adapter' => 'MongoDb',
- 'host' => 'localhost',
- 'database' => 'lithosphere'
+ 'host' => 'dbh43.mongolab.com:27437',
+ 'database' => 'orchestra_7fe32b26_dae1e',
+ 'login' => '7fe32b26',
+ 'password' => 'mofa7b9m641mdh379abfsukd3v',
+ 'timeout' => false
));
Connections::add('test', array(
'adapter' => 'MongoDb',
'host' => 'localhost',
- 'database' => 'test'
+ 'database' => 'lithosphere-testing',
));
Connections::add('li3_users', array(
'adapter' => 'MongoDb',
- 'host' => 'localhost',
- 'database' => 'lithosphere'
+ 'host' => 'dbh43.mongolab.com:27437',
+ 'database' => 'orchestra_7fe32b26_dae1e',
+ 'login' => '7fe32b26',
+ 'password' => 'mofa7b9m641mdh379abfsukd3v',
+ 'timeout' => false
));
?>
View
27 config/bootstrap/orchestra.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Orchestra.io Bootstap for Lithium
+ *
+ * add `require __DIR__ . '/bootstrap/orchestra.php';` immediately after
+ * `require __DIR__ . '/bootstrap/libraries.php';` in bootstrap.php
+ */
+use lithium\core\Libraries;
+use lithium\action\Dispatcher;
+
+Dispatcher::applyFilter('run', function($self, $params, $chain) {
+ $params['request']->url = "";
+
+ if (isset($_SERVER['REQUEST_URI']) && strlen(trim($_SERVER['REQUEST_URI'])) > 0) {
+ $params['request']->url = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
+ }
+ return $chain->next($self, $params, $chain);
+});
+
+$resources = str_replace("//", "/", sys_get_temp_dir() . '/resources');
+
+if (!is_dir($resources)) {
+ mkdir($resources, 0777, true);
+ mkdir("{$resources}/logs", 0777, true);
+ mkdir("{$resources}/tmp/cache/templates", 0777, true);
+}
+Libraries::add('app', array('default'=> true, 'resources' => $resources));
View
11 config/bootstrap/session.php
@@ -12,11 +12,16 @@
*/
use lithium\storage\Session;
+$redis = array(
+ 'session.save_handler' => 'redis',
+ 'session.save_path' => 'tcp://4cfbe0439d177feda6e7390e1f14fce1@drum.redistogo.com:9148'
+);
+
Session::config(array(
'cookie' => array('adapter' => 'Cookie'),
- 'li3_user' => array('adapter' => 'Php'),
- 'default' => array('adapter' => 'Php'),
- 'cooldown' => array('adapter' => 'Php', 'expires' => 10)
+ 'li3_user' => array('adapter' => 'Php') + $redis,
+ 'default' => array('adapter' => 'Php') + $redis,
+ 'cooldown' => array('adapter' => 'Php', 'expires' => 10) + $redis,
));
?>
View
22 views/layouts/default.html.php
@@ -11,7 +11,7 @@
<head>
<?php echo $this->html->charset();?>
<title>#li3 > ▴❍ > <?php echo $this->title?></title>
- <?php echo $this->html->style(array('reset', 'base', 'forms', 'polish', 'sphere'));?>
+ <?php echo $this->html->style(array('reset', 'base.css?1', 'forms.css?1', 'polish.css?1', 'sphere.css?1'));?>
<?php echo $this->scripts();?>
<?php echo $this->html->link('Icon', null, array('type' => 'icon'));?>
</head>
@@ -236,16 +236,17 @@
<p class="copyright">&copy; 2011 and beyond, <?php echo $this->html->link('the union of rad', 'http://union-of-rad.org/'); ?>
&nbsp;&nbsp;
powered by <?php echo $this->html->link('lithium', 'http://lithify.me'); ?>,
- and <?php echo $this->html->link('mongodb', 'http://mongodb.org'); ?>
+ <?php echo $this->html->link('mongodb', 'http://mongodb.org'); ?>
+ and <?php echo $this->html->link('orchestra', 'http://orchestra.io'); ?>
&nbsp;&nbsp;
- <?php echo $this->html->link('open source', 'http://github.com/pointlessjon/sphere'); ?>
+ <?php echo $this->html->link('open source', 'http://github.com/UnionOfRAD/sphere'); ?>
&nbsp;&nbsp;
<?php echo $this->html->link('@lithified', 'http://twitter.com/lithified'); ?></p>
</div>
<?php echo $this->html->script(array(
"jquery-1.6.2.min",
"jquery.xdomainajax",
- "sphere",
+ "sphere.js?1",
"jquery.oembed.2",
"pretty.date",
// "showdown/showdown",
@@ -270,5 +271,18 @@
});
</script>
<?php if (isset($this->viewJs)) echo $this->viewJs; ?>
+ <script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-30869966-1']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+ </script>
</body>
</html>
Something went wrong with that request. Please try again.