Skip to content

Commit 519a30b

Browse files
committed
Adding forum config
1 parent ab427a8 commit 519a30b

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

src/Syntax/Forum/ForumServiceProvider.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public function boot()
2929
public function register()
3030
{
3131
$this->shareWithApp();
32+
$this->loadConfig();
3233
$this->registerViews();
3334
}
3435

@@ -45,6 +46,16 @@ protected function shareWithApp()
4546
});
4647
}
4748

49+
/**
50+
* Load the config for the package
51+
*
52+
* @return void
53+
*/
54+
protected function loadConfig()
55+
{
56+
$this->app['config']->package('syntax/forum', __DIR__.'/../../../config');
57+
}
58+
4859
/**
4960
* Register views
5061
*

src/config/config.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
return array(
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Application Forum for News
8+
|--------------------------------------------------------------------------
9+
|
10+
| This flag is used to determine if the site uses the forum system to control
11+
| the front page. If set to false, there will be no options to promote posts
12+
| to the front page.
13+
|
14+
*/
15+
'forumNews' => true,
16+
17+
);

src/views/forum/post/components/postdisplay.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
@if ($post->forumType == 'reply' || ($post->forumType == 'post' && $post->forum_post_type_id != Forum_Post::TYPE_LOCKED))
1010
<div class="well-btn well-btn-right">
1111
<a href="#replyField" onClick="$('#collapseReply').addClass('in');">Reply</a>&nbsp;|&nbsp;
12-
<a href="#replyField" onClick="addQuote(this);" data-quote-id="{{ $post->id }}" data-quote-name="{{ $post->name }}" data-quote-type="{{ str_replace('Core\\', '', get_class($post)) }}">Quote</a>
13-
@if ($post->forumType == 'post' && Config::get('core::forumNews'))
12+
<a href="#replyField" onClick="addQuote(this);" data-quote-id="{{ $post->id }}" data-quote-name="{{ $post->name }}" data-quote-type="{{ getRootClass($post) }}">Quote</a>
13+
@if ($post->forumType == 'post' && Config::get('forum::forumNews'))
1414
@if ($activeUser->checkPermission('PROMOTE_FRONT_PAGE'))
1515
@if ($post->frontPageFlag == 0)
1616
&nbsp;|&nbsp;<a href="/forum/post/modify/{{ $post->id }}/frontPageFlag/1">Promote</a>

0 commit comments

Comments
 (0)