Permalink
Browse files

Add visualping

  • Loading branch information...
fulldecent committed Apr 20, 2015
1 parent 4f9156e commit 4704c0848b5c222c5e58503f7c449308b253df63
Showing with 6 additions and 3 deletions.
  1. +1 −1 index.php
  2. +2 −1 sources/Controllers/MainPageController.php
  3. +3 −1 sources/Views/MainPageView.php
View
@@ -16,7 +16,7 @@
// Set up environment
define('CAMERALIFE_VERSION', '2.7.0a6');
-define('BASE_URL', rtrim(dirname($_SERVER['PHP_SELF']), '/'));
+define('BASE_URL', 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/'));
define('BASE_DIR', dirname(__FILE__));
require 'vendor/autoload.php';
require 'sources/autoload.php';
@@ -13,7 +13,7 @@
class MainPageController extends HtmlController
{
- public static function getUrl()
+ public static function getUrlForIDWithParameters($modelId, $parameters)
{
return constant('BASE_URL') . '/';
}
@@ -76,6 +76,7 @@ public function handleGet($get, $post, $files, $cookies)
}
$view->rootOpenGraph = new FolderController('/');
+ $view->mainPageOpenGraph = $this;
$view->tagCollections = Models\TagCollection::getCollections();
$view->render();
@@ -48,6 +48,8 @@ class MainPageView extends View
public $adminUrl;
public $rootOpenGraph;
+
+ public $mainPageOpenGraph;
/**
* Render the view to standard output
@@ -87,7 +89,7 @@ class="fa fa-star"></i> Star us on GitHub</a> to get important security updates<
<div class="row">
<div class="col-sm-7">
- <h2>New Folders <a class="btn btn-default"><i class="fa fa-rss"></i></a></h2>
+ <h2>New Folders <a class="btn btn-default" href="http://visualping.io/?url=<?= htmlspecialchars($this->mainPageOpenGraph->url) ?>"><i class="fa fa-rss"></i></a></h2>
<table class="table">
<?php
foreach ($this->folderAndPhotoOGs as $folderAndPhotoOG) {

0 comments on commit 4704c08

Please sign in to comment.