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
cea284ca
Commit
cea284ca
authored
Mar 21, 2014
by
Scott Vivian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code reformat
parent
894e7057
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
431 additions
and
414 deletions
+431
-414
qa-page-admin-default.php
qa-include/qa-page-admin-default.php
+372
-359
qa-page-admin-plugins.php
qa-include/qa-page-admin-plugins.php
+59
-55
No files found.
qa-include/qa-page-admin-default.php
View file @
cea284ca
...
...
@@ -36,18 +36,18 @@
require_once
QA_INCLUDE_DIR
.
'qa-app-admin.php'
;
$adminsection
=
strtolower
(
qa_request_part
(
1
));
$adminsection
=
strtolower
(
qa_request_part
(
1
));
// Get list of categories and all options
$categories
=
qa_db_select_with_pending
(
qa_db_category_nav_selectspec
(
null
,
true
));
$categories
=
qa_db_select_with_pending
(
qa_db_category_nav_selectspec
(
null
,
true
));
// See if we need to redirect
if
(
empty
(
$adminsection
))
{
$subnav
=
qa_admin_sub_navigation
();
$subnav
=
qa_admin_sub_navigation
();
if
(
isset
(
$subnav
[
@
$_COOKIE
[
'qa_admin_last'
]]))
qa_redirect
(
$_COOKIE
[
'qa_admin_last'
]);
...
...
@@ -66,7 +66,7 @@
// For non-text options, lists of option types, minima and maxima
$optiontype
=
array
(
$optiontype
=
array
(
'avatar_message_list_size'
=>
'number'
,
'avatar_profile_size'
=>
'number'
,
'avatar_q_list_size'
=>
'number'
,
...
...
@@ -226,7 +226,7 @@
'smtp_password'
=>
'password'
,
);
$optionmaximum
=
array
(
$optionmaximum
=
array
(
'feed_number_items'
=>
QA_DB_RETRIEVE_QS_AS
,
'max_len_q_title'
=>
QA_DB_MAX_TITLE_LENGTH
,
'page_size_activity'
=>
QA_DB_RETRIEVE_QS_AS
,
...
...
@@ -244,7 +244,7 @@
'page_size_wall'
=>
QA_DB_RETRIEVE_MESSAGES
,
);
$optionminimum
=
array
(
$optionminimum
=
array
(
'flagging_hide_after'
=>
2
,
'flagging_notify_every'
=>
1
,
'flagging_notify_first'
=>
1
,
...
...
@@ -267,27 +267,27 @@
// Define the options to show (and some other visual stuff) based on request
$formstyle
=
'tall'
;
$checkboxtodisplay
=
null
;
$formstyle
=
'tall'
;
$checkboxtodisplay
=
null
;
$maxpermitpost
=
max
(
qa_opt
(
'permit_post_q'
),
qa_opt
(
'permit_post_a'
));
$maxpermitpost
=
max
(
qa_opt
(
'permit_post_q'
),
qa_opt
(
'permit_post_a'
));
if
(
qa_opt
(
'comment_on_qs'
)
||
qa_opt
(
'comment_on_as'
))
$maxpermitpost
=
max
(
$maxpermitpost
,
qa_opt
(
'permit_post_c'
));
$maxpermitpost
=
max
(
$maxpermitpost
,
qa_opt
(
'permit_post_c'
));
switch
(
$adminsection
)
{
case
'general'
:
$subtitle
=
'admin/general_title'
;
$showoptions
=
array
(
'site_title'
,
'site_url'
,
'neat_urls'
,
'site_language'
,
'site_theme'
,
'site_theme_mobile'
,
'tags_or_categories'
,
'site_maintenance'
);
$subtitle
=
'admin/general_title'
;
$showoptions
=
array
(
'site_title'
,
'site_url'
,
'neat_urls'
,
'site_language'
,
'site_theme'
,
'site_theme_mobile'
,
'tags_or_categories'
,
'site_maintenance'
);
break
;
case
'emails'
:
$subtitle
=
'admin/emails_title'
;
$showoptions
=
array
(
$subtitle
=
'admin/emails_title'
;
$showoptions
=
array
(
'from_email'
,
'feedback_email'
,
'notify_admin_q_post'
,
'feedback_enabled'
,
'email_privacy'
,
'smtp_active'
,
'smtp_address'
,
'smtp_port'
,
'smtp_secure'
,
'smtp_authenticate'
,
'smtp_username'
,
'smtp_password'
);
$checkboxtodisplay
=
array
(
$checkboxtodisplay
=
array
(
'smtp_address'
=>
'option_smtp_active'
,
'smtp_port'
=>
'option_smtp_active'
,
'smtp_secure'
=>
'option_smtp_active'
,
...
...
@@ -298,9 +298,9 @@
break
;
case
'users'
:
$subtitle
=
'admin/users_title'
;
$subtitle
=
'admin/users_title'
;
$showoptions
=
array
(
'show_notice_visitor'
,
'notice_visitor'
);
$showoptions
=
array
(
'show_notice_visitor'
,
'notice_visitor'
);
if
(
!
QA_FINAL_EXTERNAL_USERS
)
{
require_once
QA_INCLUDE_DIR
.
'qa-util-image.php'
;
...
...
@@ -313,15 +313,15 @@
array_push
(
$showoptions
,
'avatar_allow_upload'
,
'avatar_store_size'
,
'avatar_default_show'
);
}
$showoptions
[]
=
''
;
$showoptions
[]
=
''
;
if
(
!
QA_FINAL_EXTERNAL_USERS
)
$showoptions
[]
=
'avatar_profile_size'
;
$showoptions
[]
=
'avatar_profile_size'
;
array_push
(
$showoptions
,
'avatar_users_size'
,
'avatar_q_page_q_size'
,
'avatar_q_page_a_size'
,
'avatar_q_page_c_size'
,
'avatar_q_list_size'
,
'avatar_message_list_size'
);
$checkboxtodisplay
=
array
(
$checkboxtodisplay
=
array
(
'custom_register'
=>
'option_show_custom_register'
,
'custom_welcome'
=>
'option_show_custom_welcome'
,
'notice_welcome'
=>
'option_show_notice_welcome'
,
...
...
@@ -332,7 +332,7 @@
);
if
(
!
QA_FINAL_EXTERNAL_USERS
)
$checkboxtodisplay
=
array_merge
(
$checkboxtodisplay
,
array
(
$checkboxtodisplay
=
array_merge
(
$checkboxtodisplay
,
array
(
'page_size_wall'
=>
'option_allow_user_walls'
,
'avatar_profile_size'
=>
'option_avatar_allow_gravatar || option_avatar_allow_upload'
,
'avatar_users_size'
=>
'option_avatar_allow_gravatar || option_avatar_allow_upload'
,
...
...
@@ -343,14 +343,14 @@
'avatar_message_list_size'
=>
'option_allow_private_messages || option_allow_user_walls'
,
));
$formstyle
=
'wide'
;
$formstyle
=
'wide'
;
break
;
case
'layout'
:
$subtitle
=
'admin/layout_title'
;
$showoptions
=
array
(
'logo_show'
,
'logo_url'
,
'logo_width'
,
'logo_height'
,
''
,
'show_custom_sidebar'
,
'custom_sidebar'
,
'show_custom_sidepanel'
,
'custom_sidepanel'
,
'show_custom_header'
,
'custom_header'
,
'show_custom_footer'
,
'custom_footer'
,
'show_custom_in_head'
,
'custom_in_head'
,
'show_custom_home'
,
'custom_home_heading'
,
'custom_home_content'
,
'show_home_description'
,
'home_description'
,
''
);
$subtitle
=
'admin/layout_title'
;
$showoptions
=
array
(
'logo_show'
,
'logo_url'
,
'logo_width'
,
'logo_height'
,
''
,
'show_custom_sidebar'
,
'custom_sidebar'
,
'show_custom_sidepanel'
,
'custom_sidepanel'
,
'show_custom_header'
,
'custom_header'
,
'show_custom_footer'
,
'custom_footer'
,
'show_custom_in_head'
,
'custom_in_head'
,
'show_custom_home'
,
'custom_home_heading'
,
'custom_home_content'
,
'show_home_description'
,
'home_description'
,
''
);
$checkboxtodisplay
=
array
(
$checkboxtodisplay
=
array
(
'logo_url'
=>
'option_logo_show'
,
'logo_width'
=>
'option_logo_show'
,
'logo_height'
=>
'option_logo_show'
,
...
...
@@ -366,32 +366,32 @@
break
;
case
'viewing'
:
$subtitle
=
'admin/viewing_title'
;
$showoptions
=
array
(
'q_urls_title_length'
,
'q_urls_remove_accents'
,
'do_count_q_views'
,
'show_view_counts'
,
'show_view_count_q_page'
,
''
,
'voting_on_qs'
,
'voting_on_q_page_only'
,
'voting_on_as'
,
'votes_separated'
,
''
,
'show_url_links'
,
'links_in_new_window'
,
'show_when_created'
,
'show_full_date_days'
);
$subtitle
=
'admin/viewing_title'
;
$showoptions
=
array
(
'q_urls_title_length'
,
'q_urls_remove_accents'
,
'do_count_q_views'
,
'show_view_counts'
,
'show_view_count_q_page'
,
''
,
'voting_on_qs'
,
'voting_on_q_page_only'
,
'voting_on_as'
,
'votes_separated'
,
''
,
'show_url_links'
,
'links_in_new_window'
,
'show_when_created'
,
'show_full_date_days'
);
if
(
count
(
qa_get_points_to_titles
()))
$showoptions
[]
=
'show_user_titles'
;
$showoptions
[]
=
'show_user_titles'
;
array_push
(
$showoptions
,
'show_user_points'
,
''
,
'sort_answers_by'
,
'show_selected_first'
,
'page_size_q_as'
,
'show_a_form_immediate'
);
if
(
qa_opt
(
'comment_on_qs'
)
||
qa_opt
(
'comment_on_as'
))
array_push
(
$showoptions
,
'show_fewer_cs_from'
,
'show_fewer_cs_count'
,
'show_c_reply_buttons'
);
$showoptins
[]
=
''
;
$showoptins
[]
=
''
;
$widgets
=
qa_db_single_select
(
qa_db_widgets_selectspec
());
$widgets
=
qa_db_single_select
(
qa_db_widgets_selectspec
());
foreach
(
$widgets
as
$widget
)
if
(
$widget
[
'title'
]
==
'Related Questions'
)
{
if
(
$widget
[
'title'
]
==
'Related Questions'
)
{
array_push
(
$showoptions
,
'match_related_qs'
,
'page_size_related_qs'
,
''
);
break
;
}
$showoptions
[]
=
'pages_prev_next'
;
$showoptions
[]
=
'pages_prev_next'
;
$formstyle
=
'wide'
;
$formstyle
=
'wide'
;
$checkboxtodisplay
=
array
(
$checkboxtodisplay
=
array
(
'show_view_counts'
=>
'option_do_count_q_views'
,
'show_view_count_q_page'
=>
'option_do_count_q_views'
,
'votes_separated'
=>
'option_voting_on_qs || option_voting_on_as'
,
...
...
@@ -401,42 +401,42 @@
break
;
case
'lists'
:
$subtitle
=
'admin/lists_title'
;
$subtitle
=
'admin/lists_title'
;
$showoptions
=
array
(
'page_size_home'
,
'page_size_activity'
,
'page_size_qs'
,
'page_size_hot_qs'
,
'page_size_una_qs'
);
$showoptions
=
array
(
'page_size_home'
,
'page_size_activity'
,
'page_size_qs'
,
'page_size_hot_qs'
,
'page_size_una_qs'
);
if
(
qa_using_tags
())
$showoptions
[]
=
'page_size_tag_qs'
;
$showoptions
[]
=
'page_size_tag_qs'
;
$showoptions
[]
=
''
;
$showoptions
[]
=
''
;
if
(
qa_using_tags
())
array_push
(
$showoptions
,
'page_size_tags'
,
'columns_tags'
);
array_push
(
$showoptions
,
'page_size_users'
,
'columns_users'
,
''
);
$searchmodules
=
qa_load_modules_with
(
'search'
,
'process_search'
);
$searchmodules
=
qa_load_modules_with
(
'search'
,
'process_search'
);
if
(
count
(
$searchmodules
))
$showoptions
[]
=
'search_module'
;
$showoptions
[]
=
'search_module'
;
$showoptions
[]
=
'page_size_search'
;
$showoptions
[]
=
'page_size_search'
;
array_push
(
$showoptions
,
''
,
'admin/hotness_factors'
,
'hot_weight_q_age'
,
'hot_weight_a_age'
,
'hot_weight_answers'
,
'hot_weight_votes'
);
if
(
qa_opt
(
'do_count_q_views'
))
$showoptions
[]
=
'hot_weight_views'
;
$showoptions
[]
=
'hot_weight_views'
;
$formstyle
=
'wide'
;
$formstyle
=
'wide'
;
break
;
case
'posting'
:
$getoptions
=
qa_get_options
(
array
(
'tags_or_categories'
));
$getoptions
=
qa_get_options
(
array
(
'tags_or_categories'
));
$subtitle
=
'admin/posting_title'
;
$subtitle
=
'admin/posting_title'
;
$showoptions
=
array
(
'do_close_on_select'
,
'allow_close_questions'
,
'allow_self_answer'
,
'allow_multi_answers'
,
'follow_on_as'
,
'comment_on_qs'
,
'comment_on_as'
,
''
);
$showoptions
=
array
(
'do_close_on_select'
,
'allow_close_questions'
,
'allow_self_answer'
,
'allow_multi_answers'
,
'follow_on_as'
,
'comment_on_qs'
,
'comment_on_as'
,
''
);
if
(
count
(
qa_list_modules
(
'editor'
))
>
1
)
array_push
(
$showoptions
,
'editor_for_qs'
,
'editor_for_as'
,
'editor_for_cs'
,
''
);
...
...
@@ -455,9 +455,9 @@
if
(
qa_using_tags
())
array_push
(
$showoptions
,
'do_example_tags'
,
'match_example_tags'
,
'do_complete_tags'
,
'page_size_ask_tags'
);
$formstyle
=
'wide'
;
$formstyle
=
'wide'
;
$checkboxtodisplay
=
array
(
$checkboxtodisplay
=
array
(
'editor_for_cs'
=>
'option_comment_on_qs || option_comment_on_as'
,
'custom_ask'
=>
'option_show_custom_ask'
,
'extra_field_prompt'
=>
'option_extra_field_active'
,
...
...
@@ -477,93 +477,94 @@
break
;
case
'permissions'
:
$subtitle
=
'admin/permissions_title'
;
$subtitle
=
'admin/permissions_title'
;
$permitoptions
=
qa_get_permit_options
();
$permitoptions
=
qa_get_permit_options
();
$showoptions
=
array
();
$checkboxtodisplay
=
array
();
$showoptions
=
array
();
$checkboxtodisplay
=
array
();
foreach
(
$permitoptions
as
$permitoption
)
{
$showoptions
[]
=
$permitoption
;
$showoptions
[]
=
$permitoption
;
if
(
$permitoption
==
'permit_view_q_page'
)
{
$showoptions
[]
=
'allow_view_q_bots'
;
$checkboxtodisplay
[
'allow_view_q_bots'
]
=
'option_permit_view_q_page<'
.
qa_js
(
QA_PERMIT_ALL
);
if
(
$permitoption
==
'permit_view_q_page'
)
{
$showoptions
[]
=
'allow_view_q_bots'
;
$checkboxtodisplay
[
'allow_view_q_bots'
]
=
'option_permit_view_q_page<'
.
qa_js
(
QA_PERMIT_ALL
);
}
else
{
$showoptions
[]
=
$permitoption
.
'_points'
;
$checkboxtodisplay
[
$permitoption
.
'_points'
]
=
'(option_'
.
$permitoption
.
'=='
.
qa_js
(
QA_PERMIT_POINTS
)
.
}
else
{
$showoptions
[]
=
$permitoption
.
'_points'
;
$checkboxtodisplay
[
$permitoption
.
'_points'
]
=
'(option_'
.
$permitoption
.
'=='
.
qa_js
(
QA_PERMIT_POINTS
)
.
')||(option_'
.
$permitoption
.
'=='
.
qa_js
(
QA_PERMIT_POINTS_CONFIRMED
)
.
')||(option_'
.
$permitoption
.
'=='
.
qa_js
(
QA_PERMIT_APPROVED_POINTS
)
.
')'
;
}
}
$formstyle
=
'wide'
;
$formstyle
=
'wide'
;
break
;
case
'feeds'
:
$subtitle
=
'admin/feeds_title'
;
$subtitle
=
'admin/feeds_title'
;
$showoptions
=
array
(
'feed_for_questions'
,
'feed_for_qa'
,
'feed_for_activity'
);
$showoptions
=
array
(
'feed_for_questions'
,
'feed_for_qa'
,
'feed_for_activity'
);
array_push
(
$showoptions
,
'feed_for_hot'
,
'feed_for_unanswered'
);
if
(
qa_using_tags
())
$showoptions
[]
=
'feed_for_tag_qs'
;
$showoptions
[]
=
'feed_for_tag_qs'
;
if
(
qa_using_categories
())
$showoptions
[]
=
'feed_per_category'
;
$showoptions
[]
=
'feed_per_category'
;
array_push
(
$showoptions
,
'feed_for_search'
,
''
,
'feed_number_items'
,
'feed_full_text'
);
$formstyle
=
'wide'
;
$formstyle
=
'wide'
;
$checkboxtodisplay
=
array
(
$checkboxtodisplay
=
array
(
'feed_per_category'
=>
'option_feed_for_qa || option_feed_for_questions || option_feed_for_unanswered || option_feed_for_activity'
,
);
break
;
case
'spam'
:
$subtitle
=
'admin/spam_title'
;
$subtitle
=
'admin/spam_title'
;
$showoptions
=
array
();
$showoptions
=
array
();
$getoptions
=
qa_get_options
(
array
(
'feedback_enabled'
,
'permit_post_q'
,
'permit_post_a'
,
'permit_post_c'
));
$getoptions
=
qa_get_options
(
array
(
'feedback_enabled'
,
'permit_post_q'
,
'permit_post_a'
,
'permit_post_c'
));
if
(
!
QA_FINAL_EXTERNAL_USERS
)
array_push
(
$showoptions
,
'confirm_user_emails'
,
'confirm_user_required'
,
'moderate_users'
,
'approve_user_required'
,
'register_notify_admin'
,
'suspend_register_users'
,
''
);
$captchamodules
=
qa_list_modules
(
'captcha'
);
$captchamodules
=
qa_list_modules
(
'captcha'
);
if
(
count
(
$captchamodules
))
{
if
(
!
QA_FINAL_EXTERNAL_USERS
)
array_push
(
$showoptions
,
'captcha_on_register'
,
'captcha_on_reset_password'
);
if
(
$maxpermitpost
>
QA_PERMIT_USERS
)
$showoptions
[]
=
'captcha_on_anon_post'
;
$showoptions
[]
=
'captcha_on_anon_post'
;
if
(
$maxpermitpost
>
QA_PERMIT_APPROVED
)
$showoptions
[]
=
'captcha_on_unapproved'
;
$showoptions
[]
=
'captcha_on_unapproved'
;
if
(
$maxpermitpost
>
QA_PERMIT_CONFIRMED
)
$showoptions
[]
=
'captcha_on_unconfirmed'
;
$showoptions
[]
=
'captcha_on_unconfirmed'
;
if
(
$getoptions
[
'feedback_enabled'
])
$showoptions
[]
=
'captcha_on_feedback'
;
$showoptions
[]
=
'captcha_on_feedback'
;
$showoptions
[]
=
'captcha_module'
;
$showoptions
[]
=
'captcha_module'
;
}
$showoptions
[]
=
''
;
$showoptions
[]
=
''
;
if
(
$maxpermitpost
>
QA_PERMIT_USERS
)
$showoptions
[]
=
'moderate_anon_post'
;
$showoptions
[]
=
'moderate_anon_post'
;
if
(
$maxpermitpost
>
QA_PERMIT_APPROVED
)
$showoptions
[]
=
'moderate_unapproved'
;
$showoptions
[]
=
'moderate_unapproved'
;
if
(
$maxpermitpost
>
QA_PERMIT_CONFIRMED
)
$showoptions
[]
=
'moderate_unconfirmed'
;
$showoptions
[]
=
'moderate_unconfirmed'
;
if
(
$maxpermitpost
>
QA_PERMIT_EXPERTS
)
array_push
(
$showoptions
,
'moderate_by_points'
,
'moderate_points_limit'
,
'moderate_edited_again'
,
'moderate_notify_admin'
,
'moderate_update_time'
,
''
);
...
...
@@ -580,7 +581,7 @@
if
(
qa_opt
(
'comment_on_qs'
)
||
qa_opt
(
'comment_on_as'
))
array_push
(
$showoptions
,
'max_rate_ip_cs'
,
'max_rate_user_cs'
);
$showoptions
[]
=
''
;
$showoptions
[]
=
''
;
if
(
qa_opt
(
'voting_on_qs'
)
||
qa_opt
(
'voting_on_as'
))
array_push
(
$showoptions
,
'max_rate_ip_votes'
,
'max_rate_user_votes'
);
...
...
@@ -590,9 +591,9 @@
if
(
qa_opt
(
'allow_private_messages'
)
||
qa_opt
(
'allow_user_walls'
))
array_push
(
$showoptions
,
'max_rate_ip_messages'
,
'max_rate_user_messages'
);
$formstyle
=
'wide'
;
$formstyle
=
'wide'
;
$checkboxtodisplay
=
array
(
$checkboxtodisplay
=
array
(
'confirm_user_required'
=>
'option_confirm_user_emails'
,
'approve_user_required'
=>
'option_moderate_users'
,
'captcha_on_unapproved'
=>
'option_moderate_users'
,
...
...
@@ -611,21 +612,21 @@
'max_rate_user_flags'
=>
'option_flagging_of_posts'
,
);
$checkboxtodisplay
[
'moderate_notify_admin'
]
=
$checkboxtodisplay
[
'moderate_edited_again'
];
$checkboxtodisplay
[
'moderate_update_time'
]
=
$checkboxtodisplay
[
'moderate_edited_again'
];
$checkboxtodisplay
[
'moderate_notify_admin'
]
=
$checkboxtodisplay
[
'moderate_edited_again'
];
$checkboxtodisplay
[
'moderate_update_time'
]
=
$checkboxtodisplay
[
'moderate_edited_again'
];
break
;
case
'mailing'
:
require_once
QA_INCLUDE_DIR
.
'qa-app-mailing.php'
;
$subtitle
=
'admin/mailing_title'
;
$subtitle
=
'admin/mailing_title'
;
$showoptions
=
array
(
'mailing_enabled'
,
'mailing_from_name'
,
'mailing_from_email'
,
'mailing_subject'
,
'mailing_body'
,
'mailing_per_minute'
);
$showoptions
=
array
(
'mailing_enabled'
,
'mailing_from_name'
,
'mailing_from_email'
,
'mailing_subject'
,
'mailing_body'
,
'mailing_per_minute'
);
break
;
default
:
$pagemodules
=
qa_load_modules_with
(
'page'
,
'match_request'
);
$request
=
qa_request
();
$pagemodules
=
qa_load_modules_with
(
'page'
,
'match_request'
);
$request
=
qa_request
();
foreach
(
$pagemodules
as
$pagemodule
)
if
(
$pagemodule
->
match_request
(
$request
))
...
...
@@ -638,56 +639,56 @@
// Filter out blanks to get list of valid options
$getoptions
=
array
();
$getoptions
=
array
();
foreach
(
$showoptions
as
$optionname
)
if
(
strlen
(
$optionname
)
&&
(
strpos
(
$optionname
,
'/'
)
===
false
))
// empties represent spacers in forms
$getoptions
[]
=
$optionname
;
if
(
strlen
(
$optionname
)
&&
(
strpos
(
$optionname
,
'/'
)
===
false
))
// empties represent spacers in forms
$getoptions
[]
=
$optionname
;
// Process user actions
$errors
=
array
();
$errors
=
array
();
$recalchotness
=
false
;
$startmailing
=
false
;
$securityexpired
=
false
;
$recalchotness
=
false
;
$startmailing
=
false
;
$securityexpired
=
false
;
$formokhtml
=
null
;
$formokhtml
=
null
;
if
(
qa_clicked
(
'doresetoptions'
))
{
if
(
!
qa_check_form_security_code
(
'admin/'
.
$adminsection
,
qa_post_text
(
'code'
)))
$securityexpired
=
true
;
$securityexpired
=
true
;
else
{
qa_reset_options
(
$getoptions
);
$formokhtml
=
qa_lang_html
(
'admin/options_reset'
);
$formokhtml
=
qa_lang_html
(
'admin/options_reset'
);
}
}
elseif
(
qa_clicked
(
'dosaveoptions'
))
{
}
elseif
(
qa_clicked
(
'dosaveoptions'
))
{
if
(
!
qa_check_form_security_code
(
'admin/'
.
$adminsection
,
qa_post_text
(
'code'
)))
$securityexpired
=
true
;
$securityexpired
=
true
;
else
{
foreach
(
$getoptions
as
$optionname
)
{
$optionvalue
=
qa_post_text
(
'option_'
.
$optionname
);
$optionvalue
=
qa_post_text
(
'option_'
.
$optionname
);
if
(
(
@
$optiontype
[
$optionname
]
==
'number'
)
||
(
@
$optiontype
[
$optionname
]
==
'checkbox'
)
||
((
@
$optiontype
[
$optionname
]
==
'number-blank'
)
&&
strlen
(
$optionvalue
))
(
@
$optiontype
[
$optionname
]
==
'number'
)
||
(
@
$optiontype
[
$optionname
]
==
'checkbox'
)
||
((
@
$optiontype
[
$optionname
]
==
'number-blank'
)
&&
strlen
(
$optionvalue
))
)
$optionvalue
=
(
int
)
$optionvalue
;
$optionvalue
=
(
int
)
$optionvalue
;
if
(
isset
(
$optionmaximum
[
$optionname
]))
$optionvalue
=
min
(
$optionmaximum
[
$optionname
],
$optionvalue
);
$optionvalue
=
min
(
$optionmaximum
[
$optionname
],
$optionvalue
);
if
(
isset
(
$optionminimum
[
$optionname
]))
$optionvalue
=
max
(
$optionminimum
[
$optionname
],
$optionvalue
);
$optionvalue
=
max
(
$optionminimum
[
$optionname
],
$optionvalue
);
switch
(
$optionname
)
{
case
'site_url'
:
if
(
substr
(
$optionvalue
,
-
1
)
!=
'/'
)
// seems to be a very common mistake and will mess up URLs
$optionvalue
.=
'/'
;
if
(
substr
(
$optionvalue
,
-
1
)
!=
'/'
)
// seems to be a very common mistake and will mess up URLs
$optionvalue
.=
'/'
;
break
;
case
'hot_weight_views'
:
...
...
@@ -696,44 +697,44 @@
case
'hot_weight_q_age'
:
case
'hot_weight_a_age'
:
if
(
qa_opt
(
$optionname
)
!=
$optionvalue
)
$recalchotness
=
true
;
$recalchotness
=
true
;
break
;
case
'block_ips_write'
:
require_once
QA_INCLUDE_DIR
.
'qa-app-limits.php'
;
$optionvalue
=
implode
(
' , '
,
qa_block_ips_explode
(
$optionvalue
));
$optionvalue
=
implode
(
' , '
,
qa_block_ips_explode
(
$optionvalue
));
break
;
case
'block_bad_words'
:
require_once
QA_INCLUDE_DIR
.
'qa-util-string.php'
;
$optionvalue
=
implode
(
' , '
,
qa_block_words_explode
(
$optionvalue
));
$optionvalue
=
implode
(
' , '
,
qa_block_words_explode
(
$optionvalue
));
break
;
}
qa_set_option
(
$optionname
,
$optionvalue
);
}
$formokhtml
=
qa_lang_html
(
'admin/options_saved'
);
$formokhtml
=
qa_lang_html
(
'admin/options_saved'
);
// Uploading default avatar
if
(
is_array
(
@
$_FILES
[
'avatar_default_file'
])
&&
$_FILES
[
'avatar_default_file'
][
'size'
])
{
require_once
QA_INCLUDE_DIR
.
'qa-util-image.php'
;
$oldblobid
=
qa_opt
(
'avatar_default_blobid'
);
$oldblobid
=
qa_opt
(
'avatar_default_blobid'
);
$toobig
=
qa_image_file_too_big
(
$_FILES
[
'avatar_default_file'
][
'tmp_name'
],
qa_opt
(
'avatar_store_size'
));
$toobig
=
qa_image_file_too_big
(
$_FILES
[
'avatar_default_file'
][
'tmp_name'
],
qa_opt
(
'avatar_store_size'
));
if
(
$toobig
)
$errors
[
'avatar_default_show'
]
=
qa_lang_sub
(
'main/image_too_big_x_pc'
,
(
int
)(
$toobig
*
100
));
$errors
[
'avatar_default_show'
]
=
qa_lang_sub
(
'main/image_too_big_x_pc'
,
(
int
)(
$toobig
*
100
));
else
{
$imagedata
=
qa_image_constrain_data
(
file_get_contents
(
$_FILES
[
'avatar_default_file'
][
'tmp_name'
]),
$width
,
$height
,
qa_opt
(
'avatar_store_size'
));
$imagedata
=
qa_image_constrain_data
(
file_get_contents
(
$_FILES
[
'avatar_default_file'
][
'tmp_name'
]),
$width
,
$height
,
qa_opt
(
'avatar_store_size'
));
if
(
isset
(
$imagedata
))
{
require_once
QA_INCLUDE_DIR
.
'qa-app-blobs.php'
;
$newblobid
=
qa_create_blob
(
$imagedata
,
'jpeg'
);
$newblobid
=
qa_create_blob
(
$imagedata
,
'jpeg'
);
if
(
isset
(
$newblobid
))
{
qa_set_option
(
'avatar_default_blobid'
,
$newblobid
);
...
...
@@ -745,8 +746,9 @@
if
(
strlen
(
$oldblobid
))
qa_delete_blob
(
$oldblobid
);
}
else
$errors
[
'avatar_default_show'
]
=
qa_lang_sub
(
'main/image_not_read'
,
implode
(
', '
,
qa_gd_image_formats
()));
}
else
$errors
[
'avatar_default_show'
]
=
qa_lang_sub
(
'main/image_not_read'
,
implode
(
', '
,
qa_gd_image_formats
()));
}
}
}
...
...
@@ -755,45 +757,46 @@
// Mailings management
if
(
$adminsection
==
'mailing'
)
{
if
(
$adminsection
==
'mailing'
)
{
if
(
qa_clicked
(
'domailingtest'
)
||
qa_clicked
(
'domailingstart'
)
||
qa_clicked
(
'domailingresume'
)
||
qa_clicked
(
'domailingcancel'
)
)
{
if
(
!
qa_check_form_security_code
(
'admin/'
.
$adminsection
,
qa_post_text
(
'code'
)))
$securityexpired
=
true
;
$securityexpired
=
true
;
else
{
if
(
qa_clicked
(
'domailingtest'
))
{
$email
=
qa_get_logged_in_email
();
$email
=
qa_get_logged_in_email
();
if
(
qa_mailing_send_one
(
qa_get_logged_in_userid
(),
qa_get_logged_in_handle
(),
$email
,
qa_get_logged_in_user_field
(
'emailcode'
)))
$formokhtml
=
qa_lang_html_sub
(
'admin/test_sent_to_x'
,
qa_html
(
$email
));
$formokhtml
=
qa_lang_html_sub
(
'admin/test_sent_to_x'
,
qa_html
(
$email
));
else
$formokhtml
=
qa_lang_html
(
'main/general_error'
);
$formokhtml
=
qa_lang_html
(
'main/general_error'
);
}
if
(
qa_clicked
(
'domailingstart'
))
{
qa_mailing_start
();
$startmailing
=
true
;
$startmailing
=
true
;
}
if
(
qa_clicked
(
'domailingresume'
))
$startmailing
=
true
;
$startmailing
=
true
;
if
(
qa_clicked
(
'domailingcancel'
))
qa_mailing_stop
();
}
}
$mailingprogress
=
qa_mailing_progress_message
();
$mailingprogress
=
qa_mailing_progress_message
();
if
(
isset
(
$mailingprogress
))
{
$formokhtml
=
qa_html
(
$mailingprogress
);
$formokhtml
=
qa_html
(
$mailingprogress
);
$checkboxtodisplay
=
array
(
$checkboxtodisplay
=
array
(
'mailing_enabled'
=>
'0'
,
);
}
else
{
$checkboxtodisplay
=
array
(
}
else
{
$checkboxtodisplay
=
array
(
'mailing_from_name'
=>
'option_mailing_enabled'
,
'mailing_from_email'
=>
'option_mailing_enabled'
,
'mailing_subject'
=>
'option_mailing_enabled'
,
...
...
@@ -808,19 +811,19 @@
// Get the actual options
$options
=
qa_get_options
(
$getoptions
);
$options
=
qa_get_options
(
$getoptions
);
// Prepare content for theme
$qa_content
=
qa_content_prepare
();
$qa_content
=
qa_content_prepare
();
$qa_content
[
'title'
]
=
qa_lang_html
(
'admin/admin_title'
)
.
' - '
.
qa_lang_html
(
$subtitle
);
$qa_content
[
'error'
]
=
$securityexpired
?
qa_lang_html
(
'admin/form_security_expired'
)
:
qa_admin_page_error
();
$qa_content
[
'title'
]
=
qa_lang_html
(
'admin/admin_title'
)
.
' - '
.
qa_lang_html
(
$subtitle
);
$qa_content
[
'error'
]
=
$securityexpired
?
qa_lang_html
(
'admin/form_security_expired'
)
:
qa_admin_page_error
();
$qa_content
[
'script_rel'
][]
=
'qa-content/qa-admin.js?'
.
QA_VERSION
;
$qa_content
[
'script_rel'
][]
=
'qa-content/qa-admin.js?'
.
QA_VERSION
;
$qa_content
[
'form'
]
=
array
(
$qa_content
[
'form'
]
=
array
(
'ok'
=>
$formokhtml
,
'tags'
=>
'method="post" action="'
.
qa_self_html
()
.
'" name="admin_form" onsubmit="document.forms.admin_form.has_js.value=1; return true;"'
,
...
...
@@ -849,31 +852,33 @@
);
if
(
$recalchotness
)
{
$qa_content
[
'form'
][
'ok'
]
=
'<span id="recalc_ok"></span>'
;
$qa_content
[
'form'
][
'hidden'
][
'code_recalc'
]
=
qa_get_form_security_code
(
'admin/recalc'
);
$qa_content
[
'form'
][
'ok'
]
=
'<span id="recalc_ok"></span>'
;
$qa_content
[
'form'
][
'hidden'
][
'code_recalc'
]
=
qa_get_form_security_code
(
'admin/recalc'
);
$qa_content
[
'script_var'
][
'qa_warning_recalc'
]
=
qa_lang
(
'admin/stop_recalc_warning'
);
$qa_content
[
'script_var'
][
'qa_warning_recalc'
]
=
qa_lang
(
'admin/stop_recalc_warning'
);
$qa_content
[
'script_onloads'
][]
=
array
(
$qa_content
[
'script_onloads'
][]
=
array
(
"qa_recalc_click('dorecountposts', document.getElementById('dosaveoptions'), null, 'recalc_ok');"
);
}
elseif
(
$startmailing
)
{
}
elseif
(
$startmailing
)
{
if
(
qa_post_text
(
'has_js'
))
{
$qa_content
[
'form'
][
'ok'
]
=
'<span id="mailing_ok">'
.
qa_html
(
$mailingprogress
)
.
'</span>'
;
$qa_content
[
'form'
][
'ok'
]
=
'<span id="mailing_ok">'
.
qa_html
(
$mailingprogress
)
.
'</span>'
;
$qa_content
[
'script_onloads'
][]
=
array
(
$qa_content
[
'script_onloads'
][]
=
array
(
"qa_mailing_start('mailing_ok', 'domailingpause');"
);
}
else
{
// rudimentary non-Javascript version of mass mailing loop
}
else
{
// rudimentary non-Javascript version of mass mailing loop
echo
'<tt>'
;
while
(
true
)
{
qa_mailing_perform_step
();
$message
=
qa_mailing_progress_message
();
$message
=
qa_mailing_progress_message
();
if
(
!
isset
(
$message
))
break
;
...
...
@@ -893,37 +898,39 @@
function
qa_optionfield_make_select
(
&
$optionfield
,
$options
,
$value
,
$default
)
{
$optionfield
[
'type'
]
=
'select'
;
$optionfield
[
'options'
]
=
$options
;
$optionfield
[
'value'
]
=
isset
(
$options
[
qa_html
(
$value
)])
?
$options
[
qa_html
(
$value
)]
:
@
$options
[
$default
];
$optionfield
[
'type'
]
=
'select'
;
$optionfield
[
'options'
]
=
$options
;
$optionfield
[
'value'
]
=
isset
(
$options
[
qa_html
(
$value
)])
?
$options
[
qa_html
(
$value
)]
:
@
$options
[
$default
];
}
$indented
=
false
;
$indented
=
false
;
foreach
(
$showoptions
as
$optionname
)
if
(
empty
(
$optionname
))
{
$indented
=
false
;
$indented
=
false
;
$qa_content
[
'form'
][
'fields'
][]
=
array
(
$qa_content
[
'form'
][
'fields'
][]
=
array
(
'type'
=>
'blank'
);
}
elseif
(
strpos
(
$optionname
,
'/'
)
!==
false
)
{
$qa_content
[
'form'
][
'fields'
][]
=
array
(
}
elseif
(
strpos
(
$optionname
,
'/'
)
!==
false
)
{
$qa_content
[
'form'
][
'fields'
][]
=
array
(
'type'
=>
'static'
,
'label'
=>
qa_lang_html
(
$optionname
),
);
$indented
=
true
;
$indented
=
true
;
}
else
{
$type
=@
$optiontype
[
$optionname
];
if
(
$type
==
'number-blank'
)
$type
=
'number'
;
}
else
{
$type
=
@
$optiontype
[
$optionname
];
if
(
$type
==
'number-blank'
)
$type
=
'number'
;
$value
=
$options
[
$optionname
];
$value
=
$options
[
$optionname
];
$optionfield
=
array
(
$optionfield
=
array
(
'id'
=>
$optionname
,
'label'
=>
(
$indented
?
'– '
:
''
)
.
qa_lang_html
(
'options/'
.
$optionname
),
'tags'
=>
'name="option_'
.
$optionname
.
'" id="option_'
.
$optionname
.
'"'
,
...
...
@@ -933,10 +940,10 @@
);
if
(
isset
(
$optionmaximum
[
$optionname
]))
$optionfield
[
'note'
]
=
qa_lang_html_sub
(
'admin/maximum_x'
,
$optionmaximum
[
$optionname
]);
$optionfield
[
'note'
]
=
qa_lang_html_sub
(
'admin/maximum_x'
,
$optionmaximum
[
$optionname
]);
$feedrequest
=
null
;
$feedisexample
=
false
;
$feedrequest
=
null
;
$feedisexample
=
false
;
switch
(
$optionname
)
{
// special treatment for certain options
case
'site_language'
:
...
...
@@ -944,19 +951,19 @@
qa_optionfield_make_select
(
$optionfield
,
qa_admin_language_options
(),
$value
,
''
);
$optionfield
[
'suffix'
]
=
strtr
(
qa_lang_html
(
'admin/check_language_suffix'
),
array
(
$optionfield
[
'suffix'
]
=
strtr
(
qa_lang_html
(
'admin/check_language_suffix'
),
array
(
'^1'
=>
'<a href="'
.
qa_html
(
qa_path_to_root
()
.
'qa-include/qa-check-lang.php'
)
.
'">'
,
'^2'
=>
'</a>'
,
));
if
(
!
qa_has_multibyte
())
$optionfield
[
'error'
]
=
qa_lang_html
(
'admin/no_multibyte'
);
$optionfield
[
'error'
]
=
qa_lang_html
(
'admin/no_multibyte'
);
break
;
case
'neat_urls'
:
$neatoptions
=
array
();
$neatoptions
=
array
();
$rawoptions
=
array
(
$rawoptions
=
array
(
QA_URL_FORMAT_NEAT
,
QA_URL_FORMAT_INDEX
,
QA_URL_FORMAT_PARAM
,
...
...
@@ -964,28 +971,29 @@
QA_URL_FORMAT_SAFEST
,
);
foreach
(
$rawoptions
as
$rawoption
)
$neatoptions
[
$rawoption
]
=
foreach
(
$rawoptions
as
$rawoption
)
{
$neatoptions
[
$rawoption
]
=
'<iframe src="'
.
qa_path_html
(
'url/test/'
.
QA_URL_TEST_STRING
,
array
(
'dummy'
=>
''
,
'param'
=>
QA_URL_TEST_STRING
),
null
,
$rawoption
)
.
'" width="20" height="16" style="vertical-align:middle; border:0" scrolling="no" frameborder="0"></iframe> '
.
'<small>'
.
qa_html
(
urldecode
(
qa_path
(
'123/why-do-birds-sing'
,
null
,
'/'
,
$rawoption
)))
.
((
$rawoption
==
QA_URL_FORMAT_NEAT
)
?
strtr
(
qa_lang_html
(
'admin/neat_urls_note'
),
array
(
((
$rawoption
==
QA_URL_FORMAT_NEAT
)
?
strtr
(
qa_lang_html
(
'admin/neat_urls_note'
),
array
(
'^1'
=>
'<a href="http://www.question2answer.org/htaccess.php" target="_blank">'
,
'^2'
=>
'</a>'
,
))
:
''
)
.
'</small>'
;
}
qa_optionfield_make_select
(
$optionfield
,
$neatoptions
,
$value
,
QA_URL_FORMAT_SAFEST
);
$optionfield
[
'type'
]
=
'select-radio'
;
$optionfield
[
'note'
]
=
qa_lang_html_sub
(
'admin/url_format_note'
,
'<span style=" '
.
qa_admin_url_test_html
()
.
'/span>'
);
$optionfield
[
'type'
]
=
'select-radio'
;
$optionfield
[
'note'
]
=
qa_lang_html_sub
(
'admin/url_format_note'
,
'<span style=" '
.
qa_admin_url_test_html
()
.
'/span>'
);
break
;
case
'site_theme'
:
case
'site_theme_mobile'
:
$themeoptions
=
qa_admin_theme_options
();
$themeoptions
=
qa_admin_theme_options
();
if
(
!
isset
(
$themeoptions
[
$value
]))
$value
=
'Classic'
;
// check here because we also need $value for qa_addon_metadata()
$value
=
'Classic'
;
// check here because we also need $value for qa_addon_metadata()
qa_optionfield_make_select
(
$optionfield
,
$themeoptions
,
$value
,
'Classic'
);
...
...
@@ -994,41 +1002,41 @@
$metadata
=
qa_addon_metadata
(
$contents
,
'Theme'
);
if
(
strlen
(
@
$metadata
[
'version'
]))
$namehtml
=
'v'
.
qa_html
(
$metadata
[
'version'
]);
$namehtml
=
'v'
.
qa_html
(
$metadata
[
'version'
]);
else
$namehtml
=
''
;
$namehtml
=
''
;
if
(
strlen
(
@
$metadata
[
'uri'
]))
{
if
(
!
strlen
(
$namehtml
))
$namehtml
=
qa_html
(
$value
);
$namehtml
=
qa_html
(
$value
);
$namehtml
=
'<a href="'
.
qa_html
(
$metadata
[
'uri'
])
.
'">'
.
$namehtml
.
'</a>'
;
$namehtml
=
'<a href="'
.
qa_html
(
$metadata
[
'uri'
])
.
'">'
.
$namehtml
.
'</a>'
;
}
$authorhtml
=
''
;
if
(
strlen
(
@
$metadata
[
'author'
]))
{
$authorhtml
=
qa_html
(
$metadata
[
'author'
]);
$authorhtml
=
qa_html
(
$metadata
[
'author'
]);
if
(
strlen
(
@
$metadata
[
'author_uri'
]))
$authorhtml
=
'<a href="'
.
qa_html
(
$metadata
[
'author_uri'
])
.
'">'
.
$authorhtml
.
'</a>'
;
$authorhtml
=
'<a href="'
.
qa_html
(
$metadata
[
'author_uri'
])
.
'">'
.
$authorhtml
.
'</a>'
;
$authorhtml
=
qa_lang_html_sub
(
'main/by_x'
,
$authorhtml
);
$authorhtml
=
qa_lang_html_sub
(
'main/by_x'
,
$authorhtml
);
}
else
$authorhtml
=
''
;
}
$updatehtml
=
''
;
if
(
strlen
(
@
$metadata
[
'version'
])
&&
strlen
(
@
$metadata
[
'update'
]))
{
$elementid
=
'version_check_'
.
$optionname
;
$elementid
=
'version_check_'
.
$optionname
;
$updatehtml
=
'(<span id="'
.
$elementid
.
'">...</span>)'
;
$updatehtml
=
'(<span id="'
.
$elementid
.
'">...</span>)'
;
$qa_content
[
'script_onloads'
][]
=
array
(
$qa_content
[
'script_onloads'
][]
=
array
(
"qa_version_check("
.
qa_js
(
$metadata
[
'update'
])
.
", 'Theme', "
.
qa_js
(
$metadata
[
'version'
],
true
)
.
", "
.
qa_js
(
$elementid
)
.
");"
);
}
else
$updatehtml
=
''
;
}
$optionfield
[
'suffix'
]
=
$namehtml
.
' '
.
$authorhtml
.
' '
.
$updatehtml
;
$optionfield
[
'suffix'
]
=
$namehtml
.
' '
.
$authorhtml
.
' '
.
$updatehtml
;
break
;
case
'tags_or_categories'
:
...
...
@@ -1039,15 +1047,15 @@
'tc'
=>
qa_lang_html
(
'admin/tags_and_categories'
),
),
$value
,
'tc'
);
$optionfield
[
'error'
]
=
''
;
$optionfield
[
'error'
]
=
''
;
if
(
qa_opt
(
'cache_tagcount'
)
&&
!
qa_using_tags
())
$optionfield
[
'error'
]
.=
qa_lang_html
(
'admin/tags_not_shown'
)
.
' '
;
$optionfield
[
'error'
]
.=
qa_lang_html
(
'admin/tags_not_shown'
)
.
' '
;
if
(
!
qa_using_categories
())
foreach
(
$categories
as
$category
)
if
(
$category
[
'qcount'
])
{
$optionfield
[
'error'
]
.=
qa_lang_html
(
'admin/categories_not_shown'
);
$optionfield
[
'error'
]
.=
qa_lang_html
(
'admin/categories_not_shown'
);
break
;
}
break
;
...
...
@@ -1067,18 +1075,18 @@
case
'custom_in_head'
:
case
'home_description'
:
unset
(
$optionfield
[
'label'
]);
$optionfield
[
'rows'
]
=
6
;
$optionfield
[
'rows'
]
=
6
;
break
;
case
'custom_home_content'
:
$optionfield
[
'rows'
]
=
16
;
$optionfield
[
'rows'
]
=
16
;
break
;
case
'show_custom_register'
:
case
'show_custom_welcome'
:
case
'show_notice_welcome'
:
case
'show_notice_visitor'
:
$optionfield
[
'style'
]
=
'tall'
;
$optionfield
[
'style'
]
=
'tall'
;
break
;
case
'custom_register'
:
...
...
@@ -1086,19 +1094,19 @@
case
'notice_welcome'
:
case
'notice_visitor'
:
unset
(
$optionfield
[
'label'
]);
$optionfield
[
'style'
]
=
'tall'
;
$optionfield
[
'rows'
]
=
3
;
$optionfield
[
'style'
]
=
'tall'
;
$optionfield
[
'rows'
]
=
3
;
break
;
case
'avatar_allow_gravatar'
:
$optionfield
[
'label'
]
=
strtr
(
$optionfield
[
'label'
],
array
(
$optionfield
[
'label'
]
=
strtr
(
$optionfield
[
'label'
],
array
(
'^1'
=>
'<a href="http://www.gravatar.com/" target="_blank">'
,
'^2'
=>
'</a>'
,
));
if
(
!
qa_has_gd_image
())
{
$optionfield
[
'style'
]
=
'tall'
;
$optionfield
[
'error'
]
=
qa_lang_html
(
'admin/no_image_gd'
);
$optionfield
[
'style'
]
=
'tall'
;
$optionfield
[
'error'
]
=
qa_lang_html
(
'admin/no_image_gd'
);
}
break
;
...
...
@@ -1110,19 +1118,19 @@
case
'avatar_q_page_c_size'
:
case
'avatar_q_list_size'
:
case
'avatar_message_list_size'
:
$optionfield
[
'note'
]
=
qa_lang_html
(
'admin/pixels'
);
$optionfield
[
'note'
]
=
qa_lang_html
(
'admin/pixels'
);
break
;
case
'avatar_default_show'
;
$qa_content
[
'form'
][
'tags'
]
.=
'enctype="multipart/form-data"'
;
$optionfield
[
'label'
]
.=
' <span style="margin:2px 0; display:inline-block;">'
.
$qa_content
[
'form'
][
'tags'
]
.=
'enctype="multipart/form-data"'
;
$optionfield
[
'label'
]
.=
' <span style="margin:2px 0; display:inline-block;">'
.
qa_get_avatar_blob_html
(
qa_opt
(
'avatar_default_blobid'
),
qa_opt
(
'avatar_default_width'
),
qa_opt
(
'avatar_default_height'
),
32
)
.
'</span> <input name="avatar_default_file" type="file" style="width:16em;">'
;
break
;
case
'logo_width'
:
case
'logo_height'
:
$optionfield
[
'suffix'
]
=
qa_lang_html
(
'admin/pixels'
);
$optionfield
[
'suffix'
]
=
qa_lang_html
(
'admin/pixels'
);
break
;
case
'pages_prev_next'
:
...
...
@@ -1139,16 +1147,16 @@
case
'min_len_q_content'
:
case
'min_len_a_content'
:
case
'min_len_c_content'
:
$optionfield
[
'note'
]
=
qa_lang_html
(
'admin/characters'
);
$optionfield
[
'note'
]
=
qa_lang_html
(
'admin/characters'
);
break
;
case
'min_num_q_tags'
:
case
'max_num_q_tags'
:
$optionfield
[
'note'
]
=
qa_lang_html_sub
(
'main/x_tags'
,
''
);
// this to avoid language checking error: a_lang('main/1_tag')
$optionfield
[
'note'
]
=
qa_lang_html_sub
(
'main/x_tags'
,
''
);
// this to avoid language checking error: a_lang('main/1_tag')
break
;
case
'show_full_date_days'
:
$optionfield
[
'note'
]
=
qa_lang_html_sub
(
'main/x_days'
,
''
);
$optionfield
[
'note'
]
=
qa_lang_html_sub
(
'main/x_days'
,
''
);
break
;
case
'sort_answers_by'
:
...
...
@@ -1159,7 +1167,7 @@
break
;
case
'page_size_q_as'
:
$optionfield
[
'note'
]
=
qa_lang_html_sub
(
'main/x_answers'
,
''
);
$optionfield
[
'note'
]
=
qa_lang_html_sub
(
'main/x_answers'
,
''
);
break
;
case
'show_a_form_immediate'
:
...
...
@@ -1172,7 +1180,7 @@
case
'show_fewer_cs_from'
:
case
'show_fewer_cs_count'
:
$optionfield
[
'note'
]
=
qa_lang_html_sub
(
'main/x_comments'
,
''
);
$optionfield
[
'note'
]
=
qa_lang_html_sub
(
'main/x_comments'
,
''
);
break
;
case
'match_related_qs'
:
...
...
@@ -1182,27 +1190,27 @@
break
;
case
'block_bad_words'
:
$optionfield
[
'style'
]
=
'tall'
;
$optionfield
[
'rows'
]
=
4
;
$optionfield
[
'note'
]
=
qa_lang_html
(
'admin/block_words_note'
);
$optionfield
[
'style'
]
=
'tall'
;
$optionfield
[
'rows'
]
=
4
;
$optionfield
[
'note'
]
=
qa_lang_html
(
'admin/block_words_note'
);
break
;
case
'editor_for_qs'
:
case
'editor_for_as'
:
case
'editor_for_cs'
:
$editors
=
qa_list_modules
(
'editor'
);
$editors
=
qa_list_modules
(
'editor'
);
$selectoptions
=
array
();
$optionslinks
=
false
;
$selectoptions
=
array
();
$optionslinks
=
false
;
foreach
(
$editors
as
$editor
)
{
$selectoptions
[
qa_html
(
$editor
)]
=
strlen
(
$editor
)
?
qa_html
(
$editor
)
:
qa_lang_html
(
'admin/basic_editor'
);
$selectoptions
[
qa_html
(
$editor
)]
=
strlen
(
$editor
)
?
qa_html
(
$editor
)
:
qa_lang_html
(
'admin/basic_editor'
);
if
(
$editor
==
$value
)
{
$module
=
qa_load_module
(
'editor'
,
$editor
);
if
(
$editor
==
$value
)
{
$module
=
qa_load_module
(
'editor'
,
$editor
);
if
(
method_exists
(
$module
,
'admin_form'
))
$optionfield
[
'note'
]
=
'<a href="'
.
qa_admin_module_options_path
(
'editor'
,
$editor
)
.
'">'
.
qa_lang_html
(
'admin/options'
)
.
'</a>'
;
$optionfield
[
'note'
]
=
'<a href="'
.
qa_admin_module_options_path
(
'editor'
,
$editor
)
.
'">'
.
qa_lang_html
(
'admin/options'
)
.
'</a>'
;
}
}
...
...
@@ -1213,34 +1221,34 @@
case
'extra_field_active'
:
case
'show_custom_answer'
:
case
'show_custom_comment'
:
$optionfield
[
'style'
]
=
'tall'
;
$optionfield
[
'style'
]
=
'tall'
;
break
;
case
'custom_ask'
:
case
'custom_answer'
:
case
'custom_comment'
:
$optionfield
[
'style'
]
=
'tall'
;
$optionfield
[
'style'
]
=
'tall'
;
unset
(
$optionfield
[
'label'
]);
$optionfield
[
'rows'
]
=
3
;
$optionfield
[
'rows'
]
=
3
;
break
;
case
'extra_field_display'
:
$optionfield
[
'style'
]
=
'tall'
;
$optionfield
[
'label'
]
=
'<span id="extra_field_label_hidden" style="display:none;">'
.
$optionfield
[
'label'
]
.
'</span><span id="extra_field_label_shown">'
.
qa_lang_html
(
'options/extra_field_display_label'
)
.
'</span>'
;
$optionfield
[
'style'
]
=
'tall'
;
$optionfield
[
'label'
]
=
'<span id="extra_field_label_hidden" style="display:none;">'
.
$optionfield
[
'label'
]
.
'</span><span id="extra_field_label_shown">'
.
qa_lang_html
(
'options/extra_field_display_label'
)
.
'</span>'
;
break
;
case
'extra_field_prompt'
:
case
'extra_field_label'
:
$optionfield
[
'style'
]
=
'tall'
;
$optionfield
[
'style'
]
=
'tall'
;
unset
(
$optionfield
[
'label'
]);
break
;
case
'search_module'
:
foreach
(
$searchmodules
as
$modulename
=>
$module
)
{
$selectoptions
[
qa_html
(
$modulename
)]
=
strlen
(
$modulename
)
?
qa_html
(
$modulename
)
:
qa_lang_html
(
'options/option_default'
);
$selectoptions
[
qa_html
(
$modulename
)]
=
strlen
(
$modulename
)
?
qa_html
(
$modulename
)
:
qa_lang_html
(
'options/option_default'
);
if
((
$modulename
==
$value
)
&&
method_exists
(
$module
,
'admin_form'
))
$optionfield
[
'note'
]
=
'<a href="'
.
qa_admin_module_options_path
(
'search'
,
$modulename
)
.
'">'
.
qa_lang_html
(
'admin/options'
)
.
'</a>'
;
if
((
$modulename
==
$value
)
&&
method_exists
(
$module
,
'admin_form'
))
$optionfield
[
'note'
]
=
'<a href="'
.
qa_admin_module_options_path
(
'search'
,
$modulename
)
.
'">'
.
qa_lang_html
(
'admin/options'
)
.
'</a>'
;
}
qa_optionfield_make_select
(
$optionfield
,
$selectoptions
,
$value
,
''
);
...
...
@@ -1251,32 +1259,32 @@
case
'hot_weight_answers'
:
case
'hot_weight_votes'
:
case
'hot_weight_views'
:
$optionfield
[
'note'
]
=
'/ 100'
;
$optionfield
[
'note'
]
=
'/ 100'
;
break
;
case
'moderate_by_points'
:
$optionfield
[
'label'
]
=
'<span id="moderate_points_label_off" style="display:none;">'
.
$optionfield
[
'label'
]
.
'</span><span id="moderate_points_label_on">'
.
qa_lang_html
(
'options/moderate_points_limit'
)
.
'</span>'
;
$optionfield
[
'label'
]
=
'<span id="moderate_points_label_off" style="display:none;">'
.
$optionfield
[
'label'
]
.
'</span><span id="moderate_points_label_on">'
.
qa_lang_html
(
'options/moderate_points_limit'
)
.
'</span>'
;
break
;
case
'moderate_points_limit'
;
unset
(
$optionfield
[
'label'
]);
$optionfield
[
'note'
]
=
qa_lang_html
(
'admin/points'
);
$optionfield
[
'note'
]
=
qa_lang_html
(
'admin/points'
);
break
;
case
'flagging_hide_after'
:
case
'flagging_notify_every'
:
case
'flagging_notify_first'
:
$optionfield
[
'note'
]
=
qa_lang_html_sub
(
'main/x_flags'
,
''
);
$optionfield
[
'note'
]
=
qa_lang_html_sub
(
'main/x_flags'
,
''
);
break
;
case
'block_ips_write'
:
$optionfield
[
'style'
]
=
'tall'
;
$optionfield
[
'rows'
]
=
4
;
$optionfield
[
'note'
]
=
qa_lang_html
(
'admin/block_ips_note'
);
$optionfield
[
'style'
]
=
'tall'
;
$optionfield
[
'rows'
]
=
4
;
$optionfield
[
'note'
]
=
qa_lang_html
(
'admin/block_ips_note'
);
break
;
case
'allow_view_q_bots'
:
$optionfield
[
'note'
]
=
$optionfield
[
'label'
];
$optionfield
[
'note'
]
=
$optionfield
[
'label'
];
unset
(
$optionfield
[
'label'
]);
break
;
...
...
@@ -1301,48 +1309,50 @@
case
'permit_anon_view_ips'
:
case
'permit_view_voters_flaggers'
:
case
'permit_post_wall'
:
$dopoints
=
true
;
$dopoints
=
true
;
if
(
$optionname
==
'permit_retag_cat'
)
$optionfield
[
'label'
]
=
qa_lang_html
(
qa_using_categories
()
?
'profile/permit_recat'
:
'profile/permit_retag'
)
.
':'
;
if
(
$optionname
==
'permit_retag_cat'
)
$optionfield
[
'label'
]
=
qa_lang_html
(
qa_using_categories
()
?
'profile/permit_recat'
:
'profile/permit_retag'
)
.
':'
;
else
$optionfield
[
'label'
]
=
qa_lang_html
(
'profile/'
.
$optionname
)
.
':'
;
if
(
(
$optionname
==
'permit_view_q_page'
)
||
(
$optionname
==
'permit_post_q'
)
||
(
$optionname
==
'permit_post_a'
)
||
(
$optionname
==
'permit_post_c'
)
||
(
$optionname
==
'permit_anon_view_ips'
)
)
$widest
=
QA_PERMIT_ALL
;
elseif
(
(
$optionname
==
'permit_close_q'
)
||
(
$optionname
==
'permit_select_a'
)
||
(
$optionname
==
'permit_moderate'
)
||
(
$optionname
==
'permit_hide_show'
)
)
$widest
=
QA_PERMIT_POINTS
;
elseif
(
$optionname
==
'permit_delete_hidden'
)
$widest
=
QA_PERMIT_EDITORS
;
elseif
(
(
$optionname
==
'permit_view_voters_flaggers'
)
||
(
$optionname
==
'permit_edit_silent'
)
)
$widest
=
QA_PERMIT_EXPERTS
;
$optionfield
[
'label'
]
=
qa_lang_html
(
'profile/'
.
$optionname
)
.
':'
;
if
(
(
$optionname
==
'permit_view_q_page'
)
||
(
$optionname
==
'permit_post_q'
)
||
(
$optionname
==
'permit_post_a'
)
||
(
$optionname
==
'permit_post_c'
)
||
(
$optionname
==
'permit_anon_view_ips'
)
)
$widest
=
QA_PERMIT_ALL
;
elseif
(
(
$optionname
==
'permit_close_q'
)
||
(
$optionname
==
'permit_select_a'
)
||
(
$optionname
==
'permit_moderate'
)
||
(
$optionname
==
'permit_hide_show'
)
)
$widest
=
QA_PERMIT_POINTS
;
elseif
(
$optionname
==
'permit_delete_hidden'
)
$widest
=
QA_PERMIT_EDITORS
;
elseif
(
(
$optionname
==
'permit_view_voters_flaggers'
)
||
(
$optionname
==
'permit_edit_silent'
)
)
$widest
=
QA_PERMIT_EXPERTS
;
else
$widest
=
QA_PERMIT_USERS
;
if
(
$optionname
==
'permit_view_q_page'
)
{
$narrowest
=
QA_PERMIT_APPROVED
;
$dopoints
=
false
;
}
elseif
(
(
$optionname
==
'permit_edit_c'
)
||
(
$optionname
==
'permit_close_q'
)
||
(
$optionname
==
'permit_select_a'
)
||
(
$optionname
==
'permit_moderate'
)
||
(
$optionname
==
'permit_hide_show'
)
||
(
$optionname
==
'permit_anon_view_ips'
)
)
$narrowest
=
QA_PERMIT_MODERATORS
;
elseif
(
(
$optionname
==
'permit_post_c'
)
||
(
$optionname
==
'permit_edit_q'
)
||
(
$optionname
==
'permit_retag_cat'
)
||
(
$optionname
==
'permit_edit_a'
)
||
(
$optionname
==
'permit_flag'
)
)
$narrowest
=
QA_PERMIT_EDITORS
;
elseif
(
(
$optionname
==
'permit_vote_q'
)
||
(
$optionname
==
'permit_vote_a'
)
||
(
$optionname
==
'permit_post_wall'
)
)
$narrowest
=
QA_PERMIT_APPROVED_POINTS
;
elseif
(
(
$optionname
==
'permit_delete_hidden'
)
||
(
$optionname
==
'permit_edit_silent'
)
)
$narrowest
=
QA_PERMIT_ADMINS
;
elseif
(
$optionname
==
'permit_view_voters_flaggers'
)
$narrowest
=
QA_PERMIT_SUPERS
;
$widest
=
QA_PERMIT_USERS
;
if
(
$optionname
==
'permit_view_q_page'
)
{
$narrowest
=
QA_PERMIT_APPROVED
;
$dopoints
=
false
;
}
elseif
(
(
$optionname
==
'permit_edit_c'
)
||
(
$optionname
==
'permit_close_q'
)
||
(
$optionname
==
'permit_select_a'
)
||
(
$optionname
==
'permit_moderate'
)
||
(
$optionname
==
'permit_hide_show'
)
||
(
$optionname
==
'permit_anon_view_ips'
)
)
$narrowest
=
QA_PERMIT_MODERATORS
;
elseif
(
(
$optionname
==
'permit_post_c'
)
||
(
$optionname
==
'permit_edit_q'
)
||
(
$optionname
==
'permit_retag_cat'
)
||
(
$optionname
==
'permit_edit_a'
)
||
(
$optionname
==
'permit_flag'
)
)
$narrowest
=
QA_PERMIT_EDITORS
;
elseif
(
(
$optionname
==
'permit_vote_q'
)
||
(
$optionname
==
'permit_vote_a'
)
||
(
$optionname
==
'permit_post_wall'
)
)
$narrowest
=
QA_PERMIT_APPROVED_POINTS
;
elseif
(
(
$optionname
==
'permit_delete_hidden'
)
||
(
$optionname
==
'permit_edit_silent'
)
)
$narrowest
=
QA_PERMIT_ADMINS
;
elseif
(
$optionname
==
'permit_view_voters_flaggers'
)
$narrowest
=
QA_PERMIT_SUPERS
;
else
$narrowest
=
QA_PERMIT_EXPERTS
;
$narrowest
=
QA_PERMIT_EXPERTS
;
$permitoptions
=
qa_admin_permit_options
(
$widest
,
$narrowest
,
(
!
QA_FINAL_EXTERNAL_USERS
)
&&
qa_opt
(
'confirm_user_emails'
),
$dopoints
);
$permitoptions
=
qa_admin_permit_options
(
$widest
,
$narrowest
,
(
!
QA_FINAL_EXTERNAL_USERS
)
&&
qa_opt
(
'confirm_user_emails'
),
$dopoints
);
if
(
count
(
$permitoptions
)
>
1
)
if
(
count
(
$permitoptions
)
>
1
)
{
qa_optionfield_make_select
(
$optionfield
,
$permitoptions
,
$value
,
(
$value
==
QA_PERMIT_CONFIRMED
)
?
QA_PERMIT_USERS
:
min
(
array_keys
(
$permitoptions
)));
(
$value
==
QA_PERMIT_CONFIRMED
)
?
QA_PERMIT_USERS
:
min
(
array_keys
(
$permitoptions
)));
}
else
{
$optionfield
[
'type'
]
=
'static'
;
$optionfield
[
'value'
]
=
reset
(
$permitoptions
);
$optionfield
[
'type'
]
=
'static'
;
$optionfield
[
'value'
]
=
reset
(
$permitoptions
);
}
break
;
...
...
@@ -1365,82 +1375,84 @@
case
'permit_anon_view_ips_points'
:
case
'permit_post_wall_points'
:
unset
(
$optionfield
[
'label'
]);
$optionfield
[
'type'
]
=
'number'
;
$optionfield
[
'prefix'
]
=
qa_lang_html
(
'admin/users_must_have'
)
.
' '
;
$optionfield
[
'note'
]
=
qa_lang_html
(
'admin/points'
);
$optionfield
[
'type'
]
=
'number'
;
$optionfield
[
'prefix'
]
=
qa_lang_html
(
'admin/users_must_have'
)
.
' '
;
$optionfield
[
'note'
]
=
qa_lang_html
(
'admin/points'
);
break
;
case
'feed_for_qa'
:
$feedrequest
=
'qa'
;
$feedrequest
=
'qa'
;
break
;
case
'feed_for_questions'
:
$feedrequest
=
'questions'
;
$feedrequest
=
'questions'
;
break
;
case
'feed_for_hot'
:
$feedrequest
=
'hot'
;
$feedrequest
=
'hot'
;
break
;
case
'feed_for_unanswered'
:
$feedrequest
=
'unanswered'
;
$feedrequest
=
'unanswered'
;
break
;
case
'feed_for_activity'
:
$feedrequest
=
'activity'
;
$feedrequest
=
'activity'
;
break
;
case
'feed_per_category'
:
if
(
count
(
$categories
))
{
$category
=
reset
(
$categories
);
$categoryslug
=
$category
[
'tags'
];
$category
=
reset
(
$categories
);
$categoryslug
=
$category
[
'tags'
];
}
else
$categoryslug
=
'example-category'
;
}
else
$categoryslug
=
'example-category'
;
if
(
qa_opt
(
'feed_for_qa'
))
$feedrequest
=
'qa'
;
$feedrequest
=
'qa'
;
elseif
(
qa_opt
(
'feed_for_questions'
))
$feedrequest
=
'questions'
;
$feedrequest
=
'questions'
;
else
$feedrequest
=
'activity'
;
$feedrequest
=
'activity'
;
$feedrequest
.=
'/'
.
$categoryslug
;
$feedisexample
=
true
;
$feedrequest
.=
'/'
.
$categoryslug
;
$feedisexample
=
true
;
break
;
case
'feed_for_tag_qs'
:
$populartags
=
qa_db_select_with_pending
(
qa_db_popular_tags_selectspec
(
0
,
1
));
$populartags
=
qa_db_select_with_pending
(
qa_db_popular_tags_selectspec
(
0
,
1
));
if
(
count
(
$populartags
))
{
reset
(
$populartags
);
$feedrequest
=
'tag/'
.
key
(
$populartags
);
}
else
$feedrequest
=
'tag/singing'
;
$feedrequest
=
'tag/'
.
key
(
$populartags
);
}
else
$feedrequest
=
'tag/singing'
;
$feedisexample
=
true
;
$feedisexample
=
true
;
break
;
case
'feed_for_search'
:
$feedrequest
=
'search/why do birds sing'
;
$feedisexample
=
true
;
$feedrequest
=
'search/why do birds sing'
;
$feedisexample
=
true
;
break
;
case
'moderate_users'
:
$optionfield
[
'note'
]
=
'<a href="'
.
qa_path_html
(
'admin/users'
,
null
,
null
,
null
,
'profile_fields'
)
.
'">'
.
qa_lang_html
(
'admin/registration_fields'
)
.
'</a>'
;
$optionfield
[
'note'
]
=
'<a href="'
.
qa_path_html
(
'admin/users'
,
null
,
null
,
null
,
'profile_fields'
)
.
'">'
.
qa_lang_html
(
'admin/registration_fields'
)
.
'</a>'
;
break
;
case
'captcha_module'
:
$captchaoptions
=
array
();
$captchaoptions
=
array
();
foreach
(
$captchamodules
as
$modulename
)
{
$captchaoptions
[
qa_html
(
$modulename
)]
=
qa_html
(
$modulename
);
$captchaoptions
[
qa_html
(
$modulename
)]
=
qa_html
(
$modulename
);
if
(
$modulename
==
$value
)
{
$module
=
qa_load_module
(
'captcha'
,
$modulename
);
if
(
$modulename
==
$value
)
{
$module
=
qa_load_module
(
'captcha'
,
$modulename
);
if
(
method_exists
(
$module
,
'admin_form'
))
$optionfield
[
'note'
]
=
'<a href="'
.
qa_admin_module_options_path
(
'captcha'
,
$modulename
)
.
'">'
.
qa_lang_html
(
'admin/options'
)
.
'</a>'
;
$optionfield
[
'note'
]
=
'<a href="'
.
qa_admin_module_options_path
(
'captcha'
,
$modulename
)
.
'">'
.
qa_lang_html
(
'admin/options'
)
.
'</a>'
;
}
}
...
...
@@ -1463,7 +1475,7 @@
case
'max_rate_ip_registers'
:
case
'max_rate_ip_uploads'
:
case
'max_rate_ip_votes'
:
$optionfield
[
'note'
]
=
qa_lang_html
(
'admin/per_ip_hour'
);
$optionfield
[
'note'
]
=
qa_lang_html
(
'admin/per_ip_hour'
);
break
;
case
'max_rate_user_as'
:
...
...
@@ -1474,18 +1486,18 @@
case
'max_rate_user_uploads'
:
case
'max_rate_user_votes'
:
unset
(
$optionfield
[
'label'
]);
$optionfield
[
'note'
]
=
qa_lang_html
(
'admin/per_user_hour'
);
$optionfield
[
'note'
]
=
qa_lang_html
(
'admin/per_user_hour'
);
break
;
case
'mailing_per_minute'
:
$optionfield
[
'suffix'
]
=
qa_lang_html
(
'admin/emails_per_minute'
);
$optionfield
[
'suffix'
]
=
qa_lang_html
(
'admin/emails_per_minute'
);
break
;
}
if
(
isset
(
$feedrequest
)
&&
$value
)
$optionfield
[
'note'
]
=
'<a href="'
.
qa_path_html
(
qa_feed_request
(
$feedrequest
))
.
'">'
.
qa_lang_html
(
$feedisexample
?
'admin/feed_link_example'
:
'admin/feed_link'
)
.
'</a>'
;
$optionfield
[
'note'
]
=
'<a href="'
.
qa_path_html
(
qa_feed_request
(
$feedrequest
))
.
'">'
.
qa_lang_html
(
$feedisexample
?
'admin/feed_link_example'
:
'admin/feed_link'
)
.
'</a>'
;
$qa_content
[
'form'
][
'fields'
][
$optionname
]
=
$optionfield
;
$qa_content
[
'form'
][
'fields'
][
$optionname
]
=
$optionfield
;
}
...
...
@@ -1494,26 +1506,26 @@
switch
(
$adminsection
)
{
case
'users'
:
if
(
!
QA_FINAL_EXTERNAL_USERS
)
{
$userfields
=
qa_db_single_select
(
qa_db_userfields_selectspec
());
$userfields
=
qa_db_single_select
(
qa_db_userfields_selectspec
());
$listhtml
=
''
;
$listhtml
=
''
;
foreach
(
$userfields
as
$userfield
)
{
$listhtml
.=
'<li><b>'
.
qa_html
(
qa_user_userfield_label
(
$userfield
))
.
'</b>'
;
$listhtml
.=
'<li><b>'
.
qa_html
(
qa_user_userfield_label
(
$userfield
))
.
'</b>'
;
$listhtml
.=
strtr
(
qa_lang_html
(
'admin/edit_field'
),
array
(
$listhtml
.=
strtr
(
qa_lang_html
(
'admin/edit_field'
),
array
(
'^1'
=>
'<a href="'
.
qa_path_html
(
'admin/userfields'
,
array
(
'edit'
=>
$userfield
[
'fieldid'
]))
.
'">'
,
'^2'
=>
'</a>'
,
));
$listhtml
.=
'</li>'
;
$listhtml
.=
'</li>'
;
}
$listhtml
.=
'<li><b><a href="'
.
qa_path_html
(
'admin/userfields'
)
.
'">'
.
qa_lang_html
(
'admin/add_new_field'
)
.
'</a></b></li>'
;
$listhtml
.=
'<li><b><a href="'
.
qa_path_html
(
'admin/userfields'
)
.
'">'
.
qa_lang_html
(
'admin/add_new_field'
)
.
'</a></b></li>'
;
$qa_content
[
'form'
][
'fields'
][]
=
array
(
'type'
=>
'blank'
);
$qa_content
[
'form'
][
'fields'
][]
=
array
(
'type'
=>
'blank'
);
$qa_content
[
'form'
][
'fields'
][
'userfields'
]
=
array
(
$qa_content
[
'form'
][
'fields'
][
'userfields'
]
=
array
(
'label'
=>
qa_lang_html
(
'admin/profile_fields'
),
'id'
=>
'profile_fields'
,
'style'
=>
'tall'
,
...
...
@@ -1522,27 +1534,27 @@
);
}
$qa_content
[
'form'
][
'fields'
][]
=
array
(
'type'
=>
'blank'
);
$qa_content
[
'form'
][
'fields'
][]
=
array
(
'type'
=>
'blank'
);
$pointstitle
=
qa_get_points_to_titles
();
$pointstitle
=
qa_get_points_to_titles
();
$listhtml
=
''
;
$listhtml
=
''
;
foreach
(
$pointstitle
as
$points
=>
$title
)
{
$listhtml
.=
'<li><b>'
.
$title
.
'</b> - '
.
((
$points
==
1
)
?
qa_lang_html_sub
(
'main/1_point'
,
'1'
,
'1'
)
$listhtml
.=
'<li><b>'
.
$title
.
'</b> - '
.
((
$points
==
1
)
?
qa_lang_html_sub
(
'main/1_point'
,
'1'
,
'1'
)
:
qa_lang_html_sub
(
'main/x_points'
,
qa_html
(
number_format
(
$points
))));
$listhtml
.=
strtr
(
qa_lang_html
(
'admin/edit_title'
),
array
(
$listhtml
.=
strtr
(
qa_lang_html
(
'admin/edit_title'
),
array
(
'^1'
=>
'<a href="'
.
qa_path_html
(
'admin/usertitles'
,
array
(
'edit'
=>
$points
))
.
'">'
,
'^2'
=>
'</a>'
,
));
$listhtml
.=
'</li>'
;
$listhtml
.=
'</li>'
;
}
$listhtml
.=
'<li><b><a href="'
.
qa_path_html
(
'admin/usertitles'
)
.
'">'
.
qa_lang_html
(
'admin/add_new_title'
)
.
'</a></b></li>'
;
$listhtml
.=
'<li><b><a href="'
.
qa_path_html
(
'admin/usertitles'
)
.
'">'
.
qa_lang_html
(
'admin/add_new_title'
)
.
'</a></b></li>'
;
$qa_content
[
'form'
][
'fields'
][
'usertitles'
]
=
array
(
$qa_content
[
'form'
][
'fields'
][
'usertitles'
]
=
array
(
'label'
=>
qa_lang_html
(
'admin/user_titles'
),
'style'
=>
'tall'
,
'type'
=>
'custom'
,
...
...
@@ -1551,52 +1563,52 @@
break
;
case
'layout'
:
$listhtml
=
''
;
$listhtml
=
''
;
$widgetmodules
=
qa_load_modules_with
(
'widget'
,
'allow_template'
);
$widgetmodules
=
qa_load_modules_with
(
'widget'
,
'allow_template'
);
foreach
(
$widgetmodules
as
$tryname
=>
$trywidget
)
if
(
method_exists
(
$trywidget
,
'allow_region'
))
{
$listhtml
.=
'<li><b>'
.
qa_html
(
$tryname
)
.
'</b>'
;
$listhtml
.=
'<li><b>'
.
qa_html
(
$tryname
)
.
'</b>'
;
$listhtml
.=
strtr
(
qa_lang_html
(
'admin/add_widget_link'
),
array
(
$listhtml
.=
strtr
(
qa_lang_html
(
'admin/add_widget_link'
),
array
(
'^1'
=>
'<a href="'
.
qa_path_html
(
'admin/layoutwidgets'
,
array
(
'title'
=>
$tryname
))
.
'">'
,
'^2'
=>
'</a>'
,
));
if
(
method_exists
(
$trywidget
,
'admin_form'
))
$listhtml
.=
strtr
(
qa_lang_html
(
'admin/widget_global_options'
),
array
(
$listhtml
.=
strtr
(
qa_lang_html
(
'admin/widget_global_options'
),
array
(
'^1'
=>
'<a href="'
.
qa_admin_module_options_path
(
'widget'
,
$tryname
)
.
'">'
,
'^2'
=>
'</a>'
,
));
$listhtml
.=
'</li>'
;
$listhtml
.=
'</li>'
;
}
if
(
strlen
(
$listhtml
))
$qa_content
[
'form'
][
'fields'
][
'plugins'
]
=
array
(
$qa_content
[
'form'
][
'fields'
][
'plugins'
]
=
array
(
'label'
=>
qa_lang_html
(
'admin/widgets_explanation'
),
'style'
=>
'tall'
,
'type'
=>
'custom'
,
'html'
=>
'<ul style="margin-bottom:0;">'
.
$listhtml
.
'</ul>'
,
);
$widgets
=
qa_db_single_select
(
qa_db_widgets_selectspec
());
$widgets
=
qa_db_single_select
(
qa_db_widgets_selectspec
());
$listhtml
=
''
;
$listhtml
=
''
;
$placeoptions
=
qa_admin_place_options
();
$placeoptions
=
qa_admin_place_options
();
foreach
(
$widgets
as
$widget
)
{
$listhtml
.=
'<li><b>'
.
qa_html
(
$widget
[
'title'
])
.
'</b> - '
.
$listhtml
.=
'<li><b>'
.
qa_html
(
$widget
[
'title'
])
.
'</b> - '
.
'<a href="'
.
qa_path_html
(
'admin/layoutwidgets'
,
array
(
'edit'
=>
$widget
[
'widgetid'
]))
.
'">'
.
@
$placeoptions
[
$widget
[
'place'
]]
.
'</a>'
;
$listhtml
.=
'</li>'
;
$listhtml
.=
'</li>'
;
}
if
(
strlen
(
$listhtml
))
$qa_content
[
'form'
][
'fields'
][
'widgets'
]
=
array
(
$qa_content
[
'form'
][
'fields'
][
'widgets'
]
=
array
(
'label'
=>
qa_lang_html
(
'admin/active_widgets_explanation'
),
'type'
=>
'custom'
,
'html'
=>
'<ul style="margin-bottom:0;">'
.
$listhtml
.
'</ul>'
,
...
...
@@ -1605,44 +1617,44 @@
break
;
case
'permissions'
:
$qa_content
[
'form'
][
'fields'
][
'permit_block'
]
=
array
(
$qa_content
[
'form'
][
'fields'
][
'permit_block'
]
=
array
(
'type'
=>
'static'
,
'label'
=>
qa_lang_html
(
'options/permit_block'
),
'value'
=>
qa_lang_html
(
'options/permit_moderators'
),
);
if
(
!
QA_FINAL_EXTERNAL_USERS
)
{
$qa_content
[
'form'
][
'fields'
][
'permit_approve_users'
]
=
array
(
$qa_content
[
'form'
][
'fields'
][
'permit_approve_users'
]
=
array
(
'type'
=>
'static'
,
'label'
=>
qa_lang_html
(
'options/permit_approve_users'
),
'value'
=>
qa_lang_html
(
'options/permit_moderators'
),
);
$qa_content
[
'form'
][
'fields'
][
'permit_create_experts'
]
=
array
(
$qa_content
[
'form'
][
'fields'
][
'permit_create_experts'
]
=
array
(
'type'
=>
'static'
,
'label'
=>
qa_lang_html
(
'options/permit_create_experts'
),
'value'
=>
qa_lang_html
(
'options/permit_moderators'
),
);
$qa_content
[
'form'
][
'fields'
][
'permit_see_emails'
]
=
array
(
$qa_content
[
'form'
][
'fields'
][
'permit_see_emails'
]
=
array
(
'type'
=>
'static'
,
'label'
=>
qa_lang_html
(
'options/permit_see_emails'
),
'value'
=>
qa_lang_html
(
'options/permit_admins'
),
);
$qa_content
[
'form'
][
'fields'
][
'permit_delete_users'
]
=
array
(
$qa_content
[
'form'
][
'fields'
][
'permit_delete_users'
]
=
array
(
'type'
=>
'static'
,
'label'
=>
qa_lang_html
(
'options/permit_delete_users'
),
'value'
=>
qa_lang_html
(
'options/permit_admins'
),
);
$qa_content
[
'form'
][
'fields'
][
'permit_create_eds_mods'
]
=
array
(
$qa_content
[
'form'
][
'fields'
][
'permit_create_eds_mods'
]
=
array
(
'type'
=>
'static'
,
'label'
=>
qa_lang_html
(
'options/permit_create_eds_mods'
),
'value'
=>
qa_lang_html
(
'options/permit_admins'
),
);
$qa_content
[
'form'
][
'fields'
][
'permit_create_admins'
]
=
array
(
$qa_content
[
'form'
][
'fields'
][
'permit_create_admins'
]
=
array
(
'type'
=>
'static'
,
'label'
=>
qa_lang_html
(
'options/permit_create_admins'
),
'value'
=>
qa_lang_html
(
'options/permit_supers'
),
...
...
@@ -1662,45 +1674,46 @@
unset
(
$qa_content
[
'form'
][
'hidden'
][
'dosaveoptions'
]);
foreach
(
$showoptions
as
$optionname
)
$qa_content
[
'form'
][
'fields'
][
$optionname
][
'type'
]
=
'static'
;
$qa_content
[
'form'
][
'fields'
][
$optionname
][
'type'
]
=
'static'
;
$qa_content
[
'form'
][
'fields'
][
'mailing_body'
][
'value'
]
=
qa_html
(
qa_opt
(
'mailing_body'
),
true
);
$qa_content
[
'form'
][
'fields'
][
'mailing_body'
][
'value'
]
=
qa_html
(
qa_opt
(
'mailing_body'
),
true
);
$qa_content
[
'form'
][
'buttons'
][
'stop'
]
=
array
(
$qa_content
[
'form'
][
'buttons'
][
'stop'
]
=
array
(
'tags'
=>
'name="domailingpause" id="domailingpause"'
,
'label'
=>
qa_lang_html
(
'admin/pause_mailing_button'
),
);
}
else
{
$qa_content
[
'form'
][
'buttons'
][
'resume'
]
=
array
(
}
else
{
$qa_content
[
'form'
][
'buttons'
][
'resume'
]
=
array
(
'tags'
=>
'name="domailingresume"'
,
'label'
=>
qa_lang_html
(
'admin/resume_mailing_button'
),
);
$qa_content
[
'form'
][
'buttons'
][
'cancel'
]
=
array
(
$qa_content
[
'form'
][
'buttons'
][
'cancel'
]
=
array
(
'tags'
=>
'name="domailingcancel"'
,
'label'
=>
qa_lang_html
(
'admin/cancel_mailing_button'
),
);
}
}
else
{
$qa_content
[
'form'
][
'buttons'
][
'spacer'
]
=
array
();
}
else
{
$qa_content
[
'form'
][
'buttons'
][
'spacer'
]
=
array
();
$qa_content
[
'form'
][
'buttons'
][
'test'
]
=
array
(
$qa_content
[
'form'
][
'buttons'
][
'test'
]
=
array
(
'tags'
=>
'name="domailingtest" id="domailingtest"'
,
'label'
=>
qa_lang_html
(
'admin/send_test_button'
),
);
$qa_content
[
'form'
][
'buttons'
][
'start'
]
=
array
(
$qa_content
[
'form'
][
'buttons'
][
'start'
]
=
array
(
'tags'
=>
'name="domailingstart" id="domailingstart"'
,
'label'
=>
qa_lang_html
(
'admin/start_mailing_button'
),
);
}
if
(
!
$startmailing
)
{
$qa_content
[
'form'
][
'fields'
][
'mailing_enabled'
][
'note'
]
=
qa_lang_html
(
'admin/mailing_explanation'
);
$qa_content
[
'form'
][
'fields'
][
'mailing_body'
][
'rows'
]
=
12
;
$qa_content
[
'form'
][
'fields'
][
'mailing_body'
][
'note'
]
=
qa_lang_html
(
'admin/mailing_unsubscribe'
);
$qa_content
[
'form'
][
'fields'
][
'mailing_enabled'
][
'note'
]
=
qa_lang_html
(
'admin/mailing_explanation'
);
$qa_content
[
'form'
][
'fields'
][
'mailing_body'
][
'rows'
]
=
12
;
$qa_content
[
'form'
][
'fields'
][
'mailing_body'
][
'note'
]
=
qa_lang_html
(
'admin/mailing_unsubscribe'
);
}
break
;
}
...
...
@@ -1709,7 +1722,7 @@
if
(
isset
(
$checkboxtodisplay
))
qa_set_display_rules
(
$qa_content
,
$checkboxtodisplay
);
$qa_content
[
'navigation'
][
'sub'
]
=
qa_admin_sub_navigation
();
$qa_content
[
'navigation'
][
'sub'
]
=
qa_admin_sub_navigation
();
return
$qa_content
;
...
...
qa-include/qa-page-admin-plugins.php
View file @
cea284ca
...
...
@@ -40,20 +40,20 @@
// Map modules with options to their containing plugins
$pluginoptionmodules
=
array
();
$pluginoptionmodules
=
array
();
$tables
=
qa_db_list_tables_lc
();
$moduletypes
=
qa_list_module_types
();
$tables
=
qa_db_list_tables_lc
();
$moduletypes
=
qa_list_module_types
();
foreach
(
$moduletypes
as
$type
)
{
$modules
=
qa_list_modules
(
$type
);
$modules
=
qa_list_modules
(
$type
);
foreach
(
$modules
as
$name
)
{
$module
=
qa_load_module
(
$type
,
$name
);
$module
=
qa_load_module
(
$type
,
$name
);
if
(
method_exists
(
$module
,
'admin_form'
))
{
$info
=
qa_get_module_info
(
$type
,
$name
);
$pluginoptionmodules
[
$info
[
'directory'
]][]
=
array
(
$info
=
qa_get_module_info
(
$type
,
$name
);
$pluginoptionmodules
[
$info
[
'directory'
]][]
=
array
(
'type'
=>
$type
,
'name'
=>
$name
,
);
...
...
@@ -64,111 +64,115 @@
// Prepare content for theme
$qa_content
=
qa_content_prepare
();
$qa_content
=
qa_content_prepare
();
$qa_content
[
'title'
]
=
qa_lang_html
(
'admin/admin_title'
)
.
' - '
.
qa_lang_html
(
'admin/plugins_title'
);
$qa_content
[
'title'
]
=
qa_lang_html
(
'admin/admin_title'
)
.
' - '
.
qa_lang_html
(
'admin/plugins_title'
);
$qa_content
[
'error'
]
=
qa_admin_page_error
();
$qa_content
[
'error'
]
=
qa_admin_page_error
();
$qa_content
[
'script_rel'
][]
=
'qa-content/qa-admin.js?'
.
QA_VERSION
;
$qa_content
[
'script_rel'
][]
=
'qa-content/qa-admin.js?'
.
QA_VERSION
;
$pluginfiles
=
glob
(
QA_PLUGIN_DIR
.
'*/qa-plugin.php'
);
$pluginfiles
=
glob
(
QA_PLUGIN_DIR
.
'*/qa-plugin.php'
);
foreach
(
$moduletypes
as
$type
)
{
$modules
=
qa_load_modules_with
(
$type
,
'init_queries'
);
$modules
=
qa_load_modules_with
(
$type
,
'init_queries'
);
foreach
(
$modules
as
$name
=>
$module
)
{
$queries
=
$module
->
init_queries
(
$tables
);
$queries
=
$module
->
init_queries
(
$tables
);
if
(
!
empty
(
$queries
))
{
if
(
qa_is_http_post
())
qa_redirect
(
'install'
);
else
$qa_content
[
'error'
]
=
strtr
(
qa_lang_html
(
'admin/module_x_database_init'
),
array
(
else
{
$qa_content
[
'error'
]
=
strtr
(
qa_lang_html
(
'admin/module_x_database_init'
),
array
(
'^1'
=>
qa_html
(
$name
),
'^2'
=>
qa_html
(
$type
),
'^3'
=>
'<a href="'
.
qa_path_html
(
'install'
)
.
'">'
,
'^4'
=>
'</a>'
,
));
}
}
}
}
if
(
qa_is_http_post
()
&&
!
qa_check_form_security_code
(
'admin/plugins'
,
qa_post_text
(
'qa_form_security_code'
))
)
{
$qa_content
[
'error'
]
=
qa_lang_html
(
'misc/form_security_reload'
);
$showpluginforms
=
false
;
}
else
$showpluginforms
=
true
;
$qa_content
[
'error'
]
=
qa_lang_html
(
'misc/form_security_reload'
);
$showpluginforms
=
false
;
}
else
$showpluginforms
=
true
;
if
(
count
(
$pluginfiles
))
{
foreach
(
$pluginfiles
as
$pluginindex
=>
$pluginfile
)
{
$plugindirectory
=
dirname
(
$pluginfile
)
.
'/'
;
$hash
=
qa_admin_plugin_directory_hash
(
$plugindirectory
);
$showthisform
=
$showpluginforms
&&
(
qa_get
(
'show'
)
==
$hash
);
$plugindirectory
=
dirname
(
$pluginfile
)
.
'/'
;
$hash
=
qa_admin_plugin_directory_hash
(
$plugindirectory
);
$showthisform
=
$showpluginforms
&&
(
qa_get
(
'show'
)
==
$hash
);
// limit plugin parsing to first 8kB
$contents
=
file_get_contents
(
$pluginfile
,
false
,
NULL
,
-
1
,
8192
);
$metadata
=
qa_addon_metadata
(
$contents
,
'Plugin'
);
if
(
isset
(
$metadata
[
'name'
])
&&
strlen
(
$metadata
[
'name'
]))
$namehtml
=
qa_html
(
$metadata
[
'name'
]);
$namehtml
=
qa_html
(
$metadata
[
'name'
]);
else
$namehtml
=
qa_lang_html
(
'admin/unnamed_plugin'
);
$namehtml
=
qa_lang_html
(
'admin/unnamed_plugin'
);
if
(
isset
(
$metadata
[
'uri'
])
&&
strlen
(
$metadata
[
'uri'
]))
$namehtml
=
'<a href="'
.
qa_html
(
$metadata
[
'uri'
])
.
'">'
.
$namehtml
.
'</a>'
;
$namehtml
=
'<a href="'
.
qa_html
(
$metadata
[
'uri'
])
.
'">'
.
$namehtml
.
'</a>'
;
$namehtml
=
'<b>'
.
$namehtml
.
'</b>'
;
$namehtml
=
'<b>'
.
$namehtml
.
'</b>'
;
$metaver
=
isset
(
$metadata
[
'version'
])
&&
strlen
(
$metadata
[
'version'
]);
if
(
$metaver
)
$namehtml
.=
' v'
.
qa_html
(
$metadata
[
'version'
]);
$namehtml
.=
' v'
.
qa_html
(
$metadata
[
'version'
]);
if
(
isset
(
$metadata
[
'author'
])
&&
strlen
(
$metadata
[
'author'
]))
{
$authorhtml
=
qa_html
(
$metadata
[
'author'
]);
$authorhtml
=
qa_html
(
$metadata
[
'author'
]);
if
(
isset
(
$metadata
[
'author_uri'
])
&&
strlen
(
$metadata
[
'author_uri'
]))
$authorhtml
=
'<a href="'
.
qa_html
(
$metadata
[
'author_uri'
])
.
'">'
.
$authorhtml
.
'</a>'
;
$authorhtml
=
'<a href="'
.
qa_html
(
$metadata
[
'author_uri'
])
.
'">'
.
$authorhtml
.
'</a>'
;
$authorhtml
=
qa_lang_html_sub
(
'main/by_x'
,
$authorhtml
);
$authorhtml
=
qa_lang_html_sub
(
'main/by_x'
,
$authorhtml
);
}
else
$authorhtml
=
''
;
}
else
$authorhtml
=
''
;
if
(
$metaver
&&
isset
(
$metadata
[
'update'
])
&&
strlen
(
$metadata
[
'update'
]))
{
$elementid
=
'version_check_'
.
md5
(
$plugindirectory
);
$elementid
=
'version_check_'
.
md5
(
$plugindirectory
);
$updatehtml
=
'(<span id="'
.
$elementid
.
'">...</span>)'
;
$updatehtml
=
'(<span id="'
.
$elementid
.
'">...</span>)'
;
$qa_content
[
'script_onloads'
][]
=
array
(
$qa_content
[
'script_onloads'
][]
=
array
(
"qa_version_check("
.
qa_js
(
$metadata
[
'update'
])
.
", 'Plugin', "
.
qa_js
(
$metadata
[
'version'
],
true
)
.
", "
.
qa_js
(
$elementid
)
.
");"
);
}
else
$updatehtml
=
''
;
}
else
$updatehtml
=
''
;
if
(
isset
(
$metadata
[
'description'
]))
$deschtml
=
qa_html
(
$metadata
[
'description'
]);
$deschtml
=
qa_html
(
$metadata
[
'description'
]);
else
$deschtml
=
''
;
$deschtml
=
''
;
if
(
isset
(
$pluginoptionmodules
[
$plugindirectory
])
&&
!
$showthisform
)
$deschtml
.=
(
strlen
(
$deschtml
)
?
' - '
:
''
)
.
'<a href="'
.
$deschtml
.=
(
strlen
(
$deschtml
)
?
' - '
:
''
)
.
'<a href="'
.
qa_admin_plugin_options_path
(
$plugindirectory
)
.
'">'
.
qa_lang_html
(
'admin/options'
)
.
'</a>'
;
$pluginhtml
=
$namehtml
.
' '
.
$authorhtml
.
' '
.
$updatehtml
.
'<br>'
.
$deschtml
.
(
strlen
(
$deschtml
)
?
'<br>'
:
''
)
.
$pluginhtml
=
$namehtml
.
' '
.
$authorhtml
.
' '
.
$updatehtml
.
'<br>'
.
$deschtml
.
(
strlen
(
$deschtml
)
?
'<br>'
:
''
)
.
'<small style="color:#666">'
.
qa_html
(
$plugindirectory
)
.
'</small>'
;
if
(
qa_qa_version_below
(
@
$metadata
[
'min_q2a'
]))
$pluginhtml
=
'<strike style="color:#999">'
.
$pluginhtml
.
'</strike><br><span style="color:#f00">'
.
$pluginhtml
=
'<strike style="color:#999">'
.
$pluginhtml
.
'</strike><br><span style="color:#f00">'
.
qa_lang_html_sub
(
'admin/requires_q2a_version'
,
qa_html
(
$metadata
[
'min_q2a'
]))
.
'</span>'
;
elseif
(
qa_php_version_below
(
@
$metadata
[
'min_php'
]))
$pluginhtml
=
'<strike style="color:#999">'
.
$pluginhtml
.
'</strike><br><span style="color:#f00">'
.
$pluginhtml
=
'<strike style="color:#999">'
.
$pluginhtml
.
'</strike><br><span style="color:#f00">'
.
qa_lang_html_sub
(
'admin/requires_php_version'
,
qa_html
(
$metadata
[
'min_php'
]))
.
'</span>'
;
$qa_content
[
'form_plugin_'
.
$pluginindex
]
=
array
(
$qa_content
[
'form_plugin_'
.
$pluginindex
]
=
array
(
'tags'
=>
'id="'
.
qa_html
(
$hash
)
.
'"'
,
'style'
=>
'tall'
,
'fields'
=>
array
(
...
...
@@ -181,30 +185,30 @@
if
(
$showthisform
&&
isset
(
$pluginoptionmodules
[
$plugindirectory
]))
foreach
(
$pluginoptionmodules
[
$plugindirectory
]
as
$pluginoptionmodule
)
{
$type
=
$pluginoptionmodule
[
'type'
];
$name
=
$pluginoptionmodule
[
'name'
];
$type
=
$pluginoptionmodule
[
'type'
];
$name
=
$pluginoptionmodule
[
'name'
];
$module
=
qa_load_module
(
$type
,
$name
);
$module
=
qa_load_module
(
$type
,
$name
);
$form
=
$module
->
admin_form
(
$qa_content
);
$form
=
$module
->
admin_form
(
$qa_content
);
if
(
!
isset
(
$form
[
'tags'
]))
$form
[
'tags'
]
=
'method="post" action="'
.
qa_admin_plugin_options_path
(
$plugindirectory
)
.
'"'
;
$form
[
'tags'
]
=
'method="post" action="'
.
qa_admin_plugin_options_path
(
$plugindirectory
)
.
'"'
;
if
(
!
isset
(
$form
[
'style'
]))
$form
[
'style'
]
=
'tall'
;
$form
[
'style'
]
=
'tall'
;
$form
[
'boxed'
]
=
true
;
$form
[
'boxed'
]
=
true
;
$form
[
'hidden'
][
'qa_form_security_code'
]
=
qa_get_form_security_code
(
'admin/plugins'
);
$form
[
'hidden'
][
'qa_form_security_code'
]
=
qa_get_form_security_code
(
'admin/plugins'
);
$qa_content
[
'form_plugin_options'
]
=
$form
;
$qa_content
[
'form_plugin_options'
]
=
$form
;
}
}
}
$qa_content
[
'navigation'
][
'sub'
]
=
qa_admin_sub_navigation
();
$qa_content
[
'navigation'
][
'sub'
]
=
qa_admin_sub_navigation
();
return
$qa_content
;
...
...
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