Basic skeleton for static website
authorArtem Daniliants <artem@daniliants.com>
Tue, 30 Mar 2010 20:01:12 +0000 (23:01 +0300)
committerArtem Daniliants <artem@daniliants.com>
Tue, 30 Mar 2010 20:06:39 +0000 (23:06 +0300)
Server/.htaccess
Server/application/config/config.php
Server/application/config/database.php
Server/application/controllers/page.php [new file with mode: 0644]
Server/application/views/pages/base.php [new file with mode: 0644]
Server/application/views/pages/tracking.php [new file with mode: 0644]

index bffb566..17599f6 100644 (file)
@@ -2,7 +2,7 @@
 RewriteEngine On
 
 # Installation directory
-RewriteBase /projects/misc/speedfreak.git/Server
+RewriteBase /api
 
 # Protect application and system files from being viewed
 RewriteRule ^(application|modules|system) - [F,L]
index 112bc27..c6cf696 100644 (file)
@@ -4,7 +4,7 @@
  * then a full URL will be used, eg: http://localhost/kohana/. If it only includes
  * the path, and a site_protocol is specified, the domain will be auto-detected.
  */
-$config['site_domain'] = '/projects/misc/speedfreak.git/Server';
+$config['site_domain'] = '/api';
 
 /**
  * Force a default protocol to be used by the site. If no site_protocol is
index 60de5e4..74f4e0e 100644 (file)
@@ -31,7 +31,7 @@ $config['default'] = array
        (
                'type'     => 'mysql',
                'user'     => 'root',
-               'pass'     => '',
+               'pass'     => 'root',
                'host'     => 'localhost',
                'port'     => FALSE,
                'socket'   => FALSE,
diff --git a/Server/application/controllers/page.php b/Server/application/controllers/page.php
new file mode 100644 (file)
index 0000000..d47ca8d
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+class Page_Controller extends Template_Controller {
+
+       public $template = 'pages/base'; //defaults to template but you can set your own view file
+
+       public $auto_render = TRUE; //defaults to true, renders the template after the controller method is done
+
+       public function __construct()
+       {
+               parent::__construct(); //necessary
+       }
+
+       public function index()
+       {
+               $this->template->content= 'to be replaced';
+       }
+}
\ No newline at end of file
diff --git a/Server/application/views/pages/base.php b/Server/application/views/pages/base.php
new file mode 100644 (file)
index 0000000..fb9b2de
--- /dev/null
@@ -0,0 +1,15 @@
+<!-- Google analytics -->
+       <script type="text/javascript">
+       
+         var _gaq = _gaq || [];
+         _gaq.push(['_setAccount', 'UA-13272012-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>
+<!-- /Google analytics -->
\ No newline at end of file
diff --git a/Server/application/views/pages/tracking.php b/Server/application/views/pages/tracking.php
new file mode 100644 (file)
index 0000000..0915d1b
--- /dev/null
@@ -0,0 +1,29 @@
+<!-- Quantcast -->
+       <script type="text/javascript">
+       _qoptions={
+       qacct:"p-7cWGYT9IyknYs"
+       };
+       </script>
+       <script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
+       <noscript>
+       <img src="http://pixel.quantserve.com/pixel/p-7cWGYT9IyknYs.gif" style="display: none;" border="0" height="1" width="1"/>
+       </noscript>
+<!-- /Quantcast -->
+
+<!-- Compete -->
+       <script type="text/javascript">
+           __compete_code = '6274cefdf710bb98ba3b3393cea02554';
+           (function () {
+               var s = document.createElement('script'),
+                   d = document.getElementsByTagName('head')[0] ||
+                       document.getElementsByTagName('body')[0],
+                   t = 'https:' == document.location.protocol ?
+                       'https://c.compete.com/bootstrap/' :
+                       'http://c.compete.com/bootstrap/';
+               s.src = t + __compete_code + '/bootstrap.js';
+               s.type = 'text/javascript';
+               s.async = 'async';
+               if (d) { d.appendChild(s); }
+           }());
+       </script>
+<!-- /Compete -->
\ No newline at end of file