-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
481daa8
commit 2a4b73f
Showing
18 changed files
with
244 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
composer.phar | ||
.DS_Store | ||
Thumbs.db | ||
bower_components | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
<?php | ||
|
||
require __DIR__.'/vendor/autoload.php'; | ||
/* | ||
* This file is part of Flarum. | ||
* | ||
* (c) Toby Zerner <toby.zerner@gmail.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
return 'Flarum\Embed\Extension'; | ||
use Flarum\Embed\Listener; | ||
use Illuminate\Contracts\Events\Dispatcher; | ||
|
||
return function (Dispatcher $events) { | ||
$events->subscribe(Listener\AddEmbedRoute::class); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,35 @@ | ||
{ | ||
"name": "flarum/embed", | ||
"description": "Embed Flarum discussions as comments for your blog.", | ||
"type": "flarum-extension", | ||
"keywords": ["discussion"], | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Toby Zerner", | ||
"email": "toby.zerner@gmail.com" | ||
} | ||
], | ||
"support": { | ||
"issues": "https://github.com/flarum/core/issues", | ||
"source": "https://github.com/flarum/embed" | ||
}, | ||
"require": { | ||
"flarum/core": "^0.1.0-beta.3" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Flarum\\Embed\\": "src/" | ||
} | ||
}, | ||
"extra": { | ||
"flarum-extension": { | ||
"title": "Embed", | ||
"icon": { | ||
"name": "code", | ||
"backgroundColor": "#B9D233", | ||
"color": "#fff" | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script compiles the extension so that it can be used in a Flarum | ||
# installation. It should be run from the root directory of the extension. | ||
|
||
base=$PWD | ||
|
||
cd $base | ||
composer install --prefer-dist --optimize-autoloader --ignore-platform-reqs --no-dev | ||
cd "${base}/js" | ||
|
||
if [ -f bower.json ]; then | ||
bower install | ||
fi | ||
|
||
for app in forum admin; do | ||
cd "${base}/js" | ||
|
||
if [ -d $app ]; then | ||
cd $app | ||
|
||
cd "${base}/js/forum" | ||
npm install | ||
gulp --production | ||
if [ -f bower.json ]; then | ||
bower install | ||
fi | ||
|
||
cd "${base}/js/admin" | ||
npm install | ||
gulp --production | ||
npm install | ||
gulp --production | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
/* | ||
* This file is part of Flarum. | ||
* | ||
* (c) Toby Zerner <toby.zerner@gmail.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Flarum\Embed\Listener; | ||
|
||
use Flarum\Event\ConfigureForumRoutes; | ||
use Illuminate\Contracts\Events\Dispatcher; | ||
|
||
class AddEmbedRoute | ||
{ | ||
/** | ||
* @param Dispatcher $events | ||
*/ | ||
public function subscribe(Dispatcher $events) | ||
{ | ||
$events->listen(ConfigureForumRoutes::class, [$this, 'addEmbedRoute']); | ||
} | ||
|
||
/** | ||
* @param ConfigureForumRoutes $event | ||
*/ | ||
public function addEmbedRoute(ConfigureForumRoutes $event) | ||
{ | ||
$event->get('/embed/{id:\d+}', 'embed.discussion', 'Flarum\Embed\DiscussionController'); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.