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
e06397a8
Commit
e06397a8
authored
May 13, 2022
by
Félicie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checkbox option and unanswered added
parent
4bb9b67c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
11 deletions
+9
-11
format.php
qa-include/app/format.php
+2
-4
page.php
qa-include/app/page.php
+6
-6
ask.php
qa-include/pages/ask.php
+1
-1
No files found.
qa-include/app/format.php
View file @
e06397a8
...
@@ -1871,23 +1871,21 @@ function qa_set_up_name_field(&$qa_content, &$fields, $inname, $fieldprefix = ''
...
@@ -1871,23 +1871,21 @@ function qa_set_up_name_field(&$qa_content, &$fields, $inname, $fieldprefix = ''
/**
/**
* Set up $qa_content and add to $fields to allow user to set if they want to be notified regarding their post.
* Set up $qa_content and add to $fields to allow user to set if they want to be notified regarding their post.
* $basetype is 'Q', 'A' or 'C' for question, answer or comment. $login_email is the email of logged in user,
* $basetype is 'Q', 'A' or 'C' for question, answer or comment. $login_email is the email of logged in user,
* or null if this is an anonymous post. $in
notify, $in
email and $errors_email are from previous submission/validation.
* or null if this is an anonymous post. $inemail and $errors_email are from previous submission/validation.
* Pass $fieldprefix to add a prefix to the form field names and IDs used.
* Pass $fieldprefix to add a prefix to the form field names and IDs used.
* @param array $qa_content
* @param array $qa_content
* @param array $fields
* @param array $fields
* @param string $basetype
* @param string $basetype
* @param string|null $login_email
* @param string|null $login_email
* @param string $innotify
* @param string $inemail
* @param string $inemail
* @param string $errors_email
* @param string $errors_email
* @param string $fieldprefix
* @param string $fieldprefix
*/
*/
function
qa_set_up_notify_fields
(
&
$qa_content
,
&
$fields
,
$basetype
,
$login_email
,
$in
notify
,
$in
email
,
$errors_email
,
$fieldprefix
=
''
)
function
qa_set_up_notify_fields
(
&
$qa_content
,
&
$fields
,
$basetype
,
$login_email
,
$inemail
,
$errors_email
,
$fieldprefix
=
''
)
{
{
$fields
[
'notify'
]
=
array
(
$fields
[
'notify'
]
=
array
(
'tags'
=>
'name="'
.
$fieldprefix
.
'notify"'
,
'tags'
=>
'name="'
.
$fieldprefix
.
'notify"'
,
'type'
=>
'checkbox'
,
'type'
=>
'checkbox'
,
'value'
=>
qa_html
(
$innotify
),
);
);
switch
(
$basetype
)
{
switch
(
$basetype
)
{
...
...
qa-include/app/page.php
View file @
e06397a8
...
@@ -550,12 +550,12 @@ function qa_content_prepare($voting = false, $categoryids = array())
...
@@ -550,12 +550,12 @@ function qa_content_prepare($voting = false, $categoryids = array())
// );
// );
// }
// }
if
(
qa_opt
(
'nav_unanswered'
))
{
//
if (qa_opt('nav_unanswered')) {
$qa_content
[
'navigation'
][
'main'
][
'unanswered'
]
=
array
(
//
$qa_content['navigation']['main']['unanswered'] = array(
'url'
=>
qa_path_html
(
'unanswered'
),
//
'url' => qa_path_html('unanswered'),
'label'
=>
qa_lang_html
(
'main/nav_unanswered'
),
//
'label' => qa_lang_html('main/nav_unanswered'),
);
//
);
}
//
}
if
(
qa_using_tags
()
&&
qa_opt
(
'nav_tags'
))
{
if
(
qa_using_tags
()
&&
qa_opt
(
'nav_tags'
))
{
$qa_content
[
'navigation'
][
'main'
][
'tag'
]
=
array
(
$qa_content
[
'navigation'
][
'main'
][
'tag'
]
=
array
(
...
...
qa-include/pages/ask.php
View file @
e06397a8
...
@@ -298,7 +298,7 @@ if (!isset($userid) && qa_opt('allow_anonymous_naming')) {
...
@@ -298,7 +298,7 @@ if (!isset($userid) && qa_opt('allow_anonymous_naming')) {
}
}
qa_set_up_notify_fields
(
$qa_content
,
$qa_content
[
'form'
][
'fields'
],
'Q'
,
qa_get_logged_in_email
(),
qa_set_up_notify_fields
(
$qa_content
,
$qa_content
[
'form'
][
'fields'
],
'Q'
,
qa_get_logged_in_email
(),
isset
(
$in
[
'notify'
])
?
$in
[
'notify'
]
:
qa_opt
(
'notify_users_default'
),
@
$in
[
'email'
],
@
$errors
[
'email'
]);
qa_opt
(
'notify_users_default'
),
@
$in
[
'email'
],
@
$errors
[
'email'
]);
if
(
$captchareason
)
{
if
(
$captchareason
)
{
require_once
QA_INCLUDE_DIR
.
'app/captcha.php'
;
require_once
QA_INCLUDE_DIR
.
'app/captcha.php'
;
...
...
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