Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Restore test plugin
  • Loading branch information
adaur committed Feb 22, 2016
commit ade579ff72e2c6906548177ca2623c3cd7a908d2
5 changes: 5 additions & 0 deletions plugins/test/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

require __DIR__ . '/vendor/autoload.php';

return 'FeatherBB\Plugins\Test';
7 changes: 7 additions & 0 deletions plugins/test/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"autoload": {
"psr-4": {
"FeatherBB\\Plugins\\": "src/"
}
}
}
9 changes: 9 additions & 0 deletions plugins/test/featherbb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "test",
"title": "Test plugin",
"description": "Just a useless plugin to check everything is all right.",
"version": "0.1.0",
"author": {
"name": "beaver"
}
}
27 changes: 27 additions & 0 deletions plugins/test/src/Test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

/**
* Copyright (C) 2015 FeatherBB
* based on code by (C) 2008-2012 FluxBB
* and Rickard Andersson (C) 2002-2008 PunBB
* License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
*/

namespace FeatherBB\Plugins;

use FeatherBB\Core\Plugin as BasePlugin;

class Test extends BasePlugin
{
public function run()
{
Container::get('hooks')->bind('model.index.get_forum_actions', [$this, 'addMarkRead']);
}

public function addMarkRead($forum_actions)
{
$forum_actions[] = '<a href="' . Container::get('url')->get('mark-read/') . '">Test1</a>';
$forum_actions[] = '<a href="' . Container::get('url')->get('mark-read/') . '">Test2</a>';
return $forum_actions;
}
}
7 changes: 7 additions & 0 deletions plugins/test/vendor/autoload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

// autoload.php @generated by Composer

require_once __DIR__ . '/composer' . '/autoload_real.php';

return ComposerAutoloaderInitc204b6b3f64b0fff63ff500918413ad3::getLoader();
Loading