コード例 #1
0
ファイル: YelpController.php プロジェクト: nowarena/homestead
 public function __construct()
 {
     $keyword = Site::getInstance()->getSubdomain();
     $twitterScreenName = Site::getInstance()->getTwitterScreenName();
     $scraperObj = false;
     $this->socialMediaObj = new SocialMedia($keyword, 'yelp', $scraperObj);
     $this->yelpAdapter = new YelpAdapter();
 }
コード例 #2
0
 /**
  * Initialize objects that will do the work
  */
 public function __construct()
 {
     $keyword = Site::getInstance()->getSubdomain();
     $twitterScreenName = Site::getInstance()->getTwitterScreenName();
     $scraperObj = false;
     if ($keyword == 'nba') {
         $scraperObj = new Scraper($keyword);
     }
     $this->socialMediaObj = new SocialMedia($keyword, 'twitter', $scraperObj);
     $this->twitterAdapter = new TwitterAdapter($twitterScreenName);
 }
コード例 #3
0
 public function __construct()
 {
     $keyword = Site::getInstance()->getSubdomain();
     $instagramScreenName = Site::getInstance()->getInstagramScreenName();
     $instagramAccessToken = env("AK_INSTAGRAM_ACCESS_TOKEN");
     $scrapeObj = false;
     if ($keyword == 'nba') {
         $scrapeObj = new Scraper($keyword);
     }
     $this->socialMediaObj = new SocialMedia($keyword, 'instagram', $scrapeObj);
     $this->instagramAdapter = new InstagramAdapter($instagramScreenName, $instagramAccessToken, $this->socialMediaObj);
 }
コード例 #4
0
ファイル: helpers.php プロジェクト: nowarena/homestead
function renderCategoryPath($catPathArr, $route = '/socialmedia/')
{
    $nameShort = Site::getInstance()->getNameShort();
    echo "<a class='catPath' href='" . url() . "/socialmedia";
    if (Site::getCategoryDepth() < 3) {
        echo '/all';
    }
    echo "'>" . $nameShort . "</a> &raquo; ";
    if (count($catPathArr) > 0) {
        foreach ($catPathArr as $key => $obj) {
            if ($key > 0) {
                echo " &raquo; ";
            }
            echo "<a class='catPath' href='" . $route . $obj->slug . "'>" . $obj->display_name . "</a>";
        }
        echo "<br>";
    } else {
        echo "<br>";
    }
}
コード例 #5
0
ファイル: login.blade.php プロジェクト: nowarena/homestead
<?php

use App\Site;
?>


@extends('app')

