Commits

Nick Freear  committed 85fc5ef

cc_code (Creative Commons), and test views

  • Participants
  • Parent commits 2d1dcf1

Comments (0)

Files changed (4)

File application/assets/layout-ci.css

 	-webkit-box-shadow: 0 0 8px #D0D0D0;
 }
 
-#container p, h2{
+#container p, h2, h3{
 	padding:0 15px;
 }

File application/controllers/test.php

+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+
+class Test extends MY_Controller {
+
+    public function __construct() {
+      parent::__construct();
+
+      header('Content-Type: text/html; charset=utf-8');
+	  $this->load->helper('url');
+    }
+
+	public function b2s_learn($layout = self::LAYOUT) {
+		$this->_load_layout($layout);
+
+		$view_data = array(
+			'cc_code' => $this->_get_cc_code(),
+		);
+
+		$this->layout->view('tests/test-b2s-learn', $view_data);
+	}
+	
+	public function index() {
+		redirect('test/b2s_learn');
+	}
+}
+

File application/views/cc_code/cc_code.php

+
+<a rel="license" href="http://creativecommons.org/licenses/<?php echo $cc_license ?>/2.0/uk/deed.en_GB"
+ ><img
+ alt="Creative Commons Licence"
+ style="border-width:0"
+ data-X-src="http://i.creativecommons.org/l/<?php echo $cc_license ?>/2.0/uk/88x31.png"
+ src=
+"<?php echo site_url('track/r') ?>/piwik/<?php echo $site_id ?>/cc:<?php echo $cc_license ?>/<?php echo $source_host ?>/<?php echo $source_path 
+  ?>?t=<?php echo urlencode($title) ?>&amp;debug=2"
+ /></a>
+ <br />
+ <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title"><?php echo $title ?></span>
+ by <a xmlns:cc="http://creativecommons.org/ns#" href="<?php echo $author_url ?>" property="cc:attributionName" rel="cc:attributionURL"><?php echo $author ?></a>
+ is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/deed.en_GB">Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England &amp; Wales License</a>.
+ <br />
+ Based on a work at <a xmlns:dct="http://purl.org/dc/terms/" href="<?php echo $source_url ?>" rel="dct:source"><?php echo $source_url ?></a>.

File application/views/tests/test-b2s-learn.php

+
+<h2>Creative Commons license tracker</h2>
+
+<p id=cc-code>
+<?php echo $cc_code ?>
+