public function run() { self::fetch(); // if they're not running any kind of js analytics, redirect immediately if (self::is_url() && !Config::$analytics) { Response::redirect(self::$long); } self::$url = SnS::make_url(self::url()); return self::$template; }
public function save() { if (!$this->store_file()) { throw new Error_Save("failed to move"); } if (!parent::save()) { throw new Error_Save("failed to store"); } // override long now so we can display it properly $this->long = SnS::make_url("file/" . $this->short . "-" . $this->long); }
static function out() { return array('url' => SnS::make_url(self::$object->short), 'long' => self::$object->long, 'name' => self::$object->name); }
<meta name="author" content="Andre Bluehs"> <link rel="shortcut icon" href="http://abcdn.us/img/andrebluehs/favicon.png" /> <link rel="stylesheet" href="http://abcdn.us/css/andrebluehs/style.css" /> </head> <body> <div id='header'> <div id='header-left'> <h2>Short 'n Sweet</h2> </div> <div id='header-right'> <ul class='horizontal'> <li><a href='http://github.com/helloandre/shortnsweet/' target='_blank'>view source on github</a></li> </ul> </div> </div> <div id='sub-header'> <h1>Error</h1> </div> <div id='center' class='post'> <h2><a href="<?php echo SnS::make_url('install/'); ?> ">Try Again</a><h2> </div> </body>
<link rel="shortcut icon" href="http://abcdn.us/img/andrebluehs/favicon.png" /> <link rel="stylesheet" href="http://abcdn.us/css/andrebluehs/style.css" /> </head> <body> <div id='header'> <div id='header-left'> <h2>Short 'n Sweet</h2> </div> <div id='header-right'> <ul class='horizontal'> <li><a href='http://github.com/helloandre/shortnsweet/' target='_blank'>view source on github</a></li> </ul> </div> </div> <div id='sub-header'> <h1>Installation Complete!</h1> </div> <div id='center' class='post'> <h1>Remove the /config directory</h1> <h2><a href="<?php echo SnS::make_url(''); ?> ">Visit your site</a><h2> </div> </body>