@section('content')
<?php 
if (true) {
    ?>
    <a href='http://<?php 
    echo Site::getInstance()->getDomain();
    ?>
/login/facebook'>Login with Facebook</a> 
<?php 
} else {
    ?>

<div class="container-fluid">
	<div class="row">
		<div class="col-md-8 col-md-offset-2">
			<div class="panel panel-default">
				<div class="panel-heading">Login</div>
				<div class="panel-body">
					@if (count($errors) > 0)
						<div class="alert alert-danger">
							<strong>Whoops!</strong> There were some problems with your input.<br><br>
							<ul>
								@foreach ($errors->all() as $error)
コード例 #6
0
ファイル: app.blade.php プロジェクト: nowarena/homestead
<?php

use App\Site;
$site = Site::getInstance();
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>
    <?php 
if ($site::getSubdomain() == 'abbotkinneyblvd') {
    echo 'AbbotKinneyBl.com - what\'s coming up and going down on Abbot Kinney Blvd.';
} else {
    echo $site::getPageTitle();
}
?>
    </title>

	<link href="/css/app.css" rel="stylesheet">
	
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>	
	
	<!-- bootstrap -->
	<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
	<!-- Optional theme -->
    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
    <!-- Latest compiled and minified JavaScript -->
    <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
コード例 #7
0
ファイル: app.php プロジェクト: nowarena/homestead
<?php

use App\Site;
return ['domain' => env('DOMAIN'), 'subdomain' => Site::getInstance()->getSubdomain(), 'debug' => env('APP_DEBUG'), 'url' => Site::getInstance()->getUrl(), 'timezone' => 'UTC', 'locale' => 'en', 'fallback_locale' => 'en', 'key' => env('APP_KEY', 'SomeRandomString'), 'cipher' => 'AES-256-CBC', 'log' => 'single', 'providers' => [Illuminate\Foundation\Providers\ArtisanServiceProvider::class, Illuminate\Auth\AuthServiceProvider::class, Illuminate\Broadcasting\BroadcastServiceProvider::class, Illuminate\Bus\BusServiceProvider::class, Illuminate\Cache\CacheServiceProvider::class, Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, Illuminate\Routing\ControllerServiceProvider::class, Illuminate\Cookie\CookieServiceProvider::class, Illuminate\Database\DatabaseServiceProvider::class, Illuminate\Encryption\EncryptionServiceProvider::class, Illuminate\Filesystem\FilesystemServiceProvider::class, Illuminate\Foundation\Providers\FoundationServiceProvider::class, Illuminate\Hashing\HashServiceProvider::class, Illuminate\Mail\MailServiceProvider::class, Illuminate\Pagination\PaginationServiceProvider::class, Illuminate\Pipeline\PipelineServiceProvider::class, Illuminate\Queue\QueueServiceProvider::class, Illuminate\Redis\RedisServiceProvider::class, Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, Illuminate\Session\SessionServiceProvider::class, Illuminate\Translation\TranslationServiceProvider::class, Illuminate\Validation\ValidationServiceProvider::class, Illuminate\View\ViewServiceProvider::class, App\Providers\AppServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, Thujohn\Twitter\TwitterServiceProvider::class, Laravel\Socialite\SocialiteServiceProvider::class, 'Collective\\Html\\HtmlServiceProvider'], 'aliases' => ['App' => Illuminate\Support\Facades\App::class, 'Artisan' => Illuminate\Support\Facades\Artisan::class, 'Auth' => Illuminate\Support\Facades\Auth::class, 'Blade' => Illuminate\Support\Facades\Blade::class, 'Bus' => Illuminate\Support\Facades\Bus::class, 'Cache' => Illuminate\Support\Facades\Cache::class, 'Config' => Illuminate\Support\Facades\Config::class, 'Cookie' => Illuminate\Support\Facades\Cookie::class, 'Crypt' => Illuminate\Support\Facades\Crypt::class, 'DB' => Illuminate\Support\Facades\DB::class, 'Eloquent' => Illuminate\Database\Eloquent\Model::class, 'Event' => Illuminate\Support\Facades\Event::class, 'File' => Illuminate\Support\Facades\File::class, 'Hash' => Illuminate\Support\Facades\Hash::class, 'Input' => Illuminate\Support\Facades\Input::class, 'Inspiring' => Illuminate\Foundation\Inspiring::class, 'Lang' => Illuminate\Support\Facades\Lang::class, 'Log' => Illuminate\Support\Facades\Log::class, 'Mail' => Illuminate\Support\Facades\Mail::class, 'Password' => Illuminate\Support\Facades\Password::class, 'Queue' => Illuminate\Support\Facades\Queue::class, 'Redirect' => Illuminate\Support\Facades\Redirect::class, 'Redis' => Illuminate\Support\Facades\Redis::class, 'Request' => Illuminate\Support\Facades\Request::class, 'Response' => Illuminate\Support\Facades\Response::class, 'Route' => Illuminate\Support\Facades\Route::class, 'Schema' => Illuminate\Support\Facades\Schema::class, 'Session' => Illuminate\Support\Facades\Session::class, 'Storage' => Illuminate\Support\Facades\Storage::class, 'URL' => Illuminate\Support\Facades\URL::class, 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, 'Twitter' => Thujohn\Twitter\Facades\Twitter::class, 'Socialite' => Laravel\Socialite\Facades\Socialite::class, 'Form' => 'Collective\\Html\\FormFacade', 'Html' => 'Collective\\Html\\HtmlFacade']];
コード例 #8
0
ファイル: ttwitter.php プロジェクト: nowarena/homestead
<?php

// set the twitter keys per subdomain by retrieving them from the .env file and setting them here
//
use App\Site;
$subdomain = Site::getInstance()->getSubdomain();
$consumerKey = '';
$consumerSecret = '';
$accessToken = '';
$accessTokenSecret = '';
if ($subdomain == 'nba') {
    $consumerKey = env('NBA_CONSUMER_KEY');
    $consumerSecret = env('NBA_CONSUMER_SECRET');
    $accessToken = env('NBA_ACCESS_TOKEN');
    $accessTokenSecret = env('NBA_ACCESS_TOKEN_SECRET');
} else {
    if ($subdomain == 'abbotkinneyblvd') {
        $consumerKey = env('AK_CONSUMER_KEY');
        $consumerSecret = env('AK_CONSUMER_SECRET');
        $accessToken = env('AK_ACCESS_TOKEN');
        $accessTokenSecret = env('AK_ACCESS_TOKEN_SECRET');
    } else {
        /*
        print_r(get_included_files());
        var_dump($subdomain);
        var_dump(Site::getInstance()->getSubdomainArr());
        //dd("subdomain not set");
        */
    }
}
// You can find the keys here : https://apps.twitter.com/
コード例 #9
0
ファイル: _footer.blade.php プロジェクト: nowarena/homestead
<div style='clear:both;'></div>
<hr>

<ul style="margin-left:-130px;margin-right:-130px;">
    
<?php 
use App\Site;
$subdomainArr = Site::getInstance()->getSubdomainData();
foreach ($subdomainArr as $key => $arr) {
    if ($key == '' || $key == 'www') {
        continue;
    }
    echo "<li>";
    echo "<span class='mainPageCategoryName'>";
    echo $arr['nameShort'];
    echo "</span><br>";
    echo "<a href='" . $arr['baseUrl'] . "/members'>Members:</a> ";
    echo " &nbsp; ";
    echo "<a href='" . $arr['baseUrl'] . "/members/create'> Create</a> ";
    echo " &nbsp; &#183; &nbsp; ";
    echo "<a href='" . $arr['baseUrl'] . "/categories'>Categories:</a> ";
    echo " &nbsp; ";
    echo "<a href='" . $arr['baseUrl'] . "/categories/create'>Create</a> ";
    echo " &nbsp; ";
    echo "<a href='" . $arr['baseUrl'] . "/categories/show'>Sort</a> ";
    echo " &nbsp; &#183; &nbsp; ";
    echo "<a href='" . $arr['baseUrl'] . "/twitter/getfeed'>Add Twitter Feed</a> ";
    echo " &nbsp; &#183; &nbsp; ";
    echo "<a href='" . $arr['baseUrl'] . "/twitter/getfriends'>Add Twitter Friends</a> ";
    echo " &nbsp; &#183; &nbsp; ";
    echo "<a href='" . $arr['baseUrl'] . "/instagram/getfriends'>Add Instagram Friends</a> ";
コード例 #10
0
ファイル: database.php プロジェクト: nowarena/homestead
<?php

use App\Site;
return ['fetch' => PDO::FETCH_CLASS, 'default' => 'mysql', 'connections' => ['sqlite' => ['driver' => 'sqlite', 'database' => storage_path() . '/database.sqlite', 'prefix' => ''], 'mysql' => ['driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), 'database' => Site::getInstance()->getDatabase(), 'username' => env('DB_USERNAME', ''), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false], 'nowarenausers' => ['driver' => 'mysql', 'host' => 'localhost', 'database' => 'nowarenausers', 'username' => env('DB_USERNAME', ''), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false], 'nba' => ['driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), 'database' => 'nba', 'username' => env('DB_USERNAME', ''), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false]], 'migrations' => 'migrations', 'redis' => ['cluster' => false, 'default' => ['host' => '127.0.0.1', 'port' => 6379, 'database' => 0]]];
コード例 #11
0
<?php

use App\Site;
?>

@extends('app')

@section('content')


<?php 
echo "<div style='max-width:700px;margin:0px auto;'>";
?>
<h2 class='site_subject'><?php 
echo Site::getInstance()->getNameShort();
?>
 Social Media</h2>
<?php 
renderTree($parentChildArr, $categoriesArr);
echo "</div>";
?>
 

@endsection