Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
e331e164
Commit
e331e164
authored
Aug 18, 2015
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new category widget plugin
parent
d3a376bf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
2 deletions
+59
-2
admin.php
qa-include/app/admin.php
+1
-1
qa-lang-options.php
qa-include/lang/qa-lang-options.php
+2
-1
qa-widget-category-list.php
qa-include/plugins/qa-widget-category-list.php
+55
-0
qa-base.php
qa-include/qa-base.php
+1
-0
No files found.
qa-include/app/admin.php
View file @
e331e164
...
...
@@ -176,7 +176,7 @@
'MB'
=>
qa_lang_html
(
'options/place_main_bottom'
),
'ST'
=>
qa_lang_html
(
'options/place_side_top'
),
'SH'
=>
qa_lang_html
(
'options/place_side_below_sidebar'
),
'SL'
=>
qa_lang_html
(
'options/place_side_
below_categories
'
),
'SL'
=>
qa_lang_html
(
'options/place_side_
low
'
),
'SB'
=>
qa_lang_html
(
'options/place_side_last'
),
);
}
...
...
qa-include/lang/qa-lang-options.php
View file @
e331e164
...
...
@@ -198,8 +198,9 @@
'place_main_below_title'
=>
'Main area - Below title'
,
'place_main_bottom'
=>
'Main area - Bottom'
,
'place_main_top'
=>
'Main area - Top'
,
'place_side_below_categories'
=>
'Side panel - Below categories'
,
'place_side_below_categories'
=>
'Side panel - Below categories'
,
// @deprecated
'place_side_below_sidebar'
=>
'Side panel - Below sidebar box'
,
'place_side_low'
=>
'Side panel - Low'
,
'place_side_last'
=>
'Side panel - Last'
,
'place_side_top'
=>
'Side panel - Top'
,
'points_a_selected'
=>
'Having your answer selected as the best:'
,
...
...
qa-include/plugins/qa-widget-category-list.php
0 → 100644
View file @
e331e164
<?php
/*
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/qa-widget-activity-count.php
Description: Widget module class for activity count plugin
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
More about this license: http://www.question2answer.org/license.php
*/
class
qa_category_list
{
private
$themeobject
;
public
function
allow_template
(
$template
)
{
return
true
;
}
public
function
allow_region
(
$region
)
{
return
$region
==
'side'
;
}
public
function
output_widget
(
$region
,
$place
,
$themeobject
,
$template
,
$request
,
$qa_content
)
{
$this
->
themeobject
=
$themeobject
;
if
(
isset
(
$qa_content
[
'navigation'
][
'cat'
]))
{
$nav
=
$qa_content
[
'navigation'
][
'cat'
];
}
else
{
$navcategories
=
qa_db_single_select
(
qa_db_category_nav_selectspec
(
null
,
true
,
false
,
true
));
$nav
=
qa_category_navigation
(
$navcategories
);
}
$this
->
themeobject
->
output
(
'<h2>'
.
qa_lang_html
(
'main/nav_categories'
)
.
'</h2>'
);
$this
->
themeobject
->
set_context
(
'nav_type'
,
'cat'
);
$this
->
themeobject
->
nav_list
(
$nav
,
'nav-cat'
,
1
);
$this
->
themeobject
->
nav_clear
(
'cat'
);
$this
->
themeobject
->
clear_context
(
'nav_type'
);
}
}
qa-include/qa-base.php
View file @
e331e164
...
...
@@ -304,6 +304,7 @@
qa_register_module
(
'widget'
,
'plugins/qa-widget-activity-count.php'
,
'qa_activity_count'
,
'Activity Count'
);
qa_register_module
(
'widget'
,
'plugins/qa-widget-ask-box.php'
,
'qa_ask_box'
,
'Ask Box'
);
qa_register_module
(
'widget'
,
'plugins/qa-widget-related-qs.php'
,
'qa_related_qs'
,
'Related Questions'
);
qa_register_module
(
'widget'
,
'plugins/qa-widget-category-list.php'
,
'qa_category_list'
,
'Categories'
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment