From e6c32556da5dd605dd38e7401eef95ffc0ed3a72 Mon Sep 17 00:00:00 2001 From: albertlast Date: Tue, 29 Sep 2026 12:33:10 +0200 Subject: [PATCH 01/20] Adds template snapshot tests that freeze what each page renders Records what about 230 pages render today, as a guest, a member and an administrator, so that moving the templates to Plates can be checked page by page. A page that renders differently fails, and the diff says how. Pages are compared as DomSnapshot describes them rather than as HTML: whitespace, comments and attribute order are dropped, and the forum's own data - ids, counts, dates, names, sessions, list lengths - is masked. Pages that list content look at fixtures built once per forum, and lists of the whole forum are narrowed to them, so the snapshots do not change when somebody posts, registers or adds a board. The errors a page logs are part of its snapshot. perturb-forum.php fills a throwaway forum with unrelated members, boards and posts. Recorded on a fresh MySQL forum, the snapshots pass there and on a fresh PostgreSQL forum, and on both again after two rounds of it. Co-Authored-By: Claude Opus 5.5 Signed-off-by: albertlast --- AGENTS.md | 30 + phpunit.xml.dist | 10 + .../Http/Snapshot/AdminSnapshotTest.php | 302 ++++++++ .../Http/Snapshot/CalendarSnapshotTest.php | 116 +++ .../Http/Snapshot/GuestSnapshotTest.php | 90 +++ .../Http/Snapshot/MemberSnapshotTest.php | 124 +++ .../Http/Snapshot/SnapshotTestCase.php | 510 ++++++++++++ .../Http/Snapshot/fixture-forum.php | 653 ++++++++++++++++ tests/Integration/Http/Snapshot/index.php | 8 + .../Http/Snapshot/perturb-forum.php | 192 +++++ .../snapshots/admin/admin_credits.txt | 90 +++ .../Snapshot/snapshots/admin/admin_index.txt | 193 +++++ .../Snapshot/snapshots/admin/admin_menu.txt | 434 +++++++++++ .../Snapshot/snapshots/admin/antispam.txt | 251 ++++++ .../Snapshot/snapshots/admin/attachments.txt | 368 +++++++++ .../snapshots/admin/attachments_avatars.txt | 390 ++++++++++ .../snapshots/admin/attachments_browse.txt | 128 +++ .../admin/attachments_browse_avatars.txt | 128 +++ .../admin/attachments_browse_thumbs.txt | 128 +++ .../admin/attachments_maintenance.txt | 225 ++++++ .../snapshots/admin/attachments_paths.txt | 126 +++ .../Http/Snapshot/snapshots/admin/bans.txt | 76 ++ .../Snapshot/snapshots/admin/bans_add.txt | 149 ++++ .../Snapshot/snapshots/admin/bans_browse.txt | 75 ++ .../Snapshot/snapshots/admin/bans_log.txt | 69 ++ .../Snapshot/snapshots/admin/board_index.txt | 95 +++ .../Http/Snapshot/snapshots/admin/chrome.txt | 185 +++++ .../Http/Snapshot/snapshots/admin/display.txt | 733 ++++++++++++++++++ .../Snapshot/snapshots/admin/display_poll.txt | 429 ++++++++++ .../snapshots/admin/features_alerts.txt | 335 ++++++++ .../snapshots/admin/features_basic.txt | 599 ++++++++++++++ .../Snapshot/snapshots/admin/features_bbc.txt | 588 ++++++++++++++ .../snapshots/admin/features_layout.txt | 172 ++++ .../snapshots/admin/features_likes.txt | 137 ++++ .../snapshots/admin/features_mentions.txt | 141 ++++ .../snapshots/admin/features_profile.txt | 257 ++++++ .../admin/features_profile_field_edit.txt | 349 +++++++++ .../admin/features_profile_field_new.txt | 346 +++++++++ .../Snapshot/snapshots/admin/features_sig.txt | 375 +++++++++ .../Http/Snapshot/snapshots/admin/index.php | 8 + .../Snapshot/snapshots/admin/languages.txt | 113 +++ .../snapshots/admin/languages_add.txt | 87 +++ .../snapshots/admin/languages_edit.txt | 113 +++ .../snapshots/admin/languages_settings.txt | 104 +++ .../Snapshot/snapshots/admin/logs_admin.txt | 121 +++ .../snapshots/admin/logs_moderation.txt | 121 +++ .../snapshots/admin/logs_settings.txt | 263 +++++++ .../Snapshot/snapshots/admin/mail_queue.txt | 127 +++ .../snapshots/admin/mail_settings.txt | 195 +++++ .../Snapshot/snapshots/admin/mail_test.txt | 89 +++ .../snapshots/admin/maintain_database.txt | 97 +++ .../snapshots/admin/maintain_members.txt | 199 +++++ .../snapshots/admin/maintain_routine.txt | 121 +++ .../snapshots/admin/maintain_topics.txt | 182 +++++ .../snapshots/admin/manage_boards.txt | 108 +++ .../admin/manage_boards_edit_board.txt | 280 +++++++ .../admin/manage_boards_edit_category.txt | 123 +++ .../snapshots/admin/manage_boards_move.txt | 171 ++++ .../admin/manage_boards_new_board.txt | 299 +++++++ .../admin/manage_boards_new_category.txt | 124 +++ .../admin/manage_boards_settings.txt | 176 +++++ .../snapshots/admin/manage_calendar.txt | 64 ++ .../snapshots/admin/manage_search.txt | 133 ++++ .../admin/manage_search_settings.txt | 243 ++++++ .../snapshots/admin/manage_search_weights.txt | 155 ++++ .../Snapshot/snapshots/admin/membergroups.txt | 233 ++++++ .../snapshots/admin/membergroups_add.txt | 171 ++++ .../admin/membergroups_add_post_group.txt | 136 ++++ .../snapshots/admin/membergroups_edit.txt | 250 ++++++ .../snapshots/admin/membergroups_settings.txt | 112 +++ .../Http/Snapshot/snapshots/admin/members.txt | 110 +++ .../snapshots/admin/members_search.txt | 286 +++++++ .../snapshots/admin/members_settings.txt | 97 +++ .../Snapshot/snapshots/admin/merge_topic.txt | 100 +++ .../snapshots/admin/message_index.txt | 372 +++++++++ .../admin/moderate_group_requests.txt | 69 ++ .../snapshots/admin/moderate_index.txt | 93 +++ .../snapshots/admin/moderate_modlog.txt | 73 ++ .../admin/moderate_reported_members.txt | 81 ++ .../moderate_reported_members_closed.txt | 81 ++ .../admin/moderate_reported_posts.txt | 80 ++ .../admin/moderate_reported_posts_closed.txt | 80 ++ .../admin/moderate_unapproved_attachments.txt | 93 +++ .../admin/moderate_unapproved_posts.txt | 93 +++ .../admin/moderate_unapproved_topics.txt | 93 +++ .../snapshots/admin/moderate_view_groups.txt | 94 +++ .../snapshots/admin/moderate_warning_log.txt | 93 +++ .../admin/moderate_warning_templates.txt | 89 +++ .../snapshots/admin/moderate_warnings.txt | 93 +++ .../admin/moderate_watched_members.txt | 88 +++ .../admin/moderate_watched_posts.txt | 72 ++ .../snapshots/admin/moderation_menu.txt | 94 +++ .../Snapshot/snapshots/admin/modsettings.txt | 79 ++ .../Snapshot/snapshots/admin/move_topic.txt | 112 +++ .../Http/Snapshot/snapshots/admin/news.txt | 129 +++ .../Snapshot/snapshots/admin/news_mailing.txt | 202 +++++ .../snapshots/admin/news_settings.txt | 172 ++++ .../Snapshot/snapshots/admin/packages.txt | 141 ++++ .../snapshots/admin/packages_options.txt | 117 +++ .../snapshots/admin/paid_subscriptions.txt | 60 ++ .../Snapshot/snapshots/admin/permissions.txt | 338 ++++++++ .../snapshots/admin/permissions_board.txt | 131 ++++ .../snapshots/admin/permissions_group.txt | 550 +++++++++++++ .../snapshots/admin/permissions_profiles.txt | 161 ++++ .../snapshots/admin/permissions_settings.txt | 138 ++++ .../Snapshot/snapshots/admin/post_edit.txt | 237 ++++++ .../snapshots/admin/post_edit_poll.txt | 126 +++ .../snapshots/admin/post_settings.txt | 232 ++++++ .../snapshots/admin/post_settings_censor.txt | 142 ++++ .../snapshots/admin/post_settings_drafts.txt | 148 ++++ .../snapshots/admin/post_settings_topics.txt | 240 ++++++ .../snapshots/admin/profile_account.txt | 300 +++++++ .../snapshots/admin/profile_delete.txt | 184 +++++ .../snapshots/admin/profile_forum.txt | 367 +++++++++ .../snapshots/admin/profile_issue_warning.txt | 251 ++++++ .../snapshots/admin/profile_permissions.txt | 401 ++++++++++ .../snapshots/admin/profile_summary.txt | 238 ++++++ .../admin/profile_track_activity.txt | 223 ++++++ .../snapshots/admin/profile_track_edits.txt | 226 ++++++ .../snapshots/admin/profile_track_ip.txt | 198 +++++ .../snapshots/admin/profile_track_logins.txt | 197 +++++ .../Snapshot/snapshots/admin/registration.txt | 147 ++++ .../admin/registration_agreement.txt | 100 +++ .../snapshots/admin/registration_policy.txt | 99 +++ .../snapshots/admin/registration_reserved.txt | 117 +++ .../snapshots/admin/registration_settings.txt | 193 +++++ .../Http/Snapshot/snapshots/admin/reports.txt | 86 ++ .../snapshots/admin/scheduled_task_edit.txt | 87 +++ .../snapshots/admin/scheduled_tasks.txt | 245 ++++++ .../snapshots/admin/scheduled_tasks_log.txt | 62 ++ .../admin/scheduled_tasks_settings.txt | 62 ++ .../snapshots/admin/search_engines.txt | 177 +++++ .../Snapshot/snapshots/admin/server_cache.txt | 126 +++ .../snapshots/admin/server_cookie.txt | 218 ++++++ .../snapshots/admin/server_database.txt | 151 ++++ .../snapshots/admin/server_export.txt | 140 ++++ .../snapshots/admin/server_general.txt | 215 +++++ .../Snapshot/snapshots/admin/server_loads.txt | 177 +++++ .../snapshots/admin/server_security.txt | 280 +++++++ .../Http/Snapshot/snapshots/admin/smileys.txt | 138 ++++ .../snapshots/admin/smileys_new_set.txt | 105 +++ .../Snapshot/snapshots/admin/smileys_set.txt | 109 +++ .../snapshots/admin/smileys_settings.txt | 175 +++++ .../Snapshot/snapshots/admin/split_topic.txt | 185 +++++ .../Http/Snapshot/snapshots/admin/themes.txt | 180 +++++ .../Snapshot/snapshots/admin/themes_copy.txt | 521 +++++++++++++ .../Snapshot/snapshots/admin/themes_edit.txt | 96 +++ .../Snapshot/snapshots/admin/themes_list.txt | 126 +++ .../Snapshot/snapshots/admin/themes_reset.txt | 103 +++ .../snapshots/admin/themes_reset_options.txt | 362 +++++++++ .../snapshots/admin/themes_settings.txt | 264 +++++++ .../Snapshot/snapshots/admin/track_ip.txt | 101 +++ .../Snapshot/snapshots/admin/warnings.txt | 172 ++++ .../Snapshot/snapshots/guest/activate.txt | 25 + .../Snapshot/snapshots/guest/agreement.txt | 39 + .../Snapshot/snapshots/guest/board_index.txt | 92 +++ .../Http/Snapshot/snapshots/guest/chrome.txt | 124 +++ .../Http/Snapshot/snapshots/guest/credits.txt | 241 ++++++ .../Http/Snapshot/snapshots/guest/display.txt | 380 +++++++++ .../snapshots/guest/display_child.txt | 196 +++++ .../Snapshot/snapshots/guest/display_poll.txt | 218 ++++++ .../Http/Snapshot/snapshots/guest/groups.txt | 55 ++ .../Http/Snapshot/snapshots/guest/help.txt | 80 ++ .../Snapshot/snapshots/guest/help_popup.txt | 21 + .../Http/Snapshot/snapshots/guest/index.php | 8 + .../Http/Snapshot/snapshots/guest/login.txt | 59 ++ .../Snapshot/snapshots/guest/login_popup.txt | 41 + .../Snapshot/snapshots/guest/member_list.txt | 55 ++ .../snapshots/guest/message_index.txt | 243 ++++++ .../snapshots/guest/message_index_child.txt | 191 +++++ .../snapshots/guest/message_index_empty.txt | 127 +++ .../snapshots/guest/no_such_topic.txt | 25 + .../Snapshot/snapshots/guest/not_found.txt | 25 + .../Http/Snapshot/snapshots/guest/post.txt | 69 ++ .../Snapshot/snapshots/guest/printpage.txt | 124 +++ .../Http/Snapshot/snapshots/guest/profile.txt | 55 ++ .../Http/Snapshot/snapshots/guest/recent.txt | 240 ++++++ .../Snapshot/snapshots/guest/reminder.txt | 34 + .../Http/Snapshot/snapshots/guest/search.txt | 122 +++ .../snapshots/guest/search_results.txt | 101 +++ .../Http/Snapshot/snapshots/guest/signup.txt | 48 ++ .../Http/Snapshot/snapshots/guest/stats.txt | 203 +++++ .../Snapshot/snapshots/guest/theme_picker.txt | 5 + .../Http/Snapshot/snapshots/guest/unread.txt | 55 ++ .../Http/Snapshot/snapshots/index.php | 8 + .../Snapshot/snapshots/member/board_index.txt | 95 +++ .../snapshots/member/calendar_list.txt | 210 +++++ .../snapshots/member/calendar_month.txt | 222 ++++++ .../snapshots/member/calendar_post.txt | 25 + .../snapshots/member/calendar_week.txt | 283 +++++++ .../Http/Snapshot/snapshots/member/chrome.txt | 152 ++++ .../Snapshot/snapshots/member/credits.txt | 241 ++++++ .../Snapshot/snapshots/member/display.txt | 641 +++++++++++++++ .../snapshots/member/display_child.txt | 353 +++++++++ .../snapshots/member/display_poll.txt | 324 ++++++++ .../Http/Snapshot/snapshots/member/groups.txt | 67 ++ .../Http/Snapshot/snapshots/member/help.txt | 80 ++ .../Http/Snapshot/snapshots/member/index.php | 8 + .../Http/Snapshot/snapshots/member/likes.txt | 5 + .../Snapshot/snapshots/member/member_list.txt | 115 +++ .../snapshots/member/member_list_search.txt | 68 ++ .../snapshots/member/message_index.txt | 371 +++++++++ .../snapshots/member/message_index_child.txt | 319 ++++++++ .../snapshots/member/message_index_empty.txt | 226 ++++++ .../snapshots/member/other_profile_posts.txt | 210 +++++ .../member/other_profile_summary.txt | 149 ++++ .../Snapshot/snapshots/member/pm_inbox.txt | 249 ++++++ .../Snapshot/snapshots/member/pm_labels.txt | 128 +++ .../Snapshot/snapshots/member/pm_outbox.txt | 131 ++++ .../Snapshot/snapshots/member/pm_prune.txt | 110 +++ .../Snapshot/snapshots/member/pm_read.txt | 249 ++++++ .../Snapshot/snapshots/member/pm_reply.txt | 197 +++++ .../Snapshot/snapshots/member/pm_rules.txt | 112 +++ .../Snapshot/snapshots/member/pm_search.txt | 173 +++++ .../Snapshot/snapshots/member/pm_send.txt | 182 +++++ .../Snapshot/snapshots/member/pm_settings.txt | 151 ++++ .../snapshots/member/post_in_locked_topic.txt | 39 + .../snapshots/member/post_new_poll.txt | 254 ++++++ .../snapshots/member/post_new_topic.txt | 202 +++++ .../Snapshot/snapshots/member/post_reply.txt | 344 ++++++++ .../Snapshot/snapshots/member/printpage.txt | 124 +++ .../snapshots/member/profile_account.txt | 144 ++++ .../snapshots/member/profile_alerts.txt | 144 ++++ .../snapshots/member/profile_attachments.txt | 201 +++++ .../snapshots/member/profile_buddies.txt | 207 +++++ .../snapshots/member/profile_delete.txt | 162 ++++ .../snapshots/member/profile_drafts.txt | 162 ++++ .../snapshots/member/profile_forum.txt | 343 ++++++++ .../snapshots/member/profile_groups.txt | 218 ++++++ .../member/profile_ignore_boards.txt | 218 ++++++ .../snapshots/member/profile_ignore_list.txt | 206 +++++ .../snapshots/member/profile_notification.txt | 348 +++++++++ .../member/profile_notification_boards.txt | 207 +++++ .../member/profile_notification_topics.txt | 213 +++++ .../snapshots/member/profile_permissions.txt | 218 ++++++ .../snapshots/member/profile_posts.txt | 303 ++++++++ .../snapshots/member/profile_statistics.txt | 215 +++++ .../snapshots/member/profile_summary.txt | 218 ++++++ .../snapshots/member/profile_theme.txt | 529 +++++++++++++ .../snapshots/member/profile_topics.txt | 299 +++++++ .../Http/Snapshot/snapshots/member/recent.txt | 316 ++++++++ .../snapshots/member/report_to_moderator.txt | 56 ++ .../Http/Snapshot/snapshots/member/search.txt | 122 +++ .../snapshots/member/search_results.txt | 101 +++ .../Http/Snapshot/snapshots/member/stats.txt | 204 +++++ .../snapshots/member/theme_picker.txt | 5 + .../Http/Snapshot/snapshots/member/unread.txt | 33 + .../snapshots/member/unread_replies.txt | 30 + tests/Support/DomSnapshot.php | 551 +++++++++++++ tests/Unit/Support/DomSnapshotTest.php | 277 +++++++ tests/Unit/Support/index.php | 8 + 251 files changed, 44483 insertions(+) create mode 100644 tests/Integration/Http/Snapshot/AdminSnapshotTest.php create mode 100644 tests/Integration/Http/Snapshot/CalendarSnapshotTest.php create mode 100644 tests/Integration/Http/Snapshot/GuestSnapshotTest.php create mode 100644 tests/Integration/Http/Snapshot/MemberSnapshotTest.php create mode 100644 tests/Integration/Http/Snapshot/SnapshotTestCase.php create mode 100644 tests/Integration/Http/Snapshot/fixture-forum.php create mode 100644 tests/Integration/Http/Snapshot/index.php create mode 100644 tests/Integration/Http/Snapshot/perturb-forum.php create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/admin_credits.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/admin_index.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/admin_menu.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/antispam.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/attachments.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/attachments_avatars.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/attachments_browse.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/attachments_browse_avatars.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/attachments_browse_thumbs.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/attachments_maintenance.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/attachments_paths.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/bans.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/bans_add.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/bans_browse.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/bans_log.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/board_index.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/chrome.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/display.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/display_poll.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/features_alerts.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/features_basic.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/features_bbc.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/features_layout.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/features_likes.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/features_mentions.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/features_profile.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/features_profile_field_edit.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/features_profile_field_new.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/features_sig.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/index.php create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/languages.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/languages_add.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/languages_edit.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/languages_settings.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/logs_admin.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/logs_moderation.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/logs_settings.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/mail_queue.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/mail_settings.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/mail_test.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/maintain_database.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/maintain_members.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/maintain_routine.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/maintain_topics.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/manage_boards.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_edit_board.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_edit_category.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_move.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_new_board.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_new_category.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_settings.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/manage_calendar.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/manage_search.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/manage_search_settings.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/manage_search_weights.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/membergroups.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/membergroups_add.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/membergroups_add_post_group.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/membergroups_edit.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/membergroups_settings.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/members.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/members_search.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/members_settings.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/merge_topic.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/message_index.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/moderate_group_requests.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/moderate_index.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/moderate_modlog.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/moderate_reported_members.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/moderate_reported_members_closed.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/moderate_reported_posts.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/moderate_reported_posts_closed.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/moderate_unapproved_attachments.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/moderate_unapproved_posts.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/moderate_unapproved_topics.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/moderate_view_groups.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/moderate_warning_log.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/moderate_warning_templates.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/moderate_warnings.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/moderate_watched_members.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/moderate_watched_posts.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/moderation_menu.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/modsettings.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/move_topic.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/news.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/news_mailing.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/news_settings.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/packages.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/packages_options.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/paid_subscriptions.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/permissions.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/permissions_board.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/permissions_group.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/permissions_profiles.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/permissions_settings.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/post_edit.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/post_edit_poll.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/post_settings.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/post_settings_censor.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/post_settings_drafts.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/post_settings_topics.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/profile_account.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/profile_delete.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/profile_forum.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/profile_issue_warning.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/profile_permissions.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/profile_summary.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/profile_track_activity.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/profile_track_edits.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/profile_track_ip.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/profile_track_logins.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/registration.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/registration_agreement.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/registration_policy.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/registration_reserved.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/registration_settings.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/reports.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/scheduled_task_edit.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/scheduled_tasks.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/scheduled_tasks_log.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/scheduled_tasks_settings.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/search_engines.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/server_cache.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/server_cookie.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/server_database.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/server_export.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/server_general.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/server_loads.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/server_security.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/smileys.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/smileys_new_set.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/smileys_set.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/smileys_settings.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/split_topic.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/themes.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/themes_copy.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/themes_edit.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/themes_list.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/themes_reset.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/themes_reset_options.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/themes_settings.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/track_ip.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/admin/warnings.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/activate.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/agreement.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/board_index.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/chrome.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/credits.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/display.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/display_child.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/display_poll.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/groups.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/help.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/help_popup.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/index.php create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/login.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/login_popup.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/member_list.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/message_index.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/message_index_child.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/message_index_empty.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/no_such_topic.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/not_found.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/post.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/printpage.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/profile.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/recent.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/reminder.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/search.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/search_results.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/signup.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/stats.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/theme_picker.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/guest/unread.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/index.php create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/board_index.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/calendar_list.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/calendar_month.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/calendar_post.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/calendar_week.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/chrome.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/credits.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/display.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/display_child.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/display_poll.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/groups.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/help.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/index.php create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/likes.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/member_list.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/member_list_search.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/message_index.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/message_index_child.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/message_index_empty.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/other_profile_posts.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/other_profile_summary.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/pm_inbox.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/pm_labels.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/pm_outbox.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/pm_prune.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/pm_read.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/pm_reply.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/pm_rules.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/pm_search.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/pm_send.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/pm_settings.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/post_in_locked_topic.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/post_new_poll.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/post_new_topic.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/post_reply.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/printpage.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_account.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_alerts.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_attachments.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_buddies.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_delete.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_drafts.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_forum.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_groups.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_ignore_boards.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_ignore_list.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_notification.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_notification_boards.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_notification_topics.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_permissions.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_posts.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_statistics.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_summary.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_theme.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/profile_topics.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/recent.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/report_to_moderator.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/search.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/search_results.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/stats.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/theme_picker.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/unread.txt create mode 100644 tests/Integration/Http/Snapshot/snapshots/member/unread_replies.txt create mode 100644 tests/Support/DomSnapshot.php create mode 100644 tests/Unit/Support/DomSnapshotTest.php create mode 100644 tests/Unit/Support/index.php diff --git a/AGENTS.md b/AGENTS.md index c9a0339583f..2bd857966a0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -339,6 +339,36 @@ in place*, because MySQL silently coerces text to a number where PostgreSQL refu On PostgreSQL a failed query also poisons the rest of the transaction, so one swallowed error turns every later query in the test into `false`. +#### Template snapshots + +`tests/Integration/Http/Snapshot/` records what about 250 pages render today, as a guest, +a member and an administrator, in `snapshots//.txt`. It exists so a +change to the template layer, such as moving the templates to another engine, can be +checked page by page: a page that renders differently fails, and the diff says how. + +```bash +.dev/test.sh --engine mysql --testsuite snapshot +SMF_UPDATE_SNAPSHOTS=1 .dev/test.sh --engine mysql --testsuite snapshot # re-record +``` + +- **What is compared is not the HTML.** `tests/Support/DomSnapshot.php` reduces a page to + its elements, attributes and text, with whitespace, comments and attribute order + dropped and the forum's own data masked: ids and counts become `#`, dates `{date}`, + names and subjects `{member}`, `{board}`, `{subject}`, and identical rows of a list + collapse into one. So reflowing a template is not a failure, and neither is somebody + posting. +- **Pages that list content look at fixtures.** `fixture-forum.php` builds a category of + boards, topics, members, a poll, a PM and calendar events with pinned dates, once per + forum, and the snapshots are scoped to it. Point a new case at a fixture, not at + whatever the forum happens to hold. +- **A snapshot includes what the page logged.** A conversion that renders the same page + while logging an undefined index shows up as a diff too. +- **Re-recording is a decision, not a fix.** Read the diff first. The only diffs that + should appear while converting templates are ones you meant to make. +- **Check a new case is stable** by recording it on a fresh forum, running + `perturb-forum.php` (which adds unrelated members, boards and posts, so only on a + forum you will throw away), and running the suite again without recording. + #### Writing one `tests/Unit/Test.php`, namespace `SMF\Tests\Unit`, `declare(strict_types=1)`, diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 8d9fe7313e0..fd802300bd5 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -26,6 +26,16 @@ tests/Integration/Http + tests/Integration/Http/Snapshot + + + + + tests/Integration/Http/Snapshot diff --git a/tests/Integration/Http/Snapshot/AdminSnapshotTest.php b/tests/Integration/Http/Snapshot/AdminSnapshotTest.php new file mode 100644 index 00000000000..85aceed79c7 --- /dev/null +++ b/tests/Integration/Http/Snapshot/AdminSnapshotTest.php @@ -0,0 +1,302 @@ + .sub_bar', '#admin_content .windowbg > form']; + + /** + * The versions of the database, PHP, the web server and the extensions, + * which describe the machine rather than the forum: Apache in the + * container, PHP's own server in CI, and MySQL or PostgreSQL either way. + */ + public const SUPPORT_INFORMATION = [ + '#admin_content .roundframe > .title_bar:not(#support_resources) + .padding', + '#admin_content script', + ]; + + /** + * Which cache accelerators PHP was built with, and the settings form, which + * has a section for each one it found. The form is the same settings + * template as every other settings page here. + */ + public const CACHE_SETTINGS = [ + '#admin_content .information + .information', + '#admin_form_wrapper .windowbg', + ]; + + /**************** + * Public methods + ****************/ + + #[DataProvider('pages')] + public function testThePageRendersAsItDid(string $name, string $path, array $roots = self::ADMIN, array $ignore = [], array $only = [], array $unordered = []): void + { + $this->assertPageMatchesSnapshot($name, $path, $roots, $ignore, $only, $unordered); + } + + public function testTheChromeRendersAsItDid(): void + { + $this->assertPageMatchesSnapshot('chrome', '', self::CHROME, self::CHROME_IGNORE); + } + + public function testTheAdminMenuRendersAsItDid(): void + { + $this->assertPageMatchesSnapshot('admin_menu', '?action=admin', ['#genericmenu']); + } + + public function testTheModerationMenuRendersAsItDid(): void + { + $this->assertPageMatchesSnapshot('moderation_menu', '?action=moderate', ['#genericmenu']); + } + + /*********************** + * Public static methods + ***********************/ + + public static function audience(): string + { + return 'admin'; + } + + /** + * The pages, as name, path, and optionally what to compare and what to + * leave out of it. + * + * @return array The cases. + */ + public static function pages(): array + { + return self::cases([ + // The forum, as an administrator sees it. + ['board_index', '', self::BOARD_INDEX, self::BOARD_INDEX_IGNORE], + ['message_index', '?board={board:Snapshot board}.0', self::PAGE], + ['display', '?topic={topic:Snapshot topic}.0', self::PAGE], + ['display_poll', '?topic={topic:Snapshot poll topic}.0', self::PAGE], + ['post_edit', '?action=post;msg={first_msg:Snapshot topic};topic={topic:Snapshot topic}.0', self::PAGE], + ['post_edit_poll', '?action=editpoll;topic={topic:Snapshot poll topic}.0', self::PAGE], + ['split_topic', '?action=splittopics;topic={topic:Snapshot topic}.0;at={first_msg:Snapshot topic}', self::PAGE, [], [], ['.split_messages']], + ['merge_topic', '?action=mergetopics;board={board:Snapshot board}.0;from={topic:Snapshot second topic}', self::PAGE, [], ['select[name="targetboard"] optgroup']], + ['move_topic', '?action=movetopic;current_board={board:Snapshot board};topic={topic:Snapshot second topic}.0', self::PAGE, [], ['select[name="toboard"] optgroup']], + ['track_ip', '?action=trackip;searchip=127.0.0.1', self::PAGE, self::LOG_ROWS, self::LIST_PAGES], + + // A member's profile, as an administrator sees it. + ['profile_summary', '?action=profile;u={member:snapshot_member}', self::PAGE], + ['profile_account', '?action=profile;u={member:snapshot_member};area=account', self::PAGE], + ['profile_forum', '?action=profile;u={member:snapshot_member};area=forumprofile', self::PAGE], + ['profile_permissions', '?action=profile;u={member:snapshot_member};area=permissions', self::PAGE, [], [], ['table.table_grid tbody']], + ['profile_issue_warning', '?action=profile;u={member:snapshot_member};area=issuewarning', self::PAGE], + ['profile_track_activity', '?action=profile;u={member:snapshot_member};area=tracking;sa=activity', self::PAGE, [...self::LOG_ROWS, ...self::SHARED_ADDRESSES], self::LIST_PAGES], + ['profile_track_ip', '?action=profile;u={member:snapshot_member};area=tracking;sa=ip', self::PAGE, self::LOG_ROWS, self::LIST_PAGES], + ['profile_track_edits', '?action=profile;u={member:snapshot_member};area=tracking;sa=edits', self::PAGE, self::SHARED_ADDRESSES], + ['profile_track_logins', '?action=profile;u={member:snapshot_member};area=tracking;sa=logins', self::PAGE, self::LOG_ROWS, self::LIST_PAGES], + ['profile_delete', '?action=profile;u={member:snapshot_member};area=deleteaccount', self::PAGE], + + // The moderation centre. + ['moderate_index', '?action=moderate;area=index'], + ['moderate_modlog', '?action=moderate;area=modlog', self::ADMIN, self::LOG_ROWS, self::LIST_PAGES], + ['moderate_reported_posts', '?action=moderate;area=reportedposts'], + ['moderate_reported_posts_closed', '?action=moderate;area=reportedposts;sa=closed'], + ['moderate_reported_members', '?action=moderate;area=reportedmembers'], + ['moderate_reported_members_closed', '?action=moderate;area=reportedmembers;sa=closed'], + ['moderate_warnings', '?action=moderate;area=warnings'], + ['moderate_warning_log', '?action=moderate;area=warnings;sa=log'], + ['moderate_warning_templates', '?action=moderate;area=warnings;sa=templates'], + ['moderate_group_requests', '?action=moderate;area=groups;sa=requests'], + ['moderate_view_groups', '?action=moderate;area=viewgroups'], + ['moderate_watched_members', '?action=moderate;area=userwatch;sa=member'], + ['moderate_watched_posts', '?action=moderate;area=userwatch;sa=post'], + ['moderate_unapproved_posts', '?action=moderate;area=postmod;sa=posts'], + ['moderate_unapproved_topics', '?action=moderate;area=postmod;sa=topics'], + ['moderate_unapproved_attachments', '?action=moderate;area=attachmod'], + + // Administration: the centre itself. + ['admin_index', '?action=admin'], + ['admin_credits', '?action=admin;area=credits', self::ADMIN, self::SUPPORT_INFORMATION], + + // Configuration. + ['features_basic', '?action=admin;area=featuresettings;sa=basic'], + ['features_bbc', '?action=admin;area=featuresettings;sa=bbc'], + ['features_layout', '?action=admin;area=featuresettings;sa=layout'], + ['features_sig', '?action=admin;area=featuresettings;sa=sig'], + ['features_profile', '?action=admin;area=featuresettings;sa=profile'], + ['features_profile_field_new', '?action=admin;area=featuresettings;sa=profileedit'], + ['features_profile_field_edit', '?action=admin;area=featuresettings;sa=profileedit;fid=1'], + ['features_likes', '?action=admin;area=featuresettings;sa=likes'], + ['features_mentions', '?action=admin;area=featuresettings;sa=mentions'], + ['features_alerts', '?action=admin;area=featuresettings;sa=alerts'], + ['antispam', '?action=admin;area=antispam'], + ['languages', '?action=admin;area=languages'], + ['languages_add', '?action=admin;area=languages;sa=add'], + ['languages_edit', '?action=admin;area=languages;sa=edit'], + ['languages_settings', '?action=admin;area=languages;sa=settings'], + ['server_general', '?action=admin;area=serversettings;sa=general'], + ['server_database', '?action=admin;area=serversettings;sa=database', self::ADMIN, [], self::ENGINE_SETTINGS], + ['server_cookie', '?action=admin;area=serversettings;sa=cookie'], + ['server_security', '?action=admin;area=serversettings;sa=security'], + ['server_cache', '?action=admin;area=serversettings;sa=cache', self::ADMIN, self::CACHE_SETTINGS], + ['server_export', '?action=admin;area=serversettings;sa=export'], + ['server_loads', '?action=admin;area=serversettings;sa=loads'], + ['themes', '?action=admin;area=theme;sa=admin'], + ['themes_list', '?action=admin;area=theme;sa=list'], + ['themes_settings', '?action=admin;area=theme;sa=list;th=1'], + ['themes_reset', '?action=admin;area=theme;sa=reset'], + ['themes_reset_options', '?action=admin;area=theme;th=1;sa=reset;who=1'], + ['themes_edit', '?action=admin;area=theme;sa=edit'], + ['themes_copy', '?action=admin;area=theme;th=1;sa=copy'], + ['modsettings', '?action=admin;area=modsettings;sa=general'], + + // Layout. + ['manage_boards', '?action=admin;area=manageboards;sa=main', self::ADMIN, [], self::CATEGORY_LIST], + ['manage_boards_move', '?action=admin;area=manageboards;move={board:Snapshot child two}', self::ADMIN, [], self::CATEGORY_LIST], + ['manage_boards_new_category', '?action=admin;area=manageboards;sa=newcat', self::ADMIN, [], ['select[name="cat_order"] option']], + ['manage_boards_edit_category', '?action=admin;area=manageboards;sa=cat;cat={category}', self::ADMIN, [], ['select[name="cat_order"] option']], + ['manage_boards_new_board', '?action=admin;area=manageboards;sa=newboard;cat={category}', self::ADMIN, [], ['select[name="new_cat"] option'], self::PROFILE_LISTS], + ['manage_boards_edit_board', '?action=admin;area=manageboards;sa=board;boardid={board:Snapshot board}', self::ADMIN, [], ['select[name="new_cat"] option'], self::PROFILE_LISTS], + ['manage_boards_settings', '?action=admin;area=manageboards;sa=settings', self::ADMIN, [], ['#recycle_board option']], + ['news', '?action=admin;area=news;sa=editnews'], + ['news_mailing', '?action=admin;area=news;sa=mailingmembers'], + ['news_settings', '?action=admin;area=news;sa=settings'], + ['post_settings', '?action=admin;area=postsettings;sa=posts'], + ['post_settings_topics', '?action=admin;area=postsettings;sa=topics'], + ['post_settings_drafts', '?action=admin;area=postsettings;sa=drafts'], + ['post_settings_censor', '?action=admin;area=postsettings;sa=censor'], + ['manage_calendar', '?action=admin;area=managecalendar'], + ['manage_search', '?action=admin;area=managesearch;sa=method'], + ['manage_search_settings', '?action=admin;area=managesearch;sa=settings'], + ['manage_search_weights', '?action=admin;area=managesearch;sa=weights'], + ['search_engines', '?action=admin;area=sengines'], + ['smileys', '?action=admin;area=smileys;sa=editsets'], + ['smileys_set', '?action=admin;area=smileys;sa=modifyset;set=fugue'], + ['smileys_new_set', '?action=admin;area=smileys;sa=modifyset'], + ['smileys_settings', '?action=admin;area=smileys;sa=settings'], + ['attachments', '?action=admin;area=manageattachments;sa=attachments'], + ['attachments_avatars', '?action=admin;area=manageattachments;sa=avatars'], + ['attachments_browse', '?action=admin;area=manageattachments;sa=browse'], + ['attachments_browse_avatars', '?action=admin;area=manageattachments;sa=browse;avatars'], + ['attachments_browse_thumbs', '?action=admin;area=manageattachments;sa=browse;thumbs'], + ['attachments_maintenance', '?action=admin;area=manageattachments;sa=maintenance'], + ['attachments_paths', '?action=admin;area=manageattachments;sa=attachpaths'], + + // Members. + ['members', '?action=admin;area=viewmembers;sa=all', self::ADMIN, self::LOG_ROWS, self::LIST_PAGES], + ['members_search', '?action=admin;area=viewmembers;sa=search'], + ['members_settings', '?action=admin;area=viewmembers;sa=settings'], + ['membergroups', '?action=admin;area=membergroups;sa=index'], + ['membergroups_add', '?action=admin;area=membergroups;sa=add;generalgroup', self::ADMIN, [], ['li.category']], + ['membergroups_add_post_group', '?action=admin;area=membergroups;sa=add;postgroup', self::ADMIN, [], ['li.category']], + ['membergroups_edit', '?action=admin;area=membergroups;sa=edit;group=2', self::ADMIN, [], ['li.category']], + ['membergroups_settings', '?action=admin;area=membergroups;sa=settings'], + ['permissions', '?action=admin;area=permissions;sa=index'], + ['permissions_group', '?action=admin;area=permissions;sa=modify;group=0'], + ['permissions_board', '?action=admin;area=permissions;sa=board', self::ADMIN, [], ['#admin_content .windowbg > .sub_bar', '#admin_content ul.perm_boards']], + ['permissions_profiles', '?action=admin;area=permissions;sa=profiles', self::ADMIN, [], [], self::PROFILE_LISTS], + ['permissions_settings', '?action=admin;area=permissions;sa=settings'], + ['registration', '?action=admin;area=regcenter;sa=register'], + ['registration_agreement', '?action=admin;area=regcenter;sa=agreement'], + ['registration_policy', '?action=admin;area=regcenter;sa=policy'], + ['registration_reserved', '?action=admin;area=regcenter;sa=reservednames'], + ['registration_settings', '?action=admin;area=regcenter;sa=settings'], + ['bans', '?action=admin;area=ban;sa=list'], + ['bans_add', '?action=admin;area=ban;sa=add'], + ['bans_browse', '?action=admin;area=ban;sa=browse;entity=ip'], + ['bans_log', '?action=admin;area=ban;sa=log', self::ADMIN, self::LOG_ROWS, self::LIST_PAGES], + ['paid_subscriptions', '?action=admin;area=paidsubscribe'], + ['warnings', '?action=admin;area=warnings'], + + // Maintenance. + ['maintain_routine', '?action=admin;area=maintain;sa=routine'], + ['maintain_database', '?action=admin;area=maintain;sa=database'], + ['maintain_members', '?action=admin;area=maintain;sa=members'], + // The board picker for pruning splits the categories into two + // columns by how many there are, so which column the fixtures land in + // is the forum's business. The same boards are in the two selects. + ['maintain_topics', '?action=admin;area=maintain;sa=topics', self::ADMIN, ['#rotPanel > div'], ['#id_board_from optgroup', '#id_board_to optgroup']], + ['scheduled_tasks', '?action=admin;area=scheduledtasks;sa=tasks', self::ADMIN, [], [], ['#scheduled_tasks tbody']], + ['scheduled_task_edit', '?action=admin;area=scheduledtasks;sa=taskedit;tid=3'], + ['scheduled_tasks_log', '?action=admin;area=scheduledtasks;sa=tasklog', self::ADMIN, self::LOG_ROWS, self::LIST_PAGES], + ['scheduled_tasks_settings', '?action=admin;area=scheduledtasks;sa=settings'], + ['logs_settings', '?action=admin;area=logs;sa=settings'], + ['logs_admin', '?action=admin;area=logs;sa=adminlog', self::ADMIN, self::LOG_ROWS, self::LIST_PAGES], + ['logs_moderation', '?action=admin;area=logs;sa=modlog', self::ADMIN, self::LOG_ROWS, self::LIST_PAGES], + ['mail_queue', '?action=admin;area=mailqueue;sa=browse'], + ['mail_settings', '?action=admin;area=mailqueue;sa=settings'], + ['mail_test', '?action=admin;area=mailqueue;sa=test'], + ['reports', '?action=admin;area=reports'], + ['packages', '?action=admin;area=packages;sa=browse'], + ['packages_options', '?action=admin;area=packages;sa=options'], + ]); + } +} diff --git a/tests/Integration/Http/Snapshot/CalendarSnapshotTest.php b/tests/Integration/Http/Snapshot/CalendarSnapshotTest.php new file mode 100644 index 00000000000..5c49a619e9e --- /dev/null +++ b/tests/Integration/Http/Snapshot/CalendarSnapshotTest.php @@ -0,0 +1,116 @@ +assertPageMatchesSnapshot($name, $path, $roots, $ignore, $only, $unordered); + } + + /*********************** + * Public static methods + ***********************/ + + public static function audience(): string + { + return 'member'; + } + + public static function tearDownAfterClass(): void + { + if (self::$previous !== null && isset(Db::$db)) { + self::setCalendar(self::$previous); + self::$previous = null; + } + + parent::tearDownAfterClass(); + } + + /** + * The pages, as name, path, and optionally what to compare and what to + * leave out of it. + * + * @return array The cases. + */ + public static function pages(): array + { + return self::cases([ + ['calendar_month', '?action=calendar;year=2020;month=1;day=15'], + ['calendar_week', '?action=calendar;viewweek;year=2020;month=1;day=20'], + ['calendar_list', '?action=calendar;viewlist;year=2020;month=1;day=1'], + ['calendar_post', '?action=calendar;sa=post'], + ]); + } + + /****************** + * Internal methods + ******************/ + + protected function setUp(): void + { + parent::setUp(); + + if (self::$previous === null) { + self::$previous = $this->rawSetting('cal_enabled') ?? '0'; + self::setCalendar('1'); + } + } + + /************************* + * Internal static methods + *************************/ + + /** + * Turns the calendar on or off. + * + * Written to the table rather than through Config::updateModSettings(), + * which skips a value it believes is already set. IntegrationTestCase puts + * Config::$modSettings back after every test, so by the time this class + * finishes, the copy in memory says the calendar is off while the table + * still says it is on, and the calendar would never be turned off again. + * + * @param string $value '1' or '0'. + */ + private static function setCalendar(string $value): void + { + Db::$db->insert( + 'replace', + '{db_prefix}settings', + ['variable' => 'string-255', 'value' => 'string-65534'], + [['cal_enabled', $value]], + ['variable'], + ); + } +} diff --git a/tests/Integration/Http/Snapshot/GuestSnapshotTest.php b/tests/Integration/Http/Snapshot/GuestSnapshotTest.php new file mode 100644 index 00000000000..8f4f4f8cf86 --- /dev/null +++ b/tests/Integration/Http/Snapshot/GuestSnapshotTest.php @@ -0,0 +1,90 @@ +assertPageMatchesSnapshot($name, $path, $roots, $ignore, $only, $unordered); + } + + public function testTheChromeRendersAsItDid(): void + { + $this->assertPageMatchesSnapshot('chrome', '', self::CHROME, self::CHROME_IGNORE); + } + + /*********************** + * Public static methods + ***********************/ + + public static function audience(): string + { + return 'guest'; + } + + /** + * The pages, as name, path, and optionally what to compare and what to + * leave out of it. + * + * @return array The cases. + */ + public static function pages(): array + { + return self::cases([ + // Browsing. + ['board_index', '', self::BOARD_INDEX, self::BOARD_INDEX_IGNORE], + ['message_index', '?board={board:Snapshot board}.0'], + ['message_index_child', '?board={board:Snapshot child one}.0'], + ['message_index_empty', '?board={board:Snapshot empty board}.0'], + ['display', '?topic={topic:Snapshot topic}.0'], + ['display_poll', '?topic={topic:Snapshot poll topic}.0'], + ['display_child', '?topic={topic:Snapshot child topic}.0'], + ['printpage', '?action=printpage;topic={topic:Snapshot topic}.0', self::WHOLE_PAGE], + ['recent', '?action=recent;c={category}'], + ['unread', '?action=unread'], + ['post', '?action=post;board={board:Snapshot board}.0'], + ['not_found', '?action=smf_snapshot_no_such_action'], + ['no_such_topic', '?topic=999999999.0'], + + // Signing in and up. + ['login', '?action=login'], + ['login_popup', '?action=login;ajax', self::WHOLE_PAGE], + ['reminder', '?action=reminder'], + ['activate', '?action=activate'], + ['signup', '?action=signup'], + ['agreement', '?action=agreement'], + + // Everything else a guest can try. + ['search', '?action=search', self::PAGE, [], ['.boardslist > ul > li']], + ['search_results', '?action=search2;search=bold;brd[{board:Snapshot board}]={board:Snapshot board}'], + // Narrowed to the fixture members by a search, since the list of everybody + // grows a page at a time. + ['member_list', '?action=mlist;sa=search;search=snapshot;fields=name'], + ['profile', '?action=profile;u={member:snapshot_member}'], + ['stats', '?action=stats'], + ['groups', '?action=groups'], + ['help', '?action=help'], + ['help_popup', '?action=helpadmin;help=registration_agreement', self::WHOLE_PAGE], + ['credits', '?action=credits'], + ['theme_picker', '?action=theme;sa=pick'], + ]); + } +} diff --git a/tests/Integration/Http/Snapshot/MemberSnapshotTest.php b/tests/Integration/Http/Snapshot/MemberSnapshotTest.php new file mode 100644 index 00000000000..19ec8aa5a10 --- /dev/null +++ b/tests/Integration/Http/Snapshot/MemberSnapshotTest.php @@ -0,0 +1,124 @@ +assertPageMatchesSnapshot($name, $path, $roots, $ignore, $only, $unordered); + } + + public function testTheChromeRendersAsItDid(): void + { + $this->assertPageMatchesSnapshot('chrome', '', self::CHROME, self::CHROME_IGNORE); + } + + /*********************** + * Public static methods + ***********************/ + + public static function audience(): string + { + return 'member'; + } + + /** + * The pages, as name, path, and optionally what to compare and what to + * leave out of it. + * + * @return array The cases. + */ + public static function pages(): array + { + return self::cases([ + // Browsing. + ['board_index', '', self::BOARD_INDEX, self::BOARD_INDEX_IGNORE], + ['message_index', '?board={board:Snapshot board}.0'], + ['message_index_child', '?board={board:Snapshot child one}.0'], + ['message_index_empty', '?board={board:Snapshot empty board}.0'], + ['display', '?topic={topic:Snapshot topic}.0'], + ['display_poll', '?topic={topic:Snapshot poll topic}.0'], + ['display_child', '?topic={topic:Snapshot child topic}.0'], + ['printpage', '?action=printpage;topic={topic:Snapshot topic}.0', self::WHOLE_PAGE], + ['recent', '?action=recent;c={category}'], + ['unread', '?action=unread;boards={board:Snapshot board}'], + ['unread_replies', '?action=unreadreplies;boards={board:Snapshot board}'], + + // Posting. + ['post_new_topic', '?action=post;board={board:Snapshot board}.0'], + ['post_reply', '?action=post;topic={topic:Snapshot topic}.0'], + ['post_new_poll', '?action=post;board={board:Snapshot board}.0;poll'], + ['post_in_locked_topic', '?action=post;topic={topic:Snapshot poll topic}.0'], + ['report_to_moderator', '?action=reporttm;topic={topic:Snapshot topic}.0;msg={first_msg:Snapshot topic}'], + + // Personal messages. + ['pm_inbox', '?action=pm'], + ['pm_outbox', '?action=pm;f=sent'], + ['pm_read', '?action=pm;pmsg={pm}'], + ['pm_send', '?action=pm;sa=send'], + ['pm_reply', '?action=pm;sa=send;f=inbox;pmsg={pm};quote;u={member:snapshot_other}'], + ['pm_search', '?action=pm;sa=search'], + ['pm_labels', '?action=pm;sa=manlabels'], + ['pm_rules', '?action=pm;sa=manrules'], + ['pm_settings', '?action=pm;sa=settings'], + ['pm_prune', '?action=pm;sa=prune'], + + // The member's own profile. + ['profile_summary', '?action=profile'], + ['profile_statistics', '?action=profile;area=statistics'], + ['profile_posts', '?action=profile;area=showposts'], + ['profile_topics', '?action=profile;area=showposts;sa=topics'], + ['profile_attachments', '?action=profile;area=showposts;sa=attach'], + ['profile_alerts', '?action=profile;area=showalerts'], + ['profile_drafts', '?action=profile;area=showdrafts'], + ['profile_permissions', '?action=profile;area=permissions', self::PAGE, [], [], ['table.table_grid tbody']], + ['profile_account', '?action=profile;area=account'], + ['profile_forum', '?action=profile;area=forumprofile'], + ['profile_theme', '?action=profile;area=theme'], + ['profile_notification', '?action=profile;area=notification'], + ['profile_notification_topics', '?action=profile;area=notification;sa=topics'], + ['profile_notification_boards', '?action=profile;area=notification;sa=boards'], + ['profile_ignore_boards', '?action=profile;area=ignoreboards'], + ['profile_buddies', '?action=profile;area=lists;sa=buddies'], + ['profile_ignore_list', '?action=profile;area=lists;sa=ignore'], + ['profile_groups', '?action=profile;area=groupmembership'], + ['profile_delete', '?action=profile;area=deleteaccount'], + + // Somebody else's profile. + ['other_profile_summary', '?action=profile;u={member:snapshot_other}'], + ['other_profile_posts', '?action=profile;u={member:snapshot_other};area=showposts'], + + // Everything else a member can reach. + ['search', '?action=search', self::PAGE, [], ['.boardslist > ul > li']], + ['search_results', '?action=search2;search=bold;brd[{board:Snapshot board}]={board:Snapshot board}'], + // Narrowed to the fixture members by a search, since the list of everybody + // grows a page at a time. + ['member_list', '?action=mlist;sa=search;search=snapshot;fields=name'], + ['member_list_search', '?action=mlist;sa=search'], + ['groups', '?action=groups'], + ['stats', '?action=stats'], + ['help', '?action=help'], + ['credits', '?action=credits'], + ['likes', '?action=likes;sa=view;ltype=msg;like={first_msg:Snapshot topic}'], + ['theme_picker', '?action=theme;sa=pick'], + ]); + } +} diff --git a/tests/Integration/Http/Snapshot/SnapshotTestCase.php b/tests/Integration/Http/Snapshot/SnapshotTestCase.php new file mode 100644 index 00000000000..4bd854e6a40 --- /dev/null +++ b/tests/Integration/Http/Snapshot/SnapshotTestCase.php @@ -0,0 +1,510 @@ + p:nth-of-type(2)']; + + /** + * Parts of the page that change between two identical requests whatever + * the templates do. + */ + public const ALWAYS_IGNORE = [ + // The verification honeypot, whose field Verifier names at random on + // every request so that a bot cannot learn to leave it alone. + '.vv_special input', + + // The bar drawn for each entry of a top ten. A count of nothing draws + // an empty one, and whether any entry has a count of nothing depends + // on how busy the rest of the forum is. + '.statsbar > .bar', + ]; + + /** + * Parts of the page that are there or not depending on the forum's data, + * and are left out without a trace. + * + * The count of unread messages or alerts beside a menu item, which is only + * drawn when there are some. + */ + public const ALWAYS_DROP = ['.amt']; + + /** + * What every fixture's name starts with, for narrowing a list of everything + * on the forum to the fixtures. See DomSnapshot::describe(). + */ + public const FIXTURE_MARKER = 'Snapshot'; + + /** + * Text that is the forum's data wherever it appears, and is not in a link + * that DomSnapshot would recognise as such. See DomSnapshot::describe(). + * + * A post count group changes as its member posts, so the administrator's + * reads "Newbie" or "Hero Member" depending on how the forum has been used. + * When a member was last active reads "Today" or "3 days ago" depending on + * when the list is looked at. + */ + public const MASKS = ['.postgroup', 'td.last_active']; + + /********************* + * Internal properties + *********************/ + + /** + * @var int The last error logged before the page being compared was + * requested. + */ + private int $watermark = 0; + + /**************************** + * Internal static properties + ****************************/ + + /** + * @var array|null Where the fixtures are, once they have been built. + */ + private static ?array $fixtures = null; + + /** + * @var array Signed in clients, by audience, shared by every test in the + * process. Signing in once per test would spend most of the run waiting + * for flood control. + */ + private static array $clients = []; + + /**************** + * Public methods + ****************/ + + /** + * Fetches a page and compares it with its snapshot. + * + * The status is part of the snapshot rather than asserted, so that a page + * which today turns the visitor away, or redirects, is pinned down as doing + * exactly that. + * + * @param string $name The snapshot's name, which is also its file name. + * @param string $path The page, as HttpClient::get() takes it, with + * {board:Name}, {topic:Subject}, {member:name} and friends standing for + * the fixtures' ids. + * @param array $roots What to compare. See DomSnapshot::describe(). + * @param array $ignore What to leave out. + * @param array $only Lists of everything on the forum, to narrow to the + * entries that mention the fixtures. + * @param array $unordered Lists in whatever order the database returns. + */ + public function assertPageMatchesSnapshot(string $name, string $path, array $roots = self::PAGE, array $ignore = [], array $only = [], array $unordered = []): void + { + $this->assertMatchesSnapshot($name, $this->http->get($this->resolve($path)), $roots, $ignore, $only, $unordered); + } + + /** + * Compares a response with its snapshot. + * + * @param string $name The snapshot's name. + * @param HttpResponse $response What came back. + * @param array $roots What to compare. + * @param array $ignore What to leave out. + * @param array $only Lists to narrow to the fixtures. + * @param array $unordered Lists in whatever order the database returns. + */ + public function assertMatchesSnapshot(string $name, HttpResponse $response, array $roots = self::PAGE, array $ignore = [], array $only = [], array $unordered = []): void + { + $actual = $this->describe($response, $roots, array_merge(static::ALWAYS_IGNORE, $ignore), $only, $unordered); + $file = $this->snapshotDirectory() . '/' . $name . '.txt'; + + if (getenv('SMF_UPDATE_SNAPSHOTS') === '1') { + if (!is_dir(\dirname($file))) { + mkdir(\dirname($file), 0o777, true); + } + + file_put_contents($file, $actual); + } + + if (!is_file($file)) { + $this->fail( + 'there is no snapshot for ' . $name . ' yet. Record one with SMF_UPDATE_SNAPSHOTS=1 ' + . 'and read it before committing it.', + ); + } + + $this->assertSame( + (string) file_get_contents($file), + $actual, + $name . ' (' . $response->url . ') no longer renders as it did. If the change is ' + . 'intended, record it again with SMF_UPDATE_SNAPSHOTS=1.', + ); + } + + /*********************** + * Public static methods + ***********************/ + + /** + * Who the tests in the class are looking at the forum as. + * + * @return string 'guest', 'member' or 'admin'. + */ + abstract public static function audience(): string; + + /****************** + * Internal methods + ******************/ + + protected function setUp(): void + { + parent::setUp(); + + self::$fixtures ??= $this->buildFixtures(); + + $audience = static::audience(); + + if (!isset(self::$clients[$audience])) { + self::$clients[$audience] = $this->http; + + if ($audience === 'admin') { + $this->signInAsAdmin(); + $this->passAdminSecurity(); + } elseif ($audience === 'member') { + $this->signInAsMember(); + } + } + + $this->http = self::$clients[$audience]; + + // The fixture member is signed in by one class and looked at by the + // others, which would then show them as online or not depending on the + // order the classes ran in and how long ago that was. Removing them from + // the who's online log makes them offline to everybody else, while + // leaving their session alone; their own next request puts them back. + Db::$db->query( + 'DELETE FROM {db_prefix}log_online + WHERE id_member IN ({array_int:members})', + [ + 'members' => array_values($this->fixtures()['members'] ?? [0]), + ], + ); + + // Taken after signing in, which is not what is being tested. + $row = $this->queryRow('SELECT COALESCE(MAX(id_error), 0) AS id_error FROM {db_prefix}log_errors'); + $this->watermark = (int) ($row['id_error'] ?? 0); + } + + /** + * The fixtures, as fixture-forum.php described them. + * + * @return array The fixtures. + */ + protected function fixtures(): array + { + return self::$fixtures ?? []; + } + + /** + * Replaces the fixture placeholders in a path with ids. + * + * @param string $path The path. + * @return string The path with ids in it. + */ + protected function resolve(string $path): string + { + $fixtures = $this->fixtures(); + + return (string) preg_replace_callback( + '~\{(board|topic|first_msg|member|category|admin|pm)(?::([^}]+))?\}~', + function (array $match) use ($fixtures, $path): string { + $id = match ($match[1]) { + 'board' => $fixtures['boards'][$match[2]] ?? null, + 'topic' => $fixtures['topics'][$match[2]] ?? null, + 'first_msg' => $fixtures['first_msgs'][$match[2]] ?? null, + 'member' => $fixtures['members'][$match[2]] ?? null, + 'category' => $fixtures['category'] ?? null, + 'admin' => $fixtures['admin'] ?? null, + 'pm' => $fixtures['pm'] ?? null, + }; + + $this->assertNotNull($id, 'no fixture for ' . $match[0] . ' in ' . $path); + + return (string) $id; + }, + $path, + ); + } + + /** + * Describes a response, with the errors it logged. + * + * @param HttpResponse $response The response. + * @param array $roots What to describe. + * @param array $ignore What to leave out. + * @param array $only Lists to narrow to the fixtures. + * @param array $unordered Lists in whatever order the database returns. + * @return string The description. + */ + protected function describe(HttpResponse $response, array $roots, array $ignore, array $only = [], array $unordered = []): string + { + // Where the forum is installed shows up in the server settings, and is + // /var/www/html in the container and a runner's home directory in CI. + // The name is whatever it was installed with, and the image proxy's + // secret is made up by the installer and shown in the server settings. + $snapshot = new DomSnapshot([ + $this->http->base_url => '{boardurl}', + Config::$boardurl => '{boardurl}', + Config::$boarddir => '{boarddir}', + Config::$mbname => '{forum_name}', + Config::$image_proxy_secret => '{secret}', + ]); + + // Described first, since that is what finds the session on the page for + // the masking of the location to use. + $body = $snapshot->describe( + $response->body, + array_map([$this, 'resolve'], $roots), + array_map([$this, 'resolve'], $ignore), + static::MASKS, + array_fill_keys($only, self::FIXTURE_MARKER) + array_fill_keys(static::ALWAYS_DROP, null), + $unordered, + ); + + $description = 'status ' . $response->status . "\n"; + + if (isset($response->headers['location'])) { + $description .= 'location ' . $snapshot->mask((string) $response->headers['location'], true) . "\n"; + } + + $description .= $body; + + $errors = $this->loggedErrors($snapshot); + + if ($errors !== []) { + $description .= "\n= errors logged\n" . implode("\n", $errors) . "\n"; + } + + return $description; + } + + /** + * What the forum logged since the test started, masked like the page. + * + * The file and line are left out, since they move whenever anything above + * them in the file changes. + * + * @param DomSnapshot $snapshot For its masking rules. + * @return array One line per distinct error, sorted. + */ + protected function loggedErrors(DomSnapshot $snapshot): array + { + $request = Db::$db->query( + 'SELECT id_error, error_type, message + FROM {db_prefix}log_errors + WHERE id_error > {int:watermark}', + [ + 'watermark' => $this->watermark, + ], + ); + + $errors = []; + + while ($row = Db::$db->fetch_assoc($request)) { + // Once a request has logged something the watermark moves on, so the + // next comparison in the same test only reports what came after it. + $this->watermark = max($this->watermark, (int) $row['id_error']); + + $message = html_entity_decode((string) $row['message'], ENT_QUOTES | ENT_HTML5, 'UTF-8'); + $message = trim((string) preg_replace('~\s+~u', ' ', strip_tags($message))); + + $errors[] = '[' . trim((string) $row['error_type']) . '] ' . $snapshot->mask($message); + } + + Db::$db->free_result($request); + + $errors = array_unique($errors); + sort($errors); + + return $errors; + } + + /** + * Where this class keeps its snapshots. + * + * @return string The directory. + */ + protected function snapshotDirectory(): string + { + return __DIR__ . '/snapshots/' . static::audience(); + } + + /** + * Signs in as the fixture member. + */ + protected function signInAsMember(): void + { + $fixtures = $this->fixtures(); + + for ($attempt = 0; $attempt < 2; $attempt++) { + $form = $this->http->get('?action=login'); + + $response = $this->http->submit($form, [ + 'user' => 'snapshot_member', + 'passwrd' => (string) ($fixtures['member_password'] ?? ''), + ], '//form[contains(@action, "action=login2")]'); + + if (!self::isThrottled($response)) { + break; + } + + sleep(self::FLOOD_WAIT); + } + + $this->assertSignedIn(true, 'could not sign in as the fixture member'); + } + + /** + * Gets through the password prompt the admin area puts in front of an + * administrator, when the forum has it switched on. + */ + protected function passAdminSecurity(): void + { + $page = $this->http->get('?action=admin'); + $form = '//form[.//input[@name="admin_pass"]]'; + + if ($page->xpath($form)->length === 0) { + return; + } + + $response = $this->submitForm($page, ['admin_pass' => self::adminPassword()], $form); + + $this->assertSame( + 0, + $response->xpath($form)->length, + 'the admin area asked for the password again: ' . $response->errorText(), + ); + } + + /** + * Builds the fixtures, in a process of its own. + * + * @return array Where they are. + */ + private function buildFixtures(): array + { + $script = __DIR__ . '/fixture-forum.php'; + + $process = proc_open( + [PHP_BINARY, $script], + [1 => ['pipe', 'w'], 2 => ['pipe', 'w']], + $pipes, + Config::$boarddir, + ); + + $this->assertIsResource($process, 'could not run ' . $script); + + $out = (string) stream_get_contents($pipes[1]); + $err = (string) stream_get_contents($pipes[2]); + fclose($pipes[1]); + fclose($pipes[2]); + + $status = proc_close($process); + $fixtures = json_decode($out, true); + + $this->assertSame(0, $status, 'building the fixtures failed: ' . $err . $out); + $this->assertIsArray($fixtures, 'the fixture script printed no JSON: ' . $err . $out); + + return $fixtures; + } + + /************************* + * Internal static methods + *************************/ + + /** + * Keys each case by its name, which is what PHPUnit reports. + * + * @param array $cases The cases, each starting with its name. + * @return array The same, keyed. + */ + protected static function cases(array $cases): array + { + $keyed = []; + + foreach ($cases as $case) { + $keyed[$case[0]] = $case; + } + + return $keyed; + } +} diff --git a/tests/Integration/Http/Snapshot/fixture-forum.php b/tests/Integration/Http/Snapshot/fixture-forum.php new file mode 100644 index 00000000000..c9505b22275 --- /dev/null +++ b/tests/Integration/Http/Snapshot/fixture-forum.php @@ -0,0 +1,653 @@ +build(), JSON_PRETTY_PRINT), "\n"; + +/** + * Does the work, so the script above reads as what it does. + */ +final class SnapshotFixtures +{ + /********************* + * Internal properties + *********************/ + + /** + * @var int The administrator, who creates the boards and posts some replies. + */ + private int $admin; + + /**************** + * Public methods + ****************/ + + /** + * Creates the fixtures, or finds the ones already there. + * + * @return array Where everything is, for the tests. + */ + public function build(): array + { + $this->admin = $this->adminId(); + + User::setMe($this->admin); + + // Some of what follows asks for the administrator's password again, + // unless the forum has switched that off. Having just given it is what + // User::validateSession() looks for. + $_SESSION['admin_time'] = time(); + + $category = $this->categoryId(); + + if ($category === 0) { + $this->create(); + } + + $fixtures = $this->locate(); + + $this->ensureEvents($fixtures['members']); + + return $fixtures; + } + + /****************** + * Internal methods + ******************/ + + /** + * Makes the fixtures. + */ + private function create(): void + { + $member = $this->registerMember('snapshot_member', 'Snapshot Member'); + $other = $this->registerMember('snapshot_other', 'Snapshot Other'); + + $category = Category::create([ + 'cat_name' => FIXTURE_CATEGORY, + 'cat_desc' => 'Content for the template snapshot tests.', + 'move_after' => 0, + ]); + + // -1 is guests and 0 regular members; administrators see everything. + $groups = [-1, 0]; + + $board = Board::create([ + 'board_name' => 'Snapshot board', + 'board_description' => 'Topics, replies and a poll for the snapshot tests.', + 'move_to' => 'bottom', + 'target_category' => $category, + 'access_groups' => $groups, + 'moderators' => 'snapshot_other', + ]); + + $child_one = Board::create([ + 'board_name' => 'Snapshot child one', + 'board_description' => 'The first child board.', + 'move_to' => 'child', + 'target_category' => $category, + 'target_board' => $board, + 'access_groups' => $groups, + ]); + + Board::create([ + 'board_name' => 'Snapshot child two', + 'board_description' => 'The second child board, which stays empty.', + 'move_to' => 'after', + 'target_category' => $category, + 'target_board' => $child_one, + 'access_groups' => $groups, + ]); + + Board::create([ + 'board_name' => 'Snapshot empty board', + 'board_description' => 'A board with nothing in it.', + 'move_to' => 'bottom', + 'target_category' => $category, + 'access_groups' => $groups, + ]); + + $time = FIXTURE_TIME; + + // The topic most snapshots look at. The guest reply is deliberately not + // the last post anywhere, so that no list of recent posts ever has to + // show a guest's name - one does on this topic's own page, and that is + // enough. + $topic = $this->post($board, 0, $member, 'Snapshot topic', self::richBody(), $time); + $this->post($board, $topic, 0, 'Re: Snapshot topic', 'A reply from a guest.', $time += 3600, 'Snapshot Guest'); + $this->post($board, $topic, $this->admin, 'Re: Snapshot topic', '[quote author=Snapshot Member]The quoted text.[/quote]' . "\n" . 'A reply from the administrator.', $time += 3600); + $this->post($board, $topic, $other, 'Re: Snapshot topic', 'A reply from another member, with a smiley :)', $time += 3600); + + $poll = $this->poll($this->admin, 'Which colour?', ['Red', 'Green', 'Blue']); + + $this->post($board, 0, $this->admin, 'Snapshot poll topic', 'A sticky, locked topic with a poll.', $time += 3600, '', [ + 'poll' => $poll, + 'sticky_mode' => 1, + 'lock_mode' => 1, + ]); + + $this->post($board, 0, $other, 'Snapshot second topic', 'Another topic, so the board lists more than one.', $time += 3600); + $this->post($child_one, 0, $other, 'Snapshot child topic', 'A topic in a child board.', $time += 3600); + $this->post($child_one, 0, $member, 'Snapshot second child topic', 'A second topic in the child board.', $time += 3600); + + $this->personalMessage($other, [$member, $this->admin], 'Snapshot message', 'A personal message to two people.', $time += 3600); + + + // Every visit to a topic counts as a view, and "1 view" is worded + // differently from "2 views", so the count starts high enough that + // the wording never changes again. + Db::$db->query( + 'UPDATE {db_prefix}topics + SET num_views = {int:views} + WHERE id_board IN ({array_int:boards})', + ['views' => 10, 'boards' => [$board, $child_one]], + ); + + $this->pinMembers([$member, $other], $time); + $this->markEverythingRead([$this->admin, $member, $other]); + } + + /** + * Creates the calendar events, when they are not there yet. + * + * Separate from create() so that a forum whose fixtures were built before + * the calendar snapshots existed gets them too. + * + * @param array $members The fixture members, by name. + */ + private function ensureEvents(array $members): void + { + $row = $this->queryRow( + 'SELECT id_event FROM {db_prefix}calendar WHERE title = {string:title}', + ['title' => 'Snapshot event'], + ); + + if ($row !== null) { + return; + } + + // In the same month as everything else, which is the month the calendar + // snapshots look at. One with a time and one lasting all day, since the + // calendar draws the two differently. + SMF\Calendar\Event::create([ + 'board' => 0, + 'topic' => 0, + 'member' => $members['snapshot_member'], + 'title' => 'Snapshot event', + 'location' => 'Snapshot location', + 'start_date' => '2020-01-20', + 'end_date' => '2020-01-20', + 'start_time' => '10:00', + 'end_time' => '11:30', + 'timezone' => 'UTC', + 'allday' => false, + ]); + + SMF\Calendar\Event::create([ + 'board' => 0, + 'topic' => 0, + 'member' => $members['snapshot_other'], + 'title' => 'Snapshot all day event', + 'location' => '', + 'start_date' => '2020-01-22', + 'end_date' => '2020-01-23', + 'start_time' => '00:00', + 'end_time' => '00:00', + 'timezone' => 'UTC', + 'allday' => true, + ]); + } + + /** + * Finds everything the tests need to know about. + * + * @return array Board, topic and member ids by name. + */ + private function locate(): array + { + $category = $this->categoryId(); + + $boards = $this->column( + 'SELECT name, id_board FROM {db_prefix}boards WHERE id_cat = {int:cat}', + ['cat' => $category], + ); + + $topics = $this->column( + 'SELECT m.subject, t.id_topic + FROM {db_prefix}topics AS t + INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_first_msg) + WHERE t.id_board IN ({array_int:boards})', + ['boards' => array_values($boards)], + ); + + $first_msgs = $this->column( + 'SELECT m.subject, t.id_first_msg + FROM {db_prefix}topics AS t + INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_first_msg) + WHERE t.id_board IN ({array_int:boards})', + ['boards' => array_values($boards)], + ); + + $members = $this->column( + 'SELECT member_name, id_member FROM {db_prefix}members WHERE member_name IN ({array_string:names})', + ['names' => ['snapshot_member', 'snapshot_other']], + ); + + $pm = $this->column( + 'SELECT subject, id_pm FROM {db_prefix}personal_messages WHERE subject = {string:subject}', + ['subject' => 'Snapshot message'], + ); + + return [ + 'category' => $category, + 'boards' => $boards, + 'topics' => $topics, + 'first_msgs' => $first_msgs, + 'members' => $members, + 'admin' => $this->admin, + 'member_password' => MEMBER_PASSWORD, + 'pm' => (int) ($pm['Snapshot message'] ?? 0), + ]; + } + + /** + * Posts, as the given member or as a guest. + * + * @param int $board Where. + * @param int $topic The topic to reply to, or 0 for a new one. + * @param int $poster The member, or 0 for a guest. + * @param string $subject The subject. + * @param string $body The body, in BBCode. + * @param int $time When it was posted. + * @param string $guest_name The name a guest posts under. + * @param array $topic_options Anything else the topic needs. + * @return int The topic id. + */ + private function post(int $board, int $topic, int $poster, string $subject, string $body, int $time, string $guest_name = '', array $topic_options = []): int + { + $msgOptions = [ + 'subject' => Utils::htmlspecialchars($subject), + 'body' => Utils::htmlspecialchars($body), + 'icon' => 'xx', + 'smileys_enabled' => true, + 'approved' => 1, + 'poster_time' => $time, + 'send_notifications' => false, + ]; + + $topicOptions = $topic_options + [ + 'id' => $topic, + 'board' => $board, + 'mark_as_read' => false, + ]; + + $posterOptions = [ + 'id' => $poster, + 'ip' => '127.0.0.1', + 'update_post_count' => $poster !== 0, + ]; + + if ($poster === 0) { + $posterOptions['name'] = $guest_name; + $posterOptions['email'] = 'guest@example.com'; + } + + Msg::create($msgOptions, $topicOptions, $posterOptions); + + // Msg::create() stamps the topic and board with the time now in a few + // places of its own; the message carries the pinned time already. + return (int) $topicOptions['id']; + } + + /** + * Creates a poll to attach to a topic. + * + * @param int $poster Who asked. + * @param string $question The question. + * @param array $choices The answers. + * @return int The poll id. + */ + private function poll(int $poster, string $question, array $choices): int + { + $id = (int) Db::$db->insert( + '', + '{db_prefix}polls', + [ + 'question' => 'string-255', + 'hide_results' => 'int', + 'max_votes' => 'int', + 'expire_time' => 'int', + 'id_member' => 'int', + 'poster_name' => 'string-255', + 'change_vote' => 'int', + 'guest_vote' => 'int', + ], + [[$question, 0, 1, 0, $poster, 'admin', 0, 0]], + ['id_poll'], + Db::INSERT_RETURN_MODE_SINGLE, + ); + + $rows = []; + + foreach ($choices as $i => $label) { + // Two votes for the first, one for the second, none for the third, so + // the results show a bar of each width. + $rows[] = [$id, $i, $label, max(0, 2 - $i)]; + } + + Db::$db->insert( + '', + '{db_prefix}poll_choices', + ['id_poll' => 'int', 'id_choice' => 'int', 'label' => 'string-255', 'votes' => 'int'], + $rows, + ['id_poll', 'id_choice'], + ); + + return $id; + } + + /** + * Sends a personal message and pins its time. + * + * @param int $from The sender. + * @param array $to The recipients. + * @param string $subject The subject. + * @param string $body The body. + * @param int $time When it was sent. + */ + private function personalMessage(int $from, array $to, string $subject, string $body, int $time): void + { + $sender = $this->queryRow( + 'SELECT member_name, real_name FROM {db_prefix}members WHERE id_member = {int:id}', + ['id' => $from], + ); + + PM::send(['to' => $to, 'bcc' => []], $subject, $body, true, [ + 'id' => $from, + 'name' => $sender['real_name'], + 'username' => $sender['member_name'], + ]); + + Db::$db->query( + 'UPDATE {db_prefix}personal_messages + SET msgtime = {int:time} + WHERE subject = {string:subject}', + ['time' => $time, 'subject' => $subject], + ); + + // Read already, as it will be once the member tests have opened it, so + // the unread count in the menu is the same before that as after. + Db::$db->query( + 'UPDATE {db_prefix}pm_recipients + SET is_read = {int:read}, is_new = {int:not_new} + WHERE id_member IN ({array_int:members})', + ['read' => 1, 'not_new' => 0, 'members' => $to], + ); + + Db::$db->query( + 'UPDATE {db_prefix}members + SET unread_messages = {int:none}, new_pm = {int:none} + WHERE id_member IN ({array_int:members})', + ['none' => 0, 'members' => $to], + ); + } + + /** + * Registers a member who can sign in straight away. + * + * @param string $name The member name. + * @param string $display The display name. + * @return int The member id. + */ + private function registerMember(string $name, string $display): int + { + $options = [ + 'interface' => 'admin', + 'username' => $name, + 'email' => $name . '@example.com', + 'password' => MEMBER_PASSWORD, + 'password_check' => MEMBER_PASSWORD, + 'check_reserved_name' => false, + 'check_password_strength' => false, + 'check_email_ban' => false, + 'send_welcome_email' => false, + 'require' => 'nothing', + 'memberGroup' => 0, + ]; + + $id = SMF\Actions\Register2::registerMember($options, true); + + if (!is_int($id)) { + fwrite(STDERR, 'could not register ' . $name . ': ' . json_encode($id) . "\n"); + + exit(1); + } + + Db::$db->query( + 'UPDATE {db_prefix}members + SET real_name = {string:display}, + personal_text = {string:personal_text}, + signature = {string:signature}, + website_title = {string:website_title}, + website_url = {string:website_url}, + member_ip = {inet:ip}, + member_ip2 = {inet:ip} + WHERE id_member = {int:id}', + [ + 'id' => $id, + 'display' => $display, + 'personal_text' => 'Personal text for ' . $display, + 'signature' => 'A signature with [b]bold[/b] text.', + 'website_title' => 'Example', + 'website_url' => 'https://www.example.com', + // Registering from the command line records no address, which + // no real member is without, and the tracking pages fatal on. + 'ip' => '127.0.0.1', + ], + ); + + return $id; + } + + /** + * Pins the dates a profile shows. + * + * @param array $members Who. + * @param int $time The last thing that happened. + */ + private function pinMembers(array $members, int $time): void + { + Db::$db->query( + 'UPDATE {db_prefix}members + SET date_registered = {int:registered}, last_login = {int:login} + WHERE id_member IN ({array_int:members})', + [ + 'members' => $members, + 'registered' => FIXTURE_TIME - 86400, + 'login' => $time, + ], + ); + } + + /** + * Marks every fixture board and topic read for these members. + * + * @param array $members Who. + */ + private function markEverythingRead(array $members): void + { + $boards = $this->column( + 'SELECT id_board, id_msg_updated FROM {db_prefix}boards WHERE id_cat = {int:cat}', + ['cat' => $this->categoryId()], + ); + + $topics = $this->column( + 'SELECT id_topic, id_last_msg FROM {db_prefix}topics WHERE id_board IN ({array_int:boards})', + ['boards' => array_keys($boards)], + ); + + $latest = max(array_merge([0], $topics, $boards)); + + foreach ($members as $member) { + foreach ($boards as $board => $msg) { + Db::$db->insert('replace', '{db_prefix}log_boards', ['id_member' => 'int', 'id_board' => 'int', 'id_msg' => 'int'], [[$member, $board, $latest]], ['id_member', 'id_board']); + Db::$db->insert('replace', '{db_prefix}log_mark_read', ['id_member' => 'int', 'id_board' => 'int', 'id_msg' => 'int'], [[$member, $board, $latest]], ['id_member', 'id_board']); + } + + foreach ($topics as $topic => $msg) { + Db::$db->insert('replace', '{db_prefix}log_topics', ['id_member' => 'int', 'id_topic' => 'int', 'id_msg' => 'int', 'unwatched' => 'int'], [[$member, $topic, $latest, 0]], ['id_member', 'id_topic']); + } + } + } + + /** + * The fixture category, if it has been made. + * + * @return int Its id, or 0. + */ + private function categoryId(): int + { + $row = $this->queryRow( + 'SELECT id_cat FROM {db_prefix}categories WHERE name = {string:name}', + ['name' => FIXTURE_CATEGORY], + ); + + return (int) ($row['id_cat'] ?? 0); + } + + /** + * The first administrator. + * + * @return int The member id. + */ + private function adminId(): int + { + $row = $this->queryRow( + 'SELECT id_member FROM {db_prefix}members WHERE id_group = {int:group} ORDER BY id_member LIMIT 1', + ['group' => 1], + ); + + return (int) ($row['id_member'] ?? 1); + } + + /** + * Runs a two column query into key => value. + * + * @param string $sql The query. + * @param array $params Its parameters. + * @return array The first column as keys, the second as integer values. + */ + private function column(string $sql, array $params): array + { + $request = Db::$db->query($sql, $params); + $result = []; + + while ($row = Db::$db->fetch_row($request)) { + $result[$row[0]] = (int) $row[1]; + } + + Db::$db->free_result($request); + + return $result; + } + + /** + * Runs a query and returns its first row. + * + * @param string $sql The query. + * @param array $params Its parameters. + * @return array|null The row. + */ + private function queryRow(string $sql, array $params): ?array + { + $request = Db::$db->query($sql, $params); + $row = Db::$db->fetch_assoc($request); + Db::$db->free_result($request); + + return is_array($row) ? $row : null; + } + + /************************* + * Internal static methods + *************************/ + + /** + * A first post that exercises as much of the BBCode parser's output as a + * template is likely to wrap. + * + * @return string The body. + */ + private static function richBody(): string + { + return implode("\n", [ + 'The first post, with [b]bold[/b], [i]italic[/i], [u]underlined[/u] and [s]struck[/s] text.', + '[url=https://www.simplemachines.org]A link[/url] and [email]someone@example.com[/email].', + '[quote]An unattributed quote.[/quote]', + '[code]echo "code";[/code]', + '[list][li]One[/li][li]Two[/li][/list]', + '[color=red]Red[/color] [size=12pt]Sized[/size] [center]Centred[/center]', + '[table][tr][td]A[/td][td]B[/td][/tr][/table]', + '[spoiler]Hidden[/spoiler] [hr] Smileys: :) ;)', + ]); + } +} diff --git a/tests/Integration/Http/Snapshot/index.php b/tests/Integration/Http/Snapshot/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/tests/Integration/Http/Snapshot/index.php @@ -0,0 +1,8 @@ +query( + 'SELECT id_member FROM {db_prefix}members WHERE id_group = {int:group} ORDER BY id_member LIMIT 1', + ['group' => 1], +); +[$admin] = Db::$db->fetch_row($request); +Db::$db->free_result($request); + +User::setMe((int) $admin); +$_SESSION['admin_time'] = time(); + +// Members, with the sorts of names people have. +$names = ['Zoë Ünïcödé', 'O\'Brien & Sons', 'user_' . $run, 'Another Member', 'Ma Li', 'Ångström']; +$members = []; + +for ($i = 0; $i < $scale; $i++) { + $options = [ + 'interface' => 'admin', + 'username' => 'perturb_' . $run . '_' . $i, + 'email' => 'perturb_' . $run . '_' . $i . '@example.com', + 'password' => 'perturb-password-1', + 'password_check' => 'perturb-password-1', + 'check_reserved_name' => false, + 'check_password_strength' => false, + 'check_email_ban' => false, + 'send_welcome_email' => false, + 'require' => 'nothing', + 'memberGroup' => 0, + ]; + + $id = SMF\Actions\Register2::registerMember($options, true); + + if (is_int($id)) { + $members[] = $id; + + Db::$db->query( + 'UPDATE {db_prefix}members SET real_name = {string:name} WHERE id_member = {int:id}', + ['id' => $id, 'name' => $names[$i % count($names)] . ' ' . $run . $i], + ); + } +} + +// A category with boards and child boards, and a child board of an existing +// board. +$category = Category::create(['cat_name' => 'Perturbation ' . $run, 'move_after' => 0]); + +$boards = []; + +$boards[] = Board::create([ + 'board_name' => 'Perturbed board ' . $run, + 'move_to' => 'bottom', + 'target_category' => $category, + 'access_groups' => [-1, 0], +]); + +$boards[] = Board::create([ + 'board_name' => 'Perturbed child ' . $run, + 'move_to' => 'child', + 'target_category' => $category, + 'target_board' => $boards[0], + 'access_groups' => [-1, 0], +]); + +$request = Db::$db->query( + 'SELECT id_board, id_cat FROM {db_prefix}boards WHERE name = {string:name} LIMIT 1', + ['name' => 'General Discussion'], +); +$general = Db::$db->fetch_assoc($request); +Db::$db->free_result($request); + +if (is_array($general)) { + $boards[] = (int) $general['id_board']; + + $boards[] = Board::create([ + 'board_name' => 'Perturbed sub-board ' . $run, + 'move_to' => 'child', + 'target_category' => (int) $general['id_cat'], + 'target_board' => (int) $general['id_board'], + 'access_groups' => [-1, 0], + ]); +} + +// Topics and replies, from the administrator, the new members and a guest. +$posters = array_merge([(int) $admin, 0], $members); + +for ($i = 0; $i < $scale; $i++) { + $board = $boards[$i % count($boards)]; + $poster = $posters[$i % count($posters)]; + + $msgOptions = [ + 'subject' => Utils::htmlspecialchars('Unrelated topic ' . $run . ' number ' . $i . ' with a long subject & '), + 'body' => Utils::htmlspecialchars('Body ' . $i . ' [b]bold[/b] :)'), + 'approved' => 1, + 'send_notifications' => false, + ]; + $topicOptions = [ + 'board' => $board, + 'mark_as_read' => false, + 'sticky_mode' => $i % 5 === 0 ? 1 : null, + 'lock_mode' => $i % 7 === 0 ? 1 : null, + ]; + $posterOptions = ['id' => $poster, 'ip' => '127.0.0.1', 'update_post_count' => $poster !== 0]; + + if ($poster === 0) { + $posterOptions['name'] = 'A Guest ' . $run; + $posterOptions['email'] = 'guest@example.com'; + } + + Msg::create($msgOptions, $topicOptions, $posterOptions); + + for ($j = 0; $j < 1 + $i % 3; $j++) { + $replier = $posters[($i + $j + 1) % count($posters)]; + + $replyOptions = [ + 'subject' => $msgOptions['subject'], + 'body' => Utils::htmlspecialchars('Reply ' . $j . ' [quote]quoted[/quote]'), + 'approved' => 1, + 'send_notifications' => false, + ]; + $replyTopic = ['id' => $topicOptions['id'], 'board' => $board, 'mark_as_read' => false]; + $replyPoster = ['id' => $replier, 'ip' => '127.0.0.1', 'update_post_count' => $replier !== 0]; + + if ($replier === 0) { + $replyPoster['name'] = 'A Guest ' . $run; + $replyPoster['email'] = 'guest@example.com'; + } + + Msg::create($replyOptions, $replyTopic, $replyPoster); + } +} + +// Personal messages, to the administrator and between the new members. +foreach (array_slice($members, 0, $scale) as $i => $from) { + $to = [(int) $admin]; + + if (isset($members[$i + 1])) { + $to[] = $members[$i + 1]; + } + + PM::send(['to' => $to, 'bcc' => []], 'Unrelated message ' . $run . ' ' . $i, 'Hello.', true, [ + 'id' => $from, + 'name' => 'perturb_' . $run . '_' . $i, + 'username' => 'perturb_' . $run . '_' . $i, + ]); +} + +echo 'added ', count($members), ' members, ', count($boards), ' boards and ', $scale, ' topics (run ', $run, ")\n"; diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/admin_credits.txt b/tests/Integration/Http/Snapshot/snapshots/admin/admin_credits.txt new file mode 100644 index 00000000000..6e045024518 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/admin_credits.txt @@ -0,0 +1,90 @@ +status 200 +@ title +title + "Support and Credits" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=credits;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Support and Credits" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + "Support and Credits" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + div.noup.roundframe + div.title_bar + h3.titlebg + "Support Information" + snapshot-ignored [selector="#admin_content .roundframe > .title_bar:not(#support_resources) + .padding"] + div#support_resources.title_bar + h3.titlebg + "Support Resources" + div.padding + p + "Our" + a [href="https://wiki.simplemachines.org/"] + "Online Manual" + "provides the main documentation for SMF. The SMF Online Manual has many documents to help answer support questions and explain" + a [href="https://wiki.simplemachines.org/smf/features#"] + "Features" + "," + a [href="https://wiki.simplemachines.org/smf/options#"] + "Settings" + "," + a [href="https://wiki.simplemachines.org/smf/themes#"] + "Themes" + "," + a [href="https://wiki.simplemachines.org/smf/packages#"] + "Packages" + ", etc. The Online Manual documents each area of SMF thoroughly and should answer most questions quickly." + p + "If you cannot find the answers to your questions in the Online Manual, you may want to search our" + a [href="https://www.simplemachines.org/community/"] + "Support Community" + "or ask for assistance in either our" + a [href="https://www.simplemachines.org/redirect/english_support"] + "English" + "or one of our many" + a [href="https://www.simplemachines.org/redirect/international_support_boards"] + "international support boards" + ". The SMF Support Community can be used for" + a [href="https://www.simplemachines.org/redirect/smf_support"] + "support" + "," + a [href="https://www.simplemachines.org/redirect/customize_support"] + "customization" + ", and many other things such as discussing SMF, finding a host, and discussing administrative issues with other forum administrators." + div#credits_sections.title_bar + h3.titlebg + "Credits" + snapshot-ignored [selector="#admin_content .roundframe > .title_bar:not(#support_resources) + .padding"] + snapshot-ignored [selector="#admin_content script"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/admin_index.txt b/tests/Integration/Http/Snapshot/snapshots/admin/admin_index.txt new file mode 100644 index 00000000000..8707ec5753c --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/admin_index.txt @@ -0,0 +1,193 @@ +status 200 +@ title +title + "Administration Center" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + "Administration Center" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + strong + "Hello, {member}." + "This is your \"Administration Center\". From here, you can edit settings, maintain your forum, view logs, install packages, manage themes, and many other things." + br + "If you have any trouble, please look at the \"Support & Credits\" page. If the information there does not help you, feel free to" + a [href="https://www.simplemachines.org/community/index.php" rel="noopener" target="_blank"] + "look to us for help" + "with the problem." + br + "You may also find answers to your questions or problems by clicking the" + span.help.main_icons [title="Help"] + "symbols for more information on the related functions." + div#update_section + div#admin_main_section + div#live_news.floatleft + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=live_news" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Live from Simple Machines..." + div.nopadding.windowbg + div#smfAnnouncements + "You are unable to connect to simplemachines.org’s latest news file." + div#support_info.floatright + div.cat_bar + h3.catbg + a [href="{boardurl}/index.php?action=admin;area=credits"] + "Support Information" + div.nopadding.windowbg + div#version_details.padding + strong + "Version Information" + ul + li + "Forum version:" + em#yourVersion + "SMF #.# Alpha(s) #-dev" + li + "Current SMF version:" + em#smfVersion + "??" + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=routine;activity=version"] + "(more detailed)" + br + "Forum Administrators:" + a [href="{boardurl}/index.php?action=profile;u=#"] + "{member}" + fieldset#group_forum.admin_group.windowbg + legend + "Main" + a [href="{boardurl}/index.php?action=admin;area=credits"] + span.large_admin_menu_icon.support + "Support and Credits" + a [href="{boardurl}/index.php?action=admin;area=news"] + span.large_admin_menu_icon.news + "News and Newsletters" + a [href="{boardurl}/index.php?action=admin;area=packages"] + span.large_admin_menu_icon.packages + "Package Manager" + a [href="{boardurl}/index.php?action=admin;area=adminlogoff"] + span.exit.large_admin_menu_icon + "End {member} Session" + fieldset#group_config.admin_group.windowbg + legend + "Configuration" + a [href="{boardurl}/index.php?action=admin;area=featuresettings"] + span.features.large_admin_menu_icon + "Features and Options" + a [href="{boardurl}/index.php?action=admin;area=antispam"] + span.large_admin_menu_icon.security + "Anti-Spam" + a [href="{boardurl}/index.php?action=admin;area=languages"] + span.languages.large_admin_menu_icon + "Languages" + a [href="{boardurl}/index.php?action=admin;area=theme;sa=list;th=#"] + span.current_theme.large_admin_menu_icon + "Current Theme" + a [href="{boardurl}/index.php?action=admin;area=theme"] + span.large_admin_menu_icon.themes + "Themes and Layout" + a [href="{boardurl}/index.php?action=admin;area=modsettings"] + span.large_admin_menu_icon.modifications + "Modification Settings" + fieldset#group_layout.admin_group.windowbg + legend + "Forum" + a [href="{boardurl}/index.php?action=admin;area=manageboards"] + span.boards.large_admin_menu_icon + "Boards and Categories" + a [href="{boardurl}/index.php?action=admin;area=postsettings"] + span.large_admin_menu_icon.posts + "Posts and Topics" + a [href="{boardurl}/index.php?action=admin;area=managecalendar"] + span.calendar.inactive.large_admin_menu_icon + "Calendar" + a [href="{boardurl}/index.php?action=admin;area=managesearch"] + span.large_admin_menu_icon.search + "Search" + a [href="{boardurl}/index.php?action=admin;area=smileys"] + span.large_admin_menu_icon.smiley + "Smileys and Message Icons" + a [href="{boardurl}/index.php?action=admin;area=manageattachments"] + span.attachment.large_admin_menu_icon + "Attachments and Avatars" + a [href="{boardurl}/index.php?action=admin;area=sengines"] + span.engines.inactive.large_admin_menu_icon + "Search Engines" + fieldset#group_members.admin_group.windowbg + legend + "Members" + a [href="{boardurl}/index.php?action=admin;area=viewmembers"] + span.large_admin_menu_icon.members + "Members" + a [href="{boardurl}/index.php?action=admin;area=membergroups"] + span.large_admin_menu_icon.membergroups + "Membergroups" + a [href="{boardurl}/index.php?action=admin;area=permissions"] + span.large_admin_menu_icon.permissions + "Permissions" + a [href="{boardurl}/index.php?action=admin;area=regcenter"] + span.large_admin_menu_icon.regcenter + "Registration" + a [href="{boardurl}/index.php?action=admin;area=warnings"] + span.large_admin_menu_icon.warning + "Warnings" + a [href="{boardurl}/index.php?action=admin;area=ban"] + span.ban.large_admin_menu_icon + "Ban list" + a [href="{boardurl}/index.php?action=admin;area=paidsubscribe"] + span.inactive.large_admin_menu_icon.paid + "Paid Subscriptions" + fieldset#group_maintenance.admin_group.windowbg + legend + "Maintenance" + a [href="{boardurl}/index.php?action=admin;area=serversettings"] + span.large_admin_menu_icon.server + "Server Settings" + a [href="{boardurl}/index.php?action=admin;area=maintain"] + span.large_admin_menu_icon.maintain + "Forum Maintenance" + a [href="{boardurl}/index.php?action=admin;area=scheduledtasks"] + span.large_admin_menu_icon.scheduled + "Scheduled Tasks" + a [href="{boardurl}/index.php?action=admin;area=mailqueue"] + span.large_admin_menu_icon.mail + "Mail" + a [href="{boardurl}/index.php?action=admin;area=reports"] + span.large_admin_menu_icon.reports + "Reports" + a [href="{boardurl}/index.php?action=admin;area=logs"] + span.large_admin_menu_icon.logs + "Logs" + script [src="{boardurl}/index.php?action=viewsmfile;filename=current-version.js"] + script [src="{boardurl}/index.php?action=viewsmfile;filename=latest-news.js"] + script + | var oAdminIndex = new smf_AdminIndex({ bLoadAnnouncements: true, sAnnouncementTemplate: '\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t%content%\n\t\t\t\t\t\t\t\t<' + '/dl>\n\t\t\t\t\t\t\t', sAnnouncementMessageTemplate: '\n\t\t\t\t\t\t\t\t
%subject%<' + '/a>%time%<' + '/dt>\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t%message%\n\t\t\t\t\t\t\t\t<' + '/dd>\n\t\t\t\t\t\t\t', sAnnouncementContainerId: 'smfAnnouncements', bLoadVersions: true, sSmfVersionContainerId: 'smfVersion', sYourVersionContainerId: 'yourVersion', sVersionOutdatedTemplate: '\n\t\t\t\t\t\t\t\t%currentVersion%<' + '/span>\n\t\t\t\t\t\t\t', bLoadUpdateNotification: true, sUpdateNotificationContainerId: 'update_section', sUpdateNotificationDefaultTitle: 'Update available', sUpdateNotificationDefaultMessage: 'You’re using an outdated version of SMF, which contains some bugs which have since been fixed.\n\tIt is recommended that you update your forum<' + '/a> to the latest version as soon as possible. It only takes a minute!', sUpdateNotificationTemplate: '\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t%title%\n\t\t\t\t\t\t\t\t<' + '/h#>\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t%message%\n\t\t\t\t\t\t\t\t<' + '/div>\n\t\t\t\t\t\t\t', sUpdateNotificationLink: smf_scripturl + '?action=admin;area=packages;pgdownload;auto;package=%package%;{session_var}={session_id}' }); diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/admin_menu.txt b/tests/Integration/Http/Snapshot/snapshots/admin/admin_menu.txt new file mode 100644 index 00000000000..e7d9124b520 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/admin_menu.txt @@ -0,0 +1,434 @@ +status 200 +@ #genericmenu +nav#genericmenu [aria-label="Administration Center Menu"] + a.mobile_generic_menu_1 + span.menu_icon + span.text_menu + "Administration Center Menu" + div#mobile_generic_menu_#.popup_container + div.description.popup_window + div.popup_heading + "Administration Center Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1.dropmenu + li.subsections + a.active [href="{boardurl}/index.php?action=admin;area=index;{session_var}={session_id}"] + "Main" + ul + li + a.admin_menu_icon.administration.chosen [href="{boardurl}/index.php?action=admin;area=index;{session_var}={session_id}"] + span.administration.main_icons + "Administration Center" + li + a.admin_menu_icon.support [href="{boardurl}/index.php?action=admin;area=credits;{session_var}={session_id}"] + span.main_icons.support + "Support and Credits" + li.subsections + a.admin_menu_icon.news [href="{boardurl}/index.php?action=admin;area=news;{session_var}={session_id}"] + span.main_icons.news + "News and Newsletters" + ul + li + a [href="{boardurl}/index.php?action=admin;area=news;sa=editnews;{session_var}={session_id}"] + "News" + li + a [href="{boardurl}/index.php?action=admin;area=news;sa=mailingmembers;{session_var}={session_id}"] + "Newsletters" + li + a [href="{boardurl}/index.php?action=admin;area=news;sa=settings;{session_var}={session_id}"] + "Settings" + li.subsections + a.admin_menu_icon.packages [href="{boardurl}/index.php?action=admin;area=packages;{session_var}={session_id}"] + span.main_icons.packages + "Package Manager" + ul + li + a [href="{boardurl}/index.php?action=admin;area=packages;sa=browse;{session_var}={session_id}"] + "Browse Packages" + li + a [href="{boardurl}/index.php?action=admin;area=packages;sa=packageget;get;{session_var}={session_id}"] + "Add Packages" + li + a [href="{boardurl}/index.php?action=admin;area=packages;sa=perms;{session_var}={session_id}"] + "File Permissions" + li + a [href="{boardurl}/index.php?action=admin;area=packages;sa=options;{session_var}={session_id}"] + "Options" + li + a.admin_menu_icon.exit [href="{boardurl}/index.php?action=admin;area=adminlogoff;{session_var}={session_id}"] + span.exit.main_icons + "End {member} Session" + li.subsections + a [href="{boardurl}/index.php?action=admin;area=featuresettings;{session_var}={session_id}"] + "Configuration" + ul + li.subsections + a.admin_menu_icon.features [href="{boardurl}/index.php?action=admin;area=featuresettings;{session_var}={session_id}"] + span.features.main_icons + "Features and Options" + ul + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=basic;{session_var}={session_id}"] + "General" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=bbc;{session_var}={session_id}"] + "Bulletin Board Code & Markdown" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=layout;{session_var}={session_id}"] + "Layout" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=sig;{session_var}={session_id}"] + "Signatures" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=profile;{session_var}={session_id}"] + "Profile Fields" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=likes;{session_var}={session_id}"] + "Likes" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=mentions;{session_var}={session_id}"] + "Mentions" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=alerts;{session_var}={session_id}"] + "Notifications" + li + a.admin_menu_icon.security [href="{boardurl}/index.php?action=admin;area=antispam;{session_var}={session_id}"] + span.main_icons.security + "Anti-Spam" + li.subsections + a.admin_menu_icon.languages [href="{boardurl}/index.php?action=admin;area=languages;{session_var}={session_id}"] + span.languages.main_icons + "Languages" + ul + li + a [href="{boardurl}/index.php?action=admin;area=languages;sa=edit;{session_var}={session_id}"] + "Edit Languages" + li + a [href="{boardurl}/index.php?action=admin;area=languages;sa=add;{session_var}={session_id}"] + "Add Language" + li + a [href="{boardurl}/index.php?action=admin;area=languages;sa=settings;{session_var}={session_id}"] + "Settings" + li + a.admin_menu_icon.current_theme [href="{boardurl}/index.php?action=admin;area=theme;sa=list;th=#;{session_var}={session_id}"] + span.current_theme.main_icons + "Current Theme" + li.subsections + a.admin_menu_icon.themes [href="{boardurl}/index.php?action=admin;area=theme;{session_var}={session_id}"] + span.main_icons.themes + "Themes and Layout" + ul + li + a [href="{boardurl}/index.php?action=admin;area=theme;sa=admin;{session_var}={session_id}"] + "Manage and Install" + li + a [href="{boardurl}/index.php?action=admin;area=theme;sa=list;{session_var}={session_id}"] + "Theme Settings" + li + a [href="{boardurl}/index.php?action=admin;area=theme;sa=reset;{session_var}={session_id}"] + "Member Options" + li + a [href="{boardurl}/index.php?action=admin;area=theme;sa=edit;{session_var}={session_id}"] + "Modify Themes" + li.subsections + a.admin_menu_icon.modifications [href="{boardurl}/index.php?action=admin;area=modsettings;{session_var}={session_id}"] + span.main_icons.modifications + "Modification Settings" + ul + li + a [href="{boardurl}/index.php?action=admin;area=modsettings;sa=general;{session_var}={session_id}"] + "Miscellaneous" + li.subsections + a [href="{boardurl}/index.php?action=admin;area=manageboards;{session_var}={session_id}"] + "Forum" + ul + li.subsections + a.admin_menu_icon.boards [href="{boardurl}/index.php?action=admin;area=manageboards;{session_var}={session_id}"] + span.boards.main_icons + "Boards and Categories" + ul + li + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=main;{session_var}={session_id}"] + "Modify Boards" + li + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=newcat;{session_var}={session_id}"] + "Create new category" + li + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=settings;{session_var}={session_id}"] + "Settings" + li.subsections + a.admin_menu_icon.posts [href="{boardurl}/index.php?action=admin;area=postsettings;{session_var}={session_id}"] + span.main_icons.posts + "Posts and Topics" + ul + li + a [href="{boardurl}/index.php?action=admin;area=postsettings;sa=posts;{session_var}={session_id}"] + "Post Settings" + li + a [href="{boardurl}/index.php?action=admin;area=postsettings;sa=censor;{session_var}={session_id}"] + "Censored Words" + li + a [href="{boardurl}/index.php?action=admin;area=postsettings;sa=topics;{session_var}={session_id}"] + "Topic Settings" + li + a [href="{boardurl}/index.php?action=admin;area=postsettings;sa=drafts;{session_var}={session_id}"] + "Drafts" + li + a.admin_menu_icon.calendar [href="{boardurl}/index.php?action=admin;area=managecalendar;{session_var}={session_id}"] + span.calendar.main_icons + "Calendar" + li.subsections + a.admin_menu_icon.search [href="{boardurl}/index.php?action=admin;area=managesearch;{session_var}={session_id}"] + span.main_icons.search + "Search" + ul + li + a [href="{boardurl}/index.php?action=admin;area=managesearch;sa=weights;{session_var}={session_id}"] + "Weights" + li + a [href="{boardurl}/index.php?action=admin;area=managesearch;sa=method;{session_var}={session_id}"] + "Search Method" + li + a [href="{boardurl}/index.php?action=admin;area=managesearch;sa=settings;{session_var}={session_id}"] + "Settings" + li.subsections + a.admin_menu_icon.smiley [href="{boardurl}/index.php?action=admin;area=smileys;{session_var}={session_id}"] + span.main_icons.smiley + "Smileys and Message Icons" + ul + li + a [href="{boardurl}/index.php?action=admin;area=smileys;sa=editsets;{session_var}={session_id}"] + "Smiley Sets" + li + a [href="{boardurl}/index.php?action=admin;area=smileys;sa=settings;{session_var}={session_id}"] + "Settings" + li.subsections + a.admin_menu_icon.attachment [href="{boardurl}/index.php?action=admin;area=manageattachments;{session_var}={session_id}"] + span.attachment.main_icons + "Attachments and Avatars" + ul + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;{session_var}={session_id}"] + "Browse Files" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachments;{session_var}={session_id}"] + "Attachment Settings" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=avatars;{session_var}={session_id}"] + "Avatar Settings" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachpaths;{session_var}={session_id}"] + "Attachment Directories" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=maintenance;{session_var}={session_id}"] + "File Maintenance" + li + a.admin_menu_icon.engines [href="{boardurl}/index.php?action=admin;area=sengines;{session_var}={session_id}"] + span.engines.main_icons + "Search Engines" + li.subsections + a [href="{boardurl}/index.php?action=admin;area=viewmembers;{session_var}={session_id}"] + "Members" + ul + li.subsections + a.admin_menu_icon.members [href="{boardurl}/index.php?action=admin;area=viewmembers;{session_var}={session_id}"] + span.main_icons.members + "Members" + ul + li + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sa=all;{session_var}={session_id}"] + "View all Members" + li + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sa=search;{session_var}={session_id}"] + "Search for Members" + li + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sa=settings;{session_var}={session_id}"] + "Settings" + li.subsections + a.admin_menu_icon.membergroups [href="{boardurl}/index.php?action=admin;area=membergroups;{session_var}={session_id}"] + span.main_icons.membergroups + "Membergroups" + ul + li + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=index;{session_var}={session_id}"] + "Edit membergroups" + li + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=add;{session_var}={session_id}"] + "Add membergroup" + li + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=settings;{session_var}={session_id}"] + "Settings" + li.subsections + a.admin_menu_icon.permissions [href="{boardurl}/index.php?action=admin;area=permissions;{session_var}={session_id}"] + span.main_icons.permissions + "Permissions" + ul + li + a [href="{boardurl}/index.php?action=admin;area=permissions;sa=index;{session_var}={session_id}"] + "General permissions" + li + a [href="{boardurl}/index.php?action=admin;area=permissions;sa=board;{session_var}={session_id}"] + "Board permissions" + li + a [href="{boardurl}/index.php?action=admin;area=permissions;sa=profiles;{session_var}={session_id}"] + "Edit profiles" + li + a [href="{boardurl}/index.php?action=admin;area=permissions;sa=postmod;{session_var}={session_id}"] + "Post moderation" + li + a [href="{boardurl}/index.php?action=admin;area=permissions;sa=settings;{session_var}={session_id}"] + "Settings" + li.subsections + a.admin_menu_icon.regcenter [href="{boardurl}/index.php?action=admin;area=regcenter;{session_var}={session_id}"] + span.main_icons.regcenter + "Registration" + ul + li + a [href="{boardurl}/index.php?action=admin;area=regcenter;sa=register;{session_var}={session_id}"] + "Register new member" + li + a [href="{boardurl}/index.php?action=admin;area=regcenter;sa=agreement;{session_var}={session_id}"] + "Registration Agreement" + li + a [href="{boardurl}/index.php?action=admin;area=regcenter;sa=policy;{session_var}={session_id}"] + "Privacy Policy" + li + a [href="{boardurl}/index.php?action=admin;area=regcenter;sa=reservednames;{session_var}={session_id}"] + "Set reserved names" + li + a [href="{boardurl}/index.php?action=admin;area=regcenter;sa=settings;{session_var}={session_id}"] + "Settings" + li + a.admin_menu_icon.warning [href="{boardurl}/index.php?action=admin;area=warnings;{session_var}={session_id}"] + span.main_icons.warning + "Warnings" + li.subsections + a.admin_menu_icon.ban [href="{boardurl}/index.php?action=admin;area=ban;{session_var}={session_id}"] + span.ban.main_icons + "Ban list" + ul + li + a [href="{boardurl}/index.php?action=admin;area=ban;sa=list;{session_var}={session_id}"] + "Ban list" + li + a [href="{boardurl}/index.php?action=admin;area=ban;sa=add;{session_var}={session_id}"] + "Add new ban" + li + a [href="{boardurl}/index.php?action=admin;area=ban;sa=browse;{session_var}={session_id}"] + "Browse Ban Triggers" + li + a [href="{boardurl}/index.php?action=admin;area=ban;sa=log;{session_var}={session_id}"] + "Ban Log" + li + a.admin_menu_icon.paid [href="{boardurl}/index.php?action=admin;area=paidsubscribe;{session_var}={session_id}"] + span.main_icons.paid + "Paid Subscriptions" + li.subsections + a [href="{boardurl}/index.php?action=admin;area=serversettings;{session_var}={session_id}"] + "Maintenance" + ul + li.subsections + a.admin_menu_icon.server [href="{boardurl}/index.php?action=admin;area=serversettings;{session_var}={session_id}"] + span.main_icons.server + "Server Settings" + ul + li + a [href="{boardurl}/index.php?action=admin;area=serversettings;sa=general;{session_var}={session_id}"] + "General" + li + a [href="{boardurl}/index.php?action=admin;area=serversettings;sa=database;{session_var}={session_id}"] + "Database" + li + a [href="{boardurl}/index.php?action=admin;area=serversettings;sa=cookie;{session_var}={session_id}"] + "Cookies and Sessions" + li + a [href="{boardurl}/index.php?action=admin;area=serversettings;sa=security;{session_var}={session_id}"] + "Security" + li + a [href="{boardurl}/index.php?action=admin;area=serversettings;sa=cache;{session_var}={session_id}"] + "Caching" + li + a [href="{boardurl}/index.php?action=admin;area=serversettings;sa=export;{session_var}={session_id}"] + "Data Export" + li + a [href="{boardurl}/index.php?action=admin;area=serversettings;sa=loads;{session_var}={session_id}"] + "Load Balancing" + li + a [href="{boardurl}/index.php?action=admin;area=serversettings;sa=phpinfo;{session_var}={session_id}"] + "PHP Info" + li.subsections + a.admin_menu_icon.maintain [href="{boardurl}/index.php?action=admin;area=maintain;{session_var}={session_id}"] + span.main_icons.maintain + "Forum Maintenance" + ul + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=routine;{session_var}={session_id}"] + "Routine" + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=database;{session_var}={session_id}"] + "Database" + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=members;{session_var}={session_id}"] + "Members" + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=topics;{session_var}={session_id}"] + "Topics" + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=hooks;{session_var}={session_id}"] + "Integration Hooks" + li.subsections + a.admin_menu_icon.scheduled [href="{boardurl}/index.php?action=admin;area=scheduledtasks;{session_var}={session_id}"] + span.main_icons.scheduled + "Scheduled Tasks" + ul + li + a [href="{boardurl}/index.php?action=admin;area=scheduledtasks;sa=tasks;{session_var}={session_id}"] + "Scheduled Tasks" + li + a [href="{boardurl}/index.php?action=admin;area=scheduledtasks;sa=tasklog;{session_var}={session_id}"] + "Task Log" + li + a [href="{boardurl}/index.php?action=admin;area=scheduledtasks;sa=settings;{session_var}={session_id}"] + "Settings" + li.subsections + a.admin_menu_icon.mail [href="{boardurl}/index.php?action=admin;area=mailqueue;{session_var}={session_id}"] + span.mail.main_icons + "Mail" + ul + li + a [href="{boardurl}/index.php?action=admin;area=mailqueue;sa=browse;{session_var}={session_id}"] + "Browse Queue" + li + a [href="{boardurl}/index.php?action=admin;area=mailqueue;sa=settings;{session_var}={session_id}"] + "Settings" + li + a [href="{boardurl}/index.php?action=admin;area=mailqueue;sa=test;{session_var}={session_id}"] + "Send Test" + li + a.admin_menu_icon.reports [href="{boardurl}/index.php?action=admin;area=reports;{session_var}={session_id}"] + span.main_icons.reports + "Reports" + li.subsections + a.admin_menu_icon.logs [href="{boardurl}/index.php?action=admin;area=logs;{session_var}={session_id}"] + span.logs.main_icons + "Logs" + ul + li + a [href="{boardurl}/index.php?action=admin;area=logs;sa=errorlog;desc;{session_var}={session_id}"] + "Error Log" + li + a [href="{boardurl}/index.php?action=admin;area=logs;sa=adminlog;{session_var}={session_id}"] + "Administration Log" + li + a [href="{boardurl}/index.php?action=admin;area=logs;sa=modlog;{session_var}={session_id}"] + "Moderation Log" + li + a [href="{boardurl}/index.php?action=admin;area=logs;sa=banlog;{session_var}={session_id}"] + "Ban Log" + li + a [href="{boardurl}/index.php?action=admin;area=logs;sa=tasklog;{session_var}={session_id}"] + "Task Log" + li + a [href="{boardurl}/index.php?action=admin;area=logs;sa=settings;{session_var}={session_id}"] + "Log Settings" diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/antispam.txt b/tests/Integration/Http/Snapshot/snapshots/admin/antispam.txt new file mode 100644 index 00000000000..76cabd27e7f --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/antispam.txt @@ -0,0 +1,251 @@ +status 200 +@ title +title + "Anti-Spam" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=antispam;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Anti-Spam" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + "Anti-Spam" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "This section allows you to setup verification checks to ensure the user is a human (and not a bot), and tweak how and where these apply." + form#admin_form_wrapper [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=antispam;save" method="post"] + div.cat_bar + h3.catbg + "Anti-Spam Verification" + div.noup.windowbg + dl.settings + dt + a#setting_reg_verification + span + label [for="reg_verification"] + "Require verification on registration page" + dd + input#reg_verification [checked name="reg_verification" type="checkbox" value="#"] + dt + a#setting_search_enable_captcha + span + label [for="search_enable_captcha"] + "Require verification on all guest searches" + dd + input#search_enable_captcha [name="search_enable_captcha" type="checkbox" value="#"] + dt + a#setting_guests_require_captcha + span + label [for="guests_require_captcha"] + "Guests must pass verification when making a post" + br + span.smalltext + "(Automatically set if you specify a minimum post count below)" + dd + input#guests_require_captcha [name="guests_require_captcha" type="checkbox" value="#"] + dt + a#setting_posts_require_captcha_help [href="{boardurl}/index.php?action=helpadmin;help=posts_require_captcha" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_posts_require_captcha + span + label [for="posts_require_captcha"] + "Post count under which users must pass verification to make a post" + br + span.smalltext + "(# for(s) no limit, moderators are exempt)" + dd + input#posts_require_captcha [min="-#" name="posts_require_captcha" onchange="if (this.value > #){ document.getElementById('guests_require_captcha').checked = true; document.getElementById('guests_require_captcha').disabled = true;} else {document.getElementById('guests_require_captcha').disabled = false;}" size="#" type="number" value="#"] + hr + dl.settings + dt + a#setting_max_pm_recipients_help [href="{boardurl}/index.php?action=helpadmin;help=max_pm_recipients" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_max_pm_recipients + span + label [for="max_pm_recipients"] + "Maximum number of recipients allowed in a personal message" + br + span.smalltext + "(# for(s) no limit, admins are exempt)" + dd + input#max_pm_recipients [min="#" name="max_pm_recipients" size="#" type="number" value="#"] + dt + a#setting_pm_posts_verification_help [href="{boardurl}/index.php?action=helpadmin;help=pm_posts_verification" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_pm_posts_verification + span + label [for="pm_posts_verification"] + "Post count under which users must pass verification when sending personal messages" + br + span.smalltext + "(# for(s) no limit, admins are exempt)" + dd + input#pm_posts_verification [min="#" name="pm_posts_verification" size="#" type="number" value="#"] + dt + a#setting_pm_posts_per_hour_help [href="{boardurl}/index.php?action=helpadmin;help=pm_posts_per_hour" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_pm_posts_per_hour + span + label [for="pm_posts_per_hour"] + "Number of personal messages a user may send in an hour" + br + span.smalltext + "(# for(s) no limit, moderators are exempt)" + dd + input#pm_posts_per_hour [min="#" name="pm_posts_per_hour" size="#" type="number" value="#"] + div.cat_bar + h3.catbg + "Configure Verification methods" + div.information.noup + span.smalltext + "Below you can set which anti-spam features you wish to have enabled whenever a user needs to verify they are a human. Note that the user will have to pass" + em + "all" + "verification so if you enable both a verification image and a question/answer test they need to complete both to proceed." + div.noup.windowbg + dl.settings + dt + a#setting_visual_verification_type + span + label [for="visual_verification_type"] + "Visual verification image to display" + br + span.smalltext + "The more complex the image the harder it is for bots to bypass" + dd + select#visual_verification_type [name="visual_verification_type" onchange="refreshImages();" size="#"] + option [value="#"] + "None" + option [value="#"] + "Very Simple - Plain text on image" + option [value="#"] + "Simple - Overlapping colored letters, no noise" + option [selected value="#"] + "Medium - Overlapping colored letters, with noise/lines" + option [value="#"] + "High - Angled letters, considerable noise/lines" + option [value="#"] + "Extreme - Angled letters, noise, lines and blocks" + br + img#verification_image [alt="Sample" src="{boardurl}/index.php?action=verificationcode;rand={hash};type=#"] + br + div.cat_bar + h3.catbg + "reCAPTCHA Verification System" + div.information.noup + "Configure the reCAPTCHA Verification System. Don’t have a key for reCAPTCHA?" + a [href="https://www.google.com/recaptcha/admin"] + "Get your reCAPTCHA key here" + "." + div.noup.windowbg + dl.settings + dt + a#setting_recaptcha_enabled + span + label [for="recaptcha_enabled"] + "Use reCAPTCHA Verification System" + br + span.smalltext + "This augments the built-in visual verification" + dd + input#recaptcha_enabled [name="recaptcha_enabled" type="checkbox" value="#"] + dt + a#setting_recaptcha_site_key + span + label [for="recaptcha_site_key"] + "Site Key" + br + span.smalltext + "This will be set in the HTML code your site serves to users." + dd + input#recaptcha_site_key [name="recaptcha_site_key" type="text" value] + dt + a#setting_recaptcha_secret_key + span + label [for="recaptcha_secret_key"] + "Secret Key" + br + span.smalltext + "This is for communication between your site and Google. Be sure to keep it a secret." + dd + input#recaptcha_secret_key [name="recaptcha_secret_key" type="text" value] + dt + a#setting_recaptcha_theme + span + label [for="recaptcha_theme"] + "reCAPTCHA Theme" + dd + select#recaptcha_theme [name="recaptcha_theme" size="#"] + option [value="light"] + "Light" + option [value="dark"] + "Dark" + div.cat_bar + h3.catbg + "Verification Questions" + div.information.noup + span.smalltext + "If you want users to answer verification questions in order to stop spam bots, you should setup a number of questions in the table below. You should choose questions which relate to the subject of your forum. Genuine users will be able to answer these questions, while spam bots will not. Answers are not case sensitive. You may use BBC in the questions for formatting. To remove a question simply delete the contents of that line." + div.noup.windowbg + dl.settings + dt + a#setting_qa_verification_number + span + label [for="qa_verification_number"] + "Number of verification questions user must answer" + br + span.smalltext + "(# to(s) disable; questions are set below)" + dd + input#qa_verification_number [min="#" name="qa_verification_number" size="#" type="number" value="#"] + dt#qa_dt_en_US.qa_link + a [href="javascript:void(#);"] + "[ English (US) ]" + fieldset#qa_fs_en_US.qa_fieldset + legend + a [href="javascript:void(#);"] + "English (US)" + dl.settings + dt + strong + "Question" + dd + strong + "Answer" + dt.qa_add_question + a [href="javascript:void(#);"] + "[ Add another question ]" + input.button [type="submit" value="Save"] + input [name="{token_var}" type="hidden" value="{hash}"] + input [name="{session_var}" type="hidden" value="{session_id}"] + script + | function refreshImages() { var imageType = document.getElementById('visual_verification_type').value; document.getElementById('verification_image').src = '{boardurl}/index.php?action=verificationcode;rand={hash};type=' + imageType; } diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/attachments.txt b/tests/Integration/Http/Snapshot/snapshots/admin/attachments.txt new file mode 100644 index 00000000000..235c4936a04 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/attachments.txt @@ -0,0 +1,368 @@ +status 200 +@ title +title + "Attachments and Avatars" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Attachments and Avatars" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachments;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Attachment Settings" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=manage_files" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Attachments and Avatars" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "From here you can administer the attached files on your system. You can delete attachments by size and by date from your system. Statistics on attachments are also displayed below." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Attachments and Avatars Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Attachments and Avatars Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;{session_var}={session_id}"] + "Browse Files" + li + a.active [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachments;{session_var}={session_id}"] + "Attachment Settings" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=avatars;{session_var}={session_id}"] + "Avatar Settings" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachpaths;{session_var}={session_id}"] + "Attachment Directories" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=maintenance;{session_var}={session_id}"] + "File Maintenance" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + form#admin_form_wrapper [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=manageattachments;save;sa=attachments" method="post"] + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=attachment_manager_settings" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Attachment Settings" + div.noup.windowbg + dl.settings + dt + a#setting_attachmentEnable_help [href="{boardurl}/index.php?action=helpadmin;help=attachmentEnable" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_attachmentEnable + span + label [for="attachmentEnable"] + "Attachments mode" + dd + select#attachmentEnable [name="attachmentEnable" size="#"] + option [value="#"] + "Disable attachments" + option [selected value="#"] + "Enable all attachments" + option [value="#"] + "Disable new attachments" + hr + dl.settings + dt + a#setting_automanage_attachments_help [href="{boardurl}/index.php?action=helpadmin;help=automanage_attachments" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_automanage_attachments + span + label [for="automanage_attachments"] + "Choose the method for the management of the attachment directories" + dd + select#automanage_attachments [name="automanage_attachments" size="#"] + option [value="#"] + "(Manual) SMF default behavior" + option [value="#"] + "(Auto) When either directory space limit is reached" + option [value="#"] + "(Auto) Subdivide by years" + option [value="#"] + "(Auto) Subdivide by years and months" + option [value="#"] + "(Auto) # random(s) directories" + dt + a#setting_use_subdirectories_for_attachments_help [href="{boardurl}/index.php?action=helpadmin;help=use_subdirectories_for_attachments" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_use_subdirectories_for_attachments + span + label [for="use_subdirectories_for_attachments"] + "Create new directories within a base directory" + dd + input#use_subdirectories_for_attachments [checked name="use_subdirectories_for_attachments" type="checkbox" value="#"] + dt + a#setting_basedirectory_for_attachments + span + label [for="basedirectory_for_attachments"] + "Set a base directory for attachments" + dd + input#basedirectory_for_attachments [name="basedirectory_for_attachments" size="#" type="text" value="{boarddir}/attachments"] + dt + a#setting_attachmentUploadDir_path + span + label [for="attachmentUploadDir_path"] + "Attachments directory" + br + span.smalltext + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachpaths"] + "[Manage attachment directories]" + dd + div#attachmentUploadDir_path + "{boarddir}/attachments" + dt + a#setting_attachmentDirFileLimit_help [href="{boardurl}/index.php?action=helpadmin;help=attachmentDirFileLimit" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_attachmentDirFileLimit + span + label [for="attachmentDirFileLimit"] + "Maximum number of files per directory" + br + span.smalltext + "(# for(s) no limit)" + dd + input#attachmentDirFileLimit [min="#" name="attachmentDirFileLimit" size="#" type="number" value="#"] + dt + a#setting_attachmentDirSizeLimit_help [href="{boardurl}/index.php?action=helpadmin;help=attachmentDirSizeLimit" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_attachmentDirSizeLimit + span + label [for="attachmentDirSizeLimit"] + "Max attachment directory space" + br + span.smalltext + "(# for(s) no limit)" + dd + input#attachmentDirSizeLimit [min="#" name="attachmentDirSizeLimit" size="#" type="number" value="#"] + "KB" + dt + a#setting_dont_show_attach_under_post_help [href="{boardurl}/index.php?action=helpadmin;help=dont_show_attach_under_post" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_dont_show_attach_under_post + span + label [for="dont_show_attach_under_post"] + "Do not show attachments under the post if they are already embedded in it." + br + span.smalltext + "Enable this if you do not want attachments to appear twice. Attachments embedded in the post still count towards attachment limits and can still be treated like normal attachments." + dd + input#dont_show_attach_under_post [name="dont_show_attach_under_post" type="checkbox" value="#"] + hr + dl.settings + dt + a#setting_attachmentPostLimit_help [href="{boardurl}/index.php?action=helpadmin;help=attachmentPostLimit" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_attachmentPostLimit + span + label [for="attachmentPostLimit"] + "Max attachment size per post" + br + span.smalltext + "Maximum allowed by php.ini: #,# KB(s)" + dd + input#attachmentPostLimit [max="#" min="#" name="attachmentPostLimit" size="#" type="number" value="#"] + "KB" + dt + a#setting_attachmentSizeLimit_help [href="{boardurl}/index.php?action=helpadmin;help=attachmentSizeLimit" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_attachmentSizeLimit + span + label [for="attachmentSizeLimit"] + "Max size per attachment" + br + span.smalltext + "Maximum allowed by php.ini: #,# KB(s)" + dd + input#attachmentSizeLimit [max="#" min="#" name="attachmentSizeLimit" size="#" type="number" value="#"] + "KB" + dt + a#setting_attachmentNumPerPostLimit_help [href="{boardurl}/index.php?action=helpadmin;help=attachmentNumPerPostLimit" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_attachmentNumPerPostLimit + span + label [for="attachmentNumPerPostLimit"] + "Max number of attachments per post" + br + span.smalltext + "(# for(s) no limit)" + dd + input#attachmentNumPerPostLimit [min="#" name="attachmentNumPerPostLimit" size="#" type="number" value="#"] + div.cat_bar + h3.catbg + "Attachment security settings" + div.noup.windowbg + dl.settings + dt + a#setting_attachmentCheckExtensions_help [href="{boardurl}/index.php?action=helpadmin;help=attachmentCheckExtensions" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_attachmentCheckExtensions + span + label [for="attachmentCheckExtensions"] + "Check attachment’s extension" + dd + input#attachmentCheckExtensions [name="attachmentCheckExtensions" type="checkbox" value="#"] + dt + a#setting_attachmentExtensions_help [href="{boardurl}/index.php?action=helpadmin;help=attachmentExtensions" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_attachmentExtensions + span + label [for="attachmentExtensions"] + "Allowed attachment extensions" + dd + input#attachmentExtensions [name="attachmentExtensions" size="#" type="text" value="doc,gif,jpg,mpg,pdf,png,txt,zip"] + hr + dl.settings + dt + a#setting_attachment_image_reencode_help [href="{boardurl}/index.php?action=helpadmin;help=attachment_image_reencode" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_attachment_image_reencode + span + label [for="attachment_image_reencode"] + "Re-encode potentially dangerous image attachments" + dd + input#attachment_image_reencode [checked name="attachment_image_reencode" type="checkbox" value="#"] + hr + dl.settings + dd.alert + "The extensive security checks can result in a large number of rejected attachments." + dt + a#setting_attachment_image_paranoid_help [href="{boardurl}/index.php?action=helpadmin;help=attachment_image_paranoid" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_attachment_image_paranoid + span + label [for="attachment_image_paranoid"] + "Perform extensive security checks on uploaded image attachments" + dd + input#attachment_image_paranoid [name="attachment_image_paranoid" type="checkbox" value="#"] + div.cat_bar + h3.catbg + "Thumbnail Settings" + div.noup.windowbg + dl.settings + dt + a#setting_attachmentShowImages_help [href="{boardurl}/index.php?action=helpadmin;help=attachmentShowImages" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_attachmentShowImages + span + label [for="attachmentShowImages"] + "Display image attachments as pictures under post" + dd + input#attachmentShowImages [checked name="attachmentShowImages" type="checkbox" value="#"] + dt + a#setting_attachmentThumbnails_help [href="{boardurl}/index.php?action=helpadmin;help=attachmentThumbnails" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_attachmentThumbnails + span + label [for="attachmentThumbnails"] + "Resize images when showing under posts" + dd + input#attachmentThumbnails [checked name="attachmentThumbnails" type="checkbox" value="#"] + dt + a#setting_attachment_thumb_png + span + label [for="attachment_thumb_png"] + "Save thumbnails as PNG" + dd + input#attachment_thumb_png [checked name="attachment_thumb_png" type="checkbox" value="#"] + dt + a#setting_attachment_thumb_memory_help [href="{boardurl}/index.php?action=helpadmin;help=attachment_thumb_memory" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_attachment_thumb_memory + span + label [for="attachment_thumb_memory"] + "Adaptive thumbnail memory" + dd + input#attachment_thumb_memory [name="attachment_thumb_memory" type="checkbox" value="#"] + dd.alert + "If disabled, memory is limited to # MB(s)" + dt + a#setting_attachmentThumbWidth_help [href="{boardurl}/index.php?action=helpadmin;help=attachmentThumbWidth" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_attachmentThumbWidth + span + label [for="attachmentThumbWidth"] + "Maximum width of thumbnails" + dd + input#attachmentThumbWidth [name="attachmentThumbWidth" size="#" type="text" value="#"] + dt + a#setting_attachmentThumbHeight_help [href="{boardurl}/index.php?action=helpadmin;help=attachmentThumbHeight" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_attachmentThumbHeight + span + label [for="attachmentThumbHeight"] + "Maximum height of thumbnails" + dd + input#attachmentThumbHeight [name="attachmentThumbHeight" size="#" type="text" value="#"] + hr + dl.settings + dt + a#setting_max_image_width_help [href="{boardurl}/index.php?action=helpadmin;help=max_image_width" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_max_image_width + span + label [for="max_image_width"] + "Max display width of posted or attached images" + br + span.smalltext + "(# for(s) no limit)" + dd + input#max_image_width [min="#" name="max_image_width" size="#" type="number" value="#"] + dt + a#setting_max_image_height_help [href="{boardurl}/index.php?action=helpadmin;help=max_image_height" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_max_image_height + span + label [for="max_image_height"] + "Max display height of posted or attached images" + br + span.smalltext + "(# for(s) no limit)" + dd + input#max_image_height [min="#" name="max_image_height" size="#" type="number" value="#"] + input.button [type="submit" value="Save"] + input [name="{token_var}" type="hidden" value="{hash}"] + input [name="{session_var}" type="hidden" value="{session_id}"] + script + | var storing_type = document.getElementById('automanage_attachments'); var base_dir = document.getElementById('use_subdirectories_for_attachments'); storing_type.addEventListener("change", toggleSubDir, false); base_dir.addEventListener("change", toggleSubDir, false); toggleSubDir(); diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/attachments_avatars.txt b/tests/Integration/Http/Snapshot/snapshots/admin/attachments_avatars.txt new file mode 100644 index 00000000000..e4a5d0b65b3 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/attachments_avatars.txt @@ -0,0 +1,390 @@ +status 200 +@ title +title + "Attachments and Avatars" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Attachments and Avatars" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=avatars;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Avatar Settings" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=manage_files" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Attachments and Avatars" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "From here you can administer the attached files on your system. You can delete attachments by size and by date from your system. Statistics on attachments are also displayed below." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Attachments and Avatars Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Attachments and Avatars Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;{session_var}={session_id}"] + "Browse Files" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachments;{session_var}={session_id}"] + "Attachment Settings" + li + a.active [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=avatars;{session_var}={session_id}"] + "Avatar Settings" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachpaths;{session_var}={session_id}"] + "Attachment Directories" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=maintenance;{session_var}={session_id}"] + "File Maintenance" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + form#admin_form_wrapper [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=manageattachments;save;sa=avatars" method="post"] + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=avatar_server_stored" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Server-stored avatars" + div.noup.windowbg + dl.settings + dt + a#setting_profile_server_avatar + span + label + "Membergroups allowed to select a server stored avatar" + dd + fieldset#profile_server_avatar + legend + a.toggle_up [href="javascript:void(#);" onclick="document.getElementById('profile_server_avatar').style.display = 'none';document.getElementById('profile_server_avatar_groups_link').style.display = 'block'; return false;"] + "Select permissions for each group" + ul + li + input [checked name="profile_server_avatar[#]" type="checkbox" value="on"] + span + "Regular Members" + li + input [checked name="profile_server_avatar[#]" type="checkbox" value="on"] + span + "Global Moderator" + li + input [onclick="invertAll(this, this.form, 'profile_server_avatar[');" type="checkbox"] + span + "Select all" + a#profile_server_avatar_groups_link.toggle_down [href="javascript:void(#);" onclick="document.getElementById('profile_server_avatar').style.display = 'block'; document.getElementById('profile_server_avatar_groups_link').style.display = 'none'; return false;" style="display: none;"] + "Select permissions for each group" + script + | document.getElementById("profile_server_avatar").style.display = "none"; document.getElementById("profile_server_avatar_groups_link").style.display = ""; + dt + a#setting_avatar_directory + span + label [for="avatar_directory"] + "Avatars directory" + dd + input#avatar_directory [name="avatar_directory" size="#" type="text" value="{boarddir}/avatars"] + dt + a#setting_avatar_url + span + label [for="avatar_url"] + "Avatars URL" + dd + input#avatar_url [name="avatar_url" size="#" type="text" value="{boardurl}/avatars"] + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=avatar_external" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "External avatars" + div.noup.windowbg + dl.settings + dt + a#setting_profile_remote_avatar + span + label + "Membergroups allowed to select an external URL" + dd + fieldset#profile_remote_avatar + legend + a.toggle_up [href="javascript:void(#);" onclick="document.getElementById('profile_remote_avatar').style.display = 'none';document.getElementById('profile_remote_avatar_groups_link').style.display = 'block'; return false;"] + "Select permissions for each group" + ul + li + input [checked name="profile_remote_avatar[#]" type="checkbox" value="on"] + span + "Regular Members" + li + input [checked name="profile_remote_avatar[#]" type="checkbox" value="on"] + span + "Global Moderator" + li + input [onclick="invertAll(this, this.form, 'profile_remote_avatar[');" type="checkbox"] + span + "Select all" + a#profile_remote_avatar_groups_link.toggle_down [href="javascript:void(#);" onclick="document.getElementById('profile_remote_avatar').style.display = 'block'; document.getElementById('profile_remote_avatar_groups_link').style.display = 'none'; return false;" style="display: none;"] + "Select permissions for each group" + script + | document.getElementById("profile_remote_avatar").style.display = "none"; document.getElementById("profile_remote_avatar_groups_link").style.display = ""; + dt + a#setting_avatar_download_external_help [href="{boardurl}/index.php?action=helpadmin;help=avatar_download_external" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_avatar_download_external + span + label [for="avatar_download_external"] + "Download avatar at given URL" + dd + input#avatar_download_external [name="avatar_download_external" onchange="fUpdateStatus();" type="checkbox" value="#"] + dt + a#setting_avatar_max_width_external + span + label [for="avatar_max_width_external"] + "Maximum width of external avatar" + br + span.smalltext + "(# for(s) no limit)" + dd + input#avatar_max_width_external [name="avatar_max_width_external" size="#" type="text" value="#"] + dt + a#setting_avatar_max_height_external + span + label [for="avatar_max_height_external"] + "Maximum height of external avatar" + br + span.smalltext + "(# for(s) no limit)" + dd + input#avatar_max_height_external [name="avatar_max_height_external" size="#" type="text" value="#"] + dt + a#setting_avatar_action_too_large_help [href="{boardurl}/index.php?action=helpadmin;help=avatar_action_too_large" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_avatar_action_too_large + span + label [for="avatar_action_too_large"] + "If the avatar is too large..." + dd + select#avatar_action_too_large [name="avatar_action_too_large" size="#"] + option [value="option_refuse"] + "Refuse it" + option [selected value="option_css_resize"] + "Resize it in the users’ browser" + option [value="option_download_and_resize"] + "Download and resize it on the server" + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=avatar_upload" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Uploadable avatars" + div.noup.windowbg + dl.settings + dt + a#setting_profile_upload_avatar + span + label + "Membergroups allowed to upload an avatar to the server" + dd + fieldset#profile_upload_avatar + legend + a.toggle_up [href="javascript:void(#);" onclick="document.getElementById('profile_upload_avatar').style.display = 'none';document.getElementById('profile_upload_avatar_groups_link').style.display = 'block'; return false;"] + "Select permissions for each group" + ul + li + input [checked name="profile_upload_avatar[#]" type="checkbox" value="on"] + span + "Regular Members" + li + input [checked name="profile_upload_avatar[#]" type="checkbox" value="on"] + span + "Global Moderator" + li + input [onclick="invertAll(this, this.form, 'profile_upload_avatar[');" type="checkbox"] + span + "Select all" + a#profile_upload_avatar_groups_link.toggle_down [href="javascript:void(#);" onclick="document.getElementById('profile_upload_avatar').style.display = 'block'; document.getElementById('profile_upload_avatar_groups_link').style.display = 'none'; return false;" style="display: none;"] + "Select permissions for each group" + script + | document.getElementById("profile_upload_avatar").style.display = "none"; document.getElementById("profile_upload_avatar_groups_link").style.display = ""; + dt + a#setting_avatar_max_width_upload + span + label [for="avatar_max_width_upload"] + "Maximum width of uploaded avatar" + br + span.smalltext + "(# for(s) no limit)" + dd + input#avatar_max_width_upload [name="avatar_max_width_upload" size="#" type="text" value="#"] + dt + a#setting_avatar_max_height_upload + span + label [for="avatar_max_height_upload"] + "Maximum height of uploaded avatar" + br + span.smalltext + "(# for(s) no limit)" + dd + input#avatar_max_height_upload [name="avatar_max_height_upload" size="#" type="text" value="#"] + dt + a#setting_avatar_resize_upload + span + label [for="avatar_resize_upload"] + "Resize oversized large avatars" + br + span.smalltext + "(requires GD module or ImageMagick with IMagick extension)" + dd + input#avatar_resize_upload [checked name="avatar_resize_upload" type="checkbox" value="#"] + dt + a#setting_avatar_download_png_help [href="{boardurl}/index.php?action=helpadmin;help=avatar_download_png" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_avatar_download_png + span + label [for="avatar_download_png"] + "Use PNG for resized avatars" + dd + input#avatar_download_png [checked name="avatar_download_png" type="checkbox" value="#"] + dt + a#setting_avatar_reencode_help [href="{boardurl}/index.php?action=helpadmin;help=avatar_reencode" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_avatar_reencode + span + label [for="avatar_reencode"] + "Re-encode potentially dangerous avatars" + dd + input#avatar_reencode [checked name="avatar_reencode" type="checkbox" value="#"] + hr + dl.settings + dd.alert + "The extensive security checks can result in a large number of rejected avatars." + dt + a#setting_avatar_paranoid_help [href="{boardurl}/index.php?action=helpadmin;help=avatar_paranoid" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_avatar_paranoid + span + label [for="avatar_paranoid"] + "Perform extensive security checks on uploaded avatars" + dd + input#avatar_paranoid [name="avatar_paranoid" type="checkbox" value="#"] + hr + dl.settings + dt + a#setting_custom_avatar_dir + span + label [for="custom_avatar_dir"] + "Upload directory" + br + span.smalltext + "This should be a valid and writable directory, different from the server-stored directory." + dd + input#custom_avatar_dir [name="custom_avatar_dir" size="#" type="text" value="{boarddir}/custom_avatar"] + dt + a#setting_custom_avatar_url + span + label [for="custom_avatar_url"] + "Upload URL" + dd + input#custom_avatar_url [name="custom_avatar_url" size="#" type="text" value="{boardurl}/custom_avatar"] + div.cat_bar + h3.catbg + "Gravatars (Globally Recognized Avatars)" + div.noup.windowbg + dl.settings + dt + a#setting_gravatarEnabled + span + label [for="gravatarEnabled"] + "Enable Gravatars for forum users?" + dd + input#gravatarEnabled [checked name="gravatarEnabled" type="checkbox" value="#"] + dt + a#setting_gravatarOverride + span + label [for="gravatarOverride"] + "Force Gravatars to be used instead of normal avatars?" + dd + input#gravatarOverride [name="gravatarOverride" type="checkbox" value="#"] + dt + a#setting_gravatarAllowExtraEmail + span + label [for="gravatarAllowExtraEmail"] + "Allow storing an extra email address for Gravatars?" + dd + input#gravatarAllowExtraEmail [checked name="gravatarAllowExtraEmail" type="checkbox" value="#"] + hr + dl.settings + dt + a#setting_gravatarMaxRating + span + label [for="gravatarMaxRating"] + "Maximum allowed rating?" + dd + select#gravatarMaxRating [name="gravatarMaxRating" size="#"] + option [value="G"] + "G rated (Generally acceptable)" + option [selected value="PG"] + "PG rated (Parental Guidance)" + option [value="R"] + "R rated (Restricted)" + option [value="X"] + "X rated (Explicit)" + dt + a#setting_gravatarDefault + span + label [for="gravatarDefault"] + "Default image to show when an email address has no matching Gravatar" + dd + select#gravatarDefault [name="gravatarDefault" size="#"] + option [value="mm"] + "A simple, cartoon-style silhouetted outline of a person" + option [value="identicon"] + "A geometric pattern based on an email hash" + option [value="monsterid"] + "A generated \"monster\" with different colors, faces, etc" + option [value="wavatar"] + "Generated faces with differing features and backgrounds" + option [value="retro"] + "Awesome generated, #-bit arcade-style pixelated faces" + option [value="blank"] + "A transparent PNG image" + input.button [onclick="return (document.getElementById('custom_avatar_dir').value == '' || document.getElementById('custom_avatar_url').value == '') ? confirm('The custom avatars directory you have specified may be empty or invalid. Please ensure these settings are correct.') : true;" type="submit" value="Save"] + input [name="{token_var}" type="hidden" value="{hash}"] + input [name="{session_var}" type="hidden" value="{session_id}"] + script + | var fUpdateStatus = function () { document.getElementById("avatar_max_width_external").disabled = document.getElementById("avatar_download_external").checked; document.getElementById("avatar_max_height_external").disabled = document.getElementById("avatar_download_external").checked; document.getElementById("avatar_action_too_large").disabled = document.getElementById("avatar_download_external").checked; } addLoadEvent(fUpdateStatus); diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/attachments_browse.txt b/tests/Integration/Http/Snapshot/snapshots/admin/attachments_browse.txt new file mode 100644 index 00000000000..0e31dcb088d --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/attachments_browse.txt @@ -0,0 +1,128 @@ +status 200 +@ title +title + "Attachments and Avatars" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Attachments and Avatars" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Browse Files" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=manage_files" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Attachments and Avatars" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "From here you can administer the attached files on your system. You can delete attachments by size and by date from your system. Statistics on attachments are also displayed below." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Attachments and Avatars Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Attachments and Avatars Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a.active [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;{session_var}={session_id}"] + "Browse Files" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachments;{session_var}={session_id}"] + "Attachment Settings" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=avatars;{session_var}={session_id}"] + "Avatar Settings" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachpaths;{session_var}={session_id}"] + "Attachment Directories" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=maintenance;{session_var}={session_id}"] + "File Maintenance" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=manageattachments;sa=remove" method="post"] + div.cat_bar + h3.catbg + "Browse files:" + img [alt=">" src="{boardurl}/Themes/default/images/selected.png"] + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse"] + "Attachments" + "|" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;avatars"] + "Avatars" + "|" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;thumbs"] + "Thumbnails" + div.additional_row + input.button.you_sure [data-confirm="Are you sure you want to delete the selected attachments?" name="remove_submit" type="submit" value="Remove selected"] + table#file_list.table_grid + thead + tr.title_bar + th#header_file_list_name.name [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;sort=name;desc" rel="nofollow"] + "Attachment name" + span.main_icons.sort_up + th#header_file_list_filesize.filesize [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;sort=filesize" rel="nofollow"] + "File size" + th#header_file_list_member.member [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;sort=member" rel="nofollow"] + "Posted by" + th#header_file_list_date.date [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;sort=date" rel="nofollow"] + "Date" + th#header_file_list_downloads.downloads [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;sort=downloads" rel="nofollow"] + "Downloads" + th#header_file_list_check.centercol.check [scope="col"] + input [onclick="invertAll(this, this.form);" type="checkbox"] + tbody + tr.windowbg + td.centertext [colspan="#"] + "There are currently no attachments." + div.flow_auto + div.additional_row + input.button.you_sure [data-confirm="Are you sure you want to delete the selected attachments?" name="remove_submit" type="submit" value="Remove selected"] + input [name="type" type="hidden" value="attachments"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="sort" type="hidden" value="name"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/attachments_browse_avatars.txt b/tests/Integration/Http/Snapshot/snapshots/admin/attachments_browse_avatars.txt new file mode 100644 index 00000000000..4915e679ad6 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/attachments_browse_avatars.txt @@ -0,0 +1,128 @@ +status 200 +@ title +title + "Attachments and Avatars" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Attachments and Avatars" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Browse Files" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=manage_files" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Attachments and Avatars" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "From here you can administer the attached files on your system. You can delete attachments by size and by date from your system. Statistics on attachments are also displayed below." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Attachments and Avatars Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Attachments and Avatars Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a.active [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;{session_var}={session_id}"] + "Browse Files" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachments;{session_var}={session_id}"] + "Attachment Settings" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=avatars;{session_var}={session_id}"] + "Avatar Settings" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachpaths;{session_var}={session_id}"] + "Attachment Directories" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=maintenance;{session_var}={session_id}"] + "File Maintenance" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=manageattachments;sa=remove;avatars" method="post"] + div.cat_bar + h3.catbg + "Browse files:" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse"] + "Attachments" + "|" + img [alt=">" src="{boardurl}/Themes/default/images/selected.png"] + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;avatars"] + "Avatars" + "|" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;thumbs"] + "Thumbnails" + div.additional_row + input.button.you_sure [data-confirm="Are you sure you want to delete the selected attachments?" name="remove_submit" type="submit" value="Remove selected"] + table#file_list.table_grid + thead + tr.title_bar + th#header_file_list_name.name [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;avatars;sort=name;desc" rel="nofollow"] + "Attachment name" + span.main_icons.sort_up + th#header_file_list_filesize.filesize [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;avatars;sort=filesize" rel="nofollow"] + "File size" + th#header_file_list_member.member [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;avatars;sort=member" rel="nofollow"] + "Member" + th#header_file_list_date.date [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;avatars;sort=date" rel="nofollow"] + "Last active" + th#header_file_list_downloads.downloads [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;avatars;sort=downloads" rel="nofollow"] + "Downloads" + th#header_file_list_check.centercol.check [scope="col"] + input [onclick="invertAll(this, this.form);" type="checkbox"] + tbody + tr.windowbg + td.centertext [colspan="#"] + "There are currently no avatars." + div.flow_auto + div.additional_row + input.button.you_sure [data-confirm="Are you sure you want to delete the selected attachments?" name="remove_submit" type="submit" value="Remove selected"] + input [name="type" type="hidden" value="avatars"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="sort" type="hidden" value="name"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/attachments_browse_thumbs.txt b/tests/Integration/Http/Snapshot/snapshots/admin/attachments_browse_thumbs.txt new file mode 100644 index 00000000000..b030e591590 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/attachments_browse_thumbs.txt @@ -0,0 +1,128 @@ +status 200 +@ title +title + "Attachments and Avatars" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Attachments and Avatars" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Browse Files" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=manage_files" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Attachments and Avatars" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "From here you can administer the attached files on your system. You can delete attachments by size and by date from your system. Statistics on attachments are also displayed below." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Attachments and Avatars Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Attachments and Avatars Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a.active [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;{session_var}={session_id}"] + "Browse Files" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachments;{session_var}={session_id}"] + "Attachment Settings" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=avatars;{session_var}={session_id}"] + "Avatar Settings" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachpaths;{session_var}={session_id}"] + "Attachment Directories" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=maintenance;{session_var}={session_id}"] + "File Maintenance" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=manageattachments;sa=remove;thumbs" method="post"] + div.cat_bar + h3.catbg + "Browse files:" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse"] + "Attachments" + "|" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;avatars"] + "Avatars" + "|" + img [alt=">" src="{boardurl}/Themes/default/images/selected.png"] + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;thumbs"] + "Thumbnails" + div.additional_row + input.button.you_sure [data-confirm="Are you sure you want to delete the selected attachments?" name="remove_submit" type="submit" value="Remove selected"] + table#file_list.table_grid + thead + tr.title_bar + th#header_file_list_name.name [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;thumbs;sort=name;desc" rel="nofollow"] + "Attachment name" + span.main_icons.sort_up + th#header_file_list_filesize.filesize [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;thumbs;sort=filesize" rel="nofollow"] + "File size" + th#header_file_list_member.member [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;thumbs;sort=member" rel="nofollow"] + "Posted by" + th#header_file_list_date.date [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;thumbs;sort=date" rel="nofollow"] + "Date" + th#header_file_list_downloads.downloads [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;thumbs;sort=downloads" rel="nofollow"] + "Downloads" + th#header_file_list_check.centercol.check [scope="col"] + input [onclick="invertAll(this, this.form);" type="checkbox"] + tbody + tr.windowbg + td.centertext [colspan="#"] + "There are currently no thumbnails." + div.flow_auto + div.additional_row + input.button.you_sure [data-confirm="Are you sure you want to delete the selected attachments?" name="remove_submit" type="submit" value="Remove selected"] + input [name="type" type="hidden" value="thumbs"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="sort" type="hidden" value="name"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/attachments_maintenance.txt b/tests/Integration/Http/Snapshot/snapshots/admin/attachments_maintenance.txt new file mode 100644 index 00000000000..b76a3fa41a3 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/attachments_maintenance.txt @@ -0,0 +1,225 @@ +status 200 +@ title +title + "Attachments and Avatars" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Attachments and Avatars" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=maintenance;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "File Maintenance" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=manage_files" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Attachments and Avatars" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "From here you can administer the attached files on your system. You can delete attachments by size and by date from your system. Statistics on attachments are also displayed below." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Attachments and Avatars Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Attachments and Avatars Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;{session_var}={session_id}"] + "Browse Files" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachments;{session_var}={session_id}"] + "Attachment Settings" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=avatars;{session_var}={session_id}"] + "Avatar Settings" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachpaths;{session_var}={session_id}"] + "Attachment Directories" + li + a.active [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=maintenance;{session_var}={session_id}"] + "File Maintenance" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + div#manage_attachments + div.cat_bar + h3.catbg + "File attachment statistics" + div.windowbg + dl.settings + dt + strong + "Total attachments" + dd + "#" + dt + strong + "Total avatars" + dd + "#" + dt + strong + "Total size of all attachment directories" + dd + "# KB(s)" + dt + strong + "Current attachment directory" + dd.word_break + "{boarddir}/attachments" + dt + strong + "Total size of current attachment directory" + dd + "# KB(s)" + dt + strong + "Total space available" + dd + "# KB(s)" + dt + strong + "Total files in current attachment directory" + dd + "#" + dt + strong + "Total files remaining" + dd + "#,#" + div.cat_bar + h3.catbg + "Attachment integrity check" + div.windowbg + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=manageattachments;sa=repair;{session_var}={session_id}" method="post"] + p + "This function will check the integrity and sizes of attachments and filenames listed in the database and, if necessary, fix errors it encounters." + input.button [name="repair" type="submit" value="Run check now"] + div.cat_bar + h3.catbg + "Attachment Pruning" + div.windowbg + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=manageattachments" method="post" onsubmit="return confirm('Are you sure you want to delete these attachments?\\nThis cannot be undone!');"] + dl.settings + dt + "Remove attachments older than" + dd + input [name="age" size="#" type="number" value="#"] + "days" + dt + "Message to add to post" + dd + input [name="notice" size="#" type="text" value="[attachment deleted by admin]"] + input.button [name="remove" type="submit" value="Remove"] + input [name="type" type="hidden" value="attachments"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="sa" type="hidden" value="byage"] + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=manageattachments" method="post" onsubmit="return confirm('Are you sure you want to delete these attachments?\\nThis cannot be undone!');"] + dl.settings + dt + "Remove attachments larger than" + dd + input#size [name="size" size="#" type="number" value="#"] + "KB" + dt + "Message to add to post" + dd + input [name="notice" size="#" type="text" value="[attachment deleted by admin]"] + input.button [name="remove" type="submit" value="Remove"] + input [name="type" type="hidden" value="attachments"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="sa" type="hidden" value="bysize"] + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=manageattachments" method="post" onsubmit="return confirm('Are you sure you want to delete these attachments?\\nThis cannot be undone!');"] + dl.settings + dt + "Remove avatars from members not active for more than" + dd + input [name="age" size="#" type="number" value="#"] + "days" + input.button [name="remove" type="submit" value="Remove"] + input [name="type" type="hidden" value="avatars"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="sa" type="hidden" value="byage"] + div#transfer.cat_bar + h3.catbg + "Transfer Attachments" + div.windowbg + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=manageattachments;sa=transfer" method="post"] + p + "Transfer files between directories." + dl.settings + dt + "Transfer files from" + dd + select [name="from"] + option [value="#"] + "Select directory" + option [value="#"] + "{boarddir}/attachments" + dt + "Automatically by space or file count" + dd + select [name="auto"] + option [value="#"] + "Select base directory" + option [value="-#"] + "Forum root directory." + option [disabled value="#"] + "No base directories available." + dt + "Or to a specific directory." + dd + select [name="to"] + option [value="#"] + "Select directory" + option [value="#"] + "{boarddir}/attachments" + dt + "Empty the source directory" + dd + input [checked name="empty_it" type="checkbox"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input.button [name="transfer" onclick="start_progress()" type="submit" value="Transfer"] + div#progress_msg + div#show_progress.padding + script + | function start_progress() { setTimeout(show_msg, #); } function show_msg() { $('#progress_msg').html('
Loading... Please wait. Transfer in progress.<\/div>'); show_progress(); } function show_progress() { $('#show_progress').on("load", "progress.php"); setTimeout(show_progress, #); } diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/attachments_paths.txt b/tests/Integration/Http/Snapshot/snapshots/admin/attachments_paths.txt new file mode 100644 index 00000000000..fc7900ea0d3 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/attachments_paths.txt @@ -0,0 +1,126 @@ +status 200 +@ title +title + "Manage attachment paths" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Attachments and Avatars" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachpaths;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Attachment Directories" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=manage_files" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Attachments and Avatars" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "From here you can administer the attached files on your system. You can delete attachments by size and by date from your system. Statistics on attachments are also displayed below." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Attachments and Avatars Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Attachments and Avatars Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=browse;{session_var}={session_id}"] + "Browse Files" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachments;{session_var}={session_id}"] + "Attachment Settings" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=avatars;{session_var}={session_id}"] + "Avatar Settings" + li + a.active [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachpaths;{session_var}={session_id}"] + "Attachment Directories" + li + a [href="{boardurl}/index.php?action=admin;area=manageattachments;sa=maintenance;{session_var}={session_id}"] + "File Maintenance" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=manageattachments;sa=attachpaths;{session_var}={session_id}" method="post"] + div.cat_bar + h3.catbg + "Attachment directory paths" + div.additional_row.information + "Create new directories or change the current directory below." + br + "To create a new directory within the forum directory structure, use just the directory name." + br + "To remove a directory, blank the path input field. Only empty directories can be removed. To see if a directory is empty, check for files or sub-directories in brackets next to the file count." + br + "To rename a directory, simply change its name in the input field. Only directories without sub-directories may be renamed." + table#attach_paths.table_grid + thead + tr.title_bar + th#header_attach_paths_current_dir.centercol.current_dir [scope="col"] + "Current" + th#header_attach_paths_path.path [scope="col"] + "Path" + th#header_attach_paths_current_size.current_size [scope="col"] + "Size (KB)" + th#header_attach_paths_num_files.num_files [scope="col"] + "Files" + th#header_attach_paths_status.centercol.status [scope="col"] + "Status" + tbody + tr#list_attach_paths_#.windowbg + td.centercol.current_dir [style="width: #%;"] + input [checked name="current_dir" type="radio" value="#"] + td.path [style="width: #%;"] + input [name="dirs[#]" type="hidden" value="{boarddir}/attachments"] + input [name="dirs[#]" size="#" style="width: #%" type="text" value="{boarddir}/attachments"] + td.current_size [style="width: #%;"] + "#" + td.num_files [style="width: #%;"] + "#" + td.centercol.status [style="width: #%;"] + "Unused" + div.flow_auto + div.additional_row + input [name="{session_var}" type="hidden" value="{session_id}"] + input.button [name="save" type="submit" value="Save"] + input.button [name="new_path" type="submit" value="Add Path"] + input [name="{session_var}" type="hidden" value="{session_id}"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/bans.txt b/tests/Integration/Http/Snapshot/snapshots/admin/bans.txt new file mode 100644 index 00000000000..30501c37712 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/bans.txt @@ -0,0 +1,76 @@ +status 200 +@ title +title + "Ban list" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=ban;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Ban list" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=ban;sa=list;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Ban list" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=ban;sa=list" method="post"] + div.cat_bar + h3.catbg + "Ban list" + div.additional_row + input.button [name="removeBans" type="submit" value="Remove selected"] + table#ban_list.table_grid + thead + tr.title_bar + th#header_ban_list_name.name [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=ban;sa=list;sort=name" rel="nofollow"] + "Ban name" + th#header_ban_list_notes.notes [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=ban;sa=list;sort=notes" rel="nofollow"] + "Notes" + th#header_ban_list_reason.reason [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=ban;sa=list;sort=reason" rel="nofollow"] + "Reason" + th#header_ban_list_added.added [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=ban;sa=list;sort=added" rel="nofollow"] + "Added" + span.main_icons.sort_down + th#header_ban_list_expires.expires [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=ban;sa=list;sort=expires" rel="nofollow"] + "Expires" + th#header_ban_list_num_triggers.num_triggers [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=ban;sa=list;sort=num_triggers" rel="nofollow"] + "Triggers" + th#header_ban_list_actions.actions.centercol [scope="col"] + "Actions" + th#header_ban_list_check.centercol.check [scope="col"] + input [onclick="invertAll(this, this.form);" type="checkbox"] + tbody + tr.windowbg + td.centertext [colspan="#"] + "There are currently no bans in effect." + div.additional_row + input.button [name="removeBans" type="submit" value="Remove selected"] + input [name="{session_var}" type="hidden" value="{session_id}"] + script + | var removeBans = $("input[name='removeBans']"); removeBans.on( "click", function(e) { var removeItems = $("input[name='remove[]']:checked").length; if (removeItems == #) { e.preventDefault(); return alert("Please select at least one item in the list"); } return confirm("Are you sure you want to remove the selected bans?"); }); diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/bans_add.txt b/tests/Integration/Http/Snapshot/snapshots/admin/bans_add.txt new file mode 100644 index 00000000000..08795087804 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/bans_add.txt @@ -0,0 +1,149 @@ +status 200 +@ title +title + "Ban list" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=ban;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Ban list" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=ban;sa=add;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Add new ban" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div#manage_bans + form#admin_form_wrapper [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=ban;sa=edit" method="post" onsubmit="return confirmBan(this);"] + div.cat_bar + h3.catbg + "Add new ban" + div.information.noup + strong + "Note" + ": after creating the above ban, you can add additional entries that trigger the ban, like IP addresses, hostnames, and email addresses." + div.noup.windowbg + dl.settings + dt#ban_name_label + strong + "Ban name:" + dd + input#ban_name [maxlength="#" name="ban_name" size="#" type="text" value] + dt + strong + label [for="reason"] + "Reason" + br + span.smalltext + "Reason for ban, to be displayed to banned member." + dd + textarea#reason [cols="#" name="reason" rows="#"] + dt + strong + label [for="ban_notes"] + "Notes" + br + span.smalltext + "Notes that may assist other staff members." + dd + textarea#ban_notes [cols="#" name="notes" rows="#"] + fieldset.ban_settings.floatleft + legend + "Expiration" + input#never_expires [checked name="expiration" onclick="fUpdateStatus();" type="radio" value="never"] + label [for="never_expires"] + "Never" + br + input#expires_one_day [name="expiration" onclick="fUpdateStatus();" type="radio" value="one_day"] + label [for="expires_one_day"] + "Ban will expire after" + input#expire_date [name="expire_date" size="#" type="number" value="#"] + "days" + br + input#already_expired [name="expiration" onclick="fUpdateStatus();" type="radio" value="expired"] + label [for="already_expired"] + "Expired / disabled" + fieldset.ban_settings.floatright + legend + "Restriction" + input#full_ban [checked name="full_ban" onclick="fUpdateStatus();" type="radio" value="#"] + label [for="full_ban"] + "Full ban" + br + input#partial_ban [name="full_ban" onclick="fUpdateStatus();" type="radio" value="#"] + label [for="partial_ban"] + "Partial ban" + br + input#cannot_post.ban_restriction [name="cannot_post" type="checkbox" value="#"] + label [for="cannot_post"] + "Cannot post" + "(" + a [href="{boardurl}/index.php?action=helpadmin;help=ban_cannot_post" onclick="return reqOverlayDiv(this.href);"] + "?" + ")" + br + input#cannot_register.ban_restriction [name="cannot_register" type="checkbox" value="#"] + label [for="cannot_register"] + "Cannot register" + br + input#cannot_login.ban_restriction [name="cannot_login" type="checkbox" value="#"] + label [for="cannot_login"] + "Cannot login" + br + br.clear_right + fieldset + legend + input [onclick="invertAll(this, this.form, 'ban_suggestion');" type="checkbox"] + "Triggers" + dl.settings + dt + input#main_ip_check [name="ban_suggestions[]" type="checkbox" value="main_ip"] + label [for="main_ip_check"] + "Ban on IP (e.g. #.#.#-#.*)" + dd + input [name="main_ip" onfocus="document.getElementById('main_ip_check').checked = true;" size="#" type="text" value] + dt + input#hostname_check [name="ban_suggestions[]" type="checkbox" value="hostname"] + label [for="hostname_check"] + "Ban on Hostname (e.g. *.mil)" + dd + input [name="hostname" onfocus="document.getElementById('hostname_check').checked = true;" size="#" type="text" value] + dt + input#email_check [name="ban_suggestions[]" type="checkbox" value="email"] + label [for="email_check"] + "Ban on Email Address (e.g. *@badsite.com)" + dd + input [name="email" onfocus="document.getElementById('email_check').checked = true;" size="#" type="text" value] + dt + input#user_check [name="ban_suggestions[]" type="checkbox" value="user"] + label [for="user_check"] + "Ban on Username" + dd + input#user [name="user" size="#" type="text" value] + input.button [name="add_ban" type="submit" value="Add"] + input [name="old_expire" type="hidden" value="#"] + input [name="bg" type="hidden" value="#"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] + script + | var fUpdateStatus = function () { document.getElementById("expire_date").disabled = !document.getElementById("expires_one_day").checked; document.getElementById("cannot_post").disabled = document.getElementById("full_ban").checked; document.getElementById("cannot_register").disabled = document.getElementById("full_ban").checked; document.getElementById("cannot_login").disabled = document.getElementById("full_ban").checked; } addLoadEvent(fUpdateStatus); var oAddMemberSuggest = new smc_AutoSuggest({ sSessionId: smf_session_id, sSessionVar: smf_session_var, sSuggestId: 'user', sControlId: 'user', sSearchType: 'member', sTextDeleteItem: 'Delete Item', }); function confirmBan(aForm) { if (aForm.ban_name.value == '') { alert('The name of the ban was left empty'); return false; } if (aForm.partial_ban.checked && !(aForm.cannot_post.checked || aForm.cannot_register.checked || aForm.cannot_login.checked)) { alert('No restriction selected.'); return false; } } diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/bans_browse.txt b/tests/Integration/Http/Snapshot/snapshots/admin/bans_browse.txt new file mode 100644 index 00000000000..c2fe44dc75b --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/bans_browse.txt @@ -0,0 +1,75 @@ +status 200 +@ title +title + "Ban list" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=ban;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Ban list" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=ban;sa=browse;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Browse Ban Triggers" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=ban;sa=browse;entity=ip" method="post"] + div.cat_bar + h3.catbg + "Browse Ban Triggers" + div.additional_row + a [href="{boardurl}/index.php?action=admin;area=ban;sa=browse;entity=ip"] + img [alt=">" src="{boardurl}/Themes/default/images/selected.png"] + "IP" + "|" + a [href="{boardurl}/index.php?action=admin;area=ban;sa=browse;entity=hostname"] + "Hostname" + "|" + a [href="{boardurl}/index.php?action=admin;area=ban;sa=browse;entity=email"] + "Email" + "|" + a [href="{boardurl}/index.php?action=admin;area=ban;sa=browse;entity=member"] + "Username" + table#ban_trigger_list.table_grid + thead + tr.title_bar + th#header_ban_trigger_list_banned_entity.banned_entity [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=ban;sa=browse;entity=ip;sort=banned_entity;desc" rel="nofollow"] + "Banned entity" + span.main_icons.sort_up + th#header_ban_trigger_list_ban_name.ban_name [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=ban;sa=browse;entity=ip;sort=ban_name" rel="nofollow"] + "Ban name" + th#header_ban_trigger_list_hits.hits [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=ban;sa=browse;entity=ip;sort=hits" rel="nofollow"] + "Hits" + th#header_ban_trigger_list_check.centercol.check [scope="col"] + input [onclick="invertAll(this, this.form);" type="checkbox"] + tbody + tr.windowbg + td.centertext [colspan="#"] + "There are currently no ban triggers." + div.additional_row + input.button.you_sure [data-confirm="Are you sure you want to remove the selected ban triggers?" name="remove_triggers" type="submit" value="Remove selected ban triggers"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="sort" type="hidden" value="banned_entity"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/bans_log.txt b/tests/Integration/Http/Snapshot/snapshots/admin/bans_log.txt new file mode 100644 index 00000000000..21df84c8be7 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/bans_log.txt @@ -0,0 +1,69 @@ +status 200 +@ title +title + "Ban Log" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=ban;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Ban list" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=ban;sa=log;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Ban Log" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=ban;sa=log" method="post"] + div.cat_bar + h3.catbg + "Ban Log" + div.flow_hidden.information + div.additional_row + input.button.you_sure [data-confirm="Are you sure you want to delete all selected ban log entries?" name="removeSelected" type="submit" value="Remove selected"] + input.button.you_sure [data-confirm="Are you sure you want to delete all ban log entries?" name="removeAll" type="submit" value="Clear log"] + table#ban_log.table_grid + thead + tr.title_bar + th#header_ban_log_ip.ip [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=ban;sa=log;sort=ip" rel="nofollow"] + "IP" + th#header_ban_log_email.email [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=ban;sa=log;sort=email" rel="nofollow"] + "Email address" + th#header_ban_log_member.member [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=ban;sa=log;sort=member" rel="nofollow"] + "Member" + th#header_ban_log_date.date [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=ban;sa=log;sort=date;desc" rel="nofollow"] + "Date" + span.main_icons.sort_up + th#header_ban_log_check.centercol.check [scope="col"] + input [onclick="invertAll(this, this.form);" type="checkbox"] + snapshot-ignored [selector="table.table_grid tbody"] + div.additional_row + input.button.you_sure [data-confirm="Are you sure you want to delete all selected ban log entries?" name="removeSelected" type="submit" value="Remove selected"] + input.button.you_sure [data-confirm="Are you sure you want to delete all ban log entries?" name="removeAll" type="submit" value="Clear log"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] + input [name="sort" type="hidden" value="date"] + input [name="{token_var}" type="hidden" value="{hash}"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/board_index.txt b/tests/Integration/Http/Snapshot/snapshots/admin/board_index.txt new file mode 100644 index 00000000000..399ca04edf3 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/board_index.txt @@ -0,0 +1,95 @@ +status 200 +@ title +title + "{forum_name} - Index" +@ #category_2 +div#category_#.cat_bar + h3.catbg + a#c# + a [href="{boardurl}/index.php?action=unread;c=#" title="Click to see the new posts in Snapshot fixtures"] + "Snapshot fixtures" + span#category_#_upshrink.toggle_up [data-collapsed="#" style="display: none;" title="Hide Category"] + div.desc + "Content for the template snapshot tests." +@ #category_2_boards +div#category_#_boards + div#board_#.up_contain + div.board_icon + a.board_off [href="{boardurl}/index.php?action=unread;board=#.#;children" title="No New Posts"] + div.info + a#b#.mobile_subject.subject [href="{boardurl}/index.php?board=#.#"] + "{board}" + div.board_description + "Topics, replies and a poll for the snapshot tests." + div.board_stats + p + "# post(s)" + br + "# topic(s)" + div.lastpost + p + strong + "Last post:" + "{date}" + span.postby + a [href="{boardurl}/index.php?topic=#.msg##new" title="{subject}"] + "{subject}" + "by" + a [href="{boardurl}/index.php?action=profile;u=#" title="View the profile of {member}"] + "{member}" + div#board_#_children.children + p + strong#child_list_# + "Sub-Boards" + span + a [href="{boardurl}/index.php?board=#.#" title="No New Posts (# topic(s), # post(s))"] + "{board}" + div#board_#.up_contain + div.board_icon + a.board_off [href="{boardurl}/index.php?action=unread;board=#.#;children" title="No New Posts"] + div.info + a#b#.mobile_subject.subject [href="{boardurl}/index.php?board=#.#"] + "{board}" + div.board_description + "A board with nothing in it." + div.board_stats + p + "# post(s)" + br + "# topic(s)" + div.lastpost +@ #info_center +div#info_center.roundframe + div.title_bar + h3.titlebg + a#upshrink_link [href="#"] + "{forum_name} - Info Center" + span#upshrink_ic.toggle_up [style="display: none;" title="Hide Info Center"] + div#upshrink_stats + div.sub_bar + h4.subbg + a [href="{boardurl}/index.php?action=stats" title="[More Stats]"] + span.main_icons.stats + "Forum Stats" + p.inline + "# post(s) in # topic(s) by # member(s) - Latest Member:" + strong + a [href="{boardurl}/index.php?action=profile;u=#"] + "{member}" + br + "Latest Post:" + strong + "\"" + a [href="{boardurl}/index.php?topic=#.msg#;boardseen#new" title="{subject}"] + "{subject}" + "\"" + "({date})" + br + a [href="{boardurl}/index.php?action=recent"] + "View the most recent posts on the forum." + div.sub_bar + h4.subbg + a [href="{boardurl}/index.php?action=who"] + span.main_icons.people + "Users Online" + snapshot-ignored [selector="#upshrink_stats > p:nth-of-type(#)"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/chrome.txt b/tests/Integration/Http/Snapshot/snapshots/admin/chrome.txt new file mode 100644 index 00000000000..b307a18db70 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/chrome.txt @@ -0,0 +1,185 @@ +status 200 +@ head +head + meta [charset="UTF-#"] + link [href="{boardurl}/Themes/default/css/minified_ab#f#f#a#d#a#da#fd#dbf#.css?smf#alpha#dev_#" rel="stylesheet"] + link [href="https://use.fontawesome.com/releases/v#.#.#/css/all.css" rel="stylesheet"] + style + | img.avatar { max-width: #px !important; max-height: #px !important; } + noscript + link [href="{boardurl}/Themes/default/css/minified_#c#ea#f#a#cbce#fa#a#e#.css?smf#alpha#dev_#" rel="stylesheet"] + script + | var smf_theme_url = "{boardurl}/Themes/default"; var smf_default_theme_url = "{boardurl}/Themes/default"; var smf_images_url = "{boardurl}/Themes/default/images"; var smf_smileys_url = "{boardurl}/Smileys"; var smf_smiley_sets = "fugue,alienine"; var smf_smiley_sets_default = "fugue"; var smf_avatars_url = "{boardurl}/avatars"; var smf_scripturl = "{boardurl}/index.php"; var smf_charset = "UTF-#"; var smf_session_id = "{session_id}"; var smf_session_var = "{session_var}"; var smf_member_id = #; var ajax_notification_text = 'Loading...'; var help_popup_heading_text = 'A little lost? Let me explain:'; var banned_text = 'Sorry admin, you are banned from using this forum!'; var smf_txt_expand = 'Expand'; var smf_txt_shrink = 'Shrink'; var smf_collapseAlt = 'Hide Category'; var smf_expandAlt = 'Show Category'; var smf_quote_expand = false; var allow_xhjr_credentials = false; + script [src="https://ajax.googleapis.com/ajax/libs/jquery/#.#.#/jquery.min.js"] + script [src="{boardurl}/Themes/default/scripts/minified_#b#eded#c#d#c#b#d#c#.js?smf#alpha#dev_#"] + script + | var new_alert_title = "{forum_name}"; var alert_timeout = #; var smf_you_sure ='Are you sure you want to do this?'; + title + "{forum_name} - Index" + meta [content="width=device-width, initial-scale=#" name="viewport"] + meta [content="{forum_name}" property="og:site_name"] + meta [content="{forum_name} - Index" property="og:title"] + meta [content="{boardurl}/index.php" property="og:url"] + meta [content="{forum_name} - Index" property="og:description"] + meta [content="{forum_name} - Index" name="description"] + meta [content="##EA#" name="theme-color"] + link [href="{boardurl}/index.php" rel="canonical"] + link [href="{boardurl}/index.php?action=help" rel="help"] + link [href="{boardurl}/index.php" rel="contents"] + link [href="{boardurl}/index.php?action=search" rel="search"] + link [href="{boardurl}/index.php?action=feed;type=rss#" rel="alternate" title="{forum_name} - RSS" type="application/rss+xml"] + link [href="{boardurl}/index.php?action=feed;type=atom" rel="alternate" title="{forum_name} - Atom" type="application/atom+xml"] +@ body +body#smf.action_home + div#footerfix + div#top_section + div.content_wrapper.inner_wrap + ul#top_info.floatleft + li + a#profile_menu_top [href="{boardurl}/index.php?action=profile"] + img.avatar [alt src="{boardurl}/avatars/default.png"] + span.textmenu + "{member}" + div#profile_menu.top_menu + li + a#pm_menu_top [href="{boardurl}/index.php?action=pm"] + span.inbox.main_icons + span.textmenu + "My Messages" + div#pm_menu.scrollable.top_menu + li + a#alerts_menu_top [href="{boardurl}/index.php?action=profile;area=showalerts;u=#"] + span.alerts.main_icons + span.textmenu + "Alerts" + div#alerts_menu.scrollable.top_menu + li#nojs_logout + a [href="{boardurl}/index.php?action=logout;{session_var}={session_id}"] + "Log out" + script + | document.getElementById("nojs_logout").style.display = "none"; + form#search_form.floatright [accept-charset="UTF-#" action="{boardurl}/index.php?action=search#" method="post"] + input [name="search" type="search" value] + select [name="search_selection"] + option [selected value="all"] + "Entire forum" + option [value="members"] + "Members" + input.button [name="search#" type="submit" value="Search"] + input [name="advanced" type="hidden" value="#"] + header#header.content_wrapper + h1.forumtitle + a#top [href="{boardurl}/index.php"] + "{forum_name}" + img#smflogo [alt="Simple Machines Forum" src="{boardurl}/Themes/default/images/smflogo.svg" title="Simple Machines Forum"] + nav#main_menu [aria-label="Main Menu"] + div.content_wrapper + a.mobile_user_menu + span.menu_icon + span.text_menu + "Main Menu" + div#mobile_user_menu.popup_container + div.description.popup_window + div.popup_heading + "Main Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + ul.dropmenu.menu_nav + li.button_home + a.active [href="{boardurl}/index.php"] + span.home.main_icons + span.textmenu + "Home" + li.button_search + a [href="{boardurl}/index.php?action=search"] + span.main_icons.search + span.textmenu + "Search" + li.button_admin.subsections + a [href="{boardurl}/index.php?action=admin"] + span.admin.main_icons + span.textmenu + "Admin" + ul + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings"] + "Features and Options" + li + a [href="{boardurl}/index.php?action=admin;area=packages"] + "Package Manager" + li + a [href="{boardurl}/index.php?action=admin;area=logs;sa=errorlog;desc"] + "Error Log" + li + a [href="{boardurl}/index.php?action=admin;area=permissions"] + "Permissions" + li.button_moderate.subsections + a [href="{boardurl}/index.php?action=moderate"] + span.main_icons.moderate + span.textmenu + "Moderate" + ul + li + a [href="{boardurl}/index.php?action=moderate;area=modlog"] + "Moderation Log" + li + a [href="{boardurl}/index.php?action=moderate;area=reportedposts"] + "Reported Posts" + li + a [href="{boardurl}/index.php?action=moderate;area=reportedmembers"] + "Reported Members" + li.button_mlist.subsections + a [href="{boardurl}/index.php?action=mlist"] + span.main_icons.mlist + span.textmenu + "Members" + ul + li + a [href="{boardurl}/index.php?action=mlist"] + "View the memberlist" + li + a [href="{boardurl}/index.php?action=mlist;sa=search"] + "Search for Members" + div#wrapper.content_wrapper + div#inner_wrap + div.user + time [datetime="{date}"] + "{date}" + ul.unread_links + li + a [href="{boardurl}/index.php?action=unread" title="Show unread posts since last visit."] + "Unread Posts" + li + a [href="{boardurl}/index.php?action=unreadreplies" title="Show new replies to your posts."] + "Updated Topics" + div.news + h2 + "News:" + p + "SMF - Just Installed!" + nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + div#content_section + snapshot-ignored [selector="#main_content_section"] + footer#footer + div.content_wrapper + ul + li.copyright + a [href="{boardurl}/index.php?action=credits" rel="noopener" target="_blank" title="License"] + "SMF #.# Alpha(s) #-dev © #" + "," + a [href="https://www.simplemachines.org" rel="noopener" target="_blank" title="Simple Machines"] + "Simple Machines" + li.helplinks + a [href="{boardurl}/index.php?action=help"] + "Help" + a [href="{boardurl}/index.php?action=agreement"] + "Terms and Rules" + a [href="#top_section"] + "Go Up ▲" + script + | window.addEventListener("DOMContentLoaded", function() { function triggerCron() { $.get('{boardurl}' + "/cron.php?ts=#"); } window.setTimeout(triggerCron, #); var user_menus = new smc_PopupMenu(); user_menus.add("profile", "{boardurl}/index.php?action=profile;area=popup"); user_menus.add("alerts", "{boardurl}/index.php?action=profile;area=alerts_popup;u=#"); user_menus.add("pm", "{boardurl}/index.php?action=pm;sa=popup"); }); diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/display.txt b/tests/Integration/Http/Snapshot/snapshots/admin/display.txt new file mode 100644 index 00000000000..5edbfcf3643 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/display.txt @@ -0,0 +1,733 @@ +status 200 +@ title +title + "{subject}" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php#c#" itemprop="item"] + span [itemprop="name"] + "Snapshot fixtures" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?board=#.#" itemprop="item"] + span [itemprop="name"] + "{board}" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?topic=#.#" itemprop="item"] + span [itemprop="name"] + "{subject}" + meta [content="#" itemprop="position"] +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php#c#" itemprop="item"] + span [itemprop="name"] + "Snapshot fixtures" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?board=#.#" itemprop="item"] + span [itemprop="name"] + "{board}" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?topic=#.#" itemprop="item"] + span [itemprop="name"] + "{subject}" + meta [content="#" itemprop="position"] +@ #content_section +div#content_section + main#main_content_section + div#display_head.information + h2.display_title + span#top_subject + "{subject}" + p + "Started by {member}, {date}" + span.floatright.nextlinks + a [href="{boardurl}/index.php?topic=#.#;prev_next=prev#new"] + "Previous topic" + "-" + a [href="{boardurl}/index.php?topic=#.#;prev_next=next#new"] + "Next topic" + div.pagesection.top + div.buttonlist.floatright + a.active.button.button_strip_reply [href="{boardurl}/index.php?action=post;topic=#.#;last_msg=#"] + "Reply" + a.button.button_strip_add_poll [href="{boardurl}/index.php?action=editpoll;add;topic=#.#"] + "Add poll" + a.button.button_strip_mark_unread [href="{boardurl}/index.php?action=markasread;sa=topic;t=#;topic=#.#;{session_var}={session_id}"] + "Mark unread" + a.button.button_strip_print [href="{boardurl}/index.php?action=printpage;topic=#.#" rel="nofollow"] + "Print" + a.button.button_strip_notify + "No Alerts or Emails" + div.dropmenu.notify_dropdown.top_menu + div.viewport + div.overview + a [href="{boardurl}/index.php?action=notifytopic;topic=#;mode=#;{session_var}={session_id}"] + strong + "Not Following" + br + span + "You will not receive any emails or alerts for this topic and it will also not show up in your unread replies and topics list. You will still receive @mentions for this topic." + a [href="{boardurl}/index.php?action=notifytopic;topic=#;mode=#;{session_var}={session_id}"] + strong + "No Alerts or Emails" + br + span + "You will not receive any emails or alerts but only @mentions by other members." + a [href="{boardurl}/index.php?action=notifytopic;topic=#;mode=#;{session_var}={session_id}"] + strong + "Receive Alerts" + br + span + "You will receive alerts for this topic." + a [href="{boardurl}/index.php?action=notifytopic;topic=#;mode=#;{session_var}={session_id}"] + strong + "Receive Emails and Alerts" + br + span + "You will receive both alerts and e-mails for this topic." + div.floatleft.pagelinks + a.button [href="#bot"] + "Go Down" + span.pages + "Pages" + span.current_page + "#" + div.floatright.mobile_buttons + a.button.mobile_act + "User actions" + a.button.mobile_mod + "Moderation" + div#forumposts + form#quickModForm [accept-charset="UTF-#" action="{boardurl}/index.php?action=quickmod#;topic=#.#" method="post" name="quickModForm"] + div#msg#.windowbg + div.post_wrapper + div.poster + h4 + a [href="{boardurl}/index.php?action=profile;u=#" title="View the profile of {member}"] + "{member}" + ul.user_info + li.avatar + a [href="{boardurl}/index.php?action=profile;u=#"] + img.avatar [alt src="{boardurl}/avatars/default.png"] + li.icons + img [alt="*" src="{boardurl}/Themes/default/images/membericons/icon.png"] + li.postgroup + "{text}" + li.postcount + "Posts: #" + li.blurb + "Personal text for {member}" + li.profile + ol.profile_icons + li + a [href="https://www.example.com" rel="noopener" target="_blank" title="Example"] + span.centericon.main_icons.www [title="Example"] + li + a [href="{boardurl}/index.php?action=pm;sa=send;u=#" title="Personal Message (Offline)"] + span.centericon.im_off.main_icons [title="Personal Message (Offline)"] + li.email + a [href="mailto:snapshot_member@example.com" rel="nofollow"] + span.centericon.mail.main_icons [title="Email"] + li.poster_ip + a.show_on_hover [data-hover="#.#.#.#" href="{boardurl}/index.php?action=profile;area=tracking;sa=ip;u=#;searchip=#.#.#.#"] + span + "Show IP address" + a.help [href="{boardurl}/index.php?action=helpadmin;help=see_admin_ip" onclick="return reqOverlayDiv(this.href);"] + "(?)" + div.postarea + div.keyinfo + div#subject_#.subject_hidden.subject_title + a [href="{boardurl}/index.php?msg=#" rel="nofollow"] + "{subject}" + div.postinfo + span.messageicon + img#msg_icon_# [alt src="{boardurl}/Themes/default/images/post/xx.png"] + a.smalltext [href="{boardurl}/index.php?msg=#" rel="nofollow" title="{subject}"] + "{date}" + span.spacer + span#modified_#.floatright.modified.smalltext + div#msg_#_quick_mod + div.post + div#msg_#.inner [data-msgid="#"] + "The first post, with" + strong + "bold" + "," + em + "italic" + "," + u + "underlined" + "and" + s + "struck" + "text." + br + a.bbc_link [href="https://www.simplemachines.org" rel="noopener" target="_blank"] + "A link" + "and" + a.bbc_email [href="mailto:someone@example.com"] + "someone@example.com" + "." + br + blockquote.bbc_standard_quote + cite + "Quote" + "An unattributed quote." + div.codeheader + "Code" + pre.bbc_code [data-expand-txt="Expand" data-select-txt="Select" data-shrink-txt="Shrink"] + code + "echo \"code\";" + ul.bbc_list + li + "One" + li + "Two" + span.bbc_color [style="color: red;"] + "Red" + span.bbc_size [style="font-size: #pt;"] + "Sized" + div.centertext + "Centred" + table.bbc_table + thead + tr + th + "A" + th + "B" + tbody + span.bbc_inline_spoiler [title="Show or hide spoiler content"] + button [tabindex="#" title="Show or hide spoiler content" type="button"] + span + "Hidden" + hr.bbc_hr + "Smileys:" + img.smiley [alt=":)" src="{boardurl}/Smileys/fugue/smiley.png" title="Smiley"] + img.smiley [alt=";)" src="{boardurl}/Smileys/fugue/wink.png" title="Wink"] + div.under_message + ul.quickbuttons.quickbuttons_post + li + a [href="{boardurl}/index.php?action=post;quote=#;topic=#.#;last_msg=#" onclick="return oQuickReply.quote(#);"] + span.main_icons.quote + "Quote" + li#quoteSelected_# [style="display:none"] + a [href="javascript:void(#)"] + span.main_icons.quote_selected + "Quote selected text" + li#modify_button_#.quick_edit + a [href="javascript:void(#);"] + span.main_icons.quick_edit_button + "Quick Edit" + li.post_options + a [href="javascript:void(#);"] + "More..." + ul + li + a [href="{boardurl}/index.php?action=post;msg=#;topic=#.#"] + span.main_icons.modify_button + "Modify" + li.you_sure + a [data-confirm="Are you sure you want to remove this topic?" href="{boardurl}/index.php?action=removetopic#;topic=#.#;{session_var}={session_id}"] + span.main_icons.remove_button + "Remove topic" + li + a [href="{boardurl}/index.php?action=splittopics;topic=#.#;at=#"] + span.main_icons.split_button + "Split Topic" + li + a [href="{boardurl}/index.php?action=reporttm;topic=#.#;msg=#"] + span.error.main_icons + "Report to moderator" + li + a [href="{boardurl}/index.php?action=profile;area=issuewarning;u=#;msg=#"] + span.main_icons.warn_button + "Issue Warning" + div.moderatorbar + div#msg_#_signature.signature + "A signature with" + strong + "bold" + "text." + hr.post_separator + div#msg#.windowbg + div.post_wrapper + div.poster + h4 + "Snapshot Guest" + ul.user_info + li.membergroup + "Guest" + li.email + a [href="mailto:guest@example.com" rel="nofollow"] + span.centericon.mail.main_icons [title="Email"] + li.poster_ip + a.show_on_hover [data-hover="#.#.#.#" href="{boardurl}/index.php?action=trackip;searchip=#.#.#.#"] + span + "Show IP address" + a.help [href="{boardurl}/index.php?action=helpadmin;help=see_admin_ip" onclick="return reqOverlayDiv(this.href);"] + "(?)" + div.postarea + div.keyinfo + div#subject_#.subject_hidden.subject_title + a [href="{boardurl}/index.php?msg=#" rel="nofollow"] + "{subject}" + span.floatright.page_number + "##" + div.postinfo + span.messageicon + img#msg_icon_# [alt src="{boardurl}/Themes/default/images/post/xx.png"] + a.smalltext [href="{boardurl}/index.php?msg=#" rel="nofollow" title="Reply ## - {subject}"] + "{date}" + span.spacer + span#modified_#.floatright.modified.smalltext + div#msg_#_quick_mod + div.post + div#msg_#.inner [data-msgid="#"] + "A reply from a guest." + div.under_message + ul.quickbuttons.quickbuttons_post + li + a [href="{boardurl}/index.php?action=post;quote=#;topic=#.#;last_msg=#" onclick="return oQuickReply.quote(#);"] + span.main_icons.quote + "Quote" + li#quoteSelected_# [style="display:none"] + a [href="javascript:void(#)"] + span.main_icons.quote_selected + "Quote selected text" + li#modify_button_#.quick_edit + a [href="javascript:void(#);"] + span.main_icons.quick_edit_button + "Quick Edit" + li.post_options + a [href="javascript:void(#);"] + "More..." + ul + li + a [href="{boardurl}/index.php?action=post;msg=#;topic=#.#"] + span.main_icons.modify_button + "Modify" + li.you_sure + a [data-confirm="Remove this post?" href="{boardurl}/index.php?action=deletemsg;topic=#.#;msg=#;{session_var}={session_id}"] + span.main_icons.remove_button + "Remove" + li + a [href="{boardurl}/index.php?action=splittopics;topic=#.#;at=#"] + span.main_icons.split_button + "Split Topic" + li + a [href="{boardurl}/index.php?action=reporttm;topic=#.#;msg=#"] + span.error.main_icons + "Report to moderator" + div.moderatorbar + hr.post_separator + div#msg#.windowbg + div.post_wrapper + div.poster + h4 + a [href="{boardurl}/index.php?action=profile;u=#" title="View the profile of {member}"] + "{member}" + ul.user_info + li.membergroup + "Administrator" + li.avatar + a [href="{boardurl}/index.php?action=profile;u=#"] + img.avatar [alt src="{boardurl}/avatars/default.png"] + li.icons + img [alt="*" src="{boardurl}/Themes/default/images/membericons/iconadmin.png"] + li.postgroup + "{text}" + li.postcount + "Posts: #" + li.profile + ol.profile_icons + li + a [href="{boardurl}/index.php?action=pm;sa=send;u=#" title="Personal Message (Online)"] + span.centericon.im_on.main_icons [title="Personal Message (Online)"] + li.email + a [href="mailto:admin@example.com" rel="nofollow"] + span.centericon.mail.main_icons [title="Email"] + li.poster_ip + a.show_on_hover [data-hover="#.#.#.#" href="{boardurl}/index.php?action=profile;area=tracking;sa=ip;u=#;searchip=#.#.#.#"] + span + "Show IP address" + a.help [href="{boardurl}/index.php?action=helpadmin;help=see_admin_ip" onclick="return reqOverlayDiv(this.href);"] + "(?)" + div.postarea + div.keyinfo + div#subject_#.subject_hidden.subject_title + a [href="{boardurl}/index.php?msg=#" rel="nofollow"] + "{subject}" + span.floatright.page_number + "##" + div.postinfo + span.messageicon + img#msg_icon_# [alt src="{boardurl}/Themes/default/images/post/xx.png"] + a.smalltext [href="{boardurl}/index.php?msg=#" rel="nofollow" title="Reply ## - {subject}"] + "{date}" + span.spacer + span#modified_#.floatright.modified.smalltext + div#msg_#_quick_mod + div.post + div#msg_#.inner [data-msgid="#"] + blockquote.bbc_standard_quote + cite + "Quote from: {member}" + "The quoted text." + "A reply from the administrator." + div.under_message + ul.quickbuttons.quickbuttons_post + li + a [href="{boardurl}/index.php?action=post;quote=#;topic=#.#;last_msg=#" onclick="return oQuickReply.quote(#);"] + span.main_icons.quote + "Quote" + li#quoteSelected_# [style="display:none"] + a [href="javascript:void(#)"] + span.main_icons.quote_selected + "Quote selected text" + li#modify_button_#.quick_edit + a [href="javascript:void(#);"] + span.main_icons.quick_edit_button + "Quick Edit" + li.post_options + a [href="javascript:void(#);"] + "More..." + ul + li + a [href="{boardurl}/index.php?action=post;msg=#;topic=#.#"] + span.main_icons.modify_button + "Modify" + li.you_sure + a [data-confirm="Remove this post?" href="{boardurl}/index.php?action=deletemsg;topic=#.#;msg=#;{session_var}={session_id}"] + span.main_icons.remove_button + "Remove" + li + a [href="{boardurl}/index.php?action=splittopics;topic=#.#;at=#"] + span.main_icons.split_button + "Split Topic" + li + a [href="{boardurl}/index.php?action=reporttm;topic=#.#;msg=#"] + span.error.main_icons + "Report to moderator" + div.moderatorbar + hr.post_separator + div#msg#.windowbg + div.post_wrapper + div.poster + h4 + a [href="{boardurl}/index.php?action=profile;u=#" title="View the profile of {member}"] + "{member}" + ul.user_info + li.avatar + a [href="{boardurl}/index.php?action=profile;u=#"] + img.avatar [alt src="{boardurl}/avatars/default.png"] + li.icons + img [alt="*" src="{boardurl}/Themes/default/images/membericons/icon.png"] + li.postgroup + "{text}" + li.postcount + "Posts: #" + li.blurb + "Personal text for {member}" + li.profile + ol.profile_icons + li + a [href="https://www.example.com" rel="noopener" target="_blank" title="Example"] + span.centericon.main_icons.www [title="Example"] + li + a [href="{boardurl}/index.php?action=pm;sa=send;u=#" title="Personal Message (Offline)"] + span.centericon.im_off.main_icons [title="Personal Message (Offline)"] + li.email + a [href="mailto:snapshot_other@example.com" rel="nofollow"] + span.centericon.mail.main_icons [title="Email"] + li.poster_ip + a.show_on_hover [data-hover="#.#.#.#" href="{boardurl}/index.php?action=profile;area=tracking;sa=ip;u=#;searchip=#.#.#.#"] + span + "Show IP address" + a.help [href="{boardurl}/index.php?action=helpadmin;help=see_admin_ip" onclick="return reqOverlayDiv(this.href);"] + "(?)" + div.postarea + div.keyinfo + div#subject_#.subject_hidden.subject_title + a [href="{boardurl}/index.php?msg=#" rel="nofollow"] + "{subject}" + span.floatright.page_number + "##" + div.postinfo + span.messageicon + img#msg_icon_# [alt src="{boardurl}/Themes/default/images/post/xx.png"] + a.smalltext [href="{boardurl}/index.php?msg=#" rel="nofollow" title="Reply ## - {subject}"] + "{date}" + span.spacer + span#modified_#.floatright.modified.smalltext + div#msg_#_quick_mod + div.post + div#msg_#.inner [data-msgid="#"] + "A reply from another member, with a smiley" + img.smiley [alt=":)" src="{boardurl}/Smileys/fugue/smiley.png" title="Smiley"] + div.under_message + ul.quickbuttons.quickbuttons_post + li + a [href="{boardurl}/index.php?action=post;quote=#;topic=#.#;last_msg=#" onclick="return oQuickReply.quote(#);"] + span.main_icons.quote + "Quote" + li#quoteSelected_# [style="display:none"] + a [href="javascript:void(#)"] + span.main_icons.quote_selected + "Quote selected text" + li#modify_button_#.quick_edit + a [href="javascript:void(#);"] + span.main_icons.quick_edit_button + "Quick Edit" + li.post_options + a [href="javascript:void(#);"] + "More..." + ul + li + a [href="{boardurl}/index.php?action=post;msg=#;topic=#.#"] + span.main_icons.modify_button + "Modify" + li.you_sure + a [data-confirm="Remove this post?" href="{boardurl}/index.php?action=deletemsg;topic=#.#;msg=#;{session_var}={session_id}"] + span.main_icons.remove_button + "Remove" + li + a [href="{boardurl}/index.php?action=splittopics;topic=#.#;at=#"] + span.main_icons.split_button + "Split Topic" + li + a [href="{boardurl}/index.php?action=reporttm;topic=#.#;msg=#"] + span.error.main_icons + "Report to moderator" + li + a [href="{boardurl}/index.php?action=profile;area=issuewarning;u=#;msg=#"] + span.main_icons.warn_button + "Issue Warning" + div.moderatorbar + div#msg_#_signature.signature + "A signature with" + strong + "bold" + "text." + hr.post_separator + div.pagesection + div.buttonlist.floatright + a.active.button.button_strip_reply [href="{boardurl}/index.php?action=post;topic=#.#;last_msg=#"] + "Reply" + a.button.button_strip_add_poll [href="{boardurl}/index.php?action=editpoll;add;topic=#.#"] + "Add poll" + a.button.button_strip_mark_unread [href="{boardurl}/index.php?action=markasread;sa=topic;t=#;topic=#.#;{session_var}={session_id}"] + "Mark unread" + a.button.button_strip_print [href="{boardurl}/index.php?action=printpage;topic=#.#" rel="nofollow"] + "Print" + a.button.button_strip_notify + "No Alerts or Emails" + div.dropmenu.notify_dropdown.top_menu + div.viewport + div.overview + a [href="{boardurl}/index.php?action=notifytopic;topic=#;mode=#;{session_var}={session_id}"] + strong + "Not Following" + br + span + "You will not receive any emails or alerts for this topic and it will also not show up in your unread replies and topics list. You will still receive @mentions for this topic." + a [href="{boardurl}/index.php?action=notifytopic;topic=#;mode=#;{session_var}={session_id}"] + strong + "No Alerts or Emails" + br + span + "You will not receive any emails or alerts but only @mentions by other members." + a [href="{boardurl}/index.php?action=notifytopic;topic=#;mode=#;{session_var}={session_id}"] + strong + "Receive Alerts" + br + span + "You will receive alerts for this topic." + a [href="{boardurl}/index.php?action=notifytopic;topic=#;mode=#;{session_var}={session_id}"] + strong + "Receive Emails and Alerts" + br + span + "You will receive both alerts and e-mails for this topic." + div.floatleft.pagelinks + a#bot.button [href="#main_content_section"] + "Go Up" + span.pages + "Pages" + span.current_page + "#" + div.floatright.mobile_buttons + a.button.mobile_act + "User actions" + a.button.mobile_mod + "Moderation" + nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php#c#" itemprop="item"] + span [itemprop="name"] + "Snapshot fixtures" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?board=#.#" itemprop="item"] + span [itemprop="name"] + "{board}" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?topic=#.#" itemprop="item"] + span [itemprop="name"] + "{subject}" + meta [content="#" itemprop="position"] + div#moderationbuttons + div#moderationbuttons_strip.buttonlist.floatbottom + a.button.button_strip_move [href="{boardurl}/index.php?action=movetopic;current_board=#;topic=#.#"] + "Move Topic" + a.button.button_strip_delete.you_sure [data-confirm="Are you sure you want to remove this topic?" href="{boardurl}/index.php?action=removetopic#;topic=#.#;{session_var}={session_id}"] + "Remove topic" + a.button.button_strip_lock [href="{boardurl}/index.php?action=lock;topic=#.#;sa=lock;{session_var}={session_id}"] + "Lock topic" + a.button.button_strip_sticky [href="{boardurl}/index.php?action=sticky;topic=#.#;sa=sticky;{session_var}={session_id}"] + "Set topic sticky" + a.button.button_strip_merge [href="{boardurl}/index.php?action=mergetopics;board=#.#;from=#"] + "Merge Topics" + div#display_jump_to + a#quickreply_anchor + div#quickreply.tborder + div.cat_bar + h3.catbg + "Quick Reply" + div#quickreply_options + div.roundframe + p.alert.smalltext + "Warning: this topic has not been posted in for at least {duration}." + br + "Unless you are sure you want to reply, please consider starting a new topic." + form#postmodify [accept-charset="UTF-#" action="{boardurl}/index.php?board=#;action=post#" method="post" name="postmodify" onsubmit="submitonce(this);"] + input [name="topic" type="hidden" value="#"] + input [name="subject" type="hidden" value="{subject}"] + input [name="icon" type="hidden" value="xx"] + input [name="from_qr" type="hidden" value="#"] + input [name="notify" type="hidden" value="#"] + input [name="not_approved" type="hidden" value] + input [name="goback" type="hidden" value="#"] + input [name="last_msg" type="hidden" value="#"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="seqnum" type="hidden" value="#"] + textarea#quickReply.editor [cols="#" name="quickReply" style="width: #%; height: #px;"] + input#quickReply_mode [name="quickReply_mode" type="hidden" value="#"] + script + | document.addEventListener("DOMContentLoaded", function () { var textarea = document.getElementById("quickReply"), options = { "width": "#%", "height": "#px", "style": "{boardurl}/Themes/default/css/jquery.sceditor.default.css?smf#alpha#dev_#", "emoticonsCompat": true, "emoticons": { "dropdown": { ":)": { "newRow": false, "url": "smiley.png", "tooltip": "Smiley" }, ";)": { "newRow": false, "url": "wink.png", "tooltip": "Wink" }, ":D": { "newRow": false, "url": "cheesy.png", "tooltip": "Cheesy" }, ";D": { "newRow": false, "url": "grin.png", "tooltip": "Grin" }, ">:(": { "newRow": false, "url": "angry.png", "tooltip": "Angry" }, ":(": { "newRow": false, "url": "sad.png", "tooltip": "Sad" }, ":o": { "newRow": false, "url": "shocked.png", "tooltip": "Shocked" }, "#)": { "newRow": false, "url": "cool.png", "tooltip": "Cool" }, "???": { "newRow": false, "url": "huh.png", "tooltip": "Huh?" }, "::)": { "newRow": false, "url": "rolleyes.png", "tooltip": "Roll Eyes" }, ":P": { "newRow": false, "url": "tongue.png", "tooltip": "Tongue" }, ":-[": { "newRow": false, "url": "embarrassed.png", "tooltip": "Embarrassed" }, ":-X": { "newRow": false, "url": "lipsrsealed.png", "tooltip": "Lips Sealed" }, ":-\\": { "newRow": false, "url": "undecided.png", "tooltip": "Undecided" }, ":-*": { "newRow": false, "url": "kiss.png", "tooltip": "Kiss" }, ":'(": { "newRow": false, "url": "cry.png", "tooltip": "Cry" } } }, "emoticonsEnabled": true, "emoticonsRoot": "{boardurl}/Smileys/fugue/", "colors": [ [ "black", "Black" ], [ "red", "Red" ], [ "yellow", "Yellow" ], [ "pink", "Pink" ], [ "green", "Green" ], [ "orange", "Orange" ], [ "purple", "Purple" ], [ "blue", "Blue" ], [ "beige", "Beige" ], [ "brown", "Brown" ], [ "teal", "Teal" ], [ "navy", "Navy" ], [ "maroon", "Maroon" ], [ "limegreen", "Lime Green" ], [ "white", "White" ] ], "fonts": "Arial,Arial Black,Comic Sans MS,Courier New,Georgia,Impact,Sans-serif,Serif,Times New Roman,Trebuchet MS,Verdana", "icons": "monocons", "format": "bbcode", "plugins": "smf,autolinker", "toolbar": "bold,italic,underline,strike,superscript,subscript,tt,spoiler|pre,left,center,right,justify|font,size,color|removeformat||floatleft,floatright|youtube,image,email,link,unlink|table,code,quote,details|heading,bulletlist,orderedlist,horizontalrule|maximize,source", "customTextualCommands": { "tt": { "image": "tt", "code": "tt", "description": "Inline code" }, "spoiler": { "image": "hidden", "code": "spoiler", "description": "Spoiler" }, "details": { "image": "details", "code": "details", "description": "Details" }, "heading": { "image": "heading", "code": "heading", "description": "Heading" } }, "startInSourceMode": true, "bbcodeTrim": false, "resizeWidth": false, "resizeMaxHeight": -#, "locale": "en", "rtl": false, "commandsWithDropdown": { "color": true, "heading": true, "font": true, "size": true }, "textOnlyCommands": [], "commandsWithText": [], "parserOptions": { "txtVars": { "code": "Code" } } }; sceditor.create(textarea, options, '#', '#'); }); + span#post_confirm_buttons + span.smalltext + "Shortcuts: ALT+S post, ALT+P preview, ALT+D save draft" + span.post_button_container + input.button [accesskey="d" name="save_draft" onclick="return confirm('This will save the text of your post, but it will not save attachments, poll or event information.');" type="submit" value="Save draft"] + input#id_draft [name="id_draft" type="hidden" value="#"] + input.button [accesskey="p" name="preview" type="submit" value="Preview"] + input.button [accesskey="s" name="post" onclick="return submitThisOnce(this);" type="submit" value="Post"] + br.clear + script + | window.addEventListener("DOMContentLoaded", function() { new QuickReply({ bDefaultCollapsed: false, iTopicId: #, iStart: #, sScriptUrl: smf_scripturl, sImagesUrl: smf_images_url, sContainerId: "quickreply_options", sImageId: "quickReplyExpand", sClassCollapsed: "toggle_up", sClassExpanded: "toggle_down", sJumpAnchor: "quickreply_anchor", bIsFull: true }); }); var oEditorID = "quickReply"; + div#mobile_action.popup_container + div.description.popup_window + div.popup_heading + "User actions" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.buttonlist + a.active.button.button_strip_reply [href="{boardurl}/index.php?action=post;topic=#.#;last_msg=#"] + "Reply" + a.button.button_strip_add_poll [href="{boardurl}/index.php?action=editpoll;add;topic=#.#"] + "Add poll" + a.button.button_strip_mark_unread [href="{boardurl}/index.php?action=markasread;sa=topic;t=#;topic=#.#;{session_var}={session_id}"] + "Mark unread" + a.button.button_strip_print [href="{boardurl}/index.php?action=printpage;topic=#.#" rel="nofollow"] + "Print" + a.button.button_strip_notify + "No Alerts or Emails" + div.dropmenu.notify_dropdown.top_menu + div.viewport + div.overview + a [href="{boardurl}/index.php?action=notifytopic;topic=#;mode=#;{session_var}={session_id}"] + strong + "Not Following" + br + span + "You will not receive any emails or alerts for this topic and it will also not show up in your unread replies and topics list. You will still receive @mentions for this topic." + a [href="{boardurl}/index.php?action=notifytopic;topic=#;mode=#;{session_var}={session_id}"] + strong + "No Alerts or Emails" + br + span + "You will not receive any emails or alerts but only @mentions by other members." + a [href="{boardurl}/index.php?action=notifytopic;topic=#;mode=#;{session_var}={session_id}"] + strong + "Receive Alerts" + br + span + "You will receive alerts for this topic." + a [href="{boardurl}/index.php?action=notifytopic;topic=#;mode=#;{session_var}={session_id}"] + strong + "Receive Emails and Alerts" + br + span + "You will receive both alerts and e-mails for this topic." + div#mobile_moderation.popup_container + div.description.popup_window + div.popup_heading + "Moderation" + a.hide_popup.main_icons [href="javascript:void(#);"] + div#moderationbuttons_mobile + div#moderationbuttons_strip_mobile.buttonlist.floatbottom + a.button.button_strip_move [href="{boardurl}/index.php?action=movetopic;current_board=#;topic=#.#"] + "Move Topic" + a.button.button_strip_delete.you_sure [data-confirm="Are you sure you want to remove this topic?" href="{boardurl}/index.php?action=removetopic#;topic=#.#;{session_var}={session_id}"] + "Remove topic" + a.button.button_strip_lock [href="{boardurl}/index.php?action=lock;topic=#.#;sa=lock;{session_var}={session_id}"] + "Lock topic" + a.button.button_strip_sticky [href="{boardurl}/index.php?action=sticky;topic=#.#;sa=sticky;{session_var}={session_id}"] + "Set topic sticky" + a.button.button_strip_merge [href="{boardurl}/index.php?action=mergetopics;board=#.#;from=#"] + "Merge Topics" + script + | window.addEventListener("DOMContentLoaded", function() { new QuickModify({ sScriptUrl: smf_scripturl, sFormName: 'quickModForm', sClassName: 'quick_edit', bShowModify: true, iTopicId: #, sSaveButtonText: 'Save', sCancelButtonText: 'Cancel', sEditReasonText: 'Reason for editing', sErrorBorderStyle: '#px solid red' }); new JumpTo({ sContainerId: "display_jump_to", sJumpToTemplate: "\"ICQ" + fieldset + legend + "Input Settings" + dl.settings + dt + strong + label [for="field_type"] + "Field Type" + dd + select#field_type [name="field_type" onchange="updateInputBoxes();"] + option [selected value="text"] + "Text" + option [value="textarea"] + "Large Text" + option [value="select"] + "Select Box" + option [value="radio"] + "Radio Button" + option [value="check"] + "Checkbox" + dt#max_length_dt + strong + label [for="max_length_dd"] + "Maximum Length" + br + span.smalltext + "(# for(s) no limit)" + dd + input#max_length_dd [maxlength="#" name="max_length" size="#" type="text" value="#"] + dt#dimension_dt + strong + label [for="dimension_dd"] + "Dimensions" + dd#dimension_dd + strong + "Rows" + input [maxlength="#" name="rows" size="#" type="text" value="#"] + strong + "Columns" + input [maxlength="#" name="cols" size="#" type="text" value="#"] + dt#bbc_dt + strong + label [for="bbc_dd"] + "Allow BBC" + dd + input#bbc_dd [name="bbc" type="checkbox"] + dt#options_dt + a.help [href="{boardurl}/index.php?action=helpadmin;help=customoptions" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + strong + label [for="options_dd"] + "Options" + br + span.smalltext + "Leave option box blank to remove. Radio button selects default option." + br + span + "You can use translatable tokens in this field." + dd#options_dd + input [checked name="default_select" type="radio" value="#"] + input [name="select_option[#]" type="text" value] + br + input [checked name="default_select" type="radio" value="#"] + input [name="select_option[#]" type="text" value] + span#addopt + "[" + a [href onclick="addOption(); return false;"] + "More" + "]" + dt#default_dt + strong + label [for="default_dd"] + "Default State" + dd + input#default_dd [name="default_check" type="checkbox"] + fieldset + legend + "Advanced Settings" + dl.settings + dt#mask_dt + a#custom_mask.help [href="{boardurl}/index.php?action=helpadmin;help=custom_mask" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + strong + label [for="mask"] + "Input Mask" + br + span.smalltext + "For text fields an input mask can be selected to validate the data." + dd + select#mask [name="mask" onchange="updateInputBoxes();"] + option [value="nohtml"] + "No HTML" + option [value="email"] + "Valid Email" + option [value="number"] + "Numeric" + option [selected value="regex"] + "Regex (Advanced)" + br + span#regex_div + input [name="regex" size="#" type="text" value="~[#-#][#-#]{#,#}~i"] + dt + strong + label [for="private"] + "Privacy" + br + span.smalltext + "Who can see and edit this field." + dd + select#private [name="private" onchange="updateInputBoxes();"] + option [selected value="#"] + "Users can see this field; owner can edit it" + option [value="#"] + "Users can see this field; only admins can edit it" + option [value="#"] + "Users cannot see this field; owner and admins can edit it." + option [value="#"] + "This field is only visible to admins" + dt#can_search_dt + strong + label [for="can_search_dd"] + "Searchable" + br + span.smalltext + "Can this field be searched from the members list." + dd + input#can_search_dd [name="can_search" type="checkbox"] + dt + strong + label [for="can_search_check"] + "Active" + br + span.smalltext + "If not selected this field will not be shown to anyone." + dd + input#can_search_check [checked name="active" type="checkbox"] + input.button [name="save" type="submit" value="Save"] + input.button.you_sure [data-confirm="Are you sure you wish to delete this field - all related user data will be lost!" name="delete" type="submit" value="Delete"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] + script + | updateInputBoxes(); diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/features_profile_field_new.txt b/tests/Integration/Http/Snapshot/snapshots/admin/features_profile_field_new.txt new file mode 100644 index 00000000000..d4c49181650 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/features_profile_field_new.txt @@ -0,0 +1,346 @@ +status 200 +@ title +title + "Add Profile field" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=featuresettings;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Features and Options" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=basic;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "General" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=featuresettings" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Features and Options" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "From this page you can create your own custom profile fields that fit in with your own forum’s requirements" + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Features and Options Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Features and Options Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=basic;{session_var}={session_id}"] + "General" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=bbc;{session_var}={session_id}"] + "Bulletin Board Code & Markdown" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=layout;{session_var}={session_id}"] + "Layout" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=sig;{session_var}={session_id}"] + "Signatures" + li + a.active [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=profile;{session_var}={session_id}"] + "Profile Fields" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=likes;{session_var}={session_id}"] + "Likes" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=mentions;{session_var}={session_id}"] + "Mentions" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=alerts;{session_var}={session_id}"] + "Notifications" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + script + | var startOptID = #; + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=featuresettings;sa=profileedit;fid=#;{session_var}={session_id}" method="post"] + div#section_header.cat_bar + h3.catbg + "Add Profile field" + div.windowbg + fieldset + legend + "Display Settings" + dl.settings + dt + a#field_name_help.help [href="{boardurl}/index.php?action=helpadmin;help=translatable_fields" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + strong + label [for="field_name"] + "Name" + br + span.smalltext + "You can use translatable tokens in this field." + dd + input#field_name [maxlength="#" name="field_name" size="#" type="text" value] + dt + a#field_desc_help.help [href="{boardurl}/index.php?action=helpadmin;help=translatable_fields" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + strong + label [for="field_desc"] + "Description" + br + span.smalltext + "You can use translatable tokens in this field." + dd + textarea#field_desc [cols="#" name="field_desc" rows="#"] + dt + strong + label [for="profile_area"] + "Profile Section" + br + span.smalltext + "Section of profile the users will be able to edit this in." + dd + select#profile_area [name="profile_area"] + option [value="none"] + "None" + option [value="account"] + "Account Settings" + option [selected value="forumprofile"] + "Forum Profile" + option [value="theme"] + "Look and Layout" + dt + a#field_reg_require.help [href="{boardurl}/index.php?action=helpadmin;help=field_reg_require" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + strong + label [for="reg"] + "Show on Registration" + dd + select#reg [name="reg"] + option [selected value="#"] + "No" + option [value="#"] + "Yes" + option [value="#"] + "Yes, and require entry" + dt + strong + label [for="display"] + "Show on Topic View" + dd + input#display [name="display" type="checkbox"] + dt + strong + label [for="mlist"] + "Show on memberlist" + dd + input#show_mlist [name="mlist" type="checkbox"] + dt + strong + label [for="placement"] + "Choose Placement" + dd + select#placement [name="placement"] + option [selected value="#"] + "Standard (with title)" + option [value="#"] + "With Icons" + option [value="#"] + "Above Signature" + option [value="#"] + "Below Signature" + option [value="#"] + "Below Avatar" + option [value="#"] + "Above Username" + option [value="#"] + "Bottom poster info" + option [value="#"] + "Before Username" + option [value="#"] + "After Username" + dt + a#field_show_enclosed.help [href="{boardurl}/index.php?action=helpadmin;help=field_show_enclosed" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + strong + label [for="enclose"] + "Show Enclosed Within Text (Optional)" + br + span.smalltext + "We" + strong + "strongly" + "recommend to use an input mask to validate the input supplied by the user." + dd + textarea#enclose [cols="#" name="enclose" rows="#"] + fieldset + legend + "Input Settings" + dl.settings + dt + strong + label [for="field_type"] + "Field Type" + dd + select#field_type [name="field_type" onchange="updateInputBoxes();"] + option [selected value="text"] + "Text" + option [value="textarea"] + "Large Text" + option [value="select"] + "Select Box" + option [value="radio"] + "Radio Button" + option [value="check"] + "Checkbox" + dt#max_length_dt + strong + label [for="max_length_dd"] + "Maximum Length" + br + span.smalltext + "(# for(s) no limit)" + dd + input#max_length_dd [maxlength="#" name="max_length" size="#" type="text" value="#"] + dt#dimension_dt + strong + label [for="dimension_dd"] + "Dimensions" + dd#dimension_dd + strong + "Rows" + input [maxlength="#" name="rows" size="#" type="text" value="#"] + strong + "Columns" + input [maxlength="#" name="cols" size="#" type="text" value="#"] + dt#bbc_dt + strong + label [for="bbc_dd"] + "Allow BBC" + dd + input#bbc_dd [name="bbc" type="checkbox"] + dt#options_dt + a.help [href="{boardurl}/index.php?action=helpadmin;help=customoptions" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + strong + label [for="options_dd"] + "Options" + br + span.smalltext + "Leave option box blank to remove. Radio button selects default option." + br + span + "You can use translatable tokens in this field." + dd#options_dd + input [checked name="default_select" type="radio" value="#"] + input [name="select_option[#]" type="text" value] + br + input [checked name="default_select" type="radio" value="#"] + input [name="select_option[#]" type="text" value] + span#addopt + "[" + a [href onclick="addOption(); return false;"] + "More" + "]" + dt#default_dt + strong + label [for="default_dd"] + "Default State" + dd + input#default_dd [name="default_check" type="checkbox"] + fieldset + legend + "Advanced Settings" + dl.settings + dt#mask_dt + a#custom_mask.help [href="{boardurl}/index.php?action=helpadmin;help=custom_mask" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + strong + label [for="mask"] + "Input Mask" + br + span.smalltext + "For text fields an input mask can be selected to validate the data." + dd + select#mask [name="mask" onchange="updateInputBoxes();"] + option [selected value="nohtml"] + "No HTML" + option [value="email"] + "Valid Email" + option [value="number"] + "Numeric" + option [value="regex"] + "Regex (Advanced)" + br + span#regex_div + input [name="regex" size="#" type="text" value] + dt + strong + label [for="private"] + "Privacy" + br + span.smalltext + "Who can see and edit this field." + dd + select#private [name="private" onchange="updateInputBoxes();"] + option [selected value="#"] + "Users can see this field; owner can edit it" + option [value="#"] + "Users can see this field; only admins can edit it" + option [value="#"] + "Users cannot see this field; owner and admins can edit it." + option [value="#"] + "This field is only visible to admins" + dt#can_search_dt + strong + label [for="can_search_dd"] + "Searchable" + br + span.smalltext + "Can this field be searched from the members list." + dd + input#can_search_dd [name="can_search" type="checkbox"] + dt + strong + label [for="can_search_check"] + "Active" + br + span.smalltext + "If not selected this field will not be shown to anyone." + dd + input#can_search_check [checked name="active" type="checkbox"] + input.button [name="save" type="submit" value="Save"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] + script + | updateInputBoxes(); diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/features_sig.txt b/tests/Integration/Http/Snapshot/snapshots/admin/features_sig.txt new file mode 100644 index 00000000000..5b79c47a44c --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/features_sig.txt @@ -0,0 +1,375 @@ +status 200 +@ title +title + "Signature Settings" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=featuresettings;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Features and Options" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=sig;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Signatures" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=featuresettings" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Features and Options" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Use the settings on this page to decide how member signatures should be treated in SMF." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Features and Options Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Features and Options Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=basic;{session_var}={session_id}"] + "General" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=bbc;{session_var}={session_id}"] + "Bulletin Board Code & Markdown" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=layout;{session_var}={session_id}"] + "Layout" + li + a.active [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=sig;{session_var}={session_id}"] + "Signatures" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=profile;{session_var}={session_id}"] + "Profile Fields" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=likes;{session_var}={session_id}"] + "Likes" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=mentions;{session_var}={session_id}"] + "Mentions" + li + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=alerts;{session_var}={session_id}"] + "Notifications" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + form#admin_form_wrapper [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=featuresettings;save;sa=sig" method="post"] + div.cat_bar + h3.catbg + "Signature Settings" + div.information.noup + div.centertext + "Note that settings are not applied to existing signatures by default." + a [href="{boardurl}/index.php?action=admin;area=featuresettings;sa=sig;apply;{session_var}={sessions_id}"] + "Apply changes now" + div.noup.windowbg + dl.settings + dt + a#setting_signature_enable + span + label [for="signature_enable"] + "Enable signatures" + dd + input#signature_enable [checked name="signature_enable" type="checkbox" value="#"] + hr + dl.settings + dt + a#setting_signature_max_length + span + label [for="signature_max_length"] + "Maximum allowed characters" + br + span.smalltext + "(# for(s) no limit)" + dd + input#signature_max_length [min="#" name="signature_max_length" size="#" type="number" value="#"] + dt + a#setting_signature_max_lines + span + label [for="signature_max_lines"] + "Maximum amount of lines" + br + span.smalltext + "(# for(s) no limit)" + dd + input#signature_max_lines [min="#" name="signature_max_lines" size="#" type="number" value="#"] + dt + a#setting_signature_max_font_size + span + label [for="signature_max_font_size"] + "Maximum font size allowed in signatures (pixels)" + br + span.smalltext + "(# for(s) no limit)" + dd + input#signature_max_font_size [min="#" name="signature_max_font_size" size="#" type="number" value="#"] + dt + a#setting_signature_allow_smileys + span + label [for="signature_allow_smileys"] + "Allow smileys in signatures" + dd + input#signature_allow_smileys [checked name="signature_allow_smileys" onclick="document.getElementById('signature_max_smileys').disabled = !this.checked;" type="checkbox" value="#"] + dt + a#setting_signature_max_smileys + span + label [for="signature_max_smileys"] + "Maximum smiley count" + br + span.smalltext + "(# for(s) no limit)" + dd + input#signature_max_smileys [min="#" name="signature_max_smileys" size="#" type="number" value="#"] + hr + dl.settings + dt + a#setting_signature_max_images + span + label [for="signature_max_images"] + "Maximum image count" + br + span.smalltext + "(# for(s) no max - excludes smileys)" + dd + input#signature_max_images [min="#" name="signature_max_images" size="#" type="number" value="#"] + dt + a#setting_signature_max_image_width + span + label [for="signature_max_image_width"] + "Maximum width of signature images (pixels)" + br + span.smalltext + "(# for(s) no limit)" + dd + input#signature_max_image_width [min="#" name="signature_max_image_width" size="#" type="number" value="#"] + dt + a#setting_signature_max_image_height + span + label [for="signature_max_image_height"] + "Maximum height of signature images (pixels)" + br + span.smalltext + "(# for(s) no limit)" + dd + input#signature_max_image_height [min="#" name="signature_max_image_height" size="#" type="number" value="#"] + hr + dl.settings + dt + a#setting_signature_bbc + span + label [for="signature_bbc"] + "Enabled BBC tags" + dd + fieldset#signature_bbc + legend + "Select the tags which are allowed to be used" + ul + li.floatleft.list_bbc + input#tag_signature_bbc_abbr [checked name="signature_bbc_enabledTags[]" type="checkbox" value="abbr"] + label [for="tag_signature_bbc_abbr"] + "abbr" + li.floatleft.list_bbc + input#tag_signature_bbc_anchor [checked name="signature_bbc_enabledTags[]" type="checkbox" value="anchor"] + label [for="tag_signature_bbc_anchor"] + "anchor" + li.floatleft.list_bbc + input#tag_signature_bbc_attach [checked name="signature_bbc_enabledTags[]" type="checkbox" value="attach"] + label [for="tag_signature_bbc_attach"] + "attach" + li.floatleft.list_bbc + input#tag_signature_bbc_b [checked name="signature_bbc_enabledTags[]" type="checkbox" value="b"] + label [for="tag_signature_bbc_b"] + "b" + li.floatleft.list_bbc + input#tag_signature_bbc_br [checked name="signature_bbc_enabledTags[]" type="checkbox" value="br"] + label [for="tag_signature_bbc_br"] + "br" + li.floatleft.list_bbc + input#tag_signature_bbc_center [checked name="signature_bbc_enabledTags[]" type="checkbox" value="center"] + label [for="tag_signature_bbc_center"] + "center" + li.floatleft.list_bbc + input#tag_signature_bbc_code [checked name="signature_bbc_enabledTags[]" type="checkbox" value="code"] + label [for="tag_signature_bbc_code"] + "code" + li.floatleft.list_bbc + input#tag_signature_bbc_color [checked name="signature_bbc_enabledTags[]" type="checkbox" value="color"] + label [for="tag_signature_bbc_color"] + "color" + li.floatleft.list_bbc + input#tag_signature_bbc_details [checked name="signature_bbc_enabledTags[]" type="checkbox" value="details"] + label [for="tag_signature_bbc_details"] + "details" + li.floatleft.list_bbc + input#tag_signature_bbc_email [checked name="signature_bbc_enabledTags[]" type="checkbox" value="email"] + label [for="tag_signature_bbc_email"] + "email" + li.floatleft.list_bbc + input#tag_signature_bbc_float [checked name="signature_bbc_enabledTags[]" type="checkbox" value="float"] + label [for="tag_signature_bbc_float"] + "float" + li.floatleft.list_bbc + input#tag_signature_bbc_font [checked name="signature_bbc_enabledTags[]" type="checkbox" value="font"] + label [for="tag_signature_bbc_font"] + "font" + li.floatleft.list_bbc + input#tag_signature_bbc_h# [checked name="signature_bbc_enabledTags[]" type="checkbox" value="h#"] + label [for="tag_signature_bbc_h#"] + "h#" + li.floatleft.list_bbc + input#tag_signature_bbc_html [checked name="signature_bbc_enabledTags[]" type="checkbox" value="html"] + label [for="tag_signature_bbc_html"] + "html" + li.floatleft.list_bbc + input#tag_signature_bbc_hr [checked name="signature_bbc_enabledTags[]" type="checkbox" value="hr"] + label [for="tag_signature_bbc_hr"] + "hr" + li.floatleft.list_bbc + input#tag_signature_bbc_i [checked name="signature_bbc_enabledTags[]" type="checkbox" value="i"] + label [for="tag_signature_bbc_i"] + "i" + li.floatleft.list_bbc + input#tag_signature_bbc_img [checked name="signature_bbc_enabledTags[]" type="checkbox" value="img"] + label [for="tag_signature_bbc_img"] + "img" + li.floatleft.list_bbc + input#tag_signature_bbc_iurl [checked name="signature_bbc_enabledTags[]" type="checkbox" value="iurl"] + label [for="tag_signature_bbc_iurl"] + "iurl" + li.floatleft.list_bbc + input#tag_signature_bbc_justify [checked name="signature_bbc_enabledTags[]" type="checkbox" value="justify"] + label [for="tag_signature_bbc_justify"] + "justify" + li.floatleft.list_bbc + input#tag_signature_bbc_list [checked name="signature_bbc_enabledTags[]" type="checkbox" value="list"] + label [for="tag_signature_bbc_list"] + "list" + li.floatleft.list_bbc + input#tag_signature_bbc_ltr [checked name="signature_bbc_enabledTags[]" type="checkbox" value="ltr"] + label [for="tag_signature_bbc_ltr"] + "ltr" + li.floatleft.list_bbc + input#tag_signature_bbc_me [checked name="signature_bbc_enabledTags[]" type="checkbox" value="me"] + label [for="tag_signature_bbc_me"] + "me" + li.floatleft.list_bbc + input#tag_signature_bbc_member [checked name="signature_bbc_enabledTags[]" type="checkbox" value="member"] + label [for="tag_signature_bbc_member"] + "member" + li.floatleft.list_bbc + input#tag_signature_bbc_nobbc [checked name="signature_bbc_enabledTags[]" type="checkbox" value="nobbc"] + label [for="tag_signature_bbc_nobbc"] + "nobbc" + li.floatleft.list_bbc + input#tag_signature_bbc_nolink [checked name="signature_bbc_enabledTags[]" type="checkbox" value="nolink"] + label [for="tag_signature_bbc_nolink"] + "nolink" + li.floatleft.list_bbc + input#tag_signature_bbc_php [checked name="signature_bbc_enabledTags[]" type="checkbox" value="php"] + label [for="tag_signature_bbc_php"] + "php" + li.floatleft.list_bbc + input#tag_signature_bbc_pre [checked name="signature_bbc_enabledTags[]" type="checkbox" value="pre"] + label [for="tag_signature_bbc_pre"] + "pre" + li.floatleft.list_bbc + input#tag_signature_bbc_quote [checked name="signature_bbc_enabledTags[]" type="checkbox" value="quote"] + label [for="tag_signature_bbc_quote"] + "quote" + li.floatleft.list_bbc + input#tag_signature_bbc_right [checked name="signature_bbc_enabledTags[]" type="checkbox" value="right"] + label [for="tag_signature_bbc_right"] + "right" + li.floatleft.list_bbc + input#tag_signature_bbc_rtl [checked name="signature_bbc_enabledTags[]" type="checkbox" value="rtl"] + label [for="tag_signature_bbc_rtl"] + "rtl" + li.floatleft.list_bbc + input#tag_signature_bbc_s [checked name="signature_bbc_enabledTags[]" type="checkbox" value="s"] + label [for="tag_signature_bbc_s"] + "s" + li.floatleft.list_bbc + input#tag_signature_bbc_size [checked name="signature_bbc_enabledTags[]" type="checkbox" value="size"] + label [for="tag_signature_bbc_size"] + "size" + li.floatleft.list_bbc + input#tag_signature_bbc_spoiler [checked name="signature_bbc_enabledTags[]" type="checkbox" value="spoiler"] + label [for="tag_signature_bbc_spoiler"] + "spoiler" + li.floatleft.list_bbc + input#tag_signature_bbc_sub [checked name="signature_bbc_enabledTags[]" type="checkbox" value="sub"] + label [for="tag_signature_bbc_sub"] + "sub" + li.floatleft.list_bbc + input#tag_signature_bbc_sup [checked name="signature_bbc_enabledTags[]" type="checkbox" value="sup"] + label [for="tag_signature_bbc_sup"] + "sup" + li.floatleft.list_bbc + input#tag_signature_bbc_table [checked name="signature_bbc_enabledTags[]" type="checkbox" value="table"] + label [for="tag_signature_bbc_table"] + "table" + li.floatleft.list_bbc + input#tag_signature_bbc_time [checked name="signature_bbc_enabledTags[]" type="checkbox" value="time"] + label [for="tag_signature_bbc_time"] + "time" + li.floatleft.list_bbc + input#tag_signature_bbc_tt [checked name="signature_bbc_enabledTags[]" type="checkbox" value="tt"] + label [for="tag_signature_bbc_tt"] + "tt" + li.floatleft.list_bbc + input#tag_signature_bbc_u [checked name="signature_bbc_enabledTags[]" type="checkbox" value="u"] + label [for="tag_signature_bbc_u"] + "u" + li.floatleft.list_bbc + input#tag_signature_bbc_url [checked name="signature_bbc_enabledTags[]" type="checkbox" value="url"] + label [for="tag_signature_bbc_url"] + "url" + li.floatleft.list_bbc + input#tag_signature_bbc_youtube [checked name="signature_bbc_enabledTags[]" type="checkbox" value="youtube"] + label [for="tag_signature_bbc_youtube"] + "youtube" + input#bbc_signature_bbc_select_all [checked onclick="invertAll(this, this.form, 'signature_bbc_enabledTags');" type="checkbox"] + label [for="bbc_signature_bbc_select_all"] + em + "Select all tags" + input.button [type="submit" value="Save"] + input [name="{token_var}" type="hidden" value="{hash}"] + input [name="{session_var}" type="hidden" value="{session_id}"] + script + | document.getElementById('signature_max_smileys').disabled = !document.getElementById('signature_allow_smileys').checked; diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/index.php b/tests/Integration/Http/Snapshot/snapshots/admin/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/index.php @@ -0,0 +1,8 @@ +\n
\nWe here at {FORUMNAME} would like to wish you a happy birthday. May this day and the year to follow be full of joy.
\n
\n{REGARDS}' }, karlbenson#: { subject: 'On your Birthday...', body: 'We could have sent you a birthday card. We could have sent you some flowers or a cake.
\n
\nBut we didn’t.
\n
\nWe could have even sent you one of those automatically generated messages to wish you happy birthday where we don’t even have to replace INSERT NAME.
\n
\nBut we didn’t.
\n
\nWe wrote this birthday greeting just for you.
\n
\nWe would like to wish you a very special birthday.
\n
\n{REGARDS}
\n
\n//:: This message was automatically generated :://' }, nite#: { subject: 'Happy Birthday!', body: 'Your friends at {FORUMNAME} would like to take a moment of your time to wish you a happy birthday, {REALNAME}. If you have not done so recently, please visit our community in order for others to have the opportunity to pass along their warm regards.
\n
\nEven though today is your birthday, {REALNAME}, we would like to remind you that your membership in our community has been the best gift to us thus far.
\n
\nBest Wishes,
\nThe Staff of {FORUMNAME}' }, zwaldowski: { subject: 'Birthday Wishes to {REALNAME}', body: 'Dear {REALNAME},
\n
\nAnother year in your life has passed. We at {FORUMNAME} hope it has been filled with happiness, and wish you luck in the coming one.
\n
\n{REGARDS}' }, geezmo: { subject: 'Happy birthday, {REALNAME}!', body: 'Do you know who’s having a birthday today, {REALNAME}?
\n
\nWe know... YOU!
\n
\nHappy birthday!
\n
\nYou’re now a year older but we hope you’re a lot happier than last year.
\n
\nEnjoy your day today, {REALNAME}!
\n
\n- From your {FORUMNAME} family' }, karlbenson#: { subject: 'Your Birthday Greeting', body: 'We hope your birthday is the best ever; cloudy, sunny or whatever the weather.
\nHave lots of birthday cake and fun, and tell us what you have done.
\n
\nWe hope this message brought you cheer, and make it last, until same time same place, next year.
\n
\n{REGARDS}' } }; function fetch_birthday_preview() { var index = document.getElementById('birthday_email').value; document.getElementById('birthday_subject').innerHTML = bDay[index].subject; document.getElementById('birthday_body').innerHTML = bDay[index].body; } + form#admin_form_wrapper [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=mailqueue;save;sa=settings" method="post"] + div.cat_bar + h3.catbg + "Settings" + div.noup.windowbg + dl.settings + dt + a#setting_mail_limit + span + label [for="mail_limit"] + "Maximum emails to send per minute" + br + span.smalltext + "(Set to # to(s) disable.)" + dd + input#mail_limit [min="#" name="mail_limit" size="#" type="number" value="#"] + dt + a#setting_mail_quantity + span + label [for="mail_quantity"] + "Maximum amount of emails to send per page load" + dd + input#mail_quantity [min="#" name="mail_quantity" size="#" type="number" value="#"] + hr + dl.settings + dt + a#setting_birthday_email_help [href="{boardurl}/index.php?action=helpadmin;help=birthday_email" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_birthday_email + span + label [for="birthday_email"] + "Birthday message to use" + dd + select#birthday_email [name="birthday_email" onchange="fetch_birthday_preview()" size="#"] + option [value="happy_birthday"] + "happy_birthday" + option [value="karlbenson#"] + "karlbenson#" + option [value="nite#"] + "nite#" + option [value="zwaldowski"] + "zwaldowski" + option [value="geezmo"] + "geezmo" + option [value="karlbenson#"] + "karlbenson#" + dt + a#setting_birthday_subject + span [style="color: ##;"] + label [for="birthday_subject"] + "Email subject" + dd + div#birthday_subject + "Happy birthday from {FORUMNAME}." + dt + a#setting_birthday_body + span [style="color: ##;"] + label [for="birthday_body"] + "Email body" + dd + div#birthday_body + "Dear {REALNAME}," + br + "We here at {FORUMNAME} would like to wish you a happy birthday. May this day and the year to follow be full of joy." + br + "{REGARDS}" + hr + dl.settings + dt + a#setting_mail_type_help [href="{boardurl}/index.php?action=helpadmin;help=mail_type" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_mail_type + span + label [for="mail_type"] + "Mail type" + dd + select#mail_type [name="mail_type" size="#"] + option [value="SMTP"] + "SMTP" + option [value="SMTPTLS"] + "SMTPTLS" + option [selected value="SendMail"] + "SendMail" + dt + a#setting_smtp_host + span + label [for="smtp_host"] + "SMTP server" + dd + input#smtp_host [name="smtp_host" type="text" value] + dt + a#setting_smtp_port + span + label [for="smtp_port"] + "SMTP port" + dd + input#smtp_port [name="smtp_port" type="text" value="#"] + dt + a#setting_smtp_username + span + label [for="smtp_username"] + "SMTP username" + dd + input#smtp_username [name="smtp_username" type="text" value] + dt + a#setting_smtp_password + span + label [for="smtp_password"] + "SMTP password" + br + em + "(confirm)" + dd + input [name="smtp_password[#]" onfocus="this.value = ''; this.form.smtp_password.disabled = false;" type="password" value="*#fakepass#*"] + br + input#smtp_password [disabled name="smtp_password[#]" type="password"] + input.button [type="submit" value="Save"] + input [name="{token_var}" type="hidden" value="{hash}"] + input [name="{session_var}" type="hidden" value="{session_id}"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/mail_test.txt b/tests/Integration/Http/Snapshot/snapshots/admin/mail_test.txt new file mode 100644 index 00000000000..b731dff32f5 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/mail_test.txt @@ -0,0 +1,89 @@ +status 200 +@ title +title + "Mail" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=mailqueue;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Mail" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=mailqueue;sa=test;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Send Test" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + "Mail" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "From this page you can configure your mail settings, as well as view and administer the current mail queue." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Mail Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Mail Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=mailqueue;sa=browse;{session_var}={session_id}"] + "Browse Queue" + li + a [href="{boardurl}/index.php?action=admin;area=mailqueue;sa=settings;{session_var}={session_id}"] + "Settings" + li + a.active [href="{boardurl}/index.php?action=admin;area=mailqueue;sa=test;{session_var}={session_id}"] + "Send Test" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + form#admin_form_wrapper [action="{boardurl}/index.php?action=admin;area=mailqueue;sa=test;save" method="post"] + div.cat_bar + h3.catbg + "Email Test" + div.windowbg + dl#post_header + dt + label#caption_subject [for="subject"] + "Subject" + dd + input#subject [maxlength="#" name="subject" size="#" type="text"] + textarea.editor [cols="#" name="message" rows="#"] + dl#post_footer + dd + input.button [type="submit" value="Send message"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/maintain_database.txt b/tests/Integration/Http/Snapshot/snapshots/admin/maintain_database.txt new file mode 100644 index 00000000000..6407c81ba0b --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/maintain_database.txt @@ -0,0 +1,97 @@ +status 200 +@ title +title + "Forum Maintenance" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=maintain;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Forum Maintenance" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=database;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Database" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + "Forum Maintenance" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Optimize tables, make backups, check for errors, and prune boards with these tools." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Forum Maintenance Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Forum Maintenance Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=routine;{session_var}={session_id}"] + "Routine" + li + a.active [href="{boardurl}/index.php?action=admin;area=maintain;sa=database;{session_var}={session_id}"] + "Database" + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=members;{session_var}={session_id}"] + "Members" + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=topics;{session_var}={session_id}"] + "Topics" + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=hooks;{session_var}={session_id}"] + "Integration Hooks" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + div#manage_maintenance + form.option_form.windowbg [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=maintain;sa=database" method="post"] + label + input [name="activity" type="radio" value="optimize"] + strong + "Optimize all tables" + p + "This task allows you to optimize all tables. This will get rid of overhead, effectively making the tables smaller in size and your forum faster." + label + input [name="activity" type="radio" value="convertentities"] + strong + "Convert HTML-entities to UTF-# character(s)" + p + "This function will convert all characters that are stored in the database as HTML-entities to UTF-# character(s). This is especially useful when you have just converted your forum from a character set like ISO-#-# while(s) non-latin characters were used on the forum. The browser then sends all characters as HTML-entities. For example, the HTML-entity &##; represents the greek letter α (alpha). Converting entities to UTF-# will(s) improve searching and sorting of text and reduce storage size." + input.button [type="submit" value="Run task now"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/maintain_members.txt b/tests/Integration/Http/Snapshot/snapshots/admin/maintain_members.txt new file mode 100644 index 00000000000..14d2e8698c7 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/maintain_members.txt @@ -0,0 +1,199 @@ +status 200 +@ title +title + "Forum Maintenance" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=maintain;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Forum Maintenance" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=members;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Members" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + "Forum Maintenance" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Optimize tables, make backups, check for errors, and prune boards with these tools." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Forum Maintenance Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Forum Maintenance Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=routine;{session_var}={session_id}"] + "Routine" + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=database;{session_var}={session_id}"] + "Database" + li + a.active [href="{boardurl}/index.php?action=admin;area=maintain;sa=members;{session_var}={session_id}"] + "Members" + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=topics;{session_var}={session_id}"] + "Topics" + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=hooks;{session_var}={session_id}"] + "Integration Hooks" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + script + | var warningMessage = ''; var membersSwap = false; function swapMembers() { membersSwap = !membersSwap; var membersForm = document.getElementById('membersForm'); $("#membersPanel").slideToggle(#); document.getElementById("membersIcon").src = smf_images_url + (membersSwap ? "/selected_open.png" : "/selected.png"); setInnerHTML(document.getElementById("membersText"), membersSwap ? "Selected Groups" : "All Membergroups"); for (var i = #; i < membersForm.length; i++) { if (membersForm.elements[i].type.toLowerCase() == "checkbox") membersForm.elements[i].checked = !membersSwap; } } function checkAttributeValidity() { origText = 'Are you sure you want to attribute all guest posts with %type% of "%find%" to member "%member_to%"?'; valid = true; // Do all the fields! if (!document.getElementById('to').value) valid = false; warningMessage = origText.replace(/%member_to%/, document.getElementById('to').value); if (document.getElementById('type_email').checked) { if (!document.getElementById('from_email').value) valid = false; warningMessage = warningMessage.replace(/%type%/, 'an email address').replace(/%find%/, document.getElementById('from_email').value); } else { if (!document.getElementById('from_name').value) valid = false; warningMessage = warningMessage.replace(/%type%/, 'a username').replace(/%find%/, document.getElementById('from_name').value); } document.getElementById('do_attribute').disabled = valid ? '' : 'disabled'; setTimeout("checkAttributeValidity();", #); return valid; } setTimeout("checkAttributeValidity();", #); + div#manage_maintenance + div.cat_bar + h3.catbg + "Reattribute User Posts" + div.windowbg + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=maintain;sa=members;activity=reattribute" method="post"] + p + strong + "Attribute posts made with" + dl.settings + dt + label [for="type_email"] + input#type_email [checked name="type" type="radio" value="email"] + "Email address of" + dd + input#from_email [name="from_email" onclick="document.getElementById('type_email').checked = 'checked'; document.getElementById('from_name').value = '';" type="text" value] + dt + label [for="type_name"] + input#type_name [name="type" type="radio" value="name"] + "Username of" + dd + input#from_name [name="from_name" onclick="document.getElementById('type_name').checked = 'checked'; document.getElementById('from_email').value = '';" type="text" value] + dl.settings + dt + label [for="to"] + strong + "Attribute posts to member" + dd + input#to [name="to" type="text" value] + p.maintain_members + input#posts [checked name="posts" type="checkbox"] + label [for="posts"] + "Add posts to users post count" + input#do_attribute.button [onclick="if (!checkAttributeValidity()) return false;\n\t\t\t\treturn confirm(warningMessage);" type="submit" value="Reattribute"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=maintenance_members" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Remove Inactive Members" + div.windowbg + form#membersForm [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=maintain;sa=members;activity=purgeinactive" method="post"] + div.padding + a#membersLink + "Remove all members who have not" + select [name="del_type"] + option [selected value="activated"] + "activated their account" + option [value="logged"] + "logged in" + "for" + input [name="maxdays" size="#" type="number" value="#"] + "days." + div.padding + label [for="anonymize"] + input#anonymize [name="anonymize" type="checkbox" value="#"] + "Anonymize personally identifying information when account is deleted" + div.padding + a [href="#membersLink" onclick="swapMembers();"] + img#membersIcon [alt="+" src="{boardurl}/Themes/default/images/selected.png"] + a#membersText [href="#membersLink" onclick="swapMembers();" style="font-weight: bold;"] + "All Membergroups" + div#membersPanel [style="display: none;"] + label [for="groups#"] + input#groups# [checked name="groups[#]" type="checkbox"] + "Ungrouped Members" + span.smalltext + "(Members with no assigned groups)" + br + label [for="groups#"] + input#groups# [checked name="groups[#]" type="checkbox"] + "Administrator" + br + label [for="groups#"] + input#groups# [checked name="groups[#]" type="checkbox"] + "Global Moderator" + br + label [for="groups#"] + input#groups# [checked name="groups[#]" type="checkbox"] + "Moderator" + br + label [for="groups#"] + input#groups# [checked name="groups[#]" type="checkbox"] + "Newbie" + br + label [for="groups#"] + input#groups# [checked name="groups[#]" type="checkbox"] + "Jr. Member" + br + label [for="groups#"] + input#groups# [checked name="groups[#]" type="checkbox"] + "Full Member" + br + label [for="groups#"] + input#groups# [checked name="groups[#]" type="checkbox"] + "Sr. Member" + br + label [for="groups#"] + input#groups# [checked name="groups[#]" type="checkbox"] + "Hero Member" + br + input.button.you_sure [data-confirm="Are you sure you really want to delete these member accounts?-n-This cannot be undone!" type="submit" value="Remove now"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] + div.cat_bar + h3.catbg + "Recount User Posts" + div.windowbg + form#membersRecountForm [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=maintain;sa=members;activity=recountposts" method="post"] + p + "Run this maintenance task to update your users total post count. It will recount all (countable) posts made by each user and then update their profile post count totals" + input.button [type="submit" value="Run task now"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] + script + | var oAttributeMemberSuggest = new smc_AutoSuggest({ sSelf: 'oAttributeMemberSuggest', sSessionId: smf_session_id, sSessionVar: smf_session_var, sSuggestId: 'attributeMember', sControlId: 'to', sSearchType: 'member', sTextDeleteItem: 'Delete Item', bItemList: false }); diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/maintain_routine.txt b/tests/Integration/Http/Snapshot/snapshots/admin/maintain_routine.txt new file mode 100644 index 00000000000..86cf6f4fa98 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/maintain_routine.txt @@ -0,0 +1,121 @@ +status 200 +@ title +title + "Forum Maintenance" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=maintain;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Forum Maintenance" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=routine;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Routine" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + "Forum Maintenance" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Optimize tables, make backups, check for errors, and prune boards with these tools." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Forum Maintenance Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Forum Maintenance Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a.active [href="{boardurl}/index.php?action=admin;area=maintain;sa=routine;{session_var}={session_id}"] + "Routine" + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=database;{session_var}={session_id}"] + "Database" + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=members;{session_var}={session_id}"] + "Members" + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=topics;{session_var}={session_id}"] + "Topics" + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=hooks;{session_var}={session_id}"] + "Integration Hooks" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + div#manage_maintenance + form.option_form.windowbg [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=maintain" method="post"] + label + input [name="activity" type="radio" value="version"] + strong + "Check all files against current versions" + p + "This maintenance task allows you to do a detailed version check of all forum files against the official list of latest versions." + label + input [name="activity" type="radio" value="repair"] + strong + "Find and repair any errors" + p + "If, for example, posts or topics are missing after a server crash, this function may help in finding them again." + label + input [name="activity" type="radio" value="recount"] + strong + "Recount all forum totals and statistics" + p + "Should the total replies of a topic or the number of PMs in your inbox be incorrect: this function will recount all saved counts and statistics for you." + label + input [name="activity" type="radio" value="rebuild_settings"] + strong + "Rebuild Settings.php" + p + "This task reconstructs your Settings.php file. It does not change the values stored in the file. Instead, it cleans up and reformats your Settings.php file to a pristine version." + label + input [name="activity" type="radio" value="logs"] + strong + "Empty out unimportant logs" + p + "This function will empty out all unimportant logs. This should be avoided unless something is wrong, but it does not hurt anything." + label + input [name="activity" type="radio" value="cleancache"] + strong + "Empty SMF’s cache" + p + "This function will empty out the cache should you need it to be cleared." + input.button [type="submit" value="Run task now"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/maintain_topics.txt b/tests/Integration/Http/Snapshot/snapshots/admin/maintain_topics.txt new file mode 100644 index 00000000000..37f444fbfcb --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/maintain_topics.txt @@ -0,0 +1,182 @@ +status 200 +@ title +title + "Forum Maintenance" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=maintain;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Forum Maintenance" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=topics;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Topics" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + "Forum Maintenance" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Optimize tables, make backups, check for errors, and prune boards with these tools." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Forum Maintenance Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Forum Maintenance Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=routine;{session_var}={session_id}"] + "Routine" + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=database;{session_var}={session_id}"] + "Database" + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=members;{session_var}={session_id}"] + "Members" + li + a.active [href="{boardurl}/index.php?action=admin;area=maintain;sa=topics;{session_var}={session_id}"] + "Topics" + li + a [href="{boardurl}/index.php?action=admin;area=maintain;sa=hooks;{session_var}={session_id}"] + "Integration Hooks" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + script + | var rotSwap = false; function swapRot() { rotSwap = !rotSwap; // Toggle icon document.getElementById("rotIcon").src = smf_images_url + (rotSwap ? "/selected_open.png" : "/selected.png"); setInnerHTML(document.getElementById("rotText"), rotSwap ? 'Specific boards (click to select all)' : 'All boards (click to select specific boards)'); // Toggle panel $("#rotPanel").slideToggle(#); // Toggle checkboxes var rotPanel = document.getElementById('rotPanel'); var oBoardCheckBoxes = rotPanel.getElementsByTagName('input'); for (var i = #; i < oBoardCheckBoxes.length; i++) { if (oBoardCheckBoxes[i].type.toLowerCase() == "checkbox") oBoardCheckBoxes[i].checked = !rotSwap; } } + div#manage_maintenance + div.cat_bar + h3.catbg + "Remove old posts" + div.windowbg + div.flow_auto + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=maintain;sa=topics;activity=pruneold" method="post"] + p + a#rotLink + "Remove all topics not posted in for" + input [name="maxdays" size="#" type="number" value="#"] + "days, which are:" + p + label [for="delete_type_nothing"] + input#delete_type_nothing [name="delete_type" type="radio" value="nothing"] + "Any sort of topic." + br + label [for="delete_type_moved"] + input#delete_type_moved [checked name="delete_type" type="radio" value="moved"] + "Moved/merged topic notices." + br + label [for="delete_type_locked"] + input#delete_type_locked [name="delete_type" type="radio" value="locked"] + "Locked." + br + p + label [for="delete_old_not_sticky"] + input#delete_old_not_sticky [checked name="delete_old_not_sticky" type="checkbox"] + "But do not count stickied topics." + br + p + a [href="#rotLink" onclick="swapRot();"] + img#rotIcon [alt="+" src="{boardurl}/Themes/default/images/selected.png"] + a#rotText [href="#rotLink" onclick="swapRot();" style="font-weight: bold;"] + "All boards (click to select specific boards)" + div#rotPanel.flow_hidden [style="display: none;"] + snapshot-ignored [selector="#rotPanel > div"] + input.button.you_sure [data-confirm="Are you really sure you want to delete old posts now?-n-This cannot be undone!" type="submit" value="Remove now"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] + div.cat_bar + h3.catbg + "Remove old drafts" + div.windowbg + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=maintain;sa=topics;activity=olddrafts" method="post"] + p + "Remove all drafts older than" + input [name="draftdays" size="#" type="number" value="#"] + "days." + input.button.you_sure [data-confirm="Are you really sure you want to delete old drafts now?-n-This cannot be undone!" type="submit" value="Remove now"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] + div.cat_bar + h3.catbg + "Move Topics" + div.windowbg + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=maintain;sa=topics;activity=massmove" method="post"] + p + "Move topics from" + select#id_board_from [name="id_board_from"] + option [disabled selected] + "(Select Board)" + optgroup [label="Snapshot fixtures"] + option [value="#"] + "=> Snapshot board" + option [value="#"] + "===> Snapshot child one" + option [value="#"] + "===> Snapshot child two" + option [value="#"] + "=> Snapshot empty board" + "to" + select#id_board_to [name="id_board_to"] + option [disabled selected] + "(Select Board)" + optgroup [label="Snapshot fixtures"] + option [value="#"] + "=> Snapshot board" + option [value="#"] + "===> Snapshot child one" + option [value="#"] + "===> Snapshot child two" + option [value="#"] + "=> Snapshot empty board" + p + "Move topics not posted in for" + input [name="maxdays" size="#" type="number" value="#"] + "days. (Enter # to(s) move all topics)" + p + label [for="move_type_locked"] + input#move_type_locked [checked name="move_type_locked" type="checkbox"] + "Locked topics" + br + label [for="move_type_sticky"] + input#move_type_sticky [name="move_type_sticky" type="checkbox"] + "Sticky topics" + br + input.button [onclick="if (document.getElementById('id_board_from').options[document.getElementById('id_board_from').selectedIndex].disabled || document.getElementById('id_board_from').options[document.getElementById('id_board_to').selectedIndex].disabled) return false; var confirmText = 'Are you sure you want to move ALL the topics from \"%board_from%\" to \"%board_to%\"?'; return confirm(confirmText.replace(/%board_from%/, document.getElementById('id_board_from').options[document.getElementById('id_board_from').selectedIndex].text.replace(/^=+> /, '')).replace(/%board_to%/, document.getElementById('id_board_to').options[document.getElementById('id_board_to').selectedIndex].text.replace(/^=+> /, '')));" type="submit" value="Move now"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards.txt b/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards.txt new file mode 100644 index 00000000000..352c408d0b2 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards.txt @@ -0,0 +1,108 @@ +status 200 +@ title +title + "Manage Boards and Categories" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageboards;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Boards and Categories" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=main;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Modify Boards" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=manage_boards" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Manage Boards and Categories" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Edit your categories and boards here. List multiple moderators as" + em + "\"username\", \"username\"" + ". (these must be usernames and *not* display names)" + br + "To create a new board, click the Add Board button. To make the new board a sub-board of a current board, select \"Sub-board of...\" from the Order drop down menu when creating the board." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Manage Boards and Categories Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Manage Boards and Categories Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a.active [href="{boardurl}/index.php?action=admin;area=manageboards;sa=main;{session_var}={session_id}"] + "Modify Boards" + li + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=newcat;{session_var}={session_id}"] + "Create new category" + li + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=settings;{session_var}={session_id}"] + "Settings" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + div#manage_boards + div.cat_bar + h3.catbg + "Modify Boards" + div.windowbg + div.sub_bar + h3.subbg + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=cat;cat=#"] + "Snapshot fixtures" + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=cat;cat=#"] + "(modify)" + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=manageboards;sa=newboard;cat=#" method="post"] + ul#category_#.nolist + li.windowbg [style="padding-inline-start: #px;"] + span.floatleft + a [href="{boardurl}/index.php?board=#.#"] + "{board}" + span.floatright + a.button [href="{boardurl}/index.php?action=admin;area=permissions;sa=index;pid=#;{session_var}={session_id}"] + "permissions" + a.button [href="{boardurl}/index.php?action=admin;area=manageboards;move=#"] + "move" + a.button [href="{boardurl}/index.php?action=admin;area=manageboards;sa=board;boardid=#"] + "modify" + br [style="clear: right;"] + input.button [type="submit" value="Add Board"] + input [name="{session_var}" type="hidden" value="{session_id}"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_edit_board.txt b/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_edit_board.txt new file mode 100644 index 00000000000..ba04c34ecb7 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_edit_board.txt @@ -0,0 +1,280 @@ +status 200 +@ title +title + "Modify Boards" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageboards;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Boards and Categories" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=main;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Modify Boards" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=manage_boards" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Manage Boards and Categories" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Edit your categories and boards here. List multiple moderators as" + em + "\"username\", \"username\"" + ". (these must be usernames and *not* display names)" + br + "To create a new board, click the Add Board button. To make the new board a sub-board of a current board, select \"Sub-board of...\" from the Order drop down menu when creating the board." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Manage Boards and Categories Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Manage Boards and Categories Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a.active [href="{boardurl}/index.php?action=admin;area=manageboards;sa=main;{session_var}={session_id}"] + "Modify Boards" + li + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=newcat;{session_var}={session_id}"] + "Create new category" + li + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=settings;{session_var}={session_id}"] + "Settings" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + div#manage_boards + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=manageboards;sa=board#" method="post"] + input [name="boardid" type="hidden" value="#"] + div.cat_bar + h3.catbg + "Modify Boards" + div.windowbg + dl.settings + dt + strong + "Category" + dd + select [name="new_cat" onchange="if (this.form.order) {this.form.order.disabled = this.options[this.selectedIndex].value != #; this.form.board_order.disabled = this.options[this.selectedIndex].value != # || this.form.order.options[this.form.order.selectedIndex].value == '';}"] + option [selected value="#"] + "Snapshot fixtures" + dt + strong + "Order" + dd + select#order [name="placement" onchange="this.form.board_order.disabled = this.options[this.selectedIndex].value == '';"] + option [value] + "(Unchanged)" + option [value="after"] + "After ..." + option [value="child"] + "Sub-board of ..." + option [value="before"] + "Before ..." + select#board_order [disabled name="board_order"] + option [value] + "(Unchanged)" + option [selected value="#"] + "(Current Position)" + option [value="#"] + "- Snapshot child one" + option [value="#"] + "- Snapshot child two" + option [value="#"] + "Snapshot empty board" + dt + strong + "Full name" + br + span.smalltext + "This is the name that will be displayed." + dd + input [name="board_name" size="#" type="text" value="Snapshot board"] + dt + strong + "Description" + br + span.smalltext + "A short description of your board. HTML is not allowed, you can use the following BBC tags: abbr, anchor, b, br, center, color, font, hr, i, img, iurl, left, li, list, ltr, pre, right, s, sub, sup, table, td, tr, u, url" + dd + textarea [cols="#" name="desc" rows="#"] + "Topics, replies and a poll for the snapshot tests." + dt + strong + "Permission Profile" + br + span.smalltext + "Which" + a [href="{boardurl}/index.php?action=admin;area=permissions;sa=profiles;{session_var}={session_id}"] + "permission set" + "the board should use." + dd + select [name="profile"] + option [selected value="#"] + "Default" + option [value="#"] + "No Polls" + option [value="#"] + "Read Only" + option [value="#"] + "Reply Only" + dt + strong + "Allowed Groups" + br + span.smalltext + "Groups allowed to access this board." + br + em + "Note: if the member is in any group or post group checked, they will have access to this board." + dd + label [for="groups_-#"] + input#groups_-# [checked name="groups[-#]" type="checkbox" value="allow"] + span + "Guests" + br + label [for="groups_#"] + input#groups_# [checked name="groups[#]" type="checkbox" value="allow"] + span.regular_members [title="This group contains all members that have no primary group set."] + "Regular Members" + br + label [for="groups_#"] + input#groups_# [name="groups[#]" type="checkbox" value="allow"] + span + "Global Moderator" + br + label [for="groups_#"] + input#groups_# [name="groups[#]" type="checkbox" value="allow"] + span.post_group [title="This group is a post count based group."] + "Newbie" + br + label [for="groups_#"] + input#groups_# [name="groups[#]" type="checkbox" value="allow"] + span.post_group [title="This group is a post count based group."] + "Jr. Member" + br + label [for="groups_#"] + input#groups_# [name="groups[#]" type="checkbox" value="allow"] + span.post_group [title="This group is a post count based group."] + "Full Member" + br + label [for="groups_#"] + input#groups_# [name="groups[#]" type="checkbox" value="allow"] + span.post_group [title="This group is a post count based group."] + "Sr. Member" + br + label [for="groups_#"] + input#groups_# [name="groups[#]" type="checkbox" value="allow"] + span.post_group [title="This group is a post count based group."] + "Hero Member" + br + span.select_all_box + em + "Select all" + input [onclick="invertAll(this, this.form, 'groups[');" type="checkbox"] + br + dt + strong + "Moderators" + br + span.smalltext + "Additional members to have moderation privileges on this board. Note that administrators do not have to be listed here." + br + dd + input#moderators [name="moderators" size="#" type="text" value] + div#moderator_container + dt + strong + "Moderator Groups" + br + span.smalltext + "Groups whose members have moderation privileges on this board. Note that this is limited to groups which are not post-based and not \"hidden\"." + br + dd + input#moderator_groups [name="moderator_groups" size="#" type="text" value] + div#moderator_group_container + script + | $(document).ready(function () { $(".select_all_box").each(function () { $(this).removeClass('select_all_box'); }); }); + hr + div#count_posts_div + dl.settings + dt + strong + "Count posts" + br + span.smalltext + "Makes new replies and topics raise members’ post counts." + br + dd + input [checked name="count" type="checkbox"] + div#board_theme_div + dl.settings + dt + strong + "Board Theme" + br + span.smalltext + "This allows you to change the look of your forum only inside this board." + br + dd + select#boardtheme [name="boardtheme" onchange="refreshOptions();"] + option [selected value="#"] + "(overall forum default.)" + option [value="#"] + "SMF Default Theme - Curve#" + div#override_theme_div + dl.settings + dt + strong + "Override Member’s Theme" + br + span.smalltext + "Use this board’s theme even if the member did not choose to use the defaults." + br + dd + input [name="override_theme" type="checkbox"] + input [name="rid" type="hidden" value="boards"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] + input.button [name="edit" onclick="return !isEmptyText(this.form.board_name);" type="submit" value="Modify"] + input.button.you_sure [data-confirm="Do you really want to delete this board?" name="delete" type="submit" value="Delete Board"] + script + | var oModeratorSuggest = new smc_AutoSuggest({ sSessionId: smf_session_id, sSessionVar: smf_session_var, sSuggestId: 'moderators', sControlId: 'moderators', sSearchType: 'member', bItemList: true, sPostName: 'moderator_list', sURLMask: 'action=profile;u=%item_id%', sTextDeleteItem: 'Delete Item', sItemListContainerId: 'moderator_container', aListItems: [ ] }); var oModeratorGroupSuggest = new smc_AutoSuggest({ sSessionId: smf_session_id, sSessionVar: smf_session_var, sSuggestId: 'moderator_groups', sControlId: 'moderator_groups', sSearchType: 'membergroups', bItemList: true, sPostName: 'moderator_group_list', sURLMask: 'action=groups;sa=members;group=%item_id%', sTextDeleteItem: 'Delete Item', sItemListContainerId: 'moderator_group_container', aListItems: [ ] }); + script + | function refreshOptions() { var redirect = document.getElementById("redirect_enable"); var redirectEnabled = redirect ? redirect.checked : false; var nonDefaultTheme = document.getElementById("boardtheme").value == # ? false : true; // What to show? if(redirectEnabled || !nonDefaultTheme) document.getElementById("override_theme_div").classList.add('hidden'); else document.getElementById("override_theme_div").classList.remove('hidden'); if(redirectEnabled) { document.getElementById("board_theme_div").classList.add('hidden'); document.getElementById("count_posts_div").classList.add('hidden'); } else { document.getElementById("board_theme_div").classList.remove('hidden'); document.getElementById("count_posts_div").classList.remove('hidden'); } } refreshOptions(); diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_edit_category.txt b/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_edit_category.txt new file mode 100644 index 00000000000..f66a0890874 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_edit_category.txt @@ -0,0 +1,123 @@ +status 200 +@ title +title + "Edit Category" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageboards;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Boards and Categories" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=main;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Modify Boards" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=manage_boards" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Manage Boards and Categories" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Edit your categories and boards here. List multiple moderators as" + em + "\"username\", \"username\"" + ". (these must be usernames and *not* display names)" + br + "To create a new board, click the Add Board button. To make the new board a sub-board of a current board, select \"Sub-board of...\" from the Order drop down menu when creating the board." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Manage Boards and Categories Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Manage Boards and Categories Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a.active [href="{boardurl}/index.php?action=admin;area=manageboards;sa=main;{session_var}={session_id}"] + "Modify Boards" + li + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=newcat;{session_var}={session_id}"] + "Create new category" + li + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=settings;{session_var}={session_id}"] + "Settings" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + div#manage_boards + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=manageboards;sa=cat#" method="post"] + input [name="cat" type="hidden" value="#"] + div.cat_bar + h3.catbg + "Edit Category" + div.windowbg + dl.settings + dt + strong + "Order" + dd + select [name="cat_order"] + dt + strong + "Full name" + br + span.smalltext + "This is the name that will be displayed." + dd + input [name="cat_name" size="#" type="text" value="Snapshot fixtures"] + dt + strong + "Description" + br + span.smalltext + "A short description of your category. HTML is not allowed, you can use the following BBC tags: abbr, anchor, b, br, center, color, font, hr, i, img, iurl, left, li, list, ltr, pre, right, s, sub, sup, table, td, tr, u, url" + dd + textarea [cols="#" name="cat_desc" rows="#"] + "Content for the template snapshot tests." + dt + strong + "Collapsible" + br + span.smalltext + "Allow users to collapse this category" + dd + input [checked name="collapse" type="checkbox"] + input.button [name="edit" onclick="return !isEmptyText(this.form.cat_name);" type="submit" value="Modify"] + input.button.you_sure [data-confirm="Do you really want to delete this category?" name="delete" type="submit" value="Delete Category"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_move.txt b/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_move.txt new file mode 100644 index 00000000000..d5630aa3b61 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_move.txt @@ -0,0 +1,171 @@ +status 200 +@ title +title + "Manage Boards and Categories" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageboards;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Boards and Categories" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=main;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Modify Boards" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=manage_boards" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Manage Boards and Categories" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Edit your categories and boards here. List multiple moderators as" + em + "\"username\", \"username\"" + ". (these must be usernames and *not* display names)" + br + "To create a new board, click the Add Board button. To make the new board a sub-board of a current board, select \"Sub-board of...\" from the Order drop down menu when creating the board." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Manage Boards and Categories Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Manage Boards and Categories Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a.active [href="{boardurl}/index.php?action=admin;area=manageboards;sa=main;{session_var}={session_id}"] + "Modify Boards" + li + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=newcat;{session_var}={session_id}"] + "Create new category" + li + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=settings;{session_var}={session_id}"] + "Settings" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + div#manage_boards + div.cat_bar + h3.catbg + "Modify Boards" + div.windowbg + div.noticebox + "Select destination for board \"" + strong + "{board}" + "\" [" + a [href="{boardurl}/index.php?action=admin;area=manageboards"] + "Cancel moving" + "]" + div.sub_bar + h3.subbg + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=cat;cat=#"] + "Snapshot fixtures" + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=cat;cat=#"] + "(modify)" + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=manageboards;sa=newboard;cat=#" method="post"] + ul#category_#.nolist + li + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=move;src_board=#;target_board=#;move_to=before;{session_var}={session_id};{token}" title="Before {board}"] + span.main_icons.select_above + li.windowbg [style="padding-inline-start: #px;"] + span.floatleft + a [href="{boardurl}/index.php?board=#.#"] + "{board}" + span.floatright + a.button [href="{boardurl}/index.php?action=admin;area=permissions;sa=index;pid=#;{session_var}={session_id}"] + "permissions" + a.button [href="{boardurl}/index.php?action=admin;area=manageboards;move=#"] + "move" + a.button [href="{boardurl}/index.php?action=admin;area=manageboards;sa=board;boardid=#"] + "modify" + br [style="clear: right;"] + li.windowbg [style="padding-inline-start: #px;"] + a.move_links [href="{boardurl}/index.php?action=admin;area=manageboards;sa=move;src_board=#;target_board=#;move_to=child;{session_var}={session_id};{token}" title="Sub-board of {board}"] + span.main_icons.select_here [title="Sub-board of {board}"] + li.windowbg [style="padding-inline-start: #px;"] + span.floatleft + a [href="{boardurl}/index.php?board=#.#"] + "{board}" + span.floatright + a.button [href="{boardurl}/index.php?action=admin;area=permissions;sa=index;pid=#;{session_var}={session_id}"] + "permissions" + a.button [href="{boardurl}/index.php?action=admin;area=manageboards;move=#"] + "move" + a.button [href="{boardurl}/index.php?action=admin;area=manageboards;sa=board;boardid=#"] + "modify" + br [style="clear: right;"] + li.windowbg [style="padding-inline-start: #px;"] + a.move_links [href="{boardurl}/index.php?action=admin;area=manageboards;sa=move;src_board=#;target_board=#;move_to=after;{session_var}={session_id};{token}" title="After {board}"] + span.main_icons.select_above [title="After {board}"] + a.move_links [href="{boardurl}/index.php?action=admin;area=manageboards;sa=move;src_board=#;target_board=#;move_to=child;{session_var}={session_id};{token}" title="Sub-board of {board}"] + span.main_icons.select_here [title="Sub-board of {board}"] + li.windowbg [style="padding-inline-start: #px;"] + span.floatleft + a.red [href="{boardurl}/index.php?board=#.#"] + "{board}" + span.floatright + a.button [href="{boardurl}/index.php?action=admin;area=permissions;sa=index;pid=#;{session_var}={session_id}"] + "permissions" + a.button [href="{boardurl}/index.php?action=admin;area=manageboards;move=#"] + "move" + a.button [href="{boardurl}/index.php?action=admin;area=manageboards;sa=board;boardid=#"] + "modify" + br [style="clear: right;"] + li.windowbg [style="padding-inline-start: #px;"] + a.move_links [href="{boardurl}/index.php?action=admin;area=manageboards;sa=move;src_board=#;target_board=#;move_to=after;{session_var}={session_id};{token}" title="After {board}"] + span.main_icons.select_below [title="After {board}"] + li.windowbg [style="padding-inline-start: #px;"] + span.floatleft + a [href="{boardurl}/index.php?board=#.#"] + "{board}" + span.floatright + a.button [href="{boardurl}/index.php?action=admin;area=permissions;sa=index;pid=#;{session_var}={session_id}"] + "permissions" + a.button [href="{boardurl}/index.php?action=admin;area=manageboards;move=#"] + "move" + a.button [href="{boardurl}/index.php?action=admin;area=manageboards;sa=board;boardid=#"] + "modify" + br [style="clear: right;"] + li.windowbg [style="padding-inline-start: #px;"] + a.move_links [href="{boardurl}/index.php?action=admin;area=manageboards;sa=move;src_board=#;target_board=#;move_to=after;{session_var}={session_id};{token}" title="After {board}"] + span.main_icons.select_below [title="After {board}"] + a.move_links [href="{boardurl}/index.php?action=admin;area=manageboards;sa=move;src_board=#;target_board=#;move_to=child;{session_var}={session_id};{token}" title="Sub-board of {board}"] + span.main_icons.select_here [title="Sub-board of {board}"] + input.button [type="submit" value="Add Board"] + input [name="{session_var}" type="hidden" value="{session_id}"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_new_board.txt b/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_new_board.txt new file mode 100644 index 00000000000..c2aeea7eaeb --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_new_board.txt @@ -0,0 +1,299 @@ +status 200 +@ title +title + "Modify Boards" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageboards;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Boards and Categories" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=main;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Modify Boards" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=manage_boards" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Manage Boards and Categories" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Edit your categories and boards here. List multiple moderators as" + em + "\"username\", \"username\"" + ". (these must be usernames and *not* display names)" + br + "To create a new board, click the Add Board button. To make the new board a sub-board of a current board, select \"Sub-board of...\" from the Order drop down menu when creating the board." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Manage Boards and Categories Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Manage Boards and Categories Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a.active [href="{boardurl}/index.php?action=admin;area=manageboards;sa=main;{session_var}={session_id}"] + "Modify Boards" + li + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=newcat;{session_var}={session_id}"] + "Create new category" + li + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=settings;{session_var}={session_id}"] + "Settings" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + div#manage_boards + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=manageboards;sa=board#" method="post"] + input [name="boardid" type="hidden" value="#"] + div.cat_bar + h3.catbg + "New Board" + div.windowbg + dl.settings + dt + strong + "Category" + dd + select [name="new_cat" onchange="if (this.form.order) {this.form.order.disabled = this.options[this.selectedIndex].value != #; this.form.board_order.disabled = this.options[this.selectedIndex].value != # || this.form.order.options[this.form.order.selectedIndex].value == '';}"] + option [selected value="#"] + "Snapshot fixtures" + dt + strong + "Order" + dd + select#order [name="placement" onchange="this.form.board_order.disabled = this.options[this.selectedIndex].value == '';"] + option [value="after"] + "After ..." + option [value="child"] + "Sub-board of ..." + option [value="before"] + "Before ..." + select#board_order [name="board_order"] + option [value="#"] + "Snapshot board" + option [value="#"] + "- Snapshot child one" + option [value="#"] + "- Snapshot child two" + option [value="#"] + "Snapshot empty board" + dt + strong + "Full name" + br + span.smalltext + "This is the name that will be displayed." + dd + input [name="board_name" size="#" type="text" value="New Board"] + dt + strong + "Description" + br + span.smalltext + "A short description of your board. HTML is not allowed, you can use the following BBC tags: abbr, anchor, b, br, center, color, font, hr, i, img, iurl, left, li, list, ltr, pre, right, s, sub, sup, table, td, tr, u, url" + dd + textarea [cols="#" name="desc" rows="#"] + dt + strong + "Permission Profile" + br + span.smalltext + "Which" + a [href="{boardurl}/index.php?action=admin;area=permissions;sa=profiles;{session_var}={session_id}"] + "permission set" + "the board should use." + dd + select [name="profile"] + option [selected value="#"] + "Default" + option [value="#"] + "No Polls" + option [value="#"] + "Read Only" + option [value="#"] + "Reply Only" + option [value="-#"] + "[Inherit from parent board]" + dt + strong + "Allowed Groups" + br + span.smalltext + "Groups allowed to access this board." + br + em + "Note: if the member is in any group or post group checked, they will have access to this board." + dd + label [for="groups_-#"] + input#groups_-# [checked name="groups[-#]" type="checkbox" value="allow"] + span + "Guests" + br + label [for="groups_#"] + input#groups_# [checked name="groups[#]" type="checkbox" value="allow"] + span.regular_members [title="This group contains all members that have no primary group set."] + "Regular Members" + br + label [for="groups_#"] + input#groups_# [name="groups[#]" type="checkbox" value="allow"] + span + "Global Moderator" + br + label [for="groups_#"] + input#groups_# [name="groups[#]" type="checkbox" value="allow"] + span.post_group [title="This group is a post count based group."] + "Newbie" + br + label [for="groups_#"] + input#groups_# [name="groups[#]" type="checkbox" value="allow"] + span.post_group [title="This group is a post count based group."] + "Jr. Member" + br + label [for="groups_#"] + input#groups_# [name="groups[#]" type="checkbox" value="allow"] + span.post_group [title="This group is a post count based group."] + "Full Member" + br + label [for="groups_#"] + input#groups_# [name="groups[#]" type="checkbox" value="allow"] + span.post_group [title="This group is a post count based group."] + "Sr. Member" + br + label [for="groups_#"] + input#groups_# [name="groups[#]" type="checkbox" value="allow"] + span.post_group [title="This group is a post count based group."] + "Hero Member" + br + span.select_all_box + em + "Select all" + input [onclick="invertAll(this, this.form, 'groups[');" type="checkbox"] + br + dt + strong + "Moderators" + br + span.smalltext + "Additional members to have moderation privileges on this board. Note that administrators do not have to be listed here." + br + dd + input#moderators [name="moderators" size="#" type="text" value] + div#moderator_container + dt + strong + "Moderator Groups" + br + span.smalltext + "Groups whose members have moderation privileges on this board. Note that this is limited to groups which are not post-based and not \"hidden\"." + br + dd + input#moderator_groups [name="moderator_groups" size="#" type="text" value] + div#moderator_group_container + script + | $(document).ready(function () { $(".select_all_box").each(function () { $(this).removeClass('select_all_box'); }); }); + hr + dl.settings + dt + strong + "Redirect to a web address" + br + span.smalltext + "Enable this option to redirect anyone who clicks on this board to another web address." + br + dd + input#redirect_enable [name="redirect_enable" onclick="refreshOptions();" type="checkbox"] + div#redirect_address_div + dl.settings + dt + strong + "Address to redirect users to" + br + span.smalltext + "For example: \"https://www.simplemachines.org\"." + br + dd + input [name="redirect_address" size="#" type="text" value] + div#count_posts_div + dl.settings + dt + strong + "Count posts" + br + span.smalltext + "Makes new replies and topics raise members’ post counts." + br + dd + input [checked name="count" type="checkbox"] + div#board_theme_div + dl.settings + dt + strong + "Board Theme" + br + span.smalltext + "This allows you to change the look of your forum only inside this board." + br + dd + select#boardtheme [name="boardtheme" onchange="refreshOptions();"] + option [selected value="#"] + "(overall forum default.)" + option [value="#"] + "SMF Default Theme - Curve#" + div#override_theme_div + dl.settings + dt + strong + "Override Member’s Theme" + br + span.smalltext + "Use this board’s theme even if the member did not choose to use the defaults." + br + dd + input [name="override_theme" type="checkbox"] + input [name="rid" type="hidden" value="boards"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] + input [name="no_children" type="hidden" value="#"] + input [name="cur_cat" type="hidden" value="#"] + input.button [name="add" onclick="return !isEmptyText(this.form.board_name);" type="submit" value="Add Board"] + script + | var oModeratorSuggest = new smc_AutoSuggest({ sSessionId: smf_session_id, sSessionVar: smf_session_var, sSuggestId: 'moderators', sControlId: 'moderators', sSearchType: 'member', bItemList: true, sPostName: 'moderator_list', sURLMask: 'action=profile;u=%item_id%', sTextDeleteItem: 'Delete Item', sItemListContainerId: 'moderator_container', aListItems: [ ] }); var oModeratorGroupSuggest = new smc_AutoSuggest({ sSessionId: smf_session_id, sSessionVar: smf_session_var, sSuggestId: 'moderator_groups', sControlId: 'moderator_groups', sSearchType: 'membergroups', bItemList: true, sPostName: 'moderator_group_list', sURLMask: 'action=groups;sa=members;group=%item_id%', sTextDeleteItem: 'Delete Item', sItemListContainerId: 'moderator_group_container', aListItems: [ ] }); + script + | function refreshOptions() { var redirect = document.getElementById("redirect_enable"); var redirectEnabled = redirect ? redirect.checked : false; var nonDefaultTheme = document.getElementById("boardtheme").value == # ? false : true; // What to show? if(redirectEnabled || !nonDefaultTheme) document.getElementById("override_theme_div").classList.add('hidden'); else document.getElementById("override_theme_div").classList.remove('hidden'); if(redirectEnabled) { document.getElementById("board_theme_div").classList.add('hidden'); document.getElementById("count_posts_div").classList.add('hidden'); } else { document.getElementById("board_theme_div").classList.remove('hidden'); document.getElementById("count_posts_div").classList.remove('hidden'); } if(redirectEnabled) document.getElementById("redirect_address_div").classList.remove('hidden'); else document.getElementById("redirect_address_div").classList.add('hidden'); } refreshOptions(); diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_new_category.txt b/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_new_category.txt new file mode 100644 index 00000000000..83800551088 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_new_category.txt @@ -0,0 +1,124 @@ +status 200 +@ title +title + "New Category" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageboards;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Boards and Categories" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=newcat;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Create new category" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=manage_boards" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Manage Boards and Categories" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Edit your categories and boards here. List multiple moderators as" + em + "\"username\", \"username\"" + ". (these must be usernames and *not* display names)" + br + "To create a new board, click the Add Board button. To make the new board a sub-board of a current board, select \"Sub-board of...\" from the Order drop down menu when creating the board." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Manage Boards and Categories Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Manage Boards and Categories Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=main;{session_var}={session_id}"] + "Modify Boards" + li + a.active [href="{boardurl}/index.php?action=admin;area=manageboards;sa=newcat;{session_var}={session_id}"] + "Create new category" + li + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=settings;{session_var}={session_id}"] + "Settings" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + div#manage_boards + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=manageboards;sa=cat#" method="post"] + input [name="cat" type="hidden" value="#"] + div.cat_bar + h3.catbg + "New Category" + div.windowbg + dl.settings + dt + strong + "Order" + dd + select [name="cat_order"] + option [value="#"] + "After Snapshot fixtures" + dt + strong + "Full name" + br + span.smalltext + "This is the name that will be displayed." + dd + input [name="cat_name" size="#" type="text" value="New Category"] + dt + strong + "Description" + br + span.smalltext + "A short description of your category. HTML is not allowed, you can use the following BBC tags: abbr, anchor, b, br, center, color, font, hr, i, img, iurl, left, li, list, ltr, pre, right, s, sub, sup, table, td, tr, u, url" + dd + textarea [cols="#" name="cat_desc" rows="#"] + dt + strong + "Collapsible" + br + span.smalltext + "Allow users to collapse this category" + dd + input [checked name="collapse" type="checkbox"] + input.button [name="add" onclick="return !isEmptyText(this.form.cat_name);" type="submit" value="Add Category"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] + input [name="empty" type="hidden" value="#"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_settings.txt b/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_settings.txt new file mode 100644 index 00000000000..133a7588d7f --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/manage_boards_settings.txt @@ -0,0 +1,176 @@ +status 200 +@ title +title + "Manage Boards and Categories - Settings" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageboards;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Boards and Categories" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=settings;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Settings" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=manage_boards" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Manage Boards and Categories" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Edit general board and category settings." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Manage Boards and Categories Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Manage Boards and Categories Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=main;{session_var}={session_id}"] + "Modify Boards" + li + a [href="{boardurl}/index.php?action=admin;area=manageboards;sa=newcat;{session_var}={session_id}"] + "Create new category" + li + a.active [href="{boardurl}/index.php?action=admin;area=manageboards;sa=settings;{session_var}={session_id}"] + "Settings" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + form#admin_form_wrapper [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=manageboards;save;sa=settings" method="post" onsubmit="if(document.getElementById('recycle_enable').checked && document.getElementById('recycle_board').value == #) { return confirm('You have enabled the recycling of topics without specifying a board to place them in. This feature will not be enabled until you specify a board to place recycled topics into.');} return true;"] + div.cat_bar + h3.catbg + "Settings" + div.noup.windowbg + dl.settings + dt + a#setting_manage_boards_help [href="{boardurl}/index.php?action=helpadmin;help=manage_boards" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_manage_boards + span + label + "Membergroups allowed to manage boards and categories" + dd + fieldset#manage_boards + legend + a.toggle_up [href="javascript:void(#);" onclick="document.getElementById('manage_boards').style.display = 'none';document.getElementById('manage_boards_groups_link').style.display = 'block'; return false;"] + "Select permissions for each group" + ul + li + input [name="manage_boards[#]" type="checkbox" value="on"] + span + "Regular Members" + li + input [name="manage_boards[#]" type="checkbox" value="on"] + span + "Global Moderator" + li + input [onclick="invertAll(this, this.form, 'manage_boards[');" type="checkbox"] + span + "Select all" + a#manage_boards_groups_link.toggle_down [href="javascript:void(#);" onclick="document.getElementById('manage_boards').style.display = 'block'; document.getElementById('manage_boards_groups_link').style.display = 'none'; return false;" style="display: none;"] + "Select permissions for each group" + script + | document.getElementById("manage_boards").style.display = "none"; document.getElementById("manage_boards_groups_link").style.display = ""; + hr + dl.settings + dt + a#setting_boardindex_max_depth_help [href="{boardurl}/index.php?action=helpadmin;help=boardindex_max_depth" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_boardindex_max_depth + span + label [for="boardindex_max_depth"] + "Maximum depth of sub-boards to check for new posts, etc." + dd + input#boardindex_max_depth [max="#" min="#" name="boardindex_max_depth" size="#" step="#" type="number" value="#"] + dt + a#setting_countChildPosts_help [href="{boardurl}/index.php?action=helpadmin;help=countChildPosts" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_countChildPosts + span + label [for="countChildPosts"] + "Count sub-board’s posts in parent’s totals" + dd + input#countChildPosts [name="countChildPosts" type="checkbox" value="#"] + dt + a#setting_recycle_enable_help [href="{boardurl}/index.php?action=helpadmin;help=recycle_enable" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_recycle_enable + span + label [for="recycle_enable"] + "Enable recycling of deleted topics" + dd + input#recycle_enable [name="recycle_enable" onclick="document.getElementById('recycle_board').disabled = !this.checked;" type="checkbox" value="#"] + dt + a#setting_recycle_board + span + label [for="recycle_board"] + "Board for recycled topics" + dd + select#recycle_board [name="recycle_board" size="#"] + option [value="#"] + "Snapshot fixtures - Snapshot board" + option [value="#"] + "Snapshot fixtures - Snapshot child one" + option [value="#"] + "Snapshot fixtures - Snapshot child two" + option [value="#"] + "Snapshot fixtures - Snapshot empty board" + dt + a#setting_allow_ignore_boards_help [href="{boardurl}/index.php?action=helpadmin;help=allow_ignore_boards" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_allow_ignore_boards + span + label [for="allow_ignore_boards"] + "Allow boards to be ignored" + dd + input#allow_ignore_boards [name="allow_ignore_boards" type="checkbox" value="#"] + dt + a#setting_deny_boards_access_help [href="{boardurl}/index.php?action=helpadmin;help=deny_boards_access" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_deny_boards_access + span + label [for="deny_boards_access"] + "Enable the option to deny board access based on membergroup" + dd + input#deny_boards_access [name="deny_boards_access" type="checkbox" value="#"] + input.button [type="submit" value="Save"] + input [name="{token_var}" type="hidden" value="{hash}"] + input [name="{session_var}" type="hidden" value="{session_id}"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/manage_calendar.txt b/tests/Integration/Http/Snapshot/snapshots/admin/manage_calendar.txt new file mode 100644 index 00000000000..df46479d5d1 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/manage_calendar.txt @@ -0,0 +1,64 @@ +status 200 +@ title +title + "Calendar Settings" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=managecalendar;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Calendar" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=calendar" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Calendar" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Here you can enable the calendar, and determine the settings that it should use." + form#admin_form_wrapper [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=managecalendar;save;sa=settings" method="post"] + div.cat_bar + h3.catbg + "Calendar Settings" + div.noup.windowbg + dl.settings + dt + a#setting_cal_enabled_help [href="{boardurl}/index.php?action=helpadmin;help=cal_enabled" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_cal_enabled + span + label [for="cal_enabled"] + "Enable the calendar" + dd + input#cal_enabled [name="cal_enabled" type="checkbox" value="#"] + input.button [type="submit" value="Save"] + input [name="{token_var}" type="hidden" value="{hash}"] + input [name="{session_var}" type="hidden" value="{session_id}"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/manage_search.txt b/tests/Integration/Http/Snapshot/snapshots/admin/manage_search.txt new file mode 100644 index 00000000000..0088155e44e --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/manage_search.txt @@ -0,0 +1,133 @@ +status 200 +@ title +title + "Search - method" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=managesearch;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Search" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=managesearch;sa=method;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Search Method" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=search" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Search" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Here you can set the way search is powered." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Search Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Search Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=managesearch;sa=weights;{session_var}={session_id}"] + "Weights" + li + a.active [href="{boardurl}/index.php?action=admin;area=managesearch;sa=method;{session_var}={session_id}"] + "Search Method" + li + a [href="{boardurl}/index.php?action=admin;area=managesearch;sa=settings;{session_var}={session_id}"] + "Settings" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + div.cat_bar + h3.catbg + "Search Method" + div.information + div.smalltext + a [href="{boardurl}/index.php?action=helpadmin;help=search_why_use_index" onclick="return reqOverlayDiv(this.href);"] + "Why create a search index?" + form#admin_form_wrapper [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=managesearch;sa=method" method="post"] + div.cat_bar + h3.catbg + "Search Method" + div.windowbg + dl.settings + dt + strong + "Space used by forum messages in the database" + dd + "# KB(s)" + dt + strong + "Space used to index messages in the database" + dd + "# KB(s)" + fieldset.floatleft.search_settings + legend + "Search index" + dl + dt + label + input [checked name="search_index" type="radio" value] + "No index" + hr + dt + label + input [name="search_index" onclick="alert('In order to be able to use this search index, you must first create it.'); return false;" type="radio" value="parsed"] + "Parsed index" + dd + span.smalltext + "An optimized index tailored specifically for SMF." + br + "Parsed index does not currently exist" + a.button [href="{boardurl}/index.php?action=admin;area=managesearch;sa=createparsed;{session_var}={session_id};{token}"] + "Create" + fieldset.floatright.search_settings + legend + "Search Method" + input#search_force_index_check [name="search_force_index" type="checkbox" value="#"] + label [for="search_force_index_check"] + "Force the use of a search index" + br + input#search_match_words_check [name="search_match_words" type="checkbox" value="#"] + label [for="search_match_words_check"] + "Match whole words only" + br.clear + input.button [name="save" type="submit" value="Save"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/manage_search_settings.txt b/tests/Integration/Http/Snapshot/snapshots/admin/manage_search_settings.txt new file mode 100644 index 00000000000..704db0b346f --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/manage_search_settings.txt @@ -0,0 +1,243 @@ +status 200 +@ title +title + "Search Settings" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=managesearch;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Search" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=managesearch;sa=settings;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Settings" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=search" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Search" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Here you can changes the basic settings of the search function." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Search Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Search Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=managesearch;sa=weights;{session_var}={session_id}"] + "Weights" + li + a [href="{boardurl}/index.php?action=admin;area=managesearch;sa=method;{session_var}={session_id}"] + "Search Method" + li + a.active [href="{boardurl}/index.php?action=admin;area=managesearch;sa=settings;{session_var}={session_id}"] + "Settings" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + form#admin_form_wrapper [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=managesearch;save;sa=settings" method="post"] + div.cat_bar + h3.catbg + "Search Settings" + div.noup.windowbg + dl.settings + dt + a#setting_search_posts + span + label + "Membergroups with access to the search function" + dd + fieldset#search_posts + legend + a.toggle_up [href="javascript:void(#);" onclick="document.getElementById('search_posts').style.display = 'none';document.getElementById('search_posts_groups_link').style.display = 'block'; return false;"] + "Select permissions for each group" + ul + li + input [checked name="search_posts[#]" type="checkbox" value="on"] + span + "Regular Members" + li + input [checked name="search_posts[-#]" type="checkbox" value="on"] + span + "Guests" + li + input [checked name="search_posts[#]" type="checkbox" value="on"] + span + "Global Moderator" + li + input [onclick="invertAll(this, this.form, 'search_posts[');" type="checkbox"] + span + "Select all" + a#search_posts_groups_link.toggle_down [href="javascript:void(#);" onclick="document.getElementById('search_posts').style.display = 'block'; document.getElementById('search_posts_groups_link').style.display = 'none'; return false;" style="display: none;"] + "Select permissions for each group" + script + | document.getElementById("search_posts").style.display = "none"; document.getElementById("search_posts_groups_link").style.display = ""; + dt + a#setting_search_results_per_page + span + label [for="search_results_per_page"] + "Number of search results per page" + dd + input#search_results_per_page [min="#" name="search_results_per_page" size="#" type="number" value="#"] + dt + a#setting_search_max_results + span + label [for="search_max_results"] + "Maximum results to show" + br + span.smalltext + "(#: no limit)" + dd + input#search_max_results [min="#" name="search_max_results" size="#" type="number" value="#"] + hr + dl.settings + dt + a#setting_search_floodcontrol_time + span + label [for="search_floodcontrol_time"] + "Time required between searches from same user" + br + span.smalltext + "(# for(s) no limit, in seconds)" + dd + input#search_floodcontrol_time [min="#" name="search_floodcontrol_time" size="#" type="number" value="#"] + "seconds" + hr + dl.settings + dt + a#setting_search_stopwords_custom + span + label [for="search_stopwords_custom"] + "Words to ignore when searching" + br + span.smalltext + span.block.infobox + "The following words are always ignored:" + br + code.bbc_tt + "a" + "," + code.bbc_tt + "about" + "," + code.bbc_tt + "an" + "," + code.bbc_tt + "are" + "," + code.bbc_tt + "as" + "," + code.bbc_tt + "at" + "," + code.bbc_tt + "be" + "," + code.bbc_tt + "by" + "," + code.bbc_tt + "for" + "," + code.bbc_tt + "from" + "," + code.bbc_tt + "how" + "," + code.bbc_tt + "in" + "," + code.bbc_tt + "is" + "," + code.bbc_tt + "it" + "," + code.bbc_tt + "of" + "," + code.bbc_tt + "on" + "," + code.bbc_tt + "or" + "," + code.bbc_tt + "that" + "," + code.bbc_tt + "the" + "," + code.bbc_tt + "this" + "," + code.bbc_tt + "to" + "," + code.bbc_tt + "was" + "," + code.bbc_tt + "what" + "," + code.bbc_tt + "when" + "," + code.bbc_tt + "where" + "," + code.bbc_tt + "who" + "," + code.bbc_tt + "will" + "," + code.bbc_tt + "with" + dd + textarea#search_stopwords_custom [cols="#" name="search_stopwords_custom" rows="#"] + input.button [type="submit" value="Save"] + input [name="{token_var}" type="hidden" value="{hash}"] + input [name="{session_var}" type="hidden" value="{session_id}"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/manage_search_weights.txt b/tests/Integration/Http/Snapshot/snapshots/admin/manage_search_weights.txt new file mode 100644 index 00000000000..4430ce24e5f --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/manage_search_weights.txt @@ -0,0 +1,155 @@ +status 200 +@ title +title + "Search - weights" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=managesearch;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Search" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=managesearch;sa=weights;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Weights" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=search" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Search" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Here you can change the individual components of the relevance rating." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Search Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Search Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a.active [href="{boardurl}/index.php?action=admin;area=managesearch;sa=weights;{session_var}={session_id}"] + "Weights" + li + a [href="{boardurl}/index.php?action=admin;area=managesearch;sa=method;{session_var}={session_id}"] + "Search Method" + li + a [href="{boardurl}/index.php?action=admin;area=managesearch;sa=settings;{session_var}={session_id}"] + "Settings" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + form#admin_form_wrapper [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=managesearch;sa=weights" method="post"] + div.cat_bar + h3.catbg + "Weights" + div.windowbg + dl.settings + dt + a.help [href="{boardurl}/index.php?action=helpadmin;help=search_weight_frequency" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + label [for="weight#_val"] + "Relative search weight for number of matching messages within a topic" + dd + span.search_weight + input#weight#_val [name="search_weight_frequency" onchange="calculateNewValues()" size="#" type="text" value="#"] + span#weight#.search_weight + "#%" + dt + a.help [href="{boardurl}/index.php?action=helpadmin;help=search_weight_age" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + label [for="weight#_val"] + "Relative search weight for age of last matching message" + dd + span.search_weight + input#weight#_val [name="search_weight_age" onchange="calculateNewValues()" size="#" type="text" value="#"] + span#weight#.search_weight + "#%" + dt + a.help [href="{boardurl}/index.php?action=helpadmin;help=search_weight_length" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + label [for="weight#_val"] + "Relative search weight for topic length" + dd + span.search_weight + input#weight#_val [name="search_weight_length" onchange="calculateNewValues()" size="#" type="text" value="#"] + span#weight#.search_weight + "#%" + dt + a.help [href="{boardurl}/index.php?action=helpadmin;help=search_weight_subject" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + label [for="weight#_val"] + "Relative search weight for a matching subject" + dd + span.search_weight + input#weight#_val [name="search_weight_subject" onchange="calculateNewValues()" size="#" type="text" value="#"] + span#weight#.search_weight + "#%" + dt + a.help [href="{boardurl}/index.php?action=helpadmin;help=search_weight_first_message" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + label [for="weight#_val"] + "Relative search weight for a first message match" + dd + span.search_weight + input#weight#_val [name="search_weight_first_message" onchange="calculateNewValues()" size="#" type="text" value="#"] + span#weight#.search_weight + "#%" + dt + a.help [href="{boardurl}/index.php?action=helpadmin;help=search_weight_sticky" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + label [for="weight#_val"] + "Relative search weight for a sticky topic" + dd + span.search_weight + input#weight#_val [name="search_weight_sticky" onchange="calculateNewValues()" size="#" type="text" value="#"] + span#weight#.search_weight + "#%" + dt + strong + "Total" + dd + span#weighttotal.search_weight + strong + "#" + span.search_weight + strong + "#%" + input.button [name="save" type="submit" value="Save"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/membergroups.txt b/tests/Integration/Http/Snapshot/snapshots/admin/membergroups.txt new file mode 100644 index 00000000000..04528ccf524 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/membergroups.txt @@ -0,0 +1,233 @@ +status 200 +@ title +title + "Manage Membergroups" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=membergroups;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Membergroups" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=index;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Edit membergroups" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=membergroups" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Manage Membergroups" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Membergroups are groups of members that have similar permission settings, appearance, or access rights. Some membergroups are based on the amount of posts a user has made. You can assign someone to a membergroup by selecting their profile and changing their account settings." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Manage Membergroups Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Manage Membergroups Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a.active [href="{boardurl}/index.php?action=admin;area=membergroups;sa=index;{session_var}={session_id}"] + "Edit membergroups" + li + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=add;{session_var}={session_id}"] + "Add membergroup" + li + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=settings;{session_var}={session_id}"] + "Settings" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + div.cat_bar + h3.catbg + "Regular groups" + div.additional_row + a.button [href="{boardurl}/index.php?action=admin;area=membergroups;sa=add;generalgroup"] + "Add group" + table#regular_membergroups_list.table_grid + thead + tr.title_bar + th#header_regular_membergroups_list_name.name [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=membergroups;sort=name;desc" rel="nofollow"] + "Name" + span.main_icons.sort_up + th#header_regular_membergroups_list_icons.icons [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=membergroups;sort=icons" rel="nofollow"] + "Icons" + th#header_regular_membergroups_list_members.centercol.members [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=membergroups;sort=members" rel="nofollow"] + "Members" + th#header_regular_membergroups_list_modify.centercol.modify [scope="col"] + "Modify" + tbody + tr#list_regular_membergroups_list_#.windowbg + td.name + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=members;group=#" style="color: #FF#;"] + "Administrator" + "(" + a [href="{boardurl}/index.php?action=helpadmin;help=membergroup_administrator" onclick="return reqOverlayDiv(this.href);"] + "?" + ")" + td.icons + img [alt="*" src="{boardurl}/Themes/default/images/membericons/iconadmin.png"] + td.centercol.members + "#" + td.centercol.modify + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=edit;group=#"] + "Modify" + tr#list_regular_membergroups_list_#.windowbg + td.name + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=members;group=#" style="color: ##FF;"] + "Global Moderator" + td.icons + img [alt="*" src="{boardurl}/Themes/default/images/membericons/icongmod.png"] + td.centercol.members + "#" + td.centercol.modify + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=edit;group=#"] + "Modify" + tr#list_regular_membergroups_list_#.windowbg + td.name + "Moderator (" + a [href="{boardurl}/index.php?action=helpadmin;help=membergroup_moderator" onclick="return reqOverlayDiv(this.href);"] + "?" + ")" + td.icons + img [alt="*" src="{boardurl}/Themes/default/images/membericons/iconmod.png"] + td.centercol.members + "n/a" + td.centercol.modify + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=edit;group=#"] + "Modify" + div.flow_auto + div.additional_row + a.button [href="{boardurl}/index.php?action=admin;area=membergroups;sa=add;generalgroup"] + "Add group" + br + div.cat_bar + h3.catbg + "Post count based groups" + table#post_count_membergroups_list.table_grid + thead + tr.title_bar + th#header_post_count_membergroups_list_name.name [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=membergroups;sort#=name" rel="nofollow"] + "Name" + th#header_post_count_membergroups_list_icons.icons [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=membergroups;sort#=icons" rel="nofollow"] + "Icons" + th#header_post_count_membergroups_list_members.centercol.members [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=membergroups;sort#=members" rel="nofollow"] + "Members" + th#header_post_count_membergroups_list_required_posts.centercol.required_posts [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=membergroups;sort#=required_posts;desc#" rel="nofollow"] + "Required posts" + span.main_icons.sort_up + th#header_post_count_membergroups_list_modify.centercol.modify [scope="col"] + "Modify" + tbody + tr#list_post_count_membergroups_list_#.windowbg + td.name + a [href="{boardurl}/index.php?action=moderate;area=viewgroups;sa=members;group=#"] + "Newbie" + td.icons + img [alt="*" src="{boardurl}/Themes/default/images/membericons/icon.png"] + td.centercol.members + "#" + td.centercol.required_posts + "#" + td.centercol.modify + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=edit;group=#"] + "Modify" + tr#list_post_count_membergroups_list_#.windowbg + td.name + a [href="{boardurl}/index.php?action=moderate;area=viewgroups;sa=members;group=#"] + "Jr. Member" + td.icons + img [alt="*" src="{boardurl}/Themes/default/images/membericons/icon.png"] + td.centercol.members + "#" + td.centercol.required_posts + "#" + td.centercol.modify + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=edit;group=#"] + "Modify" + tr#list_post_count_membergroups_list_#.windowbg + td.name + a [href="{boardurl}/index.php?action=moderate;area=viewgroups;sa=members;group=#"] + "Full Member" + td.icons + img [alt="*" src="{boardurl}/Themes/default/images/membericons/icon.png"] + td.centercol.members + "#" + td.centercol.required_posts + "#" + td.centercol.modify + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=edit;group=#"] + "Modify" + tr#list_post_count_membergroups_list_#.windowbg + td.name + a [href="{boardurl}/index.php?action=moderate;area=viewgroups;sa=members;group=#"] + "Sr. Member" + td.icons + img [alt="*" src="{boardurl}/Themes/default/images/membericons/icon.png"] + td.centercol.members + "#" + td.centercol.required_posts + "#" + td.centercol.modify + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=edit;group=#"] + "Modify" + tr#list_post_count_membergroups_list_#.windowbg + td.name + a [href="{boardurl}/index.php?action=moderate;area=viewgroups;sa=members;group=#"] + "Hero Member" + td.icons + img [alt="*" src="{boardurl}/Themes/default/images/membericons/icon.png"] + td.centercol.members + "#" + td.centercol.required_posts + "#" + td.centercol.modify + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=edit;group=#"] + "Modify" + div.flow_auto + div.additional_row + a.button [href="{boardurl}/index.php?action=admin;area=membergroups;sa=add;postgroup"] + "Add group" diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/membergroups_add.txt b/tests/Integration/Http/Snapshot/snapshots/admin/membergroups_add.txt new file mode 100644 index 00000000000..2bbafffe66c --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/membergroups_add.txt @@ -0,0 +1,171 @@ +status 200 +@ title +title + "Add membergroup" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=membergroups;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Membergroups" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=add;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Add membergroup" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=membergroups" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Manage Membergroups" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Membergroups are groups of members that have similar permission settings, appearance, or access rights. Some membergroups are based on the amount of posts a user has made. You can assign someone to a membergroup by selecting their profile and changing their account settings." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Manage Membergroups Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Manage Membergroups Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=index;{session_var}={session_id}"] + "Edit membergroups" + li + a.active [href="{boardurl}/index.php?action=admin;area=membergroups;sa=add;{session_var}={session_id}"] + "Add membergroup" + li + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=settings;{session_var}={session_id}"] + "Settings" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + form#new_group [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=membergroups;sa=add" method="post"] + div.cat_bar + h3.catbg + "Add membergroup" + div.windowbg + dl.settings + dt + label [for="group_name_input"] + strong + "Membergroup name" + dd + input#group_name_input [name="group_name" size="#" type="text"] + dt + label [for="permission_base"] + strong + "Permissions" + br + span.smalltext + "You can edit them later." + dd + fieldset#permission_base + legend + "Select permission profile" + input#perm_type_inherit [checked name="perm_type" type="radio" value="inherit"] + label [for="perm_type_inherit"] + "inherit from" + select#inheritperm_select [name="inheritperm" onclick="document.getElementById('perm_type_inherit').checked = true;"] + option [value="-#"] + "Guests" + option [selected value="#"] + "Regular Members" + option [value="#"] + "Global Moderator" + br + input#perm_type_copy [name="perm_type" type="radio" value="copy"] + label [for="perm_type_copy"] + "based off of" + select#copyperm_select [name="copyperm" onclick="document.getElementById('perm_type_copy').checked = true;"] + option [value="-#"] + "Guests" + option [selected value="#"] + "Regular Members" + option [value="#"] + "Global Moderator" + br + input#perm_type_predefined [name="perm_type" type="radio" value="predefined"] + label [for="perm_type_predefined"] + "by type" + select#level_select [name="level" onclick="document.getElementById('perm_type_predefined').checked = true;"] + option [value="restrict"] + "Restrictive" + option [selected value="standard"] + "Standard" + option [value="moderator"] + "Moderator" + option [value="maintenance"] + "Maintenance" + dt + strong + "Visible Boards" + dd + fieldset#visible_boards + legend + "Boards the membergroup can see" + ul.floatleft.padding + li.category + a [href="javascript:void(#);" onclick="selectBoards([#, #, #, #], 'new_group'); return false;"] + strong + "Snapshot fixtures" + ul + li.board [style="margin-inline-start: #em;"] + input#brd# [name="boardaccess[#]" type="checkbox" value="allow"] + label [for="brd#"] + "Snapshot board" + li.board [style="margin-inline-start: #em;"] + input#brd# [name="boardaccess[#]" type="checkbox" value="allow"] + label [for="brd#"] + "Snapshot child one" + li.board [style="margin-inline-start: #em;"] + input#brd# [name="boardaccess[#]" type="checkbox" value="allow"] + label [for="brd#"] + "Snapshot child two" + li.board [style="margin-inline-start: #em;"] + input#brd# [name="boardaccess[#]" type="checkbox" value="allow"] + label [for="brd#"] + "Snapshot empty board" + br.clear + br + input#checkall_check [onclick="invertAll(this, this.form, 'boardaccess');" type="checkbox"] + label [for="checkall_check"] + em + "Select all" + input.button [type="submit" value="Add group"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/membergroups_add_post_group.txt b/tests/Integration/Http/Snapshot/snapshots/admin/membergroups_add_post_group.txt new file mode 100644 index 00000000000..aecd073c9f9 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/membergroups_add_post_group.txt @@ -0,0 +1,136 @@ +status 200 +@ title +title + "Add membergroup" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=membergroups;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Membergroups" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=add;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Add membergroup" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=membergroups" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Manage Membergroups" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Membergroups are groups of members that have similar permission settings, appearance, or access rights. Some membergroups are based on the amount of posts a user has made. You can assign someone to a membergroup by selecting their profile and changing their account settings." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Manage Membergroups Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Manage Membergroups Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=index;{session_var}={session_id}"] + "Edit membergroups" + li + a.active [href="{boardurl}/index.php?action=admin;area=membergroups;sa=add;{session_var}={session_id}"] + "Add membergroup" + li + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=settings;{session_var}={session_id}"] + "Settings" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + form#new_group [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=membergroups;sa=add" method="post"] + div.cat_bar + h3.catbg + "Add membergroup" + div.windowbg + dl.settings + dt + label [for="group_name_input"] + strong + "Membergroup name" + dd + input#group_name_input [name="group_name" size="#" type="text"] + dt#min_posts_text + label [for="min_posts_input"] + strong + "Required posts" + dd + input#min_posts_input [name="min_posts" size="#" type="number"] + dt + strong + "Visible Boards" + br + span.smalltext + em + "Note: normally, post groups do not need access because the group the member is in will give them access." + dd + fieldset#visible_boards + legend + "Boards the membergroup can see" + ul.floatleft.padding + li.category + a [href="javascript:void(#);" onclick="selectBoards([#, #, #, #], 'new_group'); return false;"] + strong + "Snapshot fixtures" + ul + li.board [style="margin-inline-start: #em;"] + input#brd# [name="boardaccess[#]" type="checkbox" value="allow"] + label [for="brd#"] + "Snapshot board" + li.board [style="margin-inline-start: #em;"] + input#brd# [name="boardaccess[#]" type="checkbox" value="allow"] + label [for="brd#"] + "Snapshot child one" + li.board [style="margin-inline-start: #em;"] + input#brd# [name="boardaccess[#]" type="checkbox" value="allow"] + label [for="brd#"] + "Snapshot child two" + li.board [style="margin-inline-start: #em;"] + input#brd# [name="boardaccess[#]" type="checkbox" value="allow"] + label [for="brd#"] + "Snapshot empty board" + br.clear + br + input#checkall_check [onclick="invertAll(this, this.form, 'boardaccess');" type="checkbox"] + label [for="checkall_check"] + em + "Select all" + input.button [type="submit" value="Add group"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/membergroups_edit.txt b/tests/Integration/Http/Snapshot/snapshots/admin/membergroups_edit.txt new file mode 100644 index 00000000000..1dc608a28a0 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/membergroups_edit.txt @@ -0,0 +1,250 @@ +status 200 +@ title +title + "Edit Membergroup Global Moderator" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=membergroups;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Membergroups" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=index;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Edit membergroups" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=membergroups" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Manage Membergroups" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Membergroups are groups of members that have similar permission settings, appearance, or access rights. Some membergroups are based on the amount of posts a user has made. You can assign someone to a membergroup by selecting their profile and changing their account settings." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Manage Membergroups Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Manage Membergroups Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a.active [href="{boardurl}/index.php?action=admin;area=membergroups;sa=index;{session_var}={session_id}"] + "Edit membergroups" + li + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=add;{session_var}={session_id}"] + "Add membergroup" + li + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=settings;{session_var}={session_id}"] + "Settings" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + form#groupForm [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=membergroups;sa=edit;group=#" method="post" name="groupForm"] + div.cat_bar + h3.catbg + "Edit Membergroup Global Moderator" + div.windowbg + dl.settings + dt + label [for="group_name_input"] + strong + "Group name" + dd + input#group_name_input [name="group_name" size="#" type="text" value="Global Moderator"] + dt#group_desc_text + label [for="group_desc_input"] + strong + "Group description" + dd + textarea#group_desc_input [cols="#" name="group_desc" rows="#"] + dt + label [for="group_type"] + strong + "Group type" + dd + fieldset#group_type + legend + "Select Group type" + label [for="group_type_private"] + input#group_type_private [checked name="group_type" type="radio" value="#"] + "Private" + span.smalltext + "(Membership must be assigned)" + br + label [for="group_type_protected"] + input#group_type_protected [name="group_type" type="radio" value="#"] + "Protected" + span.smalltext + "(Only administrators can manage and assign)" + br + label [for="group_type_request"] + input#group_type_request [name="group_type" type="radio" value="#"] + "Requestable" + span.smalltext + "(User may request membership)" + br + label [for="group_type_free"] + input#group_type_free [name="group_type" type="radio" value="#"] + "Free" + span.smalltext + "(User may leave and join group at will)" + br + dt#group_moderators_text + label [for="group_moderators"] + strong + "Moderators" + dd + input#group_moderators [name="group_moderators" size="#" type="text" value] + div#moderator_container + dt#group_hidden_text + label [for="group_hidden_input"] + strong + "Visibility" + dd + select#group_hidden_input [name="group_hidden" onchange="if (this.value == # && !confirm('Are you sure you want to disallow assignment of this group as a users primary group?\\n\\nDoing so will restrict assignment to additional groups only, and will update all current \"primary\" members to have it as an additional group only.\\n\\nIt will also remove the group as moderator from any boards it is currently assigned to moderate.')) this.value = #;"] + option [selected value="#"] + "Visible" + option [value="#"] + "Visible - Apart from in group key" + option [value="#"] + "Invisible" + dt#group_inherit_text + label [for="group_inherit_input"] + strong + "Inherit permissions" + br + span.smalltext + "Select \"No\" to enable group to have own permission set." + dd + select#group_inherit_input [name="group_inherit"] + option [value="-#"] + "No - Use unique permissions" + option [value="-#"] + "Inherit from Guests" + option [value="#"] + "Inherit from Regular Members" + input [name="old_inherit" type="hidden" value="-#"] + dt + label [for="online_color_input"] + strong + "Color in online list" + dd + input#online_color_input [name="online_color" size="#" type="text" value="##FF"] + dt + label [for="icon_count_input"] + strong + "Number of icon images" + dd + input#icon_count_input [name="icon_count" size="#" type="number" value="#"] + dt + label [for="icon_image_input"] + strong + "Icon image filename" + br + span.smalltext + "You can upload custom images to the forum’s default theme directory to be able to select them here. Different images can be used in different themes, just give them the same name." + span.smalltext + "Max size allowed #x#px" + dd + "Themes/default/images/membericons/" + select#icon_image_input [name="icon_image"] + option [value="blank.png"] + "blank.png" + option [value="icon.png"] + "icon.png" + option [value="iconadmin.png"] + "iconadmin.png" + option [selected value="icongmod.png"] + "icongmod.png" + option [value="iconmod.png"] + "iconmod.png" + img#icon_preview [alt="*" src] + dt + label [for="max_messages_input"] + strong + "Max personal messages" + br + span.smalltext + "# = unlimited" + dd + input#max_messages_input [name="max_messages" size="#" type="text" value="#"] + dt + strong + "Visible Boards" + dd + fieldset#visible_boards + legend + "Boards the membergroup can see" + ul.floatleft.padding + li.category + a [href="javascript:void(#);" onclick="selectBoards([#, #, #, #], 'groupForm'); return false;"] + strong + "Snapshot fixtures" + ul + li.board [style="margin-inline-start: #em;"] + input#brd# [name="boardaccess[#]" type="checkbox" value="allow"] + label [for="brd#"] + "Snapshot board" + li.board [style="margin-inline-start: #em;"] + input#brd# [name="boardaccess[#]" type="checkbox" value="allow"] + label [for="brd#"] + "Snapshot child one" + li.board [style="margin-inline-start: #em;"] + input#brd# [name="boardaccess[#]" type="checkbox" value="allow"] + label [for="brd#"] + "Snapshot child two" + li.board [style="margin-inline-start: #em;"] + input#brd# [name="boardaccess[#]" type="checkbox" value="allow"] + label [for="brd#"] + "Snapshot empty board" + br.clear + br + input#checkall_check [onclick="invertAll(this, this.form, 'boardaccess');" type="checkbox"] + label [for="checkall_check"] + em + "Select all" + a#visible_boards_link.hidden [href="javascript:void(#);" onclick="document.getElementById('visible_boards').classList.remove('hidden'); document.getElementById('visible_boards_link').classList.add('hidden'); return false;"] + "[ Show boards ]" + script + | document.getElementById("visible_boards_link").classList.remove('hidden'); document.getElementById("visible_boards").classList.add('hidden'); + input.button [name="save" type="submit" value="Save"] + input.button.you_sure [data-confirm="Are you sure you want to delete this group?" name="delete" type="submit" value="Delete"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="{token_var}" type="hidden" value="{hash}"] + script + | var oModeratorSuggest = new smc_AutoSuggest({ sSessionId: smf_session_id, sSessionVar: smf_session_var, sSuggestId: 'group_moderators', sControlId: 'group_moderators', sSearchType: 'member', bItemList: true, sPostName: 'moderator_list', sURLMask: 'action=profile;u=%item_id%', sTextDeleteItem: 'Delete Item', sItemListContainerId: 'moderator_container', aListItems: [ ] }); diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/membergroups_settings.txt b/tests/Integration/Http/Snapshot/snapshots/admin/membergroups_settings.txt new file mode 100644 index 00000000000..4c79405494a --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/membergroups_settings.txt @@ -0,0 +1,112 @@ +status 200 +@ title +title + "Membergroup Settings" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=membergroups;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Membergroups" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=settings;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Settings" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=membergroups" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Manage Membergroups" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Membergroups are groups of members that have similar permission settings, appearance, or access rights. Some membergroups are based on the amount of posts a user has made. You can assign someone to a membergroup by selecting their profile and changing their account settings." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Manage Membergroups Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Manage Membergroups Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=index;{session_var}={session_id}"] + "Edit membergroups" + li + a [href="{boardurl}/index.php?action=admin;area=membergroups;sa=add;{session_var}={session_id}"] + "Add membergroup" + li + a.active [href="{boardurl}/index.php?action=admin;area=membergroups;sa=settings;{session_var}={session_id}"] + "Settings" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + form#admin_form_wrapper [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=membergroups;save;sa=settings" method="post"] + div.cat_bar + h3.catbg + "Membergroup Settings" + div.noup.windowbg + dl.settings + dt + a#setting_manage_membergroups + span + label + "Groups allowed to manage and assign membergroups" + dd + fieldset#manage_membergroups + legend + a.toggle_up [href="javascript:void(#);" onclick="document.getElementById('manage_membergroups').style.display = 'none';document.getElementById('manage_membergroups_groups_link').style.display = 'block'; return false;"] + "Select permissions for each group" + ul + li + input [name="manage_membergroups[#]" type="checkbox" value="on"] + span + "Regular Members" + li + input [name="manage_membergroups[#]" type="checkbox" value="on"] + span + "Global Moderator" + li + input [onclick="invertAll(this, this.form, 'manage_membergroups[');" type="checkbox"] + span + "Select all" + a#manage_membergroups_groups_link.toggle_down [href="javascript:void(#);" onclick="document.getElementById('manage_membergroups').style.display = 'block'; document.getElementById('manage_membergroups_groups_link').style.display = 'none'; return false;" style="display: none;"] + "Select permissions for each group" + script + | document.getElementById("manage_membergroups").style.display = "none"; document.getElementById("manage_membergroups_groups_link").style.display = ""; + input.button [type="submit" value="Save"] + input [name="{token_var}" type="hidden" value="{hash}"] + input [name="{session_var}" type="hidden" value="{session_id}"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/members.txt b/tests/Integration/Http/Snapshot/snapshots/admin/members.txt new file mode 100644 index 00000000000..3d68728e2fd --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/members.txt @@ -0,0 +1,110 @@ +status 200 +@ title +title + "Manage Members" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=viewmembers;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Members" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sa=all;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "View all Members" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=view_members" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Manage Members" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Below is a listing of all the members currently registered with your forum." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Manage Members Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Manage Members Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a.active [href="{boardurl}/index.php?action=admin;area=viewmembers;sa=all;{session_var}={session_id}"] + "View all Members" + li + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sa=search;{session_var}={session_id}"] + "Search for Members" + li + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sa=settings;{session_var}={session_id}"] + "Settings" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=viewmembers" method="post"] + div.cat_bar + h3.catbg + "Members List" + table#member_list.table_grid + thead + tr.title_bar + th#header_member_list_id_member.id_member [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sort=id_member" rel="nofollow"] + "ID" + th#header_member_list_user_name.user_name [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sort=user_name;desc" rel="nofollow"] + "Username" + span.main_icons.sort_up + th#header_member_list_display_name.display_name [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sort=display_name" rel="nofollow"] + "Display name" + th#header_member_list_email.email [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sort=email" rel="nofollow"] + "Email address" + th#header_member_list_ip.ip [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sort=ip" rel="nofollow"] + "IP address" + th#header_member_list_last_active.last_active [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sort=last_active" rel="nofollow"] + "Last Online" + th#header_member_list_posts.posts [scope="col"] + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sort=posts" rel="nofollow"] + "Posts" + th#header_member_list_check.centercol.check [scope="col"] + input [onclick="invertAll(this, this.form);" type="checkbox"] + snapshot-ignored [selector="table.table_grid tbody"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input [name="sort" type="hidden" value="user_name"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/members_search.txt b/tests/Integration/Http/Snapshot/snapshots/admin/members_search.txt new file mode 100644 index 00000000000..eed30376675 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/members_search.txt @@ -0,0 +1,286 @@ +status 200 +@ title +title + "Manage Members" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=viewmembers;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Members" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sa=search;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Search for Members" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=view_members" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Manage Members" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Below is a listing of all the members currently registered with your forum." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Manage Members Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Manage Members Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sa=all;{session_var}={session_id}"] + "View all Members" + li + a.active [href="{boardurl}/index.php?action=admin;area=viewmembers;sa=search;{session_var}={session_id}"] + "Search for Members" + li + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sa=settings;{session_var}={session_id}"] + "Settings" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + form#admin_form_wrapper [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=viewmembers" method="post"] + input [name="sa" type="hidden" value="query"] + div.cat_bar + h3.catbg + span.floatleft + "Search for" + span.floatright.smalltext + "wildcard characters * and ? are allowed" + div.windowbg + div.flow_hidden + div.floatleft.msearch_details + dl.right.settings + dt.righttext + strong + label [for="mem_id"] + "ID" + select [name="types[mem_id]"] + option [value="--"] + "<" + option [value="-"] + "<=" + option [selected value="="] + "=" + option [value="+"] + ">=" + option [value="++"] + ">" + dd + input#mem_id [name="mem_id" size="#" type="number" value] + dt.righttext + strong + label [for="age"] + "User age" + select [name="types[age]"] + option [value="--"] + "<" + option [value="-"] + "<=" + option [selected value="="] + "=" + option [value="+"] + ">=" + option [value="++"] + ">" + dd + input#age [name="age" size="#" type="number" value] + dt.righttext + strong + label [for="posts"] + "Posts" + select [name="types[posts]"] + option [value="--"] + "<" + option [value="-"] + "<=" + option [selected value="="] + "=" + option [value="+"] + ">=" + option [value="++"] + ">" + dd + input#posts [name="posts" size="#" type="number" value] + dt.righttext + strong + label [for="reg_date"] + "Date registered" + select [name="types[reg_date]"] + option [value="--"] + "<" + option [value="-"] + "<=" + option [selected value="="] + "=" + option [value="+"] + ">=" + option [value="++"] + ">" + dd + input#reg_date [name="reg_date" size="#" type="date" value] + span.smalltext + dt.righttext + strong + label [for="last_online"] + "Last Online" + select [name="types[last_online]"] + option [value="--"] + "<" + option [value="-"] + "<=" + option [selected value="="] + "=" + option [value="+"] + ">=" + option [value="++"] + ">" + dd + input#last_online [name="last_online" size="#" type="date" value] + span.smalltext + div.floatright.msearch_details + dl.right.settings + dt.righttext + strong + label [for="membername"] + "Username" + dd + input#membername [name="membername" type="text" value] + dt.righttext + strong + label [for="email"] + "Email address" + dd + input#email [name="email" type="email" value] + dt.righttext + strong + label [for="website"] + "Website" + dd + input#website [name="website" type="url" value] + dt.righttext + strong + label [for="ip"] + "IP address" + dd + input#ip [name="ip" type="text" value] + div.floatright.msearch_details + fieldset + legend + "Activation Status" + label [for="activated-#"] + input#activated-# [checked name="activated[]" type="checkbox" value="#"] + "Activated" + label [for="activated-#"] + input#activated-# [checked name="activated[]" type="checkbox" value="#"] + "Not activated" + div.cat_bar + h3.catbg + "Member is part of these membergroups" + table.table_grid + thead + tr.title_bar + th [scope="col"] + "Membergroups" + th.centercol.quarter_table [scope="col"] + "Primary" + th.centercol.quarter_table [scope="col"] + "Additional" + tbody + tr.windowbg + td + "Regular Members" + td.centercol + input [checked name="membergroups[#][]" type="checkbox" value="#"] + td.centercol + tr.windowbg + td + "Administrator" + td.centercol + input [checked name="membergroups[#][]" type="checkbox" value="#"] + tr.windowbg + td + "Global Moderator" + td.centercol + input [checked name="membergroups[#][]" type="checkbox" value="#"] + tr.windowbg + td + em + "Select all" + td.centercol + input [checked onclick="invertAll(this, this.form, 'membergroups[#]');" type="checkbox"] + table.table_grid + thead + tr.title_bar + th [scope="col"] + "Post groups" + th.quarter_table + tbody + tr.windowbg + td + "Newbie" + td.centercol + input [checked name="postgroups[]" type="checkbox" value="#"] + tr.windowbg + td + "Jr. Member" + td.centercol + input [checked name="postgroups[]" type="checkbox" value="#"] + tr.windowbg + td + "Full Member" + td.centercol + input [checked name="postgroups[]" type="checkbox" value="#"] + tr.windowbg + td + "Sr. Member" + td.centercol + input [checked name="postgroups[]" type="checkbox" value="#"] + tr.windowbg + td + "Hero Member" + td.centercol + input [checked name="postgroups[]" type="checkbox" value="#"] + tr.windowbg + td + em + "Select all" + td.centercol + input [checked onclick="invertAll(this, this.form, 'postgroups[]');" type="checkbox"] + br + input.button [type="submit" value="Search"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/members_settings.txt b/tests/Integration/Http/Snapshot/snapshots/admin/members_settings.txt new file mode 100644 index 00000000000..5b6d40b8464 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/members_settings.txt @@ -0,0 +1,97 @@ +status 200 +@ title +title + "Manage Members" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin" itemprop="item"] + span [itemprop="name"] + "Administration Center" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=viewmembers;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Members" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sa=settings;{session_var}={session_id}" itemprop="item"] + span [itemprop="name"] + "Settings" + meta [content="#" itemprop="position"] +@ #admin_content +div#admin_content + div.cat_bar + h3.catbg + a.help [href="{boardurl}/index.php?action=helpadmin;help=view_members" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + "Manage Members" + form.admin_search [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=search" method="post"] + span.centericon.filter.main_icons + input [name="search_term" placeholder="Quick Search" type="search"] + select [name="search_type"] + option [selected value="internal"] + "Task/Setting" + option [value="member"] + "Member" + option [value="online"] + "Online Manual" + input#search_go.button [name="search_go" type="submit" value="Go"] + p.information + "Below is a listing of all the members currently registered with your forum." + a.mobile_generic_menu_1_tabs + span.menu_icon + span.text_menu + "Manage Members Menu" + div#adm_submenus + div#mobile_generic_menu_#_tabs.popup_container + div.description.popup_window + div.popup_heading + "Manage Members Menu" + a.hide_popup.main_icons [href="javascript:void(#);"] + div.generic_menu + ul.dropdown_menu_1_tabs.dropmenu + li + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sa=all;{session_var}={session_id}"] + "View all Members" + li + a [href="{boardurl}/index.php?action=admin;area=viewmembers;sa=search;{session_var}={session_id}"] + "Search for Members" + li + a.active [href="{boardurl}/index.php?action=admin;area=viewmembers;sa=settings;{session_var}={session_id}"] + "Settings" + script + | $( ".mobile_generic_menu_#_tabs" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).show(); }); $( ".hide_popup" ).click(function() { $( "#mobile_generic_menu_#_tabs" ).hide(); }); + form#admin_form_wrapper [accept-charset="UTF-#" action="{boardurl}/index.php?action=admin;area=viewmembers;save;sa=settings" method="post"] + div.cat_bar + h3.catbg + "Settings" + div.noup.windowbg + dl.settings + dt + a#setting_always_anonymize_deleted_accounts_help [href="{boardurl}/index.php?action=helpadmin;help=always_anonymize_deleted_accounts" onclick="return reqOverlayDiv(this.href);"] + span.help.main_icons [title="Help"] + a#setting_always_anonymize_deleted_accounts + span + label [for="always_anonymize_deleted_accounts"] + "Always anonymize personally identifying information when deleting an account" + br + span.smalltext + "Anonymization will still be available on a case-by-case basis when this setting is disabled." + dd + input#always_anonymize_deleted_accounts [name="always_anonymize_deleted_accounts" type="checkbox" value="#"] + input.button [type="submit" value="Save"] + input [name="{token_var}" type="hidden" value="{hash}"] + input [name="{session_var}" type="hidden" value="{session_id}"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/merge_topic.txt b/tests/Integration/Http/Snapshot/snapshots/admin/merge_topic.txt new file mode 100644 index 00000000000..41d59621593 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/merge_topic.txt @@ -0,0 +1,100 @@ +status 200 +@ title +title + "Merge Topics" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php#c#" itemprop="item"] + span [itemprop="name"] + "Snapshot fixtures" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?board=#.#" itemprop="item"] + span [itemprop="name"] + "{board}" + meta [content="#" itemprop="position"] +@ #content_section +div#content_section + main#main_content_section + div#merge_topics + div.cat_bar + h3.catbg + "Merge Topics" + div.information + "This function will merge the messages of two topics into one topic. The messages will be sorted according to the time of posting. Therefore, the earliest posted message will be the first message of the merged topic." + div.windowbg + dl.merge_topic.settings + dt + strong + "Topic to be merged" + dd + "Snapshot second topic" + br + div.cat_bar + h3.catbg + "Target topic" + div.title_bar + h4.titlebg + form#mergeSelectBoard [accept-charset="UTF-#" action="{boardurl}/index.php?action=mergetopics;from=#;targetboard=#;board=#.#" method="post"] + "Select target from the list below (Board:" + select [name="targetboard" onchange="this.form.submit();"] + optgroup [label="Snapshot fixtures"] + option [selected value="#"] + "{board}" + option [value="#"] + "=> Snapshot child one" + option [value="#"] + "=> Snapshot child two" + option [value="#"] + "Snapshot empty board" + ")" + input [name="from" type="hidden" value="#"] + input.button [type="submit" value="Go"] + form [accept-charset="UTF-#" action="{boardurl}/index.php?action=mergetopics;sa=options" method="post"] + div.pagesection + div.pagelinks + span.pages + "Pages" + span.current_page + "#" + div.windowbg + ul.merge_topics + li + a [href="{boardurl}/index.php?action=mergetopics;sa=options;board=#.#;from=#;to=#;{session_var}={session_id}"] + span.main_icons.merge + a [href="{boardurl}/index.php?topic=#.#" rel="noopener" target="_blank"] + "{subject}" + "Started by" + a [href="{boardurl}/index.php?action=profile;u=#" rel="noopener" target="_blank"] + "{member}" + div.pagesection + div.pagelinks + span.pages + "Pages" + span.current_page + "#" + br + div.title_bar + h4.titlebg + "Select target by topic ID" + div.windowbg + dl.merge_topic.settings + dt + strong + "ID of target topic" + dd + input [name="topics[]" type="hidden" value="#"] + input [name="topics[]" type="text"] + input [name="{session_var}" type="hidden" value="{session_id}"] + input.button [type="submit" value="Merge Topics"] diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/message_index.txt b/tests/Integration/Http/Snapshot/snapshots/admin/message_index.txt new file mode 100644 index 00000000000..baf4ad02621 --- /dev/null +++ b/tests/Integration/Http/Snapshot/snapshots/admin/message_index.txt @@ -0,0 +1,372 @@ +status 200 +@ title +title + "{board}" +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php#c#" itemprop="item"] + span [itemprop="name"] + "Snapshot fixtures" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?board=#.#" itemprop="item"] + span [itemprop="name"] + "{board}" + meta [content="#" itemprop="position"] +@ .navigate_section +nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php#c#" itemprop="item"] + span [itemprop="name"] + "Snapshot fixtures" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?board=#.#" itemprop="item"] + span [itemprop="name"] + "{board}" + meta [content="#" itemprop="position"] +@ #content_section +div#content_section + main#main_content_section + div#display_head.information + h2.display_title + "{board}" + p + "Topics, replies and a poll for the snapshot tests." + div#board_#_childboards.boardindex_table.main_container + div.cat_bar + h3.catbg + "Sub-Boards" + div#board_#.up_contain + div.board_icon + a.board_off [href="{boardurl}/index.php?action=unread;board=#.#;children" title="No New Posts"] + div.info + a#b#.mobile_subject.subject [href="{boardurl}/index.php?board=#.#"] + "{board}" + div.board_description + "The first child board." + div.board_stats + p + "# post(s)" + br + "# topic(s)" + div.lastpost + p + strong + "Last post:" + "{date}" + span.postby + a [href="{boardurl}/index.php?topic=#.msg##new" title="{subject}"] + "{subject}" + "by" + a [href="{boardurl}/index.php?action=profile;u=#" title="View the profile of {member}"] + "{member}" + div#board_#.up_contain + div.board_icon + a.board_off [href="{boardurl}/index.php?action=unread;board=#.#;children" title="No New Posts"] + div.info + a#b#.mobile_subject.subject [href="{boardurl}/index.php?board=#.#"] + "{board}" + div.board_description + "The second child board, which stays empty." + div.board_stats + p + "# post(s)" + br + "# topic(s)" + div.lastpost + div.pagesection + div.floatleft.pagelinks + a.button [href="#bot"] + "Go Down" + span.pages + "Pages" + span.current_page + "#" + div.buttonlist.floatright + a.active.button.button_strip_new_topic [href="{boardurl}/index.php?action=post;board=#.#"] + "New Topic" + a.button.button_strip_post_poll [href="{boardurl}/index.php?action=post;board=#.#;poll"] + "New poll" + a.button.button_strip_markread.you_sure [data-confirm="Are you sure you want to mark messages as read?" href="{boardurl}/index.php?action=markasread;sa=board;board=#.#;{session_var}={session_id}"] + "Mark Read" + a.button.button_strip_notify + "No Alerts or Emails" + div.dropmenu.notify_dropdown.top_menu + div.viewport + div.overview + a [href="{boardurl}/index.php?action=notifyboard;board=#;mode=#;{session_var}={session_id}"] + strong + "No Alerts or Emails" + br + span + "You will not receive any emails or alerts for new topics" + a [href="{boardurl}/index.php?action=notifyboard;board=#;mode=#;{session_var}={session_id}"] + strong + "Receive Alerts" + br + span + "You will receive alerts for this board." + a [href="{boardurl}/index.php?action=notifyboard;board=#;mode=#;{session_var}={session_id}"] + strong + "Receive Emails and Alerts" + br + span + "You will receive both alerts and e-mails for this board." + div.floatright.mobile_buttons + a.button.mobile_act + "User actions" + div#messageindex + div#topic_header.title_bar + div.board_icon + div.info + a [href="{boardurl}/index.php?board=#.#;sort=subject"] + "Subject" + "/" + a [href="{boardurl}/index.php?board=#.#;sort=starter"] + "Started by" + div.board_stats.centertext + a [href="{boardurl}/index.php?board=#.#;sort=replies"] + "Replies" + "/" + a [href="{boardurl}/index.php?board=#.#;sort=views"] + "Views" + div.lastpost + a [href="{boardurl}/index.php?board=#.#;asc"] + "Last post" + span.main_icons.sort_down + div#topic_container + div.locked.sticky.windowbg + div.board_icon + img [alt src="{boardurl}/Themes/default/images/post/xx.png"] + span.main_icons.profile_sm + div.info.info_block + div + div#icons#.floatright.icons + span.lock.main_icons + span.main_icons.sticky + span.main_icons.poll + div.message_index_title + span.bold_text.preview [title] + span#msg# + a [href="{boardurl}/index.php?topic=#.#"] + "{subject}" + p.floatleft + "Started by" + a.preview [href="{boardurl}/index.php?action=profile;u=#" title="View the profile of {member}"] + "{member}" + div.board_stats.centertext + p + "# reply(s)" + br + "# view(s)" + div.lastpost + p + a [href="{boardurl}/index.php?topic=#.##new"] + "{date}" + br + "by" + a [href="{boardurl}/index.php?action=profile;u=#"] + "{member}" + div.windowbg + div.board_icon + img [alt src="{boardurl}/Themes/default/images/post/xx.png"] + div.info.info_block + div + div#icons#.floatright.icons + div.message_index_title + span.preview [title] + span#msg# + a [href="{boardurl}/index.php?topic=#.#"] + "{subject}" + p.floatleft + "Started by" + a.preview [href="{boardurl}/index.php?action=profile;u=#" title="View the profile of {member}"] + "{member}" + div.board_stats.centertext + p + "# reply(s)" + br + "# view(s)" + div.lastpost + p + a [href="{boardurl}/index.php?topic=#.##new"] + "{date}" + br + "by" + a [href="{boardurl}/index.php?action=profile;u=#"] + "{member}" + div.windowbg + div.board_icon + img [alt src="{boardurl}/Themes/default/images/post/xx.png"] + span.main_icons.profile_sm + div.info.info_block + div + div#icons#.floatright.icons + div.message_index_title + span.preview [title] + span#msg# + a [href="{boardurl}/index.php?topic=#.#"] + "{subject}" + p.floatleft + "Started by" + a.preview [href="{boardurl}/index.php?action=profile;u=#" title="View the profile of {member}"] + "{member}" + div.board_stats.centertext + p + "# reply(s)" + br + "# view(s)" + div.lastpost + p + a [href="{boardurl}/index.php?topic=#.msg##new"] + "{date}" + br + "by" + a [href="{boardurl}/index.php?action=profile;u=#"] + "{member}" + div.pagesection + div.floatleft.pagelinks + a#bot.button [href="#main_content_section"] + "Go Up" + span.pages + "Pages" + span.current_page + "#" + div.buttonlist.floatright + a.active.button.button_strip_new_topic [href="{boardurl}/index.php?action=post;board=#.#"] + "New Topic" + a.button.button_strip_post_poll [href="{boardurl}/index.php?action=post;board=#.#;poll"] + "New poll" + a.button.button_strip_markread.you_sure [data-confirm="Are you sure you want to mark messages as read?" href="{boardurl}/index.php?action=markasread;sa=board;board=#.#;{session_var}={session_id}"] + "Mark Read" + a.button.button_strip_notify + "No Alerts or Emails" + div.dropmenu.notify_dropdown.top_menu + div.viewport + div.overview + a [href="{boardurl}/index.php?action=notifyboard;board=#;mode=#;{session_var}={session_id}"] + strong + "No Alerts or Emails" + br + span + "You will not receive any emails or alerts for new topics" + a [href="{boardurl}/index.php?action=notifyboard;board=#;mode=#;{session_var}={session_id}"] + strong + "Receive Alerts" + br + span + "You will receive alerts for this board." + a [href="{boardurl}/index.php?action=notifyboard;board=#;mode=#;{session_var}={session_id}"] + strong + "Receive Emails and Alerts" + br + span + "You will receive both alerts and e-mails for this board." + div.floatright.mobile_buttons + a.button.mobile_act + "User actions" + nav.navigate_section [aria-label="Breadcrumb"] + ol [itemscope itemtype="https://schema.org/BreadcrumbList"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + a [href="{boardurl}/index.php" itemprop="item"] + span [itemprop="name"] + "{forum_name}" + meta [content="#" itemprop="position"] + li [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php#c#" itemprop="item"] + span [itemprop="name"] + "Snapshot fixtures" + meta [content="#" itemprop="position"] + li.last [itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"] + span.dividers + "►" + a [href="{boardurl}/index.php?board=#.#" itemprop="item"] + span [itemprop="name"] + "{board}" + meta [content="#" itemprop="position"] + script + | window.addEventListener("DOMContentLoaded", function() { new QuickModifyTopic({ aHidePrefixes: ["icons", "msg", "pages", "newicon"], sTopicContainer: "topic_container", }); }); + div#topic_icons.tborder + div.information + p#message_index_jump_to + p.floatleft + span.main_icons.profile_sm + "Topic you have posted in" + br + span.main_icons.poll + "Poll" + br + span.main_icons.move + "Moved Topic" + br + p + span.lock.main_icons + "Locked Topic" + br + span.main_icons.sticky + "Sticky Topic" + br + span.main_icons.watch + "Topic you are watching" + br + script + | window.addEventListener("DOMContentLoaded", function() { new JumpTo({ sContainerId: "message_index_jump_to", sJumpToTemplate: "
'; - } - - if (isset(Utils::$context['ban']['notes'])) { - echo ' -
-
- ', Lang::getTxt('ban_notes_desc', file: 'Admin'), ' -
-
- -
'; - } - - echo ' -
-
- - ', Lang::getTxt('ban_expiration', file: 'Admin'), ' - -
- ', str_replace(Utils::$context['ban']['expiration']['days'], '', Lang::getTxt('number_of_days', [Utils::$context['ban']['expiration']['days']], file: 'General')), '
- -
-
- - ', Lang::getTxt('ban_restriction', file: 'Admin'), ' - -
-
- (?)
-
-
-
-
'; - - if (!empty(Utils::$context['ban_suggestions'])) { - echo ' -
- - ', Lang::getTxt('ban_triggers', file: 'Admin'), ' - -
-
- - -
-
- -
'; - - if (empty(Config::$modSettings['disableHostnameLookup'])) { - echo ' -
- - -
-
- -
'; - } - - echo ' -
- - -
-
- -
-
- - -
-
- -
-
'; - - if (!empty(Utils::$context['ban_suggestions']['other_ips'])) { - foreach (Utils::$context['ban_suggestions']['other_ips'] as $key => $ban_ips) { - if (!empty($ban_ips)) { - echo ' -
', Lang::getTxt($key, file: 'Profile'), '
-
'; - - $count = 0; - - foreach ($ban_ips as $ip) { - echo ' -
- -
-
- -
'; - } - - echo ' -
'; - } - } - } - - echo ' -
'; - } - - echo ' - - - ', isset(Utils::$context['ban']['from_user']) ? ' - ' : '', ' - - - - '; - - if (!Utils::$context['ban']['is_new'] && empty(Utils::$context['ban_suggestions'])) { - echo ' -
'; - template_show_list('ban_items'); - } - - echo ' - - '; - } -} - -/** - * Add or edit a ban trigger - */ -function template_ban_edit_trigger() -{ - echo ' -
-
-
-

- ', Lang::getTxt(Utils::$context['ban_trigger']['is_new'] ? 'ban_add_trigger' : 'ban_edit_trigger_title', file: 'Admin'), ' -

-
-
-
'; - - if (Utils::$context['ban_trigger']['is_new']) { - echo ' - - ', Lang::getTxt('ban_triggers', file: 'Admin'), ' - '; - } - echo ' -
'; - - if (Utils::$context['ban_trigger']['is_new'] || Utils::$context['ban_trigger']['ip']['selected']) { - echo ' -
- - -
-
- -
'; - } - - if (empty(Config::$modSettings['disableHostnameLookup']) && (Utils::$context['ban_trigger']['is_new'] || Utils::$context['ban_trigger']['hostname']['selected'])) { - echo ' -
- - -
-
- -
'; - } - - if (Utils::$context['ban_trigger']['is_new'] || Utils::$context['ban_trigger']['email']['selected']) { - echo ' -
- - -
-
- -
'; - } - - if (Utils::$context['ban_trigger']['is_new'] || Utils::$context['ban_trigger']['banneduser']['selected']) { - echo ' -
- - : -
-
- -
'; - } - echo ' -
-
- -
- - - - -
-
- '; -} diff --git a/Themes/default/ManageBoards.template.php b/Themes/default/ManageBoards.template.php deleted file mode 100644 index 7abdc4e143e..00000000000 --- a/Themes/default/ManageBoards.template.php +++ /dev/null @@ -1,781 +0,0 @@ - -
-

', Lang::getTxt('boards_edit', file: 'Admin'), '

-
-
'; - - if (!empty(Utils::$context['move_board'])) { - echo ' -
- ', Utils::$context['move_title'], ' [', Lang::getTxt('mboards_cancel_moving', file: 'ManageBoards'), ']', ' -
'; - } - - // No categories so show a label. - if (empty(Utils::$context['categories'])) { - echo ' -
- ', Lang::getTxt('mboards_no_cats', file: 'ManageBoards'), ' -
'; - } - - // Loop through every category, listing the boards in each as we go. - foreach (Utils::$context['categories'] as $category) { - // Link to modify the category. - echo ' - '; - - // Boards table header. - echo ' -
-
    '; - - if (!empty($category['move_link'])) { - echo ' -
  • '; - } - - $recycle_board = ' ' . Lang::getTxt('recycle_board', file: 'ManageBoards') . ''; - $redirect_board = '' . Lang::getTxt('redirect_board_desc', file: 'ManageBoards') . ''; - - // List through every board in the category, printing its name and link to modify the board. - foreach ($category['boards'] as $board) { - echo ' - - ', $board['name'], '', !empty(Config::$modSettings['recycle_board']) && !empty(Config::$modSettings['recycle_enable']) && Config::$modSettings['recycle_board'] == $board['id'] ? $recycle_board : '', $board['is_redirect'] ? $redirect_board : '', ' - - ', Utils::$context['can_manage_permissions'] ? '' . Lang::getTxt('mboards_permissions', file: 'ManageBoards') . '' : '', ' - ', Lang::getTxt('mboards_move', file: 'ManageBoards'), ' - ', Lang::getTxt('mboards_modify', file: 'ManageBoards'), ' -
    - '; - - if (!empty($board['move_links'])) { - echo ' -
  • '; - - foreach ($board['move_links'] as $link) { - echo ' - '; - } - - echo ' -
  • '; - } - } - - // Button to add a new board. - echo ' -
- - -
'; - } - - echo ' -
- '; -} - -/** - * Template for editing/adding a category on the forum. - */ -function template_modify_category() -{ - // Print table header. - echo ' -
-
- -
-

- ', Lang::getTxt(isset(Utils::$context['category']['is_new']) ? 'mboards_new_cat_name' : 'cat_edit', file: 'ManageBoards'), ' -

-
-
-
'; - - // If this isn't the only category, let the user choose where this category should be positioned down the board index. - if (count(Utils::$context['category_order']) > 1) { - echo ' -
', Lang::getTxt('order', file: 'ManageBoards'), '
-
- -
'; - } - - // Allow the user to edit the category name and/or choose whether you can collapse the category. - echo ' -
- ', Lang::getTxt('full_name', file: 'ManageBoards'), '
- ', Lang::getTxt('name_on_display', file: 'ManageBoards'), ' -
-
- -
-
- ', Lang::getTxt('mboards_description', file: 'ManageBoards'), '
- ', Lang::getTxt('mboards_cat_description_desc', ['allowed_tags' => implode(', ', Utils::$context['description_allowed_tags'])], file: 'ManageBoards'), ' -
-
- -
-
- ', Lang::getTxt('collapse_enable', file: 'ManageBoards'), '
- ', Lang::getTxt('collapse_desc', file: 'ManageBoards'), ' -
-
- -
'; - - // Show any category settings added by mods using the 'integrate_edit_category' hook. - if (!empty(Utils::$context['custom_category_settings']) && is_array(Utils::$context['custom_category_settings'])) { - foreach (Utils::$context['custom_category_settings'] as $catset_id => $catset) { - if (!empty($catset['dt']) && !empty($catset['dd'])) { - echo ' -
- ', $catset['dt'], ' -
- - ', $catset['dd'], ' - '; - } - } - } - - // Table footer. - echo ' -
'; - - if (isset(Utils::$context['category']['is_new'])) { - echo ' - '; - } else { - echo ' - - '; - } - echo ' - - '; - - // If this category is empty we don't bother with the next confirmation screen. - if (Utils::$context['category']['is_empty']) { - echo ' - '; - } - - echo ' -
-
-
'; -} - -/** - * A template to confirm if a user wishes to delete a category - and whether they want to save the boards. - */ -function template_confirm_category_delete() -{ - // Print table header. - echo ' -
-
- -
-

', Lang::getTxt('mboards_delete_cat', file: 'ManageBoards'), '

-
-
-

', Lang::getTxt('mboards_delete_cat_contains', file: 'ManageBoards'), '

-
    '; - - foreach (Utils::$context['category']['children'] as $child) { - echo ' -
  • ', $child, '
  • '; - } - - echo ' -
-
-
-

', Lang::getTxt('mboards_delete_what_do', file: 'ManageBoards'), '

-
-
-

-
- - -

- - - - - -
-
-
'; -} - -/** - * Below is the template for adding/editing a board on the forum. - */ -function template_modify_board() -{ - // The main table header. - echo ' -
-
- -
-

- ', isset(Utils::$context['board']['is_new']) ? Lang::getTxt('mboards_new_board_name', file: 'ManageBoards') : Lang::getTxt('boards_edit', file: 'Admin'), ' -

-
-
-
'; - - // Option for choosing the category the board lives in. - echo ' -
- ', Lang::getTxt('mboards_category', file: 'ManageBoards'), ' -
-
- -
'; - - // If this isn't the only board in this category let the user choose where the board is to live. - if ((isset(Utils::$context['board']['is_new']) && count(Utils::$context['board_order']) > 0) || count(Utils::$context['board_order']) > 1) { - echo ' -
- ', Lang::getTxt('order', file: 'ManageBoards'), ' -
-
'; - - // The first select box gives the user the option to position it before, after or as a child of another board. - echo ' - '; - - // The second select box lists all the boards in the category. - echo ' - -
'; - } - - // Options for board name and description. - echo ' -
- ', Lang::getTxt('full_name', file: 'ManageBoards'), '
- ', Lang::getTxt('name_on_display', file: 'ManageBoards'), ' -
-
- -
-
- ', Lang::getTxt('mboards_description', file: 'ManageBoards'), '
- ', Lang::getTxt('mboards_description_desc', ['allowed_tags' => implode(', ', Utils::$context['description_allowed_tags'])], file: 'ManageBoards'), ' -
-
- -
-
- ', Lang::getTxt('permission_profile', file: 'ManagePermissions'), '
- ', Utils::$context['can_manage_permissions'] ? Lang::getTxt('permission_profile_desc', ['url' => Config::$scripturl . '?action=admin;area=permissions;sa=profiles;' . Utils::$context['session_var'] . '=' . Utils::$context['session_id']], file: 'ManagePermissions') : strip_tags(Lang::getTxt('permission_profile_desc', file: 'ManagePermissions')), ' -
-
- -
-
- ', Lang::getTxt('mboards_groups', file: 'ManageBoards'), '
- ', Lang::getTxt(empty(Config::$modSettings['deny_boards_access']) ? 'mboards_groups_desc' : 'boardsaccess_option_desc', file: 'ManageBoards'), ''; - - echo ' -
-
'; - - if (!empty(Config::$modSettings['deny_boards_access'])) { - echo ' - - - - - - - '; - } - - // List all the membergroups so the user can choose who may access this board. - foreach (Utils::$context['groups'] as $group) { - if (empty(Config::$modSettings['deny_boards_access'])) { - echo ' -
'; - } else { - echo ' - - - - - - - '; - } - } - - if (empty(Config::$modSettings['deny_boards_access'])) { - echo ' - - ', Lang::getTxt('check_all', file: 'General'), ' - -

- '; - } else { - echo ' - - - - - - - -
', Lang::getTxt('permissions_option_on', file: 'ManagePermissions'), '', Lang::getTxt('permissions_option_off', file: 'ManagePermissions'), '', Lang::getTxt('permissions_option_deny', file: 'ManagePermissions'), '
- - - - - - - -
- - - - - - - - ', Lang::getTxt('check_all', file: 'General'), ' -
-
'; - } - - // Options to choose moderators, specify as announcement board and choose whether to count posts here. - echo ' -
- ', Lang::getTxt('mboards_moderators', file: 'ManageBoards'), '
- ', Lang::getTxt('mboards_moderators_desc', file: 'ManageBoards'), '
-
-
- -
-
-
- ', Lang::getTxt('mboards_moderator_groups', file: 'ManageBoards'), '
- ', Lang::getTxt('mboards_moderator_groups_desc', file: 'ManageBoards'), '
-
-
- -
-
-
- -
'; - - if (empty(Utils::$context['board']['is_recycle']) && empty(Utils::$context['board']['topics'])) { - echo ' -
-
- ', Lang::getTxt('mboards_redirect', file: 'ManageBoards'), '
- ', Lang::getTxt('mboards_redirect_desc', file: 'ManageBoards'), '
-
-
- -
-
- -
-
-
- ', Lang::getTxt('mboards_redirect_url', file: 'ManageBoards'), '
- ', Lang::getTxt('mboards_redirect_url_desc', file: 'ManageBoards'), '
-
-
- -
-
-
'; - - if (Utils::$context['board']['redirect']) { - echo ' -
-
-
- ', Lang::getTxt('mboards_redirect_reset', file: 'ManageBoards'), '
- ', Lang::getTxt('mboards_redirect_reset_desc', file: 'ManageBoards'), '
-
-
- - (', Lang::getTxt('mboards_current_redirects', [Utils::$context['board']['posts']], file: 'ManageBoards'), ') -
-
-
'; - } - } - - echo ' -
-
-
- ', Lang::getTxt('mboards_count_posts', file: 'ManageBoards'), '
- ', Lang::getTxt('mboards_count_posts_desc', file: 'ManageBoards'), '
-
-
- -
-
-
'; - - // Here the user can choose to force this board to use a theme other than the default theme for the forum. - echo ' -
-
-
- ', Lang::getTxt('mboards_theme', file: 'ManageBoards'), '
- ', Lang::getTxt('mboards_theme_desc', file: 'ManageBoards'), '
-
-
- -
-
-
-
-
-
- ', Lang::getTxt('mboards_override_theme', file: 'ManageBoards'), '
- ', Lang::getTxt('mboards_override_theme_desc', file: 'ManageBoards'), '
-
-
- -
-
-
'; - - // Show any board settings added by mods using the 'integrate_edit_board' hook. - if (!empty(Utils::$context['custom_board_settings']) && is_array(Utils::$context['custom_board_settings'])) { - echo ' -
-
-
'; - - foreach (Utils::$context['custom_board_settings'] as $cbs_id => $cbs) { - if (!empty($cbs['dt']) && !empty($cbs['dd'])) { - echo ' -
- ', $cbs['dt'], ' -
- - ', $cbs['dd'], ' - '; - } - } - - echo ' -
-
'; - } - - if (!empty(Utils::$context['board']['is_recycle'])) { - echo ' -
', Lang::getTxt('mboards_recycle_disabled_delete', file: 'ManageBoards'), '
'; - } - - echo ' - - - '; - - // If this board has no children don't bother with the next confirmation screen. - if (Utils::$context['board']['no_children']) { - echo ' - '; - } - - if (isset(Utils::$context['board']['is_new'])) { - echo ' - - '; - } else { - echo ' - '; - } - - if (!isset(Utils::$context['board']['is_new']) && empty(Utils::$context['board']['is_recycle'])) { - echo ' - '; - } - echo ' -
-
-
- - '; - - // Javascript for deciding what to show. - echo ' - '; -} - -/** - * A template used when a user is deleting a board with child boards in it - to see what they want to do with them. - */ -function template_confirm_board_delete() -{ - // Print table header. - echo ' -
-
- - -
-

', Lang::getTxt('mboards_delete_board', file: 'ManageBoards'), '

-
-
-

', Lang::getTxt('mboards_delete_board_contains', file: 'ManageBoards'), '

-
    '; - - foreach (Utils::$context['children'] as $child) { - echo ' -
  • ', $child['node']['name'], '
  • '; - } - - echo ' -
-
-
-

', Lang::getTxt('mboards_delete_what_do', file: 'ManageBoards'), '

-
-
-

-
- : - -

- - - - - -
-
-
'; -} diff --git a/Themes/default/ManageCalendar.template.php b/Themes/default/ManageCalendar.template.php deleted file mode 100644 index 2cac9465481..00000000000 --- a/Themes/default/ManageCalendar.template.php +++ /dev/null @@ -1,102 +0,0 @@ - -
-

', Utils::$context['page_title'], '

-
-
'; - - template_event_options(); - - if (Utils::$context['is_new']) { - echo ' - '; - } else { - echo ' - - - '; - } - - echo ' - - -
- '; -} - -/** - * Importing iCalendar data. - */ -function template_import() -{ - // Show a form for all the holiday information. - echo ' -
-
-

', Utils::$context['page_title'], '

-
-
-
-
- -
- ', Lang::getTxt('calendar_import_url_desc', file: 'ManageCalendar'), ' -
-
- -
-
- -
-
- - -
-
- -
- ', Lang::getTxt('calendar_import_subscribe_desc', file: 'ManageCalendar'), ' -
-
- -
-
- - - -
-
'; - - if (!empty(Utils::$context['calendar_subscriptions'])) { - template_show_list('calendar_subscriptions'); - } -} diff --git a/Themes/default/ManageLanguages.template.php b/Themes/default/ManageLanguages.template.php deleted file mode 100644 index 9029b7f77fd..00000000000 --- a/Themes/default/ManageLanguages.template.php +++ /dev/null @@ -1,366 +0,0 @@ - -

- ', Lang::getTxt('languages_download_complete', file: 'ManageSettings'), ' -

- -
- ', Utils::$context['install_complete'], ' -
'; - - return; - } - - // An error? - if (!empty(Utils::$context['error_message'])) { - echo ' -
- ', Utils::$context['error_message'], ' -
'; - } - - // Provide something of an introduction... - echo ' -
-
-

- ', Lang::getTxt('languages_download', file: 'ManageSettings'), ' -

-
-
-

- ', Lang::getTxt('languages_download_note', file: 'ManageSettings'), ' -

-
- ', Lang::getTxt('languages_download_info', file: 'ManageSettings'), ' -
-
'; - - // Show the main files. - template_show_list('lang_main_files_list'); - - // Do we want some FTP baby? - // If the files are not writable, we might! - if (!empty(Utils::$context['still_not_writable'])) { - if (!empty(Utils::$context['package_ftp']['error'])) { - echo ' -
- ', Utils::$context['package_ftp']['error'], ' -
'; - } - - echo ' -
-

- ', Lang::getTxt('package_ftp_necessary', file: 'Packages'), ' -

-
-
-

', Lang::getTxt('package_ftp_why', file: 'Packages'), '

-
-
', Lang::getTxt('package_ftp_server', file: 'Packages'), ' -
-
-
- - -
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
-
-
'; - } - - // Install? - echo ' -
- - - -
-
'; -} - -/** - * Edit language entries. Note that this doesn't always work because of PHP's max_post_vars setting. - */ -function template_modify_language_entries() -{ - echo ' -
-
-

- ', Lang::getTxt('edit_languages', file: 'ManageSettings'), ' -

-
-
- ', Lang::getTxt('edit_language_entries_primary', file: 'ManageSettings'), ' -
'; - - // Not writable? Oops, show an error for ya. - if (!empty(Utils::$context['lang_file_not_writable_message'])) { - echo ' -
- ', Utils::$context['lang_file_not_writable_message'], ' -
'; - } - - // Show the language entries - echo ' -
-
- ', Utils::$context['primary_settings']['native_name']['value'], ' -
'; - - foreach (Utils::$context['primary_settings'] as $setting => $setting_info) { - if ($setting != 'name') { - echo ' -
- - -
-
- -
'; - } - } - - echo ' -
-
- - - - '; - - // Allow deleting entries. The default language and en_US can't go. - if (Utils::$context['can_delete_language']) { - echo ' - '; - } - - echo ' -
-
- -
-
-

- ', Lang::getTxt('edit_language_entries', file: 'ManageSettings'), ' -

-
-
-
- ', Lang::getTxt('edit_language_entries_desc', file: 'ManageSettings'), ' -
-
-
- ', Lang::getTxt('edit_language_entries_file', file: 'ManageSettings'), ' - - - - -
-
'; - - // Is it not writable? Show an error. - if (!empty(Utils::$context['entries_not_writable_message'])) { - echo ' -
- ', Utils::$context['entries_not_writable_message'], ' -
'; - } - - // Already have some file entries? - if (!empty(Utils::$context['file_entries'])) { - echo ' -
'; - - $entry_num = 0; - - foreach (Utils::$context['file_entries'] as $group => $entries) { - echo ' -
- - - ', Lang::getTxt('languages_' . $group, file: 'ManageSettings'), ' - -
'; - - foreach ($entries as $entry) { - ++$entry_num; - - echo ' -
- ', $entry['key'], isset($entry['subkey']) ? '[' . $entry['subkey'] . ']' : '', ' -
-
'; - - if ($entry['can_remove']) { - echo ' - - - - - - - - - - - - '; - } else { - echo ' - - '; - } - - echo ' - - - -
'; - } - - echo ' -
'; - - if (!empty(Utils::$context['can_add_lang_entry'][$group])) { - echo ' - - '; - } - - echo ' -
'; - } - - echo ' - -
'; - } - - echo ' -
'; -} - -/** - * Add a new language - * - */ -function template_add_language() -{ - echo ' -
-
-

- ', Lang::getTxt('add_language', file: 'ManageSettings'), ' -

-
-
-
- ', Lang::getTxt('add_language_smf', file: 'ManageSettings'), ' - - '; - - // Do we have some errors? Too bad. Display a little error box. - if (!empty(Utils::$context['smf_error'])) { - echo ' -
-
-

', Lang::getTxt('add_language_error_' . Utils::$context['smf_error'], file: 'ManageSettings'), '

-
'; - } - - echo ' -
- ', BrowserDetector::isBrowser('is_ie') ? ' ' : '', ' - -
-
'; - - // Had some results? - if (!empty(Utils::$context['smf_languages']['rows'])) { - echo ' -
-

', Lang::getTxt('add_language_found_title', file: 'ManageSettings'), '

-
-
', Lang::getTxt('add_language_smf_found', file: 'ManageSettings'), '
'; - - template_show_list('smf_languages'); - } - - echo ' -
'; -} diff --git a/Themes/default/ManageMail.template.php b/Themes/default/ManageMail.template.php deleted file mode 100644 index 4ebe9429a8e..00000000000 --- a/Themes/default/ManageMail.template.php +++ /dev/null @@ -1,79 +0,0 @@ - -
-
-

', Lang::getTxt('mailqueue_stats', file: 'ManageMail'), '

-
-
-
-
', Lang::getTxt('mailqueue_size', file: 'ManageMail'), '
-
', Utils::$context['mail_queue_size'], '
-
', Lang::getTxt('mailqueue_oldest', file: 'ManageMail'), '
-
', Utils::$context['oldest_mail'], '
-
-
-
'; - - template_show_list('mail_queue'); - - echo ' - '; -} - -/** - * Template for testing mail send. - */ - -function template_mailtest() -{ - // The results. - if (!empty(Utils::$context['result'])) { - if (Utils::$context['result'] == 'failure') { - $result_txt = Lang::getTxt('mailtest_result_failure', ['url' => Config::$scripturl . '?action=admin;area=logs;sa=errorlog;desc'], file: 'ManageMail'); - } else { - $result_txt = Lang::getTxt('mailtest_result_success', file: 'ManageMail'); - } - - echo ' -
', $result_txt, '
'; - } - - echo ' -
-
-

', Lang::getTxt('mailtest_header', file: 'ManageMail'), '

-
-
-
-
-
-
- -
-
-
-
-
'; -} diff --git a/Themes/default/ManageMaintenance.template.php b/Themes/default/ManageMaintenance.template.php deleted file mode 100644 index ac3bbe8314b..00000000000 --- a/Themes/default/ManageMaintenance.template.php +++ /dev/null @@ -1,478 +0,0 @@ -'; - - // If maintenance has finished tell the user. - if (!empty(Utils::$context['maintenance_finished'])) { - echo ' -
- ', Lang::getTxt('maintain_done', ['task' => Utils::$context['maintenance_finished']], file: 'Admin'), ' -
'; - } -} - -function template_maintain_below() -{ - echo ' - '; -} - -/** - * Lists the tasks of a maintenance sub-action as a single pick-one form. - * - * Utils::$context['options'] is keyed by activity name. A task can override its - * label and description with 'title' and 'info', and add markup after the - * description with 'after'. - */ -function template_maintain_options() -{ - echo ' -
'; - - foreach (Utils::$context['options'] as $activity => $option) { - echo ' - '; - } - - echo ' - - - -
'; -} - -/** - * Template for the member maintenance tasks. - */ -function template_maintain_members() -{ - echo ' - -
'; - - // If maintenance has finished, tell the user. - if (!empty(Utils::$context['maintenance_finished'])) { - echo ' -
- ', Lang::getTxt('maintain_done', ['task' => Utils::$context['maintenance_finished']], file: 'Admin'), ' -
'; - } - - echo ' -
-

', Lang::getTxt('maintain_reattribute_posts', file: 'ManageMaintenance'), '

-
-
-
-

', Lang::getTxt('reattribute_guest_posts', file: 'ManageMaintenance'), '

-
-
- -
-
- -
-
- -
-
- -
-
-
-
- -
-
- -
-
-

- - -

- - - -
-
-
-

- ', Lang::getTxt('maintain_members', file: 'ManageMaintenance'), ' -

-
-
-
-
- ', - Lang::getTxt( - 'maintain_members_since', - [ - 'input_condition' => '', - 'input_number' => '', - ], - file: 'ManageMaintenance', - ), ' -
-
'; - - if (!empty(Config::$modSettings['always_anonymize_deleted_accounts'])) { - echo ' - ' . Lang::getTxt('deleteAccount_anonymize_forced', file: 'Profile'); - } else { - echo ' - '; - } - - echo ' -
- - - - - -
-
-
-

', Lang::getTxt('maintain_recountposts', file: 'ManageMaintenance'), '

-
-
-
-

', Lang::getTxt('maintain_recountposts_info', file: 'ManageMaintenance'), '

- - - -
-
-
- - '; -} - -/** - * Template for the topic maintenance tasks. - */ -function template_maintain_topics() -{ - // If maintenance has finished tell the user. - if (!empty(Utils::$context['maintenance_finished'])) { - echo ' -
- ', Lang::getTxt('maintain_done', ['task' => Utils::$context['maintenance_finished']], file: 'Admin'), ' -
'; - } - - // Bit of javascript for showing which boards to prune in an otherwise hidden list. - echo ' - '; - - echo ' -
-
-

', Lang::getTxt('maintain_old', file: 'ManageMaintenance'), '

-
-
-
-
'; - - // The otherwise hidden "choose which boards to prune". - echo ' -

- ', Lang::getTxt('maintain_old_since_days', ['input_number' => ''], file: 'ManageMaintenance'), ' -

-

-
-
-
-

-

-
-

-

- + ', Lang::getTxt('maintain_old_all', file: 'ManageMaintenance'), ' -

- - - - -
-
-
- -
-

', Lang::getTxt('maintain_old_drafts', file: 'ManageMaintenance'), '

-
-
-
-

- ', Lang::getTxt('maintain_old_drafts_days', ['input_number' => ''], file: 'ManageMaintenance'), ' -

- - - -
-
-
-

', Lang::getTxt('move_topics_maintenance', file: 'ManageMaintenance'), '

-
-
-
-

- '; - - $board_select = [ - '', - ]; - - foreach (Utils::$context['categories'] as $category) { - $board_select[] = ''; - - foreach ($category['boards'] as $board) { - $board_select[] = "\t" . ''; - } - - $board_select[] = ''; - } - - - echo Lang::getTxt( - 'move_topics_from', - [ - 'old' => ' - ', - 'new' => ' - ', - ], - file: 'ManageMaintenance', - ); - - echo ' -

-

- ', Lang::getTxt('move_topics_older_than', ['input_number' => ''], file: 'ManageMaintenance'), ' (', Lang::getTxt('move_zero_all', file: 'ManageMaintenance'), ') -

-

-
-
-

- - - -
-
-
'; -} - -/** - * Simple template for showing results of our optimization... - */ -function template_optimize() -{ - echo ' -
-
-

', Lang::getTxt('maintain_optimize', file: 'ManageMaintenance'), '

-
-
-

- ', Utils::$context['database_numb_tables'], '
- ', Lang::getTxt('database_optimize_attempt', file: 'ManageMaintenance'), '
'; - - // List each table being optimized... - foreach (Utils::$context['optimized_tables'] as $table) { - echo ' - ', Lang::getTxt('database_optimizing', [$table['name'], round($table['data_freed'], 2)], file: 'ManageMaintenance'), '
'; - } - - // How did we go? - echo ' -
- ', Utils::$context['num_tables_optimized'] == 0 ? Lang::getTxt('database_already_optimized', file: 'ManageMaintenance') : Utils::$context['num_tables_optimized'] . ' ' . Lang::getTxt('database_optimized', file: 'ManageMaintenance'); - - echo ' -

-

', Lang::getTxt('maintain_return', file: 'ManageMaintenance'), '

-
-
'; -} - -/** - * Template for converting entities to UTF-8 characters - */ -function template_convert_entities() -{ - echo ' -
-
-

', Lang::getTxt('entity_convert_title', file: 'ManageMaintenance'), '

-
-
-

', Lang::getTxt('entity_convert_introduction', file: 'ManageMaintenance'), '

-
- -
-
-
'; -} diff --git a/Themes/default/ManageMembergroups.template.php b/Themes/default/ManageMembergroups.template.php deleted file mode 100644 index 463322c3465..00000000000 --- a/Themes/default/ManageMembergroups.template.php +++ /dev/null @@ -1,772 +0,0 @@ -
'; - - template_show_list('post_count_membergroups_list'); -} - -/** - * Add a new membergroup. - */ -function template_new_group() -{ - echo ' -
-
-

', Lang::getTxt('membergroups_new_group', file: 'Admin'), '

-
-
-
-
- -
-
- -
'; - - if (Utils::$context['undefined_group']) { - echo ' -
- -
-
-
- ', Lang::getTxt('membergroups_edit_select_group_type', file: 'ManageMembers'), ' -
'; - - if (Utils::$context['allow_protected']) { - echo ' -
'; - } - - echo ' -
-
-
-
-
'; - } - - if (Utils::$context['post_group'] || Utils::$context['undefined_group']) { - echo ' -
- -
-
- -
'; - } - - if (!Utils::$context['post_group'] || !empty(Config::$modSettings['permission_enable_postgroups'])) { - echo ' -
-
- ', Lang::getTxt('membergroups_can_edit_later', file: 'ManageMembers'), ' -
-
-
- ', Lang::getTxt('membergroups_select_permission_type', file: 'ManageMembers'), ' - - - -
- - - -
- - - -
-
'; - } - - echo ' -
- ', Lang::getTxt('membergroups_new_board', file: 'ManageMembers'), '', Utils::$context['post_group'] ? '
- ' . Lang::getTxt('membergroups_new_board_post_groups', file: 'ManageMembers') . '' : '', ' -
-
'; - - template_add_edit_group_boards_list(false); - - echo ' -
-
- -
'; - - if (Utils::$context['undefined_group']) { - echo ' - '; - } - - echo ' - - -
'; -} - -/** - * Edit an existing membergroup. - */ -function template_edit_group() -{ - echo ' -
-
-

', Lang::getTxt('membergroups_edit_group', ['name' => Utils::$context['group']['name']], file: 'ManageMembers'), ' -

-
-
-
-
- -
-
- -
'; - - if (Utils::$context['group']['id'] != 3 && Utils::$context['group']['id'] != 4) { - echo ' -
- -
-
- -
'; - } - - // Group type... - if (Utils::$context['group']['can_change_type']) { - echo ' -
- -
-
-
- ', Lang::getTxt('membergroups_edit_select_group_type', file: 'ManageMembers'), ' -
'; - - if (Utils::$context['group']['allow_protected']) { - echo ' -
'; - } - - echo ' -
-
'; - - if (Utils::$context['group']['allow_post_group']) { - echo ' - -
'; - } - - echo ' -
-
'; - } - - if (Utils::$context['group']['id'] != 3 && Utils::$context['group']['id'] != 4) { - echo ' -
- -
-
- -
-
-
- -
-
- -
'; - } - - // Can they inherit permissions? - if (Utils::$context['group']['id'] > 1 && Utils::$context['group']['id'] != 3) { - echo ' -
-
- ', Lang::getTxt('membergroups_edit_inherit_permissions_desc', file: 'ManageMembers'), ' -
-
- - -
'; - } - - if (Utils::$context['group']['allow_post_group']) { - echo ' - -
- -
-
- -
'; - } - - echo ' -
- -
-
- -
-
- -
-
- -
'; - - // Do we have any possible icons to select from? - if (!empty(Utils::$context['possible_icons'])) { - echo ' -
-
- ', Lang::getTxt('membergroups_icon_image_note', file: 'ManageMembers'), ' - ', Lang::getTxt('membergroups_icon_image_size', file: 'ManageMembers'), ' -
-
- ', Lang::getTxt('membergroups_images_url', file: 'ManageMembers'), ' - - * -
'; - } - - // No? Hide the entire control. - else { - echo ' - '; - } - - echo ' -
-
- ', Lang::getTxt('membergroups_max_messages_note', file: 'ManageMembers'), ' -
-
- -
'; - - // Force 2FA for this membergroup? - if (!empty(Config::$modSettings['tfa_mode']) && Config::$modSettings['tfa_mode'] == 2) { - echo ' -
-
- ', Lang::getTxt('membergroups_tfa_force_note', file: 'ManageMembers'), ' -
-
- -
'; - } - - if (!empty(Utils::$context['categories'])) { - echo ' -
- ', Lang::getTxt('membergroups_new_board', file: 'ManageMembers'), '', Utils::$context['group']['is_post_group'] ? '
- ' . Lang::getTxt('membergroups_new_board_post_groups', file: 'ManageMembers') . '' : '', ' -
-
'; - - if (!empty(Utils::$context['can_manage_boards'])) { - echo Lang::getTxt('membergroups_can_manage_access', file: 'ManageMembers'); - } else { - template_add_edit_group_boards_list(true, 'groupForm'); - } - - echo ' -
'; - } - - echo ' -
- ', Utils::$context['group']['allow_delete'] ? ' - ' : '', ' -
- - -
- '; - - if (Utils::$context['group']['allow_post_group']) { - echo ' - '; - } -} - -/** - * The template for determining which boards a group has access to. - * - * @param bool $collapse Whether to collapse the list by default - */ -function template_add_edit_group_boards_list($collapse = true, $form_id = 'new_group') -{ - echo ' -
- ', Lang::getTxt('membergroups_new_board_desc', file: 'ManageMembers'), ' -
    '; - - foreach (Utils::$context['categories'] as $category) { - if (empty(Config::$modSettings['deny_boards_access'])) { - echo ' -
  • - ', $category['name'], ' -
      '; - } else { - echo ' -
    • - ', $category['name'], ' - - ', Lang::getTxt('all_boards_in_cat', file: 'Admin'), ' - - -
        '; - } - - foreach ($category['boards'] as $board) { - if (empty(Config::$modSettings['deny_boards_access'])) { - echo ' -
      • - -
      • '; - } else { - echo ' -
      • - ', $board['name'], ': - - - - - -
      • '; - } - } - - echo ' -
      -
    • '; - } - - echo ' -
    '; - - if (empty(Config::$modSettings['deny_boards_access'])) { - echo ' -

    - - -
'; - } else { - echo ' -
- - ', Lang::getTxt('all', file: 'General'), ' - - - - - - '; - } - - if ($collapse) { - echo ' - - '; - } -} - -/** - * Template for viewing the members of a group. - */ -function template_group_members() -{ - echo ' -
-
-

', Utils::$context['page_title'], '

-
-
-
-
- ', Lang::getTxt('name', file: 'General'), ' -
-
- ', Utils::$context['group']['name'], ' ', Utils::$context['group']['icons'], ' -
'; - - // Any description to show? - if (!empty(Utils::$context['group']['description'])) { - echo ' -
- ' . Lang::getTxt('membergroups_members_description', file: 'ManageMembers') . ' -
-
- ', Utils::$context['group']['description'], ' -
'; - } - - echo ' -
- ', Lang::getTxt('membergroups_members_top', file: 'ManageMembers'), ' -
-
- ', Utils::$context['total_members'], ' -
'; - - // Any group moderators to show? - if (!empty(Utils::$context['group']['moderators'])) { - $moderators = []; - - foreach (Utils::$context['group']['moderators'] as $moderator) { - $moderators[] = '' . $moderator['name'] . ''; - } - - echo ' -
- ', Lang::getTxt('membergroups_members_group_moderators', file: 'ManageMembers'), ' -
-
- ', implode(', ', $moderators), ' -
'; - } - - echo ' -
-
-
-
-

', Lang::getTxt('membergroups_members_group_members', file: 'ManageMembers'), '

-
-
-
- -
- - - - '; - - if (Utils::$context['can_send_email']) { - echo ' - '; - } - - echo ' - - - '; - - if (!empty(Utils::$context['can_add_remove'])) { - echo ' - '; - } - - echo ' - - - '; - - if (empty(Utils::$context['members'])) { - echo ' - - - '; - } - - foreach (Utils::$context['members'] as $member) { - echo ' - - '; - - if (Utils::$context['can_send_email']) { - echo ' - '; - } - - echo ' - - - '; - - if (!empty(Utils::$context['can_add_remove'])) { - echo ' - '; - } - - echo ' - '; - } - - echo ' - -
', Lang::getTxt('name', file: 'General'), Utils::$context['sort_by'] == 'name' ? ' ' : '', '', Lang::getTxt('membergroups_members_last_active', file: 'ManageMembers'), Utils::$context['sort_by'] == 'active' ? '' : '', '', Lang::getTxt('date_registered', file: 'General'), Utils::$context['sort_by'] == 'registered' ? '' : '', ' - ', Lang::getTxt('posts', file: 'General'), Utils::$context['sort_by'] == 'posts' ? ' ' : '', ' -
', Lang::getTxt('membergroups_members_no_members', file: 'ManageMembers'), '
', $member['link'], '', $member['last_login'], '', $member['registered'], '', $member['posts'], 'id == $member['id'] && Utils::$context['group']['id'] == 1 ? 'onclick="if (this.checked) return confirm(\'' . Lang::getTxt('membergroups_members_deadmin_confirm', file: 'ManageMembers') . '\')" ' : ''), '/>
'; - - if (!empty(Utils::$context['can_add_remove'])) { - echo ' -
- -
'; - } - - echo ' -
- -
-
'; - - if (!empty(Utils::$context['can_add_remove'])) { - echo ' -
-

', Lang::getTxt('membergroups_members_add_title', file: 'ManageMembers'), '

-
-
-
-
- -
-
- -
-
-
- -
'; - } - - echo ' - - -
'; - - if (!empty(Utils::$context['can_add_remove'])) { - echo ' - '; - } -} - -/** - * Allow the moderator to enter a reason to each user being rejected. - */ -function template_group_request_reason() -{ - // Show a welcome message to the user. - echo ' -
-
-
-

', Lang::getTxt('mc_groups_reason_title', file: 'ModerationCenter'), '

-
-
-
'; - - // Loop through and print out a reason box for each... - foreach (Utils::$context['group_requests'] as $request) { - echo ' -
- ', Lang::getTxt('mc_groupr_reason_desc', $request, file: 'ModerationCenter'), ': -
-
- - -
'; - } - - echo ' -
- - - - -
-
-
'; -} diff --git a/Themes/default/ManageMembers.template.php b/Themes/default/ManageMembers.template.php deleted file mode 100644 index 1fca2cc54f9..00000000000 --- a/Themes/default/ManageMembers.template.php +++ /dev/null @@ -1,299 +0,0 @@ - - -
-

- ', Lang::getTxt('search_for', file: 'General'), ' - ', Lang::getTxt('wild_cards_allowed', file: 'Admin'), ' -

-
-
-
-
-
-
- - -
-
- -
-
- - -
-
- -
-
- - -
-
- -
-
- - -
-
- -
-
- - -
-
- -
-
-
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
-
- ', Lang::getTxt('activation_status', file: 'Admin'), ' -    - -
-
-
-
-
-

', Lang::getTxt('member_part_of_these_membergroups', file: 'Admin'), '

-
- - - - - - - - - '; - - foreach (Utils::$context['membergroups'] as $membergroup) { - echo ' - - - - - '; - } - - echo ' - - - - - - -
', Lang::getTxt('membergroups', file: 'Admin'), '', Lang::getTxt('primary', file: 'Admin'), '', Lang::getTxt('additional', file: 'Admin'), '
', $membergroup['name'], ' - - - ', $membergroup['can_be_additional'] ? '' : '', ' -
- ', Lang::getTxt('check_all', file: 'General'), ' - - - - -
- - - - - - - - '; - - foreach (Utils::$context['postgroups'] as $postgroup) { - echo ' - - - - '; - } - - echo ' - - - - - -
- ', Lang::getTxt('membergroups_postgroups', file: 'ManageMembers'), ' -
- ', $postgroup['name'], ' - - -
- ', Lang::getTxt('check_all', file: 'General'), ' - - -
-
- - '; -} - -/** - * The admin member list. - */ -function template_admin_browse() -{ - template_show_list('approve_list'); - - // If we have lots of outstanding members try to make the admin's life easier. - if (Utils::$context['approve_list']['total_num_items'] > -1) { - Utils::$context['browse_type'] = 'activate'; - echo ' -
-
-
-

', Lang::getTxt('admin_browse_outstanding', file: 'ManageMembers'), '

-
- - -
-

- ', - Lang::getTxt( - 'admin_browse_outstanding_days', - [ - 'input' => '', - 'number' => 14, - ], - file: 'ManageMembers', - ), ' -

-
-
- ', Lang::getTxt('admin_browse_outstanding_perform', file: 'ManageMembers'), ': -
-
- -
-
- - - - - - ', !empty(Utils::$context['approve_list']['sort']['desc']) ? ' - ' : '', ' -
- -
'; - } -} diff --git a/Themes/default/ManageNews.template.php b/Themes/default/ManageNews.template.php deleted file mode 100644 index f539576deaf..00000000000 --- a/Themes/default/ManageNews.template.php +++ /dev/null @@ -1,432 +0,0 @@ -', Lang::getTxt('admin_news_newsletter_' . Utils::$context['newsletter_sent'], file: 'Admin'), ''; - } - - echo ' -
-
-

', Lang::getTxt('admin_newsletters', file: 'Admin'), '

-
-
- ', Lang::getTxt('admin_news_select_recipients', file: 'Admin'), ' -
-
-
-
- ', Lang::getTxt('admin_news_select_group', file: 'Admin'), '
- ', Lang::getTxt('admin_news_select_group_desc', file: 'Admin'), ' -
-
'; - - foreach (Utils::$context['groups'] as $group) { - echo ' - (', $group['member_count'] ?? Lang::getTxt('not_applicable', file: 'General'), ')
'; - } - - echo ' -
- -
-
- -
-
-
- ', Lang::getTxt('admin_news_select_email', file: 'Admin'), '
- ', Lang::getTxt('admin_news_select_email_desc', file: 'Admin'), ' -
-
- -
-
- ', Lang::getTxt('admin_news_select_members', file: 'Admin'), '
- ', Lang::getTxt('admin_news_select_members_desc', file: 'Admin'), ' -
-
- - -
-
-
-
-
- ', Lang::getTxt('admin_news_select_excluded_groups', file: 'Admin'), '
- ', Lang::getTxt('admin_news_select_excluded_groups_desc', file: 'Admin'), ' -
-
'; - - foreach (Utils::$context['groups'] as $group) { - echo ' - (', $group['member_count'], ')
'; - } - - echo ' -
-
-
-
- ', Lang::getTxt('admin_news_select_excluded_members', file: 'Admin'), '
- ', Lang::getTxt('admin_news_select_excluded_members_desc', file: 'Admin'), ' -
-
- - -
-
-
-
-
-
- ', Lang::getTxt('email_force', file: 'Admin'), ' -
-
- -
-
-
-
- - -
-
'; - - // This is some javascript for the simple/advanced toggling and member suggest - echo ' - - '; -} - -/** - * The form for composing a newsletter - */ -function template_email_members_compose() -{ - echo ' - -
'; - - echo ' -
-
-

- ', Lang::getTxt('admin_newsletters', file: 'Admin'), ' -

-
-
- ', Lang::getTxt('email_variables', ['scripturl' => Config::$scripturl], file: 'Admin'), ' -
-
- -
-
- ', Lang::getTxt('subject', file: 'General'), ' -
-
- -
-
-
'; - - // What about smileys? - if (!empty(Utils::$context['smileys']['postform']) || !empty(Utils::$context['smileys']['popup'])) { - echo ' -
'; - } - - // Show BBC buttons, smileys and textbox. - echo ' - ', template_control_richedit(Utils::$context['post_box_name'], 'smileyBox_message', 'bbcBox_message'); - - echo ' -
    -
  • -
  • -
  • -
- - ', template_control_richedit_buttons(Utils::$context['post_box_name']), ' - -
- - - '; - - foreach (Utils::$context['recipients'] as $key => $values) { - echo ' - '; - } - - echo ' - '; - - echo ' - -
'; -} - -/** - * The page shown while the newsletter is being sent - */ -function template_email_members_send() -{ - echo ' -
-
-

- ', Lang::getTxt('admin_newsletters', file: 'Admin'), ' -

-
-
-
- ', Lang::getTxt('email_done', Utils::$context, file: 'Admin'), ' -
-
-
- - - - - - - - - - '; - - // All the things we must remember! - foreach (Utils::$context['recipients'] as $key => $values) { - echo ' - '; - } - - echo ' -
-
- - '; -} - -/** - * The settings page. - */ -function template_news_lists() -{ - if (!empty(Utils::$context['saved_successful'])) { - echo ' -
', Lang::getTxt('settings_saved', file: 'Admin'), '
'; - } - - template_show_list('news_lists'); -} diff --git a/Themes/default/ManagePaid.template.php b/Themes/default/ManagePaid.template.php deleted file mode 100644 index ef42ca4bcd0..00000000000 --- a/Themes/default/ManagePaid.template.php +++ /dev/null @@ -1,603 +0,0 @@ -'; - - if (!empty(Utils::$context['disable_groups'])) { - echo ' -
', Lang::getTxt('paid_mod_edit_note', file: 'ManagePaid'), '
'; - } - - echo ' -
-

', Lang::getTxt('paid_' . Utils::$context['action_type'] . '_subscription', file: 'ManagePaid'), '

-
-
-
-
- ', Lang::getTxt('paid_mod_name', file: 'ManagePaid'), ' -
-
- -
-
- ', Lang::getTxt('paid_mod_desc', file: 'ManagePaid'), ' -
-
- -
-
- -
-
- -
-
-
', Lang::getTxt('paid_mod_active_desc', file: 'ManagePaid'), ' -
-
- -
-
-
-
-
- ', Lang::getTxt('paid_mod_prim_group', file: 'ManagePaid'), '
- ', Lang::getTxt('paid_mod_prim_group_desc', file: 'ManagePaid'), ' -
-
- -
-
- ', Lang::getTxt('paid_mod_add_groups', file: 'ManagePaid'), ':
- ', Lang::getTxt('paid_mod_add_groups_desc', file: 'ManagePaid'), ' -
-
'; - - // Put a checkbox in for each group - foreach (Utils::$context['groups'] as $id => $name) { - echo ' -
'; - } - - echo ' -
-
- ', Lang::getTxt('paid_mod_reminder', file: 'ManagePaid'), '
- ', Lang::getTxt('paid_mod_reminder_desc', file: 'ManagePaid'), ' ', Lang::getTxt('zero_to_disable', file: 'Admin'), ' -
-
- -
-
- ', Lang::getTxt('paid_mod_email', file: 'ManagePaid'), '
- ', Lang::getTxt('paid_mod_email_desc', file: 'ManagePaid'), ' -
-
- -
-
-
- - -
-
-
-
-
- ', Lang::getTxt('paid_cost', file: 'ManagePaid'), ' (', str_replace('%1.2f', '', Config::$modSettings['paid_currency_symbol']), ') -
-
- -
-
- ', Lang::getTxt('paid_mod_span', file: 'ManagePaid'), ' -
-
- - -
-
-
-
- - -
-
-
'; - - echo ' -
- ', Lang::getTxt('paid_mod_price_breakdown', file: 'ManagePaid'), '
- ', Lang::getTxt('paid_mod_price_breakdown_desc', file: 'ManagePaid'), ' -
-
-
- ', Lang::getTxt('paid_duration', file: 'ManagePaid'), ' -
-
- ', Lang::getTxt('paid_cost', file: 'ManagePaid'), ' (', preg_replace('~%[df\.\d]+~', '', Config::$modSettings['paid_currency_symbol']), ') -
-
- ', Lang::getTxt('paid_per_day', file: 'ManagePaid'), ' -
-
- -
-
- ', Lang::getTxt('paid_per_week', file: 'ManagePaid'), ' -
-
- -
-
- ', Lang::getTxt('paid_per_month', file: 'ManagePaid'), ' -
-
- -
-
- ', Lang::getTxt('paid_per_year', file: 'ManagePaid'), ' -
-
- -
-
-
-
- - - -
- '; -} - -/** - * The page for deleting a subscription. - */ -function template_delete_subscription() -{ - echo ' -
-
-

', Lang::getTxt('paid_delete_subscription', file: 'ManagePaid'), '

-
-
-

', Lang::getTxt('paid_mod_delete_warning', file: 'ManagePaid'), '

- - - -
-
'; -} - -/** - * Add or edit an existing subscriber. - */ -function template_modify_user_subscription() -{ - // The year lists below have to reach whatever dates this subscription - // already carries, however far out they are, and leave room to pick - // something new either side of today. - $years = [ - Utils::$context['sub']['start']['year'], - Utils::$context['sub']['end']['year'], - (int) date('Y'), - ]; - - $first_year = min($years) - 10; - $last_year = max($years) + 10; - - echo ' -
-
-

', - Lang::getTxt( - 'paid_' . Utils::$context['action_type'] . '_subscription_name' . (empty(Utils::$context['sub']['username']) ? '' : '_for_member'), - [ - 'name' => Utils::$context['current_subscription']['name'], - 'member' => Utils::$context['sub']['username'] ?? '', - ], - file: 'ManagePaid', - ), - '

-
-
-
'; - - // Do we need a username? - if (Utils::$context['action_type'] == 'add') { - echo ' -
- ', Lang::getTxt('paid_username', file: 'ManagePaid'), '
- ', Lang::getTxt('one_username', file: 'ManagePaid'), ' -
-
- -
'; - } - - echo ' -
- ', Lang::getTxt('paid_status', file: 'ManagePaid'), ' -
-
- -
-
-
- ', Lang::getTxt('start_date_and_time', file: 'ManagePaid'), ' - - - -     - - : - -
-
- ', Lang::getTxt('end_date_and_time', file: 'ManagePaid'), ' - - - -     - - : - -
- -
- -
- '; - - if (!empty(Utils::$context['pending_payments'])) { - echo ' -
-

', Lang::getTxt('pending_payments', file: 'ManagePaid'), '

-
-
- ', Lang::getTxt('pending_payments_desc', file: 'ManagePaid'), ' -
-
-

', Lang::getTxt('pending_payments_value', file: 'ManagePaid'), '

-
-
- '; - } - - echo ' -
'; -} - -/** - * Template for a user to edit/pick their subscriptions. - */ -function template_user_subscription() -{ - echo ' - '; -} - -/** - * The "choose payment" dialog. - */ -function template_choose_payment() -{ - echo ' - -
'; -} - -/** - * The "thank you" bit... - */ -function template_paid_done() -{ - echo ' - '; -} diff --git a/Themes/default/ManageScheduledTasks.template.php b/Themes/default/ManageScheduledTasks.template.php deleted file mode 100644 index f61501acf3c..00000000000 --- a/Themes/default/ManageScheduledTasks.template.php +++ /dev/null @@ -1,114 +0,0 @@ - - ', Lang::getTxt('scheduled_tasks_were_run', file: 'ManageScheduledTasks'), ' - '; - } else { - echo ' -
-
-
- ', Lang::getTxt('scheduled_tasks_were_run_errors', file: 'ManageScheduledTasks'), ' -
'; - - foreach (Utils::$context['scheduled_errors'] as $task => $errors) { - echo ' -
- ', Lang::txtExists('scheduled_task_' . $task, file: 'ManageScheduledTasks') ? Lang::getTxt('scheduled_task_' . $task, file: 'ManageScheduledTasks') : $task, ' -
    -
  • ', implode('
  • ', $errors), '
  • -
-
'; - } - - echo ' -
-
'; - } - } - - template_show_list('scheduled_tasks'); -} - -/** - * A template for, you guessed it, editing a task! - */ -function template_edit_scheduled_tasks() -{ - // Starts off with general maintenance procedures. - echo ' -
-
-

', Lang::getTxt('scheduled_task_edit', file: 'ManageScheduledTasks'), '

-
-
- ', Lang::getTxt('scheduled_task_time_offset', Utils::$context, file: 'ManageScheduledTasks'), ' -
-
-
-
- ', Lang::getTxt('scheduled_tasks_name', file: 'ManageScheduledTasks'), ' -
-
- ', Utils::$context['task']['name'], '
- ', Utils::$context['task']['desc'], ' -
-
- -
-
- ', Lang::getTxt('scheduled_task_edit_repeat', file: 'ManageScheduledTasks'), ' - - -
-
-
- ', Lang::getTxt('scheduled_task_edit_start_time_desc', file: 'ManageScheduledTasks'), ' -
-
- -
-
- -
-
- -
-
-
- - - -
-
-
'; -} diff --git a/Themes/default/ManageSearch.template.php b/Themes/default/ManageSearch.template.php deleted file mode 100644 index a69771ff785..00000000000 --- a/Themes/default/ManageSearch.template.php +++ /dev/null @@ -1,449 +0,0 @@ - -
-

', Lang::getTxt('search_weights', file: 'Admin'), '

-
-
-
-
- -
-
- - - - ', Utils::$context['relative_weights']['search_weight_frequency'], '% -
-
- - -
-
- - - - ', Utils::$context['relative_weights']['search_weight_age'], '% -
-
- - -
-
- - - - ', Utils::$context['relative_weights']['search_weight_length'], '% -
-
- - -
-
- - - - ', Utils::$context['relative_weights']['search_weight_subject'], '% -
-
- - -
-
- - - - ', Utils::$context['relative_weights']['search_weight_first_message'], '% -
-
- - -
-
- - - - ', Utils::$context['relative_weights']['search_weight_sticky'], '% -
-
- ', Lang::getTxt('search_weights_total', file: 'Search'), ' -
-
- - ', Utils::$context['relative_weights']['total'], ' - - 100% -
-
- - - -
- '; -} - -/** - * Select the search method. - */ -function template_select_search_method() -{ - echo ' -
-

', Lang::getTxt('search_method', file: 'Admin'), '

-
- -
-
-

', Lang::getTxt('search_method', file: 'Admin'), '

-
-
-
'; - - if (!empty(Utils::$context['table_info'])) { - echo ' -
- ', Lang::getTxt('search_method_messages_table_space', file: 'Search'), ' -
-
- ', Utils::$context['table_info']['data_length'], ' -
-
- ', Lang::getTxt('search_method_messages_index_space', file: 'Search'), ' -
-
- ', Utils::$context['table_info']['index_length'], ' -
'; - } - echo ' -
- ', Utils::$context['double_index'] ? '
- ' . Lang::getTxt('search_double_index', file: 'Search') . '
' : '', ' -
- ', Lang::getTxt('search_index', file: 'Search'), ' -
-
- -
'; - - foreach (Utils::$context['search_apis'] as $api) { - if ($api['has_template'] || $api['instance']->getStatus() === 'hidden') { - continue; - } - - echo ' -
-
- -
-
- '; - - if (Lang::txtExists($api['instance']->getDescription(), file: 'Search')) { - echo Lang::getTxt($api['instance']->getDescription(), file: 'Search'); - } - - if ($api['instance']->getStatus() !== null) { - if (Lang::txtExists($api['instance']->getDescription(), file: 'Search')) { - echo ' -
'; - } - - $admin_subactions = $api['instance']->getAdminSubactions(); - - switch ($api['instance']->getStatus()) { - case 'exists': - $index_status = 'search_method_index_already_exists'; - $buttons = []; - - $sa = $admin_subactions['remove']['sa']; - - foreach ($admin_subactions['remove']['extra_params'] as $key => $value) { - $sa .= ';' . (is_int($key) ? '' : $key . '=') . $value; - } - - $buttons[$sa] = 'search_index_remove'; - break; - - case 'partial': - $index_status = 'search_method_index_partial'; - $buttons = []; - - foreach (['resume', 'remove'] as $type) { - $sa = $admin_subactions[$type]['sa']; - - foreach ($admin_subactions[$type]['extra_params'] as $key => $value) { - $sa .= ';' . (is_int($key) ? '' : $key . '=') . $value; - } - - $buttons[$sa] = 'search_index_' . $type; - } - break; - - default: - $index_status = 'search_method_no_index_exists'; - $buttons = []; - - $sa = $admin_subactions['build']['sa']; - - foreach ($admin_subactions['build']['extra_params'] as $key => $value) { - $sa .= ';' . (is_int($key) ? '' : $key . '=') . $value; - } - - $buttons[$sa] = 'search_create_index_start'; - break; - } - - echo Lang::getTxt( - $index_status, - [ - 'index' => Lang::getTxt( - Lang::txtExists($api['instance']->getLabel(), file: 'Search') ? $api['instance']->getLabel() : 'search_index_generic', - [ - 'index' => substr(strrchr($api['instance']::class, '\\'), 1), - ], - file: 'Search', - ), - ], - file: 'Search', - ); - - foreach ($buttons as $sa => $label) { - echo ' ' . Lang::getTxt($label, file: 'Search') . ''; - } - } - - if ( - in_array($api['instance']->getStatus(), ['exists', null]) - && !empty($api['instance']->getSize()) - ) { - echo ' -
- ' . Lang::getTxt('search_index_size', file: 'Search') . ' ' . Lang::getTxt('size_kilobyte', [$api['instance']->getSize() / 1024], file: 'General'); - } - - echo ' -
-
'; - } - - echo ' -
-
-
- ', Lang::getTxt('search_method', file: 'Admin'), ' -
- -
-
- - - -
-
'; -} - -/** - * Create a search index. - */ -function template_create_index() -{ - echo ' -
-
-

', Lang::getTxt('search_create_index', file: 'Search'), '

-
-
-
-
- -
-
- -
-
-
- - -
-
'; -} - -/** - * Display a progress page while creating a search index. - */ -function template_create_index_progress() -{ - echo ' -
-
-

', Lang::getTxt('search_create_index', file: 'Search'), '

-
-
-
-

', Lang::getTxt('search_create_index_not_ready', file: 'Search'), '

-
- ', Utils::$context['percentage'], '% -
-
-
-
- -
- - - - -
- '; -} - -/** - * Done creating a search index. - */ -function template_create_index_done() -{ - echo ' -
-

', Lang::getTxt('search_create_index', file: 'Search'), '

-
-
-

', Lang::getTxt('search_create_index_done', file: 'Search'), '

-

- ', Lang::getTxt('search_create_index_done_link', file: 'Search'), ' -

-
'; -} - -/** - * Add or edit a search engine spider. - */ -function template_spider_edit() -{ - echo ' -
-
-

', Utils::$context['page_title'], '

-
-
- ', Lang::getTxt('add_spider_desc', file: 'Search'), ' -
-
-
-
-
- ', Lang::getTxt('spider_name_desc', file: 'Search'), ' -
-
- -
-
-
- ', Lang::getTxt('spider_agent_desc', file: 'Search'), ' -
-
- -
-
-
- ', Lang::getTxt('spider_ip_info_desc', file: 'Search'), ' -
-
- -
-
-
- - - -
-
'; -} - -/** - * Show... spider... logs... - */ -function template_show_spider_logs() -{ - // Standard fields. - template_show_list('spider_logs'); - - echo ' -
-
-

', Lang::getTxt('spider_logs_delete', file: 'Search'), '

-
-
-

- ', Lang::getTxt('spider_logs_delete_older', file: 'Search'), ' - - ', Lang::getTxt('spider_logs_delete_day', file: 'Search'), ' -

- - - -
-
'; -} - -/** - * Show... spider... stats... - */ -function template_show_spider_stats() -{ - // Standard fields. - template_show_list('spider_stat_list'); - - echo ' -
-
-

', Lang::getTxt('spider_logs_delete', file: 'Search'), '

-
-
-

- ', Lang::getTxt('spider_stats_delete_older', ['input' => ''], file: 'Search'), ' -

- - - -
-
-
'; -} diff --git a/Themes/default/ManageSmileys.template.php b/Themes/default/ManageSmileys.template.php deleted file mode 100644 index 817c0e3340e..00000000000 --- a/Themes/default/ManageSmileys.template.php +++ /dev/null @@ -1,481 +0,0 @@ - -
-

- ', Lang::getTxt(Utils::$context['current_set']['is_new'] ? 'smiley_set_new' : 'smiley_set_modify_existing', file: 'ManageSmileys'), ' -

-
'; - - if (Utils::$context['current_set']['is_new'] && !empty(Config::$modSettings['smiley_enable'])) { - echo ' -
- ', Lang::getTxt('smiley_set_import_info', file: 'ManageSmileys'), ' -
'; - } - // If this is an existing set, and there are still un-added smileys - offer an import opportunity. - elseif (!empty(Utils::$context['current_set']['can_import'])) { - echo ' -
- ', Utils::$context['smiley_set_unused_message'], ' -
'; - } - - echo ' -
-
-
- -
-
- -
-
- -
-
- ', Config::$modSettings['smileys_url'], '/'; - - if (empty(Utils::$context['smiley_set_dirs']) || !empty(Utils::$context['make_new'])) { - echo ' - '; - } else { - echo ' - '; - } - echo ' - /.. -
-
- -
-
- -
-
- -
- - - - '; -} - -/** - * Editing an individual smiley - */ -function template_modifysmiley() -{ - echo ' -
-
-

', Lang::getTxt('smiley_modify_existing', file: 'ManageSmileys'), '

-
-
-
-
- ', Lang::getTxt('smiley_preview_using_set', file: 'ManageSmileys'), ' - -
-
- -
-
- -
'; - - if (empty(Utils::$context['filenames'])) { - echo ' -
- -
'; - } else { - foreach (Utils::$context['smiley_sets'] as $set => $smiley_set) { - echo ' -
- ', $smiley_set['name'], ' -
- - - - '; - } - } - - echo ' -
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- - -
- - -
'; -} - -/** - * Adding a new smiley. - */ -function template_addsmiley() -{ - echo ' -
-
-

', Lang::getTxt('smileys_add_method', file: 'ManageSmileys'), '

-
-
-
    -
  • - -
  • -
  • - -
  • -
-
-
-
-
- -
-
- -
-
- -
-
'; - - if (empty(Utils::$context['filenames'])) { - echo ' - '; - } else { - echo ' - '; - } - - echo ' -
-
-
- -
-
-

', Lang::getTxt('smiley_new', file: 'ManageSmileys'), '

-
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
- -
'; -} - -/** - * Ordering smileys. - */ -function template_setorder() -{ - foreach (Utils::$context['smileys'] as $location) { - echo ' -
-
-

', $location['title'], '

-
-
- ', $location['description'], ' -
-
- ', Lang::getTxt(empty(Utils::$context['move_smiley']) ? 'smileys_move_select_smiley' : 'smileys_move_select_destination', file: 'ManageSmileys'), '
'; - - foreach ($location['rows'] as $row) { - if (!empty(Utils::$context['move_smiley'])) { - echo ' - '; - } - - foreach ($row as $smiley) { - if (empty(Utils::$context['move_smiley'])) { - echo ' - ', $smiley['description'], ''; - } else { - echo ' - ', $smiley['description'], ' - '; - } - } - - echo ' -
'; - } - - if (!empty(Utils::$context['move_smiley'])) { - echo ' - '; - } - echo ' -
- -
'; - } -} - -/** - * Editing Message Icons - */ -function template_editicons() -{ - template_show_list('message_icon_list'); -} - -/** - * Editing an individual message icon - */ -function template_editicon() -{ - echo ' -
-
-

- ', Utils::$context['new_icon'] ? Lang::getTxt('icons_new_icon', file: 'ManageSmileys') : Lang::getTxt('icons_edit_icon', file: 'ManageSmileys'), ' -

-
-
-
'; - - if (!Utils::$context['new_icon']) { - echo ' -
- ', Lang::getTxt('smiley_preview', file: 'ManageSmileys'), ' -
-
- ', Utils::$context['icon']['title'], ' -
'; - } - - echo ' -
- :
', Lang::getTxt('icons_extension_must_be', ['extension' => '.png'], file: 'ManageSmileys'), ' -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
'; - - if (!Utils::$context['new_icon']) { - echo ' - '; - } - - echo ' - - -
-
'; -} diff --git a/Themes/default/Memberlist.template.php b/Themes/default/Memberlist.template.php deleted file mode 100644 index 02f1717783c..00000000000 --- a/Themes/default/Memberlist.template.php +++ /dev/null @@ -1,194 +0,0 @@ - -
- - ', template_button_strip(Utils::$context['memberlist_buttons'], 'right'), ' -
-
-

- ', Lang::getTxt('members_list', file: 'General'), ' -

-
'; - - echo ' -
- - - '; - - // Display each of the column headers of the table. - foreach (Utils::$context['columns'] as $key => $column) { - // @TODO maybe find something nicer? - if ($key == 'email_address' && !Utils::$context['can_send_email']) { - continue; - } - - // This is a selected column, so underline it or some such. - if ($column['selected']) { - echo ' - '; - } - - // This is just some column... show the link and be done with it. - else { - echo ' - '; - } - } - - echo ' - - - '; - - // Assuming there are members loop through each one displaying their data. - if (!empty(Utils::$context['members'])) { - foreach (Utils::$context['members'] as $member) { - echo ' - - - '; - - if (!isset(Utils::$context['disabled_fields']['website'])) { - echo ' - '; - } - - // Group and date. - echo ' - - '; - - if (!isset(Utils::$context['disabled_fields']['posts'])) { - echo ' - '; - } - - // Show custom fields marked to be shown here - if (!empty(Utils::$context['custom_profile_fields']['columns'])) { - foreach (Utils::$context['custom_profile_fields']['columns'] as $key => $column) { - echo ' - '; - } - } - - echo ' - '; - } - } - // No members? - else { - echo ' - - - '; - } - - echo ' - -
- ' . $column['label'] . ' - ', $column['link'], '
- ', Utils::$context['can_send_pm'] ? '' : '', '', Utils::$context['can_send_pm'] ? '' : '', ' - ', $member['link'], '', $member['website']['url'] != '' ? '' : '', '', empty($member['group']) ? $member['post_group'] : $member['group'], '', $member['registered_date'], ''; - - if (!empty($member['posts'])) { - echo ' -
-
- ', $member['posts'], ' -
'; - } - - echo ' -
', $member['options'][$key], '
', Lang::getTxt('search_no_results', file: 'General'), '
-
'; - - // Show the page numbers again. (makes 'em easier to find!) - echo ' -
- '; - - // If it is displaying the result of a search show a "search again" link to edit their criteria. - if (isset(Utils::$context['old_search'])) { - echo ' - '; - } - echo ' -
- '; - -} - -/** - * A page allowing people to search the member list. - */ -function template_search() -{ - // Start the submission form for the search! - echo ' -
-
-
- ', template_button_strip(Utils::$context['memberlist_buttons'], 'right'), ' -
-
-

- ', Lang::getTxt('mlist_search', file: 'General'), ' -

-
- -
-
'; -} diff --git a/Themes/default/MoveTopic.template.php b/Themes/default/MoveTopic.template.php deleted file mode 100644 index 916b0b18f44..00000000000 --- a/Themes/default/MoveTopic.template.php +++ /dev/null @@ -1,394 +0,0 @@ - -
-
-

', Lang::getTxt('move_topic', file: 'General'), '

-
-
-
-
-
- ', Lang::getTxt('move_to', file: 'General'), ' -
-
- -
'; - - // Disable the reason textarea when the postRedirect checkbox is unchecked... - echo ' -
-
- '; - - // Stick our "create a redirection topic" template in here... - template_redirect_options('move'); - - echo ' - -
-
'; - - if (Utils::$context['back_to_topic']) { - echo ' - '; - } - - echo ' - - -
- '; -} - -/** - * Redirection topic options - * - * @param string $type What type of topic this is for - currently 'merge' or 'move'. Used to display appropriate text strings... - */ -function template_redirect_options($type) -{ - echo ' - -
-
-
- ', Lang::getTxt($type . '_why', file: 'General'), ' -
-
- -
-
- -
-
- -
'; - - if (!empty(Config::$modSettings['allow_expire_redirect'])) { - echo ' -
- ', Lang::getTxt('redirect_topic_expires', file: 'General'), ' -
-
- -
'; - } else { - echo ' - '; - } - - echo ' -
-
'; -} - -/** - * Confirmation page shown when finished merging topics. - */ -function template_merge_done() -{ - echo ' -
-
-

', Lang::getTxt('merge', file: 'General'), '

-
-
-

', Lang::getTxt('merge_successful', file: 'General'), '

-
- -
-
-
'; -} - -/** - * Merge topic page. - */ -function template_merge() -{ - echo ' -
-
-

', Lang::getTxt('merge', file: 'General'), '

-
-
- ', Lang::getTxt('merge_desc', file: 'General'), ' -
-
-
-
- ', Lang::getTxt('topic_to_merge', file: 'General'), ' -
-
- ', Utils::$context['origin_subject'], ' -
-
-
-
-
-

', Lang::getTxt('target_topic', file: 'General'), '

-
-
-

'; - - if (isset(Utils::$context['merge_categories'])) { - echo ' -
- ', Lang::getTxt('target_below', file: 'General'), ' (', Lang::getTxt('board', file: 'General'), ': - ) - - -
'; - } else { - echo Lang::getTxt('target_below', file: 'General'); - } - - echo '

-
-
'; - - // Don't show this if there aren't any topics... - if (!empty(Utils::$context['topics'])) { - echo ' -
- -
-
-
    '; - - foreach (Utils::$context['topics'] as $topic) { - echo ' -
  • - - ', $topic['subject'], ' ', Lang::getTxt('started_by_member', ['member' => $topic['poster']['link']], file: 'General'), ' -
  • '; - } - - echo ' -
-
-
- -
'; - } - // Just a nice "There aren't any topics" message - else { - echo ' -
', Lang::getTxt('topic_alert_none', file: 'General'), '
'; - } - - echo ' -
-
-

', Lang::getTxt('target_id', file: 'General'), '

-
-
-
-
- ', Lang::getTxt('merge_to_topic_id', file: 'General'), ' -
-
- - - - -
-
- -
-
-
'; -} - -/** - * Extra options related to merging topics. - */ -function template_merge_extra_options() -{ - echo ' -
-
-
-

', Lang::getTxt('merge_topic_list', file: 'General'), '

-
- - - - - - - - - - - '; - - foreach (Utils::$context['topics'] as $topic) { - echo ' - - - - - - - '; - } - echo ' - -
', Lang::getTxt('merge_check', file: 'General'), '', Lang::getTxt('subject', file: 'General'), '', Lang::getTxt('started_by', file: 'General'), '', Lang::getTxt('last_post', file: 'General'), '' . Lang::getTxt('merge_include_notifications', file: 'General') . '
- - - ' . $topic['subject'] . ' - - ', $topic['started']['link'], '
- ', $topic['started']['time'], ' -
- ' . $topic['updated']['link'] . '
- ', $topic['updated']['time'], ' -
- -
-
-
-
- ', Lang::getTxt('merge_select_subject', file: 'General'), ' - -
-
- -
'; - - // Show an option to create a redirection topic as well... - template_redirect_options('merge'); - - if (!empty(Utils::$context['boards']) && count(Utils::$context['boards']) > 1) { - echo ' -
- ', Lang::getTxt('merge_select_target_board', file: 'General'), ' -
    '; - - foreach (Utils::$context['boards'] as $board) { - echo ' -
  • - ' . $board['name'] . ' -
  • '; - } - echo ' -
-
'; - } - - if (!empty(Utils::$context['polls'])) { - echo ' -
- ' . Lang::getTxt('merge_select_poll', file: 'General') . ' -
    '; - - foreach (Utils::$context['polls'] as $poll) { - echo ' -
  • - ' . $poll['question'] . ' (' . Lang::getTxt('topic', file: 'General') . ': ' . $poll['topic']['subject'] . ') -
  • '; - } - echo ' -
  • - (' . Lang::getTxt('merge_no_poll', file: 'General') . ') -
  • -
-
'; - } - - echo ' -
- - - -
-
-
-
'; -} diff --git a/Themes/default/Notify.template.php b/Themes/default/Notify.template.php deleted file mode 100644 index 5466a03b890..00000000000 --- a/Themes/default/Notify.template.php +++ /dev/null @@ -1,93 +0,0 @@ - -

- - ', Lang::getTxt('notify', file: 'General'), ' -

- -
-

', Lang::getTxt('notify_topic_prompt', file: 'General'), '

-

- ', Lang::getTxt('yes', file: 'General'), ' - ', Lang::getTxt('no', file: 'General'), ' -

-
'; -} - -/** - * Board notification bar. - */ -function template_notify_board() -{ - echo ' -
-

- - ', Lang::getTxt('notify', file: 'General'), ' -

-
-
-

', Lang::getTxt('notify_board_prompt', file: 'General'), '

-

- ', Lang::getTxt('yes', file: 'General'), ' - ', Lang::getTxt('no', file: 'General'), ' -

-
'; -} - -/** - * - */ -function template_notify_announcements() -{ - echo ' -
-

- - ', Lang::getTxt('notify', file: 'General'), ' -

-
-
-

', Lang::getTxt('notify_announcements_prompt', file: 'General'), '

-

- ', Lang::getTxt('yes', file: 'General'), ' - ', Lang::getTxt('no', file: 'General'), ' -

-
'; -} - -/** - * Displays a message indicating the user's notification preferences were successfully changed - */ -function template_notify_pref_changed() -{ - echo ' -
-

- - ', Lang::getTxt('notify', file: 'General'), ' -

-
-
-

', Utils::$context['notify_success_msg'], '

-
'; -} diff --git a/Themes/default/Packages.template.php b/Themes/default/Packages.template.php deleted file mode 100644 index 2dab82ce5de..00000000000 --- a/Themes/default/Packages.template.php +++ /dev/null @@ -1,1883 +0,0 @@ - -

', Lang::getTxt((Utils::$context['uninstalling'] ? 'uninstall' : ('install_' . Utils::$context['extract_type'])), file: 'Packages'), '

- -
'; - - if (Utils::$context['is_installed']) { - echo ' - ', Lang::getTxt('package_installed_warning1', file: 'Packages'), '
-
- ', Lang::getTxt('package_installed_warning2', file: 'Packages'), '
-
'; - } - - echo Lang::getTxt('package_installed_warning3', file: 'Packages'), ' -
-
'; - - if (!empty(Utils::$context['package_blacklist_found'])) { - echo ' -
', Lang::getTxt('package_validation_blacklist_found', file: 'Packages'), ' -
'; - } - - // Do errors exist in the install? If so light them up like a christmas tree. - if (Utils::$context['has_failure']) { - echo ' -
- ', Lang::getTxt( - 'package_will_fail_title', - [ - Lang::getTxt( - 'package_' . (Utils::$context['uninstalling'] ? 'uninstall' : 'install'), - file: 'Packages', - ), - ], - file: 'Packages', - ), - '
- ', Lang::getTxt( - 'package_will_fail_warning', - [ - Lang::getTxt( - 'package_' . (Utils::$context['uninstalling'] ? 'uninstall' : 'install'), - file: 'Packages', - ), - ], - file: 'Packages', - ), - !empty(Utils::$context['failure_details']) ? '

' . Utils::$context['failure_details'] . '' : '', ' -
'; - } - - // Validation info? - if (!empty(Utils::$context['validation_tests'])) { - echo ' -
-

', Lang::getTxt('package_validaiton_results', file: 'Packages'), '

-
-
- '; - - foreach (Utils::$context['validation_tests'] as $id_server => $result) { - echo ' - - - - '; - } - - echo ' -
', Utils::$context['package_servers'][$id_server]['name'], '', Lang::getTxt($result[Utils::$context['package_sha256_hash']] ?? 'package_validation_status_unknown', file: 'Packages'), '
-
-
'; - } - - // Display the package readme if one exists - if (isset(Utils::$context['package_readme'])) { - echo ' -
-

', Lang::getTxt('package_' . (Utils::$context['uninstalling'] ? 'un' : '') . 'install_readme', file: 'Search'), '

-
-
- ', Utils::adjustHeadingLevels(Utils::$context['package_readme'], 3), ' - ', Lang::getTxt('package_available_readme_language', file: 'Packages'), ' - - -
-
'; - } - - // Did they specify a license to display? - if (isset(Utils::$context['package_license'])) { - echo ' -
-

', Lang::getTxt('package_install_license', file: 'Packages'), '

-
-
- ', Utils::adjustHeadingLevels(Utils::$context['package_license'], 3), ' - ', Lang::getTxt('package_available_license_language', file: 'Packages'), ' - - -
-
'; - } - - echo ' -
-
-

- ', Lang::getTxt(Utils::$context['uninstalling'] ? 'package_uninstall_actions' : 'package_install_actions', Utils::$context, file: 'Packages'), ' -

-
'; - - // Are there data changes to be removed? - if (Utils::$context['uninstalling'] && !empty(Utils::$context['database_changes'])) { - // This is really a special case so we're adding style inline - echo ' -
- -
- ', Lang::getTxt('package_db_uninstall_actions', file: 'Packages'), ' -
    '; - - foreach (Utils::$context['database_changes'] as $change) { - echo ' -
  • ', $change, '
  • '; - } - - echo ' -
-
-
'; - } - - echo ' -
'; - - if (empty(Utils::$context['actions']) && empty(Utils::$context['database_changes'])) { - echo ' -
-
- ', Lang::getTxt('corrupt_compatible', file: 'Packages'), ' -
-
'; - } else { - echo ' - ', Lang::getTxt('perform_actions', file: 'Packages'), ' - -
- - - - - - - - - - - '; - - $i = 1; - $j = 1; - $action_num = 1; - $js_operations = []; - - foreach (Utils::$context['actions'] as $packageaction) { - // Did we pass or fail? Need to now for later on. - $js_operations[$action_num] = $packageaction['failed'] ?? 0; - - echo ' - - - - - - - '; - - // Is there water on the knee? Operation! - if (isset($packageaction['operations'])) { - echo ' - - - '; - - // Increase it. - $action_num++; - } - } - echo ' - -
', Lang::getTxt('package_install_type', file: 'Packages'), '', Lang::getTxt('package_install_action', file: 'Packages'), '', Lang::getTxt('package_install_desc', file: 'Packages'), '
', isset($packageaction['operations']) ? '' : '', '', $i++, '.', $packageaction['type'], '', $packageaction['action'], '', $packageaction['description'], '
- '; - - // Show the operations. - $operation_num = 1; - - foreach ($packageaction['operations'] as $operation) { - // Determine the position text. - $operation_text = $operation['position'] == 'replace' ? 'operation_replace' : ($operation['position'] == 'before' ? 'operation_after' : 'operation_before'); - - echo ' - - - - - - - '; - } - - echo ' -
- - - - ', $operation_num++, '.', Lang::getTxt($operation_text, file: 'Packages'), '', $operation['action'], '', !empty($operation['ignore_failure']) ? Lang::getTxt('operation_description_ignore', ['desc' => $operation['description']], file: 'Packages') : $operation['description'], '
-
'; - - // What if we have custom themes we can install into? List them too! - if (!empty(Utils::$context['theme_actions'])) { - echo ' -
-
-

- ', Utils::$context['uninstalling'] ? Lang::getTxt('package_other_themes_uninstall', file: 'Packages') : Lang::getTxt('package_other_themes', file: 'Packages'), ' -

-
-
-
- ', Lang::getTxt('package_other_themes_desc', file: 'Packages'), ' -
- '; - - // Loop through each theme and display its name, and then it's details. - foreach (Utils::$context['theme_actions'] as $id => $theme) { - // Pass? - $js_operations[$action_num] = !empty($theme['has_failure']); - - echo ' - - - - '; - - foreach ($theme['actions'] as $action) { - echo ' - - - - - - '; - - // Is there water on the knee? Operation! - if (isset($action['operations'])) { - echo ' - - - '; - - // Increase it. - $action_num++; - } - } - } - - echo ' -
'; - - if (!empty(Utils::$context['themes_locked'])) { - echo ' - '; - } - echo ' - - - ', $theme['name'], ' -
', isset($packageaction['operations']) ? - '' : '', ' - - ', $action['type'], '', $action['action'], '', $action['description'], '
- '; - - $operation_num = 1; - - foreach ($action['operations'] as $operation) { - // Determine the position text. - $operation_text = $operation['position'] == 'replace' ? 'operation_replace' : ($operation['position'] == 'before' ? 'operation_after' : 'operation_before'); - - echo ' - - - - - - - '; - } - - echo ' -
- - - - ', $operation_num++, '.', Lang::getTxt($operation_text, file: 'Packages'), '', $operation['action'], '', !empty($operation['ignore_failure']) ? Lang::getTxt('operation_description_ignore', ['desc' => $operation['description']], file: 'Packages') : $operation['description'], '
-
-
'; - } - } - - // Are we effectively ready to install? - if (!Utils::$context['ftp_needed'] && (!empty(Utils::$context['actions']) || !empty(Utils::$context['database_changes']))) { - echo ' -
- -
'; - } - - // If we need ftp information then demand it! - elseif (Utils::$context['ftp_needed']) { - echo ' -
-

', Lang::getTxt('package_ftp_necessary', file: 'Packages'), '

-
-
- ', template_control_chmod(), ' -
'; - } - - echo ' - - ', (isset(Utils::$context['form_sequence_number']) && !Utils::$context['ftp_needed']) ? ' - ' : '', ' -
'; - - // Toggle options. - echo ' - '; -} - -/** - * Extract package contents - */ -function template_extract_package() -{ - echo ' -
-

'; - - if (empty(Utils::$context['redirect_url'])) { - echo Lang::getTxt(Utils::$context['uninstalling'] ? 'uninstall' : 'extracting', file: 'Packages'); - } else { - echo Lang::getTxt('package_installed_redirecting', file: 'Packages'); - } - - echo '

-
-
'; - - // If we are going to redirect we have a slightly different agenda. - if (!empty(Utils::$context['redirect_url'])) { - echo ' - ', Utils::$context['redirect_text'], '

- ', Lang::getTxt('package_installed_redirect_go_now', file: 'Packages'), ' | ', Lang::getTxt('package_installed_redirect_cancel', file: 'Packages'), ' - '; - } elseif (Utils::$context['uninstalling']) { - echo ' - ', Lang::getTxt('package_uninstall_done', file: 'Packages') . '
- ', '', Lang::getTxt('package_keep', file: 'Packages'), '', '', Lang::getTxt('package_delete2', file: 'Packages'), ''; - } elseif (Utils::$context['install_finished']) { - if (Utils::$context['extract_type'] == 'avatar') { - echo ' - ', Lang::getTxt('avatars_extracted', file: 'Packages'); - } elseif (Utils::$context['extract_type'] == 'language') { - echo ' - ', Lang::getTxt('language_extracted', file: 'Packages'); - } else { - echo ' - ', Lang::getTxt('package_installed_done', file: 'Packages'); - } - } else { - echo ' - ', Lang::getTxt('corrupt_compatible', file: 'Packages'); - } - - echo ' -
'; - - // Show the "restore permissions" screen? - if (function_exists('template_show_list') && !empty(Utils::$context['restore_file_permissions']['rows'])) { - echo '
'; - template_show_list('restore_file_permissions'); - } -} - -/** - * List files in a package - */ -function template_list() -{ - echo ' -
-

', Lang::getTxt('list_file', file: 'Packages'), '

-
-
-

', Lang::getTxt('files_package', Utils::$context, file: 'Packages'), '

-
-
-
    '; - - foreach (Utils::$context['files'] as $fileinfo) { - echo ' -
  1. ', $fileinfo['filename'], ' ', Lang::getTxt('package_bytes', $fileinfo, file: 'Packages'), '
  2. '; - } - - echo ' -
-
- ', Lang::getTxt('back', file: 'General'), ' -
'; -} - -/** - * Examine a single file within a package - */ -function template_examine() -{ - echo ' -
-

', Lang::getTxt('package_examine_file', file: 'Packages'), '

-
-
-

', Lang::getTxt('package_file_contents', Utils::$context, file: 'Packages'), '

-
-
-
', Utils::$context['filedata'], '
- ', Lang::getTxt('list_files', file: 'Packages'), ' -
'; -} - -/** - * List all packages - */ -function template_browse() -{ - echo ' -
-
-
-

- ', Lang::getTxt('packages_adding_title', file: 'Packages'), ' -

-
-
- ', Lang::getTxt('packages_adding', file: 'Packages'), ' -
- - - '; - - if (empty(Config::$modSettings['disable_smf_js'])) { - echo ' - '; - } - - // This sets the announcements and current versions themselves ;). - echo ' - '; - - echo ' -
'; - - if (Utils::$context['available_packages'] == 0) { - echo ' -
', Lang::getTxt('no_packages', file: 'Packages'), '
'; - } else { - foreach (Utils::$context['modification_types'] as $type) { - if (!empty(Utils::$context['packages_lists_' . $type]['rows'])) { - template_show_list('packages_lists_' . $type); - } - } - - echo ' -
'; - } - - // The advanced (emulation) box, collapsed by default - echo ' -
-
- -
-

- ', Lang::getTxt('package_emulate_desc', file: 'Packages'), ' -

-
-
- ', Lang::getTxt('package_emulate', file: 'Packages'), '
- - ', Lang::getTxt('package_emulate_revert', file: 'Packages'), ' - -
-
- - -
-
-
- -
-
-
- - - -
- '; -} - -/** - * List package servers - */ -function template_servers() -{ - if (!empty(Utils::$context['package_ftp']['error'])) { - echo ' -
-
', Utils::$context['package_ftp']['error'], '
-
'; - } - - echo ' -
-
-

', Lang::getTxt('package_upload_title', file: 'Packages'), '

-
-
-
-
-
- ', Lang::getTxt('package_upload_select', file: 'Packages'), ' -
-
- -
-
- - -
-
- -
'; - - if (Utils::$context['package_download_broken']) { - echo ' -
-

', Lang::getTxt('package_ftp_necessary', file: 'Packages'), '

-
-
-

- ', Lang::getTxt('package_ftp_why_download', file: 'Packages'), ' -

-
-
-
- -
-
- - - -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
- -
-
-
'; - } - - echo ' -
-
- ' . Lang::getTxt('package_servers', file: 'Packages') . ' - -
-
- ' . Lang::getTxt('add_server', file: 'Packages') . ' -
-
-
- ' . Lang::getTxt('server_name', file: 'Packages') . ' -
-
- -
-
- ' . Lang::getTxt('serverurl', file: 'Packages') . ' -
-
- -
-
-
- - -
-
-
-
- ', Lang::getTxt('package_download_by_url', file: 'Packages'), ' -
-
-
- ' . Lang::getTxt('serverurl', file: 'Packages') . ' -
-
- -
-
- ', Lang::getTxt('package_download_filename', file: 'Packages'), ' -
-
-
- ', Lang::getTxt('package_download_filename_info', file: 'Packages'), ' -
-
- -
-
-
-
-
'; -} - -/** - * Confirm package operation - */ -function template_package_confirm() -{ - echo ' -
-

', Utils::$context['page_title'], '

-
- '; -} - -/** - * List packages. - */ -function template_package_list() -{ - echo ' -
-

', Utils::$context['page_title'], '

-
-
'; - - // No packages, as yet. - if (empty(Utils::$context['package_list'])) { - echo ' -
    -
  • ', Lang::getTxt('no_packages', file: 'Packages'), '
  • -
'; - } - - // List out the packages... - else { - echo ' -
    '; - - foreach (Utils::$context['package_list'] as $i => $packageSection) { - echo ' -
  • - ', $packageSection['title'], ''; - - if (!empty($packageSection['text'])) { - echo ' -
    -

    ', $packageSection['text'], '

    -
    '; - } - - echo ' - <', Utils::$context['list_type'], ' id="package_section_', $i, '" class="packages">'; - - foreach ($packageSection['items'] as $id => $package) { - echo ' -
  • '; - - // Textual message. Could be empty just for a blank line... - if ($package['is_text']) { - echo ' - ', empty($package['name']) ? ' ' : $package['name']; - } - - // This is supposed to be a rule.. - elseif ($package['is_line']) { - echo ' -
    '; - } - - // A remote link. - elseif ($package['is_remote']) { - echo ' - ', $package['link'], ''; - } - - // A title? - elseif ($package['is_heading'] || $package['is_title']) { - echo ' - ', $package['name'], ''; - } - - // Otherwise, it's a package. - else { - // 1. Some mod [ Download ]. - echo ' - ', $package['can_install'] || !empty($package['can_emulate_install']) ? '' . $package['name'] . ' ' . Lang::getTxt('download', file: 'Packages') . '' : $package['name'], ' -
      '; - - // Show the mod type? - if ($package['type'] != '') { - echo ' -
    • - ', Lang::getTxt('package_type', ['type' => Utils::ucwords(Utils::strtolower($package['type']))], file: 'Packages'), ' -
    • '; - } - - // Show the version number? - if ($package['version'] != '') { - echo ' -
    • - ', Lang::getTxt('package_version', $package, file: 'Packages'), ' -
    • '; - } - - // How 'bout the author? - if (!empty($package['author']) && $package['author']['name'] != '' && isset($package['author']['link'])) { - echo ' -
    • - ', Lang::getTxt('package_author', ['author' => $package['author']['link']], file: 'Packages'), ' -
    • '; - } - - // The homepage... - if ($package['author']['website']['link'] != '') { - echo ' -
    • - ', Lang::getTxt('author_website', $package['author']['website'], file: 'Packages'), ' -
    • '; - } - - // Description: bleh bleh! - // Location of file: http://someplace/. - echo ' -
    • - ', Lang::getTxt('file_location', ['link' => '' . $package['href'] . ''], file: 'Packages'), ' -
    • -
    • - ', Lang::getTxt('package_description', $package, file: 'Packages'), ' -
    • -
    '; - } - - echo ' -
  • '; - } - echo ' - - '; - } - echo ' -
'; - } - - echo ' -
'; - - // Now go through and turn off all the sections. - if (!empty(Utils::$context['package_list'])) { - $section_count = count(Utils::$context['package_list']); - - echo ' - '; - } -} - -/** - * Confirmation page showing a package was uploaded/downloaded successfully. - */ -function template_downloaded() -{ - echo ' -
-

', Utils::$context['page_title'], '

-
-
-

- ', Lang::getTxt(empty(Utils::$context['package_server']) ? 'package_uploaded_successfully' : 'package_downloaded_successfully', file: 'Packages'), ' -

-
    -
  • - ', Utils::$context['package']['name'], ' - ', Utils::$context['package']['list_files']['link'], ' - ', Utils::$context['package']['install']['link'], ' -
  • -
-

-

', Lang::getTxt('back', file: 'General'), '

-
'; -} - -/** - * Installation options - FTP info and backup settings - */ -function template_install_options() -{ - if (!empty(Utils::$context['saved_successful'])) { - echo ' -
', Lang::getTxt('settings_saved', file: 'Admin'), '
'; - } - - echo ' -
-

', Lang::getTxt('package_install_options', file: 'Packages'), '

-
-
- ', Lang::getTxt('package_install_options_ftp_why', file: 'Packages'), ' -
-
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- - - -
-
'; -} - -/** - * CHMOD control form - * - * @return bool False if nothing to do. - */ -function template_control_chmod() -{ - // Nothing to do? Brilliant! - if (empty(Utils::$context['package_ftp'])) { - return false; - } - - if (empty(Utils::$context['package_ftp']['form_elements_only'])) { - echo ' - ', Lang::getTxt('package_ftp_why', ['onclick' => 'document.getElementById(\'need_writable_list\').style.display = \'\'; return false;'], file: 'Packages'), '
-
- ', Lang::getTxt('package_ftp_why_file_list', file: 'Packages'), ' -
    '; - - if (!empty(Utils::$context['notwritable_files'])) { - foreach (Utils::$context['notwritable_files'] as $file) { - echo ' -
  • ', $file, '
  • '; - } - } - - echo ' -
'; - - if (!Sapi::isOS(Sapi::OS_WINDOWS)) { - echo ' -
- ', Lang::getTxt('package_chmod_linux', file: 'Packages'), '
- # chmod a+w ', implode(' ', Utils::$context['notwritable_files']), ''; - } - - echo ' -
'; - } - - echo ' -
-
- ', !empty(Utils::$context['package_ftp']['error']) ? Utils::$context['package_ftp']['error'] : '', ' -
-
'; - - if (!empty(Utils::$context['package_ftp']['destination'])) { - echo ' -
'; - } - - echo ' -
-
-
- -
-
- - - -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
'; - - if (empty(Utils::$context['package_ftp']['form_elements_only'])) { - echo ' -
- - -
'; - } - - if (!empty(Utils::$context['package_ftp']['destination'])) { - echo ' - -
'; - } - - // Hide the details of the list. - if (empty(Utils::$context['package_ftp']['form_elements_only'])) { - echo ' - '; - } - - // Quick generate the test button. - echo ' - '; - - // Make sure the button gets generated last. - Utils::$context['insert_after_template'] .= ' - '; -} - -/** - * Wrapper for the above template function showing that FTP is required - */ -function template_ftp_required() -{ - echo ' -
- - ', Lang::getTxt('package_ftp_necessary', file: 'Packages'), ' - -
- ', template_control_chmod(), ' -
-
'; -} - -/** - * View operation details. - */ -function template_view_operations() -{ - echo ' - - - - ', Lang::getTxt('operation_title', file: 'Packages'), ' - ', Theme::template_css(); - - Theme::template_javascript(); - - echo ' - - -
-
- ', Utils::$context['operations']['search'], ' -
-
- ', Utils::$context['operations']['replace'], ' -
-
- -'; -} - -/** - * The file permissions page. - */ -function template_file_permissions() -{ - // This will handle expanding the selection. - echo ' - '; - - echo ' -
-
- ', Lang::getTxt('package_file_perms_warning', file: 'Packages'), ' -
-
    - ', Lang::getTxt('package_file_perms_warning_desc', file: 'Packages'), ' -
-
-
-
- -
-
-

- ', Lang::getTxt('package_file_perms', file: 'Admin'), '', Lang::getTxt('package_file_perms_new_status', file: 'Packages'), ' -

-
- - - - - - - - - - - - - '; - - foreach (Utils::$context['file_tree'] as $name => $dir) { - echo ' - - - - - - - - - '; - - if (!empty($dir['contents'])) { - template_permission_show_contents($name, $dir['contents'], 1); - } - } - - echo ' - -
', Lang::getTxt('package_file_perms_name', file: 'Packages'), '', Lang::getTxt('package_file_perms_status', file: 'Packages'), '', Lang::getTxt('package_file_perms_status_read', file: 'Packages'), '', Lang::getTxt('package_file_perms_status_write', file: 'Packages'), '', Lang::getTxt('package_file_perms_status_execute', file: 'Packages'), '', Lang::getTxt('package_file_perms_status_custom', file: 'Packages'), '', Lang::getTxt('package_file_perms_status_no_change', file: 'Packages'), '
- '; - - if (!empty($dir['type']) && ($dir['type'] == 'dir' || $dir['type'] == 'dir_recursive')) { - echo ' - '; - } - - echo ' - ', $name, ' - - - ', Lang::getTxt($dir['perms']['chmod'] ? 'package_file_perms_writable' : 'package_file_perms_not_writable', file: 'Packages'), ' - ', ($dir['perms']['perms'] ? ' (' . Lang::getTxt('package_file_perms_chmod', file: 'Packages') . ': ' . substr(sprintf('%o', $dir['perms']['perms']), -4) . ')' : ''), ' - - - - - - - - - - -
-
-
-

', Lang::getTxt('package_file_perms_change', file: 'Packages'), '

-
-
-
-
-
- - -
-
- ', Lang::getTxt('package_file_perms_custom', file: 'Packages'), ' (?) -
-
- - - -
-
- ', Lang::getTxt('package_file_perms_predefined_note', file: 'Packages'), ' -
-
-
'; - - // Likely to need FTP? - if (empty(Utils::$context['ftp_connected'])) { - echo ' -

- ', Lang::getTxt('package_file_perms_ftp_details', file: 'Packages'), ' -

- ', template_control_chmod(), ' -
', Lang::getTxt('package_file_perms_ftp_retain', file: 'Packages'), '
'; - } - - echo ' - - - -
'; - - // Any looks fors we've already done? - foreach (Utils::$context['look_for'] as $path) { - echo ' - '; - } - - echo ' -
-
'; -} - -/** - * Shows permissions for items within a directory (called from template_file_permissions) - * - * @param string $ident A unique ID - typically the directory name - * @param array $contents An array of items within the directory - * @param int $level How far to go inside the directory - * @param bool $has_more Whether there are more files to display besides what's in $contents - */ -function template_permission_show_contents($ident, $contents, $level, $has_more = false) -{ - $js_ident = preg_replace('~[^A-Za-z0-9_\-=:]~', ':-:', $ident); - - // Have we actually done something? - $drawn_div = false; - - foreach ($contents as $name => $dir) { - if (isset($dir['perms'])) { - if (!$drawn_div) { - $drawn_div = true; - echo ' - - '; - } - - $cur_ident = preg_replace('~[^A-Za-z0-9_\-=:]~', ':-:', $ident . '/' . $name); - - echo ' - - ' . str_repeat(' ', $level * 5), ' - ', (!empty($dir['type']) && $dir['type'] == 'dir_recursive') || !empty($dir['list_contents']) ? '' : ''; - - if (!empty($dir['type']) && ($dir['type'] == 'dir' || $dir['type'] == 'dir_recursive')) { - echo ' - '; - } - - echo ' - ', $name, ' - ', (!empty($dir['type']) && $dir['type'] == 'dir_recursive') || !empty($dir['list_contents']) ? '' : '', ' - - - ', Lang::getTxt($dir['perms']['chmod'] ? 'package_file_perms_writable' : 'package_file_perms_not_writable', file: 'Packages'), ' - ', ($dir['perms']['perms'] ? ' (' . Lang::getTxt('package_file_perms_chmod', file: 'Packages') . ': ' . substr(sprintf('%o', $dir['perms']['perms']), -4) . ')' : ''), ' - - - - - - - - '; - - if (!empty($dir['contents'])) { - template_permission_show_contents($ident . '/' . $name, $dir['contents'], $level + 1, !empty($dir['more_files'])); - } - } - } - - // We have more files to show? - if ($has_more) { - echo ' - - ' . str_repeat(' ', $level * 5), ' - ', Lang::getTxt('package_file_perms_more_files', file: 'Packages'), ' - - - '; - } - - if ($drawn_div) { - // Hide anything too far down the tree. - $isFound = false; - - foreach (Utils::$context['look_for'] as $tree) { - if (str_starts_with($tree, $ident)) { - $isFound = true; - } - } - - if ($level > 1 && !$isFound) { - echo ' - '; - } - } -} - -/** - * A progress page showing what permissions changes are being applied - */ -function template_action_permissions() -{ - $countDown = 3; - - echo ' -
-
-

', Lang::getTxt('package_file_perms_applying', file: 'Packages'), '

-
'; - - if (!empty(Utils::$context['skip_ftp'])) { - echo ' -
- ', Lang::getTxt('package_file_perms_skipping_ftp', file: 'Packages'), ' -
'; - } - - // How many have we done? - $remaining_items = count(Utils::$context['method'] == 'individual' ? Utils::$context['to_process'] : Utils::$context['directory_list']); - - $progress_message = Lang::getTxt( - Utils::$context['method'] == 'individual' ? 'package_file_perms_items_done' : 'package_file_perms_dirs_done', - [ - Utils::$context['total_items'] - $remaining_items, - Utils::$context['total_items'], - ], - file: 'Packages', - ); - - $progress_percent = round((Utils::$context['total_items'] - $remaining_items) / Utils::$context['total_items'] * 100, 1); - - echo ' -
-
- ', $progress_message, '
-
- ', $progress_percent, '% -
-
-
'; - - // Second progress bar for a specific directory? - if (Utils::$context['method'] != 'individual' && !empty(Utils::$context['total_files'])) { - $file_progress_message = Lang::getTxt( - 'package_file_perms_files_done', - [ - Utils::$context['file_offset'], - Utils::$context['total_files'], - ], - file: 'Packages', - ); - - $file_progress_percent = round(Utils::$context['file_offset'] / Utils::$context['total_files'] * 100, 1); - - echo ' -
-
- ', $file_progress_message, '
-
- ', $file_progress_percent, '% -
-
-
'; - } - - echo ' -
'; - - // Put out the right hidden data. - if (Utils::$context['method'] == 'individual') { - echo ' - - - '; - } else { - echo ' - - - - - '; - } - - // Are we not using FTP for whatever reason. - if (!empty(Utils::$context['skip_ftp'])) { - echo ' - '; - } - - // Retain state. - foreach (Utils::$context['back_look_data'] as $path) { - echo ' - '; - } - - echo ' - - -
- -
-
-
'; - - // Just the countdown stuff - echo ' - '; -} diff --git a/Themes/default/PersonalMessage.template.php b/Themes/default/PersonalMessage.template.php deleted file mode 100644 index 53ee0f8c6bd..00000000000 --- a/Themes/default/PersonalMessage.template.php +++ /dev/null @@ -1,2014 +0,0 @@ -'; - - // Show the capacity bar, if available. - if (!empty(Utils::$context['limit_bar'])) { - echo ' -
-

- ', Lang::getTxt('pm_capacity', file: 'PersonalMessage'), ' - - - - ', Utils::$context['limit_bar']['text'], ' -

-
'; - } - - // Message sent? Show a small indication. - if (isset(Utils::$context['pm_sent'])) { - echo ' -
- ', Lang::getTxt('pm_sent', file: 'PersonalMessage'), ' -
'; - } -} - -/** - * Just the end of the index bar, nothing special. - */ -function template_pm_below() -{ - echo ' - '; -} - -/** - * Displays a popup with information about your personal messages - */ -function template_pm_popup() -{ - // Unlike almost every other template, this is designed to be included into the HTML directly via $().load() - echo ' - -
'; - - if (empty(Utils::$context['unread_pms'])) { - echo ' -
', Lang::getTxt('pm_no_unread', file: 'PersonalMessage'), '
'; - } else { - foreach (Utils::$context['unread_pms'] as $id_pm => $pm_details) { - echo ' -
-
- ', !empty($pm_details['member']) ? $pm_details['member']['avatar']['image'] : '', ' -
-
-
', $pm_details['pm_link'], '
-
- ', $pm_details['replied_to_you'] ? '' : '', - !empty($pm_details['member']) ? $pm_details['member']['link'] : $pm_details['member_from'], ' - ', $pm_details['time'], ' -
-
-
'; - } - } - - echo ' -
'; -} - -/** - * Shows a particular folder (eg inbox or outbox), all the PMs in it, etc. - */ -function template_folder() -{ - // The every helpful javascript! - echo ' - '; - - echo ' -
'; - - // If we are not in single display mode show the subjects on the top! - if (Utils::$context['display_mode'] != 1) { - template_subject_list(); - - echo ' -

'; - } - - // Got some messages to display? - if (Utils::$context['get_pmessage']('message', true)) { - // Show a few buttons if we are in conversation mode and outputting the first message. - if (Utils::$context['display_mode'] == 2) { - // This bit uses info set in template_subject_list, so it's wrapped - // in an if just in case a mod or custom theme breaks it. - if (!empty(Utils::$context['current_pm_subject'])) { - echo ' -
-

- ', Lang::getTxt('conversation', file: 'PersonalMessage'), ' -

-
-
-
', Utils::$context['current_pm_subject'], '
-

', Lang::getTxt('started_by_member_time', ['member' => Utils::$context['current_pm_author'], 'time' => Utils::$context['current_pm_time']], file: 'General'), '

'; - } else { - echo ' -
'; - } - - // Show the conversation buttons. - template_button_strip(Utils::$context['conversation_buttons'], 'right'); - - echo ' -
'; - } - - while ($message = Utils::$context['get_pmessage']('message')) { - template_single_pm($message); - } - - if (empty(Utils::$context['display_mode'])) { - echo ' -
- -
- -
-
'; - } - - // Show a few buttons if we are in conversation mode and outputting the first message. - elseif (Utils::$context['display_mode'] == 2 && isset(Utils::$context['conversation_buttons'])) { - echo ' -
'; - - template_button_strip(Utils::$context['conversation_buttons'], 'right'); - - echo ' -
'; - } - - echo ' -
'; - } - - // Individual messages = button list! - if (Utils::$context['display_mode'] == 1) { - template_subject_list(); - echo '
'; - } - - echo ' - - '; -} - -/** - * Template for displaying a single personal message. - * - * @param array $message An array of information about the message to display. - */ -function template_single_pm($message) -{ - echo ' -
-
-
'; - - // Are there any custom fields above the member name? - if (!empty($message['custom_fields']['above_member'])) { - echo ' -
-
    '; - - foreach ($message['custom_fields']['above_member'] as $custom) { - echo ' -
  • ', $custom['value'], '
  • '; - } - - echo ' -
-
'; - } - - echo ' -

'; - - // Show online and offline buttons? - if (!empty(Config::$modSettings['onlineEnable']) && !$message['member']['is_guest']) { - echo ' - '; - } - - // Custom fields BEFORE the username? - if (!empty($message['custom_fields']['before_member'])) { - foreach ($message['custom_fields']['before_member'] as $custom) { - echo ' - ', $custom['value'], ''; - } - } - - // Show a link to the member's profile. - echo ' - ', $message['member']['link']; - - // Custom fields AFTER the username? - if (!empty($message['custom_fields']['after_member'])) { - foreach ($message['custom_fields']['after_member'] as $custom) { - echo ' - ', $custom['value'], ''; - } - } - - echo ' -

'; - - echo ' - -
-
-
-
-
', $message['subject'], '
-
- -
-
-
- ', $message['body'], ' -
-
-
'; - - // Add an extra line at the bottom if we have labels enabled. - if (Utils::$context['folder'] != 'sent' && !empty(Utils::$context['currently_using_labels']) && Utils::$context['display_mode'] != 2) { - echo ' -
'; - - // Add the label drop down box. - if (!empty(Utils::$context['currently_using_labels'])) { - echo ' - - '; - } - echo ' -
'; - } - - // Message options - template_quickbuttons($message['quickbuttons'], 'pm'); - - echo ' -
-
-
'; - - // Are there any custom profile fields for above the signature? - if (!empty($message['custom_fields']['above_signature'])) { - echo ' -
-
    '; - - foreach ($message['custom_fields']['above_signature'] as $custom) { - echo ' -
  • ', $custom['value'], '
  • '; - } - - echo ' -
-
'; - } - - // Show the member's signature? - if (!empty($message['member']['signature']) && empty(Theme::$current->options['show_no_signatures']) && Utils::$context['signature_enabled']) { - echo ' -
- ', $message['member']['signature'], ' -
'; - } - - // Are there any custom profile fields for below the signature? - if (!empty($message['custom_fields']['below_signature'])) { - echo ' -
-
    '; - - foreach ($message['custom_fields']['below_signature'] as $custom) { - echo ' -
  • ', $custom['value'], '
  • '; - } - - echo ' -
-
'; - } - - echo ' -
-
-
'; -} - -/** - * Just list all the personal message subjects - to make templates easier. - */ -function template_subject_list() -{ - echo ' -
-

- ', Utils::$context['folder'] == 'sent' ? Lang::getTxt('sent_items', file: 'PersonalMessage') : Utils::$context['current_label'], ' -

-
- - - - - - - - - - - '; - - if (!Utils::$context['show_delete']) { - echo ' - - - '; - } - - while ($message = Utils::$context['get_pmessage']('subject')) { - echo ' - - - - - - - '; - } - - echo ' - -
- - - ', Lang::getTxt('date', file: 'General'), Utils::$context['sort_by'] == 'date' ? ' ' : '', ' - - ', Lang::getTxt('subject', file: 'General'), Utils::$context['sort_by'] == 'subject' ? ' ' : '', ' - - ', Lang::getTxt(Utils::$context['from_or_to'] == 'from' ? 'from' : 'to', file: 'General'), Utils::$context['sort_by'] == 'name' ? ' ' : '', ' - - -
', Lang::getTxt('pm_alert_none', file: 'General'), '
- - ', $message['is_replied_to'] ? '' : '', ' - ', $message['time'], ' - ', (Utils::$context['display_mode'] != 0 && Utils::$context['current_pm'] == $message['id'] ? '*' : ''), '', $message['subject'], $message['is_unread'] ? ' ' . Lang::getTxt('new', file: 'General') . '' : '', ' - - ', (Utils::$context['from_or_to'] == 'from' ? $message['member']['link'] : (empty($message['recipients']['to']) ? '' : implode(', ', $message['recipients']['to']))), ' - - -
-
- -
 '; - - if (Utils::$context['show_delete']) { - if (!empty(Utils::$context['currently_using_labels']) && Utils::$context['folder'] != 'sent') { - echo ' - - '; - } - - echo ' - '; - } - - echo ' -
-
'; -} - -/** - * The form for the PM search feature - */ -function template_search() -{ - if (!empty(Utils::$context['search_errors'])) { - echo ' -
- ', implode('
', Utils::$context['search_errors']['messages']), ' -
'; - } - - echo ' -
-
-

', Lang::getTxt('pm_search_title', file: 'PersonalMessage'), '

-
- '; - - // Do we have some labels setup? If so offer to search by them! - if (Utils::$context['currently_using_labels']) { - echo ' -
-
- -
-
    '; - - foreach (Utils::$context['search_labels'] as $label) { - echo ' -
  • - -
  • '; - } - - echo ' -
-
-
-
- - - -
-
-
'; - - // Some javascript for the advanced toggling - echo ' - '; - } - - echo ' -
'; -} - -/** - * Displays results from a PM search - */ -function template_search_results() -{ - echo ' -
-

', Lang::getTxt('pm_search_results', file: 'PersonalMessage'), '

-
-
- ', Lang::getTxt('pm_search_results_info', [Utils::$context['num_results'], Lang::sentenceList(Utils::$context['search_in'])], file: 'PersonalMessage'), ' -
-
- -
'; - - // Complete results? - if (empty(Utils::$context['search_params']['show_complete']) && !empty(Utils::$context['personal_messages'])) { - echo ' - - - - - - - - - '; - } - - // Print each message out... - foreach (Utils::$context['personal_messages'] as $message) { - // Are we showing it all? - if (!empty(Utils::$context['search_params']['show_complete'])) { - template_single_pm($message); - } - - // Otherwise just a simple list! - else { - echo ' - - - - - '; - } - } - - // Finish off the page... - if (empty(Utils::$context['search_params']['show_complete']) && !empty(Utils::$context['personal_messages'])) { - echo ' - -
', Lang::getTxt('date', file: 'General'), '', Lang::getTxt('subject', file: 'General'), '', Lang::getTxt('from', file: 'General'), '
', $message['time'], '', $message['link'], '', $message['member']['link'], '
'; - } - - // No results? - if (empty(Utils::$context['personal_messages'])) { - echo ' -
-

', Lang::getTxt('pm_search_none_found', file: 'PersonalMessage'), '

-
'; - } - - echo ' -
- -
'; - -} - -/** - * The form for sending a new PM - */ -function template_send() -{ - // Show which messages were sent successfully and which failed. - if (!empty(Utils::$context['send_log'])) { - echo ' -
-

', Lang::getTxt('pm_send_report', file: 'PersonalMessage'), '

-
-
'; - - if (!empty(Utils::$context['send_log']['sent'])) { - foreach (Utils::$context['send_log']['sent'] as $log_entry) { - echo ' - ', $log_entry, '
'; - } - } - - if (!empty(Utils::$context['send_log']['failed'])) { - foreach (Utils::$context['send_log']['failed'] as $log_entry) { - echo ' - ', $log_entry, '
'; - } - } - - echo ' -
-
'; - } - - // Show the preview of the personal message. - echo ' - '; - - // Main message editing box. - echo ' -
-
-

- ', Lang::getTxt('new_message', file: 'PersonalMessage'), ' -

-
-
'; - - // If there were errors for sending the PM, show them. - echo ' -
-
-
- ', Lang::getTxt('error_while_submitting', file: 'General'), ' -
-
- ', empty(Utils::$context['post_error']['messages']) ? '' : implode('
', Utils::$context['post_error']['messages']), ' -
-
-
'; - - if (!empty(Config::$modSettings['drafts_pm_enabled'])) { - echo ' - '; - } - - echo ' -
'; - - // To and bcc. Include a button to search for members. - echo ' -
- ', trim(Lang::getTxt('pm_to', ['list' => ''], file: 'PersonalMessage')), ' -
'; - - // Autosuggest will be added by the JavaScript later on. - echo ' -
- '; - - // A link to add BCC, only visible with JavaScript enabled. - echo ' - '; - - // A div that'll contain the items found by the autosuggest. - echo ' -
'; - - echo ' -
'; - - // This BCC row will be hidden by default if JavaScript is enabled. - echo ' -
- ', trim(Lang::getTxt('pm_bcc', ['list' => ''], file: 'PersonalMessage')), ' -
-
- -
-
'; - - // The subject of the PM. - echo ' -
- ', Lang::getTxt('subject', file: 'General'), ' -
-
- -
-
'; - - template_control_richedit(Utils::$context['post_box_name'], true, true); - - // If the admin enabled the pm drafts feature, show a draft selection box - if (!empty(Utils::$context['drafts_save']) && !empty(Utils::$context['drafts']) && !empty(Theme::$current->options['drafts_show_saved_enabled'])) { - echo ' -
-

- ', Lang::getTxt('drafts_show', file: 'Drafts'), ' -

- -
-
-
-
', Lang::getTxt('subject', file: 'General'), '
-
', trim(Lang::getTxt('draft_saved_on', ['date' => ''], file: 'Drafts')), '
'; - - foreach (Utils::$context['drafts'] as $draft) { - echo ' -
', $draft['link'], '
-
', $draft['poster_time'], '
'; - } - echo ' -
-
'; - } - - // Require an image to be typed to save spamming? - if (Utils::$context['require_verification']) { - echo ' -
- ', Lang::getTxt('pm_visual_verification_label', file: 'PersonalMessage'), ' - ', template_control_verification(Utils::$context['visual_verification_id'], 'all'), ' -
'; - } - - // Send, Preview, spellcheck buttons. - echo ' - - ', template_control_richedit_buttons(Utils::$context['post_box_name']), ' - - - - - - - -
-
-
'; - - echo ' - '; - - // Show the message you're replying to. - if (Utils::$context['reply']) { - echo ' -

-
-

', Lang::getTxt('pm_subject', Utils::$context['quoted_message'], file: 'PersonalMessage'), '

-
-
-
- ', Utils::$context['quoted_message']['time'], ' - ', Lang::getTxt('pm_from', ['member' => Utils::$context['quoted_message']['member']['link']], file: 'PersonalMessage'), ' -
-
- ', Utils::adjustHeadingLevels(Utils::$context['quoted_message']['body'], 3), ' -
-
'; - } - - echo ' - '; -} - -/** - * This template asks the user whether they wish to empty out their folder/messages. - */ -function template_ask_delete() -{ - echo ' -
-

- ', Lang::getTxt(Utils::$context['delete_all'] ? 'delete_message' : 'delete_all', file: 'PersonalMessage'), ' -

-
-
-

', Lang::getTxt('delete_all_confirm', file: 'PersonalMessage'), '

-
- ', Lang::getTxt('yes', file: 'General'), ' - ', Lang::getTxt('no', file: 'General'), ' -
'; -} - -/** - * This template asks the user what messages they want to prune. - */ -function template_prune() -{ - echo ' -
-

', Lang::getTxt('pm_prune', file: 'PersonalMessage'), '

-
-
-
-

', Lang::getTxt('pm_prune_desc1', file: 'PersonalMessage'), ' ', Lang::getTxt('pm_prune_desc2', file: 'PersonalMessage'), '

- - -
-
-
-
-

', Lang::getTxt('pm_remove_all', file: 'PersonalMessage'), '

- - -
-
'; -} - -/** - * Here we allow the user to setup labels, remove labels and change rules for labels (i.e, do quite a bit) - */ -function template_labels() -{ - echo ' -
-
-

', Lang::getTxt('pm_manage_labels', file: 'PersonalMessage'), '

-
-
- ', Lang::getTxt('pm_labels_desc', file: 'PersonalMessage'), ' -
- - - - - - - - '; - - if (count(Utils::$context['labels']) < 2) { - echo ' - - - '; - } else { - foreach (Utils::$context['labels'] as $label) { - if ($label['id'] == -1) { - continue; - } - - echo ' - - - - '; - } - } - echo ' - -
- ', Lang::getTxt('pm_label_name', file: 'PersonalMessage'), ' - '; - - if (count(Utils::$context['labels']) > 2) { - echo ' - '; - } - - echo ' -
', Lang::getTxt('pm_labels_no_exist', file: 'PersonalMessage'), '
- -
'; - - if (!count(Utils::$context['labels']) < 2) { - echo ' -
- - -
'; - } - - echo ' - -
-
-
-

', Lang::getTxt('pm_label_add_new', file: 'PersonalMessage'), '

-
-
-
-
- -
-
- -
-
- -
- -
-
'; -} - -/** - * Template for reporting a personal message. - */ -function template_report_message() -{ - echo ' -
- -
- ', Lang::getTxt('pm_report_desc', file: 'PersonalMessage'), ' -
-
-

', Lang::getTxt('pm_report_title', file: 'PersonalMessage'), '

-
-
-
'; - - // If there is more than one admin on the forum, allow the user to choose the one they want to direct to. - // @todo Why? - if (Utils::$context['admin_count'] > 1) { - echo ' -
- ', Lang::getTxt('pm_report_admins', file: 'PersonalMessage'), ' -
-
- -
'; - } - - echo ' -
- ', Lang::getTxt('pm_report_reason', file: 'PersonalMessage'), ' -
-
- -
-
-
- -
-
- -
'; -} - -/** - * Little template just to say "Yep, it's been submitted" - */ -function template_report_message_complete() -{ - echo ' -
-

', Lang::getTxt('pm_report_title', file: 'PersonalMessage'), '

-
-
-

', Lang::getTxt('pm_report_done', file: 'PersonalMessage'), '

- ', Lang::getTxt('pm_report_return', file: 'PersonalMessage'), ' -
'; -} - -/** - * Manage rules. - */ -function template_rules() -{ - echo ' -
-
-

', Lang::getTxt('pm_manage_rules', file: 'PersonalMessage'), '

-
-
- ', Lang::getTxt('pm_manage_rules_desc', file: 'PersonalMessage'), ' -
- - - - - - - - '; - - if (empty(Utils::$context['rules'])) { - echo ' - - - '; - } - - foreach (Utils::$context['rules'] as $rule) { - echo ' - - - - '; - } - - echo ' - -
- ', Lang::getTxt('pm_rule_title', file: 'PersonalMessage'), ' - '; - - if (!empty(Utils::$context['rules'])) { - echo ' - '; - } - - echo ' -
- ', Lang::getTxt('pm_rules_none', file: 'PersonalMessage'), ' -
- ', $rule['name'], ' - - -
-
- ', Lang::getTxt('pm_add_rule', file: 'PersonalMessage'), ''; - - if (!empty(Utils::$context['rules'])) { - echo ' - - '; - } - - if (!empty(Utils::$context['rules'])) { - echo ' - ', Lang::getTxt('pm_apply_rules', file: 'PersonalMessage'), ''; - } - - echo ' -
-
'; - -} - -/** - * Template for adding/editing a rule. - */ -function template_add_rule() -{ - echo ' - '; - - echo ' -
-
-

', Lang::getTxt(Utils::$context['rid'] == 0 ? 'pm_add_rule' : 'pm_edit_rule', file: 'PersonalMessage'), '

-
-
-
-
- ', Lang::getTxt('pm_rule_name', file: 'PersonalMessage'), '
- ', Lang::getTxt('pm_rule_name_desc', file: 'PersonalMessage'), ' -
-
- -
-
-
- ', Lang::getTxt('pm_rule_criteria', file: 'PersonalMessage'), ''; - - // Add a dummy criteria to allow expansion for none js users. - Utils::$context['rule']->criteria[] = ['t' => '', 'v' => '']; - - // For each criteria print it out. - $isFirst = true; - - foreach (Utils::$context['rule']->criteria as $k => $criteria) { - if (!$isFirst && $criteria['t'] == '') { - echo '
'; - } elseif (!$isFirst) { - echo '
'; - } - - echo ' - - - - - - - '; - - // If this is the dummy we add a means to hide for non js users. - if ($isFirst) { - $isFirst = false; - } elseif ($criteria['t'] == '') { - echo '
'; - } - } - - echo ' -
- -

- ', Lang::getTxt('pm_rule_logic', file: 'PersonalMessage'), ' - -
-
- ', Lang::getTxt('pm_rule_actions', file: 'PersonalMessage'), ''; - - // As with criteria - add a dummy action for "expansion". - Utils::$context['rule']->actions[] = ['t' => '', 'v' => '']; - - // Print each action. - $isFirst = true; - - foreach (Utils::$context['rule']->actions as $k => $action) { - if (!$isFirst && $action['t'] == '') { - echo '
'; - } elseif (!$isFirst) { - echo '
'; - } - - echo ' - - - - '; - - if ($isFirst) { - $isFirst = false; - } elseif ($action['t'] == '') { - echo '
'; - } - } - - echo ' -
- -
-
-

', Lang::getTxt('pm_rule_description', file: 'PersonalMessage'), '

-
-
-
', Lang::getTxt('pm_rule_js_disabled', file: 'PersonalMessage'), '
-
-
- - -
-
-
'; - - // Now setup all the bits! - echo ' - '; -} - -/** - * Template for showing all of a user's PM drafts. - */ -function template_showPMDrafts() -{ - echo ' -
-

- ', Lang::getTxt('drafts_show', file: 'Drafts'), ' -

-
-

- ', Lang::getTxt('drafts_show_desc', file: 'Drafts'), ' -

'; - - // No drafts? Just show an informative message. - if (empty(Utils::$context['drafts'])) { - echo ' -
- ', Lang::getTxt('draft_none', file: 'Drafts'), ' -
'; - } else { - echo ' -
- -
'; - - // For every draft to be displayed, give it its own div, and show the important details of the draft. - foreach (Utils::$context['drafts'] as $draft) { - echo ' -
-
#', $draft['counter'], '
-
-

- ', $draft['subject'], ' -

-
-
', Lang::getTxt('pm_to', ['list' => implode(Lang::getTxt('sentence_list_separator', file: 'General') . ' ', $draft['recipients']['to'])]), '
'; - - if (!empty($draft['recipients']['bcc'])) { - echo' -
', Lang::getTxt('pm_bcc', ['list' => implode(Lang::getTxt('sentence_list_separator', file: 'General') . ' ', $draft['recipients']['bcc'])]), '
'; - } - - echo ' -
-
- ', Lang::getTxt('draft_last_saved', ['age' => $draft['age'], 'remaining' => $draft['remaining']], file: 'Drafts'), ' -
-
-
- ', Utils::adjustHeadingLevels($draft['body'], 4), ' -
'; - - // Draft buttons - template_quickbuttons($draft['quickbuttons'], 'pm_drafts'); - - echo ' -
'; - } - - // Show page numbers. - echo ' -
- -
'; - } -} diff --git a/Themes/default/Poll.template.php b/Themes/default/Poll.template.php deleted file mode 100644 index 67a3da6f25d..00000000000 --- a/Themes/default/Poll.template.php +++ /dev/null @@ -1,141 +0,0 @@ - -
-
- ', Lang::getTxt(Utils::$context['is_edit'] ? 'error_while_editing_poll' : 'error_while_adding_poll', file: 'Errors'), ' -
-
- ', empty(Utils::$context['poll_error']['messages']) ? '' : implode('
', Utils::$context['poll_error']['messages']), ' -
-
-
'; - } - - // Start the main poll form. - echo ' -
-
-
-

', Utils::$context['page_title'], '

-
'; - - echo ' -
-
- -
- ', Lang::getTxt('poll_question', file: 'General'), ' -
-
', Lang::getTxt('poll_question', file: 'General'), '
-
'; - - foreach (Utils::$context['choices'] as $choice) { - echo ' -
- -
-
- '; - - // Does this option have a vote count yet, or is it new? - if ($choice['votes'] != -1) { - echo ' (', Lang::getTxt('number_of_votes', [$choice['votes']], file: 'Post'), ')'; - } - - echo ' -
'; - } - - // poll.js puts the "add option" button here, after the list it appends to. - echo ' -
-
-
- ', Lang::getTxt('poll_options', file: 'Post'), ' -
'; - - if (Utils::$context['can_moderate_poll']) { - echo ' -
- -
-
- -
-
-
- ', Lang::getTxt('poll_run_limit', file: 'Post'), ' -
-
- -
-
- -
-
- -
'; - - if (Utils::$context['poll']['guest_vote_allowed']) { - echo ' -
- -
-
- -
'; - } - } - - echo ' -
- ', Lang::getTxt('poll_results_visibility', file: 'Post'), ' -
-
-
-
- -
-
-
'; - - // If this is an edit, we can allow them to reset the vote counts. - if (Utils::$context['is_edit']) { - echo ' -
- ', Lang::getTxt('reset_votes', file: 'Post'), ' - ' . Lang::getTxt('reset_votes_check', file: 'Post') . ' -
'; - } - echo ' - -
-
- - -
-
'; -} diff --git a/Themes/default/Post.template.php b/Themes/default/Post.template.php deleted file mode 100644 index 38c8542e0ce..00000000000 --- a/Themes/default/Post.template.php +++ /dev/null @@ -1,1136 +0,0 @@ -'; - - // When using Go Back due to fatal_error, allow the form to be re-submitted with changes. - if (BrowserDetector::isBrowser('is_firefox')) { - echo ' - window.addEventListener("pageshow", reActivate, false);'; - } - - // Start with message icons - and any missing from this theme. - echo ' - var icon_urls = ', json_encode(array_column(Utils::$context['icons'], 'url', 'value'), JSON_UNESCAPED_SLASHES), ';'; - - // If we are making a calendar event we want to ensure we show the current days in a month etc... this is done here. - if (Utils::$context['make_event']) { - echo ' - var monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];'; - } - - // End of the javascript, start the form and display the link tree. - echo ' - -
'; - - // If the user wants to see how their message looks - the preview section is where it's at! - echo ' - -
'; - - if (Utils::$context['make_event'] && (!Utils::$context['event']->new || !empty(Utils::$context['current_board']))) { - echo ' - - '; - } - - // Start the main table. - echo ' -
-

', Utils::$context['page_title'], '

-
-
-
', isset(Utils::$context['current_topic']) ? ' - ' : ''; - - // If an error occurred, explain what happened. - echo ' - '; - - // If this won't be approved let them know! - if (!Utils::$context['becomes_approved']) { - echo ' -
- ', Lang::getTxt('wait_for_approval', file: 'General'), ' - -
'; - } - - // If it's locked, show a message to warn the replier. - if (!empty(Utils::$context['locked'])) { - echo ' -
- ', Lang::getTxt('topic_locked_no_reply', file: 'Post'), ' -
'; - } - - if (!empty(Config::$modSettings['drafts_post_enabled'])) { - echo ' - '; - } - - // The post header... important stuff - template_post_header(); - - // Are you posting a calendar event? - if (Utils::$context['make_event']) { - echo ' -
'; - - template_event_options(); - - if (!empty(Utils::$context['linked_calendar_events'])) { - template_linked_events(); - } - - echo ' -
'; - } - - // If this is a poll then display all the poll options! - if (Utils::$context['make_poll']) { - echo ' -
-
-
- ', Lang::getTxt('poll_question', file: 'General'), ' -
-
', Lang::getTxt('poll_question', file: 'General'), '
-
- -
'; - - // Loop through all the choices and print them out. - foreach (Utils::$context['choices'] as $choice) { - echo ' -
- -
-
- -
'; - } - - // poll.js puts the "add option" button here, after the list it appends to. - echo ' -
-
-
- ', Lang::getTxt('poll_options', file: 'Post'), ' -
-
- -
-
- -
-
-
- ', Lang::getTxt('poll_run_limit', file: 'Post'), ' -
-
- -
-
- -
-
- -
'; - - if (Utils::$context['poll_options']['guest_vote_enabled']) { - echo ' -
- -
-
- -
'; - } - - echo ' -
- ', Lang::getTxt('poll_results_visibility', file: 'Post'), ' -
-
-
-
- -
-
-
-
'; - } - - // Show the actual posting area... - template_control_richedit('message', true, true); - - // Show attachments. - if (!empty(Utils::$context['current_attachments']) || Utils::$context['can_post_attachment']) { - echo ' -
'; - - // The non-JavaScript UI. - echo ' -
-
-
- ', Lang::getTxt('attachments', file: 'Post'), ':'; - - if (Utils::$context['can_post_attachment']) { - echo ' - '; - } - - if (!empty(Config::$modSettings['attachmentSizeLimit'])) { - echo ' - '; - } - - echo ' -
'; - - if (!empty(Utils::$context['attachment_restrictions'])) { - echo ' -
', Lang::getTxt('attach_restrictions', ['list' => implode(Lang::getTxt('sentence_list_separator', file: 'General') . ' ', Utils::$context['attachment_restrictions'])]), '
'; - } - - echo ' -
- - ', Lang::getTxt('uncheck_unwatchd_attach', file: 'Post'), ' -
-
-
'; - - // If this post already has attachments on it - give information about them. - if (!empty(Utils::$context['current_attachments'])) { - foreach (Utils::$context['current_attachments'] as $attachment) { - echo ' -
- '; - - if (!empty(Config::$modSettings['attachmentShowImages'])) { - if (str_starts_with($attachment['mime_type'], 'image')) { - $src = Config::$scripturl . '?action=dlattach;attach=' . (!empty($attachment['thumb']) ? $attachment['thumb'] : $attachment['attachID']) . ';preview;image'; - } else { - $src = Theme::$current->settings['images_url'] . '/generic_attach.png'; - } - - echo ' -
- -
'; - } - - echo ' -
- ' . $attachment['name'] . '', (empty($attachment['approved']) ? ' -
(' . Lang::getTxt('awaiting_approval', file: 'General') . ')' : ''), ' -
', $attachment['size'] < 1024000 ? Lang::getTxt('size_kilobyte', [round($attachment['size'] / 1024, 2)], file: 'General') : Lang::getTxt('size_megabyte', [round($attachment['size'] / 1024 / 1024, 2)], file: 'General'), ' -
-
'; - } - } - - echo ' -
-
'; - - if (!empty(Utils::$context['files_in_session_warning'])) { - echo ' -
', Utils::$context['files_in_session_warning'], '
'; - } - - // Is the user allowed to post any additional ones? If so give them the boxes to do it! - if (Utils::$context['can_post_attachment']) { - // Print dropzone UI. - echo ' -
-
-
- ', Lang::getTxt(Utils::$context['num_allowed_attachments'] <= count(Utils::$context['current_attachments']) ? 'attach_limit_nag' : 'attach_drop_zone', file: 'Post'), ' -
-
-
-
-
-
- -
-
- -
-
- -
-
-
-
- -
-
- - - - -
-
-
-
-
-
-
-
- (', Lang::getTxt('clean_attach', file: 'Post'), ')'; - - if (!empty(Config::$modSettings['attachmentSizeLimit'])) { - echo ' - '; - } - - echo ' -
-
-
-
-
-
-
-
'; - } - - echo ' -
'; - } - - // If the admin has enabled the hiding of the additional options, fold them - // away behind a disclosure triangle. A details element remembers nothing by - // itself, so the script further down copies its state into the hidden - // additional_options field that gets posted back. - if (!empty(Config::$modSettings['additional_options_collapsable'])) { - echo ' -
- ', Lang::getTxt('post_additionalopt', file: 'Post'), ''; - } - - // Display the checkboxes for all the standard options - if they are available to the user! - template_post_options(Utils::$context['post_options']); - - if (!empty(Config::$modSettings['additional_options_collapsable'])) { - echo ' -
'; - } - - // If the admin enabled the drafts feature, show a draft selection box - if (!empty(Config::$modSettings['drafts_post_enabled']) && !empty(Utils::$context['drafts']) && !empty(Config::$modSettings['drafts_show_saved_enabled']) && !empty(Theme::$current->options['drafts_show_saved_enabled'])) { - echo ' -
-

- ', Lang::getTxt('drafts_show', file: 'Drafts'), ' -

- -
-
-
-
', Lang::getTxt('subject', file: 'General'), '
-
', trim(Lang::getTxt('draft_saved_on', ['date' => ''], file: 'Drafts')), '
'; - - foreach (Utils::$context['drafts'] as $draft) { - echo ' -
', $draft['link'], '
-
', $draft['poster_time'], '
'; - } - echo ' -
-
'; - } - - // Is visual verification enabled? - if (Utils::$context['require_verification']) { - echo ' -
- - ', Lang::getTxt('verification', file: 'General'), ' - - ', template_control_verification(Utils::$context['visual_verification_id'], 'all'), ' -
'; - } - - // Finally, the submit buttons. - echo ' - - ', template_control_richedit_buttons('message'); - - echo ' - -
-
-
'; - - // Assuming this isn't a new topic pass across the last message id. - if (isset(Utils::$context['topic_last_message'])) { - echo ' - '; - } - - echo ' - - - -
'; - - echo ' - '; - - // If the user is replying to a topic show the previous posts. - if (isset(Utils::$context['previous_posts']) && count(Utils::$context['previous_posts']) > 0) { - echo ' -
-
-

', Lang::getTxt('topic_summary', file: 'General'), '

-
- '; - - $ignored_posts = []; - - foreach (Utils::$context['previous_posts'] as $post) { - $ignoring = false; - - if (!empty($post['is_ignored'])) { - $ignored_posts[] = $ignoring = $post['id']; - } - - echo ' -
-
-
-
- ', Lang::getTxt('posted_by_member_time', ['member' => $post['poster'], 'time' => $post['time']], file: 'General'), ' -
-
'; - - if ($ignoring) { - echo ' -
- ', Lang::getTxt('ignoring_user', file: 'General'), ' - -
'; - } - - echo ' -
', Utils::adjustHeadingLevels($post['message'], 5), '
'; - - if (Utils::$context['can_quote']) { - echo ' - '; - } - - echo ' -
-
'; - } - - echo ' -
- '; - } -} - -/** - * Draws the checkboxes that sit below the editor on the posting form. - * - * See Post::setupPostOptions() for what each option looks like. Anything an - * option lists under 'hidden' is written out just before its checkbox, because - * a checkbox that is not ticked submits nothing at all and the hidden field of - * the same name is what carries the "off" value. - * - * @param array $post_options The options to draw, in the order they go in. - */ -function template_post_options(array $post_options): void -{ - echo ' -
    '; - - foreach ($post_options as $option) { - if (!$option['can_show']) { - continue; - } - - echo ' -
  • '; - - foreach ($option['hidden'] ?? [] as $hidden_name => $hidden_value) { - echo ' - '; - } - - echo ' - -
  • '; - } - - echo ' -
'; -} - -/** - * The template for the spellchecker. - */ -function template_spellcheck() -{ - // The style information that makes the spellchecker look... like the forum hopefully! - echo ' - - - - ', Lang::getTxt('spell_check', file: 'General'), ' - - - - - - - - -
-
 
- - - - - -
- ', Lang::getTxt('spellcheck_change_to', file: 'Post'), '
- -
- ', Lang::getTxt('spellcheck_suggest', file: 'Post'), '
- -
-
- - - - -
-
- -'; -} - -/** - * The template for the AJAX quote feature - */ -function template_quotefast() -{ - echo ' - - - - ', Lang::getTxt('retrieving_quote', file: 'Post'), ' - - - - ', Lang::getTxt('retrieving_quote', file: 'Post'), ' - - - -'; -} - -/** - * The form for sending out an announcement - */ -function template_announce() -{ - echo ' -
-
-
-

', Lang::getTxt('announce_title', file: 'Post'), '

-
-
- ', Lang::getTxt('announce_desc', file: 'Post'), ' -
-
-

- ', Lang::getTxt('announce_this_topic', ['subject' => '' . Utils::$context['topic_subject'] . ''], file: 'Post'), ' -

-
    '; - - foreach (Utils::$context['groups'] as $group) { - echo ' -
  • - (', $group['member_count'] ?? Lang::getTxt('not_applicable', file: 'General'), ') -
  • '; - } - - echo ' -
  • - -
  • -
-
-
- - - - - -
-
-
-
-
-
'; -} - -/** - * The confirmation/progress page, displayed after the admin has clicked the button to send the announcement. - */ -function template_announcement_send() -{ - echo ' -
-
-
-

- ', Lang::getTxt('announce_sending', ['subject' => '' . Utils::$context['topic_subject'] . ''], file: 'Post'),' -

-
- ', Lang::getTxt('announce_done', Utils::$context, file: 'Post'), ' -
-
-
-
- - - - - - - -
-
-
-
-
-
- '; -} - -/** - * Prints the input fields in the form's header (subject, message icon, guest name & email, etc.) - * - * Mod authors can use the 'integrate_post_end' hook to modify or add to these (see Post.php). - * - * Theme authors can customize the output in a couple different ways: - * 1. Change specific values in the Utils::$context['posting_fields'] array. - * 2. Add an 'html' element to the 'label' and/or 'input' elements of the field they want to - * change. This should contain the literal HTML string to be printed. - * - * See the documentation in Post.php for more info on the Utils::$context['posting_fields'] array. - */ -function template_post_header() -{ - // Sanity check: submitting the form won't work without at least a subject field - if (empty(Utils::$context['posting_fields']['subject']) || !is_array(Utils::$context['posting_fields']['subject'])) { - Utils::$context['posting_fields']['subject'] = [ - 'label' => ['html' => ''], - 'input' => ['html' => ''], - ]; - } - - // THEME AUTHORS: Above this line is a great place to make customizations to the posting_fields array - - // Start printing the header - echo ' -
'; - - foreach (Utils::$context['posting_fields'] as $pfid => $pf) { - // We need both a label and an input - if (empty($pf['label']) || empty($pf['input'])) { - continue; - } - - // The labels are pretty simple... - echo ' -
'; - - // Any leading HTML before the label - if (!empty($pf['label']['before'])) { - echo ' - ', $pf['label']['before']; - } - - if (!empty($pf['label']['html'])) { - echo $pf['label']['html']; - } else { - echo ' - ', $pf['label']['text'], ''; - } - - // Any trailing HTML after the label - if (!empty($pf['label']['after'])) { - echo ' - ', $pf['label']['after']; - } - - echo ' -
'; - - // Here's where the fun begins... - echo ' -
'; - - // Any leading HTML before the main input - if (!empty($pf['input']['before'])) { - echo ' - ', $pf['input']['before']; - } - - // If there is a literal HTML string already defined, just print it. - if (!empty($pf['input']['html'])) { - echo $pf['input']['html']; - } - // Simple text inputs and checkboxes - elseif (in_array($pf['input']['type'], ['text', 'password', 'color', 'date', 'datetime-local', 'email', 'month', 'number', 'range', 'tel', 'time', 'url', 'week', 'checkbox'])) { - echo ' - $value) { - if (is_bool($value)) { - echo $value ? ' ' . $attribute : ''; - } else { - echo ' ', $attribute, '="', $value, '"'; - } - } - } - - echo '>'; - } - // textarea - elseif ($pf['input']['type'] === 'textarea') { - echo ' - $value) { - if ($attribute === 'value') { - continue; - } - - if (is_bool($value)) { - echo $value ? ' ' . $attribute : ''; - } else { - echo ' ', $attribute, '="', $value, '"'; - } - } - } - - echo '>', !empty($pf['input']['attributes']['value']) ? $pf['input']['attributes']['value'] : '', ''; - } - // Select menus are more complicated - elseif ($pf['input']['type'] === 'select' && is_array($pf['input']['options'])) { - // The select element itself - echo ' - $value) { - if (is_bool($value)) { - echo $value ? ' ' . $attribute : ''; - } else { - echo ' ', $attribute, '="', $value, '"'; - } - } - } - - echo '>'; - - // The options - foreach ($pf['input']['options'] as $optlabel => $option) { - // An option containing options is an optgroup - if (!empty($option['options']) && is_array($option['options'])) { - echo ' - $value) { - if ($attribute === 'options') { - continue; - } - - if (is_bool($value)) { - echo $value ? ' ' . $attribute : ''; - } else { - echo ' ', $attribute, '="', $value, '"'; - } - } - } - - echo '>'; - - foreach ($option['options'] as $grouped_optlabel => $grouped_option) { - echo ' - $value) { - if (is_bool($value)) { - echo $value ? ' ' . $attribute : ''; - } else { - echo ' ', $attribute, '="', $value, '"'; - } - } - - echo '>', $grouped_option['label'], ''; - - } - - echo ' - '; - } - // Simple option - else { - echo ' - $value) { - if (is_bool($value)) { - echo $value ? ' ' . $attribute : ''; - } else { - echo ' ', $attribute, '="', $value, '"'; - } - } - - echo '>', $optlabel, ''; - } - } - - // Close the select element - echo ' - '; - } - // Radio_select makes a div with some radio buttons in it - elseif ($pf['input']['type'] === 'radio_select' && is_array($pf['input']['options'])) { - echo ' - $value) { - if ($attribute === 'name') { - continue; - } - - if (is_bool($value)) { - echo $value ? ' ' . $attribute : ''; - } else { - echo ' ', $attribute, '="', $value, '"'; - } - } - } - - echo '>'; - - foreach ($pf['input']['options'] as $optlabel => $option) { - echo ' - '; - } - - echo ' - '; - } - - // Any trailing HTML after the main input - if (!empty($pf['input']['after'])) { - echo ' - ', $pf['input']['after']; - } - - echo ' -
'; - } - - echo ' -
'; -} diff --git a/Themes/default/Printpage.template.php b/Themes/default/Printpage.template.php deleted file mode 100644 index 6d1ab1ed5cf..00000000000 --- a/Themes/default/Printpage.template.php +++ /dev/null @@ -1,244 +0,0 @@ - - - - - - - ', Lang::getTxt('print_page', file: 'General'), ' - ', Utils::$context['topic_subject'], ' - - - '; - - template_print_options(); - - echo ' -

', Utils::$context['forum_name_html_safe'], '

-

', Utils::$context['category_name'], ' ▸ ', (!empty(Utils::$context['parent_boards']) ? implode(' ▸ ', Utils::$context['parent_boards']) . ' ▸ ' : ''), Utils::$context['board_name'], ' ▸ ', Lang::getTxt('started_by_member_time', ['member' => Utils::$context['poster_name'], 'time' => Utils::$context['post_time']], file: 'General'), '

-
'; -} - -/** - * The main page. This shows the relevant info in a printer-friendly format - */ -function template_main() -{ - if (!empty(Utils::$context['poll'])) { - echo ' -
- ', Lang::getTxt('poll', file: 'General'), ' -
- ', Lang::getTxt('poll_question', file: 'General'), ': ', Utils::$context['poll']['question'], ' -
'; - - $options = 1; - - foreach (Utils::$context['poll']['options'] as $option) { - echo ' -
- ', Lang::getTxt('option_number', [$options++], file: 'Post'), ': ', $option['option'], ' - ', Utils::$context['allow_results_view'] ? Lang::getTxt('number_of_votes', [$option['votes']], file: 'Post') : '', ' -
'; - } - - echo ' -
'; - } - - foreach (Utils::$context['posts'] as $post) { - echo ' -
-
', $post['subject'], '
-
', Lang::getTxt('posted_by_member_time', $post, file: 'General'), '
-
-
- ', Utils::adjustHeadingLevels($post['body'], 2); - - // Show attachment images - if (isset($_GET['images']) && !empty(Utils::$context['printattach'][$post['id_msg']])) { - echo ' -
'; - - foreach (Utils::$context['printattach'][$post['id_msg']] as $attach) { - echo ' - '; - } - } - - echo ' -
'; - } -} - -/** - * The footer. - */ -function template_print_below() -{ - echo ' -
'; - - template_print_options(); - - echo ' - - -'; -} - -/** - * Displays the print page options - */ -function template_print_options() -{ - $url_text = Config::$scripturl . '?action=printpage;topic=' . Topic::$topic_id . '.0'; - $url_images = $url_text . ';images'; - - echo ' - '; -} diff --git a/Themes/default/Recent.template.php b/Themes/default/Recent.template.php deleted file mode 100644 index 6283490e952..00000000000 --- a/Themes/default/Recent.template.php +++ /dev/null @@ -1,437 +0,0 @@ - -
-

- ', Lang::getTxt('recent_posts', file: 'General'), ' -

-
'; - - if (!empty(Utils::$context['page_index'])) { - echo ' -
- -
'; - } - - if (empty(Utils::$context['posts'])) { - echo ' -
', Lang::getTxt('no_messages', file: 'General'), '
'; - } - - foreach (Utils::$context['posts'] as $post) { - echo ' -
-
#', $post['counter'], '
-
-
', $post['board']['link'], ' / ', $post['link'], '
- ', Lang::getTxt('last_post_member_date', ['member' => $post['poster']['link'], 'relative' => str_contains($post['time'], Lang::getTxt('today', file: 'General')) ? 'today' : (str_contains($post['time'], Lang::getTxt('yesterday', file: 'General')) ? 'yesterday' : 'other'), 'date' => $post['time']]), ' -
-
', $post['body'], '
'; - - // Post options - template_quickbuttons($post['quickbuttons'], 'recent'); - - echo ' -
'; - } - - echo ' -
- -
- '; -} - -/** - * Template for showing unread posts - */ -function template_unread() -{ - // User action pop on mobile screen (or actually small screen), this uses responsive css does not check mobile device. - if (!empty(Utils::$context['recent_buttons'])) { - echo ' - '; - } - - echo ' -
-
-

- ', (!empty(Board::$info->name) ? Board::$info->name . ' - ' : '') . Utils::$context['page_title'], ' -

-
'; - - if (Utils::$context['showCheckboxes']) { - echo ' -
- - - '; - } - - if (!empty(Utils::$context['topics'])) { - echo ' -
- ', Utils::$context['menu_separator'], ' - - ', !empty(Utils::$context['recent_buttons']) ? template_button_strip(Utils::$context['recent_buttons'], 'right') : ''; - - // Mobile action (top) - if (!empty(Utils::$context['recent_buttons'])) { - echo ' - '; - } - - echo ' -
'; - - echo ' -
-
-
-
', Utils::$context['topics_headers']['subject'], ' / ', Utils::$context['topics_headers']['starter'], '
-
', Utils::$context['topics_headers']['replies'], ' / ', Utils::$context['topics_headers']['views'], '
-
', Utils::$context['topics_headers']['last_post'],'
'; - - // Show a "select all" box for quick moderation? - if (Utils::$context['showCheckboxes']) { - echo ' -
- -
'; - } - - echo ' -
-
'; - - foreach (Utils::$context['topics'] as $topic) { - echo ' -
-
- - ', $topic['is_posted_in'] ? '' : '', ' -
-
'; - - // Now we handle the icons - echo ' -
'; - - if ($topic['is_locked']) { - echo ' - '; - } - - if ($topic['is_sticky']) { - echo ' - '; - } - - if ($topic['is_poll']) { - echo ' - '; - } - - echo ' -
'; - - echo ' -
- ' . Lang::getTxt('new', file: 'General') . ' - ', $topic['is_sticky'] ? '' : '', '', $topic['first_post']['link'], '', $topic['is_sticky'] ? '' : '', ' -
-

- ', $topic['first_post']['started_by'], ' -

- ', !empty($topic['pages']) ? '' . $topic['pages'] . '' : '', ' -
-
-

- ', Lang::getTxt('number_of_replies', [$topic['replies']], file: 'General'), ' -
- ', Lang::getTxt('number_of_views', [$topic['views']], file: 'General'), ' -

-
-
- ', Lang::getTxt('last_post_topic', ['post_link' => '' . $topic['last_post']['time'] . '', 'member_link' => $topic['last_post']['member']['link']], file: 'General'), ' -
'; - - if (Utils::$context['showCheckboxes']) { - echo ' -
- -
'; - } - - echo ' -
'; - } - - if (empty(Utils::$context['topics'])) { - echo ' -
'; - } - - echo ' -
-
'; - - echo ' -
- ', !empty(Utils::$context['recent_buttons']) ? template_button_strip(Utils::$context['recent_buttons'], 'right') : '', ' - ', Utils::$context['menu_separator'], ' - '; - - // Mobile action (bottom) - if (!empty(Utils::$context['recent_buttons'])) { - echo ' - '; - } - - echo ' -
'; - } else { - echo ' -
-

- ', Lang::getTxt(Utils::$context['showing_all_topics'] ? 'topic_alert_none' : 'unread_topics_visit_none', ['scripturl' => Config::$scripturl], file: 'General'), ' -

-
'; - } - - if (Utils::$context['showCheckboxes']) { - echo ' -
'; - } - - echo ' -
'; - - if (empty(Utils::$context['no_topic_listing'])) { - template_topic_legend(); - } -} - -/** - * Template for showing unread replies (eg new replies to topics you've posted in) - */ -function template_replies() -{ - // User action pop on mobile screen (or actually small screen), this uses responsive css does not check mobile device. - if (!empty(Utils::$context['recent_buttons'])) { - echo ' - '; - } - - echo ' -
-
-

- ', (!empty(Board::$info->name) ? Board::$info->name . ' - ' : '') . Utils::$context['page_title'], ' -

-
'; - - if (Utils::$context['showCheckboxes']) { - echo ' -
- - - '; - } - - if (!empty(Utils::$context['topics'])) { - echo ' -
- ', Utils::$context['menu_separator'], ' - - ', !empty(Utils::$context['recent_buttons']) ? template_button_strip(Utils::$context['recent_buttons'], 'right') : ''; - - // Mobile action (top) - if (!empty(Utils::$context['recent_buttons'])) { - echo ' - '; - } - - echo ' -
'; - - echo ' -
-
-
-
', Utils::$context['topics_headers']['subject'], ' / ', Utils::$context['topics_headers']['starter'], '
-
', Utils::$context['topics_headers']['replies'], ' / ', Utils::$context['topics_headers']['views'], '
-
', Utils::$context['topics_headers']['last_post'],'
'; - - // Show a "select all" box for quick moderation? - if (Utils::$context['showCheckboxes']) { - echo ' -
- -
'; - } - - echo ' -
-
'; - - foreach (Utils::$context['topics'] as $topic) { - echo ' -
-
- - ', $topic['is_posted_in'] ? '' : '', ' -
-
'; - - // Now we handle the icons - echo ' -
'; - - if ($topic['is_locked']) { - echo ' - '; - } - - if ($topic['is_sticky']) { - echo ' - '; - } - - if ($topic['is_poll']) { - echo ' - '; - } - - echo ' -
'; - - echo ' -
- ' . Lang::getTxt('new', file: 'General') . ' - ', $topic['is_sticky'] ? '' : '', '', $topic['first_post']['link'], '', $topic['is_sticky'] ? '' : '', ' -
-

- ', $topic['first_post']['started_by'], ' -

- ', !empty($topic['pages']) ? '' . $topic['pages'] . '' : '', ' -
-
-

- ', Lang::getTxt('number_of_replies', [$topic['replies']], file: 'General'), ' -
- ', Lang::getTxt('number_of_views', [$topic['views']], file: 'General'), ' -

-
-
- ', Lang::getTxt('last_post_topic', ['post_link' => '' . $topic['last_post']['time'] . '', 'member_link' => $topic['last_post']['member']['link']], file: 'General'), ' -
'; - - if (Utils::$context['showCheckboxes']) { - echo ' -
- -
'; - } - - echo ' -
'; - } - - echo ' -
-
-
- ', !empty(Utils::$context['recent_buttons']) ? template_button_strip(Utils::$context['recent_buttons'], 'right') : '', ' - ', Utils::$context['menu_separator'], ' - '; - - // Mobile action (bottom) - if (!empty(Utils::$context['recent_buttons'])) { - echo ' - '; - } - - echo ' -
'; - } else { - echo ' -
-

- ', Lang::getTxt(Utils::$context['showing_all_topics'] ? 'topic_alert_none' : 'updated_topics_visit_none', file: 'General'), ' -

-
'; - } - - if (Utils::$context['showCheckboxes']) { - echo ' -
'; - } - - echo ' -
'; - - if (empty(Utils::$context['no_topic_listing'])) { - template_topic_legend(); - } -} diff --git a/Themes/default/Register.template.php b/Themes/default/Register.template.php deleted file mode 100644 index e21fa7dc942..00000000000 --- a/Themes/default/Register.template.php +++ /dev/null @@ -1,831 +0,0 @@ -'; - - if (!empty(Utils::$context['agreement'])) { - echo ' -
-

', Lang::getTxt('registration_agreement', file: 'General'), '

-
-
-
', Utils::adjustHeadingLevels(Utils::$context['agreement'], 3), '
-
'; - } - - if (!empty(Utils::$context['privacy_policy'])) { - echo ' -
-

', Lang::getTxt('privacy_policy', file: 'General'), '

-
-
-
', Utils::adjustHeadingLevels(Utils::$context['privacy_policy'], 3), '
-
'; - } - - echo ' -
'; - - // Age restriction in effect? - if (Utils::$context['show_coppa']) { - echo ' -
-
- '; - } else { - echo ' - '; - } - - echo ' - - - -
- '; -} - -/** - * Before registering - get their information. - */ -function template_registration_form() -{ - echo ' - '; - - // Any errors? - if (!empty(Utils::$context['registration_errors'])) { - echo ' -
- ', Lang::getTxt('registration_errors_occurred', file: 'Login'), ' -
    '; - - // Cycle through each error and display an error message. - foreach (Utils::$context['registration_errors'] as $error) { - echo ' -
  • ', $error, '
  • '; - } - - echo ' -
-
'; - } - - echo ' -
-
-

', Lang::getTxt('registration_form', file: 'Login'), '

-
-
-

', Lang::getTxt('required_info', file: 'Login'), '

-
-
-
-
-
- -
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
'; - - // If there is any field marked as required, show it here! - if (!empty(Utils::$context['custom_fields_required']) && !empty(Utils::$context['custom_fields'])) { - echo ' -
'; - - foreach (Utils::$context['custom_fields'] as $field) { - if ($field['show_reg'] > 1) { - echo ' -
- ', $field['name'], ': - ', $field['desc'], ' -
-
', $field['input_html'], '
'; - } - } - - echo ' -
'; - } - - echo ' -
-
'; - - // If we have either of these, show the extra group. - if (!empty(Utils::$context['profile_fields']) || !empty(Utils::$context['custom_fields'])) { - echo ' -
-

', Lang::getTxt('additional_information', file: 'Login'), '

-
-
-
-
'; - } - - if (!empty(Utils::$context['profile_fields'])) { - // Any fields we particularly want? - foreach (Utils::$context['profile_fields'] as $key => $field) { - if ($field['type'] == 'callback') { - if (isset($field['callback_func']) && function_exists('template_profile_' . $field['callback_func'])) { - $callback_func = 'template_profile_' . $field['callback_func']; - $callback_func(); - } - } else { - echo ' -
- ', $field['label'], ':'; - - // Does it have any subtext to show? - if (!empty($field['subtext'])) { - echo ' - ', $field['subtext'], ''; - } - - echo ' -
-
'; - - // Want to put something infront of the box? - if (!empty($field['preinput'])) { - echo ' - ', $field['preinput']; - } - - // What type of data are we showing? - if ($field['type'] == 'label') { - echo ' - ', $field['value']; - } - - // Maybe it's a text box - very likely! - elseif (in_array($field['type'], ['int', 'float', 'text', 'password', 'url'])) { - echo ' - '; - } - - // You "checking" me out? ;) - elseif ($field['type'] == 'check') { - echo ' - '; - } - - // Always fun - select boxes! - elseif ($field['type'] == 'select') { - echo ' - '; - } - - // Something to end with? - if (!empty($field['postinput'])) { - echo ' - ', $field['postinput']; - } - - echo ' -
'; - } - } - } - - // Are there any custom fields? - if (!empty(Utils::$context['custom_fields'])) { - foreach (Utils::$context['custom_fields'] as $field) { - if ($field['show_reg'] < 2) { - echo ' -
- ', $field['name'], ': - ', $field['desc'], ' -
-
', $field['input_html'], '
'; - } - } - } - - // If we have either of these, close the list like a proper gent. - if (!empty(Utils::$context['profile_fields']) || !empty(Utils::$context['custom_fields'])) { - echo ' -
-
-
'; - } - - if (Utils::$context['visual_verification']) { - echo ' -
-

', Lang::getTxt('verification', file: 'General'), '

-
-
-
- ', template_control_verification(Utils::$context['visual_verification_id'], 'all'), ' -
-
'; - } - - echo ' -
'; - - // Age restriction in effect? - if (empty(Utils::$context['agree']) && Utils::$context['show_coppa']) { - echo ' -
-
- '; - } else { - echo ' - '; - } - - echo ' -
- - - -
- '; -} - -/** - * After registration... all done ;). - */ -function template_after() -{ - // Not much to see here, just a quick... "you're now registered!" or what have you. - echo ' -
-
-

', Utils::$context['title'], '

-
-
-

', Utils::$context['description'], '

-
-
'; -} - -/** - * Template for giving instructions about COPPA activation. - */ -function template_coppa() -{ - // Formulate a nice complicated message! - echo ' -
-

', Utils::$context['page_title'], '

-
-
-

', Utils::$context['coppa']['body'], '

-

- ', Lang::getTxt('coppa_form_link_popup', file: 'Login'), ' | ', Lang::getTxt('coppa_form_link_download', file: 'Login'), ' -

-

', Lang::getTxt(Utils::$context['coppa']['many_options'] ? 'coppa_send_to_two_options' : 'coppa_send_to_one_option', file: 'Login'), '

'; - - // Can they send by post? - if (!empty(Utils::$context['coppa']['post'])) { - echo ' -

1) ', Lang::getTxt('coppa_send_by_post', file: 'Login'), '

-
- ', Utils::$context['coppa']['post'], ' -
'; - } - - // Can they send by fax?? - if (!empty(Utils::$context['coppa']['fax'])) { - echo ' -

', !empty(Utils::$context['coppa']['post']) ? '2' : '1', ') ', Lang::getTxt('coppa_send_by_fax', file: 'Login'), '

-
- ', Utils::$context['coppa']['fax'], ' -
'; - } - - // Offer an alternative Phone Number? - if (Utils::$context['coppa']['phone']) { - echo ' -

', Utils::$context['coppa']['phone'], '

'; - } - - echo ' -
'; -} - -/** - * An easily printable form for giving permission to access the forum for a minor. - */ -function template_coppa_form() -{ - // Show the form (As best we can) - echo ' - - - - - - - - - - - - - -
', Utils::$context['forum_contacts'], '
- ', Lang::getTxt('coppa_form_address', file: 'Login'), ': ', Utils::$context['ul'], '
- ', Utils::$context['ul'], '
- ', Utils::$context['ul'], '
- ', Utils::$context['ul'], ' -
- ', Lang::getTxt('coppa_form_date', file: 'Login'), ': ', Utils::$context['ul'], ' -

-
- ', Utils::$context['coppa_body'], ' -
-
'; -} - -/** - * Show a window containing the spoken verification code. - */ -function template_verification_sound() -{ - echo ' - - - - ', Lang::getTxt('visual_verification_sound', file: 'General'), ' - - ', Theme::template_css(), ' - - - -
'; - - if (BrowserDetector::isBrowser('is_ie') || BrowserDetector::isBrowser('is_ie11')) { - echo ' - - - - '; - } else { - echo ' - '; - } - - echo ' -
- ', Lang::getTxt('visual_verification_sound_again', file: 'Login'), '
- ', Lang::getTxt('visual_verification_sound_direct', file: 'Login'), '

- ', Lang::getTxt('visual_verification_sound_close', file: 'Login'), '
-
- -'; -} - -/** - * The template for the form allowing an admin to register a user from the admin center. - */ -function template_admin_register() -{ - echo ' -
-
-
-

', Lang::getTxt('admin_browse_register_new', file: 'Admin'), '

-
-
'; - - if (!empty(Utils::$context['registration_done'])) { - echo ' -
- ', Utils::$context['registration_done'], ' -
'; - } - - echo ' -
-
- - ', Lang::getTxt('admin_register_username_desc', file: 'Login'), ' -
-
- -
-
- - ', Lang::getTxt('admin_register_email_desc', file: 'Login'), ' -
-
- -
-
- - ', Lang::getTxt('admin_register_password_desc', file: 'Login'), ' -
-
- -
'; - - if (!empty(Utils::$context['member_groups'])) { - echo ' -
- - ', Lang::getTxt('admin_register_group_desc', file: 'Login'), ' -
-
- -
'; - } - - // If there is any field marked as required, show it here! - if (!empty(Utils::$context['custom_fields_required']) && !empty(Utils::$context['custom_fields'])) { - foreach (Utils::$context['custom_fields'] as $field) { - if ($field['show_reg'] > 1) { - echo ' -
- ', $field['name'], ': - ', $field['desc'], ' -
-
- ', $field['input_html'], ' -
'; - } - } - } - - echo ' -
- - ', Lang::getTxt('admin_register_email_detail_desc', file: 'Login'), ' -
-
- -
-
- -
-
- -
-
-
- - - - -
-
-
-
-
'; -} - -/** - * Form for editing the agreement shown for people registering to the forum. - */ -function template_edit_agreement() -{ - if (!empty(Utils::$context['saved_successful'])) { - echo ' -
', Lang::getTxt('settings_saved', file: 'Admin'), '
'; - } elseif (!empty(Utils::$context['could_not_save'])) { - echo ' -
', Lang::getTxt('admin_agreement_not_saved', file: 'Admin'), '
'; - } - - // Warning for if the file isn't writable. - if (!empty(Utils::$context['warning'])) { - echo ' -
', Utils::$context['warning'], '
'; - } - - // Just a big box to edit the text file ;) - echo ' -
-
-

', Lang::getTxt('registration_agreement', file: 'General'), '

-
'; - - // Is there more than one language to choose from? - if (count(Utils::$context['editable_agreements']) > 1) { - echo ' -
-
- ', Lang::getTxt('admin_agreement_select_language', file: 'Admin'), ' - -
- - - - -
-
-
'; - } - - // Show the actual agreement in an oversized text box. - echo ' -
-
- -
'; - - if (empty(Utils::$context['agreement_history'])) { - echo ' - ', Utils::$context['agreement_info'], ''; - } else { - echo ' - ', Utils::$context['agreement_info'], ' -
-
- ' . Lang::getTxt('edit_history_count', [count(Utils::$context['agreement_history'])], file: 'General') . ' -
-
    '; - - foreach (Utils::$context['agreement_history'] as $hash => $linktext) { - echo ' -
  1. - ' . $linktext . ' -
  2. '; - } - - echo ' -
-
'; - } - - echo ' -
- - - - - - -
-
-
'; -} - -/** - * Template for editing reserved words. - */ -function template_edit_reserved_words() -{ - if (!empty(Utils::$context['saved_successful'])) { - echo ' -
', Lang::getTxt('settings_saved', file: 'Admin'), '
'; - } - - echo ' -
-
-

', Lang::getTxt('admin_reserved_set', file: 'Admin'), '

-
-
-

', Lang::getTxt('admin_reserved_line', file: 'Admin'), '

- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
- - - - -
-
-
'; -} - -// Form for editing the privacy policy shown to people registering to the forum. -function template_edit_privacy_policy() -{ - if (!empty(Utils::$context['saved_successful'])) { - echo ' -
', Lang::getTxt('settings_saved', file: 'Admin'), '
'; - } - - // Just a big box to edit the text file ;). - echo ' -
-

', Lang::getTxt('privacy_policy', file: 'General'), '

-
'; - - // Is there more than one language to choose from? - if (count(Utils::$context['editable_policies']) > 1) { - echo ' -
-
- ', Lang::getTxt('admin_agreement_select_language', file: 'Admin'), ' - -
- - - -
-
-
'; - } - - echo ' -
-
'; - - // Show the actual policy in an oversized text box. - echo ' - -
'; - - if (empty(Utils::$context['privacy_policy_history'])) { - echo ' - ', Utils::$context['privacy_policy_info'], ''; - } else { - echo ' - ', Utils::$context['privacy_policy_info'], ' -
-
- ' . Lang::getTxt('edit_history_count', [count(Utils::$context['privacy_policy_history'])], file: 'General') . ' -
-
    '; - - foreach (Utils::$context['privacy_policy_history'] as $hash => $linktext) { - echo ' -
  1. - ' . $linktext . ' -
  2. '; - } - - echo ' -
-
'; - } - - echo ' -
-
- - - - - - -
-
-
'; -} diff --git a/Themes/default/Reminder.template.php b/Themes/default/Reminder.template.php deleted file mode 100644 index 26a016c3c2b..00000000000 --- a/Themes/default/Reminder.template.php +++ /dev/null @@ -1,186 +0,0 @@ - -
- - - -
'; -} - -/** - * The page to pick an option - secret question/answer (if set) or email - */ -function template_reminder_pick() -{ - echo ' -
-
- -
'; -} - -/** - * Just a simple "We sent you an email. Click the link in it to continue." message - */ -function template_sent() -{ - echo ' -
- '; -} - -/** - * Template for setting the new password - */ -function template_set_password() -{ - echo ' -
-
- - - - - -
- '; -} - -/** - * The page that asks a user to answer their secret question - */ -function template_ask() -{ - echo ' -
-
- -
- '; - -} diff --git a/Themes/default/ReportToMod.template.php b/Themes/default/ReportToMod.template.php deleted file mode 100644 index be81728ab74..00000000000 --- a/Themes/default/ReportToMod.template.php +++ /dev/null @@ -1,97 +0,0 @@ - -
-

- ', Lang::getTxt('preview', file: 'General'), ' -

-
-
-
- ', empty(Utils::$context['preview_message']) ? '
' : Utils::$context['preview_message'], ' -
-
- '; - - echo ' -
-
- -
-

', Utils::$context['page_title'], '

-
-
'; - - if (!empty(Utils::$context['post_errors'])) { - echo ' -
-
    '; - - foreach (Utils::$context['post_errors'] as $key => $error) { - echo ' -
  • ', $error, '
  • '; - } - - echo ' -
'; - } else { - echo ' - '; - - echo ' -

', Utils::$context['notice'], '

-
-
- -
-
- -
-
- - - -
- -
'; -} diff --git a/Themes/default/ReportedContent.template.php b/Themes/default/ReportedContent.template.php deleted file mode 100644 index 80697a547a3..00000000000 --- a/Themes/default/ReportedContent.template.php +++ /dev/null @@ -1,456 +0,0 @@ - - ', Lang::getTxt('report_action_' . Utils::$context['report_post_action'], file: 'ModerationCenter'), ' -
'; - } - - echo ' -
-
-

- ', Lang::getTxt(Utils::$context['view_closed'] ? 'mc_reportedp_closed' : 'mc_reportedp_active', file: 'ModerationCenter'), ' -

-
-
'; - - if (!empty(Utils::$context['reports']) && !Utils::$context['view_closed'] && !empty(Theme::$current->options['display_quick_mod']) && Theme::$current->options['display_quick_mod'] == 1) { - echo ' -
    -
  • - -
  • -
'; - } - - echo ' - -
'; - - foreach (Utils::$context['reports'] as $report) { - echo ' -
-
- ', !empty($report['topic']['board_name']) ? '' . $report['topic']['board_name'] . '' : '??', ' / ', Lang::getTxt('mc_reportedp_subject_author', ['subject' => '' . $report['subject'] . '', 'author' => $report['author']['link']], file: 'ModerationCenter'), ' -
-
- ', Lang::getTxt('mc_reportedp_last_reported', ['date' => $report['last_updated']], file: 'ModerationCenter'), '
'; - - // Prepare the comments... - $comments = []; - - foreach ($report['comments'] as $comment) { - $comments[$comment['member']['id']] = $comment['member']['link']; - } - - echo ' - ', Lang::getTxt('mc_reportedp_reported_by', ['list' => Lang::sentenceList($comments)], file: 'ModerationCenter'), ' -
-
- ', Utils::adjustHeadingLevels($report['body'], 5), ' -
'; - - // Reported post options - template_quickbuttons($report['quickbuttons'], 'reported_posts'); - - echo ' -
'; - } - - // Were none found? - if (empty(Utils::$context['reports'])) { - echo ' -
-
', Lang::getTxt('mc_reportedp_none_found', file: 'ModerationCenter'), '
-
'; - } - - echo ' -
- '; - - if (!empty(Utils::$context['reports']) && !Utils::$context['view_closed'] && !empty(Theme::$current->options['display_quick_mod']) && Theme::$current->options['display_quick_mod'] == 1) { - echo ' -
- - -
'; - } - - echo ' -
- -
'; -} - -/** - * Handles viewing details of and managing a specific report - */ -function template_viewmodreport() -{ - // Let them know the action was a success. - if (!empty(Utils::$context['report_post_action'])) { - echo ' -
- ', Lang::getTxt('report_action_' . Utils::$context['report_post_action'], file: 'ModerationCenter'), ' -
'; - } - - echo ' -
-
-
-

- ', Lang::getTxt('mc_viewmodreport', ['message_link' => Utils::$context['report']['message_link'], 'author_link' => Utils::$context['report']['author']['link']], file: 'ModerationCenter'), ' -

-
-
-

- - ', Lang::getTxt('mc_modreport_summary', [Utils::$context['report']['num_reports'], Utils::$context['report']['last_updated']], file: 'ModerationCenter'), ' - '; - - $report_buttons = [ - 'ignore' => [ - 'text' => !Utils::$context['report']['ignore'] ? 'mc_reportedp_ignore' : 'mc_reportedp_unignore', - 'url' => Config::$scripturl . '?action=moderate;area=reportedposts;sa=handle;ignore=' . (int) !Utils::$context['report']['ignore'] . ';rid=' . Utils::$context['report']['id'] . ';' . Utils::$context['session_var'] . '=' . Utils::$context['session_id'] . ';' . Utils::$context['mod-report-ignore_token_var'] . '=' . Utils::$context['mod-report-ignore_token'], - 'class' => !Utils::$context['report']['ignore'] ? ' you_sure' : '', - 'custom' => !Utils::$context['report']['ignore'] ? ' data-confirm="' . Lang::getTxt('mc_reportedp_ignore_confirm', file: 'ModerationCenter') . '"' : '', - 'icon' => 'ignore', - ], - 'close' => [ - 'text' => Utils::$context['report']['closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close', - 'url' => Config::$scripturl . '?action=moderate;area=reportedposts;sa=handle;closed=' . (int) !Utils::$context['report']['closed'] . ';rid=' . Utils::$context['report']['id'] . ';' . Utils::$context['session_var'] . '=' . Utils::$context['session_id'] . ';' . Utils::$context['mod-report-closed_token_var'] . '=' . Utils::$context['mod-report-closed_token'], - 'icon' => 'close', - ], - ]; - - // Report buttons - template_button_strip($report_buttons, 'right'); - - echo ' -

-
-
- ', Utils::adjustHeadingLevels(Utils::$context['report']['body'], 3), ' -
-
-
-

', Lang::getTxt('mc_modreport_whoreported_title', file: 'ModerationCenter'), '

-
'; - - foreach (Utils::$context['report']['comments'] as $comment) { - echo ' -
-
- ', Lang::getTxt( - 'mc_modreport_whoreported_data', - [ - 'member_link' => $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), - 'datetime' => $comment['time'], - ], - file: 'ModerationCenter', - ), ' -
-
', Utils::adjustHeadingLevels($comment['message'], null), '
-
'; - } - - echo ' -
-
-

', Lang::getTxt('mc_modreport_mod_comments', file: 'ModerationCenter'), '

-
-
'; - - if (empty(Utils::$context['report']['mod_comments'])) { - echo ' -
-
', Lang::getTxt('mc_modreport_no_mod_comment', file: 'ModerationCenter'), '
-
'; - } - - foreach (Utils::$context['report']['mod_comments'] as $comment) { - echo ' -
-

- ', $comment['member']['link'], ': (', $comment['time'], ')', ($comment['can_edit'] ? '' . Lang::getTxt('mc_reportedp_comment_edit', file: 'ModerationCenter') . '' . Lang::getTxt('mc_reportedp_comment_delete', file: 'ModerationCenter') . '' : ''), ' -

-
'; - - echo ' -
-
', Utils::adjustHeadingLevels($comment['message'], null), '
-
'; - } - - echo ' -
-

- - ', Lang::getTxt('mc_reportedp_new_comment', file: 'ModerationCenter'), ' - -

-
- -
- - -
-
-
'; - - template_show_list('moderation_actions_list'); - - echo ' - -
-
'; -} - -/** - * Template for editing a mod comment. - */ -function template_edit_comment() -{ - echo ' -
-
-
-
-

', Lang::getTxt('mc_modreport_edit_mod_comment', file: 'ModerationCenter'), '

-
-
- -
- -
-
-
- - -
-
'; -} - -/** - * Lists all reported members - */ -function template_reported_members() -{ - // Let them know the action was a success. - if (!empty(Utils::$context['report_post_action']) && Lang::txtExists('report_action_' . Utils::$context['report_post_action'], file: 'ModerationCenter')) { - echo ' -
- ', Lang::getTxt('report_action_' . Utils::$context['report_post_action'], file: 'ModerationCenter'), ' -
'; - } - - echo ' -
-
-

- ', Lang::getTxt(Utils::$context['view_closed'] ? 'mc_reportedp_closed' : 'mc_reportedp_active', file: 'ModerationCenter'), ' -

-
-
'; - - if (!empty(Utils::$context['reports']) && !Utils::$context['view_closed'] && !empty(Theme::$current->options['display_quick_mod']) && Theme::$current->options['display_quick_mod'] == 1) { - echo ' -
    -
  • - -
  • -
'; - } - - echo ' - -
'; - - foreach (Utils::$context['reports'] as $report) { - echo ' -
-
- ', $report['user']['name'], ' -
-
- ', Lang::getTxt('mc_reportedp_last_reported', ['date' => $report['last_updated']], file: 'ModerationCenter'), '
'; - - // Prepare the comments... - $comments = []; - - foreach ($report['comments'] as $comment) { - $comments[$comment['member']['id']] = $comment['member']['link']; - } - - echo ' - ', Lang::getTxt('mc_reportedp_reported_by', ['list' => Lang::sentenceList($comments)], file: 'ModerationCenter'), ' -
-
- ', template_quickbuttons($report['quickbuttons'], 'reported_members'), ' -
'; - } - - // Were none found? - if (empty(Utils::$context['reports'])) { - echo ' -
-
', Lang::getTxt('mc_reportedp_none_found', file: 'ModerationCenter'), '
-
'; - } - - echo ' -
- -
- ', (!Utils::$context['view_closed'] && !empty(Utils::$context['reports'])) ? '' : '', ' -
-
- -
'; -} - -/** - * Template for viewing and managing a specific report about a user's profile - */ -function template_viewmemberreport() -{ - // Let them know the action was a success. - if (!empty(Utils::$context['report_post_action'])) { - echo ' -
- ', Lang::getTxt('report_action_' . Utils::$context['report_post_action'], file: 'ModerationCenter'), ' -
'; - } - - echo ' -
-
-
-

- ', Lang::getTxt('mc_viewmemberreport', ['member' => Utils::$context['report']['user']['link']], file: 'ModerationCenter'), ' -

-
-
-

- - ', Lang::getTxt('mc_memberreport_summary', [Utils::$context['report']['num_reports'], Utils::$context['report']['last_updated']], file: 'ModerationCenter'), ' - '; - - $report_buttons = [ - 'ignore' => [ - 'text' => !Utils::$context['report']['ignore'] ? 'mc_reportedp_ignore' : 'mc_reportedp_unignore', - 'url' => Config::$scripturl . '?action=moderate;area=reportedmembers;sa=handle;ignore=' . (int) !Utils::$context['report']['ignore'] . ';rid=' . Utils::$context['report']['id'] . ';' . Utils::$context['session_var'] . '=' . Utils::$context['session_id'] . ';' . Utils::$context['mod-report-ignore_token_var'] . '=' . Utils::$context['mod-report-ignore_token'], - 'class' => !Utils::$context['report']['ignore'] ? ' you_sure' : '', - 'custom' => !Utils::$context['report']['ignore'] ? ' data-confirm="' . Lang::getTxt('mc_reportedp_ignore_confirm', file: 'ModerationCenter') . '"' : '', - 'icon' => 'ignore', - ], - 'close' => [ - 'text' => Utils::$context['report']['closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close', - 'url' => Config::$scripturl . '?action=moderate;area=reportedmembers;sa=handle;closed=' . (int) !Utils::$context['report']['closed'] . ';rid=' . Utils::$context['report']['id'] . ';' . Utils::$context['session_var'] . '=' . Utils::$context['session_id'] . ';' . Utils::$context['mod-report-closed_token_var'] . '=' . Utils::$context['mod-report-closed_token'], - 'icon' => 'close', - ], - ]; - - // Report buttons - template_button_strip($report_buttons, 'right'); - - echo ' -

-
-
-
-

', Lang::getTxt('mc_memberreport_whoreported_title', file: 'ModerationCenter'), '

-
'; - - foreach (Utils::$context['report']['comments'] as $comment) { - echo ' -
-
- ', Lang::getTxt( - 'mc_modreport_whoreported_data', - [ - 'member_link' => $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), - 'datetime' => $comment['time'], - ], - file: 'ModerationCenter', - ), ' -
-
', Utils::adjustHeadingLevels($comment['message'], null), '
-
'; - } - - echo ' -
-
-

', Lang::getTxt('mc_modreport_mod_comments', file: 'ModerationCenter'), '

-
-
'; - - if (empty(Utils::$context['report']['mod_comments'])) { - echo ' -
-
', Lang::getTxt('mc_modreport_no_mod_comment', file: 'ModerationCenter'), '
-
'; - } - - foreach (Utils::$context['report']['mod_comments'] as $comment) { - echo ' -
-

', $comment['member']['link'], ': (', $comment['time'], ')', ($comment['can_edit'] ? '' . Lang::getTxt('mc_reportedp_comment_edit', file: 'ModerationCenter') . ' ' . Lang::getTxt('mc_reportedp_comment_delete', file: 'ModerationCenter') . '' : ''), '

-
'; - - echo ' -
-
', Utils::adjustHeadingLevels($comment['message'], null), '
-
'; - } - - echo ' -
-

- - ', Lang::getTxt('mc_reportedp_new_comment', file: 'ModerationCenter'), ' - -

-
- -
- - -
-
-
'; - - template_show_list('moderation_actions_list'); - - echo ' - -
-
'; -} diff --git a/Themes/default/Reports.template.php b/Themes/default/Reports.template.php deleted file mode 100644 index 467df0884a0..00000000000 --- a/Themes/default/Reports.template.php +++ /dev/null @@ -1,275 +0,0 @@ - -

', Lang::getTxt('generate_reports_type', file: 'Reports'), '

- -
'; - - // Go through each type of report they can run. - foreach (Utils::$context['report_types'] as $type) { - echo ' - '; - } - - echo ' - - -
'; -} - -/** - * This is the standard template for showing reports. - */ -function template_main() -{ - echo ' -
-

', Lang::getTxt('results', file: 'Reports'), '

-
-
'; - - if (!empty(Utils::$context['report_buttons'])) { - template_button_strip(Utils::$context['report_buttons'], 'right'); - } - - echo ' -
'; - - if (count(Utils::$context['tables']) > 1) { - echo ' - -
-
'; - - foreach (Utils::$context['tables'] as $i => $table) { - if (!empty($table['title'])) { - echo ' - '; - } - } - - echo ' -
-
'; - } - - foreach (Utils::$context['tables'] as $i => $table) { - echo ' - '; - - if (!empty($table['title'])) { - echo ' - - - - - - '; - } - - // Now do each row! - $row_number = 0; - - foreach ($table['data'] as $row) { - if ($row_number == 0 && !empty($table['shading']['top']) && empty(current($row)['header'])) { - echo ' - '; - } else { - echo ' - '; - } - - // Now do each column. - $column_number = 0; - $th = false; - - foreach ($row as $data) { - // If this is a special separator, skip over! - if (!empty($data['separator']) && $column_number == 0) { - echo ' - '; - break; - } - - // These table cells shall be a heading if the first row says so. - if ($th || !empty($data['header'])) { - echo ' - '; - - $th = true; - } - // Shaded? - elseif ($column_number == 0 && !empty($table['shading']['left'])) { - echo ' - '; - } else { - echo ' - '; - } - - $column_number++; - } - - echo ' - '; - - $row_number++; - } - echo ' - -
', $table['title'], '
- ', $data['v'], ': - - ', $data['v'], ' - - ', $data['v'] == $table['default_value'] ? '' : ($data['v'] . (empty($data['v']) ? '' : ':')), ' - - ', $data['v'], ' -
'; - } -} - -/** - * Header of the print page! - */ -function template_print_above() -{ - echo ' - - - - ', Utils::$context['page_title'], ' - - - - '; -} - -/** - * The main print page - */ -function template_print() -{ - // Go through each table! - foreach (Utils::$context['tables'] as $table) { - echo ' -
- '; - - if (!empty($table['title'])) { - echo ' - - - '; - } - - // Now do each row! - $row_number = 0; - - foreach ($table['data'] as $row) { - if ($row_number == 0 && !empty($table['shading']['top'])) { - echo ' - '; - } else { - echo ' - '; - } - - // Now do each column!! - $column_number = 0; - - foreach ($row as $data) { - // If this is a special separator, skip over! - if (!empty($data['separator']) && $column_number == 0) { - echo ' - '; - break; - } - - // Shaded? - if ($column_number == 0 && !empty($table['shading']['left'])) { - echo ' - '; - } else { - echo ' - '; - } - - $column_number++; - } - - echo ' - '; - - $row_number++; - } - echo ' -
- ', $table['title'], ' -
- ', $data['v'], ': - - ', $data['v'] == $table['default_value'] ? '' : ($data['v'] . (empty($data['v']) ? '' : ':')), ' - - ', $data['v'], ' -
-
-
'; - } -} - -/** - * Footer of the print page. - */ -function template_print_below() -{ - echo ' - - -'; -} diff --git a/Themes/default/Search.template.php b/Themes/default/Search.template.php deleted file mode 100644 index c3b0a72341b..00000000000 --- a/Themes/default/Search.template.php +++ /dev/null @@ -1,441 +0,0 @@ -'; - - if (!empty(Utils::$context['search_errors'])) { - echo ' -
- ', implode('
', Utils::$context['search_errors']['messages']), ' -
'; - } - - if (!empty(Utils::$context['search_ignored'])) { - echo ' -
- ', Lang::getTxt( - 'search_warning_ignored', - [ - 'number_of_terms' => count(Utils::$context['search_ignored']), - 'list' => implode(Lang::getTxt('sentence_list_separator', file: 'General') . ' ', Utils::$context['search_ignored']), - ], - file: 'Search', - ), ' -
'; - } - - echo ' -
-

- ', Lang::getTxt('set_parameters', file: 'Search'), ' -

-
- '; - - if (empty(Utils::$context['search_params']['topic'])) { - echo ' -
-
-
- ', Lang::getTxt('choose_board', file: 'Search'), ' -
-
    '; - - foreach (Utils::$context['categories'] as $category) { - echo ' -
  • - ', $category['name'], ' -
      '; - - $cat_boards = array_values($category['children']); - - foreach ($cat_boards as $key => $board) { - echo ' -
    • - '; - - // Nest child boards inside another list. - $curr_child_level = $board['child_level']; - $next_child_level = $cat_boards[$key + 1]['child_level'] ?? 0; - - if ($next_child_level > $curr_child_level) { - echo ' -
        '; - } else { - // Close child board lists until we reach a common level - // with the next board. - while ($next_child_level < $curr_child_level--) { - echo ' - -
      '; - } - - echo ' -
    • '; - } - } - - echo ' -
    -
  • '; - } - - echo ' -
-
-
-
-
- - - -
-
-
'; - } - - echo ' - - '; -} - -/** - * The search results page. - */ -function template_results() -{ - if (isset(Utils::$context['did_you_mean']) || empty(Utils::$context['topics']) || !empty(Utils::$context['search_ignored'])) { - echo ' -
-
-

- ', Lang::getTxt('search_adjust_query', file: 'Search'), ' -

-
-
'; - - // Did they make any typos or mistakes, perhaps? - if (isset(Utils::$context['did_you_mean'])) { - echo ' -

- ', Lang::getTxt('search_did_you_mean', ['suggested_query' => '' . Utils::$context['did_you_mean'] . ''], file: 'Search'), ' -

'; - } - - if (!empty(Utils::$context['search_ignored'])) { - echo ' -

- ', Lang::getTxt( - 'search_warning_ignored', - [ - 'number_of_terms' => count(Utils::$context['search_ignored']), - 'list' => implode(Lang::getTxt('sentence_list_separator', file: 'General') . ' ', Utils::$context['search_ignored']), - ], - file: 'Search', - ), ' -

'; - } - - echo ' -
- ', Lang::getTxt('search_for', file: 'General'), ' - - '; - - foreach (Utils::$context['hidden_inputs'] as $input) { - echo "\n\t\t\t\t" . $input; - } - - echo ' -
-
-
'; - } - - if (Utils::$context['compact']) { - echo ' - '; - - echo ' -
-

- ', Lang::getTxt('search_results', ['params' => Utils::$context['search_params']['search']], file: 'General'), ' -

- '; - - // Was anything even found? - if (!empty(Utils::$context['topics'])) { - echo ' -
- ', Lang::getTxt('search_order', file: 'Search'), ' - -
-
-
- -
'; - } else { - echo ' - -
', Lang::getTxt('search_no_results', file: 'General'), '
'; - } - - // While we have results to show ... - while ($topic = Utils::$context['get_topics']()) { - echo ' -
'; - - foreach ($topic['matches'] as $message) { - echo ' -
-
#', $message['counter'], '
-
-
-
', $topic['board']['link'], ' / ', $message['subject_highlighted'], '
- ', str_replace('
', ' ', Lang::getTxt('last_post_updated', ['time' => $message['time'], 'member_link' => '' . $message['member']['link'] . ''], file: 'General')), '
-
-
-
'; - - if ($message['body_highlighted'] != '') { - echo ' -
', $message['body_highlighted'], '
'; - } - } - - echo ' -
'; - } - } else { - echo ' -
-

- ', Lang::getTxt('search_results', ['params' => Utils::$context['search_params']['search']], file: 'General'), ' -

- '; - - // Was anything even found? - if (!empty(Utils::$context['topics'])) { - echo ' -
- ', Lang::getTxt('search_order', file: 'Search'), ' - -
-
-
- -
'; - } else { - echo ' - -
', Lang::getTxt('search_no_results', file: 'General'), '
'; - } - - while ($topic = Utils::$context['get_topics']()) { - foreach ($topic['matches'] as $message) { - echo ' -
-
#', $message['counter'], '
-
-
- ', $topic['board']['link'], ' / ', $message['subject_highlighted'], ' -
- ', str_replace('
', ' ', Lang::getTxt('last_post_topic', ['post_link' => $message['time'], 'member_link' => '' . $message['member']['link'] . ''], file: 'General')), '
-
-
', $message['body_highlighted'], '
'; - - echo ' -
-
'; - } - } - } - - echo ' -
'; - - if (!empty(Utils::$context['topics'])) { - echo ' - '; - } - - // Show a jump to box for easy navigation. - echo ' - - -
'; -} diff --git a/Themes/default/Settings.template.php b/Themes/default/Settings.template.php deleted file mode 100644 index 22f05f4a7a0..00000000000 --- a/Themes/default/Settings.template.php +++ /dev/null @@ -1,240 +0,0 @@ - 'show_children', - 'label' => Lang::getTxt('show_children', file: 'Profile'), - 'default' => true, - ], - [ - 'id' => 'topics_per_page', - 'label' => Lang::getTxt('topics_per_page', file: 'Profile'), - 'options' => [ - 0 => Lang::getTxt('per_page_default', file: 'Profile'), - 5 => 5, - 10 => 10, - 25 => 25, - 50 => 50, - ], - 'default' => true, - 'enabled' => empty(Config::$modSettings['disableCustomPerPage']), - ], - [ - 'id' => 'messages_per_page', - 'label' => Lang::getTxt('messages_per_page', file: 'Profile'), - 'options' => [ - 0 => Lang::getTxt('per_page_default', file: 'Profile'), - 5 => 5, - 10 => 10, - 25 => 25, - 50 => 50, - ], - 'default' => true, - 'enabled' => empty(Config::$modSettings['disableCustomPerPage']), - ], - [ - 'id' => 'view_newest_first', - 'label' => Lang::getTxt('recent_posts_at_top', file: 'Profile'), - 'default' => true, - ], - [ - 'id' => 'show_no_avatars', - 'label' => Lang::getTxt('show_no_avatars', file: 'Profile'), - 'default' => true, - ], - [ - 'id' => 'show_no_signatures', - 'label' => Lang::getTxt('show_no_signatures', file: 'Profile'), - 'default' => true, - ], - [ - 'id' => 'show_no_censored', - 'label' => Lang::getTxt('show_no_censored'), - 'default' => false, - 'enabled' => !empty(Config::$modSettings['allow_no_censored']), - ], - [ - 'id' => 'posts_apply_ignore_list', - 'label' => Lang::getTxt('posts_apply_ignore_list', file: 'Profile'), - 'default' => false, - 'enabled' => !empty(Config::$modSettings['enable_buddylist']), - ], - Lang::getTxt('theme_opt_posting', file: 'Profile'), - [ - 'id' => 'return_to_post', - 'label' => Lang::getTxt('return_to_post', file: 'Profile'), - 'default' => true, - ], - [ - 'id' => 'no_new_reply_warning', - 'label' => Lang::getTxt('no_new_reply_warning', file: 'Profile'), - 'default' => true, - ], - [ - 'id' => 'wysiwyg_default', - 'label' => Lang::getTxt('wysiwyg_default', file: 'Profile'), - 'default' => false, - 'enabled' => empty(Config::$modSettings['disable_wysiwyg']), - ], - [ - 'id' => 'drafts_autosave_enabled', - 'label' => Lang::getTxt('drafts_autosave_enabled', file: 'Drafts'), - 'default' => true, - 'enabled' => !empty(Config::$modSettings['drafts_autosave_enabled']) && (!empty(Config::$modSettings['drafts_post_enabled']) || !empty(Config::$modSettings['drafts_pm_enabled'])), - ], - [ - 'id' => 'drafts_show_saved_enabled', - 'label' => Lang::getTxt('drafts_show_saved_enabled', file: 'Drafts'), - 'default' => true, - 'enabled' => !empty(Config::$modSettings['drafts_show_saved_enabled']) && (!empty(Config::$modSettings['drafts_post_enabled']) || !empty(Config::$modSettings['drafts_pm_enabled'])), - ], - Lang::getTxt('theme_opt_moderation', file: 'Profile'), - [ - 'id' => 'display_quick_mod', - 'label' => Lang::getTxt('display_quick_mod', file: 'Profile'), - 'options' => [ - 0 => Lang::getTxt('display_quick_mod_none', file: 'Profile'), - 1 => Lang::getTxt('display_quick_mod_check', file: 'Profile'), - 2 => Lang::getTxt('display_quick_mod_image', file: 'Profile'), - ], - 'default' => true, - ], - Lang::getTxt('theme_opt_personal_messages', file: 'Profile'), - [ - 'id' => 'popup_messages', - 'label' => Lang::getTxt('popup_messages', file: 'Profile'), - 'default' => true, - ], - [ - 'id' => 'view_newest_pm_first', - 'label' => Lang::getTxt('recent_pms_at_top', file: 'Profile'), - 'default' => true, - ], - [ - 'id' => 'pm_remove_inbox_label', - 'label' => Lang::getTxt('pm_remove_inbox_label', file: 'Profile'), - 'default' => true, - ], - !empty(Config::$modSettings['cal_enabled']) ? Lang::getTxt('theme_opt_calendar', file: 'Profile') : '', - [ - 'id' => 'calendar_default_view', - 'label' => Lang::getTxt('calendar_default_view', file: 'Profile'), - 'options' => [ - 'viewlist' => Lang::getTxt('calendar_viewlist', file: 'Profile'), - 'viewmonth' => Lang::getTxt('calendar_viewmonth', file: 'Profile'), - 'viewweek' => Lang::getTxt('calendar_viewweek', file: 'Profile'), - ], - 'default' => true, - 'enabled' => !empty(Config::$modSettings['cal_enabled']), - ], - [ - 'id' => 'calendar_start_day', - 'label' => Lang::getTxt('calendar_start_day', file: 'Profile'), - 'options' => array_filter( - Lang::getTxt('days', file: 'General'), - fn($key) => in_array($key, [0, 1, 5, 6]), - ARRAY_FILTER_USE_KEY, - ), - 'default' => true, - 'enabled' => !empty(Config::$modSettings['cal_enabled']), - ], - ]; -} - -/** - * This pseudo-template defines all the available theme settings (but not their actual values) - */ -function template_settings() -{ - Utils::$context['theme_settings'] = [ - [ - 'id' => 'header_logo_url', - 'label' => Lang::getTxt('header_logo_url', file: 'Themes'), - 'description' => Lang::getTxt('header_logo_url_desc', file: 'Themes'), - 'type' => 'text', - ], - [ - 'id' => 'site_slogan', - 'label' => Lang::getTxt('site_slogan', file: 'Themes'), - 'description' => Lang::getTxt('site_slogan_desc', file: 'Themes'), - 'type' => 'text', - ], - [ - 'id' => 'og_image', - 'label' => Lang::getTxt('og_image', file: 'Themes'), - 'description' => Lang::getTxt('og_image_desc', file: 'Themes'), - 'type' => 'url', - ], - '', - [ - 'id' => 'smiley_sets_default', - 'label' => Lang::getTxt('smileys_default_set_for_theme', file: 'Admin'), - 'options' => Utils::$context['smiley_sets'], - 'type' => 'text', - ], - '', - [ - 'id' => 'enable_news', - 'label' => Lang::getTxt('enable_random_news', file: 'Themes'), - ], - [ - 'id' => 'show_newsfader', - 'label' => Lang::getTxt('news_fader', file: 'Themes'), - ], - [ - 'id' => 'newsfader_time', - 'label' => Lang::getTxt('admin_fader_delay', file: 'Admin'), - 'type' => 'number', - ], - '', - [ - 'id' => 'number_recent_posts', - 'label' => Lang::getTxt('number_recent_posts', file: 'Themes'), - 'description' => Lang::getTxt('zero_to_disable', file: 'Admin'), - 'type' => 'number', - ], - [ - 'id' => 'show_stats_index', - 'label' => Lang::getTxt('show_stats_index', file: 'Themes'), - ], - [ - 'id' => 'show_latest_member', - 'label' => Lang::getTxt('latest_members', file: 'Themes'), - ], - [ - 'id' => 'show_group_key', - 'label' => Lang::getTxt('show_group_key', file: 'Themes'), - ], - [ - 'id' => 'display_who_viewing', - 'label' => Lang::getTxt('who_display_viewing', file: 'Themes'), - 'options' => [ - 0 => Lang::getTxt('who_display_viewing_off', file: 'Themes'), - 1 => Lang::getTxt('who_display_viewing_numbers', file: 'Themes'), - 2 => Lang::getTxt('who_display_viewing_names', file: 'Themes'), - ], - 'type' => 'list', - ], - ]; -} diff --git a/Themes/default/SplitTopics.template.php b/Themes/default/SplitTopics.template.php deleted file mode 100644 index b58838f2045..00000000000 --- a/Themes/default/SplitTopics.template.php +++ /dev/null @@ -1,222 +0,0 @@ - -
- -
-

', Lang::getTxt('split', file: 'General'), '

-
-
-

- - -

-
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
-
-
- - -
-
-
- '; -} - -/** - * A simple confirmation that things were split as expected, with links to the current board and the old and new topics. - */ -function template_main() -{ - echo ' -
-
-

', Lang::getTxt('split', file: 'General'), '

-
- -
'; -} - -/** - * The form for selecting which posts to split. - */ -function template_select() -{ - echo ' -
-
-
-
-

', Lang::getTxt('select_split_posts', file: 'General'), '

-
-
- ', Lang::getTxt('please_select_split', file: 'General'), ' -
-
- -
-
    '; - - foreach (Utils::$context['not_selected']['messages'] as $message) { - echo ' -
  • -
    - - ', Lang::getTxt('post_by_member', $message, file: 'General'), ' - ', $message['time'], ' -
    -
    ', Utils::adjustHeadingLevels($message['body'], 3), '
    -
  • '; - } - - echo ' -
-
-
-
-

- ', Lang::getTxt('split_selected_posts', ['reset_link' => '' . Lang::getTxt('split_reset_selection', file: 'General') . '']), ' -

-
-
- ', Lang::getTxt('split_selected_posts_desc', file: 'General'), ' -
-
- -
-
    '; - - if (!empty(Utils::$context['selected']['messages'])) { - foreach (Utils::$context['selected']['messages'] as $message) { - echo ' -
  • -
    - - ', Lang::getTxt('post_by_member', $message, file: 'General'), ' - ', $message['time'], ' -
    -
    ', Utils::adjustHeadingLevels($message['body'], 3), '
    -
  • '; - } - } - - echo ' -
-
-
-
- - - - -
-
-
- '; -} diff --git a/Themes/default/Themes.template.php b/Themes/default/Themes.template.php deleted file mode 100644 index b4ab1d2b279..00000000000 --- a/Themes/default/Themes.template.php +++ /dev/null @@ -1,1202 +0,0 @@ - -

- - ', Lang::getTxt('themeadmin_install_title', file: 'Themes'), ' -

- -
- ', Lang::getTxt('themeadmin_explain', file: 'Themes'), ' -
'; - - echo ' -
-
-

', - Lang::getTxt('settings', file: 'General'), ' -

-
-
-
-
- -
-
- - -
-
- -
-
-
'; - - foreach (Utils::$context['themes'] as $theme) { - echo ' -
'; - } - - echo ' -
- - -
-
- -
-
- - ', Lang::getTxt('theme_select', file: 'Themes'), ' -
-
- -
-
- - ', Lang::getTxt('theme_select', file: 'Themes'), ' -
-
- - - -
-
'; - - // Link to simplemachines.org for latest themes and info! - echo ' -
-

- ', Lang::getTxt('theme_adding_title', file: 'Themes'), ' -

-
-
- ', Lang::getTxt('theme_adding', file: 'Themes'), ' -
'; - - // All the install options. - echo ' -
-
-

- ', Lang::getTxt('theme_install', file: 'Themes'), ' -

-
-
'; - - if (Utils::$context['can_create_new']) { - // From a file. - echo ' -
- ', Lang::getTxt('theme_install_file', file: 'Themes'), ' -
- - - - -
-
'; - - // Copied from the default. - echo ' -
- ', Lang::getTxt('theme_install_new', file: 'Themes'), ' -
- - - - -
-
'; - } - - // From a dir. - echo ' -
- ', Lang::getTxt('theme_install_dir', file: 'Themes'), ' -
- - - - -
-
'; - - echo ' -
-
'; - - echo ' - '; -} - -/** - * This lists all themes - */ -function template_list_themes() -{ - // Show a nice confirmation message. - if (isset($_GET['done'])) { - echo ' -
- ', Lang::getTxt('theme_confirmed_' . $_GET['done'], file: 'Themes'), ' -
'; - } - - echo ' -
-

', Lang::getTxt('themeadmin_list_heading', file: 'Themes'), '

-
-
- ', Lang::getTxt('themeadmin_list_tip', file: 'Themes'), ' -
-
-
-

', Lang::getTxt('theme_settings', file: 'Admin'), '

-
-
'; - - // Show each theme.... with X for delete, an enable/disable link and a link to their own settings page. - foreach (Utils::$context['themes'] as $theme) { - echo ' -
-

- - ', $theme['name'] . (!empty($theme['version']) ? ' (' . $theme['version'] . ')' : ''), ' - - - ', (!empty($theme['enable']) || $theme['id'] == 1 ? '' : ''), ''; - - // You *cannot* disable/enable/delete the default theme. It's important! - if ($theme['id'] != 1) { - // Enable/Disable. - echo ' - '; - - // Deleting. - echo ' - '; - } - - echo ' - -

-
-
-
-
', Lang::getTxt('themeadmin_list_theme_dir', file: 'Themes'), '
- ', $theme['theme_dir'], $theme['valid_path'] ? '' : ' ' . Lang::getTxt('themeadmin_list_invalid', file: 'Themes'), ' -
', Lang::getTxt('themeadmin_list_theme_url', file: 'Themes'), '
-
', $theme['theme_url'], '
-
', Lang::getTxt('themeadmin_list_images_url', file: 'Themes'), '
-
', $theme['images_url'], '
-
-
'; - } - - echo ' -
-

', Lang::getTxt('themeadmin_list_reset', file: 'Themes'), '

-
-
-
-
- -
-
- -
-
- -
-
- -
-
- - - -
-
'; -} - -/** - * This lets you reset themes - */ -function template_reset_list() -{ - echo ' -
-

', Lang::getTxt('themeadmin_reset_title', file: 'Admin'), '

-
-
- ', Lang::getTxt('themeadmin_reset_tip', file: 'Themes'), ' -
-
'; - - // Show each theme.... with X for delete and a link to settings. - foreach (Utils::$context['themes'] as $theme) { - echo ' -
-

', $theme['name'], '

-
-
- -
'; - } - - echo ' -
'; -} - -/** - * This displays the form for setting theme options - */ -function template_set_options() -{ - echo ' -
- -
-

- ', Lang::getTxt(Utils::$context['theme_options_reset'] ? 'themeadmin_reset_options_title' : 'theme_options_title', ['theme' => Utils::$context['theme_settings']['name']], file: 'Themes'), ' -

-
-
- ', Lang::getTxt(Utils::$context['theme_options_reset'] ? 'themeadmin_reset_options_info' : 'theme_options_defaults', file: 'Themes'), ' -
-
-
'; - - $skeys = array_keys(Utils::$context['options']); - $first_option_key = array_shift($skeys); - $titled_section = false; - - foreach (Utils::$context['options'] as $i => $setting) { - // Just spit out separators and move on - if (empty($setting) || !is_array($setting)) { - // Insert a separator (unless this is the first item in the list) - if ($i !== $first_option_key) { - echo ' -
-
-
'; - } - - // Should we give a name to this section? - if (is_string($setting) && !empty($setting)) { - $titled_section = true; - echo ' -
' . $setting . '
-
'; - } else { - $titled_section = false; - } - - continue; - } - - echo ' -
'; - - // Show the change option box? - if (Utils::$context['theme_options_reset']) { - echo ' - '; - } - - echo ' - '; - - if (isset($setting['description'])) { - echo ' -
- ', $setting['description'], ''; - } - echo ' -
'; - - // Display checkbox options - if ($setting['type'] == 'checkbox') { - echo ' -
- - '; - } - - // How about selection lists, we all love them - elseif ($setting['type'] == 'list') { - echo ' -
- '; - } - // A textbox it is then - else { - echo ' -
'; - - if (isset($setting['type']) && $setting['type'] == 'number') { - $min = isset($setting['min']) ? ' min="' . $setting['min'] . '"' : ' min="0"'; - $max = isset($setting['max']) ? ' max="' . $setting['max'] . '"' : ''; - $step = isset($setting['step']) ? ' step="' . $setting['step'] . '"' : ''; - - echo ' - '; - } - - // End of this definition, close open dds - echo ' -
'; - } - - // Close the option page up - echo ' -
- - - -
-
'; -} - -/** - * The page for setting and managing theme settings. - */ -function template_set_settings() -{ - echo ' -
-
-
-

- ', Lang::getTxt('theme_settings_for', ['theme' => Utils::$context['theme_settings']['name']], file: 'Themes'), ' -

-
-
'; - - // @todo Why can't I edit the default theme popup. - if (Utils::$context['theme_settings']['theme_id'] != 1) { - echo ' -
-

- ', Lang::getTxt('theme_edit', file: 'Themes'), ' -

-
- '; - } - - echo ' -
-

- ', Lang::getTxt('theme_url_config', file: 'Themes'), ' -

-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
'; - - // Do we allow theme variants? - if (!empty(Utils::$context['theme_variants'])) { - echo ' -
-

- ', Lang::getTxt('theme_variants', file: 'Themes'), ' -

-
-
-
- -
-
- -
-
- -
-
- - -
-
- '; - } - - // Color modes for the theme? - if (!empty(Theme::$current->settings['has_dark_mode'])) { - echo ' -
-

- ', Lang::getTxt('theme_colormodes', file: 'Themes'), ' -

-
-
-
- -
-
- -
-
- -
-
- - -
-
'; - } - - echo ' -
-

- ', Lang::getTxt('theme_options', file: 'Themes'), ' -

-
-
'; - - $skeys = array_keys(Utils::$context['settings']); - $first_setting_key = array_shift($skeys); - $titled_section = false; - - foreach (Utils::$context['settings'] as $i => $setting) { - // Is this a separator? - if (empty($setting) || !is_array($setting)) { - // We don't need a separator before the first list element - if ($i !== $first_setting_key) { - echo ' -
-
-
'; - } - - // Add a fake heading? - if (is_string($setting) && !empty($setting)) { - $titled_section = true; - echo ' -
' . $setting . '
-
'; - } else { - $titled_section = false; - } - - continue; - } - - echo ' -
- :'; - - if (isset($setting['description'])) { - echo '
- ', $setting['description'], ''; - } - - echo ' -
'; - - // A checkbox? - if ($setting['type'] == 'checkbox') { - echo ' -
- - -
'; - } - - // A list with options? - elseif ($setting['type'] == 'list') { - echo ' -
- -
'; - } - // A Textarea? - elseif ($setting['type'] == 'textarea') { - echo ' -
- -
'; - } - // A regular input box, then? - else { - echo ' -
'; - - if (isset($setting['type']) && $setting['type'] == 'number') { - $min = isset($setting['min']) ? ' min="' . $setting['min'] . '"' : ' min="0"'; - $max = isset($setting['max']) ? ' max="' . $setting['max'] . '"' : ''; - $step = isset($setting['step']) ? ' step="' . $setting['step'] . '"' : ''; - - echo ' - -
'; - } - } - - echo ' -
- - - -
-
-
'; - - if (!empty(Utils::$context['theme_variants'])) { - echo ' - '; - } -} - -/** - * This template allows for the selection of different themes ;) - */ -function template_pick() -{ - echo ' -
'; - - // Just go through each theme and show its information - thumbnail, etc. - for ($i = 0; $i < 2; $i++) { - echo ' -
-

', Lang::getTxt($i == 0 ? 'current_theme' : 'theme_pick', file: 'Themes'), '

-
-
'; - - // Just go through each theme and show its information - thumbnail, etc. - foreach (Utils::$context['available_themes'] as $theme) { - if (($theme['selected'] && $i == 0) || (!$theme['selected'] && $i == 1)) { - echo ' -
-

- ', $theme['name'], ' -

-
-
- ', $theme['description'], ''; - - if (!empty($theme['variants'])) { - echo ' - '; - } - - echo ' - -
-
- - - -
'; - } - } - - echo ' -
'; - } - - // One set of these for the form, not one per pass of the loop above. - echo ' - - - -
'; -} - -/** - * Okay, that theme was installed/updated successfully! - */ -function template_installed() -{ - // The aftermath. - echo ' -
-

', Utils::$context['page_title'], '

-
-
'; - - // Oops! there was an error :( - if (!empty(Utils::$context['error_message'])) { - echo ' -

- ', Utils::$context['error_message'], ' -

'; - } - - // Not much to show except a link back... - else { - echo ' -

- ', Utils::$context['installed_theme']['name'], ' ', Lang::getTxt('theme_' . (isset(Utils::$context['installed_theme']['updated']) ? 'updated' : 'installed') . '_message', file: 'Themes'), ' -

-

- ', Lang::getTxt('back', file: 'General'), ' -

'; - } - - echo ' -
'; -} - -/** - * The page for editing themes. - */ -function template_edit_list() -{ - echo ' -
-
-

', Lang::getTxt('themeadmin_edit_title', file: 'Admin'), '

-
-
'; - - foreach (Utils::$context['themes'] as $theme) { - echo ' -
- - ', $theme['name'], '', !empty($theme['version']) ? ' - (' . $theme['version'] . ')' : '', ' - - -
'; - } - - echo ' -
-
'; -} - -/** - * The page allowing you to copy a template from one theme to another. - */ -function template_copy_template() -{ - echo ' -
-

', Lang::getTxt('themeadmin_edit_filename', file: 'Themes'), '

-
-
- ', Lang::getTxt('themeadmin_edit_copy_warning', file: 'Themes'), ' -
-
-
    '; - - foreach (Utils::$context['available_templates'] as $template) { - echo ' -
  • - ', $template['filename'], $template['already_exists'] ? ' (' . Lang::getTxt('themeadmin_edit_exists', file: 'Themes') . ')' : '', ' - '; - - if ($template['can_copy']) { - echo ' - ', Lang::getTxt('themeadmin_edit_do_copy', file: 'Themes'), ''; - } else { - echo Lang::getTxt('themeadmin_edit_no_copy', file: 'Themes'); - } - - echo ' - -
  • '; - } - - echo ' -
-
'; -} - -/** - * This lets you browse a list of files in a theme so you can choose which one to edit. - */ -function template_edit_browse() -{ - if (!empty(Utils::$context['browse_title'])) { - echo ' -
-

', Utils::$context['browse_title'], '

-
'; - } - - echo ' - - - - - - - - - '; - - foreach (Utils::$context['theme_files'] as $file) { - echo ' - - - - - '; - } - - echo ' - -
', Lang::getTxt('themeadmin_edit_filename', file: 'Themes'), '', Lang::getTxt('themeadmin_edit_modified', file: 'Themes'), '', Lang::getTxt('themeadmin_edit_size', file: 'Themes'), '
'; - - if ($file['is_editable']) { - echo ' - ', $file['filename'], ''; - } elseif ($file['is_directory']) { - echo ' - ', $file['filename'], ''; - } else { - echo $file['filename']; - } - - echo ' - ', !empty($file['last_modified']) ? $file['last_modified'] : '', '', $file['size'], '
'; -} - -/** - * Wanna edit the stylesheet? - */ -function template_edit_style() -{ - if (Utils::$context['session_error']) { - echo ' -
- ', Lang::getTxt('error_session_timeout', file: 'Errors'), ' -
'; - } - - // From now on no one can complain that editing css is difficult. If you disagree, go to www.w3schools.com. - echo ' - - '; - - // Just show a big box.... gray out the Save button if it's not saveable... (ie. not 777.) - echo ' -
-
-

', Lang::getTxt('theme_edit_file', ['filename' => Utils::$context['edit_filename']], file: 'Themes'), '

-
-
'; - - if (!Utils::$context['allow_save']) { - echo ' - ', Lang::getTxt('theme_edit_no_save', ['filename' => Utils::$context['allow_save_filename']], file: 'Themes'), '
'; - } - - echo ' - -
-
- - -
-
- - '; - - // Hopefully it exists. - if (isset(Utils::$context['admin-te-' . md5(Utils::$context['theme_id'] . '-' . Utils::$context['edit_filename']) . '_token'])) { - echo ' - '; - } - - echo ' -
'; -} - -/** - * This edits the template... - */ -function template_edit_template() -{ - if (Utils::$context['session_error']) { - echo ' -
- ', Lang::getTxt('error_session_timeout', file: 'Errors'), ' -
'; - } - - if (isset(Utils::$context['parse_error'])) { - echo ' -
- ', Lang::getTxt('themeadmin_edit_error', file: 'Themes'), ' -
', Utils::$context['parse_error'], '
-
'; - } - - // Just show a big box.... gray out the Save button if it's not saveable... (ie. not 777.) - echo ' -
-
-

', Lang::getTxt('theme_edit_file', ['filename' => Utils::$context['edit_filename']], file: 'Themes'), '

-
-
'; - - if (!Utils::$context['allow_save']) { - echo ' - ', Lang::getTxt('theme_edit_no_save', ['filename' => Utils::$context['allow_save_filename']], file: 'Themes'), '
'; - } - - foreach (Utils::$context['file_parts'] as $part) { - echo ' -
-
- -
'; - } - - echo ' -
- - - '; - - // Hopefully it exists. - if (isset(Utils::$context['admin-te-' . md5(Utils::$context['theme_id'] . '-' . Utils::$context['edit_filename']) . '_token'])) { - echo ' - '; - } - - echo ' -
-
-
'; -} - -/** - * This allows you to edit a file - */ -function template_edit_file() -{ - if (Utils::$context['session_error']) { - echo ' -
- ', Lang::getTxt('error_session_timeout', file: 'Errors'), ' -
'; - } - - // Is this file writeable? - if (!Utils::$context['allow_save']) { - echo ' -
- ', Lang::getTxt('theme_edit_no_save', ['filename' => Utils::$context['allow_save_filename']], file: 'Themes'), ' -
'; - } - - // Just show a big box.... gray out the Save button if it's not saveable... (ie. not 777.) - echo ' -
-
-

', Lang::getTxt('theme_edit_file', ['filename' => Utils::$context['edit_filename']], file: 'Themes'), '

-
-
-
- - - '; - - // Hopefully it exists. - if (isset(Utils::$context['admin-te-' . md5(Utils::$context['theme_id'] . '-' . Utils::$context['edit_filename']) . '_token'])) { - echo ' - '; - } - - echo ' -
-
'; -} diff --git a/Themes/default/Who.template.php b/Themes/default/Who.template.php deleted file mode 100644 index a185a3dac92..00000000000 --- a/Themes/default/Who.template.php +++ /dev/null @@ -1,263 +0,0 @@ - -
-
-

', Lang::getTxt('who_title', file: 'General'), '

-
-
-
- -
- ', Lang::getTxt('who_show', file: 'Who'), ' - - -
-
- - - - - - - - - '; - - foreach (Utils::$context['members'] as $member) { - echo ' - - - - - '; - } - - // No members? - if (empty(Utils::$context['members'])) { - echo ' - - - '; - } - - echo ' - -
', Lang::getTxt('who_user', file: 'Who'), Utils::$context['sort_by'] == 'user' ? '' : '', '', Lang::getTxt('who_time', file: 'Who'), Utils::$context['sort_by'] == 'time' ? '' : '', '', Lang::getTxt('who_action', file: 'Who'), '
'; - - // Guests can't be messaged. - if (!$member['is_guest']) { - echo ' - - ', Utils::$context['can_send_pm'] ? '' : '', '', Utils::$context['can_send_pm'] ? '' : '', ' - '; - } - - echo ' - - ', $member['is_guest'] ? $member['name'] : '' . $member['name'] . '', ' - '; - - if (!empty($member['ip'])) { - echo ' - (' . str_replace(':', ':​', $member['ip']) . ')'; - } - - echo ' - ', $member['time'], ''; - - if (is_array($member['action'])) { - $tag = !empty($member['action']['tag']) ? $member['action']['tag'] : 'span'; - - echo ' - <', $tag, !empty($member['action']['class']) ? ' class="' . $member['action']['class'] . '"' : '', '> - ', Lang::getTxt($member['action']['label'], file: 'Who'), (!empty($member['action']['error_message']) ? $member['action']['error_message'] : ''), ' - '; - } else { - echo $member['action']; - } - - echo ' -
- ', Lang::getTxt('who_no_online_' . (Utils::$context['show_by'] == 'guests' || Utils::$context['show_by'] == 'spiders' ? Utils::$context['show_by'] : 'members'), file: 'Who'), ' -
-
- -
- ', Lang::getTxt('who_show', file: 'Who'), ' - - -
-
-
-
- '; -} - -/** - * This displays a nice credits page - */ -function template_credits() -{ - // The most important part - the credits :P. - echo ' -
-
-

', Lang::getTxt('credits', file: 'Who'), '

-
'; - - foreach (Utils::$context['credits'] as $section) { - if (isset($section['pretext'])) { - echo ' -
-

', $section['pretext'], '

-
'; - } - - if (isset($section['title'])) { - echo ' -
-

', $section['title'], '

-
'; - } - - echo ' -
-
'; - - foreach ($section['groups'] as $group) { - echo ' -
- ', isset($group['title']) ? '' . $group['title'] . '' : '', ' -
-
'; - - echo Lang::getTxt('credits_list', ['names' => Lang::sentenceList($group['members'])], file: 'Who'); - - echo ' -
'; - } - - echo ' -
'; - - if (isset($section['posttext'])) { - echo ' -

', $section['posttext'], '

'; - } - - echo ' -
'; - } - - // Other software and graphics - if (!empty(Utils::$context['credits_software_graphics'])) { - echo ' -
-

', Lang::getTxt('credits_software_graphics', file: 'Who'), '

-
-
'; - - if (!empty(Utils::$context['credits_software_graphics']['graphics'])) { - echo ' -
-
', Lang::getTxt('credits_graphics', file: 'Who'), '
-
', implode('
', Utils::$context['credits_software_graphics']['graphics']), '
-
'; - } - - if (!empty(Utils::$context['credits_software_graphics']['software'])) { - echo ' -
-
', Lang::getTxt('credits_software', file: 'Who'), '
-
', implode('
', Utils::$context['credits_software_graphics']['software']), '
-
'; - } - - if (!empty(Utils::$context['credits_software_graphics']['fonts'])) { - echo ' -
-
', Lang::getTxt('credits_fonts', file: 'Who'), '
-
', implode('
', Utils::$context['credits_software_graphics']['fonts']), '
-
'; - } - echo ' -
'; - } - - // How about Modifications, we all love em - if (!empty(Utils::$context['credits_modifications']) || !empty(Utils::$context['copyrights']['mods'])) { - echo ' -
-

', Lang::getTxt('credits_modifications', file: 'Who'), '

-
-
-
    '; - - // Display the credits. - if (!empty(Utils::$context['credits_modifications'])) { - echo ' -
  • ', implode('
  • ', Utils::$context['credits_modifications']), '
  • '; - } - - // Legacy. - if (!empty(Utils::$context['copyrights']['mods'])) { - echo ' -
  • ', implode('
  • ', Utils::$context['copyrights']['mods']), '
  • '; - } - - echo ' -
-
'; - } - - // SMF itself - echo ' -
-

', Lang::getTxt('credits_forum', file: 'Who'), '

-
-
- ', Utils::$context['copyrights']['smf'], ' -
-
'; -} diff --git a/Themes/default/templates/Agreement/index.php b/Themes/default/templates/Agreement/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Agreement/index.php @@ -0,0 +1,8 @@ + + +
+ +
+

+
+ +
+ + +
+ +
+ Time::create('@' . Utils::$context['agreement_accepted_date'])->format(null, false)], file: 'Agreement') ?> + +
+ +
+ + +
+ +
+

+
+ +
+ + +
+ +
+ Time::create('@' . Utils::$context['privacy_policy_accepted_date'])->format(null, false)], file: 'Agreement') ?> + +
+ +
+ + +
+ +
+ + + + + +
+
diff --git a/Themes/default/templates/Calendar/bcd.php b/Themes/default/templates/Calendar/bcd.php new file mode 100644 index 00000000000..36112855b5d --- /dev/null +++ b/Themes/default/templates/Calendar/bcd.php @@ -0,0 +1,28 @@ +subTemplate('geek_clock', ['style' => 'bcd', 'title' => 'BCD Clock']); ?> + + + \ No newline at end of file diff --git a/Themes/default/templates/Calendar/calendar_top.php b/Themes/default/templates/Calendar/calendar_top.php new file mode 100644 index 00000000000..1045c6b431f --- /dev/null +++ b/Themes/default/templates/Calendar/calendar_top.php @@ -0,0 +1,49 @@ + + +
+
+ + + +
+ subTemplate('button_strip', ['button_strip' => Utils::$context['calendar_buttons'], 'direction' => 'right']); ?> + +
+ + + + + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/Calendar/event_post.php b/Themes/default/templates/Calendar/event_post.php new file mode 100644 index 00000000000..4625c28e012 --- /dev/null +++ b/Themes/default/templates/Calendar/event_post.php @@ -0,0 +1,68 @@ + + +
+new)): ?> + + + + +
+
+

+ + +

+
+ +
+
+
+ ' . Lang::getTxt('error_while_submitting', file: 'General') . '' : '' ?> + +
+
+ ', Utils::$context['post_error']['messages']) ?> + +
+
+
+ +
subTemplate('event_options'); ?> + +
+ +new): ?> + +selected_occurrence->is_first): ?> + + + +
+ +
+
+
\ No newline at end of file diff --git a/Themes/default/templates/Calendar/geek_clock.php b/Themes/default/templates/Calendar/geek_clock.php new file mode 100644 index 00000000000..35cdc3891ff --- /dev/null +++ b/Themes/default/templates/Calendar/geek_clock.php @@ -0,0 +1,47 @@ + + +
+

+
+
+
    + $bits): ?> +
  • +
      + +
    • + +
    +
  • + +
\ No newline at end of file diff --git a/Themes/default/templates/Calendar/hms.php b/Themes/default/templates/Calendar/hms.php new file mode 100644 index 00000000000..b88ceb486ed --- /dev/null +++ b/Themes/default/templates/Calendar/hms.php @@ -0,0 +1,28 @@ +subTemplate('geek_clock', ['style' => 'hms', 'title' => 'Binary Clock']); ?> + + +
\ No newline at end of file diff --git a/Themes/default/templates/Calendar/index.php b/Themes/default/templates/Calendar/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Calendar/index.php @@ -0,0 +1,8 @@ + + + +
+ + +
+ subTemplate('show_month_grid', ['grid_name' => 'prev', 'is_mini' => true]); ?> + + subTemplate('show_month_grid', ['grid_name' => 'current', 'is_mini' => true]); ?> + + subTemplate('show_month_grid', ['grid_name' => 'next', 'is_mini' => true]); ?> + +
+ + + +
+ subTemplate('show_upcoming_list', ['grid_name' => 'main']); ?> + +
+ +
+ subTemplate('show_week_grid', ['grid_name' => 'main']); ?> + +
+ +
+ subTemplate('show_month_grid', ['grid_name' => 'main']); ?> + +
+ + +
\ No newline at end of file diff --git a/Themes/default/templates/Calendar/omfg.php b/Themes/default/templates/Calendar/omfg.php new file mode 100644 index 00000000000..b226cf2434b --- /dev/null +++ b/Themes/default/templates/Calendar/omfg.php @@ -0,0 +1,23 @@ +subTemplate('geek_clock', ['style' => 'omfg', 'title' => 'OMFG Binary Clock']); ?> + + \ No newline at end of file diff --git a/Themes/default/templates/Calendar/show_month_grid.php b/Themes/default/templates/Calendar/show_month_grid.php new file mode 100644 index 00000000000..763c7c4d93d --- /dev/null +++ b/Themes/default/templates/Calendar/show_month_grid.php @@ -0,0 +1,158 @@ + false], EXTR_SKIP); +?> + +
+

+ + + « + + + + » + + + +

+
subTemplate('calendar_top', ['calendar_data' => $calendar_data]); ?> + + + + + + + + + + + + + + + + + + + +
+ » + + + + + + + + +
+ title; ?>allday) && !empty($holiday->start_time_local) && $holiday->start_date == $day['date']): ?>' . trim(str_replace(':00 ', ' ', $holiday->start_time_local)) . ''; ?>location)): ?>' . $holiday->location . ''; ?>, ', $holidays) ?> +
+ +
+ 15; +$birthday_count = 0; +?>name ?>age) ? ' (' . $bday->age . ')' : '' ?>is_last || ($count == 10 && $use_js_hide) ? '' : ', ' ?>...
()
+ +
+ +
+
can_edit || $event->can_export) ? true : false; ?> + +
+ link ?>
+ allday)): ?>start->time_local) && $event->start->date == $day['date']): ?>start->time_local)) ?>end->time_local) && $event->end->date == $day['date']): ?> end->time_local)) ?> + + location)): ?> + +
+ location ?>can_edit || $event->can_export): ?> + + can_edit): ?> + + + + can_export): ?> + + + + + +
+ +
+ +
+ +
\ No newline at end of file diff --git a/Themes/default/templates/Calendar/show_upcoming_list.php b/Themes/default/templates/Calendar/show_upcoming_list.php new file mode 100644 index 00000000000..5dae3aeaa84 --- /dev/null +++ b/Themes/default/templates/Calendar/show_upcoming_list.php @@ -0,0 +1,96 @@ + + +
+

+ +

+
subTemplate('calendar_top', ['calendar_data' => $calendar_data]); ?> + +
+ +
+
+

+
+
    $date_events): ?> + +
  • + link ?>can_edit): ?> can_export): ?> + +
    allday)): ?>start->date_local < $event->last_date_local) ? ' – ' : '' ?> – ( – ) tz_abbrev ?>location)): ?>
    location ?>is_first): ?>id_event; ?>getParentEvent()->recurrence_iterator->getRRule()->getDescription($event, !in_array($event->id_event, $first_shown)); ?> + +
    + +
  • + +
+
+ +
+
+

+
+
+ +

+ : member . '">' . $bday->name . (isset($bday->age) ? ' (' . $bday->age . ')' : '') . ''; ?> + +

+ +
+
+ +
+
+

+
+
+

+ + + : title . (!empty($holiday->location) ? ' (' . $holiday->location . ')' : ''); ?>. + + +

+
+
diff --git a/Themes/default/templates/Calendar/show_week_grid.php b/Themes/default/templates/Calendar/show_week_grid.php new file mode 100644 index 00000000000..ccd54ef729a --- /dev/null +++ b/Themes/default/templates/Calendar/show_week_grid.php @@ -0,0 +1,146 @@ + + +
+

+ + + « + + + + » + " */ ?> + +

+
subTemplate('calendar_top', ['calendar_data' => $calendar_data]); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + - - + + + +
can_edit || $event->can_export) ? true : false; ?>link ?>
+ start->time_local)): ?>start->time_local) ?>end->time_local) ? ' – ' . trim($event->end->time_local) : '' ?> + + location)): ?>
+ location ?> can_edit)): ?> + + + + can_export)): ?> + + + + + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+ +
title; ?>allday) && !empty($holiday->start_time_local) && $holiday->start_date == $day['date']): ?>' . trim(str_replace(':00 ', ' ', $holiday->start_time_local)) . ''; ?>location)): ?>' . $holiday->location . ''; ?> +
', $holidays) ?> + +
+ +
+ + + + + ' ?> + +
diff --git a/Themes/default/templates/Calendar/thetime.php b/Themes/default/templates/Calendar/thetime.php new file mode 100644 index 00000000000..86bb861f2a4 --- /dev/null +++ b/Themes/default/templates/Calendar/thetime.php @@ -0,0 +1,44 @@ + + +
+

The time you requested

+
+
+
    + + +
  • +
      + + > + +
    +
  • + +
+
\ No newline at end of file diff --git a/Themes/default/templates/Display/index.php b/Themes/default/templates/Display/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Display/index.php @@ -0,0 +1,8 @@ + + +
+ + +
+ +
+ + +
+ +
+

+ ' : '' ?>' : '' ?> + +

+

Utils::$context['topic_poster_name'], 'time' => Utils::$context['topic_started_time']], file: 'General') ?>

+ + settings['display_who_viewing'])): ?>settings['display_who_viewing'] == 1 || empty(Utils::$context['view_members_list'])): ?> + +

+ Lang::sentenceList(array_values($list_of_viewers)), + 'num_viewing' => count(Utils::$context['view_members_list'] ?? []) + (int) (Utils::$context['view_num_guests'] ?? 0) + (int) (Utils::$context['view_num_hidden'] ?? 0), + ], + file: 'General', + ) ?> + +

+ +
+ ' : '' ?> + +
+
+

+ ' : '' ?> + +

+
+
+
+ +
+ +
+
+ + + + (%) + +
+ +
+ +

+ +
+ +

+ +
    + +
  • + +
+
+ + +
+
+ +

:

+ +
+
+
+
subTemplate('button_strip', ['button_strip' => Utils::$context['poll_buttons']]); ?> + +
+ +
+

+
subTemplate('linked_events'); ?> + +
+ subTemplate('button_strip', ['button_strip' => Utils::$context['normal_buttons'], 'direction' => 'right']); ?> + + + + + +
+ + ' . Lang::getTxt('mobile_moderation', file: 'General') . '' : '' ?> + +
+ +
+ +
+
subTemplate('single_post', ['message' => $message]); ?> + +
+
+ +
+ subTemplate('button_strip', ['button_strip' => Utils::$context['normal_buttons'], 'direction' => 'right']); ?> + + + + + +
+ + ' . Lang::getTxt('mobile_moderation', file: 'General') . '' : '' ?> + +
+ +
+ +
+ subTemplate('button_strip', ['button_strip' => Utils::$context['mod_buttons'], 'direction' => 'bottom', 'strip_options' => ['id' => 'moderationbuttons_strip']]); ?> + +
+ +
subTemplate('quickreply'); ?> + + + + + + \ No newline at end of file diff --git a/Themes/default/templates/Display/quickreply.php b/Themes/default/templates/Display/quickreply.php new file mode 100644 index 00000000000..efb32325f2c --- /dev/null +++ b/Themes/default/templates/Display/quickreply.php @@ -0,0 +1,114 @@ + + + +
+
+

+ + +

+
+
+
+ +

+ +

+ +

+ +
+ + + + + + + + + + is_guest): ?> + +
+
+ + +
+
+ +
+ +
+ + +
+
+ +
+ +
subTemplate('control_richedit', ['editor_id' => 'quickReply', 'smiley_container' => true, 'bbc_container' => true]); ?> + +
+ + subTemplate('control_verification', ['verify_id' => Utils::$context['visual_verification_id'], 'display_type' => 'all']); ?> + +
+ + + subTemplate('control_richedit_buttons', ['editor_id' => 'quickReply']); ?> + + +
+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/Themes/default/templates/Display/single_post.php b/Themes/default/templates/Display/single_post.php new file mode 100644 index 00000000000..079aa36c6bf --- /dev/null +++ b/Themes/default/templates/Display/single_post.php @@ -0,0 +1,295 @@ + + + + + + +
+
+ +
+ +
+
    + +
  • + +
+
+ +

+ + ' : '' ?>' : '' ?> + + + + + + + +

+ +
+
+
+ +
+ + +
+ #' . $message['counter'] . '' : '' ?> + + + +
+ +
+ + + +
+ +
id): ?> + +
+ + +
+ + +
+ + + +
+ +
    + + Config::$scripturl . '?action=likes;sa=view;ltype=msg;like=' . $message['id'] . ';' . Utils::$context['session_var'] . '=' . Utils::$context['session_id'], 'num' => $count], file: 'General'); +// Remove link if no cookies; session reference won't work +// Also, don't show link to guests +?>is_guest): ?>]*>~', '', $like_text); ?> + + + +
subTemplate('quickbuttons', ['list_items' => $message['quickbuttons'], 'list_class' => 'post']); ?> + +
+
+
+ +
+
    + +
  • + +
+
options['show_no_signatures']) && Utils::$context['signature_enabled']): ?> + + + +
+
    + +
  • + +
+
+ +
+
+
+
\ No newline at end of file diff --git a/Themes/default/EditHistory.template.php b/Themes/default/templates/EditHistory/diff.php similarity index 55% rename from Themes/default/EditHistory.template.php rename to Themes/default/templates/EditHistory/diff.php index 607725970aa..6a728ee0f54 100644 --- a/Themes/default/EditHistory.template.php +++ b/Themes/default/templates/EditHistory/diff.php @@ -14,26 +14,28 @@ use SMF\Theme; use SMF\Utils; -/** +if (!defined('SMF')) { + die('No direct access...'); +} + +/* * The template for displaying a diff in a popup or overlay. */ -function template_diff() -{ - echo ' - +?> +> - + - ', Utils::$context['page_title'], ' - ', Theme::template_css(), ' - + <?= Utils::$context['page_title'] ?> + + +
- ', Utils::$context['diff'], '
+

-'; -} + \ No newline at end of file diff --git a/Themes/default/templates/EditHistory/index.php b/Themes/default/templates/EditHistory/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/EditHistory/index.php @@ -0,0 +1,8 @@ + + +
+
+

+ + +

+
+
+
+
+ +
+ + + + + +
+
+
\ No newline at end of file diff --git a/Themes/default/templates/Errors/error_log.php b/Themes/default/templates/Errors/error_log.php new file mode 100644 index 00000000000..ac9fc941353 --- /dev/null +++ b/Themes/default/templates/Errors/error_log.php @@ -0,0 +1,131 @@ + + +
+
+

+ + +

+
+
+
+ + + +
+
+
+ +
+ Utils::$context['filter']['entity'], 'value' => Utils::$context['filter']['value']['html']], file: 'ManageMaintenance') ?> + +
+ +
+ + + ' . Lang::getTxt('clear_filter', file: 'ManageMaintenance') . '' : '') ?> + +
$details): ?> ' : '') . '' . ($details['error_type'] === 'critical' ? '' . $details['label'] . '' : $details['label']) . ''; ?> + + implode(' | ', $error_types)], file: 'ManageMaintenance') ?> + + + +
+ +
+ + +
+
+ +
+
+
+ + + +
+ + +
+
+
+
+
+ + + +
+ + + +
+ + +
+ + + +
+ '' . $error['file']['file'] . '', 'line' => $error['file']['line']], file: 'ManageMaintenance') ?> + +
+
+ + + +
+
+
+
+ $error['error_type']['type'] === 'critical' ? '' . $error['error_type']['name'] . '' : $error['error_type']['name']], file: 'ManageMaintenance') ?>
+ +
+
+
+ +
+ +
+ + +
+
+ + + + + + \ No newline at end of file diff --git a/Themes/default/templates/Errors/fatal_error.php b/Themes/default/templates/Errors/fatal_error.php new file mode 100644 index 00000000000..dd6d9555cbd --- /dev/null +++ b/Themes/default/templates/Errors/fatal_error.php @@ -0,0 +1,57 @@ + + + + + +
+
class="padding"> + + +
+ +
+
+

+ + +

+
+
+
class="padding"> + + +
+
+
+ +
+ +
diff --git a/Themes/default/templates/Errors/index.php b/Themes/default/templates/Errors/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Errors/index.php @@ -0,0 +1,8 @@ + +> + + + <?= Lang::getTxt('backtrace_title', file: 'ManageMaintenance') ?> + + + + +
+

+ + +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+

+ + +

+
+
+
    $value): ?>file)): ?>file = Lang::getTxt('unknown', file: 'General'); ?>line)): ?>line = -1; ?> + +
  • file == Lang::getTxt('unknown', file: 'General') && $value->line == -1 ? '_internal_function' : ''), + [ + $key, + (!empty($value->class) ? $value->class . $value->type : '') . $value->function, + $value->file, + $value->line, + base64_encode($value->file), + Config::$scripturl, + ], + file: 'ManageMaintenance', + ) ?>
  • + +
+
+ + + \ No newline at end of file diff --git a/Themes/default/templates/Errors/show_file.php b/Themes/default/templates/Errors/show_file.php new file mode 100644 index 00000000000..d07c86ac8c6 --- /dev/null +++ b/Themes/default/templates/Errors/show_file.php @@ -0,0 +1,45 @@ + +> + + + <?= Utils::$context['file_data']['file'] ?> + + + + + $line): ?> + + + + + + +
==>' : '">' ?>:>
+ + \ No newline at end of file diff --git a/Themes/default/templates/GenericMenu/generic_menu.php b/Themes/default/templates/GenericMenu/generic_menu.php new file mode 100644 index 00000000000..404d5b622af --- /dev/null +++ b/Themes/default/templates/GenericMenu/generic_menu.php @@ -0,0 +1,68 @@ + + +
+ +
\ No newline at end of file diff --git a/Themes/default/templates/GenericMenu/generic_menu_dropdown_above.php b/Themes/default/templates/GenericMenu/generic_menu_dropdown_above.php new file mode 100644 index 00000000000..11dd7831754 --- /dev/null +++ b/Themes/default/templates/GenericMenu/generic_menu_dropdown_above.php @@ -0,0 +1,62 @@ + + + + + +
subTemplate('generic_menu_tabs', ['menu_context' => $menu_context]); ?> diff --git a/Themes/default/templates/GenericMenu/generic_menu_dropdown_below.php b/Themes/default/templates/GenericMenu/generic_menu_dropdown_below.php new file mode 100644 index 00000000000..7f607b08826 --- /dev/null +++ b/Themes/default/templates/GenericMenu/generic_menu_dropdown_below.php @@ -0,0 +1,23 @@ + + +
\ No newline at end of file diff --git a/Themes/default/templates/GenericMenu/generic_menu_tabs.php b/Themes/default/templates/GenericMenu/generic_menu_tabs.php new file mode 100644 index 00000000000..85ca866fc63 --- /dev/null +++ b/Themes/default/templates/GenericMenu/generic_menu_tabs.php @@ -0,0 +1,112 @@ + + +
+

$tab): ?> $tab['label']]; ?> $tab): ?> + + + + + + + + + +

hasSubTemplate('admin_quick_search')): ?>subTemplate('admin_quick_search'); ?> + +
+ +

+ + +

empty($tab['disabled']) && !empty($tab['label']), +); +?> + + + + $tab_context['title'] ?? ''], file: 'General') ?> + +
+ +
+ diff --git a/Themes/default/templates/GenericMenu/index.php b/Themes/default/templates/GenericMenu/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/GenericMenu/index.php @@ -0,0 +1,8 @@ + + +
+

+
+
+
+

Utils::$context['forum_name_html_safe']], file: 'Manual') ?>

+

+
    + $wiki_id): ?> +
  • -
  • + +
+

Utils::$context['wiki_url'], 'credits_url' => Config::$scripturl . '?action=credits'], file: 'Manual') ?>

+
+
\ No newline at end of file diff --git a/Themes/default/templates/Help/popup.php b/Themes/default/templates/Help/popup.php new file mode 100644 index 00000000000..2518e4f93be --- /dev/null +++ b/Themes/default/templates/Help/popup.php @@ -0,0 +1,51 @@ + + +
+ + +
+> + + + + <?= Utils::$context['page_title'] ?> + + + + + +
+
+
+ +
+ + \ No newline at end of file diff --git a/Themes/default/templates/Likes/generic.php b/Themes/default/templates/Likes/generic.php new file mode 100644 index 00000000000..bd5caa1b060 --- /dev/null +++ b/Themes/default/templates/Likes/generic.php @@ -0,0 +1,23 @@ + diff --git a/Themes/default/templates/Likes/index.php b/Themes/default/templates/Likes/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Likes/index.php @@ -0,0 +1,8 @@ + + +
    + +
  • + +
  • + + + + + + + + +
\ No newline at end of file diff --git a/Themes/default/templates/Likes/popup.php b/Themes/default/templates/Likes/popup.php new file mode 100644 index 00000000000..14077705b40 --- /dev/null +++ b/Themes/default/templates/Likes/popup.php @@ -0,0 +1,55 @@ + +> + + + + <?= Utils::$context['page_title'] ?> + + + + + +
+
    $like_details): ?> + +
  • + + + + +
  • + +
+
+ +
+ + \ No newline at end of file diff --git a/Themes/default/templates/Login/admin_login.php b/Themes/default/templates/Login/admin_login.php new file mode 100644 index 00000000000..e7f66d88a4d --- /dev/null +++ b/Themes/default/templates/Login/admin_login.php @@ -0,0 +1,53 @@ + + +
+ + +
+ + \ No newline at end of file diff --git a/Themes/default/templates/Login/index.php b/Themes/default/templates/Login/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Login/index.php @@ -0,0 +1,8 @@ + + +
+ +
+ + \ No newline at end of file diff --git a/Themes/default/templates/Login/login.php b/Themes/default/templates/Login/login.php new file mode 100644 index 00000000000..9d2bdc88e7b --- /dev/null +++ b/Themes/default/templates/Login/login.php @@ -0,0 +1,101 @@ + + + \ No newline at end of file diff --git a/Themes/default/templates/Login/login_tfa.php b/Themes/default/templates/Login/login_tfa.php new file mode 100644 index 00000000000..1494169a0c8 --- /dev/null +++ b/Themes/default/templates/Login/login_tfa.php @@ -0,0 +1,117 @@ + + + \ No newline at end of file diff --git a/Themes/default/templates/Login/logout.php b/Themes/default/templates/Login/logout.php new file mode 100644 index 00000000000..e6664cc9502 --- /dev/null +++ b/Themes/default/templates/Login/logout.php @@ -0,0 +1,45 @@ + + + +
+
+
+

+
+
+

+ + +

+ +

+ + +

+
+
+
\ No newline at end of file diff --git a/Themes/default/templates/Login/maintenance.php b/Themes/default/templates/Login/maintenance.php new file mode 100644 index 00000000000..df162c8f0f8 --- /dev/null +++ b/Themes/default/templates/Login/maintenance.php @@ -0,0 +1,61 @@ + + + +
+ +
\ No newline at end of file diff --git a/Themes/default/templates/Login/resend.php b/Themes/default/templates/Login/resend.php new file mode 100644 index 00000000000..a564a57b60c --- /dev/null +++ b/Themes/default/templates/Login/resend.php @@ -0,0 +1,53 @@ + + + +
+
+

+
+
+
+
+
+
+

+
+
+
+
+
+
+ +

+
+
+
+
+ +

+
+
\ No newline at end of file diff --git a/Themes/default/templates/Login/retry_activate.php b/Themes/default/templates/Login/retry_activate.php new file mode 100644 index 00000000000..dbbba1a5a74 --- /dev/null +++ b/Themes/default/templates/Login/retry_activate.php @@ -0,0 +1,44 @@ + + + +
+
+

+
+
+
+ + +
+
+ +
+
+
+

+
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageAttachments/attachment_paths.php b/Themes/default/templates/ManageAttachments/attachment_paths.php new file mode 100644 index 00000000000..cee93cc297a --- /dev/null +++ b/Themes/default/templates/ManageAttachments/attachment_paths.php @@ -0,0 +1,23 @@ +subTemplate('show_list', ['list_id' => 'base_paths']); ?>subTemplate('show_list', ['list_id' => 'attach_paths']); ?> diff --git a/Themes/default/templates/ManageAttachments/attachment_repair.php b/Themes/default/templates/ManageAttachments/attachment_repair.php new file mode 100644 index 00000000000..b00d14847f3 --- /dev/null +++ b/Themes/default/templates/ManageAttachments/attachment_repair.php @@ -0,0 +1,63 @@ + + +
+
+

+
+
+ + +
+
+ +
+
+

+
+
+ + +
+
+ +
+
+
+

+
+
+

$number): ?> + + +
+ +
+ + +
+
+
diff --git a/Themes/default/templates/ManageAttachments/avatar_settings_above.php b/Themes/default/templates/ManageAttachments/avatar_settings_above.php new file mode 100644 index 00000000000..c576a5aab3a --- /dev/null +++ b/Themes/default/templates/ManageAttachments/avatar_settings_above.php @@ -0,0 +1,20 @@ + + + \ No newline at end of file diff --git a/Themes/default/templates/ManageAttachments/index.php b/Themes/default/templates/ManageAttachments/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/ManageAttachments/index.php @@ -0,0 +1,8 @@ + + +
+
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+

+ +
+
+
+

+
+
+
+
+
+
+
+
+ + + + +
+
+
+
+
+
+
+
+ + + + +
+
+
+
+
+
+ + + + +
+
+
+
+ +
+ +
+

+
+
+
+

+
+
+
+ +
+
+
+ +
+
+
+ +
+ +
+
>
+ +
+ + +
+
+
+ +
\ No newline at end of file diff --git a/Themes/default/templates/ManageBans/ban_edit.php b/Themes/default/templates/ManageBans/ban_edit.php new file mode 100644 index 00000000000..8de3b2e75be --- /dev/null +++ b/Themes/default/templates/ManageBans/ban_edit.php @@ -0,0 +1,194 @@ + + +
+
+ +
+ +
    + +
  • + +
+
+ +
+

+ + +

+
+ +
+ +
+
+
+ : +
+
+ +
+ +
+
+ +
+
+ +
+ +
+
+ +
+
+ +
+ +
+
+ + + + + >
+ >
+ > +
+
+ + + + + >
+ >
+ class="ban_restriction"> (?)
+ class="ban_restriction">
+ class="ban_restriction">
+
+
+ +
+ + + + +
+
+ > + +
+
+ +
+ +
+ > + +
+
+ +
+ +
+ > + +
+
+ +
+
+ > + +
+
+ name="user" id="user" size="44"> +
+
$ban_ips): ?> + +
+
+ +
+ value=""> +
+
+ +
+ +
+ +
+ + + + ' : '' ?> + + + +
+
+ +
subTemplate('show_list', ['list_id' => 'ban_items']); ?> + +
+ diff --git a/Themes/default/templates/ManageBans/ban_edit_trigger.php b/Themes/default/templates/ManageBans/ban_edit_trigger.php new file mode 100644 index 00000000000..4f04c47ca8a --- /dev/null +++ b/Themes/default/templates/ManageBans/ban_edit_trigger.php @@ -0,0 +1,106 @@ + + +
+
+
+

+ + +

+
+
+
+ + + + + + +
+ +
+ > + +
+
+ +
+ + +
+ > + +
+
+ +
+ + +
+ > + +
+
+ +
+ + +
+ > + : +
+
+ +
+ +
+
+ +
+ + + + +
+
+ \ No newline at end of file diff --git a/Themes/default/templates/ManageBans/index.php b/Themes/default/templates/ManageBans/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/ManageBans/index.php @@ -0,0 +1,8 @@ + + +
+
+ + +
+

+
+
+

+
    + +
  • + +
+
+
+

+
+
+

+
+ : + +

+ + + + + +
+
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageBoards/confirm_category_delete.php b/Themes/default/templates/ManageBoards/confirm_category_delete.php new file mode 100644 index 00000000000..00c249192f1 --- /dev/null +++ b/Themes/default/templates/ManageBoards/confirm_category_delete.php @@ -0,0 +1,61 @@ + + +
+
+ +
+

+
+
+

+
    + +
  • + +
+
+
+

+
+
+

+
+ + +

+ + + + + +
+
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageBoards/index.php b/Themes/default/templates/ManageBoards/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/ManageBoards/index.php @@ -0,0 +1,8 @@ + + + +
+
+

+
+
+ +
+ [] +
+ + + +
+ + +
+ + + + +
+

+ +

+
+ +
+
    + +
  • + + ' . Lang::getTxt('recycle_board', file: 'ManageBoards') . ''; +$redirect_board = '' . Lang::getTxt('redirect_board_desc', file: 'ManageBoards') . ''; +// List through every board in the category, printing its name and link to modify the board. +?> + + class="windowbg" style="padding-inline-start: px;"> + href="?board=.0"> + + ' . Lang::getTxt('mboards_permissions', file: 'ManageBoards') . '' : '' ?> + + + +
    + + +
  • + + + +
  • + + + +
+ + +
+ +
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageBoards/modify_board.php b/Themes/default/templates/ManageBoards/modify_board.php new file mode 100644 index 00000000000..ef89c9ae685 --- /dev/null +++ b/Themes/default/templates/ManageBoards/modify_board.php @@ -0,0 +1,411 @@ + + + +
+
+ +
+

+ + +

+
+
+
+ +
+ +
+
+ +
+ + 0) || count(Utils::$context['board_order']) > 1): ?> +
+ +
+
+ + + + +
+ + +
+
+ +
+
+ +
+
+
+ implode(', ', Utils::$context['description_allowed_tags'])], file: 'ManageBoards') ?> +
+
+ +
+
+
+ Config::$scripturl . '?action=admin;area=permissions;sa=profiles;' . Utils::$context['session_var'] . '=' . Utils::$context['session_id']], file: 'ManagePermissions') : strip_tags(Lang::getTxt('permission_profile_desc', file: 'ManagePermissions')) ?> +
+
+ +
+
+
+ +
+
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

+ + + + + + + + + +
+ + + > + + > + + > +
+ + + + + + + + +
+
+ + +
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+ +
+ +
+
+ >
+
+
+
+ onclick="refreshOptions();"> +
+
+ +
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+ + () +
+
+
+ + +
+
+
+
+
+
+
+ > +
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ > +
+
+
+ + +
+
+
+ $cbs): ?> + +
+ + +
+ > + + + + + +
+
+ + +
+ + + + + + + + + + + + + + + + + +
+
+
+ + + + \ No newline at end of file diff --git a/Themes/default/templates/ManageBoards/modify_category.php b/Themes/default/templates/ManageBoards/modify_category.php new file mode 100644 index 00000000000..e1c8105f66a --- /dev/null +++ b/Themes/default/templates/ManageBoards/modify_category.php @@ -0,0 +1,93 @@ + + +
+
+ +
+

+ + +

+
+
+
1): ?> + +
+
+ +
+ +
+
+ +
+
+ +
+
+
+ implode(', ', Utils::$context['description_allowed_tags'])], file: 'ManageBoards') ?> +
+
+ +
+
+
+ +
+
+ > +
$catset): ?> + +
+ + +
+ > + + + + +
+ + + + + + + + + + + +
+
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageCalendar/edit_holiday.php b/Themes/default/templates/ManageCalendar/edit_holiday.php new file mode 100644 index 00000000000..a95bd49985e --- /dev/null +++ b/Themes/default/templates/ManageCalendar/edit_holiday.php @@ -0,0 +1,44 @@ + + + +
+
+

+
+
subTemplate('event_options'); ?> + + + + + + + + + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageCalendar/import.php b/Themes/default/templates/ManageCalendar/import.php new file mode 100644 index 00000000000..e8d2a416385 --- /dev/null +++ b/Themes/default/templates/ManageCalendar/import.php @@ -0,0 +1,69 @@ + + +
+
+

+
+
+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+
+ +
+ +
+
+ +
+
+ + + +
+
subTemplate('show_list', ['list_id' => 'calendar_subscriptions']); ?> diff --git a/Themes/default/templates/ManageCalendar/index.php b/Themes/default/templates/ManageCalendar/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/ManageCalendar/index.php @@ -0,0 +1,8 @@ + + +
+
+

+ + +

+
+
+
+ + + + + +
+
+

+
+ +
+ ' : '' ?> + + +
+
+ + +
+

+
+
subTemplate('show_list', ['list_id' => 'smf_languages']); ?> + + +
\ No newline at end of file diff --git a/Themes/default/templates/ManageLanguages/download_language.php b/Themes/default/templates/ManageLanguages/download_language.php new file mode 100644 index 00000000000..d0e1d29a4c2 --- /dev/null +++ b/Themes/default/templates/ManageLanguages/download_language.php @@ -0,0 +1,120 @@ + + +
+

+ + +

+
+
+ + +
+ +
+ + +
+ +
+
+

+ + +

+
+
+

+ + +

+
+ + +
+
subTemplate('show_list', ['list_id' => 'lang_main_files_list']); ?> + +
+ + +
+ +
+

+ + +

+
+
+

+
+
+
+
+
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ +
+ + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageLanguages/index.php b/Themes/default/templates/ManageLanguages/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/ManageLanguages/index.php @@ -0,0 +1,8 @@ + + +
+
+

+ + +

+
+
+ + +
+ + +
+ + +
+ + +
+
+ +
+ $setting_info): ?> + +
+ + +
+
+ data-orig=""> +
+ + +
+
+ + + class="button"> + + + + data-confirm="" class="button you_sure"> + +
+
+ +
+
+

+ + +

+
+
+
+ + +
+
+
+ + + + + + +
+
+ + +
+ + +
+ + + +
+ + $entries): ?> +
+ + + + +
+ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ + class="button"> +
+ +
\ No newline at end of file diff --git a/Themes/default/templates/ManageMail/browse.php b/Themes/default/templates/ManageMail/browse.php new file mode 100644 index 00000000000..34eb80802f6 --- /dev/null +++ b/Themes/default/templates/ManageMail/browse.php @@ -0,0 +1,41 @@ + + +
+
+
+

+
+
+
+
+
+
+
+
+
+
subTemplate('show_list', ['list_id' => 'mail_queue']); ?> + +
\ No newline at end of file diff --git a/Themes/default/templates/ManageMail/index.php b/Themes/default/templates/ManageMail/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/ManageMail/index.php @@ -0,0 +1,8 @@ + Config::$scripturl . '?action=admin;area=logs;sa=errorlog;desc'], file: 'ManageMail'); ?> + +
+ +
+
+

+
+
+
+
+
+
+ +
+
+
+
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageMaintenance/convert_entities.php b/Themes/default/templates/ManageMaintenance/convert_entities.php new file mode 100644 index 00000000000..78e7a6f3709 --- /dev/null +++ b/Themes/default/templates/ManageMaintenance/convert_entities.php @@ -0,0 +1,37 @@ + + +
+
+

+
+
+

+
+ +
+
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageMaintenance/index.php b/Themes/default/templates/ManageMaintenance/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/ManageMaintenance/index.php @@ -0,0 +1,8 @@ + + +
+ +
+ Utils::$context['maintenance_finished']], file: 'Admin') ?> + +
diff --git a/Themes/default/templates/ManageMaintenance/maintain_below.php b/Themes/default/templates/ManageMaintenance/maintain_below.php new file mode 100644 index 00000000000..47e12ddd27b --- /dev/null +++ b/Themes/default/templates/ManageMaintenance/maintain_below.php @@ -0,0 +1,19 @@ + + +
\ No newline at end of file diff --git a/Themes/default/templates/ManageMaintenance/maintain_members.php b/Themes/default/templates/ManageMaintenance/maintain_members.php new file mode 100644 index 00000000000..d395bb2fc5f --- /dev/null +++ b/Themes/default/templates/ManageMaintenance/maintain_members.php @@ -0,0 +1,192 @@ + + + +
+ + +
+ Utils::$context['maintenance_finished']], file: 'Admin') ?> + +
+ +
+

+
+
+
+

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+

+ + +

+ + + +
+
+
+

+ + +

+
+
+
+
+ '', + 'input_number' => '', + ], + file: 'ManageMaintenance', + ) ?> + +
+
+ + + + + + +
+
+ + +
+ + + + +
+
+
+

+
+
+
+

+ + + +
+
+
+ + \ No newline at end of file diff --git a/Themes/default/templates/ManageMaintenance/maintain_options.php b/Themes/default/templates/ManageMaintenance/maintain_options.php new file mode 100644 index 00000000000..31bd4f1a40b --- /dev/null +++ b/Themes/default/templates/ManageMaintenance/maintain_options.php @@ -0,0 +1,41 @@ + + +
+ $option): ?> + + + + + +
\ No newline at end of file diff --git a/Themes/default/templates/ManageMaintenance/maintain_topics.php b/Themes/default/templates/ManageMaintenance/maintain_topics.php new file mode 100644 index 00000000000..cec63ce7d95 --- /dev/null +++ b/Themes/default/templates/ManageMaintenance/maintain_topics.php @@ -0,0 +1,161 @@ + + +
+ Utils::$context['maintenance_finished']], file: 'Admin') ?> + +
+ + +
+
+

+
+
+
+
+ +

+ ''], file: 'ManageMaintenance') ?> + +

+

+
+
+
+

+

+
+

+

+ + +

+ + + + +
+
+
+ +
+

+
+
+
+

+ ''], file: 'ManageMaintenance') ?> + +

+ + + +
+
+
+

+
+
+
+

+ (' . Lang::getTxt('move_topics_select_board', file: 'ManageMaintenance') . ')', +]; +?>'; ?> ' . str_repeat('==', $board['child_level']) . '=> ' . $board['name'] . ''; ?>'; ?> ' + ', + 'new' => ' + ', + ], + file: 'ManageMaintenance', +) ?> + +

+

+ ''], file: 'ManageMaintenance') ?> () +

+

+
+
+

+ + + +
+
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageMaintenance/optimize.php b/Themes/default/templates/ManageMaintenance/optimize.php new file mode 100644 index 00000000000..a3f3d4431f8 --- /dev/null +++ b/Themes/default/templates/ManageMaintenance/optimize.php @@ -0,0 +1,46 @@ + + +
+
+

+
+
+

+
+
+ + +
+ + +
+ + +

+

+
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageMembergroups/add_edit_group_boards_list.php b/Themes/default/templates/ManageMembergroups/add_edit_group_boards_list.php new file mode 100644 index 00000000000..58255b8549b --- /dev/null +++ b/Themes/default/templates/ManageMembergroups/add_edit_group_boards_list.php @@ -0,0 +1,96 @@ + true, 'form_id' => 'new_group'], EXTR_SKIP); +?> + +
> + +
    + +
  • + +
      + +
    • + + + + + +
        + +
      • + > +
      • + +
      • + : + + > + > + > + +
      • + +
      +
    • + +
    + +

    + + +
+ +
+ + + + + + + + + + + diff --git a/Themes/default/templates/ManageMembergroups/edit_group.php b/Themes/default/templates/ManageMembergroups/edit_group.php new file mode 100644 index 00000000000..74ab0fdb356 --- /dev/null +++ b/Themes/default/templates/ManageMembergroups/edit_group.php @@ -0,0 +1,244 @@ + + +
+
+

Utils::$context['group']['name']], file: 'ManageMembers') ?> + +

+
+
+
+
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+
+ + +
+ +
+
+ +
+ +
+
+ +
+
+
+ +
+
+ +
1 && Utils::$context['group']['id'] != 3): ?> + +
+
+ +
+
+ + +
+ + +
+ +
+
+ size="6"> +
+ +
+ +
+
+ +
+
+ +
+
+ +
+ +
+
+ + +
+
+ + + + * +
+ + + +
+
+ +
+
+ > +
+ +
+
+ +
+
+ > +
+ +
+ + ' . Lang::getTxt('membergroups_new_board_post_groups', file: 'ManageMembers') . '' : '' ?> + +
+
subTemplate('add_edit_group_boards_list', ['collapse' => true, 'form_id' => 'groupForm']); ?> + +
+ +
+ ' : '' ?> + +
+ + +
+ + + diff --git a/Themes/default/templates/ManageMembergroups/group_members.php b/Themes/default/templates/ManageMembergroups/group_members.php new file mode 100644 index 00000000000..79962ca4482 --- /dev/null +++ b/Themes/default/templates/ManageMembergroups/group_members.php @@ -0,0 +1,159 @@ + + +
+
+

+
+
+
+
+ +
+
+ > + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
' . $moderator['name'] . ''; ?> + +
+ +
+
+ + +
+ +
+
+
+
+

+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
' : '' ?>' : '' ?>' : '' ?>> + ' : '' ?> +
>id == $member['id'] && Utils::$context['group']['id'] == 1 ? 'onclick="if (this.checked) return confirm(\'' . Lang::getTxt('membergroups_members_deadmin_confirm', file: 'ManageMembers') . '\')" ' : '') ?>/>
+ +
+ +
+ +
+ +
+
+ +
+

+
+
+
+
+ +
+
+ +
+
+
+ +
+ + + +
+ + diff --git a/Themes/default/templates/ManageMembergroups/group_request_reason.php b/Themes/default/templates/ManageMembergroups/group_request_reason.php new file mode 100644 index 00000000000..2e492eea7f2 --- /dev/null +++ b/Themes/default/templates/ManageMembergroups/group_request_reason.php @@ -0,0 +1,52 @@ + + + +
+
+
+

+
+
+
+ + +
+ : +
+
+ + +
+ +
+ + + + +
+
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageMembergroups/index.php b/Themes/default/templates/ManageMembergroups/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/ManageMembergroups/index.php @@ -0,0 +1,8 @@ +subTemplate('show_list', ['list_id' => 'regular_membergroups_list']); ?>

subTemplate('show_list', ['list_id' => 'post_count_membergroups_list']); ?> diff --git a/Themes/default/templates/ManageMembergroups/new_group.php b/Themes/default/templates/ManageMembergroups/new_group.php new file mode 100644 index 00000000000..e835b328d96 --- /dev/null +++ b/Themes/default/templates/ManageMembergroups/new_group.php @@ -0,0 +1,127 @@ + + +
+
+

+
+
+
+
+ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+
+
+
+
+ + +
+ +
+
+ +
+ + +
+
+ +
+
+
+ + + + +
+ + + +
+ + + +
+
+ +
+ + ' . Lang::getTxt('membergroups_new_board_post_groups', file: 'ManageMembers') . '' : '' ?> + +
+
subTemplate('add_edit_group_boards_list', ['collapse' => false]); ?> + +
+
+ +
+ + + + + +
\ No newline at end of file diff --git a/Themes/default/templates/ManageMembers/admin_browse.php b/Themes/default/templates/ManageMembers/admin_browse.php new file mode 100644 index 00000000000..162119a03cf --- /dev/null +++ b/Themes/default/templates/ManageMembers/admin_browse.php @@ -0,0 +1,98 @@ +subTemplate('show_list', ['list_id' => 'approve_list']); ?> -1): ?> + +
+
+
+

+
+ + +
+

+ '', + 'number' => 14, + ], + file: 'ManageMembers', + ) ?> + +

+
+
+ : +
+
+ +
+
+ + + + + + ' : '' ?> + +
+ +
diff --git a/Themes/default/templates/ManageMembers/index.php b/Themes/default/templates/ManageMembers/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/ManageMembers/index.php @@ -0,0 +1,8 @@ + + +
+ +
+

+ + +

+
+
+
+
+
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+ +    + +
+
+
+
+
+

+
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + ' : '' ?> + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ + + +
+
+ +
\ No newline at end of file diff --git a/Themes/default/templates/ManageNews/email_members.php b/Themes/default/templates/ManageNews/email_members.php new file mode 100644 index 00000000000..9e259331de2 --- /dev/null +++ b/Themes/default/templates/ManageNews/email_members.php @@ -0,0 +1,166 @@ + + +
+ +
+
+

+
+
+ + +
+
+
+
+
+ +
+
+ + ()
+ +
+ +
+
+
+

+ +

+ +
+
+
+
+
+ +
+
+ +
+
+
+ +
+
+ + +
+
+
+
+
+
+ +
+
+ + ()
+ +
+
+
+
+
+ +
+
+ + +
+
+
+
+
+
+ +
+
+ +
+
+
+
+ + +
+
+ + + \ No newline at end of file diff --git a/Themes/default/templates/ManageNews/email_members_compose.php b/Themes/default/templates/ManageNews/email_members_compose.php new file mode 100644 index 00000000000..db3d0056d3e --- /dev/null +++ b/Themes/default/templates/ManageNews/email_members_compose.php @@ -0,0 +1,208 @@ + + + +
+
+
+

+ + +

+
+
+ Config::$scripturl], file: 'Admin') ?> + +
+
+ +
+
+ for="subject" id="caption_subject"> +
+
+ > +
+
+
+ + +
+ + + subTemplate('control_richedit', ['editor_id' => Utils::$context['post_box_name'], 'smiley_container' => 'smileyBox_message', 'bbc_container' => 'bbcBox_message']); ?> + +
    +
  • +
  • +
  • +
+ + subTemplate('control_richedit_buttons', ['editor_id' => Utils::$context['post_box_name']]); ?> + + +
+ + + + $values): ?> + + + + +
\ No newline at end of file diff --git a/Themes/default/templates/ManageNews/email_members_send.php b/Themes/default/templates/ManageNews/email_members_send.php new file mode 100644 index 00000000000..b82ad9eb24f --- /dev/null +++ b/Themes/default/templates/ManageNews/email_members_send.php @@ -0,0 +1,59 @@ + + +
+
+

+ + +

+
+
+
+ +
+
+
+ + + + + + + + + + + + $values): ?> + + +
+
+ + \ No newline at end of file diff --git a/Themes/default/templates/ManageNews/index.php b/Themes/default/templates/ManageNews/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/ManageNews/index.php @@ -0,0 +1,8 @@ + + +
subTemplate('show_list', ['list_id' => 'news_lists']); ?> diff --git a/Themes/default/templates/ManagePaid/choose_payment.php b/Themes/default/templates/ManagePaid/choose_payment.php new file mode 100644 index 00000000000..ec1a38830f2 --- /dev/null +++ b/Themes/default/templates/ManagePaid/choose_payment.php @@ -0,0 +1,75 @@ + + + +
\ No newline at end of file diff --git a/Themes/default/templates/ManagePaid/delete_subscription.php b/Themes/default/templates/ManagePaid/delete_subscription.php new file mode 100644 index 00000000000..339ca6176eb --- /dev/null +++ b/Themes/default/templates/ManagePaid/delete_subscription.php @@ -0,0 +1,37 @@ + + +
+
+

+
+
+

+ + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/ManagePaid/index.php b/Themes/default/templates/ManagePaid/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/ManagePaid/index.php @@ -0,0 +1,8 @@ + + +
+ +
+ +
+

+
+
+
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ +
+
+ > +
+
+
+
+
+ > +
+
+
+
+
+
+ +
+
+ +
+
+ :
+ +
+
+ + $name): ?> +
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ onclick="toggleDuration('fixed');"> + +
+
> +
+
+
+ () +
+
+ +
+
+ + +
+
+ + +
+
+
+
+ onclick="toggleDuration('flexible');"> + +
+
> +
+
+
+ + +
+
+
+ +
+
+ () +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+
+
+ + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/ManagePaid/modify_user_subscription.php b/Themes/default/templates/ManagePaid/modify_user_subscription.php new file mode 100644 index 00000000000..d065007f4d6 --- /dev/null +++ b/Themes/default/templates/ManagePaid/modify_user_subscription.php @@ -0,0 +1,163 @@ + + + +
+
+

Utils::$context['current_subscription']['name'], + 'member' => Utils::$context['sub']['username'] ?? '', + ], + file: 'ManagePaid', + ) ?>

+
+
+
+ + +
+
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + + + +     + + : + +
+
+ + + + +     + + : + +
+ +
+ +
+ + +
+

+
+
+ + +
+
+

+
+
+
    + $payment): ?> +
  • + + + + + + + + +
  • + +
+ +
\ No newline at end of file diff --git a/Themes/default/templates/ManagePaid/paid_done.php b/Themes/default/templates/ManagePaid/paid_done.php new file mode 100644 index 00000000000..f7f84794d09 --- /dev/null +++ b/Themes/default/templates/ManagePaid/paid_done.php @@ -0,0 +1,36 @@ + + + \ No newline at end of file diff --git a/Themes/default/templates/ManagePaid/user_subscription.php b/Themes/default/templates/ManagePaid/user_subscription.php new file mode 100644 index 00000000000..b18465fd6b3 --- /dev/null +++ b/Themes/default/templates/ManagePaid/user_subscription.php @@ -0,0 +1,124 @@ + + + \ No newline at end of file diff --git a/Themes/default/templates/ManageScheduledTasks/edit_scheduled_tasks.php b/Themes/default/templates/ManageScheduledTasks/edit_scheduled_tasks.php new file mode 100644 index 00000000000..19bfe28948c --- /dev/null +++ b/Themes/default/templates/ManageScheduledTasks/edit_scheduled_tasks.php @@ -0,0 +1,78 @@ + + + +
+
+

+
+
+ +
+
+
+
+ +
+
+
+ +
+
+ +
+
+ + + + +
+
+
+ +
+
+ +
+
+ +
+
+ > +
+
+
+ + + +
+
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageScheduledTasks/index.php b/Themes/default/templates/ManageScheduledTasks/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/ManageScheduledTasks/index.php @@ -0,0 +1,8 @@ + + +
+ + +
+ +
+
+
+ +
$errors): ?> + +
+ +
    +
  • ', $errors) ?>
  • +
+
+ +
+
subTemplate('show_list', ['list_id' => 'scheduled_tasks']); ?> diff --git a/Themes/default/templates/ManageSearch/create_index.php b/Themes/default/templates/ManageSearch/create_index.php new file mode 100644 index 00000000000..6945db775c0 --- /dev/null +++ b/Themes/default/templates/ManageSearch/create_index.php @@ -0,0 +1,48 @@ + + +
+
+

+
+
+
+
+ +
+
+ +
+
+
+ + +
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageSearch/create_index_done.php b/Themes/default/templates/ManageSearch/create_index_done.php new file mode 100644 index 00000000000..786ea85f3ea --- /dev/null +++ b/Themes/default/templates/ManageSearch/create_index_done.php @@ -0,0 +1,34 @@ + + +
+

+
+
+

+

+ +

+
\ No newline at end of file diff --git a/Themes/default/templates/ManageSearch/create_index_progress.php b/Themes/default/templates/ManageSearch/create_index_progress.php new file mode 100644 index 00000000000..7647e4f3bcd --- /dev/null +++ b/Themes/default/templates/ManageSearch/create_index_progress.php @@ -0,0 +1,49 @@ + + +
+
+

+
+
+
+

+
+ % +
+
+
+
+ +
+ + + + +
+ \ No newline at end of file diff --git a/Themes/default/templates/ManageSearch/index.php b/Themes/default/templates/ManageSearch/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/ManageSearch/index.php @@ -0,0 +1,8 @@ + + +
+
+

+
+
+
+
+ +
+
+ + + + % +
+
+ + +
+
+ + + + % +
+
+ + +
+
+ + + + % +
+
+ + +
+
+ + + + % +
+
+ + +
+
+ + + + % +
+
+ + +
+
+ + + + % +
+
+ +
+
+ + + + 100% +
+
+ + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageSearch/select_search_method.php b/Themes/default/templates/ManageSearch/select_search_method.php new file mode 100644 index 00000000000..698c09eb9f4 --- /dev/null +++ b/Themes/default/templates/ManageSearch/select_search_method.php @@ -0,0 +1,165 @@ + + +
+

+
+
+
+ +
+
+
+
+

+
+
+
+ +
+ +
+
+ + +
+
+ +
+
+ + +
+ +
+ + ' . Lang::getTxt('search_double_index', file: 'Search') . '
' : '' ?> + +
+ +
+
+ +
getStatus() === 'hidden'): ?> + +
+
+ +
+
+ getDescription(), file: 'Search')): ?>getDescription(), file: 'Search') ?>getStatus() !== null): ?>getDescription(), file: 'Search')): ?> + +
getAdminSubactions(); + +switch ($api['instance']->getStatus()) { + case 'exists': + $index_status = 'search_method_index_already_exists'; + $buttons = []; + + $sa = $admin_subactions['remove']['sa']; + + foreach ($admin_subactions['remove']['extra_params'] as $key => $value) { + $sa .= ';' . (is_int($key) ? '' : $key . '=') . $value; + } + + $buttons[$sa] = 'search_index_remove'; + break; + + case 'partial': + $index_status = 'search_method_index_partial'; + $buttons = []; + + foreach (['resume', 'remove'] as $type) { + $sa = $admin_subactions[$type]['sa']; + + foreach ($admin_subactions[$type]['extra_params'] as $key => $value) { + $sa .= ';' . (is_int($key) ? '' : $key . '=') . $value; + } + + $buttons[$sa] = 'search_index_' . $type; + } + break; + + default: + $index_status = 'search_method_no_index_exists'; + $buttons = []; + + $sa = $admin_subactions['build']['sa']; + + foreach ($admin_subactions['build']['extra_params'] as $key => $value) { + $sa .= ';' . (is_int($key) ? '' : $key . '=') . $value; + } + + $buttons[$sa] = 'search_create_index_start'; + break; + } +?> Lang::getTxt( + Lang::txtExists($api['instance']->getLabel(), file: 'Search') ? $api['instance']->getLabel() : 'search_index_generic', + [ + 'index' => substr(strrchr($api['instance']::class, '\\'), 1), + ], + file: 'Search', + ), + ], + file: 'Search', +) ?> $label): ?> getStatus(), ['exists', null]) + && !empty($api['instance']->getSize()) + ): +?> + +
+ getSize() / 1024], file: 'General') ?> + +
+
+ +
+
+
+ + >
+ > +
+
+ + + + +
\ No newline at end of file diff --git a/Themes/default/templates/ManageSearch/show_spider_logs.php b/Themes/default/templates/ManageSearch/show_spider_logs.php new file mode 100644 index 00000000000..1f0bd12462a --- /dev/null +++ b/Themes/default/templates/ManageSearch/show_spider_logs.php @@ -0,0 +1,43 @@ +subTemplate('show_list', ['list_id' => 'spider_logs']); ?> + +
+
+

+
+
+

+ + + + + +

+ ')) return false; return true;" class="button"> + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageSearch/show_spider_stats.php b/Themes/default/templates/ManageSearch/show_spider_stats.php new file mode 100644 index 00000000000..19ce8796446 --- /dev/null +++ b/Themes/default/templates/ManageSearch/show_spider_stats.php @@ -0,0 +1,41 @@ +subTemplate('show_list', ['list_id' => 'spider_stat_list']); ?> + +
+
+

+
+
+

+ ''], file: 'Search') ?> + +

+ + + ')) return false; return true;" class="button"> +
+
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageSearch/spider_edit.php b/Themes/default/templates/ManageSearch/spider_edit.php new file mode 100644 index 00000000000..0bbb7736b52 --- /dev/null +++ b/Themes/default/templates/ManageSearch/spider_edit.php @@ -0,0 +1,64 @@ + + +
+
+

+
+
+ + +
+
+
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageSmileys/addsmiley.php b/Themes/default/templates/ManageSmileys/addsmiley.php new file mode 100644 index 00000000000..63f615c26c2 --- /dev/null +++ b/Themes/default/templates/ManageSmileys/addsmiley.php @@ -0,0 +1,141 @@ + + +
+
+

+
+
+
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+ +
+
+ +
+
+ +
+
+ + + + + +
+
+
+ +
+
+

+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
\ No newline at end of file diff --git a/Themes/default/templates/ManageSmileys/editicon.php b/Themes/default/templates/ManageSmileys/editicon.php new file mode 100644 index 00000000000..2625b155a96 --- /dev/null +++ b/Themes/default/templates/ManageSmileys/editicon.php @@ -0,0 +1,92 @@ + + +
+
+

+ + +

+
+
+
+ +
+ +
+
+ <?= Utils::$context['icon']['title'] ?> +
+ +
+ :
'.png'], file: 'ManageSmileys') ?> +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + + + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/ManageSmileys/editicons.php b/Themes/default/templates/ManageSmileys/editicons.php new file mode 100644 index 00000000000..7b0a2e61252 --- /dev/null +++ b/Themes/default/templates/ManageSmileys/editicons.php @@ -0,0 +1,21 @@ +subTemplate('show_list', ['list_id' => 'message_icon_list']); ?> diff --git a/Themes/default/templates/ManageSmileys/editsets.php b/Themes/default/templates/ManageSmileys/editsets.php new file mode 100644 index 00000000000..3408bdd9fd4 --- /dev/null +++ b/Themes/default/templates/ManageSmileys/editsets.php @@ -0,0 +1,21 @@ +subTemplate('show_list', ['list_id' => 'smiley_set_list']); ?> diff --git a/Themes/default/templates/ManageSmileys/index.php b/Themes/default/templates/ManageSmileys/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/ManageSmileys/index.php @@ -0,0 +1,8 @@ + + +
+
+

+ + +

+
+ +
+ + +
+ + +
+ + +
+ +
+
+
+ +
+
+ +
+
+ +
+
+ / + + + + + + /.. +
+
+ +
+
+ > +
+
+ +
+ + + +
\ No newline at end of file diff --git a/Themes/default/templates/ManageSmileys/modifysmiley.php b/Themes/default/templates/ManageSmileys/modifysmiley.php new file mode 100644 index 00000000000..18a90cea574 --- /dev/null +++ b/Themes/default/templates/ManageSmileys/modifysmiley.php @@ -0,0 +1,106 @@ + + +
+
+

+
+
+
+
+ + +
+
+ +
+
+ +
+ +
+ +
+ + $smiley_set): ?> +
+ + +
+ > + + + + + +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+ + +
\ No newline at end of file diff --git a/Themes/default/templates/ManageSmileys/setorder.php b/Themes/default/templates/ManageSmileys/setorder.php new file mode 100644 index 00000000000..2eebb43f003 --- /dev/null +++ b/Themes/default/templates/ManageSmileys/setorder.php @@ -0,0 +1,51 @@ + + +
+
+

+
+
+ + +
+
+
+ + + + <?= $smiley['description'] ?> + + <?= $smiley['description'] ?>> + + +
+ + + +
+ +
diff --git a/Themes/default/templates/Memberlist/index.php b/Themes/default/templates/Memberlist/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Memberlist/index.php @@ -0,0 +1,8 @@ + + +
+
+ + subTemplate('button_strip', ['button_strip' => Utils::$context['memberlist_buttons'], 'direction' => 'right']); ?> + +
+
+

+ +

+
+
+ + + + + $column): ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $column): ?> + + + + + + + + + + + + +
> + > +
+ ' : '' ?>' : '' ?> + + ' : '' ?> + +
+
+ +
+ +
+
+ +
+ + + +
+ +
+ +
+
\ No newline at end of file diff --git a/Themes/default/templates/Memberlist/search.php b/Themes/default/templates/Memberlist/search.php new file mode 100644 index 00000000000..937339c81db --- /dev/null +++ b/Themes/default/templates/Memberlist/search.php @@ -0,0 +1,65 @@ + + + +
+
+
+ subTemplate('button_strip', ['button_strip' => Utils::$context['memberlist_buttons'], 'direction' => 'right']); ?> + +
+
+

+ + +

+
+ +
+
\ No newline at end of file diff --git a/Themes/default/templates/MoveTopic/index.php b/Themes/default/templates/MoveTopic/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/MoveTopic/index.php @@ -0,0 +1,8 @@ + + +
+
+

+
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+
+

+
+
+

+ +
+ (: + ) + + +

+
+
+ +
+ +
+
+
    + +
  • + + $topic['poster']['link']], file: 'General') ?> + +
  • + +
+
+
+ +
+ +
+ +
+
+

+
+
+
+
+ +
+
+ + + + +
+
+ +
+
+
\ No newline at end of file diff --git a/Themes/default/templates/MoveTopic/merge_done.php b/Themes/default/templates/MoveTopic/merge_done.php new file mode 100644 index 00000000000..f98577b9468 --- /dev/null +++ b/Themes/default/templates/MoveTopic/merge_done.php @@ -0,0 +1,44 @@ + + +
+
+

+
+
+

+
+
    +
  • + +
  • +
  • + +
  • +
+
+
+
\ No newline at end of file diff --git a/Themes/default/templates/MoveTopic/merge_extra_options.php b/Themes/default/templates/MoveTopic/merge_extra_options.php new file mode 100644 index 00000000000..9e3089326b5 --- /dev/null +++ b/Themes/default/templates/MoveTopic/merge_extra_options.php @@ -0,0 +1,114 @@ + + +
+
+
+

+
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+
+ +
+ +
+
+
+
+ + +
+
+ +
subTemplate('redirect_options', ['type' => 'merge']); ?> 1): ?> + +
+ +
    + +
  • + > + +
  • + +
+
+ +
+ +
    + +
  • + > (: ) +
  • + +
  • + () +
  • +
+
+ +
+ + + +
+
+
+
\ No newline at end of file diff --git a/Themes/default/templates/MoveTopic/move.php b/Themes/default/templates/MoveTopic/move.php new file mode 100644 index 00000000000..54ba7ccd98a --- /dev/null +++ b/Themes/default/templates/MoveTopic/move.php @@ -0,0 +1,72 @@ + + +
+
+
+

+
+
+
+
+
+ +
+
+ +
+ +
+
+ subTemplate('redirect_options', ['type' => 'move']); ?> + + +
+
+ + + + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/MoveTopic/redirect_options.php b/Themes/default/templates/MoveTopic/redirect_options.php new file mode 100644 index 00000000000..6b106d03f61 --- /dev/null +++ b/Themes/default/templates/MoveTopic/redirect_options.php @@ -0,0 +1,67 @@ + + + +
> +
+
+ + +
+
+ +
+
+ +
+
+ +
+ +
+ + +
+
+ +
+ + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/Notify/index.php b/Themes/default/templates/Notify/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Notify/index.php @@ -0,0 +1,8 @@ + + +
+

+ + + +

+
+
+

+

+ - +

+
\ No newline at end of file diff --git a/Themes/default/templates/Notify/notify_announcements.php b/Themes/default/templates/Notify/notify_announcements.php new file mode 100644 index 00000000000..9793633c063 --- /dev/null +++ b/Themes/default/templates/Notify/notify_announcements.php @@ -0,0 +1,39 @@ + + +
+

+ + + +

+
+
+

+

+ - +

+
\ No newline at end of file diff --git a/Themes/default/templates/Notify/notify_board.php b/Themes/default/templates/Notify/notify_board.php new file mode 100644 index 00000000000..ed6e22f060a --- /dev/null +++ b/Themes/default/templates/Notify/notify_board.php @@ -0,0 +1,39 @@ + + +
+

+ + + +

+
+
+

+

+ - +

+
\ No newline at end of file diff --git a/Themes/default/templates/Notify/notify_pref_changed.php b/Themes/default/templates/Notify/notify_pref_changed.php new file mode 100644 index 00000000000..693c2de255e --- /dev/null +++ b/Themes/default/templates/Notify/notify_pref_changed.php @@ -0,0 +1,35 @@ + + +
+

+ + + +

+
+
+

+
\ No newline at end of file diff --git a/Themes/default/templates/Packages/action_permissions.php b/Themes/default/templates/Packages/action_permissions.php new file mode 100644 index 00000000000..14ef6a4933a --- /dev/null +++ b/Themes/default/templates/Packages/action_permissions.php @@ -0,0 +1,112 @@ + + + +
+
+

+
+ +
+ + +
+ + +
+
+
+
+ % +
+
+
+ + + +
+
+
+
+ % +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ + \ No newline at end of file diff --git a/Themes/default/templates/Packages/browse.php b/Themes/default/templates/Packages/browse.php new file mode 100644 index 00000000000..19d60e027c1 --- /dev/null +++ b/Themes/default/templates/Packages/browse.php @@ -0,0 +1,148 @@ + + +
+
+
+

+ + +

+
+
+ + +
+ + + + + + + +
+ +
subTemplate('show_list', ['list_id' => 'packages_lists_' . $type]); ?> + +
+ +
+
+
+

+ +

+ +
+
+

+ + +

+
+
+
+ + + +
+
+ + +
+
+
+ +
+
+
+ + + +
+ \ No newline at end of file diff --git a/Themes/default/templates/Packages/control_chmod.php b/Themes/default/templates/Packages/control_chmod.php new file mode 100644 index 00000000000..4072de4831e --- /dev/null +++ b/Themes/default/templates/Packages/control_chmod.php @@ -0,0 +1,154 @@ + + + 'document.getElementById(\'need_writable_list\').style.display = \'\'; return false;'], file: 'Packages') ?>
+
+ + +
    + +
  • + +
+ +
+
+ # chmod a+w + +
+ +
+
+ +
+
+ +
+ +
+
+
+ +
+
+ + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+ + +
+ + +
+ + + + + generateFTPTest(); + '; +?> diff --git a/Themes/default/templates/Packages/downloaded.php b/Themes/default/templates/Packages/downloaded.php new file mode 100644 index 00000000000..55215a7bd9b --- /dev/null +++ b/Themes/default/templates/Packages/downloaded.php @@ -0,0 +1,44 @@ + + +
+

+
+
+

+ + +

+
    +
  • + + + +
  • +
+

+

+
\ No newline at end of file diff --git a/Themes/default/templates/Packages/examine.php b/Themes/default/templates/Packages/examine.php new file mode 100644 index 00000000000..db441bbad19 --- /dev/null +++ b/Themes/default/templates/Packages/examine.php @@ -0,0 +1,36 @@ + + +
+

+
+
+

+
+
+
+ +
\ No newline at end of file diff --git a/Themes/default/templates/Packages/extract_package.php b/Themes/default/templates/Packages/extract_package.php new file mode 100644 index 00000000000..2e0fefcb5ce --- /dev/null +++ b/Themes/default/templates/Packages/extract_package.php @@ -0,0 +1,65 @@ + + +
+

+
+
+ +

+ | + + +
+ + + + + + + + + + +
hasSubTemplate('show_list') && !empty(Utils::$context['restore_file_permissions']['rows'])): ?>
subTemplate('show_list', ['list_id' => 'restore_file_permissions']); ?> diff --git a/Themes/default/templates/Packages/file_permissions.php b/Themes/default/templates/Packages/file_permissions.php new file mode 100644 index 00000000000..af3ecd398c9 --- /dev/null +++ b/Themes/default/templates/Packages/file_permissions.php @@ -0,0 +1,333 @@ + + + +
+
+ +
+
    + + +
+
+
+
+ +
+
+

+ +

+
+ + + + + + + + + + + + + $dir): ?> + + + + + + + + + + subTemplate('permission_show_contents', ['ident' => $name, 'contents' => $dir['contents'], 'level' => 1]); ?> + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
+
+

+
+
+
+
+
+ + +
+
+ (?) +
+
+ + + +
+
+ +
+
+
+ +

+ + +

+ subTemplate('control_chmod'); ?> + +
+ + + + +
+ + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/Packages/ftp_required.php b/Themes/default/templates/Packages/ftp_required.php new file mode 100644 index 00000000000..7d4fa29e836 --- /dev/null +++ b/Themes/default/templates/Packages/ftp_required.php @@ -0,0 +1,34 @@ + + +
+ + + + +
+ subTemplate('control_chmod'); ?> + +
+
\ No newline at end of file diff --git a/Themes/default/templates/Packages/index.php b/Themes/default/templates/Packages/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Packages/index.php @@ -0,0 +1,8 @@ + + +
+ +
+

+
+
+ + +
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ > +
+
+ +
+
+ > +
+
+ + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/Packages/list.php b/Themes/default/templates/Packages/list.php new file mode 100644 index 00000000000..c9f0ede9c2c --- /dev/null +++ b/Themes/default/templates/Packages/list.php @@ -0,0 +1,41 @@ + + +
+

+
+
+

+
+
+
    + +
  1. + +
+
+ +
\ No newline at end of file diff --git a/Themes/default/templates/Packages/main.php b/Themes/default/templates/Packages/main.php new file mode 100644 index 00000000000..f510f7a0b3c --- /dev/null +++ b/Themes/default/templates/Packages/main.php @@ -0,0 +1,20 @@ + + +
+

+
+
+

+ +
\ No newline at end of file diff --git a/Themes/default/templates/Packages/package_list.php b/Themes/default/templates/Packages/package_list.php new file mode 100644 index 00000000000..e8f251ed417 --- /dev/null +++ b/Themes/default/templates/Packages/package_list.php @@ -0,0 +1,133 @@ + + +
+

+
+
+ +
    +
  • +
+ +
    $packageSection): ?> + +
  • + + +
    +

    +
    + + < id="package_section_" class="packages"> $package): ?> + +
  • + + + +
    + + + + + + ' . $package['name'] . ' ' . Lang::getTxt('download', file: 'Packages') . '' : $package['name'] ?> +
      + +
    • + Utils::ucwords(Utils::strtolower($package['type']))], file: 'Packages') ?> + +
    • + +
    • + + +
    • + +
    • + $package['author']['link']], file: 'Packages') ?> + +
    • + +
    • + + +
    • + +
    • + '' . $package['href'] . ''], file: 'Packages') ?> + +
    • +
    • + + +
    • +
    + +
  • + + > + + +
+ +
+ + diff --git a/Themes/default/templates/Packages/permission_show_contents.php b/Themes/default/templates/Packages/permission_show_contents.php new file mode 100644 index 00000000000..67facfda147 --- /dev/null +++ b/Themes/default/templates/Packages/permission_show_contents.php @@ -0,0 +1,80 @@ + false], EXTR_SKIP); +?> $dir): ?> + + + + + + + + ' : '' ?> + + + + + + ' : '' ?> + + + + + + + + + + + + + + subTemplate('permission_show_contents', ['ident' => $ident . '/' . $name, 'contents' => $dir['contents'], 'level' => $level + 1, 'has_more' => !empty($dir['more_files'])]); ?> + + + + + + + + 1 && !$isFound): ?> + + diff --git a/Themes/default/templates/Packages/servers.php b/Themes/default/templates/Packages/servers.php new file mode 100644 index 00000000000..72028a9ca26 --- /dev/null +++ b/Themes/default/templates/Packages/servers.php @@ -0,0 +1,164 @@ + + +
+
+
+ +
+
+

+
+
+
+
+
+ +
+
+ +
+
+ + +
+
+
+

+ + + + + +

+
+
+ +
+

+
+
+

+ + +

+
+
+
+ +
+
+ + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ + +
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+
+
\ No newline at end of file diff --git a/Themes/default/templates/Packages/view_operations.php b/Themes/default/templates/Packages/view_operations.php new file mode 100644 index 00000000000..28a71523588 --- /dev/null +++ b/Themes/default/templates/Packages/view_operations.php @@ -0,0 +1,45 @@ + +> + + + <?= Lang::getTxt('operation_title', file: 'Packages') ?> + + + + +
+
+ + +
+
+ + +
+
+ + \ No newline at end of file diff --git a/Themes/default/templates/Packages/view_package.php b/Themes/default/templates/Packages/view_package.php new file mode 100644 index 00000000000..2e22a21c95a --- /dev/null +++ b/Themes/default/templates/Packages/view_package.php @@ -0,0 +1,333 @@ + + +
+

+
+
+ +
+
+
+
+ +
+
+ +
+ +
+ +
+
+
' . Utils::$context['failure_details'] . '' : '' ?> + +
+ +
+

+
+
+ $result): ?> + + + + + + +
+
+
+ +
+

+
+
+ + + + + + +
+
+ +
+

+
+
+ + + + + + +
+
+ +
+
+

+ + +

+
+ +
+ +
+ + +
    + +
  • + +
+
+
+ +
+ +
+
+ + +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
settings['images_url'] . '/selected_open.png" alt="*" style="display: none;">' : '' ?>.>
+ + + + + + + + + + +
+ + + + .> $operation['description']], file: 'Packages') : $operation['description'] ?>
+
+ +
+
+

+ + +

+
+
+
+ + +
+ $theme): ?> + + + + + + + + + + + + + + + + + +
+ + + + > + + + +
settings['images_url'] . '/selected_open.png" alt="*" style="display: none;">' : '' ?> + + class="floatright"> + >
+ + + + + + + + + + +
+ + + + .> $operation['description']], file: 'Packages') : $operation['description'] ?>
+
+
+ +
+ +
+ +
+

+
+
+ subTemplate('control_chmod'); ?> + +
+ + + ' : '' ?> + +
+ + \ No newline at end of file diff --git a/Themes/default/templates/PersonalMessage/add_rule.php b/Themes/default/templates/PersonalMessage/add_rule.php new file mode 100644 index 00000000000..44b6de531da --- /dev/null +++ b/Themes/default/templates/PersonalMessage/add_rule.php @@ -0,0 +1,254 @@ + + + +
+
+

+
+
+
+
+
+ +
+
+ +
+
+
+ criteria[] = ['t' => '', 'v' => '']; +?>criteria as $k => $criteria): ?>

+ + + > + + + > + +
+ +
+ +

+ + + +
+
+ actions[] = ['t' => '', 'v' => '']; +?>actions as $k => $action): ?>

+ + + + +
+ +
+ +
+
+

+
+
+
+
+
+ + +
+
+
+ + \ No newline at end of file diff --git a/Themes/default/templates/PersonalMessage/ask_delete.php b/Themes/default/templates/PersonalMessage/ask_delete.php new file mode 100644 index 00000000000..f16f5911e81 --- /dev/null +++ b/Themes/default/templates/PersonalMessage/ask_delete.php @@ -0,0 +1,37 @@ + + +
+

+ + +

+
+
+

+
+ - +
\ No newline at end of file diff --git a/Themes/default/templates/PersonalMessage/folder.php b/Themes/default/templates/PersonalMessage/folder.php new file mode 100644 index 00000000000..5555cdf93cc --- /dev/null +++ b/Themes/default/templates/PersonalMessage/folder.php @@ -0,0 +1,137 @@ + + + +
subTemplate('subject_list'); ?> + +

+ +
+

+ +

+
+
+
+

Utils::$context['current_pm_author'], 'time' => Utils::$context['current_pm_time']], file: 'General') ?>

+ +
subTemplate('button_strip', ['button_strip' => Utils::$context['conversation_buttons'], 'direction' => 'right']); ?> + +
subTemplate('single_pm', ['message' => $message]); ?> + +
+ +
+ +
+
+ +
subTemplate('button_strip', ['button_strip' => Utils::$context['conversation_buttons'], 'direction' => 'right']); ?> + +
+ +
subTemplate('subject_list'); ?>
+ + + \ No newline at end of file diff --git a/Themes/default/templates/PersonalMessage/index.php b/Themes/default/templates/PersonalMessage/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/PersonalMessage/index.php @@ -0,0 +1,8 @@ + + +
+
+

+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + 2): ?> + + +
+ +
+ +
+ + +
+ + +
+
+
+

+
+
+
+
+ +
+
+ +
+
+ +
+ +
+
\ No newline at end of file diff --git a/Themes/default/templates/PersonalMessage/pm_above.php b/Themes/default/templates/PersonalMessage/pm_above.php new file mode 100644 index 00000000000..405c85551e4 --- /dev/null +++ b/Themes/default/templates/PersonalMessage/pm_above.php @@ -0,0 +1,41 @@ + + +
+ +
+

+ + + + + +

+
+ +
+ + +
diff --git a/Themes/default/templates/PersonalMessage/pm_below.php b/Themes/default/templates/PersonalMessage/pm_below.php new file mode 100644 index 00000000000..ddba2949600 --- /dev/null +++ b/Themes/default/templates/PersonalMessage/pm_below.php @@ -0,0 +1,23 @@ + + +
\ No newline at end of file diff --git a/Themes/default/templates/PersonalMessage/pm_popup.php b/Themes/default/templates/PersonalMessage/pm_popup.php new file mode 100644 index 00000000000..fecbd11f3f2 --- /dev/null +++ b/Themes/default/templates/PersonalMessage/pm_popup.php @@ -0,0 +1,61 @@ + + + +
+
+ ' . Lang::getTxt('pm_new_short', file: 'PersonalMessage') . '' : '' ?> + + ' . Lang::getTxt('pm_drafts_short', file: 'PersonalMessage') . '' : '' ?> + + +
+
+ + +
+
+
+ +
+ + $pm_details): ?> +
+
+ + +
+
+
+
+ ' : '' ?> - + +
+
+
+ + +
\ No newline at end of file diff --git a/Themes/default/templates/PersonalMessage/prune.php b/Themes/default/templates/PersonalMessage/prune.php new file mode 100644 index 00000000000..e361fc9c558 --- /dev/null +++ b/Themes/default/templates/PersonalMessage/prune.php @@ -0,0 +1,43 @@ + + +
+

+
+
+
+

+ + +
+
+
+
+

+ + +
+
\ No newline at end of file diff --git a/Themes/default/templates/PersonalMessage/report_message.php b/Themes/default/templates/PersonalMessage/report_message.php new file mode 100644 index 00000000000..c52f7a90908 --- /dev/null +++ b/Themes/default/templates/PersonalMessage/report_message.php @@ -0,0 +1,67 @@ + + +
+ +
+ + +
+
+

+
+
+
+ + 1): ?> +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ +
+
+ +
\ No newline at end of file diff --git a/Themes/default/templates/PersonalMessage/report_message_complete.php b/Themes/default/templates/PersonalMessage/report_message_complete.php new file mode 100644 index 00000000000..3cbb557fe79 --- /dev/null +++ b/Themes/default/templates/PersonalMessage/report_message_complete.php @@ -0,0 +1,33 @@ + + +
+

+
+
+

+ +
\ No newline at end of file diff --git a/Themes/default/templates/PersonalMessage/rules.php b/Themes/default/templates/PersonalMessage/rules.php new file mode 100644 index 00000000000..ebf7a5ca9df --- /dev/null +++ b/Themes/default/templates/PersonalMessage/rules.php @@ -0,0 +1,80 @@ + + +
+
+

+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+ + +
+ + + +
+
+ + + + + + + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/PersonalMessage/search.php b/Themes/default/templates/PersonalMessage/search.php new file mode 100644 index 00000000000..174faf1b037 --- /dev/null +++ b/Themes/default/templates/PersonalMessage/search.php @@ -0,0 +1,161 @@ + + +
+ ', Utils::$context['search_errors']['messages']) ?> + +
+ +
+
+

+
+ + +
+
+
+

+ +

+ +
+
+
    + +
  • + +
  • + +
+
+
+
+ onclick="invertAll(this, this.form, 'searchlabel');"> + + +
+
+
+ + + +
\ No newline at end of file diff --git a/Themes/default/templates/PersonalMessage/search_results.php b/Themes/default/templates/PersonalMessage/search_results.php new file mode 100644 index 00000000000..ef33e178941 --- /dev/null +++ b/Themes/default/templates/PersonalMessage/search_results.php @@ -0,0 +1,62 @@ + + +
+

+
+
+ + +
+
+ +
+ + + + + + + + + + subTemplate('single_pm', ['message' => $message]); ?> + + + + + + + + +
+ +
+

+
+ +
+ +
\ No newline at end of file diff --git a/Themes/default/templates/PersonalMessage/send.php b/Themes/default/templates/PersonalMessage/send.php new file mode 100644 index 00000000000..c1ce1311a69 --- /dev/null +++ b/Themes/default/templates/PersonalMessage/send.php @@ -0,0 +1,322 @@ + + +
+

+
+
+ +
+ +
+ +
+
+ + + +
+
+

+ + +

+
+
+ +
+
+
+ +
+
+ ', Utils::$context['post_error']['messages']) ?> + +
+
+
+ + + +
+ +
+ for="to_control" id="caption_to"> ''], file: 'PersonalMessage')) ?> +
+ +
+ + + + +
+
+ +
+ for="bcc_control" id="caption_bbc"> ''], file: 'PersonalMessage')) ?> +
+
+ +
+
+ +
+ for="subject" id="caption_subject"> +
+
+ > +
+
subTemplate('control_richedit', ['editor_id' => Utils::$context['post_box_name'], 'smiley_container' => true, 'bbc_container' => true]); ?>options['drafts_show_saved_enabled'])): ?> + +
+

+ +

+ +
+
+
+
+
''], file: 'Drafts')) ?>
+ +
+
+ +
+
+ +
+ + subTemplate('control_verification', ['verify_id' => Utils::$context['visual_verification_id'], 'display_type' => 'all']); ?> + +
+ + + subTemplate('control_richedit_buttons', ['editor_id' => Utils::$context['post_box_name']]); ?> + + + + + + + + +
+
+
+ + +

+
+

+
+
+
+ + Utils::$context['quoted_message']['member']['link']], file: 'PersonalMessage') ?> + +
+
+ + +
+
+ + \ No newline at end of file diff --git a/Themes/default/templates/PersonalMessage/showPMDrafts.php b/Themes/default/templates/PersonalMessage/showPMDrafts.php new file mode 100644 index 00000000000..fa7b5855f1e --- /dev/null +++ b/Themes/default/templates/PersonalMessage/showPMDrafts.php @@ -0,0 +1,72 @@ + + +
+

+ + +

+
+

+ + +

+ +
+ + +
+ +
+ +
+ +
+
#
+
+

+ +

+
+
implode(Lang::getTxt('sentence_list_separator', file: 'General') . ' ', $draft['recipients']['to'])]) ?>
+ +
implode(Lang::getTxt('sentence_list_separator', file: 'General') . ' ', $draft['recipients']['bcc'])]) ?>
+ +
+
+ $draft['age'], 'remaining' => $draft['remaining']], file: 'Drafts') ?> + +
+
+
+ + +
subTemplate('quickbuttons', ['list_items' => $draft['quickbuttons'], 'list_class' => 'pm_drafts']); ?> + +
+ +
+ +
diff --git a/Themes/default/templates/PersonalMessage/single_pm.php b/Themes/default/templates/PersonalMessage/single_pm.php new file mode 100644 index 00000000000..3efee341789 --- /dev/null +++ b/Themes/default/templates/PersonalMessage/single_pm.php @@ -0,0 +1,199 @@ + + +
+
+
+ +
+
    + +
  • + +
+
+ +

+ + + + + + + + + +

+ +
+
+
+
+
+
+ +
+
+
+ + +
+
+
+ +
+ + + + +
subTemplate('quickbuttons', ['list_items' => $message['quickbuttons'], 'list_class' => 'pm']); ?> + +
+
+
+ +
+
    + +
  • + +
+
options['show_no_signatures']) && Utils::$context['signature_enabled']): ?> + +
+ + +
+ +
+
    + +
  • + +
+
+ +
+
+
\ No newline at end of file diff --git a/Themes/default/templates/PersonalMessage/subject_list.php b/Themes/default/templates/PersonalMessage/subject_list.php new file mode 100644 index 00000000000..11943caf0e2 --- /dev/null +++ b/Themes/default/templates/PersonalMessage/subject_list.php @@ -0,0 +1,110 @@ + + +
+

+ + +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + ' : '' ?> + + ' : '' ?> + + ' : '' ?> + + +
+ + ' : '' ?> + + + settings['images_url'] . '/selected.png" alt="*">' : '') ?>' . Lang::getTxt('new', file: 'General') . '' : '' ?> + + + + + onclick="if (document.getElementById('deletedisplay')) document.getElementById('deletedisplay').checked = this.checked;"> +
+
+ +
  + + + + + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/Poll/index.php b/Themes/default/templates/Poll/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Poll/index.php @@ -0,0 +1,8 @@ + + +
+
+
+ + +
+
+ ', Utils::$context['poll_error']['messages']) ?> + +
+
+
+ +
+
+
+

+
+
+
+ +
+ > +
+
+
+ +
+ +
+
+ () + +
+ +
+
+
+ +
+ +
+ +
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+ > +
+ +
+ +
+
+ > +
+ +
+ + +
+
+ >
+ >
+ > +
+
+
+ +
+ + + +
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/Themes/default/templates/Post/announce.php b/Themes/default/templates/Post/announce.php new file mode 100644 index 00000000000..6e3cc3759a0 --- /dev/null +++ b/Themes/default/templates/Post/announce.php @@ -0,0 +1,63 @@ + + +
+
+
+

+
+
+ + +
+
+

+ '' . Utils::$context['topic_subject'] . ''], file: 'Post') ?> + +

+
    + +
  • + () +
  • + +
  • + +
  • +
+
+
+ + + + + +
+
+
+
+
+
\ No newline at end of file diff --git a/Themes/default/templates/Post/announcement_send.php b/Themes/default/templates/Post/announcement_send.php new file mode 100644 index 00000000000..f09fe861df0 --- /dev/null +++ b/Themes/default/templates/Post/announcement_send.php @@ -0,0 +1,55 @@ + + +
+
+
+

+ '' . Utils::$context['topic_subject'] . ''], file: 'Post') ?> + +

+
+ +
+
+
+
+ + + + + + + +
+
+
+
+
+
+ \ No newline at end of file diff --git a/Themes/default/templates/Post/index.php b/Themes/default/templates/Post/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Post/index.php @@ -0,0 +1,8 @@ + + + +
+ + +
new || !empty(Utils::$context['current_board']))): ?> + + + + +
+

+
+
+
' : '' ?> + + + +
+ + +
+ +
+ + +
+ + subTemplate('post_header'); ?> + +
subTemplate('event_options'); ?>subTemplate('linked_events'); ?> + +
+ +
+
+
+ > +
+
+
+ +
+ +
+ +
+
+ +
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+ > +
+ +
+ +
+
+ > +
+ +
+ + +
+
+ >
+ >
+ > +
+
+
+
subTemplate('control_richedit', ['editor_id' => 'message', 'smiley_container' => true, 'bbc_container' => true]); ?> + +
+ +
+
+
+ : + + + + + +
+ +
implode(Lang::getTxt('sentence_list_separator', file: 'General') . ' ', Utils::$context['attachment_restrictions'])]) ?>
+ +
+ + + +
+
+
+ +
+ >settings['images_url'] . '/generic_attach.png'; ?> + +
+ +
+ +
+ (' . Lang::getTxt('awaiting_approval', file: 'General') . ')' : '') ?> + +
+ +
+
+ +
+
+ +
+ +
+
+
+ + +
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ + + + +
+
+
+
+
+
+
+
+ () + + + +
+
+
+
+
+
+
+
+ +
+ +
> + subTemplate('post_options', ['post_options' => Utils::$context['post_options']]); ?> + +
options['drafts_show_saved_enabled'])): ?> + +
+

+ +

+ +
+
+
+
+
''], file: 'Drafts')) ?>
+ +
+
+ +
+
+ +
+ > + + + subTemplate('control_verification', ['verify_id' => Utils::$context['visual_verification_id'], 'display_type' => 'all']); ?> + +
+ + + subTemplate('control_richedit_buttons', ['editor_id' => 'message']); ?> + + +
+
+
+ + + + + + +
+ 0): ?> + +
+
+

+
+ + +
+
+
+
+ $post['poster'], 'time' => $post['time']], file: 'General') ?> + +
+
+ +
+ + + +
+ +
+ +
    + +
  • +
+ +
+
+ +
+ diff --git a/Themes/default/templates/Post/post_header.php b/Themes/default/templates/Post/post_header.php new file mode 100644 index 00000000000..e02d4ca5574 --- /dev/null +++ b/Themes/default/templates/Post/post_header.php @@ -0,0 +1,85 @@ + ['html' => ''], + 'input' => ['html' => ''], +]; +?> + +
$pf): ?> + +
+ + + + id="caption_"> + + + +
+ +
+ + + + id="" name="" $value): ?> =""> + + id="" name="" $value): ?> =""> + + id="" name="" $value): ?> =""> $option): ?> + + label="" $value): ?> =""> $grouped_option): ?> + + $value): ?> =""> + + + + $value): ?> =""> + + + + $value): ?> =""> $option): ?> + + + +
+ + + + + + \ No newline at end of file diff --git a/Themes/default/templates/Post/post_options.php b/Themes/default/templates/Post/post_options.php new file mode 100644 index 00000000000..0773aed00f0 --- /dev/null +++ b/Themes/default/templates/Post/post_options.php @@ -0,0 +1,45 @@ + + +
    + + + + +
  • + $hidden_value): ?> + + + +
  • + +
\ No newline at end of file diff --git a/Themes/default/templates/Post/quotefast.php b/Themes/default/templates/Post/quotefast.php new file mode 100644 index 00000000000..c3f64351e91 --- /dev/null +++ b/Themes/default/templates/Post/quotefast.php @@ -0,0 +1,64 @@ + +> + + + <?= Lang::getTxt('retrieving_quote', file: 'Post') ?> + + + + + + + + + \ No newline at end of file diff --git a/Themes/default/templates/Post/spellcheck.php b/Themes/default/templates/Post/spellcheck.php new file mode 100644 index 00000000000..42d6752a7a5 --- /dev/null +++ b/Themes/default/templates/Post/spellcheck.php @@ -0,0 +1,89 @@ + +> + + + <?= Lang::getTxt('spell_check', file: 'General') ?> + + + + + + + + +
+
 
+ + + + + +
+
+ +
+
+ +
+
+ + + + +
+
+ + \ No newline at end of file diff --git a/Themes/default/templates/Printpage/index.php b/Themes/default/templates/Printpage/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Printpage/index.php @@ -0,0 +1,8 @@ + + +
+ +
+ : +
+ +
+ : + + +
+ +
+ +
+
+
+
+
+ + +
+ + + +
diff --git a/Themes/default/templates/Printpage/print_above.php b/Themes/default/templates/Printpage/print_above.php new file mode 100644 index 00000000000..3a75cc65290 --- /dev/null +++ b/Themes/default/templates/Printpage/print_above.php @@ -0,0 +1,141 @@ + +> + + + + + <?= Lang::getTxt('print_page', file: 'General') ?> - <?= Utils::$context['topic_subject'] ?> + + + subTemplate('print_options'); ?> + +

+

▸ ▸ Utils::$context['poster_name'], 'time' => Utils::$context['post_time']], file: 'General') ?>

+
\ No newline at end of file diff --git a/Themes/default/templates/Printpage/print_below.php b/Themes/default/templates/Printpage/print_below.php new file mode 100644 index 00000000000..c93ee6976fd --- /dev/null +++ b/Themes/default/templates/Printpage/print_below.php @@ -0,0 +1,29 @@ + + +
subTemplate('print_options'); ?> + + + + \ No newline at end of file diff --git a/Themes/default/templates/Printpage/print_options.php b/Themes/default/templates/Printpage/print_options.php new file mode 100644 index 00000000000..8c71854980f --- /dev/null +++ b/Themes/default/templates/Printpage/print_options.php @@ -0,0 +1,38 @@ + + + + \ No newline at end of file diff --git a/Themes/default/templates/Recent/index.php b/Themes/default/templates/Recent/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Recent/index.php @@ -0,0 +1,8 @@ + + +
+
+

+ +

+
+ +
+ +
+ +
+ +
+
#
+
+
/
+ $post['poster']['link'], 'relative' => str_contains($post['time'], Lang::getTxt('today', file: 'General')) ? 'today' : (str_contains($post['time'], Lang::getTxt('yesterday', file: 'General')) ? 'yesterday' : 'other'), 'date' => $post['time']]) ?> +
+
subTemplate('quickbuttons', ['list_items' => $post['quickbuttons'], 'list_class' => 'recent']); ?> + +
+ +
+ +
+
\ No newline at end of file diff --git a/Themes/default/templates/Recent/replies.php b/Themes/default/templates/Recent/replies.php new file mode 100644 index 00000000000..f3ec89aabaf --- /dev/null +++ b/Themes/default/templates/Recent/replies.php @@ -0,0 +1,158 @@ + + + + +
+
+

+ name) ? Board::$info->name . ' - ' : '') ?> +

+
+ +
+ + + + +
+ + + + subTemplate('button_strip', ['button_strip' => Utils::$context['recent_buttons'], 'direction' => 'right']) : '' ?> + +
+ +
+ +
+
+
+
+
/
+
/
+
+ +
+ +
+ +
+
+ +
+
+ + ' : '' ?> + +
+
+ +
+ + + + + + + +
+
+ + ' : '' ?>' : '' ?> + +
+

+ + +

+ ' . $topic['pages'] . '' : '' ?> + +
+
+

+ + +
+ + +

+
+
+ '' . $topic['last_post']['time'] . '', 'member_link' => $topic['last_post']['member']['link']], file: 'General') ?> + +
+ +
+ +
+ +
+ +
+
+
+ subTemplate('button_strip', ['button_strip' => Utils::$context['recent_buttons'], 'direction' => 'right']) : '' ?> + + + + + +
+ +
+ +
+ +
+

+ + +

+
+ +
+ +
subTemplate('topic_legend'); ?> diff --git a/Themes/default/templates/Recent/unread.php b/Themes/default/templates/Recent/unread.php new file mode 100644 index 00000000000..6b235b799ab --- /dev/null +++ b/Themes/default/templates/Recent/unread.php @@ -0,0 +1,160 @@ + + + + +
+
+

+ name) ? Board::$info->name . ' - ' : '') ?> +

+
+ +
+ + + + +
+ + + + subTemplate('button_strip', ['button_strip' => Utils::$context['recent_buttons'], 'direction' => 'right']) : '' ?> + +
+ +
+ +
+
+
+
+
/
+
/
+
+ +
+ +
+ +
+
+ +
+
+ + ' : '' ?> + +
+
+ +
+ + + + + + + +
+
+ + ' : '' ?>' : '' ?> + +
+

+ + +

+ ' . $topic['pages'] . '' : '' ?> + +
+
+

+ + +
+ + +

+
+
+ '' . $topic['last_post']['time'] . '', 'member_link' => $topic['last_post']['member']['link']], file: 'General') ?> + +
+ +
+ +
+ +
+ +
+ +
+
+
+ subTemplate('button_strip', ['button_strip' => Utils::$context['recent_buttons'], 'direction' => 'right']) : '' ?> + + + + + +
+ +
+ +
+ +
+

+ Config::$scripturl], file: 'General') ?> + +

+
+ +
+ +
subTemplate('topic_legend'); ?> diff --git a/Themes/default/templates/Register/admin_register.php b/Themes/default/templates/Register/admin_register.php new file mode 100644 index 00000000000..45724866111 --- /dev/null +++ b/Themes/default/templates/Register/admin_register.php @@ -0,0 +1,112 @@ + + +
+
+
+

+
+
+ +
+ + +
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+ +
+ + +
+
+ +
+ + + + + 1): ?> +
+ >: + +
+
+ + +
+ + + +
+ + +
+
+ +
+
+ +
+
+ onclick="onCheckChange();"> +
+
+
+ + + + +
+
+
+
+
\ No newline at end of file diff --git a/Themes/default/templates/Register/after.php b/Themes/default/templates/Register/after.php new file mode 100644 index 00000000000..3092797e358 --- /dev/null +++ b/Themes/default/templates/Register/after.php @@ -0,0 +1,33 @@ + + + +
+
+

+
+
+

+
+
\ No newline at end of file diff --git a/Themes/default/templates/Register/coppa.php b/Themes/default/templates/Register/coppa.php new file mode 100644 index 00000000000..e62680f1401 --- /dev/null +++ b/Themes/default/templates/Register/coppa.php @@ -0,0 +1,57 @@ + + + +
+

+
+
+

+

+ | +

+

+ + +

1)

+
+ + +
+ + + +

)

+
+ + +
+ + + +

+ +
\ No newline at end of file diff --git a/Themes/default/templates/Register/coppa_form.php b/Themes/default/templates/Register/coppa_form.php new file mode 100644 index 00000000000..12361c5a8c6 --- /dev/null +++ b/Themes/default/templates/Register/coppa_form.php @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + +
+ :
+
+
+ + +
+ : + +

+
+ + +
+
\ No newline at end of file diff --git a/Themes/default/templates/Register/edit_agreement.php b/Themes/default/templates/Register/edit_agreement.php new file mode 100644 index 00000000000..b25a2923654 --- /dev/null +++ b/Themes/default/templates/Register/edit_agreement.php @@ -0,0 +1,91 @@ + + +
+ +
+ +
+ +
+
+

+
1): ?> + +
+
+ + +
+ + + + +
+
+
+ +
+
+ +
+ + + + +
+
+ + +
+
    $linktext): ?> + +
  1. + +
  2. + +
+
+ +
+ + + + + + +
+
+
\ No newline at end of file diff --git a/Themes/default/templates/Register/edit_privacy_policy.php b/Themes/default/templates/Register/edit_privacy_policy.php new file mode 100644 index 00000000000..02964b1f09a --- /dev/null +++ b/Themes/default/templates/Register/edit_privacy_policy.php @@ -0,0 +1,85 @@ + + +
+ +
+

+
1): ?> + +
+
+ + +
+ + + +
+
+
+ +
+
+ + +
+ + + + +
+
+ + +
+
    $linktext): ?> + +
  1. + +
  2. + +
+
+ +
+
+ + + + + + +
+
+
\ No newline at end of file diff --git a/Themes/default/templates/Register/edit_reserved_words.php b/Themes/default/templates/Register/edit_reserved_words.php new file mode 100644 index 00000000000..3e81e824399 --- /dev/null +++ b/Themes/default/templates/Register/edit_reserved_words.php @@ -0,0 +1,69 @@ + + +
+ +
+
+

+
+
+

+ +
+
+ +
+
+ > +
+
+ +
+
+ > +
+
+ +
+
+ > +
+
+ +
+
+ > +
+
+
+ + + + +
+
+
\ No newline at end of file diff --git a/Themes/default/templates/Register/index.php b/Themes/default/templates/Register/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Register/index.php @@ -0,0 +1,8 @@ + + +
+ +
+

+
+
+
+
+ + +
+

+
+
+
+
+ +
+ + +
+
+ + + + + + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/Register/registration_form.php b/Themes/default/templates/Register/registration_form.php new file mode 100644 index 00000000000..9620bf63567 --- /dev/null +++ b/Themes/default/templates/Register/registration_form.php @@ -0,0 +1,233 @@ + + + + + +
+ +
    + + +
  • + +
+
+ +
+
+

+
+
+

+
+
+
+
+
+ +
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ > +
+
+ + +
+ + 1): ?> +
+ >: + +
+
+ + +
+ +
+
+ + +
+

+
+
+
+
+ + + + $field): ?> + +hasSubTemplate('profile_' . $field['callback_func'])): ?> +subTemplate('profile_' . $field['callback_func']) ?> + + +
+ >: + + + + +
+
+ + + + + + + + + + + + > + + + value="1" > + + + + + + + + + +
+ + + + + + + +
+ >: + +
+
+ + + + + +
+
+
+ + +
+

+
+
+
+ subTemplate('control_verification', ['verify_id' => Utils::$context['visual_verification_id'], 'display_type' => 'all']); ?> + +
+
+ +
+ + +
+
+ + + + +
+ + + +
+ \ No newline at end of file diff --git a/Themes/default/templates/Register/verification_sound.php b/Themes/default/templates/Register/verification_sound.php new file mode 100644 index 00000000000..43077839ad3 --- /dev/null +++ b/Themes/default/templates/Register/verification_sound.php @@ -0,0 +1,58 @@ + +> + + + <?= Lang::getTxt('visual_verification_sound', file: 'General') ?> + + + + + + +
+ + + + + + + + +
+
+

+
+
+ + \ No newline at end of file diff --git a/Themes/default/templates/Reminder/ask.php b/Themes/default/templates/Reminder/ask.php new file mode 100644 index 00000000000..36c37a8a64d --- /dev/null +++ b/Themes/default/templates/Reminder/ask.php @@ -0,0 +1,67 @@ + + +
+
+ +
+ \ No newline at end of file diff --git a/Themes/default/templates/Reminder/index.php b/Themes/default/templates/Reminder/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Reminder/index.php @@ -0,0 +1,8 @@ + + +
+
+ + + +
\ No newline at end of file diff --git a/Themes/default/templates/Reminder/reminder_pick.php b/Themes/default/templates/Reminder/reminder_pick.php new file mode 100644 index 00000000000..0cffcd248ca --- /dev/null +++ b/Themes/default/templates/Reminder/reminder_pick.php @@ -0,0 +1,51 @@ + + +
+
+ +
\ No newline at end of file diff --git a/Themes/default/templates/Reminder/sent.php b/Themes/default/templates/Reminder/sent.php new file mode 100644 index 00000000000..467f5c1396e --- /dev/null +++ b/Themes/default/templates/Reminder/sent.php @@ -0,0 +1,31 @@ + + +
+ \ No newline at end of file diff --git a/Themes/default/templates/Reminder/set_password.php b/Themes/default/templates/Reminder/set_password.php new file mode 100644 index 00000000000..e098ee478e4 --- /dev/null +++ b/Themes/default/templates/Reminder/set_password.php @@ -0,0 +1,63 @@ + + +
+
+ + + + + +
+ \ No newline at end of file diff --git a/Themes/default/templates/ReportToMod/index.php b/Themes/default/templates/ReportToMod/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/ReportToMod/index.php @@ -0,0 +1,8 @@ + + + + +
+
+ +
+

+
+
+ +
+
    + $error): ?> +
  • + +
+ + +

+
+
+ +
+
+ +
+
+ + + +
+ +
\ No newline at end of file diff --git a/Themes/default/templates/ReportedContent/edit_comment.php b/Themes/default/templates/ReportedContent/edit_comment.php new file mode 100644 index 00000000000..d05c8989828 --- /dev/null +++ b/Themes/default/templates/ReportedContent/edit_comment.php @@ -0,0 +1,43 @@ + + +
+
+
+
+

+
+
+ +
+ +
+
+
+ + +
+
\ No newline at end of file diff --git a/Themes/default/templates/ReportedContent/index.php b/Themes/default/templates/ReportedContent/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/ReportedContent/index.php @@ -0,0 +1,8 @@ + + +
+ + +
+ +
+
+

+ + +

+
+
options['display_quick_mod']) && Theme::$current->options['display_quick_mod'] == 1): ?> + +
    +
  • + +
  • +
+ + +
+ +
+
+ +
+
+ $report['last_updated']], file: 'ModerationCenter') ?>
+ + Lang::sentenceList($comments)], file: 'ModerationCenter') ?> + +
+
+ subTemplate('quickbuttons', ['list_items' => $report['quickbuttons'], 'list_class' => 'reported_members']); ?> + +
+ +
+
+
+ +
+ +
+ ' : '' ?> + +
+
+ +
\ No newline at end of file diff --git a/Themes/default/templates/ReportedContent/reported_posts.php b/Themes/default/templates/ReportedContent/reported_posts.php new file mode 100644 index 00000000000..b0b29e6372a --- /dev/null +++ b/Themes/default/templates/ReportedContent/reported_posts.php @@ -0,0 +1,86 @@ + + +
+ + +
+ +
+
+

+ + +

+
+
options['display_quick_mod']) && Theme::$current->options['display_quick_mod'] == 1): ?> + +
    +
  • + +
  • +
+ + +
+ +
+
+ ' . $report['topic']['board_name'] . '' : '??' ?> / '' . $report['subject'] . '', 'author' => $report['author']['link']], file: 'ModerationCenter') ?> + +
+
+ $report['last_updated']], file: 'ModerationCenter') ?>
+ + Lang::sentenceList($comments)], file: 'ModerationCenter') ?> + +
+
+ + +
subTemplate('quickbuttons', ['list_items' => $report['quickbuttons'], 'list_class' => 'reported_posts']); ?> + +
+ +
+
+
+ +
+ options['display_quick_mod']) && Theme::$current->options['display_quick_mod'] == 1): ?> + +
+ + +
+ +
+ +
\ No newline at end of file diff --git a/Themes/default/templates/ReportedContent/viewmemberreport.php b/Themes/default/templates/ReportedContent/viewmemberreport.php new file mode 100644 index 00000000000..10c20b3400e --- /dev/null +++ b/Themes/default/templates/ReportedContent/viewmemberreport.php @@ -0,0 +1,120 @@ + + +
+ + +
+ +
+
+
+

+ Utils::$context['report']['user']['link']], file: 'ModerationCenter') ?> + +

+
+
+

+ + + + [ + 'text' => !Utils::$context['report']['ignore'] ? 'mc_reportedp_ignore' : 'mc_reportedp_unignore', + 'url' => Config::$scripturl . '?action=moderate;area=reportedmembers;sa=handle;ignore=' . (int) !Utils::$context['report']['ignore'] . ';rid=' . Utils::$context['report']['id'] . ';' . Utils::$context['session_var'] . '=' . Utils::$context['session_id'] . ';' . Utils::$context['mod-report-ignore_token_var'] . '=' . Utils::$context['mod-report-ignore_token'], + 'class' => !Utils::$context['report']['ignore'] ? ' you_sure' : '', + 'custom' => !Utils::$context['report']['ignore'] ? ' data-confirm="' . Lang::getTxt('mc_reportedp_ignore_confirm', file: 'ModerationCenter') . '"' : '', + 'icon' => 'ignore', + ], + 'close' => [ + 'text' => Utils::$context['report']['closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close', + 'url' => Config::$scripturl . '?action=moderate;area=reportedmembers;sa=handle;closed=' . (int) !Utils::$context['report']['closed'] . ';rid=' . Utils::$context['report']['id'] . ';' . Utils::$context['session_var'] . '=' . Utils::$context['session_id'] . ';' . Utils::$context['mod-report-closed_token_var'] . '=' . Utils::$context['mod-report-closed_token'], + 'icon' => 'close', + ], +]; +// Report buttons +?>subTemplate('button_strip', ['button_strip' => $report_buttons, 'direction' => 'right']); ?> + +

+
+
+
+

+
+ +
+
+ $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), + 'datetime' => $comment['time'], + ], + file: 'ModerationCenter', + ) ?> + +
+
+
+ +
+
+

+
+ +
subTemplate('show_list', ['list_id' => 'moderation_actions_list']); ?> + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/ReportedContent/viewmodreport.php b/Themes/default/templates/ReportedContent/viewmodreport.php new file mode 100644 index 00000000000..c0619d2f7b1 --- /dev/null +++ b/Themes/default/templates/ReportedContent/viewmodreport.php @@ -0,0 +1,127 @@ + + +
+ + +
+ +
+
+
+

+ Utils::$context['report']['message_link'], 'author_link' => Utils::$context['report']['author']['link']], file: 'ModerationCenter') ?> + +

+
+
+

+ + + + [ + 'text' => !Utils::$context['report']['ignore'] ? 'mc_reportedp_ignore' : 'mc_reportedp_unignore', + 'url' => Config::$scripturl . '?action=moderate;area=reportedposts;sa=handle;ignore=' . (int) !Utils::$context['report']['ignore'] . ';rid=' . Utils::$context['report']['id'] . ';' . Utils::$context['session_var'] . '=' . Utils::$context['session_id'] . ';' . Utils::$context['mod-report-ignore_token_var'] . '=' . Utils::$context['mod-report-ignore_token'], + 'class' => !Utils::$context['report']['ignore'] ? ' you_sure' : '', + 'custom' => !Utils::$context['report']['ignore'] ? ' data-confirm="' . Lang::getTxt('mc_reportedp_ignore_confirm', file: 'ModerationCenter') . '"' : '', + 'icon' => 'ignore', + ], + 'close' => [ + 'text' => Utils::$context['report']['closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close', + 'url' => Config::$scripturl . '?action=moderate;area=reportedposts;sa=handle;closed=' . (int) !Utils::$context['report']['closed'] . ';rid=' . Utils::$context['report']['id'] . ';' . Utils::$context['session_var'] . '=' . Utils::$context['session_id'] . ';' . Utils::$context['mod-report-closed_token_var'] . '=' . Utils::$context['mod-report-closed_token'], + 'icon' => 'close', + ], +]; +// Report buttons +?>subTemplate('button_strip', ['button_strip' => $report_buttons, 'direction' => 'right']); ?> + +

+
+
+ + +
+
+
+

+
+ +
+
+ $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), + 'datetime' => $comment['time'], + ], + file: 'ModerationCenter', + ) ?> + +
+
+
+ +
+
+

+
+ +
subTemplate('show_list', ['list_id' => 'moderation_actions_list']); ?> + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/Reports/index.php b/Themes/default/templates/Reports/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Reports/index.php @@ -0,0 +1,8 @@ + + +
+

+
+
subTemplate('button_strip', ['button_strip' => Utils::$context['report_buttons'], 'direction' => 'right']); ?> + +
1): ?> + + +
+
$table): ?> + + + +
+
$table): ?> + + + + + + + + + + + + + + + + + + + + + + + + + +
+ : + + + + > + + + > + + +
diff --git a/Themes/default/templates/Reports/print.php b/Themes/default/templates/Reports/print.php new file mode 100644 index 00000000000..46372d95a7b --- /dev/null +++ b/Themes/default/templates/Reports/print.php @@ -0,0 +1,63 @@ + + +
+ + + + + + + + + + + + + + + + + + +
+ + +
+ : + > + + + > + + +
+
+
diff --git a/Themes/default/templates/Reports/print_above.php b/Themes/default/templates/Reports/print_above.php new file mode 100644 index 00000000000..e3ef4fd4189 --- /dev/null +++ b/Themes/default/templates/Reports/print_above.php @@ -0,0 +1,32 @@ + +> + + + <?= Utils::$context['page_title'] ?> + + + + \ No newline at end of file diff --git a/Themes/default/templates/Reports/print_below.php b/Themes/default/templates/Reports/print_below.php new file mode 100644 index 00000000000..b772084877d --- /dev/null +++ b/Themes/default/templates/Reports/print_below.php @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/Themes/default/templates/Reports/report_type.php b/Themes/default/templates/Reports/report_type.php new file mode 100644 index 00000000000..1423df5779c --- /dev/null +++ b/Themes/default/templates/Reports/report_type.php @@ -0,0 +1,43 @@ + + +
+

+
+
+ + + + + + +
\ No newline at end of file diff --git a/Themes/default/templates/Search/index.php b/Themes/default/templates/Search/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Search/index.php @@ -0,0 +1,8 @@ + + +
+ +
+ ', Utils::$context['search_errors']['messages']) ?> + +
+ + +
+ count(Utils::$context['search_ignored']), + 'list' => implode(Lang::getTxt('sentence_list_separator', file: 'General') . ' ', Utils::$context['search_ignored']), + ], + file: 'Search', + ) ?> + +
+ +
+

+ + +

+
+ + +
+
+
> + +
+
    + +
  • + +
      + + $board): ?> +
    • + + + $curr_child_level): ?> +
        + + + + +
      + +
    • + + +
    +
  • + +
+
+
+
+
+ onclick="invertAll(this, this.form, 'brd');"> + + +
+
+
+ +
+ \ No newline at end of file diff --git a/Themes/default/templates/Search/results.php b/Themes/default/templates/Search/results.php new file mode 100644 index 00000000000..97ce316fc4c --- /dev/null +++ b/Themes/default/templates/Search/results.php @@ -0,0 +1,163 @@ + + +
+
+

+ + +

+
+
+ +

+ '' . Utils::$context['did_you_mean'] . ''], file: 'Search') ?> + +

+ +

+ count(Utils::$context['search_ignored']), + 'list' => implode(Lang::getTxt('sentence_list_separator', file: 'General') . ' ', Utils::$context['search_ignored']), + ], + file: 'Search', + ) ?> + +

+ +
+ + maxlength="" size="40"> + + +
+
+
+ + +
+

+ Utils::$context['search_params']['search']], file: 'General') ?> +

+
+ +
+ +
+ + +
+
+
+ +
+ +
+
+ +
+ +
+
#
+
+
+
/
+ ', ' ', Lang::getTxt('last_post_updated', ['time' => $message['time'], 'member_link' => '' . $message['member']['link'] . ''], file: 'General')) ?> +
+
+
+ +
+ +
+ +
+

+ Utils::$context['search_params']['search']], file: 'General') ?> +

+
+ +
+ +
+ + +
+
+
+ +
+ + +
+ +
+
#
+
+
+ / +
+ ', ' ', Lang::getTxt('last_post_topic', ['post_link' => $message['time'], 'member_link' => '' . $message['member']['link'] . ''], file: 'General')) ?> +
+
+
+
+ +
+ + + + + +
\ No newline at end of file diff --git a/Themes/default/templates/Settings/index.php b/Themes/default/templates/Settings/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Settings/index.php @@ -0,0 +1,8 @@ + 'show_children', + 'label' => Lang::getTxt('show_children', file: 'Profile'), + 'default' => true, + ], + [ + 'id' => 'topics_per_page', + 'label' => Lang::getTxt('topics_per_page', file: 'Profile'), + 'options' => [ + 0 => Lang::getTxt('per_page_default', file: 'Profile'), + 5 => 5, + 10 => 10, + 25 => 25, + 50 => 50, + ], + 'default' => true, + 'enabled' => empty(Config::$modSettings['disableCustomPerPage']), + ], + [ + 'id' => 'messages_per_page', + 'label' => Lang::getTxt('messages_per_page', file: 'Profile'), + 'options' => [ + 0 => Lang::getTxt('per_page_default', file: 'Profile'), + 5 => 5, + 10 => 10, + 25 => 25, + 50 => 50, + ], + 'default' => true, + 'enabled' => empty(Config::$modSettings['disableCustomPerPage']), + ], + [ + 'id' => 'view_newest_first', + 'label' => Lang::getTxt('recent_posts_at_top', file: 'Profile'), + 'default' => true, + ], + [ + 'id' => 'show_no_avatars', + 'label' => Lang::getTxt('show_no_avatars', file: 'Profile'), + 'default' => true, + ], + [ + 'id' => 'show_no_signatures', + 'label' => Lang::getTxt('show_no_signatures', file: 'Profile'), + 'default' => true, + ], + [ + 'id' => 'show_no_censored', + 'label' => Lang::getTxt('show_no_censored'), + 'default' => false, + 'enabled' => !empty(Config::$modSettings['allow_no_censored']), + ], + [ + 'id' => 'posts_apply_ignore_list', + 'label' => Lang::getTxt('posts_apply_ignore_list', file: 'Profile'), + 'default' => false, + 'enabled' => !empty(Config::$modSettings['enable_buddylist']), + ], + Lang::getTxt('theme_opt_posting', file: 'Profile'), + [ + 'id' => 'return_to_post', + 'label' => Lang::getTxt('return_to_post', file: 'Profile'), + 'default' => true, + ], + [ + 'id' => 'no_new_reply_warning', + 'label' => Lang::getTxt('no_new_reply_warning', file: 'Profile'), + 'default' => true, + ], + [ + 'id' => 'wysiwyg_default', + 'label' => Lang::getTxt('wysiwyg_default', file: 'Profile'), + 'default' => false, + 'enabled' => empty(Config::$modSettings['disable_wysiwyg']), + ], + [ + 'id' => 'drafts_autosave_enabled', + 'label' => Lang::getTxt('drafts_autosave_enabled', file: 'Drafts'), + 'default' => true, + 'enabled' => !empty(Config::$modSettings['drafts_autosave_enabled']) && (!empty(Config::$modSettings['drafts_post_enabled']) || !empty(Config::$modSettings['drafts_pm_enabled'])), + ], + [ + 'id' => 'drafts_show_saved_enabled', + 'label' => Lang::getTxt('drafts_show_saved_enabled', file: 'Drafts'), + 'default' => true, + 'enabled' => !empty(Config::$modSettings['drafts_show_saved_enabled']) && (!empty(Config::$modSettings['drafts_post_enabled']) || !empty(Config::$modSettings['drafts_pm_enabled'])), + ], + Lang::getTxt('theme_opt_moderation', file: 'Profile'), + [ + 'id' => 'display_quick_mod', + 'label' => Lang::getTxt('display_quick_mod', file: 'Profile'), + 'options' => [ + 0 => Lang::getTxt('display_quick_mod_none', file: 'Profile'), + 1 => Lang::getTxt('display_quick_mod_check', file: 'Profile'), + 2 => Lang::getTxt('display_quick_mod_image', file: 'Profile'), + ], + 'default' => true, + ], + Lang::getTxt('theme_opt_personal_messages', file: 'Profile'), + [ + 'id' => 'popup_messages', + 'label' => Lang::getTxt('popup_messages', file: 'Profile'), + 'default' => true, + ], + [ + 'id' => 'view_newest_pm_first', + 'label' => Lang::getTxt('recent_pms_at_top', file: 'Profile'), + 'default' => true, + ], + [ + 'id' => 'pm_remove_inbox_label', + 'label' => Lang::getTxt('pm_remove_inbox_label', file: 'Profile'), + 'default' => true, + ], + !empty(Config::$modSettings['cal_enabled']) ? Lang::getTxt('theme_opt_calendar', file: 'Profile') : '', + [ + 'id' => 'calendar_default_view', + 'label' => Lang::getTxt('calendar_default_view', file: 'Profile'), + 'options' => [ + 'viewlist' => Lang::getTxt('calendar_viewlist', file: 'Profile'), + 'viewmonth' => Lang::getTxt('calendar_viewmonth', file: 'Profile'), + 'viewweek' => Lang::getTxt('calendar_viewweek', file: 'Profile'), + ], + 'default' => true, + 'enabled' => !empty(Config::$modSettings['cal_enabled']), + ], + [ + 'id' => 'calendar_start_day', + 'label' => Lang::getTxt('calendar_start_day', file: 'Profile'), + 'options' => array_filter( + Lang::getTxt('days', file: 'General'), + fn($key) => in_array($key, [0, 1, 5, 6]), + ARRAY_FILTER_USE_KEY, + ), + 'default' => true, + 'enabled' => !empty(Config::$modSettings['cal_enabled']), + ], +]; +?> diff --git a/Themes/default/templates/Settings/settings.php b/Themes/default/templates/Settings/settings.php new file mode 100644 index 00000000000..dfbaf840b19 --- /dev/null +++ b/Themes/default/templates/Settings/settings.php @@ -0,0 +1,95 @@ + 'header_logo_url', + 'label' => Lang::getTxt('header_logo_url', file: 'Themes'), + 'description' => Lang::getTxt('header_logo_url_desc', file: 'Themes'), + 'type' => 'text', + ], + [ + 'id' => 'site_slogan', + 'label' => Lang::getTxt('site_slogan', file: 'Themes'), + 'description' => Lang::getTxt('site_slogan_desc', file: 'Themes'), + 'type' => 'text', + ], + [ + 'id' => 'og_image', + 'label' => Lang::getTxt('og_image', file: 'Themes'), + 'description' => Lang::getTxt('og_image_desc', file: 'Themes'), + 'type' => 'url', + ], + '', + [ + 'id' => 'smiley_sets_default', + 'label' => Lang::getTxt('smileys_default_set_for_theme', file: 'Admin'), + 'options' => Utils::$context['smiley_sets'], + 'type' => 'text', + ], + '', + [ + 'id' => 'enable_news', + 'label' => Lang::getTxt('enable_random_news', file: 'Themes'), + ], + [ + 'id' => 'show_newsfader', + 'label' => Lang::getTxt('news_fader', file: 'Themes'), + ], + [ + 'id' => 'newsfader_time', + 'label' => Lang::getTxt('admin_fader_delay', file: 'Admin'), + 'type' => 'number', + ], + '', + [ + 'id' => 'number_recent_posts', + 'label' => Lang::getTxt('number_recent_posts', file: 'Themes'), + 'description' => Lang::getTxt('zero_to_disable', file: 'Admin'), + 'type' => 'number', + ], + [ + 'id' => 'show_stats_index', + 'label' => Lang::getTxt('show_stats_index', file: 'Themes'), + ], + [ + 'id' => 'show_latest_member', + 'label' => Lang::getTxt('latest_members', file: 'Themes'), + ], + [ + 'id' => 'show_group_key', + 'label' => Lang::getTxt('show_group_key', file: 'Themes'), + ], + [ + 'id' => 'display_who_viewing', + 'label' => Lang::getTxt('who_display_viewing', file: 'Themes'), + 'options' => [ + 0 => Lang::getTxt('who_display_viewing_off', file: 'Themes'), + 1 => Lang::getTxt('who_display_viewing_numbers', file: 'Themes'), + 2 => Lang::getTxt('who_display_viewing_names', file: 'Themes'), + ], + 'type' => 'list', + ], +]; +?> diff --git a/Themes/default/templates/SplitTopics/ask.php b/Themes/default/templates/SplitTopics/ask.php new file mode 100644 index 00000000000..78f9c32e589 --- /dev/null +++ b/Themes/default/templates/SplitTopics/ask.php @@ -0,0 +1,56 @@ + + +
+
+ +
+

+
+
+

+ + +

+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+
+ + +
+
+
+
\ No newline at end of file diff --git a/Themes/default/templates/SplitTopics/index.php b/Themes/default/templates/SplitTopics/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/SplitTopics/index.php @@ -0,0 +1,8 @@ + + +
+
+

+
+
+

+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+
\ No newline at end of file diff --git a/Themes/default/templates/SplitTopics/select.php b/Themes/default/templates/SplitTopics/select.php new file mode 100644 index 00000000000..1198cf12ff7 --- /dev/null +++ b/Themes/default/templates/SplitTopics/select.php @@ -0,0 +1,156 @@ + + +
+
+
+
+

+
+
+ + +
+
+ +
+
    + +
  • +
    + + + + +
    +
    +
  • + +
+
+
+ +
+ + +
+
+ +
+
    + + +
  • +
    + + + + +
    +
    +
  • + + +
+
+
+
+ + + + +
+
+
+ \ No newline at end of file diff --git a/Themes/default/templates/Themes/copy_template.php b/Themes/default/templates/Themes/copy_template.php new file mode 100644 index 00000000000..1c1512426aa --- /dev/null +++ b/Themes/default/templates/Themes/copy_template.php @@ -0,0 +1,47 @@ + + +
+

+
+
+ + +
+
+
    + +
  • + (' . Lang::getTxt('themeadmin_edit_exists', file: 'Themes') . ')' : '' ?> + + + + + +
  • + +
+
\ No newline at end of file diff --git a/Themes/default/templates/Themes/edit_browse.php b/Themes/default/templates/Themes/edit_browse.php new file mode 100644 index 00000000000..7ab3085365d --- /dev/null +++ b/Themes/default/templates/Themes/edit_browse.php @@ -0,0 +1,53 @@ + + +
+

+
+ + + + + + + + + + + + + + + + + + +
+ + > + + + +
\ No newline at end of file diff --git a/Themes/default/templates/Themes/edit_file.php b/Themes/default/templates/Themes/edit_file.php new file mode 100644 index 00000000000..3a870f94b3a --- /dev/null +++ b/Themes/default/templates/Themes/edit_file.php @@ -0,0 +1,50 @@ + + +
+ + +
+ +
+ Utils::$context['allow_save_filename']], file: 'Themes') ?> + +
+ +
+
+

Utils::$context['edit_filename']], file: 'Themes') ?>

+
+
+
+ class="button"> + + + + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/Themes/edit_list.php b/Themes/default/templates/Themes/edit_list.php new file mode 100644 index 00000000000..c3d52a7c5ee --- /dev/null +++ b/Themes/default/templates/Themes/edit_list.php @@ -0,0 +1,48 @@ + + +
+
+

+
+
+ +
+ + (' . $theme['version'] . ')' : '' ?> + + + +
+ +
+
\ No newline at end of file diff --git a/Themes/default/templates/Themes/edit_style.php b/Themes/default/templates/Themes/edit_style.php new file mode 100644 index 00000000000..92126ddf90d --- /dev/null +++ b/Themes/default/templates/Themes/edit_style.php @@ -0,0 +1,164 @@ + + +
+ + +
+ + + + +
+
+

Utils::$context['edit_filename']], file: 'Themes') ?>

+
+
+ + Utils::$context['allow_save_filename']], file: 'Themes') ?>
+ + +
+
+ class="button"> + +
+
+ + + + + +
\ No newline at end of file diff --git a/Themes/default/templates/Themes/edit_template.php b/Themes/default/templates/Themes/edit_template.php new file mode 100644 index 00000000000..739181052b3 --- /dev/null +++ b/Themes/default/templates/Themes/edit_template.php @@ -0,0 +1,60 @@ + + +
+ + +
+ +
+ + +
+
+ +
+
+

Utils::$context['edit_filename']], file: 'Themes') ?>

+
+
+ + Utils::$context['allow_save_filename']], file: 'Themes') ?>
+ +
+
+ +
+ +
+ class="button"> + + + + + +
+
+
\ No newline at end of file diff --git a/Themes/default/templates/Themes/index.php b/Themes/default/templates/Themes/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Themes/index.php @@ -0,0 +1,8 @@ + + + +
+

+
+
+ + +

+ + +

+ + +

+ + +

+

+ +

+ +
\ No newline at end of file diff --git a/Themes/default/templates/Themes/list_themes.php b/Themes/default/templates/Themes/list_themes.php new file mode 100644 index 00000000000..16b3f9719ad --- /dev/null +++ b/Themes/default/templates/Themes/list_themes.php @@ -0,0 +1,94 @@ + + +
+ + +
+ +
+

+
+
+ + +
+
+
+

+
+
+ +
+

+ + (' . $theme['version'] . ')' : '') ?> + + + + ' : '') ?> + + + + + + +

+
+
+
+
+ > +
+
+
+
+
+
+ +
+

+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/Themes/main.php b/Themes/default/templates/Themes/main.php new file mode 100644 index 00000000000..dfc7851581b --- /dev/null +++ b/Themes/default/templates/Themes/main.php @@ -0,0 +1,161 @@ + + + +
+

+ + + +

+
+
+ + +
+
+
+

+ +

+
+
+
+
+ +
+
+ + > +
+
+ +
+
+
+ +
+ +
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ + + +
+
+ +
+

+ + +

+
+
+ + +
+ +
+
+

+ + +

+
+
+ + +
+ +
+ + + + +
+
+ +
+ +
+ + + + +
+
+ + +
+ +
+ + + + +
+
+
+
+ \ No newline at end of file diff --git a/Themes/default/templates/Themes/pick.php b/Themes/default/templates/Themes/pick.php new file mode 100644 index 00000000000..535e877b174 --- /dev/null +++ b/Themes/default/templates/Themes/pick.php @@ -0,0 +1,72 @@ + + +
+ + +
+

+
+
+ + + +
+

+ + +

+
+
+ + + + +
+ + +
+
+
+ + + +
+ + +
+ + + + + +
\ No newline at end of file diff --git a/Themes/default/templates/Themes/reset_list.php b/Themes/default/templates/Themes/reset_list.php new file mode 100644 index 00000000000..500f290e499 --- /dev/null +++ b/Themes/default/templates/Themes/reset_list.php @@ -0,0 +1,54 @@ + + +
+

+
+
+ + +
+
+ + +
+

+
+
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+ +
\ No newline at end of file diff --git a/Themes/default/templates/Themes/set_options.php b/Themes/default/templates/Themes/set_options.php new file mode 100644 index 00000000000..5c8f1732e62 --- /dev/null +++ b/Themes/default/templates/Themes/set_options.php @@ -0,0 +1,98 @@ + + +
+ +
+

+ Utils::$context['theme_settings']['name']], file: 'Themes') ?> + +

+
+
+ + +
+
+
$setting): ?> + +
+
+
+ +
+
+ +
+ + + + + +
+ + +
+ +
+ + value="1" class="floatleft"> + +
+ + +
+ + + + + + name="options[]" id="options_" value=""> + +
+ +
+ + + +
+
\ No newline at end of file diff --git a/Themes/default/templates/Themes/set_settings.php b/Themes/default/templates/Themes/set_settings.php new file mode 100644 index 00000000000..6d77741cf9c --- /dev/null +++ b/Themes/default/templates/Themes/set_settings.php @@ -0,0 +1,215 @@ + + +
+
+
+

+ Utils::$context['theme_settings']['name']], file: 'Themes') ?> + +

+
+
+ +
+

+ + +

+
+
+
    +
  • + +
  • +
  • + +
  • +
+
+ +
+

+ + +

+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+

+ + +

+
+
+
+ +
+
+ +
+
+ +
+
+ + value="1"> +
+
+ settings['has_dark_mode'])): ?> + +
+

+ + +

+
+
+
+ +
+
+ +
+
+ +
+
+ + value="1"> +
+
+ +
+

+ + +

+
+
$setting): ?> + +
+
+
+ +
+
+ +
+ :
+ + +
+ +
+ + value="1"> +
+ +
+ +
+ +
+ +
+ +
+ + + + + + + + name="options[]" id="options_" value=""> +
+ +
+ + + +
+
+
+ + diff --git a/Themes/default/templates/Who/credits.php b/Themes/default/templates/Who/credits.php new file mode 100644 index 00000000000..60f99e31df9 --- /dev/null +++ b/Themes/default/templates/Who/credits.php @@ -0,0 +1,111 @@ + + + +
+
+

+
+ + +
+

+
+ + +
+

+
+ +
+
+ +
+ ' . $group['title'] . '' : '' ?> + +
+
Lang::sentenceList($group['members'])], file: 'Who') ?> + +
+ +
+ +

+ +
+ + + +
+

+
+
+ +
+
+
', Utils::$context['credits_software_graphics']['graphics']) ?>
+
+ + +
+
+
', Utils::$context['credits_software_graphics']['software']) ?>
+
+ + +
+
+
', Utils::$context['credits_software_graphics']['fonts']) ?>
+
+ +
+ + + +
+

+
+
+
    + + +
  • ', Utils::$context['credits_modifications']) ?>
  • + + + +
  • ', Utils::$context['copyrights']['mods']) ?>
  • + +
+
+ + +
+

+
+
+ + +
+
\ No newline at end of file diff --git a/Themes/default/templates/Who/index.php b/Themes/default/templates/Who/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Who/index.php @@ -0,0 +1,8 @@ + + +
+
+
+

+
+
+
+ +
+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + +
' : '' ?>' : '' ?>
+ + + ' : '' ?>' : '' ?> + + + + + $member['name']], file: 'General') . '"' . (empty($member['color']) ? '' : ' style="color: ' . $member['color'] . ';"') . '>' . $member['name'] . '' ?> + + + + () + + + + <> + + + > + +
+ + +
+
+ +
+ + + + +
+
+
+
+
\ No newline at end of file diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/themes_copy.txt b/tests/Integration/Http/Snapshot/snapshots/admin/themes_copy.txt index d7310963184..4325305113a 100644 --- a/tests/Integration/Http/Snapshot/snapshots/admin/themes_copy.txt +++ b/tests/Integration/Http/Snapshot/snapshots/admin/themes_copy.txt @@ -94,7 +94,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Agreement.template.php" + "templates/Agreement/" span.error "(already exists)" span.floatright @@ -110,7 +110,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Calendar.template.php" + "templates/Calendar/" span.error "(already exists)" span.floatright @@ -118,7 +118,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Display.template.php" + "templates/Display/" span.error "(already exists)" span.floatright @@ -126,7 +126,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "EditHistory.template.php" + "templates/EditHistory/" span.error "(already exists)" span.floatright @@ -134,7 +134,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Errors.template.php" + "templates/Errors/" span.error "(already exists)" span.floatright @@ -166,7 +166,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "GenericMenu.template.php" + "templates/GenericMenu/" span.error "(already exists)" span.floatright @@ -174,7 +174,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Help.template.php" + "templates/Help/" span.error "(already exists)" span.floatright @@ -190,7 +190,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Likes.template.php" + "templates/Likes/" span.error "(already exists)" span.floatright @@ -198,7 +198,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Login.template.php" + "templates/Login/" span.error "(already exists)" span.floatright @@ -206,7 +206,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "ManageAttachments.template.php" + "templates/ManageAttachments/" span.error "(already exists)" span.floatright @@ -214,7 +214,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "ManageBans.template.php" + "templates/ManageBans/" span.error "(already exists)" span.floatright @@ -222,7 +222,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "ManageBoards.template.php" + "templates/ManageBoards/" span.error "(already exists)" span.floatright @@ -230,7 +230,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "ManageCalendar.template.php" + "templates/ManageCalendar/" span.error "(already exists)" span.floatright @@ -238,7 +238,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "ManageLanguages.template.php" + "templates/ManageLanguages/" span.error "(already exists)" span.floatright @@ -246,7 +246,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "ManageMail.template.php" + "templates/ManageMail/" span.error "(already exists)" span.floatright @@ -254,7 +254,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "ManageMaintenance.template.php" + "templates/ManageMaintenance/" span.error "(already exists)" span.floatright @@ -262,7 +262,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "ManageMembergroups.template.php" + "templates/ManageMembergroups/" span.error "(already exists)" span.floatright @@ -270,7 +270,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "ManageMembers.template.php" + "templates/ManageMembers/" span.error "(already exists)" span.floatright @@ -278,7 +278,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "ManageNews.template.php" + "templates/ManageNews/" span.error "(already exists)" span.floatright @@ -286,7 +286,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "ManagePaid.template.php" + "templates/ManagePaid/" span.error "(already exists)" span.floatright @@ -302,7 +302,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "ManageScheduledTasks.template.php" + "templates/ManageScheduledTasks/" span.error "(already exists)" span.floatright @@ -310,7 +310,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "ManageSearch.template.php" + "templates/ManageSearch/" span.error "(already exists)" span.floatright @@ -318,7 +318,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "ManageSmileys.template.php" + "templates/ManageSmileys/" span.error "(already exists)" span.floatright @@ -326,7 +326,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Memberlist.template.php" + "templates/Memberlist/" span.error "(already exists)" span.floatright @@ -350,7 +350,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "MoveTopic.template.php" + "templates/MoveTopic/" span.error "(already exists)" span.floatright @@ -358,7 +358,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Notify.template.php" + "templates/Notify/" span.error "(already exists)" span.floatright @@ -366,7 +366,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Packages.template.php" + "templates/Packages/" span.error "(already exists)" span.floatright @@ -374,7 +374,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "PersonalMessage.template.php" + "templates/PersonalMessage/" span.error "(already exists)" span.floatright @@ -382,7 +382,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Poll.template.php" + "templates/Poll/" span.error "(already exists)" span.floatright @@ -390,7 +390,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Post.template.php" + "templates/Post/" span.error "(already exists)" span.floatright @@ -398,7 +398,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Printpage.template.php" + "templates/Printpage/" span.error "(already exists)" span.floatright @@ -414,7 +414,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Recent.template.php" + "templates/Recent/" span.error "(already exists)" span.floatright @@ -422,7 +422,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Register.template.php" + "templates/Register/" span.error "(already exists)" span.floatright @@ -430,7 +430,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Reminder.template.php" + "templates/Reminder/" span.error "(already exists)" span.floatright @@ -438,7 +438,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "ReportedContent.template.php" + "templates/ReportedContent/" span.error "(already exists)" span.floatright @@ -446,7 +446,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Reports.template.php" + "templates/Reports/" span.error "(already exists)" span.floatright @@ -454,7 +454,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "ReportToMod.template.php" + "templates/ReportToMod/" span.error "(already exists)" span.floatright @@ -462,7 +462,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Search.template.php" + "templates/Search/" span.error "(already exists)" span.floatright @@ -470,7 +470,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Settings.template.php" + "templates/Settings/" span.error "(already exists)" span.floatright @@ -478,7 +478,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "SplitTopics.template.php" + "templates/SplitTopics/" span.error "(already exists)" span.floatright @@ -494,7 +494,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Themes.template.php" + "templates/Themes/" span.error "(already exists)" span.floatright @@ -510,7 +510,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Who.template.php" + "templates/Who/" span.error "(already exists)" span.floatright From 05571ce2dd3fa3b549bfd386a2bdd0de1d5ca70d Mon Sep 17 00:00:00 2001 From: albertlast Date: Wed, 30 Sep 2026 18:23:34 +0200 Subject: [PATCH 15/20] Lets a template use another sub-template's output as a value Some template_*() functions return their HTML rather than output it, for a caller that needs a string: the quick buttons in 'return' mode, and the watched users list's callback. fetchSubTemplate() gets that string from either kind of sub-template, including what a function returns. Parameters are named for Plates templates. A function a mod provides may call its own something else, and named arguments it does not know would be an error, so a function whose parameters do not match gets them in order. Co-Authored-By: Claude Opus 5.5 Signed-off-by: albertlast --- Sources/TemplateEngine.php | 61 ++++++++++++++++++++++++++++++- tests/Unit/TemplateEngineTest.php | 51 +++++++++++++++++++++++++- 2 files changed, 109 insertions(+), 3 deletions(-) diff --git a/Sources/TemplateEngine.php b/Sources/TemplateEngine.php index 991840b9e03..65227db6df2 100644 --- a/Sources/TemplateEngine.php +++ b/Sources/TemplateEngine.php @@ -142,6 +142,7 @@ function (string $name, array $params = []): void { }, ); $this->engine->registerFunction('hasSubTemplate', $this->hasSubTemplate(...)); + $this->engine->registerFunction('fetchSubTemplate', $this->fetchSubTemplate(...)); } /** @@ -260,7 +261,7 @@ public function renderSubTemplate(string $name, array $params = []): bool } if (\is_callable('template_' . $name)) { - \call_user_func_array('template_' . $name, $params); + \call_user_func_array('template_' . $name, $this->argumentsFor('template_' . $name, $params)); return true; } @@ -268,6 +269,38 @@ public function renderSubTemplate(string $name, array $params = []): bool return false; } + /** + * Gets what a sub-template of any loaded template outputs, as a string. + * + * Some template_*() functions return their HTML rather than output it, + * for a caller that needs it as a value. What such a function returns + * is included along with anything it outputs, so a caller gets the same + * string whether the sub-template is a Plates template or a function. + * + * @param string $name The name of the sub-template, such as 'quickbuttons'. + * @param array $params Its parameters, as for renderSubTemplate(). + * @throws \Error if there is no such sub-template. + * @return string What it output, and what it returned if that was a string. + */ + public function fetchSubTemplate(string $name, array $params = []): string + { + $plates_template = $this->find($name); + + if ($plates_template !== null) { + return $this->render($plates_template, $params); + } + + if (!\is_callable('template_' . $name)) { + throw new \Error('Call to undefined sub-template ' . $name); + } + + ob_start(); + + $returned = \call_user_func_array('template_' . $name, $this->argumentsFor('template_' . $name, $params)); + + return ob_get_clean() . (\is_string($returned) ? $returned : ''); + } + /** * Checks whether any loaded template has a sub-template, of either kind. * @@ -301,4 +334,30 @@ public static function get(): self return self::$instance; } + + /****************** + * Internal methods + ******************/ + + /** + * Gets the arguments to call a template_*() function with. + * + * Parameters are named for the sake of Plates templates, but a function + * a mod or theme provides may call them something else. Named arguments + * it does not know would be an error, so those are passed in order. + * + * @param string $function The name of the function. + * @param array $params The parameters, named or in order. + * @return array The arguments. + */ + protected function argumentsFor(string $function, array $params): array + { + if (array_is_list($params)) { + return $params; + } + + $names = array_map(fn($param) => $param->getName(), (new \ReflectionFunction($function))->getParameters()); + + return array_diff(array_keys($params), $names) === [] ? $params : array_values($params); + } } diff --git a/tests/Unit/TemplateEngineTest.php b/tests/Unit/TemplateEngineTest.php index 2801901e3e4..f384d818549 100644 --- a/tests/Unit/TemplateEngineTest.php +++ b/tests/Unit/TemplateEngineTest.php @@ -269,6 +269,50 @@ public function testCallingAMissingSubTemplateIsAnError(): void $engine->render('Stats/main'); } + /** + * Some template_*() functions return their HTML for the caller to use, + * and a Plates template can only output it. Fetching gets the same string + * from either. + */ + public function testFetchingGetsTheOutputOfEitherKindAsAString(): void + { + $this->write($this->default, 'Stats/main.php', 'plates '); + $legacy = $this->write($this->default, '../Fetch.template.php', 'default]); + $engine->addLoaded('Fetch', $legacy); + $engine->addLoaded('Stats'); + + ob_start(); + $plates = $engine->fetchSubTemplate('main', ['n' => 1]); + $function = $engine->fetchSubTemplate('engine_test_returns', ['n' => 2]); + $leaked = ob_get_clean(); + + $this->assertSame('plates 1', $plates); + $this->assertSame('echoed returned 2', $function); + $this->assertSame('', $leaked, 'fetching output something'); + } + + /** + * A call through a name built at runtime names its parameters after the + * default theme's sub-templates, and a mod's function may call its own + * something else. + */ + public function testAFunctionWithOtherParameterNamesGetsThemInOrder(): void + { + $legacy = $this->write($this->default, '../Names.template.php', 'default]); + $engine->addLoaded('Names', $legacy); + + $this->assertSame('general!', $engine->fetchSubTemplate('engine_test_names', ['board' => ['name' => 'general']])); + $this->assertSame('general?', $engine->fetchSubTemplate('engine_test_names', ['b' => ['name' => 'general'], 'extra' => '?'])); + } + public function testRenderSubTemplateOutputsWhatItFinds(): void { $this->write($this->default, 'Stats/main.php', 'stats page'); @@ -315,7 +359,8 @@ protected function tearDown(): void } /** - * Writes a file into a theme's templates directory. + * Writes a file into a theme's templates directory, or, for a path that + * starts with ../, into the theme's template directory itself. * * @param string $theme_dir The theme's template directory. * @param string $file The file, relative to its templates directory. @@ -324,7 +369,9 @@ protected function tearDown(): void */ private function write(string $theme_dir, string $file, string $contents): string { - $path = $theme_dir . '/' . TemplateEngine::DIRECTORY . '/' . $file; + $path = str_starts_with($file, '../') + ? $theme_dir . '/' . substr($file, 3) + : $theme_dir . '/' . TemplateEngine::DIRECTORY . '/' . $file; if (!is_dir(\dirname($path))) { mkdir(\dirname($path), 0o777, true); From 3ce351c4f5f0d2fa95774c71cc45fae678c21f6d Mon Sep 17 00:00:00 2001 From: albertlast Date: Wed, 30 Sep 2026 18:23:34 +0200 Subject: [PATCH 16/20] Renders the board index, profile, admin and five more templates with Plates Admin, BoardIndex, EventEditor, ManagePermissions, MessageIndex, ModerationCenter and Profile, and TimeZoneSelect, which Admin, EventEditor and Profile call, converted the same way, and each byte for byte the same on every page the snapshot suite covers. Two places in Sources called a template function directly and now go through the engine: the watched users list's column callback, which needs the HTML as a string, and the inline permissions on settings pages. A template call used as a value, rather than as a statement of its own, now uses fetchSubTemplate(); the recent posts pages had four, which worked only because button_strip outputs as it goes. A call through a name built at runtime names its parameters after the sub-templates the name can reach. Co-Authored-By: Claude Opus 5.5 Signed-off-by: albertlast --- Sources/Actions/Admin/Permissions.php | 2 +- Sources/Actions/Moderation/WatchedUsers.php | 3 +- Themes/default/Admin.template.php | 1687 -------- Themes/default/BoardIndex.template.php | 543 --- Themes/default/EventEditor.template.php | 734 ---- Themes/default/ManagePermissions.template.php | 938 ----- Themes/default/MessageIndex.template.php | 431 -- Themes/default/ModerationCenter.template.php | 679 ---- Themes/default/Profile.template.php | 3460 ----------------- Themes/default/TimeZoneSelect.template.php | 87 - Themes/default/templates/Admin/admin.php | 130 + .../templates/Admin/admin_quick_search.php | 36 + .../templates/Admin/admin_search_results.php | 63 + .../Admin/callback_question_answer_list.php | 49 + .../Admin/clean_cache_button_above.php | 20 + .../Admin/clean_cache_button_below.php | 36 + Themes/default/templates/Admin/credits.php | 99 + .../default/templates/Admin/edit_censored.php | 95 + .../templates/Admin/edit_profile_field.php | 234 ++ Themes/default/templates/Admin/index.php | 8 + Themes/default/templates/Admin/not_done.php | 57 + Themes/default/templates/Admin/php_info.php | 76 + .../default/templates/Admin/repair_boards.php | 62 + .../templates/Admin/show_custom_profile.php | 32 + .../default/templates/Admin/show_settings.php | 178 + .../default/templates/Admin/view_versions.php | 294 ++ .../BoardIndex/bi_board_children.php | 44 + .../templates/BoardIndex/bi_board_icon.php | 28 + .../templates/BoardIndex/bi_board_info.php | 38 + .../BoardIndex/bi_board_lastpost.php | 26 + .../templates/BoardIndex/bi_board_list.php | 54 + .../templates/BoardIndex/bi_board_stats.php | 30 + .../templates/BoardIndex/bi_redirect_icon.php | 25 + .../BoardIndex/bi_redirect_stats.php | 30 + .../templates/BoardIndex/boardindex.php | 55 + .../BoardIndex/ic_block_calendar.php | 53 + .../templates/BoardIndex/ic_block_online.php | 49 + .../templates/BoardIndex/ic_block_recent.php | 65 + .../templates/BoardIndex/ic_block_stats.php | 40 + Themes/default/templates/BoardIndex/index.php | 8 + .../templates/BoardIndex/info_center.php | 74 + .../templates/BoardIndex/newsfader.php | 38 + .../templates/EventEditor/event_board.php | 66 + .../templates/EventEditor/event_link_to.php | 47 + .../templates/EventEditor/event_new.php | 75 + .../templates/EventEditor/event_options.php | 42 + .../templates/EventEditor/event_unlink.php | 34 + .../default/templates/EventEditor/index.php | 8 + .../templates/EventEditor/linked_events.php | 36 + .../EventEditor/occurrence_options.php | 40 + .../default/templates/EventEditor/rrule.php | 266 ++ .../templates/ManagePermissions/by_board.php | 80 + .../ManagePermissions/edit_profiles.php | 100 + .../templates/ManagePermissions/index.php | 8 + .../ManagePermissions/inline_permissions.php | 82 + .../ManagePermissions/modify_group.php | 69 + .../modify_group_display.php | 93 + .../ManagePermissions/permission_index.php | 220 ++ .../ManagePermissions/postmod_permissions.php | 171 + .../default/templates/MessageIndex/index.php | 8 + .../default/templates/MessageIndex/main.php | 237 ++ .../templates/MessageIndex/topic_legend.php | 64 + .../ModerationCenter/group_requests_block.php | 82 + .../templates/ModerationCenter/index.php | 8 + .../ModerationCenter/moderation_center.php | 29 + .../ModerationCenter/moderation_settings.php | 29 + .../templates/ModerationCenter/notes.php | 59 + .../ModerationCenter/reported_posts_block.php | 81 + .../ModerationCenter/reported_users_block.php | 81 + .../ModerationCenter/show_notice.php | 52 + .../ModerationCenter/unapproved_posts.php | 111 + .../user_watch_post_callback.php | 59 + .../ModerationCenter/warn_template.php | 132 + .../ModerationCenter/watched_users.php | 81 + .../templates/Profile/alert_configuration.php | 133 + .../Profile/alert_notifications_boards.php | 30 + .../Profile/alert_notifications_topics.php | 32 + .../templates/Profile/alerts_all_read.php | 23 + .../templates/Profile/alerts_popup.php | 61 + .../templates/Profile/deleteAccount.php | 119 + .../default/templates/Profile/editBuddies.php | 94 + .../templates/Profile/editIgnoreList.php | 92 + .../templates/Profile/edit_options.php | 94 + .../templates/Profile/error_message.php | 42 + .../templates/Profile/export_profile_data.php | 174 + .../templates/Profile/groupMembership.php | 104 + .../templates/Profile/ignoreboards.php | 62 + Themes/default/templates/Profile/index.php | 8 + .../templates/Profile/issueWarning.php | 114 + .../Profile/load_warning_variables.php | 34 + Themes/default/templates/Profile/max_size.php | 31 + .../templates/Profile/profile_above.php | 32 + .../Profile/profile_avatar_select.php | 125 + .../templates/Profile/profile_below.php | 20 + .../Profile/profile_group_manage.php | 61 + .../templates/Profile/profile_pm_settings.php | 75 + .../templates/Profile/profile_popup.php | 48 + .../templates/Profile/profile_save.php | 49 + .../Profile/profile_signature_modify.php | 59 + .../templates/Profile/profile_smiley_pick.php | 35 + .../default/templates/Profile/profile_tfa.php | 41 + .../templates/Profile/profile_theme_pick.php | 31 + .../Profile/profile_theme_settings.php | 60 + .../Profile/profile_timeformat_modify.php | 46 + .../templates/Profile/profile_timezone.php | 35 + .../default/templates/Profile/showAlerts.php | 73 + .../default/templates/Profile/showDrafts.php | 56 + .../templates/Profile/showPermissions.php | 106 + .../default/templates/Profile/showPosts.php | 75 + .../default/templates/Profile/statPanel.php | 116 + Themes/default/templates/Profile/summary.php | 316 ++ .../default/templates/Profile/tfadisable.php | 48 + Themes/default/templates/Profile/tfasetup.php | 84 + .../templates/Profile/tfasetup_backup.php | 33 + .../templates/Profile/trackActivity.php | 53 + Themes/default/templates/Profile/trackIP.php | 72 + .../default/templates/Profile/viewWarning.php | 55 + Themes/default/templates/Recent/replies.php | 4 +- Themes/default/templates/Recent/unread.php | 4 +- .../templates/Register/registration_form.php | 159 +- .../templates/TimeZoneSelect/index.php | 8 + .../TimeZoneSelect/timezone_select.php | 52 + .../Snapshot/snapshots/admin/themes_copy.txt | 16 +- 123 files changed, 7858 insertions(+), 8676 deletions(-) delete mode 100644 Themes/default/Admin.template.php delete mode 100644 Themes/default/BoardIndex.template.php delete mode 100644 Themes/default/EventEditor.template.php delete mode 100644 Themes/default/ManagePermissions.template.php delete mode 100644 Themes/default/MessageIndex.template.php delete mode 100644 Themes/default/ModerationCenter.template.php delete mode 100644 Themes/default/Profile.template.php delete mode 100644 Themes/default/TimeZoneSelect.template.php create mode 100644 Themes/default/templates/Admin/admin.php create mode 100644 Themes/default/templates/Admin/admin_quick_search.php create mode 100644 Themes/default/templates/Admin/admin_search_results.php create mode 100644 Themes/default/templates/Admin/callback_question_answer_list.php create mode 100644 Themes/default/templates/Admin/clean_cache_button_above.php create mode 100644 Themes/default/templates/Admin/clean_cache_button_below.php create mode 100644 Themes/default/templates/Admin/credits.php create mode 100644 Themes/default/templates/Admin/edit_censored.php create mode 100644 Themes/default/templates/Admin/edit_profile_field.php create mode 100644 Themes/default/templates/Admin/index.php create mode 100644 Themes/default/templates/Admin/not_done.php create mode 100644 Themes/default/templates/Admin/php_info.php create mode 100644 Themes/default/templates/Admin/repair_boards.php create mode 100644 Themes/default/templates/Admin/show_custom_profile.php create mode 100644 Themes/default/templates/Admin/show_settings.php create mode 100644 Themes/default/templates/Admin/view_versions.php create mode 100644 Themes/default/templates/BoardIndex/bi_board_children.php create mode 100644 Themes/default/templates/BoardIndex/bi_board_icon.php create mode 100644 Themes/default/templates/BoardIndex/bi_board_info.php create mode 100644 Themes/default/templates/BoardIndex/bi_board_lastpost.php create mode 100644 Themes/default/templates/BoardIndex/bi_board_list.php create mode 100644 Themes/default/templates/BoardIndex/bi_board_stats.php create mode 100644 Themes/default/templates/BoardIndex/bi_redirect_icon.php create mode 100644 Themes/default/templates/BoardIndex/bi_redirect_stats.php create mode 100644 Themes/default/templates/BoardIndex/boardindex.php create mode 100644 Themes/default/templates/BoardIndex/ic_block_calendar.php create mode 100644 Themes/default/templates/BoardIndex/ic_block_online.php create mode 100644 Themes/default/templates/BoardIndex/ic_block_recent.php create mode 100644 Themes/default/templates/BoardIndex/ic_block_stats.php create mode 100644 Themes/default/templates/BoardIndex/index.php create mode 100644 Themes/default/templates/BoardIndex/info_center.php create mode 100644 Themes/default/templates/BoardIndex/newsfader.php create mode 100644 Themes/default/templates/EventEditor/event_board.php create mode 100644 Themes/default/templates/EventEditor/event_link_to.php create mode 100644 Themes/default/templates/EventEditor/event_new.php create mode 100644 Themes/default/templates/EventEditor/event_options.php create mode 100644 Themes/default/templates/EventEditor/event_unlink.php create mode 100644 Themes/default/templates/EventEditor/index.php create mode 100644 Themes/default/templates/EventEditor/linked_events.php create mode 100644 Themes/default/templates/EventEditor/occurrence_options.php create mode 100644 Themes/default/templates/EventEditor/rrule.php create mode 100644 Themes/default/templates/ManagePermissions/by_board.php create mode 100644 Themes/default/templates/ManagePermissions/edit_profiles.php create mode 100644 Themes/default/templates/ManagePermissions/index.php create mode 100644 Themes/default/templates/ManagePermissions/inline_permissions.php create mode 100644 Themes/default/templates/ManagePermissions/modify_group.php create mode 100644 Themes/default/templates/ManagePermissions/modify_group_display.php create mode 100644 Themes/default/templates/ManagePermissions/permission_index.php create mode 100644 Themes/default/templates/ManagePermissions/postmod_permissions.php create mode 100644 Themes/default/templates/MessageIndex/index.php create mode 100644 Themes/default/templates/MessageIndex/main.php create mode 100644 Themes/default/templates/MessageIndex/topic_legend.php create mode 100644 Themes/default/templates/ModerationCenter/group_requests_block.php create mode 100644 Themes/default/templates/ModerationCenter/index.php create mode 100644 Themes/default/templates/ModerationCenter/moderation_center.php create mode 100644 Themes/default/templates/ModerationCenter/moderation_settings.php create mode 100644 Themes/default/templates/ModerationCenter/notes.php create mode 100644 Themes/default/templates/ModerationCenter/reported_posts_block.php create mode 100644 Themes/default/templates/ModerationCenter/reported_users_block.php create mode 100644 Themes/default/templates/ModerationCenter/show_notice.php create mode 100644 Themes/default/templates/ModerationCenter/unapproved_posts.php create mode 100644 Themes/default/templates/ModerationCenter/user_watch_post_callback.php create mode 100644 Themes/default/templates/ModerationCenter/warn_template.php create mode 100644 Themes/default/templates/ModerationCenter/watched_users.php create mode 100644 Themes/default/templates/Profile/alert_configuration.php create mode 100644 Themes/default/templates/Profile/alert_notifications_boards.php create mode 100644 Themes/default/templates/Profile/alert_notifications_topics.php create mode 100644 Themes/default/templates/Profile/alerts_all_read.php create mode 100644 Themes/default/templates/Profile/alerts_popup.php create mode 100644 Themes/default/templates/Profile/deleteAccount.php create mode 100644 Themes/default/templates/Profile/editBuddies.php create mode 100644 Themes/default/templates/Profile/editIgnoreList.php create mode 100644 Themes/default/templates/Profile/edit_options.php create mode 100644 Themes/default/templates/Profile/error_message.php create mode 100644 Themes/default/templates/Profile/export_profile_data.php create mode 100644 Themes/default/templates/Profile/groupMembership.php create mode 100644 Themes/default/templates/Profile/ignoreboards.php create mode 100644 Themes/default/templates/Profile/index.php create mode 100644 Themes/default/templates/Profile/issueWarning.php create mode 100644 Themes/default/templates/Profile/load_warning_variables.php create mode 100644 Themes/default/templates/Profile/max_size.php create mode 100644 Themes/default/templates/Profile/profile_above.php create mode 100644 Themes/default/templates/Profile/profile_avatar_select.php create mode 100644 Themes/default/templates/Profile/profile_below.php create mode 100644 Themes/default/templates/Profile/profile_group_manage.php create mode 100644 Themes/default/templates/Profile/profile_pm_settings.php create mode 100644 Themes/default/templates/Profile/profile_popup.php create mode 100644 Themes/default/templates/Profile/profile_save.php create mode 100644 Themes/default/templates/Profile/profile_signature_modify.php create mode 100644 Themes/default/templates/Profile/profile_smiley_pick.php create mode 100644 Themes/default/templates/Profile/profile_tfa.php create mode 100644 Themes/default/templates/Profile/profile_theme_pick.php create mode 100644 Themes/default/templates/Profile/profile_theme_settings.php create mode 100644 Themes/default/templates/Profile/profile_timeformat_modify.php create mode 100644 Themes/default/templates/Profile/profile_timezone.php create mode 100644 Themes/default/templates/Profile/showAlerts.php create mode 100644 Themes/default/templates/Profile/showDrafts.php create mode 100644 Themes/default/templates/Profile/showPermissions.php create mode 100644 Themes/default/templates/Profile/showPosts.php create mode 100644 Themes/default/templates/Profile/statPanel.php create mode 100644 Themes/default/templates/Profile/summary.php create mode 100644 Themes/default/templates/Profile/tfadisable.php create mode 100644 Themes/default/templates/Profile/tfasetup.php create mode 100644 Themes/default/templates/Profile/tfasetup_backup.php create mode 100644 Themes/default/templates/Profile/trackActivity.php create mode 100644 Themes/default/templates/Profile/trackIP.php create mode 100644 Themes/default/templates/Profile/viewWarning.php create mode 100644 Themes/default/templates/TimeZoneSelect/index.php create mode 100644 Themes/default/templates/TimeZoneSelect/timezone_select.php diff --git a/Sources/Actions/Admin/Permissions.php b/Sources/Actions/Admin/Permissions.php index 58a1128cdda..6648331a026 100644 --- a/Sources/Actions/Admin/Permissions.php +++ b/Sources/Actions/Admin/Permissions.php @@ -1082,7 +1082,7 @@ public static function theme_inline_permissions(string $permission): void Utils::$context['current_permission'] = $permission; Utils::$context['member_groups'] = Utils::$context[$permission]; - template_inline_permissions(); + Theme::loadSubTemplate('inline_permissions'); } /** diff --git a/Sources/Actions/Moderation/WatchedUsers.php b/Sources/Actions/Moderation/WatchedUsers.php index 5458c93adb6..3582b5d7f28 100644 --- a/Sources/Actions/Moderation/WatchedUsers.php +++ b/Sources/Actions/Moderation/WatchedUsers.php @@ -24,6 +24,7 @@ use SMF\Menu; use SMF\Msg; use SMF\Parser; +use SMF\TemplateEngine; use SMF\Theme; use SMF\Time; use SMF\User; @@ -229,7 +230,7 @@ public function execute(): void 'posts' => [ 'data' => [ 'function' => function ($post) { - return template_user_watch_post_callback($post); + return TemplateEngine::get()->fetchSubTemplate('user_watch_post_callback', ['post' => $post]); }, 'class' => 'unique', ], diff --git a/Themes/default/Admin.template.php b/Themes/default/Admin.template.php deleted file mode 100644 index bcb651fe190..00000000000 --- a/Themes/default/Admin.template.php +++ /dev/null @@ -1,1687 +0,0 @@ -'; - - echo ' -
'; - - // Display the "live news" from simplemachines.org. - echo ' -
-
-

- ', Lang::getTxt('live', file: 'Admin'), ' -

-
-
-
', Lang::getTxt('smf_news_cant_connect', file: 'Admin'), '
-
-
'; - - // Show the user version information from their server. - echo ' -
- -
-
- ', Lang::getTxt('support_versions', file: 'Admin'), ' -
    -
  • ', Lang::getTxt('support_versions_forum', ['version' => Utils::$context['forum_version']], file: 'Admin'), '
  • -
  • ', Lang::getTxt('support_versions_current', ['version' => '??'], file: 'Admin'), '
  • -
  • ', Utils::$context['can_admin'] ? '' . Lang::getTxt('version_check_more', file: 'Admin') . '' : '', '
  • -
'; - - // Display all the members who can administrate the forum. - echo ' -
- ', Lang::getTxt('administrators', ['list' => Lang::sentenceList(Utils::$context['administrators'])], file: 'Admin'); - - // If we have lots of admins... don't show them all. - if (!empty(Utils::$context['more_admins_link'])) { - echo ' - (', Utils::$context['more_admins_link'], ')'; - } - - echo ' -
-
-
-
'; - - foreach (Utils::$context[Utils::$context['admin_menu_name']]['sections'] as $area_id => $area) { - echo ' -
- ', $area['title'], ''; - - foreach ($area['areas'] as $item_id => $item) { - // No point showing the 'home' page here, we're already on it! - if ($area_id == 'forum' && $item_id == 'index') { - continue; - } - - $url = $item['url'] ?? Config::$scripturl . '?action=admin;area=' . $item_id . (!empty(Utils::$context[Utils::$context['admin_menu_name']]['extra_parameters']) ? Utils::$context[Utils::$context['admin_menu_name']]['extra_parameters'] : ''); - - if (!empty($item['icon_file'])) { - echo ' - ', $item['label'], ''; - } else { - echo ' - ', $item['label'], ''; - } - } - - echo ' -
'; - } - - // The below functions include all the scripts needed from the simplemachines.org site. The language and format are passed for internationalization. - if (empty(Config::$modSettings['disable_smf_js'])) { - echo ' - - '; - } - - // This sets the announcements and current versions themselves ;). - echo ' - '; -} - -/** - * Show some support information and credits to those who helped make this. - */ -function template_credits() -{ - // Show the user version information from their server. - echo ' -
-
-

- ', Lang::getTxt('support_title', file: 'Admin'), ' -

-
-
- - ', Lang::getTxt('support_versions', file: 'Admin'), ' -
    -
  • ', Lang::getTxt('support_versions_forum', ['version' => Utils::$context['forum_version']], file: 'Admin'), Utils::$context['can_admin'] ? ' ' . Lang::getTxt('version_check_more', file: 'Admin') . '' : '', '
  • -
  • ', Lang::getTxt('support_versions_current', ['version' => '??'], file: 'Admin'), '
  • -
'; - - // Display all the variables we have server information for. - foreach (Utils::$context['current_versions'] as $version) { - echo ' - ', $version['title'], ': - ', $version['version'], ''; - - // more details for this item, show them a link - if (Utils::$context['can_admin'] && isset($version['more'])) { - echo - ' ', Lang::getTxt('version_check_more', file: 'Admin'), ''; - } - echo ' -
'; - } - - echo ' -
'; - - // Point the admin to common support resources. - echo ' -
-

- ', Lang::getTxt('support_resources', file: 'Admin'), ' -

-
-
-

', Lang::getTxt('support_resources_p1', file: 'Admin'), '

-

', Lang::getTxt('support_resources_p2', file: 'Admin'), '

-
'; - - // The most important part - the credits :P. - echo ' -
-

- ', Lang::getTxt('admin_credits', file: 'Admin'), ' -

-
-
'; - - foreach (Utils::$context['credits'] as $section) { - if (isset($section['pretext'])) { - echo ' -

', $section['pretext'], '

-
'; - } - - echo ' -
'; - - foreach ($section['groups'] as $group) { - if (isset($group['title'])) { - echo ' -
- ', $group['title'], ' -
'; - } - - echo ' -
', implode(', ', $group['members']), '
'; - } - - echo ' -
'; - - if (isset($section['posttext'])) { - echo ' -
-

', $section['posttext'], '

'; - } - } - - echo ' -
-
'; - - // This makes all the support information available to the support script... - echo ' - - - '; - - // This sets the latest support stuff. - echo ' - '; -} - -/** - * Displays information about file versions installed, and compares them to current version. - */ -function template_view_versions() -{ - echo ' -
-

- ', Lang::getTxt('admin_version_check', file: 'Admin'), ' -

-
-
', Lang::getTxt('version_check_desc', file: 'Admin'), '
-
- - - - - - - - - '; - - // The current version of the core SMF package. - echo ' - - - - - '; - - // Now list all the root file versions, starting with the overall version (if all match!). - echo ' - - - - - - -
- ', Lang::getTxt('admin_smffile', file: 'Admin'), ' - - ', Lang::getTxt('dvc_your', file: 'Admin'), ' - - ', Lang::getTxt('dvc_current', file: 'Admin'), ' -
- ', Lang::getTxt('admin_smfpackage', file: 'Admin'), ' - - ', Utils::$context['forum_version'], ' - - ?? -
- ', Lang::getTxt('dvc_root', file: 'Admin'), ' - - ?? - - ?? -
- - - '; - - // Loop through every source file displaying its version - using javascript. - foreach (Utils::$context['root_versions'] as $filename => $version) { - echo ' - - - - - '; - } - - // Now list all the source file versions, starting with the overall version (if all match!). - echo ' - -
- ', $filename, ' - - ', $version, ' - - ?? -
- - - - - - - - -
- ', Lang::getTxt('dvc_sources', file: 'Admin'), ' - - ?? - - ?? -
- - - '; - - // Loop through every source file displaying its version - using javascript. - foreach (Utils::$context['file_versions'] as $filename => $version) { - echo ' - - - - - '; - } - - // Default template files. - echo ' - -
- ', $filename, ' - - ', $version, ' - - ?? -
- - - - - - - - - -
- ', Lang::getTxt('dvc_default', file: 'Admin'), ' - - ?? - - ?? -
- - - '; - - foreach (Utils::$context['default_template_versions'] as $filename => $version) { - echo ' - - - - - '; - } - - // Now the language files... - echo ' - -
- ', $filename, ' - - ', $version, ' - - ?? -
- - - - - - - - - -
- ', Lang::getTxt('dvc_languages', file: 'Admin'), ' - - ?? - - ?? -
- - - '; - - foreach (Utils::$context['default_language_versions'] as $language => $files) { - foreach ($files as $filename => $version) { - echo ' - - - - - '; - } - } - - echo ' - -
- ', $language, '/', $filename, ' - - ', $version, ' - - ?? -
'; - - // Display the version information for the currently selected theme - if it is not the default one. - if (!empty(Utils::$context['template_versions'])) { - echo ' - - - - - - - - -
- ', Lang::getTxt('dvc_templates', file: 'Admin'), ' - - ?? - - ?? -
- - - '; - - foreach (Utils::$context['template_versions'] as $filename => $version) { - echo ' - - - - - '; - } - - echo ' - -
- ', $filename, ' - - ', $version, ' - - ?? -
'; - } - - // Display the tasks files version. - if (!empty(Utils::$context['tasks_versions'])) { - echo ' - - - - - - - - -
- ', Lang::getTxt('dvc_tasks', file: 'Admin'), ' - - ?? - - ?? -
- - - '; - - foreach (Utils::$context['tasks_versions'] as $filename => $version) { - echo ' - - - - - '; - } - - echo ' - -
- ', $filename, ' - - ', $version, ' - - ?? -
'; - } - - echo ' -
'; - - /* Below is the hefty javascript for this. Upon opening the page it checks the current file versions with ones - held at simplemachines.org and works out if they are up to date. If they aren't it colors that files number - red. It also contains the function, swapOption, that toggles showing the detailed information for each of the - file categories. (sources, languages, and templates.) */ - echo ' - - '; - -} - -/** - * Form for stopping people using naughty words, etc. - */ -function template_edit_censored() -{ - if (!empty(Utils::$context['saved_successful'])) { - echo ' -
', Lang::getTxt('settings_saved', file: 'Admin'), '
'; - } - - // First section is for adding/removing words from the censored list. - echo ' -
-
-

- ', Lang::getTxt('admin_censored_words', file: 'Admin'), ' -

-
-
-

', Lang::getTxt('admin_censored_where', file: 'Admin'), '

'; - - // Show text boxes for censoring [bad ] => [good ]. - foreach (Utils::$context['censored_words'] as $vulgar => $proper) { - echo ' -
- => -
'; - } - - // Now provide a way to censor more words. - echo ' -
- => -
-
- - -
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- - -
- ', Lang::getTxt('spoofdetector_censor_desc', file: 'Admin'), ' - -
-
- -
-
- -
'; - - // This table lets you test out your filters by typing in rude words and seeing what comes out. - echo ' -
-

- ', Lang::getTxt('censor_test', file: 'Admin'), ' -

-
-
-

- - -

-
- - - -
'; -} - -/** - * This is the page shown when we've temporarily paused things such as during maintenance tasks, sending newsletters, etc. - */ -function template_not_done() -{ - echo ' -
-

- ', Lang::getTxt('not_done_title', file: 'Admin'), ' -

-
-
- ', Lang::getTxt('not_done_reason', file: 'Admin'); - - if (!empty(Utils::$context['continue_percent'])) { - echo ' -
- ', Utils::$context['continue_percent'], '% -
-
'; - } - - if (!empty(Utils::$context['substep_enabled'])) { - echo ' -
- ', Utils::$context['substep_title'], ' (', Utils::$context['substep_continue_percent'], '%) -
-
'; - } - - echo ' -
'; - - // Do we have a token? - if (isset(Utils::$context['not_done_token'], Utils::$context[Utils::$context['not_done_token'] . '_token'],Utils::$context[Utils::$context['not_done_token'] . '_token_var'])) { - echo ' - '; - } - - echo ' - - ', Utils::$context['continue_post_data'], ' -
-
- '; -} - -/** - * Template for showing settings (Of any kind really!) - */ -function template_show_settings() -{ - if (!empty(Utils::$context['saved_successful'])) { - echo ' -
', Lang::getTxt('settings_saved', file: 'Admin'), '
'; - } elseif (!empty(Utils::$context['saved_failed'])) { - echo ' -
', Lang::getTxt('settings_not_saved', ['reason' => Utils::$context['saved_failed']], file: 'Admin'), '
'; - } - - if (!empty(Utils::$context['settings_pre_javascript'])) { - echo ' - '; - } - - if (!empty(Utils::$context['settings_insert_above'])) { - echo Utils::$context['settings_insert_above']; - } - - echo ' -
'; - - // Is there a custom title? - if (isset(Utils::$context['settings_title'])) { - echo ' -
-

', Utils::$context['settings_title'], '

-
'; - } - - // Have we got a message to display? - if (!empty(Utils::$context['settings_message'])) { - $tag = !empty(Utils::$context['settings_message']['tag']) ? Utils::$context['settings_message']['tag'] : 'span'; - - echo ' -
'; - - if (is_array(Utils::$context['settings_message'])) { - echo ' - <', $tag, !empty(Utils::$context['settings_message']['class']) ? ' class="' . Utils::$context['settings_message']['class'] . '"' : '', '> - ', Utils::$context['settings_message']['label'], ' - '; - } else { - echo Utils::$context['settings_message']; - } - - echo ' -
'; - } - - // Filter out any redundant separators before we start the loop - Utils::$context['config_vars'] = array_filter( - Utils::$context['config_vars'], - function ($v) { - static $config_vars, $prev; - - $at_start = is_null($config_vars); - $config_vars = $at_start ? Utils::$context['config_vars'] : $config_vars; - - $next = next($config_vars); - $at_end = key($config_vars) === null; - - if (!$at_start && !$at_end) { - $div_types = ['title', 'desc']; - $at_start = isset($prev['type']) && in_array($prev['type'], $div_types); - $at_end = isset($next['type']) && in_array($next['type'], $div_types); - } - - $prev = $v; - - return ($v === '' && ($at_start || $at_end || $v === $next)) ? false : true; - }, - ); - - // Now actually loop through all the variables. - $is_open = false; - - foreach (Utils::$context['config_vars'] as $config_var) { - // Is it a title or a description? - if (is_array($config_var) && ($config_var['type'] == 'title' || $config_var['type'] == 'desc')) { - // Not a list yet? - if ($is_open) { - $is_open = false; - echo ' - - '; - } - - // A title? - if ($config_var['type'] == 'title') { - echo ' -
-

- ', ($config_var['help'] ? '' : ''), ' - ', $config_var['label'], ' -

-
'; - } - // A description? - else { - echo ' -
- ', $config_var['label'], ' -
'; - } - - continue; - } - - // Not a list yet? - if (!$is_open) { - $is_open = true; - echo ' -
-
'; - } - - // Hang about? Are you pulling my leg - a callback?! - if (is_array($config_var) && $config_var['type'] == 'callback') { - if (function_exists('template_callback_' . $config_var['name'])) { - call_user_func('template_callback_' . $config_var['name']); - } - - continue; - } - - if (is_array($config_var)) { - // First off, is this a span like a message? - if (in_array($config_var['type'], ['message', 'warning'])) { - echo ' - - ', $config_var['label'], ' - '; - } - // Otherwise it's an input box of some kind. - else { - echo ' - '; - - // Some quick helpers... - $javascript = $config_var['javascript']; - $disabled = !empty($config_var['disabled']) ? ' disabled' : ''; - $subtext = !empty($config_var['subtext']) ? '
' . $config_var['subtext'] . '' : ''; - $placeholder = !empty($config_var['placeholder']) ? ' placeholder="' . $config_var['placeholder'] . '"' : ''; - - // Various HTML5 input types that are basically enhanced textboxes - $text_types = ['color', 'date', 'datetime', 'datetime-local', 'email', 'month', 'time']; - - // Show the [?] button. - if ($config_var['help']) { - echo ' - '; - } - - echo ' - ', $config_var['label'], '', $subtext, ($config_var['type'] == 'password' ? '
' . Lang::getTxt('admin_confirm_password', file: 'Admin') . '' : ''), ' - - ', - $config_var['preinput']; - - // Show a check box. - if ($config_var['type'] == 'check') { - echo ' - '; - } - // Escape (via htmlspecialchars.) the text box. - elseif ($config_var['type'] == 'password') { - echo ' -
- '; - } - // Show a selection box. - elseif ($config_var['type'] == 'select') { - if ($config_var['name'] === 'default_timezone') { - template_timezone_select($config_var['name'], $config_var['value'] ?? '', (int) $disabled); - } else { - echo ' - '; - } - } - - // Show a color box - elseif ($config_var['type'] == 'color') { - echo ' - '; - } - - // List of boards? This requires getBoardList() having been run and the results in Utils::$context['board_list']. - elseif ($config_var['type'] == 'boards') { - $first = true; - echo ' - [ ', Lang::getTxt('select_boards_from_list', file: 'ManageSettings'), ' ] -
- - ', Lang::getTxt('select_boards_from_list', file: 'ManageSettings'), ' - '; - - foreach (Utils::$context['board_list'] as $id_cat => $cat) { - if (!$first) { - echo ' -
'; - } - echo ' - ', $cat['name'], ' -
    '; - - foreach ($cat['boards'] as $id_board => $brd) { - echo ' -
  • '; - } - - echo ' -
'; - $first = false; - } - echo ' -
- - ', Lang::getTxt('check_all', file: 'General'), ' -
'; - } - // Text area? - elseif ($config_var['type'] == 'large_text') { - echo ' - '; - } - // Permission group? - elseif ($config_var['type'] == 'permissions') { - Permissions::theme_inline_permissions($config_var['name']); - } - - // BBC selection? - elseif ($config_var['type'] == 'bbc') { - echo ' -
- ', Utils::$context['bbc_sections'][$config_var['name']]['title'], ' -
    '; - - foreach (Utils::$context['bbc_sections'][$config_var['name']]['columns'] as $bbcColumn) { - foreach ($bbcColumn as $bbcTag) { - echo ' -
  • - ', $bbcTag['show_help'] ? ' ' : '', ' -
  • '; - } - } - echo '
- -
'; - } - // A simple message? - elseif ($config_var['type'] == 'var_message') { - echo ' - - ', $config_var['var_message'], ' -
'; - } - // Assume it must be a text box - else { - // Figure out the exact type - use "number" for "float" and "int". - $type = in_array($config_var['type'], $text_types) ? $config_var['type'] : ($config_var['type'] == 'int' || $config_var['type'] == 'float' ? 'number' : 'text'); - - // Extra options for float/int values - how much to decrease/increase by, the min value and the max value - // The step - only set if incrementing by something other than 1 for int or 0.1 for float - $step = isset($config_var['step']) ? ' step="' . $config_var['step'] . '"' : ($config_var['type'] == 'float' ? ' step="0.1"' : ''); - - // Minimum allowed value for this setting. SMF forces a default of 0 if not specified in the settings - $min = isset($config_var['min']) ? ' min="' . $config_var['min'] . '"' : ''; - - // Maximum allowed value for this setting. - $max = isset($config_var['max']) ? ' max="' . $config_var['max'] . '"' : ''; - - // Some input fields allow multiple. - $multiple = $type === 'email' && (!empty($config_var['multiple']) ? ' multiple' : ''); - - echo ' - '; - } - - echo isset($config_var['postinput']) ? ' - ' . $config_var['postinput'] : '', ' - '; - } - } else { - // Just show a separator. - if ($config_var == '') { - echo ' - -
-
'; - } else { - echo ' -
- ' . $config_var . ' -
-
'; - } - } - } - - if ($is_open) { - echo ' -
'; - } - - if (empty(Utils::$context['settings_save_dont_show'])) { - echo ' - '; - } - - if ($is_open) { - echo ' - '; - } - - // At least one token has to be used! - if (isset(Utils::$context['admin-ssc_token'])) { - echo ' - '; - } - - if (isset(Utils::$context['admin-dbsc_token'])) { - echo ' - '; - } - - if (isset(Utils::$context['admin-mp_token'])) { - echo ' - '; - } - - echo ' - -
'; - - if (!empty(Utils::$context['settings_post_javascript'])) { - echo ' - '; - } - - if (!empty(Utils::$context['settings_insert_below'])) { - echo Utils::$context['settings_insert_below']; - } - - // We may have added a board listing. If we did, we need to make it work. - Theme::addInlineJavascript(' - $("legend.board_selector").closest("fieldset").hide(); - $("a.board_selector").click(function(e) { - e.preventDefault(); - $(this).hide().next("fieldset").show(); - }); - $("fieldset legend.board_selector a").click(function(e) { - e.preventDefault(); - $(this).closest("fieldset").hide().prev("a").show(); - }); - ', true); -} - -/** - * Template for showing custom profile fields. - */ -function template_show_custom_profile() -{ - if (!empty(Utils::$context['saved_successful'])) { - echo ' -
', Lang::getTxt('settings_saved', file: 'Admin'), '
'; - } - - // Standard fields. - template_show_list('standard_profile_fields'); - - echo ' - -
'; - - // Custom fields. - template_show_list('custom_profile_fields'); -} - -/** - * Template for editing a custom profile field - */ -function template_edit_profile_field() -{ - // All the javascript for this page - quite a bit in script.js! - echo ' - '; - - // any errors messages to show? - if (isset($_GET['msg'])) { - if (Lang::txtExists('custom_option_' . $_GET['msg'], file: 'Errors')) { - echo ' -
', - Lang::getTxt('custom_option_' . $_GET['msg'], file: 'Errors'), ' -
'; - } - } - - echo ' -
-
-

', Utils::$context['page_title'], '

-
-
-
- ', Lang::getTxt('custom_edit_general', file: 'ManageSettings'), ' - -
-
- -
- ', Lang::getTxt('custom_edit_name_desc', file: 'ManageSettings'), ' -
-
- -
-
- - - -
- ', Lang::getTxt('custom_edit_name_desc', file: 'ManageSettings'), ' -
-
- -
-
-
- ', Lang::getTxt('custom_edit_profile_desc', file: 'ManageSettings'), ' -
-
- -
-
- - -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
- ', Lang::getTxt('custom_edit_enclose_desc', file: 'ManageSettings'), ' -
-
- -
-
-
-
- ', Lang::getTxt('custom_edit_input', file: 'ManageSettings'), ' -
-
- -
-
- -
-
-
- ', Lang::getTxt('custom_edit_max_length_desc', file: 'ManageSettings'), ' -
-
- -
-
- -
-
- ', Lang::getTxt('custom_edit_dimension_row', file: 'ManageSettings'), ' - ', Lang::getTxt('custom_edit_dimension_col', file: 'ManageSettings'), ' -
-
- -
-
- -
-
- -
- ', Lang::getTxt('custom_edit_options_desc', file: 'ManageSettings'), ' -
- ', Lang::getTxt('custom_edit_name_desc', file: 'ManageSettings'), ' -
-
'; - - foreach (Utils::$context['field']['options'] as $k => $option) { - echo ' - ', $k == 0 ? '' : '
', ''; - } - - echo ' - - [', Lang::getTxt('custom_edit_options_more', file: 'ManageSettings'), '] -
-
- -
-
- -
-
-
-
- ', Lang::getTxt('custom_edit_advanced', file: 'ManageSettings'), ' -
-
- -
- ', Lang::getTxt('custom_edit_mask_desc', file: 'ManageSettings'), ' -
-
- -
- - - -
-
-
- ', Lang::getTxt('custom_edit_privacy_desc', file: 'ManageSettings'), ' -
-
- -
-
-
- ', Lang::getTxt('custom_edit_can_search_desc', file: 'ManageSettings'), ' -
-
- -
-
-
- ', Lang::getTxt('custom_edit_active_desc', file: 'ManageSettings'), ' -
-
- -
-
-
- '; - - if (Utils::$context['fid']) { - echo ' - '; - } - - echo ' -
- - -
'; - - // Get the javascript bits right! - echo ' - '; -} - -/** - * Results page for an admin search. - */ -function template_admin_search_results() -{ - echo ' -
-

- - ', Lang::getTxt('admin_search_results_desc', Utils::$context, file: 'Admin'), ' - -

- ', template_admin_quick_search(), ' -
-
'; - - if (empty(Utils::$context['search_results'])) { - echo ' -

- ', Lang::getTxt('admin_search_results_none', file: 'Admin'), ' -

'; - } else { - echo ' -
    '; - - foreach (Utils::$context['search_results'] as $result) { - // Is it a result from the online manual? - if (Utils::$context['search_type'] == 'online') { - echo ' -
  1. -

    - ', $result['title'], ' -

    -

    - ', $result['snippet'], ' -

    -
  2. '; - } - // Otherwise it's... not! - else { - echo ' -
  3. - ', $result['name'], ' [', Lang::txtExists('admin_search_section_' . $result['type'], file: 'Admin') ? Lang::getTxt('admin_search_section_' . $result['type'], file: 'Admin') : $result['type'], ']'; - - if ($result['help']) { - echo ' -

    ', $result['help'], '

    '; - } - - echo ' -
  4. '; - } - } - echo ' -
'; - } - - echo ' -
'; -} - -/** - * This little beauty shows questions and answer from the captcha type feature. - */ -function template_callback_question_answer_list() -{ - foreach (Utils::$context['languages'] as $lang_id => $lang) { - $lang_id = strtr($lang_id, ['-utf8' => '']); - $lang['name'] = strtr($lang['name'], ['-utf8' => '']); - - echo ' - -
- ', $lang['name'], ' -
-
- ', Lang::getTxt('setup_verification_question', file: 'ManageSettings'), ' -
-
- ', Lang::getTxt('setup_verification_answer', file: 'ManageSettings'), ' -
'; - - if (!empty(Utils::$context['qa_by_lang'][$lang_id])) { - foreach (Utils::$context['qa_by_lang'][$lang_id] as $q_id) { - $question = Utils::$context['question_answers'][$q_id]; - - echo ' -
- -
-
'; - - foreach ($question['answers'] as $answer) { - echo ' - '; - } - - echo ' - -
'; - } - } - - echo ' -
[ ', Lang::getTxt('setup_verification_add_more', file: 'ManageSettings'), ' ]
-
-
'; - } -} - -/** - * Repairing boards. - */ -function template_repair_boards() -{ - echo ' -
-

', - Utils::$context['error_search'] ? Lang::getTxt('errors_list', file: 'Admin') : Lang::getTxt('errors_fixing', file: 'Admin'), ' -

-
-
'; - - // Are we actually fixing them, or is this just a prompt? - if (Utils::$context['error_search']) { - if (!empty(Utils::$context['to_fix'])) { - echo ' - ', Lang::getTxt('errors_found', file: 'Admin'), ' -
    '; - - foreach (Utils::$context['repair_errors'] as $error) { - echo ' -
  • - ', $error, ' -
  • '; - } - - echo ' -
-

- ', Lang::getTxt('errors_fix', file: 'Admin'), ' -

-

- ', Lang::getTxt('yes', file: 'General'), ' - ', Lang::getTxt('no', file: 'General'), ' -

'; - } else { - echo ' -

', Lang::getTxt('maintain_no_errors', file: 'Admin'), '

-

- ', Lang::getTxt('maintain_return', file: 'ManageMaintenance'), ' -

'; - } - } else { - if (!empty(Utils::$context['redirect_to_recount'])) { - echo ' -

- ', Lang::getTxt('errors_do_recount', file: 'Admin'), ' -

-
- - - -
'; - } else { - echo ' -

', Lang::getTxt('errors_fixed', file: 'Admin'), '

-

- ', Lang::getTxt('maintain_return', file: 'ManageMaintenance'), ' -

'; - } - } - - echo ' -
'; - - if (!empty(Utils::$context['redirect_to_recount'])) { - echo ' - '; - } -} - -/** - * Retrieves info from the php_info function, scrubs and preps it for display - */ -function template_php_info() -{ - echo ' -
-
-

- ', Lang::getTxt('phpinfo_settings', file: 'Admin'), ' -

-
'; - - // for each php info area - foreach (Utils::$context['pinfo'] as $area => $php_area) { - echo ' - - - - - - - - - '; - - $localmaster = true; - - // and for each setting in this category - foreach ($php_area as $key => $setting) { - // start of a local / master setting (3 col) - if (is_array($setting)) { - if ($localmaster) { - // heading row for the settings section of this category's settings - echo ' - - - - - '; - - $localmaster = false; - } - - echo ' - - '; - - foreach ($setting as $key_lm => $value) { - echo ' - '; - } - - echo ' - '; - } - // just a single setting (2 col) - else { - echo ' - - - - '; - } - } - echo ' - -
', $area, '
', Lang::getTxt('phpinfo_itemsettings', file: 'Admin'), '', Lang::getTxt('phpinfo_localsettings', file: 'Admin'), '', Lang::getTxt('phpinfo_defaultsettings', file: 'Admin'), '
', $key, '', $value, '
', $key, '', str_replace(',', ', ', $setting), '
-
'; - } - - echo ' -
'; -} - -/** - * Content shown above the clean cache button - */ -function template_clean_cache_button_above() {} - -/** - * Content shown below the clean cache button? - */ -function template_clean_cache_button_below() -{ - echo ' -
-

', Lang::getTxt('maintain_cache', file: 'ManageMaintenance'), '

-
-
-
-

', Lang::getTxt('maintain_cache_info', file: 'ManageMaintenance'), '

- - - -
-
'; -} - -/** - * This shows the admin search form - */ -function template_admin_quick_search() -{ - if (User::$me->is_admin) { - echo ' - '; - } -} diff --git a/Themes/default/BoardIndex.template.php b/Themes/default/BoardIndex.template.php deleted file mode 100644 index 43f5d6c8331..00000000000 --- a/Themes/default/BoardIndex.template.php +++ /dev/null @@ -1,543 +0,0 @@ -settings['show_newsfader']) && !empty(Utils::$context['news_lines'])) { - echo ' -
    '; - - foreach (Utils::$context['news_lines'] as $news) { - echo ' -
  • ', $news, '
  • '; - } - - echo ' -
- '; - } -} - -/** - * This actually displays the board index - */ -function template_boardindex() -{ - echo ' -
'; - - /* Each category in categories is made up of: - id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?), - new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image), - and boards. (see below.) */ - foreach (Utils::$context['categories'] as $category) { - // If there's no parent boards we can see, avoid showing an empty category (unless its collapsed) - if (empty($category['boards']) && !$category['is_collapsed']) { - continue; - } - - echo ' -
-
-

- ', $category['link'], ' -

'; - - // If this category even can collapse, show a link to collapse it. - if ($category['can_collapse']) { - echo ' - '; - } - - echo !empty($category['description']) ? ' -
' . $category['description'] . '
' : '', ' -
- -
'; - } - - echo ' -
'; - - // Show the mark all as read button? - if (!User::$me->is_guest && !empty(Utils::$context['categories'])) { - echo ' -
- ', template_button_strip(Utils::$context['mark_read_button'], 'right'), ' -
'; - } -} - -/** - * Outputs a list of boards, each one drawn by the template_bi_* helpers below. - * - * The board index calls this once per category, and the message index calls it - * for the child boards of the board being viewed. Both used to carry their own - * copy of this loop. - * - * Each board has: new (is it new?), id, name, description, moderators (see - * below), link_moderators (just a list.), children (see below.), link_children - * (easier to use.), children_new (are they new?), topics (# of), posts (# of), - * link, href, and last_post. (see below.) - * - * @param array $boards The boards to draw, in the order they go in. - */ -function template_bi_board_list(array $boards): void -{ - foreach ($boards as $board) { - echo ' -
-
- ', function_exists('template_bi_' . $board['type'] . '_icon') ? call_user_func('template_bi_' . $board['type'] . '_icon', $board) : template_bi_board_icon($board), ' -
-
- ', function_exists('template_bi_' . $board['type'] . '_info') ? call_user_func('template_bi_' . $board['type'] . '_info', $board) : template_bi_board_info($board), ' -
'; - - // Show some basic information about the number of posts, etc. - echo ' -
- ', function_exists('template_bi_' . $board['type'] . '_stats') ? call_user_func('template_bi_' . $board['type'] . '_stats', $board) : template_bi_board_stats($board), ' -
'; - - // Show the last post if there is one. - echo ' -
- ', function_exists('template_bi_' . $board['type'] . '_lastpost') ? call_user_func('template_bi_' . $board['type'] . '_lastpost', $board) : template_bi_board_lastpost($board), ' -
'; - - // Won't somebody think of the children! - if (function_exists('template_bi_' . $board['type'] . '_children')) { - call_user_func('template_bi_' . $board['type'] . '_children', $board); - } else { - template_bi_board_children($board); - } - - echo ' -
'; - } -} - -/** - * Outputs the board icon for a standard board. - * - * @param array $board Current board information. - */ -function template_bi_board_icon($board) -{ - echo ' - '; -} - -/** - * Outputs the board icon for a redirect. - * - * @param array $board Current board information. - */ -function template_bi_redirect_icon($board) -{ - echo ' - '; -} - -/** - * Outputs the board info for a standard board or redirect. - * - * @param array $board Current board information. - */ -function template_bi_board_info($board) -{ - echo ' - - ', $board['name'], ' - '; - - // Has it outstanding posts for approval? - if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) { - echo ' - !'; - } - - echo ' -
', $board['description'], '
'; - - // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) - if (!empty($board['link_moderators'])) { - echo ' -

', Lang::getTxt('moderators_list', ['num' => count($board['link_moderators']), 'list' => Lang::sentenceList($board['link_moderators'])], file: 'General'), '

'; - } -} - -/** - * Outputs the board stats for a standard board. - * - * @param array $board Current board information. - */ -function template_bi_board_stats($board) -{ - echo ' -

- ', Lang::getTxt('number_of_posts', [$board->posts], file: 'General'), '
', Lang::getTxt('number_of_topics', [$board->topics], file: 'General'), ' -

'; -} - -/** - * Outputs the board stats for a redirect. - * - * @param array $board Current board information. - */ -function template_bi_redirect_stats($board) -{ - echo ' -

- ', Lang::getTxt('number_of_redirects', [$board->posts], file: 'General'), ' -

'; -} - -/** - * Outputs the board lastposts for a standard board or a redirect. - * When on a mobile device, this may be hidden if no last post exists. - * - * @param array $board Current board information. - */ -function template_bi_board_lastpost($board) -{ - if (!empty($board['last_post']['id'])) { - echo ' -

', $board['last_post']['last_post_message'], '

'; - } -} - -/** - * Outputs the board children for a standard board. - * - * @param array $board Current board information. - */ -function template_bi_board_children($board) -{ - // Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...) - if (!empty($board['children'])) { - // Sort the links into an array with new boards bold so it can be imploded. - $children = []; - - /* Each child in each board's children has: - id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */ - foreach ($board['children'] as $child) { - if (!$child['is_redirect']) { - $child['link'] = '' . ($child['new'] ? '' . Lang::getTxt('new', file: 'General') . ' ' : '') . '' . $child['name'] . ''; - } else { - $child['link'] = '' . $child['name'] . ''; - } - - // Has it posts awaiting approval? - if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics'])) { - $child['link'] .= ' !'; - } - - $children[] = $child['new'] ? '' . $child['link'] . '' : '' . $child['link'] . ''; - } - - echo ' -
-

', - Lang::getTxt( - 'sub_boards_list', - [ - 'id' => 'child_list_' . $board['id'], - 'num' => count($children), - 'list' => implode(' ', $children), - ], - file: 'General', - ), - '

-
'; - } -} - -/** - * Displays the info center - */ -function template_info_center() -{ - if (empty(Utils::$context['info_center'])) { - return; - } - - // Here's where the "Info Center" starts... - echo ' -
- -
options['collapse_header_ic']) ? '' : ' style="display: none;"', '>'; - - foreach (Utils::$context['info_center'] as $block) { - $func = 'template_ic_block_' . $block['tpl']; - $func(); - } - - echo ' -
-
'; - - // Info center collapse object. - echo ' - '; -} - -/** - * The recent posts section of the info center - */ -function template_ic_block_recent() -{ - // This is the "Recent Posts" bar. - echo ' - -
'; - - // Only show one post. - if (Theme::$current->settings['number_recent_posts'] == 1) { - // latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.) - echo ' -

- ', Lang::getTxt('recent_view', file: 'General'), ' ', Lang::getTxt('is_recent_updated', ['link' => '"' . Utils::$context['latest_post']['link'] . '"'], file: 'General'), ' (', Utils::$context['latest_post']['time'], ')
-

'; - } - // Show lots of posts. - elseif (!empty(Utils::$context['latest_posts'])) { - echo ' - - - - - - - '; - - /* Each post in latest_posts has: - board (with an id, name, and link.), topic (the topic's id.), member (with id, name, and link.), - subject, short_subject (shortened with...), time, link, and href. */ - foreach (Utils::$context['latest_posts'] as $post) { - echo ' - - - - - - '; - } - echo ' -
', Lang::getTxt('message', file: 'General'), '', Lang::getTxt('author', file: 'General'), '', Lang::getTxt('board', file: 'General'), '', Lang::getTxt('date', file: 'General'), '
', $post['link'], '', $post['member']['link'], '', $post['board']['link'], '', $post['time'], '
'; - } - echo ' -
'; -} - -/** - * The calendar section of the info center - */ -function template_ic_block_calendar() -{ - // Show information about events, birthdays, and holidays on the calendar. - echo ' - '; - - // Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P - if (!empty(Utils::$context['calendar_holidays'])) { - $holidays = []; - - foreach (Utils::$context['calendar_holidays'] as $holiday) { - $holidays[] = $holiday->title . (!empty($holiday->location) ? ' (' . $holiday->location . ')' : ''); - } - - echo ' -

- ', Lang::getTxt('calendar_prompt', file: 'Calendar'), ' ', implode(', ', $holidays), ' -

'; - } - - // People's birthdays. Like mine. And yours, I guess. Kidding. - if (!empty(Utils::$context['calendar_birthdays'])) { - echo ' -

- ', Lang::getTxt(Utils::$context['calendar_only_today'] ? 'birthdays' : 'birthdays_upcoming', file: 'Calendar'), ''; - - // Each member in calendar_birthdays has: id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) - foreach (Utils::$context['calendar_birthdays'] as $bday) { - echo ' - ', $bday->is_today ? '' : '', $bday->name, $bday->is_today ? '' : '', isset($bday->age) ? ' (' . $bday->age . ')' : '', '', $bday->is_last ? '' : ', '; - } - - echo ' -

'; - } - - // Events like community get-togethers. - if (!empty(Utils::$context['calendar_events'])) { - echo ' -

- ', Lang::getTxt(Utils::$context['calendar_only_today'] ? 'events' : 'events_upcoming', file: 'Calendar'), ' '; - - // Each event in calendar_events should have: - // title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. - foreach (Utils::$context['calendar_events'] as $event) { - echo ' - ', $event->can_edit ? ' ' : '', $event->href == '' ? '' : '', $event->is_today ? '' . $event->title . '' : $event->title, $event->href == '' ? '' : '', $event->is_last ? '
' : ', '; - } - - echo ' -

'; - } -} - -/** - * The stats section of the info center - */ -function template_ic_block_stats() -{ - // Show statistical style information... - echo ' - -

- ', Utils::$context['common_stats']['boardindex_total_posts'], !empty(Theme::$current->settings['show_latest_member']) ? ' - ' . Lang::getTxt('latest_member', file: 'General') . ': ' . Utils::$context['common_stats']['latest_member']['link'] . '' : '', '
- ', (!empty(Utils::$context['latest_post']) ? Lang::getTxt('latest_post', file: 'General') . ': "' . Utils::$context['latest_post']['link'] . '" (' . Utils::$context['latest_post']['time'] . ')
' : ''), ' - ', Lang::getTxt('recent_view', file: 'General'), ' -

'; -} - -/** - * The who's online section of the info center - */ -function template_ic_block_online() -{ - // "Users online" - in order of activity. - echo ' - -

- ', Utils::$context['show_who'] ? '' : '', '', Lang::getTxt('online', file: 'General'), ': ', empty(Config::$modSettings['no_guest_logging']) ? Lang::getTxt('number_of_guests', [Utils::$context['num_guests']], file: 'General') . ', ' : '', Lang::getTxt('number_of_members', [Utils::$context['num_users_online']], file: 'General'); - - // Handle hidden users and buddies. - $bracketList = []; - - if (Utils::$context['show_buddies']) { - $bracketList[] = Lang::getTxt('number_of_buddies', [Utils::$context['num_buddies']], file: 'General'); - } - - if (!empty(Utils::$context['num_spiders'])) { - $bracketList[] = Lang::getTxt('number_of_spiders', [Utils::$context['num_spiders']], file: 'General'); - } - - if (!empty(Utils::$context['num_users_hidden'])) { - $bracketList[] = Lang::getTxt('number_of_hidden_members', [Utils::$context['num_users_hidden']], file: 'General'); - } - - $bracketList = array_filter($bracketList, 'strlen'); - - if (!empty($bracketList)) { - echo ' (' . Lang::sentenceList($bracketList) . ')'; - } - - echo Utils::$context['show_who'] ? '' : '', ' - -  - ', Lang::getTxt('most_online_today', file: 'General'), ': ', Lang::numberFormat(Config::$modSettings['mostOnlineToday']), ' -  - ', Lang::getTxt('most_online_ever', file: 'General'), ': ', Lang::numberFormat(Config::$modSettings['mostOnline']), ' (', Time::create('@' . Config::$modSettings['mostDate'])->format(), ')
'; - - // Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link. - if (!empty(Utils::$context['users_online'])) { - echo ' - ', Lang::getTxt('users_active', ['minutes' => Config::$modSettings['lastActive'], 'list' => Lang::sentenceList(Utils::$context['list_users_online'])], file: 'General'); - - // Showing membergroups? - if (!empty(Theme::$current->settings['show_group_key']) && !empty(Utils::$context['membergroups'])) { - echo ' - ' . implode(', ', Utils::$context['membergroups']) . ''; - } - } - - echo ' -

'; -} diff --git a/Themes/default/EventEditor.template.php b/Themes/default/EventEditor.template.php deleted file mode 100644 index 5f5e30b9a74..00000000000 --- a/Themes/default/EventEditor.template.php +++ /dev/null @@ -1,734 +0,0 @@ - - ', Lang::getTxt('calendar_event_options', file: 'Calendar'), ' - - - '; - - // Allow the user to link events to topics. - if ( - Utils::$context['event']->type === Event::TYPE_EVENT - && ( - Utils::$context['event']->new - || Utils::$context['event']->selected_occurrence->is_first - ) - ) { - if (empty(Utils::$context['event']->topic)) { - template_event_board(); - } elseif (Utils::$context['event']->topic === (Topic::$topic_id ?? NAN)) { - template_event_unlink(); - } elseif (Utils::$context['event']->new) { - template_event_link_to(); - } - } - - template_event_new(); - - echo ' - '; -} - -/** - * Template for linking an existing topic to an event. - */ -function template_event_link_to() -{ - // If user cannot edit existing events, we don't need to bother showing these options at all. - if (!User::$me->allowedTo('calendar_edit_any') && !User::$me->allowedTo('calendar_edit_own')) { - return; - } - - // If user can both create and edit events, show both options. - if (User::$me->allowedTo('calendar_post')) { - echo ' - '; - } - - // Let the user specify an existing event to link to. - echo ' - '; -} - -/** - * Template for unlinking a topic and an event. - */ -function template_event_unlink() -{ - if (empty(Utils::$context['event']->topic) || empty(Config::$modSettings['cal_allow_unlinked'])) { - return; - } - - echo ' -
-
- ' . Lang::getTxt('calendar_unlink', file: 'Calendar') . ' -
-
- -
-
-
'; -} - -/** - * Template for choosing a board to create a linked topic in. - */ -function template_event_board() -{ - // If user cannot create new events, skip this. - if (!User::$me->allowedTo('calendar_post')) { - return; - } - - echo ' - '; - - - if (!empty(Utils::$context['event']->categories)) { - echo ' -
-
- -
-
'; - echo ' - -
-
'; - } - - echo ' -
-
- -
-
- -
-
-
'; -} - -/** - * Template for entering info about a new event. - */ -function template_event_new() -{ - // If user cannot create new events, skip this. - if (!User::$me->allowedTo('calendar_post')) { - return; - } - - // Basic event info - echo ' -
-
-
- ', Lang::getTxt('calendar_event_title', file: 'Calendar'), ' -
-
- -
- -
- -
-
- -
-
'; - - // Date and time info. - echo ' -
-
-
- -
-
- allday) ? ' checked' : '', !empty(Utils::$context['event']->special_rrule) || (!Utils::$context['event']->new && !Utils::$context['event']->selected_occurrence->is_first) ? ' disabled' : '', '> - -
- -
- -
-
- special_rrule) ? ' disabled data-force-disabled' : '', '> - allday) || !empty(Utils::$context['event']->special_rrule) ? ' disabled' : '', !empty(Utils::$context['event']->special_rrule) ? ' data-force-disabled' : '', '> -
- -
- -
-
- special_rrule) ? ' disabled' : '', !empty(Utils::$context['event']->special_rrule) ? ' data-force-disabled' : '', '> - allday) || !empty(Utils::$context['event']->special_rrule) ? ' disabled' : '', !empty(Utils::$context['event']->special_rrule) ? ' data-force-disabled' : '', '> -
- -
- -
-
'; - - template_timezone_select( - 'tz', - Utils::$context['event']->selected_occurrence->tzid, - !empty(Utils::$context['event']->special_rrule) ? 2 : (int) Utils::$context['event']->allday, - ); - - echo ' -
-
'; - - // If this is a new event or the first occurrence of an existing event, show the RRULE stuff. - if (Utils::$context['event']->new || Utils::$context['event']->selected_occurrence->is_first) { - template_rrule(); - } else { - template_occurrence_options(); - } - - echo ' -
'; - -} - -/** - * Template used when editing a single occurrence of an event. - */ -function template_occurrence_options() -{ - if (Utils::$context['event']->selected_occurrence->can_affect_future) { - echo ' -
-
- ', Lang::getTxt('calendar_repeat_adjustment_label', file: 'Calendar'), ' -
-
- -
- -
-
'; - } -} - -/** - * Template for the recurrence rule options for events. - */ -function template_rrule() -{ - // Recurring event options. - echo ' -
'; - - // RRULE presets. - echo ' -
- -
-
- '; - - // When to end the recurrence. - if (empty(Utils::$context['event']->special_rrule)) { - echo ' - - - recurrence_iterator->getRRule()->until) ? ' value="' . Utils::$context['event']->recurrence_iterator->getRRule()->until->format('Y-m-d') . '"' : ' disabled', '> - recurrence_iterator->getRRule()->count ?? 0) > 1 ? ' value="' . Utils::$context['event']->recurrence_iterator->getRRule()->count . '"' : ' value="1" disabled', '> - '; - } - - echo ' -
-
'; - - - if (!empty(Utils::$context['event']->special_rrule) || (Utils::$context['event']->new && Utils::$context['event']->type === Event::TYPE_HOLIDAY)) { - echo ' -
-
- - -
-
- -
-
'; - } - - - if (empty(Utils::$context['event']->special_rrule)) { - // Custom frequency and interval (e.g. "every 2 weeks") - echo ' -
-
- -
-
- - -
-
'; - - // Custom yearly options. - echo ' -
-
- -
-
-
'; - - for ($i = 1; $i <= 12; $i++) { - echo ' - '; - - if ($i % 6 === 0) { - echo ' -
-
'; - } - } - - echo ' -
-
-
'; - - // Custom monthly options. - echo ' -
'; - - // Custom monthly: by day of month. - echo ' -
- -
-
-
-
-
'; - - for ($i = 1; $i <= 31; $i++) { - echo ' - '; - - if ($i % 7 === 0) { - echo ' -
-
'; - } - } - - echo ' -
-
-
-
'; - - // Custom monthly: by weekday and offset (e.g. "the second Tuesday") - echo ' -
- -
-
-
'; - - foreach (Utils::$context['event']->byday_items as $byday_item_key => $byday_item) { - echo ' -
- - -
'; - } - - echo ' -
- - -
-
'; - - // Custom weekly options. - echo ' -
-
- -
-
'; - - foreach (Utils::$context['event']->sorted_weekdays as $weekday) { - echo ' - '; - } - - echo ' -
-
'; - } - - // Advanced options. - echo ' -
recurrence_iterator->getRDates()) || !empty(Utils::$context['event']->recurrence_iterator->getEXDates()) ? ' open' : '') . '> - ', Lang::getTxt('calendar_repeat_advanced_options_label', file: 'Calendar'), ''; - - // Arbitrary dates to add to the recurrence set. - echo ' -
-
- -
-
-
'; - - foreach (Utils::$context['event']->recurrence_iterator->getRDates() as $key => $rdate) { - $rdate = new SMF\Time($rdate); - $rdate->setTimezone(Utils::$context['event']->start->getTimezone()); - - echo ' -
- - - -
'; - } - - echo ' -
- -
-
'; - - // Dates to exclude from the recurrence set. - echo ' -
-
- -
-
-
'; - - foreach (Utils::$context['event']->recurrence_iterator->getExDates() as $key => $exdate) { - $exdate = new SMF\Time($exdate); - $exdate->setTimezone(Utils::$context['event']->start->getTimezone()); - - echo ' -
- - - -
'; - } - - echo ' -
- - -
-
'; - - echo ' -
'; -} - -/** - * Template to show linked events. - */ -function template_linked_events() -{ - if (empty(Utils::$context['linked_calendar_events'])) { - return; - } - - echo ' -
-
    '; - - foreach (Utils::$context['linked_calendar_events'] as $event) { - echo ' -
  • - ', $event->title, ''; - - if ($event->can_edit) { - echo ' '; - } - - if ($event->can_export) { - echo ' '; - } - - echo ' -
    '; - - if (!empty($event->allday)) { - echo '', ($event->start->date != $event->end->date) ? ' – ' : ''; - } else { - // Display event info relative to user's local timezone - echo ' – ( – )'; - } - // Event is scheduled in the user's own timezone? Let 'em know, just to avoid confusion - else { - echo ' ', $event->start->tz_abbrev, ''; - } - } - - if (!empty($event->location)) { - echo ' -
    ', $event->location; - } - - $rrule_description = $event->getParentEvent()->recurrence_iterator->getRRule()->getDescription($event); - - if (!empty($rrule_description)) { - echo ' -
    ', $rrule_description; - } - - echo ' -
  • '; - } - - echo ' -
-
'; -} diff --git a/Themes/default/ManagePermissions.template.php b/Themes/default/ManagePermissions.template.php deleted file mode 100644 index 2fc379da13d..00000000000 --- a/Themes/default/ManagePermissions.template.php +++ /dev/null @@ -1,938 +0,0 @@ - - ', Lang::getTxt('permission_cannot_edit', ['url' => Config::$scripturl . '?action=admin;area=permissions;sa=profiles'], file: 'ManagePermissions'), ' - '; - } - - echo ' -
-
'; - - if (!empty(Utils::$context['profile'])) { - echo ' -
-

', Lang::getTxt('permissions_for_profile', Utils::$context['profile'], file: 'ManagePermissions'), '

-
'; - } else { - echo ' -
-

', Lang::getTxt('permissions_title', file: 'ManagePermissions'), '

-
'; - } - - echo ' - - - - - '; - - if (empty(Config::$modSettings['permission_enable_deny'])) { - echo ' - '; - } else { - echo ' - - '; - } - - echo ' - - - - - '; - - foreach (Utils::$context['groups'] as $group) { - echo ' - - - '; - - if (empty(Config::$modSettings['permission_enable_deny'])) { - echo ' - '; - } else { - echo ' - - '; - } - - echo ' - - - '; - } - - echo ' - -
', Lang::getTxt('membergroups_name', file: 'ManageMembers'), '', Lang::getTxt('membergroups_members_top', file: 'ManageMembers'), '', Lang::getTxt('membergroups_permissions', file: 'Admin'), '', Lang::getTxt('permissions_allowed', file: 'ManagePermissions'), '', Lang::getTxt('permissions_denied', file: 'ManagePermissions'), '', Lang::getTxt(Utils::$context['can_modify'] ? 'permissions_modify' : 'permissions_view', file: 'ManagePermissions'), ' - ', Utils::$context['can_modify'] ? '' : '', ' -
- ', !empty($group['help']) ? ' ' : '' . Lang::getTxt('help', file: 'General') . '', '', $group['name'], ''; - - if (!empty($group['children'])) { - echo ' -
- ', Lang::getTxt('permissions_includes_inherited', ['list' => Lang::sentenceList(array_map(fn($grp) => '"' . $grp . '"', $group['children']))], file: 'ManagePermissions'), ''; - } - - echo ' -
', $group['can_search'] ? $group['link'] : ($group['num_members'] ?? Lang::getTxt('not_applicable', file: 'General')), '', $group['num_permissions']['allowed'], ' - ', $group['num_permissions']['allowed'], ' - - ', $group['num_permissions']['denied'], ' - - ', $group['allow_modify'] ? '' . Lang::getTxt(Utils::$context['can_modify'] ? 'permissions_modify' : 'permissions_view', file: 'ManagePermissions') . '' : '', ' - - ', $group['allow_modify'] && Utils::$context['can_modify'] ? '' : '', ' -
-
'; - - // Advanced stuff... - if (Utils::$context['can_modify']) { - echo ' - -
-
- ', Lang::getTxt('permissions_with_selection', file: 'ManagePermissions'), ' -
-
- - ', Lang::getTxt('permissions_apply_pre_defined', file: 'ManagePermissions'), ' -
-
- -
-
- ', Lang::getTxt('permissions_like_group', file: 'ManagePermissions'), ' -
-
- -
-
- -
-
- -
-
-
- -
'; - - // Javascript for the advanced stuff. - echo ' - '; - - if (!empty(Utils::$context['profile'])) { - echo ' - '; - } - - echo ' - - '; - } - - echo ' -
-
'; -} - -/** - * THe page that shows which permissions profile applies to each board - */ -function template_by_board() -{ - echo ' -
-
-

', Lang::getTxt('permissions_boards', file: 'Admin'), '

-
-
- ', Lang::getTxt('permissions_boards_desc', file: 'ManagePermissions'), ' -
- -
-

- ', Lang::getTxt('board_name', file: 'General'), ' - ', Lang::getTxt('permission_profile', file: 'ManagePermissions'), ''; - echo ' -

-
-
'; - - foreach (Utils::$context['categories'] as $category) { - echo ' -
-

', $category['name'], '

-
'; - - if (!empty($category['boards'])) { - echo ' - '; - } - } - - if (Utils::$context['edit_all']) { - echo ' - '; - } else { - echo ' - ', Lang::getTxt('permissions_board_all', file: 'ManagePermissions'), ''; - } - - echo ' - - -
-
'; -} - -/** - * Edit permission profiles (predefined). - */ -function template_edit_profiles() -{ - echo ' -
-
-
-

', Lang::getTxt('permissions_profile_edit', file: 'ManagePermissions'), '

-
- - - - - - - - - - '; - - foreach (Utils::$context['profiles'] as $profile) { - echo ' - - - - - - - '; - } - - echo ' - -
', Lang::getTxt('permissions_profile_name', file: 'ManagePermissions'), '', Lang::getTxt('permissions_profile_used_by', file: 'ManagePermissions'), '
'; - - if (!empty(Utils::$context['show_rename_boxes']) && $profile['can_rename']) { - echo ' - '; - } else { - echo ' - ', $profile['name'], ''; - } - - echo ' - - ', !empty($profile['boards_text']) ? $profile['boards_text'] : Lang::getTxt('permissions_profile_used_by_count', [0], file: 'ManagePermissions'), ' -
-
- - '; - - if (Utils::$context['can_rename_something']) { - echo ' - '; - } - - echo ' - -
-
-
-
-
-

', Lang::getTxt('permissions_profile_new', file: 'ManagePermissions'), '

-
-
-
-
- ', Lang::getTxt('permissions_profile_name', file: 'ManagePermissions'), ' -
-
- -
-
- ', Lang::getTxt('permissions_profile_copy_from', file: 'ManagePermissions'), ' -
-
- -
-
- - - -
-
-
'; -} - -/** - * Modify a group's permissions - */ -function template_modify_group() -{ - // Cannot be edited? - if (!Utils::$context['profile']['can_modify']) { - echo ' -
- ', Lang::getTxt('permission_cannot_edit', ['url' => Config::$scripturl . '?action=admin;area=permissions;sa=profiles'], file: 'ManagePermissions'), ' -
'; - } else { - echo ' - '; - } - - echo ' -
'; - - if (!empty(Config::$modSettings['permission_enable_deny']) && Utils::$context['group']['id'] != -1) { - echo ' -
- ', Lang::getTxt('permissions_option_desc', file: 'ManagePermissions'), ' -
'; - } - - echo ' -
-

'; - - if (Utils::$context['permission_type'] == 'board') { - echo ' - ', Lang::getTxt('permissions_for_in', ['group' => Utils::$context['group']['name'], 'profile' => Utils::$context['profile']['name']], file: 'ManagePermissions'); - } else { - echo ' - ', Lang::getTxt(Utils::$context['permission_type'] == 'global' ? 'permissions_general_for' : 'permissions_board_for', ['name' => Utils::$context['group']['name']], file: 'ManagePermissions'); - } - - echo ' -

-
'; - - // Draw out the main bits. - template_modify_group_display(Utils::$context['permission_type']); - - if (Utils::$context['profile']['can_modify']) { - echo ' -
- -
'; - } - - foreach (Utils::$context['hidden_perms'] as $hidden_perm) { - echo ' - '; - } - - echo ' - - -
'; -} - -/** - * The way of looking at permissions. - * - * @param string $type The permissions type - */ -function template_modify_group_display($type) -{ - $permission_type = &Utils::$context['permissions'][$type]; - $disable_field = Utils::$context['profile']['can_modify'] ? '' : 'disabled '; - - foreach ($permission_type['columns'] as $column) { - echo ' - '; - - foreach ($column as $permissionGroup) { - if (empty($permissionGroup['permissions'])) { - continue; - } - - // Are we likely to have something in this group to display or is it all hidden? - $has_display_content = false; - - if (!$permissionGroup['hidden']) { - // Before we go any further check we are going to have some data to print otherwise we just have a silly heading. - foreach ($permissionGroup['permissions'] as $permission) { - if (!$permission['hidden']) { - $has_display_content = true; - } - } - - if ($has_display_content) { - echo ' - - - ', $permissionGroup['name'], ''; - - if (Utils::$context['group']['id'] != -1) { - echo ' - - '; - } - - echo ' - '; - } - } - - foreach ($permissionGroup['permissions'] as $permission) { - if (!$permission['hidden'] && !$permissionGroup['hidden']) { - echo ' - - - - - - - '; - } - } - } - - echo ' -
', Lang::getTxt('permissions_option_own', file: 'ManagePermissions'), '', Lang::getTxt('permissions_option_any', file: 'ManagePermissions'), '
- ', $permission['show_help'] ? '' : '', ' - - ', $permission['name'], (!empty($permission['note']) ? '
- ' . $permission['note'] . '' : ''), ' -
'; - - if ($permission['has_own_any']) { - // Guests can't do their own thing. - if (Utils::$context['group']['id'] != -1) { - if (empty(Config::$modSettings['permission_enable_deny'])) { - echo ' - '; - } else { - echo ' - '; - } - - echo ' - '; - } - - if (empty(Config::$modSettings['permission_enable_deny']) || Utils::$context['group']['id'] == -1) { - echo ' - '; - } else { - echo ' - '; - } - } else { - if (Utils::$context['group']['id'] != -1) { - echo ' - '; - } - - if (empty(Config::$modSettings['permission_enable_deny']) || Utils::$context['group']['id'] == -1) { - echo ' - '; - } else { - echo ' - '; - } - } - echo ' -
'; - } - - echo ' -
'; -} - -/** - * A form for displaying inline permissions, such as on a settings page. - */ -function template_inline_permissions() -{ - // This looks really weird, but it keeps things nested properly... - echo ' -
- ', Lang::getTxt('avatar_select_permission', file: 'Admin'), ''; - - if (empty(Config::$modSettings['permission_enable_deny'])) { - echo ' -
    '; - } else { - echo ' -
    ', Lang::getTxt('permissions_option_desc', file: 'ManagePermissions'), '
    -
    -
    - ', Lang::getTxt('permissions_option_on', file: 'ManagePermissions'), ' - ', Lang::getTxt('permissions_option_off', file: 'ManagePermissions'), ' - ', Lang::getTxt('permissions_option_deny', file: 'ManagePermissions'), ' -
    -
    -
    '; - } - - foreach (Utils::$context['member_groups'] as $group) { - if (!empty(Config::$modSettings['permission_enable_deny'])) { - echo ' -
    '; - } else { - echo ' -
  • '; - } - - if (empty(Config::$modSettings['permission_enable_deny'])) { - echo ' - '; - } else { - echo ' - - - '; - } - - if (!empty(Config::$modSettings['permission_enable_deny'])) { - echo ' -
  • -
    - ', $group['name'], ' -
    '; - } else { - echo ' - ', $group['name'], ' - '; - } - } - - if (empty(Config::$modSettings['permission_enable_deny'])) { - echo ' -
  • - - ', Lang::getTxt('check_all', file: 'General'), ' -
  • -
'; - } else { - echo ' - '; - } - - echo ' -
- - - - '; -} - -/** - * Edit post moderation permissions. - */ -function template_postmod_permissions() -{ - echo ' -
-
-
-

', Lang::getTxt('permissions_post_moderation', file: 'Admin'), '

-
'; - - // First, we have the bit where we can enable or disable this bad boy. - echo ' -
-
-
', Lang::getTxt('permissions_post_moderation_enable', file: 'ManagePermissions'), '
-
-
-
'; - - // If we're not active, there's a bunch of stuff we don't need to show. - if (!empty(Config::$modSettings['postmod_active'])) { - // Got advanced permissions - if so warn! - if (!empty(Config::$modSettings['permission_enable_deny'])) { - echo ' -
', Lang::getTxt('permissions_post_moderation_deny_note', file: 'ManagePermissions'), '
'; - } - - echo ' -
- ', Lang::getTxt('permissions_post_moderation_legend', file: 'ManagePermissions'), ' -
    -
  • ', Lang::getTxt('permissions_post_moderation_allow', file: 'ManagePermissions'), '
  • -
  • ', Lang::getTxt('permissions_post_moderation_moderate', file: 'ManagePermissions'), '
  • -
  • ', Lang::getTxt('permissions_post_moderation_disallow', file: 'ManagePermissions'), '
  • -
-


-

- ', Lang::getTxt('permissions_post_moderation_select', file: 'ManagePermissions'), ' - - -

-
- - - - - - - '; - - if (Config::$modSettings['attachmentEnable'] == 1) { - echo ' - '; - } - - echo ' - - - - - - - - - - - - '; - - if (Config::$modSettings['attachmentEnable'] == 1) { - echo ' - - - '; - } - - echo ' - - - '; - - foreach (Utils::$context['profile_groups'] as $group) { - echo ' - - - - - '; - - // Guests can't have "own" permissions - if ($group['id'] == '-1') { - echo ' - '; - } else { - echo ' - - - '; - } - - echo ' - - - '; - - if (Config::$modSettings['attachmentEnable'] == 1) { - echo ' - - - '; - } - - echo ' - '; - } - - echo ' - -
- ', Lang::getTxt('permissions_post_moderation_new_topics', file: 'ManagePermissions'), ' - - ', Lang::getTxt('permissions_post_moderation_replies_own', file: 'ManagePermissions'), ' - - ', Lang::getTxt('permissions_post_moderation_replies_any', file: 'ManagePermissions'), ' - - ', Lang::getTxt('permissions_post_moderation_attachments', file: 'ManagePermissions'), ' -
- ', Lang::getTxt('permissions_post_moderation_group', file: 'ManagePermissions'), ' -
- ', $group['name'], ''; - - if (!empty($group['children'])) { - echo ' -
- ', Lang::getTxt('permissions_includes_inherited', ['list' => Lang::sentenceList(array_map(fn($grp) => '"' . $grp . '"', $group['children']))], file: 'ManagePermissions'), ''; - } - - echo ' -
- - - - - - - - - - - - - - - - - - - - - - - -
'; - } - - echo ' - - -
-
'; -} diff --git a/Themes/default/MessageIndex.template.php b/Themes/default/MessageIndex.template.php deleted file mode 100644 index d1dd8e162a1..00000000000 --- a/Themes/default/MessageIndex.template.php +++ /dev/null @@ -1,431 +0,0 @@ - -

', Utils::$context['name'], '

'; - - if (isset(Utils::$context['description']) && Utils::$context['description'] != '') { - echo ' -

', Utils::$context['description'], '

'; - } - - if (!empty(Utils::$context['moderators'])) { - echo ' -

', Lang::getTxt('moderators_list', ['num' => count(Utils::$context['link_moderators']), 'list' => Lang::sentenceList(Utils::$context['link_moderators'])], file: 'General'), '.

'; - } - - if (!empty(Theme::$current->settings['display_who_viewing'])) { - // Show just numbers...? - if (Theme::$current->settings['display_who_viewing'] == 1 || empty(Utils::$context['view_members_list'])) { - // Count the ones this member is allowed to see. Any hidden ones get - // their own mention below, so counting those here as well would say - // the same people twice. - $list_of_viewers = [ - Lang::getTxt('number_of_members', [count(Utils::$context['view_members_list'])], file: 'General'), - ]; - } - // Or show the actual people viewing the topic? - else { - $list_of_viewers = Utils::$context['view_members_list']; - } - - if (!empty(Utils::$context['view_num_hidden']) && !Utils::$context['can_moderate_forum']) { - $list_of_viewers[] = Lang::getTxt('number_of_hidden_members', [Utils::$context['view_num_hidden']], file: 'General'); - } - - // Now show how many guests are here too. - if (!empty(Utils::$context['view_num_guests'])) { - $list_of_viewers[] = Lang::getTxt('guest_plural', [Utils::$context['view_num_guests']], file: 'General'); - } - - echo ' -

- ', Lang::getTxt( - 'who_viewing_board', - [ - 'list_of_viewers' => Lang::sentenceList(array_values($list_of_viewers)), - 'num_viewing' => count(Utils::$context['view_members_list'] ?? []) + (int) (Utils::$context['view_num_guests'] ?? 0) + (int) (Utils::$context['view_num_hidden'] ?? 0), - ], - file: 'General', - ), ' -

'; - } - - echo ' - '; - - if (!empty(Utils::$context['boards']) && (!empty(Theme::$current->options['show_children']) || Utils::$context['start'] == 0)) { - echo ' -
-
-

', Lang::getTxt('sub_boards', file: 'General'), '

-
'; - - template_bi_board_list(Utils::$context['boards']); - - echo ' -
'; - } - - // Let them know why their message became unapproved. - if (Utils::$context['becomesUnapproved']) { - echo ' -
- ', Lang::getTxt('post_becomes_unapproved', file: 'General'), ' -
'; - } - - // If this person can approve items and we have some awaiting approval tell them. - if (!empty(Utils::$context['unapproved_posts_message'])) { - echo ' -
- ', Utils::$context['unapproved_posts_message'], ' -
'; - } - - if (!Utils::$context['no_topic_listing']) { - echo ' -
- ', Utils::$context['menu_separator'], ' - - ', template_button_strip(Utils::$context['normal_buttons'], 'right'); - - // Mobile action buttons (top) - if (!empty(Utils::$context['normal_buttons'])) { - echo ' - '; - } - - echo ' -
'; - - // If Quick Moderation is enabled start the form. - if (!empty(Utils::$context['can_quick_mod']) && Theme::$current->options['display_quick_mod'] > 0 && !empty(Utils::$context['topics'])) { - echo ' -
'; - } - - echo ' -
'; - - echo ' -
'; - - // Are there actually any topics to show? - if (!empty(Utils::$context['topics'])) { - echo ' -
-
', Utils::$context['topics_headers']['subject'], ' / ', Utils::$context['topics_headers']['starter'], '
-
', Utils::$context['topics_headers']['replies'], ' / ', Utils::$context['topics_headers']['views'], '
-
', Utils::$context['topics_headers']['last_post'], '
'; - - // Show a "select all" box for quick moderation? - if (!empty(Utils::$context['can_quick_mod']) && Theme::$current->options['display_quick_mod'] == 1) { - echo ' -
- -
'; - } - - // If it's on in "image" mode, don't show anything but the column. - elseif (!empty(Utils::$context['can_quick_mod'])) { - echo ' -
'; - } - } - - // No topics... just say, "sorry bub". - else { - echo ' -

', Lang::getTxt('topic_alert_none', file: 'General'), '

'; - } - - echo ' -
'; - - // Contain the topic list - echo ' -
'; - - foreach (Utils::$context['topics'] as $topic) { - echo ' -
-
- - ', $topic['is_posted_in'] ? '' : '', ' -
-
- '; - - // Now we handle the icons - echo ' -
'; - - if ($topic['is_watched']) { - echo ' - '; - } - - if ($topic['is_locked']) { - echo ' - '; - } - - if ($topic['is_sticky']) { - echo ' - '; - } - - if ($topic['is_redirect']) { - echo ' - '; - } - - if ($topic['is_poll']) { - echo ' - '; - } - - echo ' -
'; - - echo ' -
- ', $topic['new'] && !User::$me->is_guest ? '' . Lang::getTxt('new', file: 'General') . '' : '', ' - - ', $topic['first_post']['link'], (!$topic['approved'] ? ' (' . Lang::getTxt('awaiting_approval', file: 'General') . ')' : ''), ' - -
-

- ', Lang::getTxt('started_by_member', ['member' => $topic['first_post']['member']['link']], file: 'General'), ' -

- ', !empty($topic['pages']) ? '' . $topic['pages'] . '' : '', ' -
-
-
-

', Lang::getTxt('number_of_replies', [$topic['replies']], file: 'General'), '
', Lang::getTxt('number_of_views', [$topic['views']], file: 'General'), '

-
-
-

', Lang::getTxt('last_post_topic', ['post_link' => '' . $topic['last_post']['time'] . '', 'member_link' => $topic['last_post']['member']['link']], file: 'General'), '

-
'; - - // Show the quick moderation options? - if (!empty(Utils::$context['can_quick_mod'])) { - echo ' -
'; - - if (Theme::$current->options['display_quick_mod'] == 1) { - echo ' - '; - } else { - // Check permissions on each and show only the ones they are allowed to use. - if ($topic['quick_mod']['remove']) { - echo ''; - } - - if ($topic['quick_mod']['lock']) { - echo ''; - } - - if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) { - echo '
'; - } - - if ($topic['quick_mod']['sticky']) { - echo ''; - } - - if ($topic['quick_mod']['move']) { - echo ''; - } - } - echo ' -
'; - } - echo ' -
'; - } - echo ' -
'; - - if (!empty(Utils::$context['can_quick_mod']) && Theme::$current->options['display_quick_mod'] == 1 && !empty(Utils::$context['topics'])) { - echo ' -
- '; - - // Show a list of boards they can move the topic to. - if (Utils::$context['can_move']) { - echo ' - '; - } - - echo ' - -
'; - } - - echo ' - '; - - // Finish off the form - again. - if (!empty(Utils::$context['can_quick_mod']) && Theme::$current->options['display_quick_mod'] > 0 && !empty(Utils::$context['topics'])) { - echo ' - -
'; - } - - echo ' -
- ', Utils::$context['menu_separator'], ' - - ', template_button_strip(Utils::$context['normal_buttons'], 'right'); - - // Mobile action buttons (bottom) - if (!empty(Utils::$context['normal_buttons'])) { - echo ' - '; - } - - echo ' -
'; - } - - // Show breadcrumbs at the bottom too. - theme_linktree(); - - echo ' - '; - - template_topic_legend(); - - // Lets pop the... - echo ' - '; -} - -/** - * Shows a legend for topic icons. - */ -function template_topic_legend() -{ - echo ' -
-
-

'; - - if (empty(Utils::$context['no_topic_listing'])) { - echo ' -

', !empty(Config::$modSettings['enableParticipation']) && !User::$me->is_guest ? ' - ' . Lang::getTxt('participation_caption', file: 'General') . '
' : '', ' - ' . (Config::$modSettings['pollMode'] == '1' ? ' ' . Lang::getTxt('poll', file: 'General') . '
' : '') . ' - ' . Lang::getTxt('moved_topic', file: 'General') . '
-

-

- ' . Lang::getTxt('locked_topic', file: 'General') . '
- ' . Lang::getTxt('sticky_topic', file: 'General') . '
- ' . Lang::getTxt('watching_topic', file: 'General') . '
-

'; - } - - if (!empty(Utils::$context['jump_to'])) { - echo ' - '; - } - - echo ' -
-
'; -} diff --git a/Themes/default/ModerationCenter.template.php b/Themes/default/ModerationCenter.template.php deleted file mode 100644 index 53699f57ab9..00000000000 --- a/Themes/default/ModerationCenter.template.php +++ /dev/null @@ -1,679 +0,0 @@ -'; - - // Show all the blocks they want to see. - foreach (Utils::$context['mod_blocks'] as $block) { - $block_function = 'template_' . $block; - - echo ' -
', function_exists($block_function) ? $block_function() : '', '
'; - } - - echo ' - '; -} - -/** - * Show all the group requests the user can see. - */ -function template_group_requests_block() -{ - echo ' - -
-
    '; - - foreach (Utils::$context['group_requests'] as $request) { - echo ' -
  • - ', Lang::getTxt('mc_groupr_by', ['group_link' => '' . $request['group']['name'] . '', 'member_link' => $request['member']['link']], file: 'ModerationCenter') ,' -
  • '; - } - - // Don't have any watched users right now? - if (empty(Utils::$context['group_requests'])) { - echo ' -
  • - ', Lang::getTxt('mc_group_requests_none', file: 'ModerationCenter'), ' -
  • '; - } - - echo ' -
-
- - '; -} - -/** - * A list of watched users - */ -function template_watched_users() -{ - echo ' - -
-
    '; - - foreach (Utils::$context['watched_users'] as $user) { - echo ' -
  • - ', Lang::getTxt(!empty($user['last_login']) ? 'mc_seen' : 'mc_seen_never', $user, file: 'ModerationCenter'), ' -
  • '; - } - - // Don't have any watched users right now? - if (empty(Utils::$context['watched_users'])) { - echo ' -
  • - ', Lang::getTxt('mc_watched_users_none', file: 'ModerationCenter'), ' -
  • '; - } - - echo ' -
-
- - '; -} - -/** - * A list of reported posts - */ -function template_reported_posts_block() -{ - echo ' - -
-
    '; - - foreach (Utils::$context['reported_posts'] as $post) { - echo ' -
  • - ', Lang::getTxt('mc_post_report', ['report_link' => $post['report_link'], 'author_link' => $post['author']['link']], file: 'ModerationCenter'), ' -
  • '; - } - - // Don't have any watched users right now? - if (empty(Utils::$context['reported_posts'])) { - echo ' -
  • - ', Lang::getTxt('mc_recent_reports_none', file: 'ModerationCenter'), ' -
  • '; - } - - echo ' -
-
- - '; -} - -/** - * A list of reported users - */ -function template_reported_users_block() -{ - echo ' - -
-
    '; - - foreach (Utils::$context['reported_users'] as $user) { - echo ' -
  • - ', $user['user']['link'], ' -
  • '; - } - - // Don't have any watched users right now? - if (empty(Utils::$context['reported_users'])) { - echo ' -
  • - ', Lang::getTxt('mc_reported_users_none', file: 'ModerationCenter'), ' -
  • '; - } - - echo ' -
-
- - '; -} - -/** - * Little section for making... notes. - */ -function template_notes() -{ - // Let them know the action was a success. - if (!empty(Utils::$context['report_post_action'])) { - echo ' -
- ', Lang::getTxt('report_action_' . Utils::$context['report_post_action'], file: 'ModerationCenter'), ' -
'; - } - - echo ' -
-
-
-

', Lang::getTxt('mc_notes', file: 'ModerationCenter'), '

-
-
'; - - if (!empty(Utils::$context['notes'])) { - echo ' -
    '; - - // Cycle through the notes. - foreach (Utils::$context['notes'] as $note) { - echo ' -
  • - ', ($note['can_delete'] ? '' : ''), $note['time'], ' ', $note['author']['link'], ': ', Utils::adjustHeadingLevels($note['text'], 4), ' -
  • '; - } - - echo ' -
-
- -
'; - } - - echo ' -
- -
- - -
- -
-
'; -} - -/** - * Show a list of all the unapproved posts - */ -function template_unapproved_posts() -{ - // Just a big table of it all really... - echo ' -
-
-
-

', Lang::getTxt('mc_unapproved_posts', file: 'ModerationCenter'), '

-
'; - - // No posts? - if (empty(Utils::$context['unapproved_items'])) { - echo ' -
-

- ', Lang::getTxt('mc_unapproved_' . Utils::$context['current_view'] . '_none_found', file: 'ModerationCenter'), ' -

-
'; - } else { - echo ' -
- '; - - if (!empty(Theme::$current->options['display_quick_mod']) && Theme::$current->options['display_quick_mod'] == 1) { - echo ' -
    -
  • - -
  • -
'; - } - - echo ' -
'; - - } - - foreach (Utils::$context['unapproved_items'] as $item) { - // The buttons - $quickbuttons = [ - 'approve' => [ - 'label' => Lang::getTxt('approve', file: 'General'), - 'href' => Config::$scripturl . '?action=moderate;area=postmod;sa=' . Utils::$context['current_view'] . ';start=' . Utils::$context['start'] . ';' . Utils::$context['session_var'] . '=' . Utils::$context['session_id'] . ';approve=' . $item['id'], - 'icon' => 'approve', - ], - 'delete' => [ - 'label' => Lang::getTxt('remove', file: 'General'), - 'href' => Config::$scripturl . '?action=moderate;area=postmod;sa=' . Utils::$context['current_view'] . ';start=' . Utils::$context['start'] . ';' . Utils::$context['session_var'] . '=' . Utils::$context['session_id'] . ';delete=' . $item['id'], - 'icon' => 'remove_button', - 'show' => $item['can_delete'], - ], - 'quickmod' => [ - 'class' => 'inline_mod_check', - 'content' => '', - 'show' => !empty(Theme::$current->options['display_quick_mod']) && Theme::$current->options['display_quick_mod'] == 1, - ], - ]; - echo ' -
-
#', $item['counter'], '
-
-
- ', $item['category']['link'], ' / ', $item['board']['link'], ' / ', $item['link'], ' -
- ', str_replace('
', ' ', Lang::getTxt('last_post_topic', ['post_link' => $item['time'], 'member_link' => '' . $item['poster']['link'] . ''], file: 'General')), '
-
-
-
', Utils::adjustHeadingLevels($item['body'], 5), '
-
- ', template_quickbuttons($quickbuttons, 'unapproved_posts'), ' -
'; - } - - echo ' -
'; - - if (!empty(Utils::$context['unapproved_items'])) { - echo ' - '; - } - - if (!empty(Theme::$current->options['display_quick_mod']) && Theme::$current->options['display_quick_mod'] == 1) { - echo ' -
- - -
'; - } - - echo ' -
- -
-
'; -} - -/** - * Callback function for showing a watched users post in the table. - * - * @param array $post An array of data about the post. - * @return string An array of HTML for showing the post info. - */ -function template_user_watch_post_callback($post) -{ - // We'll have a delete and a checkbox please bob. - // @todo Discuss this with the team and rewrite if required. - $quickbuttons = [ - 'delete' => [ - 'label' => Lang::getTxt('remove_message', file: 'General'), - 'href' => Config::$scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . Utils::$context['start'] . ';' . Utils::$context['session_var'] . '=' . Utils::$context['session_id'], - 'javascript' => 'data-confirm="' . Lang::getTxt('mc_watched_users_delete_post', file: 'ModerationCenter') . '"', - 'class' => 'you_sure', - 'icon' => 'remove_button', - 'show' => $post['can_delete'], - ], - 'quickmod' => [ - 'class' => 'inline_mod_check', - 'content' => '', - 'show' => $post['can_delete'], - ], - ]; - - $output_html = ' -
-
- ' . Lang::getTxt('mc_post_report', ['report_link' => '' . $post['subject'] . '', 'author_link' => $post['author_link']], file: 'ModerationCenter') . ' -
-
-
-
- ' . Lang::getTxt('mc_watched_users_posted', ['time' => $post['poster_time']], file: 'ModerationCenter') . ' -
-
- ' . $post['body'] . ' -
'; - - $output_html .= template_quickbuttons($quickbuttons, 'user_watch_post', 'return'); - - return $output_html; -} - -/** - * The moderation settings page. - */ -function template_moderation_settings() -{ - echo ' -
'; - - echo ' -
-
', Lang::getTxt('mc_no_settings', file: 'ModerationCenter'), '
-
'; - - echo ' -
'; -} - -/** - * Show a notice sent to a user. - */ -function template_show_notice() -{ - // We do all the HTML for this one! - echo ' - - - - ', Utils::$context['page_title'], ' - ', Theme::template_css(), ' - - -
-

', Lang::getTxt('show_notice', file: 'ModerationCenter'), '

-
-
-

', Lang::getTxt('show_notice_subject', ['subject' => Utils::$context['notice_subject']], file: 'ModerationCenter'), '

-
-
-
-
- ', Lang::getTxt('show_notice_text', file: 'ModerationCenter'), ' -
-
- ', Utils::adjustHeadingLevels(Utils::$context['notice_body'], 3), ' -
-
-
- -'; - -} - -/** - * Add or edit a warning template. - */ -function template_warn_template() -{ - echo ' -
-
-
-

', Utils::$context['page_title'], '

-
-
- ', Lang::getTxt('mc_warning_template_desc', file: 'ModerationCenter'), ' -
-
- - -
-
- -
-
- -
-
-
- ', Lang::getTxt('mc_warning_template_body_desc', file: 'ModerationCenter'), ' -
-
- -
-
'; - - if (Utils::$context['template_data']['can_edit_personal']) { - echo ' - - -

', Lang::getTxt('mc_warning_template_personal_desc', file: 'ModerationCenter'), '

'; - } - - echo ' - - -
- - -
-
- - '; -} diff --git a/Themes/default/Profile.template.php b/Themes/default/Profile.template.php deleted file mode 100644 index 55edc55738f..00000000000 --- a/Themes/default/Profile.template.php +++ /dev/null @@ -1,3460 +0,0 @@ -is_me) { - echo ' - '; - } - - // If an error occurred while trying to save previously, give the user a clue! - echo ' - ', template_error_message(); - - // If the profile was update successfully, let the user know this. - if (!empty(Utils::$context['profile_updated'])) { - echo ' -
- ', Utils::$context['profile_updated'], ' -
'; - } -} - -/** - * Template for any HTML needed below the profile (closing off divs/tables, etc.) - */ -function template_profile_below() {} - -/** - * Template for showing off the spiffy popup of the menu - */ -function template_profile_popup() -{ - // Unlike almost every other template, this is designed to be included into the HTML directly via $().load() - - echo ' - - - '; -} - -/** - * The "popup" showing the user's alerts - */ -function template_alerts_popup() -{ - // Unlike almost every other template, this is designed to be included into the HTML directly via $().load() - echo ' - -
'; - - if (empty(Utils::$context['unread_alerts'])) { - template_alerts_all_read(); - } else { - foreach (Utils::$context['unread_alerts'] as $id_alert => $details) { - echo ' - <', !$details['show_links'] ? 'a href="' . Config::$scripturl . '?action=profile;area=showalerts;alert=' . $id_alert . '" onclick="this.classList.add(\'alert_read\')"' : 'div', ' class="unread_notify"> -
- ', empty($details['sender']['avatar']['image']) ? '' : $details['sender']['avatar']['image'] . ' - ', $details['icon'], ' -
-
- ', $details['text'], ' - ', $details['time'], ' -
- '; - } - } - - echo ' -
- '; -} - -/** - * A simple template to say "You don't have any unread alerts". - */ -function template_alerts_all_read() -{ - echo '
', Lang::getTxt('alerts_no_unread', file: 'Alerts'), '
'; -} - -/** - * This template displays a user's details without any option to edit them. - */ -function template_summary() -{ - // Display the basic information about the user - echo ' -
-
'; - - // Are there any custom profile fields for above the name? - if (!empty(Utils::$context['print_custom_fields']['above_member'])) { - $fields = ''; - - foreach (Utils::$context['print_custom_fields']['above_member'] as $field) { - if (!empty($field['output_html'])) { - $fields .= ' -
  • ' . $field['output_html'] . '
  • '; - } - } - - if (!empty($fields)) { - echo ' -
    -
      ', $fields, ' -
    -
    '; - } - } - - echo ' -
    -

    '; - - if (!empty(Utils::$context['print_custom_fields']['before_member'])) { - foreach (Utils::$context['print_custom_fields']['before_member'] as $field) { - if (!empty($field['output_html'])) { - echo ' - ', $field['output_html'], ''; - } - } - } - - echo ' - ', Utils::$context['member']['name']; - - if (!empty(Utils::$context['print_custom_fields']['after_member'])) { - foreach (Utils::$context['print_custom_fields']['after_member'] as $field) { - if (!empty($field['output_html'])) { - echo ' - ', $field['output_html'], ''; - } - } - } - - echo ' - ', (!empty(Utils::$context['member']['group']) ? Utils::$context['member']['group'] : Utils::$context['member']['post_group']), ' -

    -
    - ', Utils::$context['member']['avatar']['image']; - - // Are there any custom profile fields for below the avatar? - if (!empty(Utils::$context['print_custom_fields']['below_avatar'])) { - $fields = ''; - - foreach (Utils::$context['print_custom_fields']['below_avatar'] as $field) { - if (!empty($field['output_html'])) { - $fields .= ' -
  • ' . $field['output_html'] . '
  • '; - } - } - - if (!empty($fields)) { - echo ' -
    -
      ', $fields, ' -
    -
    '; - } - } - - echo ' -
      '; - - // Email is only visible if it's your profile or you have the moderate_forum permission - if (Utils::$context['member']['show_email']) { - echo ' -
    • '; - } - - // Don't show an icon if they haven't specified a website. - if (Utils::$context['member']['website']['url'] !== '' && !isset(Utils::$context['disabled_fields']['website'])) { - echo ' -
    • '; - } - - // Are there any custom profile fields as icons? - if (!empty(Utils::$context['print_custom_fields']['icons'])) { - foreach (Utils::$context['print_custom_fields']['icons'] as $field) { - if (!empty($field['output_html'])) { - echo ' -
    • ', $field['output_html'], '
    • '; - } - } - } - - echo ' -
    - - ', Utils::$context['can_send_pm'] ? '' : '', '', Utils::$context['can_send_pm'] ? '' : '', ' ' . Utils::$context['member']['online']['label'] . ''; - - // Can they add this member as a buddy? - if (!empty(Utils::$context['can_have_buddy']) && !Profile::$member->is_me) { - echo ' -
    - ', Lang::getTxt('buddy_' . (Utils::$context['member']['is_buddy'] ? 'remove' : 'add'), file: 'Profile'), ''; - } - - echo ' -
    '; - - if (!Profile::$member->is_me && Utils::$context['can_send_pm']) { - echo ' - ', Lang::getTxt('profile_sendpm_short', file: 'Profile'), ''; - } - - echo ' - ', Lang::getTxt('showPosts', file: 'Profile'), ''; - - if (Profile::$member->is_me && !empty(Config::$modSettings['drafts_post_enabled'])) { - echo ' - ', Lang::getTxt('drafts_show', file: 'Drafts'), ''; - } - - echo ' - ', Lang::getTxt('statPanel', file: 'Profile'), ''; - - // Are there any custom profile fields for bottom? - if (!empty(Utils::$context['print_custom_fields']['bottom_poster'])) { - $fields = ''; - - foreach (Utils::$context['print_custom_fields']['bottom_poster'] as $field) { - if (!empty($field['output_html'])) { - $fields .= ' -
  • ' . $field['output_html'] . '
  • '; - } - } - - if (!empty($fields)) { - echo ' -
    -
      ', $fields, ' -
    -
    '; - } - } - - echo ' -
    - -
    -
    '; - - if (Profile::$member->is_me || User::$me->is_admin) { - echo ' -
    ', Lang::getTxt('username', file: 'General'), '
    -
    ', Utils::$context['member']['username'], '
    '; - } - - if (!isset(Utils::$context['disabled_fields']['posts'])) { - echo ' -
    ', Lang::getTxt('profile_posts', file: 'Profile'), '
    -
    ', Utils::$context['member']['posts'], ' (', is_numeric(Utils::$context['member']['posts_per_day']) ? Lang::getTxt('posts_per_day', [Utils::$context['member']['posts_per_day']], file: 'Profile') : Utils::$context['member']['posts_per_day'], ')
    '; - } - - if (Utils::$context['member']['show_email']) { - echo ' -
    ', Lang::getTxt('email', file: 'General'), '
    -
    ', Utils::$context['member']['email'], '
    '; - } - - if (!empty(Config::$modSettings['titlesEnable']) && !empty(Utils::$context['member']['title'])) { - echo ' -
    ', Lang::getTxt('custom_title', file: 'Profile'), '
    -
    ', Utils::$context['member']['title'], '
    '; - } - - if (!empty(Utils::$context['member']['blurb'])) { - echo ' -
    ', Lang::getTxt('personal_text', file: 'General'), '
    -
    ', Utils::$context['member']['blurb'], '
    '; - } - - echo ' -
    ', Lang::getTxt('age', file: 'Profile'), '
    -
    ', Utils::$context['member']['age'] . (Utils::$context['member']['today_is_birthday'] ? '   ' : ''), '
    '; - - echo ' -
    '; - - // Any custom fields for standard placement? - if (!empty(Utils::$context['print_custom_fields']['standard'])) { - $fields = []; - - foreach (Utils::$context['print_custom_fields']['standard'] as $field) { - if (!empty($field['output_html'])) { - $fields[] = $field; - } - } - - if (count($fields) > 0) { - echo ' -
    '; - - foreach ($fields as $field) { - echo ' -
    ', $field['name'], ':
    -
    ', $field['output_html'], '
    '; - } - - echo ' -
    '; - } - } - - echo ' -
    -
    ', Lang::getTxt('date_registered', file: 'General'), '
    -
    ', Utils::$context['member']['registered'], '
    '; - - // If the person looking is allowed, they can check the members IP address and hostname. - if (Utils::$context['can_see_ip']) { - if (!empty(Utils::$context['member']['ip'])) { - echo ' -
    ', Lang::getTxt('ip', file: 'General'), '
    -
    ', Utils::$context['member']['ip'], '
    '; - } - - if (!empty(Utils::$context['member']['hostname'])) { - echo ' -
    ', Lang::getTxt('hostname', file: 'General'), '
    -
    ', Utils::$context['member']['hostname'], '
    '; - } - } - - echo ' -
    ', Lang::getTxt('local_time', file: 'Profile'), '
    -
    ', Utils::$context['member']['local_time'], '
    '; - - if (!empty(Config::$modSettings['userLanguage']) && !empty(Utils::$context['member']['language'])) { - echo ' -
    ', Lang::getTxt('language', file: 'Profile'), '
    -
    ', Utils::$context['member']['language'], '
    '; - } - - if (Utils::$context['member']['show_last_login']) { - echo ' -
    ', Lang::getTxt('lastLoggedIn', file: 'Profile'), '
    -
    ', Utils::$context['member']['last_login'], (!empty(Utils::$context['member']['is_hidden']) ? ' (' . Lang::getTxt('hidden', file: 'Profile') . ')' : ''), '
    '; - } - - echo ' -
    '; - - // Are there any custom profile fields for above the signature? - if (!empty(Utils::$context['print_custom_fields']['above_signature'])) { - $fields = ''; - - foreach (Utils::$context['print_custom_fields']['above_signature'] as $field) { - if (!empty($field['output_html'])) { - $fields .= ' -
  • ' . $field['output_html'] . '
  • '; - } - } - - if (!empty($fields)) { - echo ' -
    -
      ', $fields, ' -
    -
    '; - } - } - - // Show the users signature. - if (Utils::$context['signature_enabled'] && !empty(Utils::$context['member']['signature'])) { - echo ' -
    -
    ', Lang::getTxt('signature', file: 'Profile'), '
    - ', Utils::$context['member']['signature'], ' -
    '; - } - - // Are there any custom profile fields for below the signature? - if (!empty(Utils::$context['print_custom_fields']['below_signature'])) { - $fields = ''; - - foreach (Utils::$context['print_custom_fields']['below_signature'] as $field) { - if (!empty($field['output_html'])) { - $fields .= ' -
  • ' . $field['output_html'] . '
  • '; - } - } - - if (!empty($fields)) { - echo ' -
    -
      ', $fields, ' -
    -
    '; - } - } - - if ( - (Utils::$context['can_view_warning'] && Utils::$context['member']['warning']) - || !empty(Utils::$context['activate_message']) - || !empty(Utils::$context['member']['bans']) - ) { - echo ' -
    '; - - // Can they view/issue a warning? - if (Utils::$context['can_view_warning'] && Utils::$context['member']['warning']) { - echo ' -
    ', Lang::getTxt('profile_warning_level', file: 'Profile'), '
    -
    - ', Lang::formatText('{0, number, :: percent}', [Utils::$context['member']['warning']]), ''; - - // Can we provide information on what this means? - if (!empty(Utils::$context['warning_status'])) { - echo ' - (', Utils::$context['warning_status'], ')'; - } - - echo ' -
    '; - } - - // Is this member requiring activation and/or banned? - if (!empty(Utils::$context['activate_message']) || !empty(Utils::$context['member']['bans'])) { - // If the person looking at the summary has permission, and the account isn't activated, give the viewer the ability to do it themselves. - if (!empty(Utils::$context['activate_message'])) { - echo ' -
    - ', Utils::$context['activate_message'], ' -
    -
    - ', Utils::$context['activate_link_text'], ' -
    '; - } - - if (!empty(Config::$modSettings['always_anonymize_deleted_accounts'])) { - echo ' -
    -
    - ' . Lang::getTxt('deleteAccount_anonymize_forced', file: 'Profile') . ' -
    '; - } elseif (Utils::$context['activate_type'] % User::BANNED == User::REQUESTED_DELETE) { - echo ' -
    - -
    -
    - -
    '; - } - - // If the current member is banned, show a message and possibly a link to the ban. - if (!empty(Utils::$context['member']['bans'])) { - echo ' -
    - ', Lang::getTxt('user_is_banned', file: 'Profile'), ' ' . Lang::getTxt('view_ban', file: 'Profile') . ' -
    - '; - } - } - - echo ' -
    '; - } - - echo ' -
    -
    '; -} - -/** - * Template for showing all the posts of the user, in chronological order. - */ -function template_showPosts() -{ - echo ' -
    -

    - ', Lang::getTxt( - !isset(Utils::$context['attachments']) && empty(Utils::$context['is_topics']) - ? 'showMessages' - : ( - !empty(Utils::$context['is_topics']) - ? 'showTopics' - : 'showAttachments' - ), - file: 'Profile', - ), - !Profile::$member->is_me ? ' - ' . Utils::$context['member']['name'] : '', ' -

    -
    ', !empty(Utils::$context['page_index']) ? ' -
    - -
    ' : ''; - - // Are we displaying posts or attachments? - if (!isset(Utils::$context['attachments'])) { - // For every post to be displayed, give it its own div, and show the important details of the post. - foreach (Utils::$context['posts'] as $post) { - echo ' -
    -
    #', $post['counter'], '
    -
    -

    - ', $post['board']['name'], ' / ', $post['subject'], ' -

    - ', $post['time'], ' -
    '; - - if (!$post['approved']) { - echo ' -
    - ', Lang::getTxt('post_awaiting_approval', file: 'General'), ' -
    '; - } - - echo ' -
    -
    - ', Utils::adjustHeadingLevels($post['body'], 4), ' -
    -
    '; - - // Post options - template_quickbuttons($post['quickbuttons'], 'profile_showposts'); - - echo ' -
    '; - } - } else { - template_show_list('attachments'); - } - - // No posts? Just end with an informative message. - if ((isset(Utils::$context['attachments']) && empty(Utils::$context['attachments'])) || (!isset(Utils::$context['attachments']) && empty(Utils::$context['posts']))) { - echo ' -
    - ', Lang::getTxt( - isset(Utils::$context['attachments']) - ? 'show_attachments_none' - : ( - Utils::$context['is_topics'] - ? 'show_topics_none' - : 'show_posts_none' - ), - file: 'Profile', - ), ' -
    '; - } - - // Show more page numbers. - if (!empty(Utils::$context['page_index'])) { - echo ' -
    - -
    '; - } -} - -/** - * Template for showing all alerts - */ -function template_showAlerts() -{ - // Do we have an update message? - if (!empty(Utils::$context['update_message'])) { - echo ' -
    - ', Utils::$context['update_message'], ' -
    '; - } - - echo ' -
    -

    - ', Lang::getTxt(!Profile::$member->is_me ? 'alerts_member' : 'alerts', ['member' => Utils::$context['member']['name']], file: 'General'), ' -

    -
    '; - - if (empty(Utils::$context['alerts'])) { - echo ' -
    - ', Lang::getTxt('alerts_none', file: 'Alerts'), ' -
    '; - } else { - // Start the form if checkboxes are in use - if (Utils::$context['showCheckboxes']) { - echo ' -
    '; - } - - echo ' - '; - - foreach (Utils::$context['alerts'] as $id => $alert) { - echo ' - - - - - - '; - } - - echo ' -
    -
    - ', empty($alert['sender']['avatar']['image']) ? '' : $alert['sender']['avatar']['image'] . ' - ', $alert['icon'], ' -
    -
    -
    ', $alert['text'], '
    - -
    - - '; - - // Alert options - template_quickbuttons($alert['quickbuttons'], 'profile_alerts'); - - echo ' -
    -
    - -
    '; - - if (Utils::$context['showCheckboxes']) { - echo ' - ', Lang::getTxt('check_all', file: 'General'), ' - - - - '; - } - - echo ' - ', Lang::getTxt('alert_purge', file: 'Profile'), ' -
    -
    '; - - if (Utils::$context['showCheckboxes']) { - echo ' -
    '; - } - } -} - -/** - * Template for showing all of a user's drafts - */ -function template_showDrafts() -{ - echo ' -
    -

    - ', !Profile::$member->is_me ? Lang::getTxt('drafts_member', ['member' => Utils::$context['member']['name']], file: 'Drafts') : Lang::getTxt('drafts', file: 'Drafts'), ' -

    -
    ', !empty(Utils::$context['page_index']) ? ' -
    - -
    ' : ''; - - // No drafts? Just show an informative message. - if (empty(Utils::$context['drafts'])) { - echo ' -
    - ', Lang::getTxt('draft_none', file: 'Drafts'), ' -
    '; - } else { - // For every draft to be displayed, give it its own div, and show the important details of the draft. - foreach (Utils::$context['drafts'] as $draft) { - echo ' -
    -
    #', $draft['counter'], '
    -
    -

    - ', $draft['board']['name'], ' / ', $draft['topic']['link'], '    '; - - if (!empty($draft['sticky'])) { - echo ' - '; - } - - if (!empty($draft['locked'])) { - echo ' - '; - } - - echo ' -

    - ', Lang::getTxt('draft_saved_on', ['date' => $draft['time']], file: 'Drafts'), ' -
    -
    - ', Utils::adjustHeadingLevels($draft['body'], 4), ' -
    -
    '; - - // Draft buttons - template_quickbuttons($draft['quickbuttons'], 'profile_drafts'); - - echo ' -
    -
    '; - } - } - - // Show page numbers. - echo ' -
    - -
    '; -} - -/** - * Template for showing and managing the buddy list. - */ -function template_editBuddies() -{ - if (!empty(Utils::$context['saved_successful'])) { - echo ' -
    ', Lang::getTxt(Profile::$member->is_me ? 'profile_updated_own' : 'profile_updated_else', Utils::$context['member'], file: 'Profile'), '
    '; - } elseif (!empty(Utils::$context['saved_failed'])) { - echo ' -
    ', Utils::$context['saved_failed'], '
    '; - } - - echo ' -
    -
    -

    - ', Lang::getTxt('editBuddies', file: 'Profile'), ' -

    -
    - - - - - '; - - if (Utils::$context['can_moderate_forum']) { - echo ' - '; - } - - if (!empty(Utils::$context['custom_pf'])) { - foreach (Utils::$context['custom_pf'] as $column) { - echo ' - '; - } - } - - echo ' - - - - '; - - // If they don't have any buddies don't list them! - if (empty(Utils::$context['buddies'])) { - echo ' - - - '; - } - - // Now loop through each buddy showing info on each. - else { - foreach (Utils::$context['buddies'] as $buddy) { - echo ' - - - '; - - if ($buddy['show_email']) { - echo ' - '; - } - - // Show the custom profile fields for this user. - if (!empty(Utils::$context['custom_pf'])) { - foreach (Utils::$context['custom_pf'] as $key => $column) { - echo ' - '; - } - } - - echo ' - - '; - } - } - - echo ' - -
    ', Lang::getTxt('name', file: 'General'), '', Lang::getTxt('status', file: 'General'), '', Lang::getTxt('email', file: 'General'), '', $column['label'], '', Lang::getTxt('remove', file: 'General'), '
    - ', Lang::getTxt('no_buddies', file: 'Profile'), ' -
    - - - - ', $buddy['options'][$key], ' - -
    -
    '; - - // Add a new buddy? - echo ' -
    -
    -

    ', Lang::getTxt('buddy_add', file: 'Profile'), '

    -
    -
    -
    -
    - -
    -
    - - -
    -
    -
    '; - - if (!empty(Utils::$context['token_check'])) { - echo ' - '; - } - - echo ' - -
    - '; -} - -/** - * Template for showing the ignore list of the current user. - */ -function template_editIgnoreList() -{ - if (!empty(Utils::$context['saved_successful'])) { - echo ' -
    ', Lang::getTxt(Profile::$member->is_me ? 'profile_updated_own' : 'profile_updated_else', Utils::$context['member'], file: 'Profile'), '
    '; - } elseif (!empty(Utils::$context['saved_failed'])) { - echo ' -
    ', Utils::$context['saved_failed'], '
    '; - } - - echo ' -
    -
    -

    - ', Lang::getTxt('editIgnoreList', file: 'Profile'), ' -

    -
    - - - - - '; - - if (Utils::$context['can_moderate_forum']) { - echo ' - '; - } - - echo ' - - - - '; - - // If they don't have anyone on their ignore list, don't list it! - if (empty(Utils::$context['ignore_list'])) { - echo ' - - - '; - } - - // Now loop through each buddy showing info on each. - foreach (Utils::$context['ignore_list'] as $member) { - echo ' - - - '; - - if (Utils::$context['can_moderate_forum']) { - echo ' - '; - } - echo ' - - '; - } - - echo ' - -
    ', Lang::getTxt('name', file: 'General'), '', Lang::getTxt('status', file: 'General'), '', Lang::getTxt('email', file: 'General'), '', Lang::getTxt('ignore_remove', file: 'Profile'), '
    - ', Lang::getTxt('no_ignore', file: 'Profile'), ' -
    - - - - - -
    -
    '; - - // Add to the ignore list? - echo ' -
    -
    -

    ', Lang::getTxt('ignore_add', file: 'Profile'), '

    -
    -
    -
    -
    - -
    -
    - - -
    -
    -
    '; - - if (!empty(Utils::$context['token_check'])) { - echo ' - '; - } - - echo ' - -
    - '; -} - -/** - * This template shows an admin information on a users IP addresses used and errors attributed to them. - */ -function template_trackActivity() -{ - // The first table shows IP information about the user. - echo ' -
    -

    ', Lang::getTxt('view_ips_by', ['member' => Utils::$context['member']['name']], file: 'Profile'), '

    -
    '; - - // The last IP the user used. - echo ' -
    -
    -
    - ', Lang::getTxt('most_recent_ip', file: 'Profile'), ' - ', (empty(Utils::$context['last_ip2']) ? '' : '
    - ' . Lang::getTxt('why_two_ip_address', file: 'Profile') . ''), ' -
    -
    - ', Utils::$context['last_ip'], ''; - - // Second address detected? - if (!empty(Utils::$context['last_ip2'])) { - echo ' - , ', Utils::$context['last_ip2'], ''; - } - - echo ' -
    '; - - // Lists of IP addresses used in messages / error messages. - echo ' -
    ', Lang::getTxt('ips_in_messages', file: 'Profile'), '
    -
    - ', (count(Utils::$context['ips']) > 0 ? Lang::sentenceList(Utils::$context['ips']) : Lang::getTxt('none', file: 'General')), ' -
    -
    ', Lang::getTxt('ips_in_errors', file: 'Profile'), '
    -
    - ', (count(Utils::$context['error_ips']) > 0 ? Lang::sentenceList(Utils::$context['error_ips']) : Lang::getTxt('none', file: 'General')), ' -
    '; - - // List any members that have used the same IP addresses as the current member. - echo ' -
    ', Lang::getTxt('members_in_range', file: 'Profile'), '
    -
    - ', (count(Utils::$context['members_in_range']) > 0 ? Lang::sentenceList(Utils::$context['members_in_range']) : Lang::getTxt('none', file: 'General')), ' -
    -
    -
    '; - - // Show the track user list. - template_show_list('track_user_list'); -} - -/** - * The template for trackIP, allowing the admin to see where/who a certain IP has been used. - */ -function template_trackIP() -{ - // This function always defaults to the last IP used by a member but can be set to track any IP. - // The first table in the template gives an input box to allow the admin to enter another IP to track. - echo ' -
    -

    ', Lang::getTxt('trackIP', file: 'Profile'), '

    -
    -
    -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    '; - - // The table inbetween the first and second table shows links to the whois server for every region. - if (Utils::$context['single_ip']) { - echo ' -
    -

    ', Lang::getTxt('whois_title', Utils::$context, file: 'Profile'), '

    -
    -
    '; - - foreach (Utils::$context['whois_servers'] as $server) { - echo ' - ', $server['name'], '
    '; - } - echo ' -
    -
    '; - } - - // The second table lists all the members who have been logged as using this IP address. - echo ' -
    -

    ', Lang::getTxt('members_from_ip', Utils::$context, file: 'Profile'), '

    -
    '; - - if (empty(Utils::$context['ips'])) { - echo ' -

    - ', Lang::getTxt('no_members_from_ip', file: 'Profile'), ' -

    '; - } else { - echo ' - - - - - - - - '; - - // Loop through each of the members and display them. - foreach (Utils::$context['ips'] as $ip => $memberlist) { - echo ' - - - - '; - } - - echo ' - -
    ', Lang::getTxt('ip_address', file: 'General'), '', Lang::getTxt('display_name', file: 'General'), '
    ', $ip, '', implode(', ', $memberlist), '
    '; - } - - echo ' -
    '; - - template_show_list('track_message_list'); - - echo '
    '; - - template_show_list('track_user_list'); - - // 3rd party integrations may have added additional tracking. - if (!empty(Utils::$context['additional_track_lists'])) { - foreach (Utils::$context['additional_track_lists'] as $list) { - echo '
    '; - - template_show_list($list); - } - } -} - -/** - * This template shows an admin which permissions a user have and which group(s) give them each permission. - */ -function template_showPermissions() -{ - echo ' -
    -

    - ', Lang::getTxt('showPermissions', file: 'Profile'), ' -

    -
    '; - - if (Utils::$context['member']['has_all_permissions']) { - echo ' -
    ', Lang::getTxt('showPermissions_all', file: 'Profile'), '
    '; - } else { - echo ' -
    ', Lang::getTxt('showPermissions_help', file: 'Profile'), '
    -
    '; - - if (!empty(Utils::$context['no_access_boards'])) { - echo ' -
    -

    ', Lang::getTxt('showPermissions_restricted_boards', file: 'Profile'), '

    -
    -
    ', - Lang::getTxt( - 'showPermissions_restricted_boards_desc', - [ - 'list' => Lang::sentenceList(array_map( - fn($brd) => '' . $brd['name'] . '', - Utils::$context['no_access_boards'], - )), - ], - file: 'Profile', - ), ' -
    '; - } - - // General Permissions section. - echo ' -
    -
    -

    ', Lang::getTxt('showPermissions_general', file: 'Profile'), '

    -
    '; - - if (!empty(Utils::$context['member']['permissions']['general'])) { - echo ' - - - - - - - - '; - - foreach (Utils::$context['member']['permissions']['general'] as $permission) { - echo ' - - - - '; - } - echo ' - -
    ', Lang::getTxt('showPermissions_permission', file: 'Profile'), '', Lang::getTxt('showPermissions_status', file: 'Profile'), '
    - ', $permission['is_denied'] ? '' . $permission['name'] . '' : $permission['name'], ' - '; - - if ($permission['is_denied']) { - echo ' - ', Lang::getTxt('showPermissions_denied', ['list' => Lang::sentenceList($permission['groups']['denied'])], file: 'Profile'), ''; - } else { - echo ' - ', Lang::getTxt('showPermissions_given', ['list' => Lang::sentenceList($permission['groups']['allowed'])], file: 'Profile'); - } - - echo ' -
    -
    -
    '; - } else { - echo ' -

    ', Lang::getTxt('showPermissions_none_general', file: 'Profile'), '

    '; - } - - // Board permission section. - echo ' -
    -
    -

    - ', Lang::getTxt('showPermissions_select', file: 'Profile'), ' - -

    -
    -
    '; - - if (!empty(Utils::$context['member']['permissions']['board'])) { - echo ' - - - - - - - - '; - - foreach (Utils::$context['member']['permissions']['board'] as $permission) { - echo ' - - - - '; - } - echo ' - -
    ', Lang::getTxt('showPermissions_permission', file: 'Profile'), '', Lang::getTxt('showPermissions_status', file: 'Profile'), '
    - ', $permission['is_denied'] ? '' . $permission['name'] . '' : $permission['name'], ' - '; - - if ($permission['is_denied']) { - echo ' - ', Lang::getTxt('showPermissions_denied', ['list' => Lang::sentenceList($permission['groups']['denied'])], file: 'Profile'), ''; - } else { - echo ' - ', Lang::getTxt('showPermissions_given', ['list' => Lang::sentenceList($permission['groups']['allowed'])], file: 'Profile'); - } - - echo ' -
    '; - } else { - echo ' -

    ', Lang::getTxt('showPermissions_none_board', file: 'Profile'), '

    '; - } - echo ' -
    '; - } -} - -/** - * Template for user statistics, showing graphs and the like. - */ -function template_statPanel() -{ - // First, show a few text statistics such as post/topic count. - echo ' -
    -
    -
    '; - - foreach (Utils::$context['text_stats'] as $key => $stat) { - echo ' -
    ', Lang::getTxt('statPanel_' . $key, file: 'Profile'), '
    '; - - if (!empty($stat['url'])) { - echo ' -
    ', $stat['text'], '
    '; - } else { - echo ' -
    ', $stat['text'], '
    '; - } - } - - echo ' -
    -
    '; - - // This next section draws a graph showing what times of day they post the most. - echo ' -
    -
    -

    - ', Lang::getTxt('statPanel_activityTime', file: 'Profile'), ' -

    -
    '; - - // If they haven't post at all, don't draw the graph. - if (empty(Utils::$context['posts_by_time'])) { - echo ' -

    ', Lang::getTxt('statPanel_noPosts', file: 'Profile'), '

    '; - } - - // Otherwise do! - else { - echo ' -
      '; - - // The labels. - foreach (Utils::$context['posts_by_time'] as $time_of_day) { - echo ' -
    • -
      -
      - ', Lang::getTxt('statPanel_activityTime_posts', [$time_of_day['posts'], $time_of_day['posts_percent'] / 100], file: 'Profile'), ' -
      -
      - ', $time_of_day['hour_format'], ' -
    • '; - } - - echo ' -
    '; - } - - echo ' -
    '; - - // Two columns with the most popular boards by posts and activity (activity = users posts / total posts). - echo ' -
    -
    -
    -

    - ', Lang::getTxt('statPanel_topBoards', file: 'Profile'), ' -

    -
    '; - - if (empty(Utils::$context['popular_boards'])) { - echo ' -

    ', Lang::getTxt('statPanel_noPosts', file: 'Profile'), '

    '; - } else { - echo ' -
    '; - - // Draw a bar for every board. - foreach (Utils::$context['popular_boards'] as $board) { - echo ' -
    ', $board['link'], '
    -
    -
    - ', Lang::getTxt('statPanel_topBoards_memberposts', [$board['posts'], $board['total_posts_member'], $board['posts_percent'] / 100], file: 'Profile'), ' -
    - ', empty(Utils::$context['hide_num_posts']) ? $board['posts'] : '', ' -
    '; - } - - echo ' -
    '; - } - echo ' -
    -
    -
    -

    - ', Lang::getTxt('statPanel_topBoardsActivity', file: 'Profile'), ' -

    -
    '; - - if (empty(Utils::$context['board_activity'])) { - echo ' -

    ', Lang::getTxt('statPanel_noPosts', file: 'Profile'), '

    '; - } else { - echo ' -
    '; - - // Draw a bar for every board. - foreach (Utils::$context['board_activity'] as $activity) { - echo ' -
    ', $activity['link'], '
    -
    -
    - ', Lang::getTxt('statPanel_topBoards_posts', [$activity['posts'], $activity['total_posts'], $activity['posts_percent'] / 100], file: 'Profile'), ' -
    - ', Lang::formatText('{0, number, percent}', [$activity['percent'] / 100]), ' -
    '; - } - - echo ' -
    '; - } - echo ' -
    -
    '; - - echo ' -
    '; -} - -/** - * Template for editing profile options. - */ -function template_edit_options() -{ - // The main header! - // because some browsers ignore autocomplete=off and fill username in display name and/ or email field, fake them out. - $url = !empty(Utils::$context['profile_custom_submit_url']) ? Utils::$context['profile_custom_submit_url'] : Config::$scripturl . '?action=profile;area=' . Utils::$context['menu_item_selected'] . ';u=' . Utils::$context['id_member']; - $url = Utils::$context['require_password'] && !empty(Config::$modSettings['force_ssl']) ? strtr($url, ['http://' => 'https://']) : $url; - - echo ' -
    -
    -

    '; - - // Don't say "Profile" if this isn't the profile... - if (!empty(Utils::$context['profile_header_text'])) { - echo ' - ', Utils::$context['profile_header_text']; - } else { - echo ' - ', Lang::getTxt('profile', file: 'General'); - } - - echo ' -

    -
    '; - - // Have we some description? - if (Utils::$context['page_desc']) { - echo ' -

    ', Utils::$context['page_desc'], '

    '; - } - - echo ' -
    '; - - // Any bits at the start? - if (!empty(Utils::$context['profile_prehtml'])) { - echo ' -
    ', Utils::$context['profile_prehtml'], '
    '; - } - - if (!empty(Utils::$context['profile_fields'])) { - echo ' -
    '; - } - - // Start the big old loop 'of love. - $lastItem = 'hr'; - - foreach (Utils::$context['profile_fields'] as $key => $field) { - // We add a little hack to be sure we never get more than one hr in a row! - if ($lastItem == 'hr' && $field['type'] == 'hr') { - continue; - } - - $lastItem = $field['type']; - - if ($field['type'] == 'hr') { - echo ' -
    -
    -
    '; - } elseif ($field['type'] == 'callback') { - if (isset($field['callback_func']) && function_exists('template_profile_' . $field['callback_func'])) { - $callback_func = 'template_profile_' . $field['callback_func']; - $callback_func(); - } - } else { - echo ' -
    - ', $field['type'] !== 'label' ? '' : '', ''; - - // Does it have any subtext to show? - if (!empty($field['subtext'])) { - echo ' -
    - ', $field['subtext'], ''; - } - - echo ' -
    -
    '; - - // Want to put something infront of the box? - if (!empty($field['preinput'])) { - echo ' - ', $field['preinput']; - } - - // What type of data are we showing? - if ($field['type'] == 'label') { - echo ' - ', $field['value']; - } - - // Maybe it's a text box - very likely! - elseif (in_array($field['type'], ['int', 'float', 'text', 'password', 'color', 'date', 'datetime', 'datetime-local', 'email', 'month', 'number', 'time', 'url'])) { - if ($field['type'] == 'int' || $field['type'] == 'float') { - $type = 'number'; - } else { - $type = $field['type']; - } - $step = $field['type'] == 'float' ? ' step="0.1"' : ''; - - echo ' - '; - } - // You "checking" me out? ;) - elseif ($field['type'] == 'check') { - echo ' - - '; - } - - // Always fun - select boxes! - elseif ($field['type'] == 'select') { - echo ' - '; - } - - // Something to end with? - if (!empty($field['postinput'])) { - echo ' - ', $field['postinput']; - } - - echo ' -
    '; - } - } - - if (!empty(Utils::$context['profile_fields'])) { - echo ' -
    '; - } - - // Are there any custom profile fields - if so print them! - if (!empty(Utils::$context['custom_fields'])) { - if ($lastItem != 'hr') { - echo ' -
    '; - } - - echo ' -
    '; - - foreach (Utils::$context['custom_fields'] as $field) { - echo ' -
    - ', $field['name'], '
    - ', $field['desc'], ' -
    -
    - ', $field['input_html'], ' -
    '; - } - - echo ' -
    '; - } - - // Any closing HTML? - if (!empty(Utils::$context['profile_posthtml'])) { - echo ' -
    ', Utils::$context['profile_posthtml'], '
    '; - } - - // Only show the password box if it's actually needed. - if (Utils::$context['require_password']) { - echo ' -
    -
    -
    - ', Lang::getTxt('required_security_reasons', file: 'Profile'), ' -
    -
    - -
    -
    '; - } - - // The button shouldn't say "Change profile" unless we're changing the profile... - if (!empty(Utils::$context['submit_button_text'])) { - echo ' - '; - } else { - echo ' - '; - } - - if (!empty(Utils::$context['token_check'])) { - echo ' - '; - } - - echo ' - - - -
    -
    '; - - // Any final spellchecking stuff? - if (!empty(Utils::$context['show_spellchecking'])) { - echo ' -
    '; - } -} - -/** - * Personal Message settings. - */ -function template_profile_pm_settings() -{ - echo ' -
    - -
    -
    - -
    -
    - -
    -
    - - -
    - -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    - - -
    -
    -
    -
    -
    - -
    -
    - - -
    '; - -} - -/** - * Template for showing theme settings. Note: template_options() actually adds the theme specific options. - */ -function template_profile_theme_settings() -{ - $skeys = array_keys(Utils::$context['theme_options']); - $first_option_key = array_shift($skeys); - $titled_section = false; - - foreach (Utils::$context['theme_options'] as $i => $setting) { - // Just spit out separators and move on - if (empty($setting) || !is_array($setting)) { - // Avoid double separators and empty titled sections - $empty_section = true; - - for ($j = $i + 1; $j < count(Utils::$context['theme_options']); $j++) { - // Found another separator, so we're done - if (!is_array(Utils::$context['theme_options'][$j])) { - break; - } - - // Once we know there's something to show in this section, we can stop - if (!isset(Utils::$context['theme_options'][$j]['enabled']) || !empty(Utils::$context['theme_options'][$j]['enabled'])) { - $empty_section = false; - break; - } - } - - if ($empty_section) { - if ($i === $first_option_key) { - $first_option_key = array_shift($skeys); - } - - continue; - } - - // Insert a separator (unless this is the first item in the list) - if ($i !== $first_option_key) { - echo ' -
    -
    -
    '; - } - - // Should we give a name to this section? - if (is_string($setting) && !empty($setting)) { - $titled_section = true; - echo ' -
    ' . $setting . '
    -
    '; - } else { - $titled_section = false; - } - - continue; - } - - // Is this disabled? - if (isset($setting['enabled']) && $setting['enabled'] === false) { - if ($i === $first_option_key) { - $first_option_key = array_shift($skeys); - } - - continue; - } - - // Some of these may not be set... Set to defaults here - $opts = ['calendar_start_day', 'topics_per_page', 'messages_per_page', 'display_quick_mod']; - - if (in_array($setting['id'], $opts) && !isset(Utils::$context['member']['options'][$setting['id']])) { - Utils::$context['member']['options'][$setting['id']] = 0; - } - - if (!isset($setting['type']) || $setting['type'] == 'bool') { - $setting['type'] = 'checkbox'; - } elseif ($setting['type'] == 'int' || $setting['type'] == 'integer') { - $setting['type'] = 'number'; - } elseif ($setting['type'] == 'string') { - $setting['type'] = 'text'; - } - - if (isset($setting['options'])) { - $setting['type'] = 'list'; - } - - echo ' -
    - '; - - if (isset($setting['description'])) { - echo ' -
    - ', $setting['description'], ''; - } - echo ' -
    -
    '; - - // Display checkbox options - if ($setting['type'] == 'checkbox') { - echo ' - - '; - } - - // How about selection lists, we all love them - elseif ($setting['type'] == 'list') { - echo ' - '; - } - // A textbox it is then - else { - if (isset($setting['type']) && $setting['type'] == 'number') { - $min = isset($setting['min']) ? ' min="' . $setting['min'] . '"' : ' min="0"'; - $max = isset($setting['max']) ? ' max="' . $setting['max'] . '"' : ''; - $step = isset($setting['step']) ? ' step="' . $setting['step'] . '"' : ''; - - echo ' - '; - } - - // end of this definition - echo ' -
    '; - } -} - -/** - * The template for configuring alerts - */ -function template_alert_configuration() -{ - echo ' -
    -

    - ', Lang::getTxt('alert_prefs', file: 'Profile'), ' -

    -
    -

    - ', (empty(Utils::$context['description']) ? Lang::getTxt('alert_prefs_desc', file: 'Profile') : Utils::$context['description']), ' -

    -
    -
    -

    - ', Lang::getTxt('notification_general', file: 'Profile'), ' -

    -
    -
    -
    -
    - ', Utils::$context['id_member'] == 0 ? ' -
    - ' . Lang::getTxt('notify_announcements_desc', file: 'Admin') . '' : '', ' -
    -
    - - -
    '; - - if (!empty(Config::$modSettings['enable_ajax_alerts'])) { - echo ' -
    - -
    -
    - -
    '; - } - - echo ' -
    -
    -
    -

    - ', Lang::getTxt('notify_what_how', file: 'Profile'), ' -

    -
    - '; - - foreach (Utils::$context['alert_types'] as $alert_group => $alerts) { - echo ' - - - - - - '; - - if (isset(Utils::$context['alert_group_options'][$alert_group])) { - foreach (Utils::$context['alert_group_options'][$alert_group] as $opts) { - if ($opts[0] == 'hide') { - continue; - } - - echo ' - - - '; - } - } - - foreach ($alerts as $alert_id => $alert_details) { - echo ' - - '; - - foreach (Utils::$context['alert_bits'] as $type => $bitmask) { - echo ' - '; - } - - echo ' - '; - } - } - - echo ' -
    ', Lang::getTxt('alert_group_' . $alert_group, file: 'Profile'), '', Lang::getTxt('receive_alert', file: 'Profile'), '', Lang::getTxt('receive_mail', file: 'Profile'), '
    '; - - $label = Lang::getTxt('alert_opt_' . $opts[1], file: 'Profile'); - $label_pos = $opts['label'] ?? ''; - - if ($label_pos == 'before') { - echo ' - '; - } - - $this_value = Utils::$context['alert_prefs'][$opts[1]] ?? 0; - - switch ($opts[0]) { - case 'check': - echo ' - '; - break; - - case 'select': - echo ' - '; - break; - } - - if ($label_pos == 'after') { - echo ' - '; - } - - echo ' -
    - ', Lang::getTxt('alert_' . $alert_id, file: 'Profile'), isset($alert_details['help']) ? '' : '', ' - '; - - $this_value = Utils::$context['alert_prefs'][$alert_id] ?? 0; - - switch ($alert_details[$type]) { - case 'always': - echo ' - '; - break; - - case 'yes': - echo ' - '; - break; - - case 'never': - echo ' - '; - break; - } - echo ' -
    -
    -
    - - ', !empty(Utils::$context['token_check']) ? ' - ' : '', ' - - -
    -
    -
    '; -} - -/** - * Template for showing which topics you're subscribed to - */ -function template_alert_notifications_topics() -{ - // The main containing header. - echo ' -
    -

    - ', Lang::getTxt('watched_topics', file: 'Profile'), ' -

    -
    -

    ', Lang::getTxt('watched_topics_desc', file: 'Profile'), '

    -
    '; - - template_show_list('topic_notification_list'); -} - -/** - * Template for showing which boards you're subscribed to - */ -function template_alert_notifications_boards() -{ - echo ' -
    -

    - ', Lang::getTxt('watched_boards', file: 'Profile'), ' -

    -
    -

    ', Lang::getTxt('watched_boards_desc', file: 'Profile'), '

    -
    '; - - template_show_list('board_notification_list'); -} - -/** - * Template for choosing group membership. - */ -function template_groupMembership() -{ - // The main containing header. - echo ' -
    -
    -

    - ', Lang::getTxt('profile', file: 'General'), ' -

    -
    -

    ', Lang::getTxt('groupMembership_info', file: 'Profile'), '

    '; - - // Do we have an update message? - if (!empty(Utils::$context['update_message'])) { - echo ' -
    - ', Utils::$context['update_message'], ' -
    '; - } - - echo ' -
    '; - - // Requesting membership to a group? - if (!empty(Utils::$context['group_request'])) { - echo ' -
    -
    -

    ', Lang::getTxt('request_group_membership', file: 'Profile'), '

    -
    -
    - ', Lang::getTxt('request_group_membership_desc', file: 'Profile'), ' - -
    - - -
    -
    -
    '; - } else { - echo ' -
    -

    ', Lang::getTxt('current_membergroups', file: 'Profile'), '

    -
    '; - - foreach (Utils::$context['groups']['member'] as $group) { - echo ' -
    '; - - if (Utils::$context['can_edit_primary']) { - echo ' - '; - } - - echo ' - '; - - // Can they leave their group? - if ($group['can_leave']) { - echo ' - ' . Lang::getTxt('leave_group', file: 'Profile') . ''; - } - - echo ' -
    '; - } - - if (Utils::$context['can_edit_primary']) { - echo ' -
    - -
    '; - } - - // Any groups they can join? - if (!empty(Utils::$context['groups']['available'])) { - echo ' -
    -

    ', Lang::getTxt('available_groups', file: 'Profile'), '

    -
    '; - - foreach (Utils::$context['groups']['available'] as $group) { - echo ' -
    - ', (empty($group['color']) ? $group['name'] : '' . $group['name'] . ''), '', (!empty($group['desc']) ? '
    ' . $group['desc'] . '' : ''), ''; - - if ($group['type'] == 3) { - echo ' - ', Lang::getTxt('join_group', file: 'Profile'), ''; - } elseif ($group['type'] == 2 && $group['pending']) { - echo ' - ', Lang::getTxt('approval_pending', file: 'Profile'), ''; - } elseif ($group['type'] == 2) { - echo ' - ', Lang::getTxt('request_group', file: 'Profile'), ''; - } - - echo ' -
    '; - } - } - - } - - echo ' -
    '; - - if (!empty(Utils::$context['token_check'])) { - echo ' - '; - } - - echo ' - - -
    '; -} - -/** - * Template for managing ignored boards - */ -function template_ignoreboards() -{ - // The main containing header. - echo ' -
    -
    -

    - ', Lang::getTxt('profile', file: 'General'), ' -

    -
    -

    ', Lang::getTxt('ignoreboards_info', file: 'Profile'), '

    -
    -
    -
      '; - - foreach (Utils::$context['categories'] as $category) { - echo ' -
    • - ', $category['name'], ' -
        '; - - $cat_boards = array_values($category['boards']); - - foreach ($cat_boards as $key => $board) { - echo ' -
      • - '; - - // Nest child boards inside another list. - $curr_child_level = $board['child_level']; - $next_child_level = $cat_boards[$key + 1]['child_level'] ?? 0; - - if ($next_child_level > $curr_child_level) { - echo ' -
          '; - } else { - // Close child board lists until we reach a common level - // with the next board. - while ($next_child_level < $curr_child_level--) { - echo ' - -
        '; - } - - echo ' -
      • '; - } - } - - echo ' -
      -
    • '; - } - - echo ' -
    -
    '; - - // Show the standard "Save Settings" profile button. - template_profile_save(); - - echo ' -
    -
    -
    '; -} - -/** - * Simply loads some theme variables common to several warning templates. - */ -function template_load_warning_variables() -{ - // Setup the warning mode - Utils::$context['warning_mode'] = [ - 0 => 'none', - Config::$modSettings['warning_watch'] => 'watched', - Config::$modSettings['warning_moderate'] => 'moderated', - Config::$modSettings['warning_mute'] => 'muted', - ]; - - // Work out the starting warning. - Utils::$context['current_warning_mode'] = Utils::$context['warning_mode'][0]; - - foreach (Utils::$context['warning_mode'] as $limit => $warning) { - if (Utils::$context['member']['warning'] >= $limit) { - Utils::$context['current_warning_mode'] = $warning; - } - } -} - -/** - * Template for viewing a user's warnings - */ -function template_viewWarning() -{ - template_load_warning_variables(); - - echo ' -
    -

    - ', Lang::getTxt('profile_viewwarning_for_user', Utils::$context['member'], file: 'Profile'), ' -

    -
    -

    ', Lang::getTxt('viewWarning_help', file: 'Profile'), '

    -
    -
    -
    - ', Lang::getTxt('profile_warning_name', file: 'Profile'), ' -
    -
    - ', Utils::$context['member']['name'], ' -
    -
    - ', Lang::getTxt('profile_warning_level', file: 'Profile'), ' -
    -
    -
    -
    - ', Utils::$context['member']['warning'], '% -
    -
    '; - - // There's some impact of this? - if (!empty(Utils::$context['level_effects'][Utils::$context['current_level']])) { - echo ' -
    - ', Lang::getTxt('profile_viewwarning_impact', file: 'Profile'), ' -
    -
    - ', Utils::$context['level_effects'][Utils::$context['current_level']], ' -
    '; - } - - echo ' -
    -
    '; - - template_show_list('view_warnings'); -} - -/** - * Template for issuing warnings - */ -function template_issueWarning() -{ - template_load_warning_variables(); - - // The bodies of the notification templates and the text for each warning - // level. profile.js does the rest; all it needs from here is the data. - echo ' - '; - - echo ' -
    -
    -

    - ', Lang::getTxt(Profile::$member->is_me ? 'profile_warning_level' : 'profile_issue_warning', file: 'Profile'), ' -

    -
    '; - - if (!Profile::$member->is_me) { - echo ' -

    ', Lang::getTxt('profile_warning_desc', file: 'Profile'), '

    '; - } - - echo ' -
    -
    '; - - if (!Profile::$member->is_me) { - echo ' -
    - ', Lang::getTxt('profile_warning_name', file: 'Profile'), ' -
    -
    - ', Utils::$context['member']['name'], ' -
    '; - } - - echo ' -
    - ', Lang::getTxt('profile_warning_level', file: 'Profile'), ''; - - // Is there only so much they can apply? - if (Utils::$context['warning_limit']) { - echo ' -
    - ', Lang::getTxt('profile_warning_limit_attribute', [Utils::$context['warning_limit'] / 100], file: 'Profile'), ''; - } - - echo ' -
    -
    - ', Lang::formatText('{0, number, :: percent}', [0]), ' ', Lang::formatText('{0, number, :: percent}', [100]), ' -
    - ', Lang::getTxt('profile_warning_impact', file: 'Profile'), ': ', Lang::formatText('{0, number, :: percent}', [Utils::$context['member']['warning']]), ' (', Utils::$context['level_effects'][Utils::$context['current_level']], ') -
    -
    '; - - if (!Profile::$member->is_me) { - echo ' -
    - ', Lang::getTxt('profile_warning_reason', file: 'Profile'), '
    - ', Lang::getTxt('profile_warning_reason_desc', file: 'Profile'), ' -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - - -
    - -
    '; - } - echo ' -
    -
    '; - - if (!empty(Utils::$context['token_check'])) { - echo ' - '; - } - - echo ' - - - -
    -
    -
    '; - - // Previous warnings? - template_show_list('view_warnings'); -} - -/** - * Template to show for deleting a user's account - now with added delete post capability! - */ -function template_deleteAccount() -{ - // The main containing header. - echo ' -
    -
    -

    - ', Lang::getTxt('deleteAccount', file: 'Profile'), ' -

    -
    '; - - // If deleting another account give them a lovely info box. - if (!Profile::$member->is_me) { - echo ' -

    ', Lang::getTxt('deleteAccount_desc', file: 'Profile'), '

    '; - } - - echo ' -
    '; - - // If they are deleting their account AND the admin needs to approve it - give them another piece of info ;) - if (Utils::$context['needs_approval']) { - echo ' -
    ', Lang::getTxt('deleteAccount_approval', file: 'Profile'), '
    '; - } - - // If the user is deleting their own account warn them first - and require a password! - if (Profile::$member->is_me) { - echo ' -
    ', Lang::getTxt('own_profile_confirm', file: 'Profile'), '
    -
    '; - - if (!empty(Config::$modSettings['always_anonymize_deleted_accounts'])) { - echo ' - ' . Lang::getTxt('deleteAccount_anonymize_forced', file: 'Profile'); - } else { - echo ' - '; - } - - echo ' -
    -
    - ', Lang::getTxt('required_security_reasons', file: 'Profile'), ' - ', Lang::getTxt('current_password', file: 'Profile'), ' - -
    - '; - - if (!empty(Utils::$context['token_check'])) { - echo ' - '; - } - - echo ' - - - '; - } - // Otherwise an admin doesn't need to enter a password - but they still get a warning - plus the option to delete lovely posts! - else { - echo ' -
    ', Lang::getTxt('deleteAccount_warning', file: 'Profile'), '
    '; - - // Only actually give these options if they are kind of important. - if (Utils::$context['can_delete_posts']) { - echo ' -
    - -
    -
    - - '; - - if (Utils::$context['show_perma_delete']) { - echo ' -
    - '; - } - - echo ' -
    '; - } - - echo ' -
    - -
    '; - - if (!empty(Config::$modSettings['always_anonymize_deleted_accounts'])) { - echo ' - ' . Lang::getTxt('deleteAccount_anonymize_forced', file: 'Profile'); - } else { - echo ' - '; - } - - echo ' -
    -
    - '; - - if (!empty(Utils::$context['token_check'])) { - echo ' - '; - } - - echo ' - - - -
    '; - } - echo ' -
    -
    -
    '; -} - -/** - * Template for the password box/save button stuck at the bottom of every profile page. - */ -function template_profile_save() -{ - echo ' - -
    '; - - // Only show the password box if it's actually needed. - if (Utils::$context['require_password']) { - echo ' -
    -
    - ', Lang::getTxt('current_password', file: 'Profile'), '
    - ', Lang::getTxt('required_security_reasons', file: 'Profile'), ' -
    -
    - -
    -
    '; - } - - echo ' -
    '; - - if (!empty(Utils::$context['token_check'])) { - echo ' - '; - } - - echo ' - - - - -
    '; -} - -/** - * Small template for showing an error message upon a save problem in the profile. - */ -function template_error_message() -{ - echo ' -
    '; - - if (!empty(Utils::$context['post_errors'])) { - echo ' - ', !empty(Utils::$context['custom_error_title']) ? Utils::$context['custom_error_title'] : Lang::getTxt('profile_errors_occurred', file: 'Errors'), ' -
      '; - - // Cycle through each error and display an error message. - foreach (Utils::$context['post_errors'] as $error) { - if ($error == 'password_short') { - $error_message = Lang::getTxt('profile_error_' . $error, [Security::minimumPasswordLength()], file: 'Profile'); - } else { - $error_message = Lang::txtExists('profile_error_' . $error, file: 'Profile') ? Lang::getTxt('profile_error_' . $error, file: 'Profile') : $error; - } - - echo ' -
    • ', $error_message, '
    • '; - } - - echo ' -
    '; - } - - echo ' -
    '; -} - -/** - * Display a load of drop down selectors for allowing the user to change group. - */ -function template_profile_group_manage() -{ - echo ' -
    -
    - ', Lang::getTxt('moderator_why_missing', file: 'Profile'), ' -
    -
    - -
    -
    - ', Lang::getTxt('additional_membergroups', file: 'Profile'), ' -
    -
    - - '; - - // For each membergroup show a checkbox so members can be assigned to more than one group. - foreach (Utils::$context['member_groups'] as $member_group) { - if ($member_group['can_be_additional']) { - echo ' -
    '; - } - } - - echo ' -
    - - -
    '; - -} - -/** - * Show the signature editing box? - */ -function template_profile_signature_modify() -{ - echo ' - - - - - - -
    -
    - ', Lang::getTxt('sig_info', file: 'Profile'), '
    -
    '; - - if (Utils::$context['show_spellchecking']) { - echo ' - '; - } - - echo ' -
    -
    -
    '; - - // If there is a limit at all! - if (!empty(Utils::$context['signature_limits']['max_length'])) { - echo ' - ', Lang::getTxt('max_sig_characters', Utils::$context['signature_limits'], file: 'Profile'), '
    '; - } - - if (!empty(Utils::$context['show_preview_button'])) { - echo ' - '; - } - - if (Utils::$context['signature_warning']) { - echo ' - ', Utils::$context['signature_warning'], ''; - } - - echo ' -
    '; -} - -/** - * Template for selecting an avatar - */ -function template_profile_avatar_select() -{ - // Start with the upper menu - echo ' -
    - - - '; - - if (empty(Config::$modSettings['gravatarEnabled']) || empty(Config::$modSettings['gravatarOverride'])) { - echo ' - -
    '; - } - - if (!empty(Utils::$context['member']['avatar']['allow_server_stored'])) { - echo ' - -
    '; - } - - if (!empty(Utils::$context['member']['avatar']['allow_external'])) { - echo ' - -
    '; - } - - if (!empty(Utils::$context['member']['avatar']['allow_upload'])) { - echo ' - -
    '; - } - - if (!empty(Utils::$context['member']['avatar']['allow_gravatar'])) { - echo ' - - - '; - } - - echo ' -
    -
    '; - - // If users are allowed to choose avatars stored on the server show selection boxes to choice them from. - if (!empty(Utils::$context['member']['avatar']['allow_server_stored'])) { - echo ' -
    -
    - -
    -
    - -
    -
    '; - } - - // If the user can link to an off server avatar, show them a box to input the address. - if (!empty(Utils::$context['member']['avatar']['allow_external'])) { - echo ' -
    - ', Utils::$context['member']['avatar']['choice'] == 'external' ? '
    ' : '', ' -
    ', Lang::getTxt('avatar_by_url', file: 'Profile'), '
    ', !empty(Config::$modSettings['avatar_action_too_large']) && Config::$modSettings['avatar_action_too_large'] == 'option_download_and_resize' ? template_max_size('external') : '', ' -
    -
    '; - } - - // If the user is able to upload avatars to the server show them an upload box. - if (!empty(Utils::$context['member']['avatar']['allow_upload'])) { - echo ' -
    - ', Utils::$context['member']['avatar']['choice'] == 'upload' ? '
    ' : '', ' - ', template_max_size('upload'), ' - ', (!empty(Utils::$context['member']['avatar']['id_attach']) ? '
    ' : ''), ' -
    '; - } - - // if the user is able to use Gravatar avatars show then the image preview - if (!empty(Utils::$context['member']['avatar']['allow_gravatar'])) { - echo ' -
    - ', Utils::$context['member']['avatar']['choice'] == 'gravatar' ? '
    ' : ''; - - if (empty(Config::$modSettings['gravatarAllowExtraEmail'])) { - echo ' -
    ', Lang::getTxt('gravatar_noAlternateEmail', file: 'Profile'), '
    '; - } else { - // Depending on other stuff, the stored value here might have some odd things in it from other areas. - if (Utils::$context['member']['avatar']['external'] == Utils::$context['member']['email']) { - $textbox_value = ''; - } else { - $textbox_value = Utils::$context['member']['avatar']['external']; - } - - echo ' -
    ', Lang::getTxt('gravatar_alternateEmail', file: 'Profile'), '
    - '; - } - echo ' -
    '; - } - - echo ' -
    '; -} - -/** - * This is just a really little helper to avoid duplicating code unnecessarily - * - * @param string $type The type of avatar - */ -function template_max_size($type) -{ - $w = !empty(Config::$modSettings['avatar_max_width_' . $type]) ? Lang::numberFormat(Config::$modSettings['avatar_max_width_' . $type]) : 0; - $h = !empty(Config::$modSettings['avatar_max_height_' . $type]) ? Lang::numberFormat(Config::$modSettings['avatar_max_height_' . $type]) : 0; - - $suffix = (!empty($w) ? 'w' : '') . (!empty($h) ? 'h' : ''); - - if (empty($suffix)) { - return; - } - - echo ' -
    ', Lang::getTxt('avatar_max_size_' . $suffix, ['w' => $w, 'h' => $h], file: 'Profile'), '
    '; -} - -/** - * Select the time format! - */ -function template_profile_timeformat_modify() -{ - echo ' -
    -
    - - - - -
    -
    - - -
    '; -} - -/** - * Template for picking a theme - */ -function template_profile_theme_pick() -{ - echo ' -
    - ', Lang::getTxt('current_theme', file: 'Profile'), ' -
    -
    - ', Utils::$context['member']['theme']['name'], ' ', Lang::getTxt('change', file: 'Profile'), ' -
    '; -} - -/** - * Smiley set picker. - */ -function template_profile_smiley_pick() -{ - echo ' -
    - -
    -
    - - :) -
    '; -} - -/** - * Template for setting up and managing Two-Factor Authentication. - */ -function template_tfasetup() -{ - echo ' -
    -

    ', Lang::getTxt('tfa_title', file: 'Profile'), '

    -
    -
    -
    '; - - if (!empty(Utils::$context['tfa_backup'])) { - echo ' -
    - ', Lang::getTxt('tfa_backup_used_desc', file: 'Profile'), ' -
    '; - } elseif (Config::$modSettings['tfa_mode'] == 2) { - echo ' -
    - ', Lang::getTxt('tfa_forced_desc', file: 'Profile'), ' -
    '; - } - - echo ' -
    - ', Lang::getTxt('tfa_desc', file: 'Profile'), ' -
    -
    -
    -
    - ', Lang::getTxt('tfa_step1', file: 'Profile'), '
    '; - - if (!empty(Utils::$context['tfa_pass_error'])) { - echo ' -
    - ', Lang::getTxt('tfa_pass_invalid', file: 'Profile'), ' -
    '; - } - - echo ' - -
    -
    - ', Lang::getTxt('tfa_step2', file: 'Profile'), ' -
    ', Lang::getTxt('tfa_step2_desc', file: 'Profile'), '
    -
    ', Utils::$context['tfa_secret'], '
    -
    -
    - ', Lang::getTxt('tfa_step3', file: 'Profile'), '
    '; - - if (!empty(Utils::$context['tfa_error'])) { - echo ' -
    - ', Lang::getTxt('tfa_code_invalid', file: 'Profile'), ' -
    '; - } - - echo ' - - -
    - - -
    -
    -
    -
    - -
    '; - - if (!empty(Utils::$context['from_ajax'])) { - echo ' -
    - '; - } - - echo ' -
    -
    '; -} - -/** - * Template for disabling two-factor authentication. - */ -function template_tfadisable() -{ - echo ' -
    -

    ', Lang::getTxt('tfadisable', file: 'Profile'), '

    -
    -
    -
    '; - - if (Profile::$member->is_me) { - echo ' -
    - ', Lang::getTxt('current_password', file: 'Profile'), '
    - -
    '; - } else { - echo ' -
    - ', Lang::getTxt('tfa_disable_for_user', ['name' => User::$me->name], file: 'Profile'), ' -
    '; - } - - echo ' - - - - -
    -
    '; -} - -/** - * Template for setting up 2FA backup code - */ -function template_tfasetup_backup() -{ - echo ' -
    -

    ', Lang::getTxt('tfa_backup_title', file: 'Profile'), '

    -
    -
    -
    -
    ', Lang::getTxt('tfa_backup_desc', file: 'Profile'), '
    -
    ', Utils::$context['tfa_backup'], '
    -
    -
    '; -} - -/** - * Simple template for showing the 2FA area when editing a profile. - */ -function template_profile_tfa() -{ - echo ' -
    - ', Lang::getTxt('tfa_profile_label', file: 'Profile'), '
    -
    ', Lang::getTxt('tfa_profile_desc', file: 'Profile'), '
    -
    -
    '; - - if (!Utils::$context['tfa_enabled'] && Profile::$member->is_me) { - echo ' - ', Lang::getTxt('tfa_profile_enable', file: 'Profile'), ''; - } elseif (!Utils::$context['tfa_enabled']) { - echo ' - ', Lang::getTxt('tfa_profile_disabled', file: 'Profile'); - } else { - echo ' - ', Lang::getTxt('tfa_profile_enabled', ['url' => (!empty(Config::$modSettings['force_ssl']) ? strtr(Config::$scripturl, ['http://' => 'https://']) : Config::$scripturl) . '?action=profile;u=' . Utils::$context['id_member'] . ';area=tfadisable'], file: 'Profile'); - } - - echo ' -
    '; -} - -/** - * Template for initiating and retrieving profile data exports - */ -function template_export_profile_data() -{ - $default_settings = ['included' => [], 'format' => '']; - $dltoken = ''; - - // The main containing header. - echo ' -
    -

    - ', Lang::getTxt('export_profile_data', file: 'Profile'), ' -

    -
    -
    ', Utils::$context['export_profile_data_desc'], '
    '; - - if (!empty(Utils::$context['completed_exports'])) { - echo ' -
    -

    ', Lang::getTxt('completed_exports', file: 'Profile'), '

    -
    -
    '; - - foreach (Utils::$context['completed_exports'] as $basehash_ext => $parts) { - echo ' -
    '; - - if (!empty(Utils::$context['outdated_exports'][$basehash_ext])) { - echo ' -
    -

    ', Lang::getTxt('export_outdated_warning', file: 'Profile'), '

    -
      '; - - foreach (Utils::$context['outdated_exports'][$basehash_ext] as $datatype) { - echo ' -
    • ', Lang::getTxt($datatype, file: 'General+Profile'), '
    • '; - } - - echo ' -
    -
    '; - } - - echo ' -

    ', Lang::getTxt( - 'export_file_desc', - [ - 'list' => $parts[1]['included_desc'], - 'format' => Utils::$context['export_formats'][$parts[1]['format']]['description'], - ], - file: 'Profile', - ), '

    '; - - if (count($parts) > 10) { - echo ' -
    - ', Lang::getTxt('export_file_count', [count($parts)], file: 'Profile'), ''; - } - - echo ' -
      '; - - foreach ($parts as $part => $file) { - $dltoken = $file['dltoken']; - - if (empty($default_settings['included'])) { - $default_settings['included'] = $file['included']; - } - - if (empty($default_settings['format'])) { - $default_settings['format'] = $file['format']; - } - - echo ' -
    • - ', $file['dlbasename'], ' (', $file['size'], ', ', $file['mtime'], ') -
    • '; - } - - echo ' -
    '; - - if (count($parts) > 10) { - echo ' -
    '; - } - - echo ' -
    - - - - -
    -
    '; - } - - echo ' -
    '; - } - - if (!empty(Utils::$context['active_exports'])) { - echo ' -
    -

    ', Lang::getTxt('active_exports', file: 'Profile'), '

    -
    -
    '; - - foreach (Utils::$context['active_exports'] as $file) { - $dltoken = $file['dltoken']; - - if (empty($default_settings['included'])) { - $default_settings['included'] = $file['included']; - } - - if (empty($default_settings['format'])) { - $default_settings['format'] = $file['format']; - } - - echo ' -
    1 ? ' class="descbox"' : '', '> -

    ', Lang::getTxt( - 'export_file_desc', - [ - 'list' => $file['included_desc'], - 'format' => Utils::$context['export_formats'][$file['format']]['description'], - ], - file: 'Profile', - ), '

    -
    - - - -
    -
    '; - } - - echo ' -
    '; - } - - echo ' -
    -

    ', Lang::getTxt('export_settings', file: 'Profile'), '

    -
    -
    -
    -
    '; - - foreach (Utils::$context['export_datatypes'] as $datatype => $datatype_settings) { - if (!empty($datatype_settings['label'])) { - echo ' -
    - -
    -
    - -
    '; - } - } - - echo ' -
    -
    -
    - ', Lang::getTxt('export_format', file: 'Profile'), ' -
    -
    - -
    -
    -
    '; - - // At least one active or completed export exists. - if (!empty($dltoken)) { - echo ' - -
    - - - -
    '; - } - // No existing exports. - else { - echo ' - '; - } - - echo ' - - -
    -
    -
    '; -} - -/** - * Template for allowing the member to choose their time zone. - */ -function template_profile_timezone() -{ - // Just in case... - Theme::loadTemplate('TimeZoneSelect'); - - echo ' -
    - - - -
    -
    '; - - - // This part is easy enough. - template_timezone_select('timezone', Profile::$member->timezone); - - echo ' -
    '; -} diff --git a/Themes/default/TimeZoneSelect.template.php b/Themes/default/TimeZoneSelect.template.php deleted file mode 100644 index 3ea92b80deb..00000000000 --- a/Themes/default/TimeZoneSelect.template.php +++ /dev/null @@ -1,87 +0,0 @@ - 1) { - $attributes[] = 'data-force-disabled'; - } - - foreach ($extra as $key => $value) { - if (empty($value)) { - continue; - } - - if ($value === true) { - $attributes[] = $key; - } else { - $attributes[] = $key . '="' . $value . '"'; - } - } - - // Setting width on selects inside floating elements can be flaky, - // so we need to calculate the width value manually. - $width = 0; - - foreach ($timezone_list as $list) { - $width = max($width, max(array_map(fn($label) => Utils::entityStrlen($label), $list))); - } - - $attributes[] = 'style="width:min(' . ($width * 0.9) . 'ch, 100%)'; - - echo ' - '; -} diff --git a/Themes/default/templates/Admin/admin.php b/Themes/default/templates/Admin/admin.php new file mode 100644 index 00000000000..753dfa6b9d9 --- /dev/null +++ b/Themes/default/templates/Admin/admin.php @@ -0,0 +1,130 @@ + + + +
    +
    + +
    +
    +

    + +

    +
    +
    +
    +
    +
    + +
    +
    +

    + +

    +
    +
    +
    + +
      +
    • Utils::$context['forum_version']], file: 'Admin') ?>
    • +
    • '??'], file: 'Admin') ?>
    • +
    • ' . Lang::getTxt('version_check_more', file: 'Admin') . '' : '' ?>
    • +
    + +
    + Lang::sentenceList(Utils::$context['administrators'])], file: 'Admin') ?> + + + + () + +
    +
    +
    +
    + $area): ?> +
    + + $item): ?> + + + + + + + + + + + +
    + + + + + + + + \ No newline at end of file diff --git a/Themes/default/templates/Admin/admin_quick_search.php b/Themes/default/templates/Admin/admin_quick_search.php new file mode 100644 index 00000000000..1471ccb7943 --- /dev/null +++ b/Themes/default/templates/Admin/admin_quick_search.php @@ -0,0 +1,36 @@ +is_admin): ?> + diff --git a/Themes/default/templates/Admin/admin_search_results.php b/Themes/default/templates/Admin/admin_search_results.php new file mode 100644 index 00000000000..721e47c38b5 --- /dev/null +++ b/Themes/default/templates/Admin/admin_search_results.php @@ -0,0 +1,63 @@ + +
    +

    + + + +

    + subTemplate('admin_quick_search'); ?> +
    +
    + +

    + +

    + +
      + + + +
    1. +

      + +

      +

      + +

      +
    2. + + +
    3. + [] + +

      + +
    4. + + +
    + +
    \ No newline at end of file diff --git a/Themes/default/templates/Admin/callback_question_answer_list.php b/Themes/default/templates/Admin/callback_question_answer_list.php new file mode 100644 index 00000000000..92fe14fca2a --- /dev/null +++ b/Themes/default/templates/Admin/callback_question_answer_list.php @@ -0,0 +1,49 @@ + $lang): ?> '']); +$lang['name'] = strtr($lang['name'], ['-utf8' => '']); +?> + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + + +
    +
    [ ]
    +
    +
    diff --git a/Themes/default/templates/Admin/clean_cache_button_above.php b/Themes/default/templates/Admin/clean_cache_button_above.php new file mode 100644 index 00000000000..9e8e00cf9ea --- /dev/null +++ b/Themes/default/templates/Admin/clean_cache_button_above.php @@ -0,0 +1,20 @@ + +
    +

    +
    +
    +
    +

    + + + +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/Admin/credits.php b/Themes/default/templates/Admin/credits.php new file mode 100644 index 00000000000..0d1b6848fc1 --- /dev/null +++ b/Themes/default/templates/Admin/credits.php @@ -0,0 +1,99 @@ + +
    +
    +

    + +

    +
    +
    + + +
      +
    • Utils::$context['forum_version']], file: 'Admin') ?>' . Lang::getTxt('version_check_more', file: 'Admin') . '' : '' ?>
    • +
    • '??'], file: 'Admin') ?>
    • +
    + : + +
    +
    +
    +

    + +

    +
    +
    +

    +

    +
    +
    +

    + +

    +
    +
    +

    +
    +
    +
    + +
    +
    +
    +
    +

    +
    +
    + + + + \ No newline at end of file diff --git a/Themes/default/templates/Admin/edit_censored.php b/Themes/default/templates/Admin/edit_censored.php new file mode 100644 index 00000000000..c25cb1d34f0 --- /dev/null +++ b/Themes/default/templates/Admin/edit_censored.php @@ -0,0 +1,95 @@ + +
    +
    +
    +

    + +

    +
    +
    +

    [good ]. */ ?> $proper): ?> +
    + => +
    +
    + => +
    +
    + + +
    +
    +
    + +
    +
    + > +
    +
    + +
    +
    + > +
    +
    + +
    +
    + > +
    +
    + + +
    + + +
    +
    + > +
    +
    + +
    +
    +

    + +

    +
    +
    +

    + + +

    +
    + + + +
    \ No newline at end of file diff --git a/Themes/default/templates/Admin/edit_profile_field.php b/Themes/default/templates/Admin/edit_profile_field.php new file mode 100644 index 00000000000..57aa889776e --- /dev/null +++ b/Themes/default/templates/Admin/edit_profile_field.php @@ -0,0 +1,234 @@ + + + + + + + +
    +
    + + +
    +
    +

    +
    +
    +
    + + +
    +
    + +
    + +
    +
    + +
    +
    + + + +
    + +
    +
    + +
    +
    +
    + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + +
    +
    + > +
    +
    + +
    +
    + > +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + > +
    +
    + +
    + +
    + +
    +
    + $option): ?> + ' ?>> + + + [] +
    +
    + +
    +
    + > +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + +
    + + + +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    + > +
    +
    +
    + +
    +
    + > +
    +
    +
    + + + + +
    + + +
    + + \ No newline at end of file diff --git a/Themes/default/templates/Admin/index.php b/Themes/default/templates/Admin/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Admin/index.php @@ -0,0 +1,8 @@ + +
    +

    + +

    +
    +
    + + + +
    + % +
    +
    + + +
    + (%) +
    +
    + +
    + + + + + + +
    +
    + \ No newline at end of file diff --git a/Themes/default/templates/Admin/php_info.php b/Themes/default/templates/Admin/php_info.php new file mode 100644 index 00000000000..df37311215c --- /dev/null +++ b/Themes/default/templates/Admin/php_info.php @@ -0,0 +1,76 @@ + +
    +
    +

    + +

    +
    + + $php_area): ?> + + + + + + + + + + + $setting): ?> + + + + + + + + + + + + + + $value): ?> + + + + + + + + + + + + +
    +
    + +
    \ No newline at end of file diff --git a/Themes/default/templates/Admin/repair_boards.php b/Themes/default/templates/Admin/repair_boards.php new file mode 100644 index 00000000000..9f9e80a5e60 --- /dev/null +++ b/Themes/default/templates/Admin/repair_boards.php @@ -0,0 +1,62 @@ + +
    +

    +

    +
    +
    + +
      +
    • + +
    • +
    +

    + +

    +

    + - +

    +

    +

    + +

    +

    + +

    +
    + + + +
    +

    +

    + +

    +
    + diff --git a/Themes/default/templates/Admin/show_custom_profile.php b/Themes/default/templates/Admin/show_custom_profile.php new file mode 100644 index 00000000000..51aba82970c --- /dev/null +++ b/Themes/default/templates/Admin/show_custom_profile.php @@ -0,0 +1,32 @@ + +
    subTemplate('show_list', ['list_id' => 'standard_profile_fields']); ?> + +
    subTemplate('show_list', ['list_id' => 'custom_profile_fields']); ?> diff --git a/Themes/default/templates/Admin/show_settings.php b/Themes/default/templates/Admin/show_settings.php new file mode 100644 index 00000000000..97739bfb2c9 --- /dev/null +++ b/Themes/default/templates/Admin/show_settings.php @@ -0,0 +1,178 @@ + +
    +
    Utils::$context['saved_failed']], file: 'Admin') ?>
    + +
    > +
    +

    +
    +
    + <> + + > +
    +
    + +
    +

    > + ' : '') ?> + +

    +
    +
    + +
    +
    +
    hasSubTemplate('callback_' . $config_var['name'])): ?>subTemplate('callback_' . $config_var['name']); ?> + > + + + > ' . $config_var['subtext'] . '' : ''; +$placeholder = !empty($config_var['placeholder']) ? ' placeholder="' . $config_var['placeholder'] . '"' : ''; +// Various HTML5 input types that are basically enhanced textboxes +$text_types = ['color', 'date', 'datetime', 'datetime-local', 'email', 'month', 'time']; +// Show the [?] button. +?> + + >>' . Lang::getTxt('admin_confirm_password', file: 'Admin') . '' : '') ?> + + > + name="" id="" value="1"> + name="[0]" value="*#fakepass#*" onfocus="this.value = ''; this.form..disabled = false;">
    + >subTemplate('timezone_select', ['name' => $config_var['name'], 'selection' => $config_var['value'] ?? '', 'disabled' => (int) $disabled]); ?> + + + [ ] +
    + + + $cat): ?> +
    + +
      $brd): ?> +
    • +
    +
    + + +
    + +
    + +
      +
    • + > ' : '' ?> +
    + > +
    + > + +
    + name="" id="" value=""> + + +
    +
    +
    + +
    +
    +
    + class="button"> + + + + + + + diff --git a/Themes/default/templates/Admin/view_versions.php b/Themes/default/templates/Admin/view_versions.php new file mode 100644 index 00000000000..a2cbf42edec --- /dev/null +++ b/Themes/default/templates/Admin/view_versions.php @@ -0,0 +1,294 @@ + +
    +

    + +

    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + + + + + ?? +
    + + + ?? + + ?? +
    + + + + + $version): ?> + + + + + + + + +
    + + + + + ?? +
    + + + + + + + + +
    + + + ?? + + ?? +
    + + + + + $version): ?> + + + + + + + + +
    + + + + + ?? +
    + + + + + + + + + +
    + + + ?? + + ?? +
    + + + + $version): ?> + + + + + + + + +
    + + + + + ?? +
    + + + + + + + + + +
    + + + ?? + + ?? +
    + + + + $files): ?> + $version): ?> + + + + + + + + +
    + / + + + + ?? +
    + + + + + + + + + + +
    + + + ?? + + ?? +
    + + + + $version): ?> + + + + + + + +
    + + + + + ?? +
    + + + + + + + + + + + +
    + + + ?? + + ?? +
    + + + + $version): ?> + + + + + + + +
    + + + + + ?? +
    + +
    + + + \ No newline at end of file diff --git a/Themes/default/templates/BoardIndex/bi_board_children.php b/Themes/default/templates/BoardIndex/bi_board_children.php new file mode 100644 index 00000000000..9130a2a1e80 --- /dev/null +++ b/Themes/default/templates/BoardIndex/bi_board_children.php @@ -0,0 +1,44 @@ + $child['posts'], 'topics' => $child['topics']], file: 'General') . '" class="new_posts">' . Lang::getTxt('new', file: 'General') . ' ' : '') . '' . $child['name'] . ''; ?>' . $child['name'] . ''; ?> 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . Utils::$context['session_var'] . '=' . Utils::$context['session_id'] . '" title="' . Lang::getTxt('unapproved_posts', $child, file: 'General') . '" class="moderation_link amt">!'; ?>' . $child['link'] . '' : '' . $child['link'] . ''; ?> + +
    +

    'child_list_' . $board['id'], + 'num' => count($children), + 'list' => implode(' ', $children), + ], + file: 'General', + ) ?>

    +
    diff --git a/Themes/default/templates/BoardIndex/bi_board_icon.php b/Themes/default/templates/BoardIndex/bi_board_icon.php new file mode 100644 index 00000000000..292e2e54722 --- /dev/null +++ b/Themes/default/templates/BoardIndex/bi_board_icon.php @@ -0,0 +1,28 @@ + + + > \ No newline at end of file diff --git a/Themes/default/templates/BoardIndex/bi_board_info.php b/Themes/default/templates/BoardIndex/bi_board_info.php new file mode 100644 index 00000000000..e856078c95a --- /dev/null +++ b/Themes/default/templates/BoardIndex/bi_board_info.php @@ -0,0 +1,38 @@ + + + + + + + + ! + +
    + +

    count($board['link_moderators']), 'list' => Lang::sentenceList($board['link_moderators'])], file: 'General') ?>

    diff --git a/Themes/default/templates/BoardIndex/bi_board_lastpost.php b/Themes/default/templates/BoardIndex/bi_board_lastpost.php new file mode 100644 index 00000000000..3602d72690d --- /dev/null +++ b/Themes/default/templates/BoardIndex/bi_board_lastpost.php @@ -0,0 +1,26 @@ + + +

    diff --git a/Themes/default/templates/BoardIndex/bi_board_list.php b/Themes/default/templates/BoardIndex/bi_board_list.php new file mode 100644 index 00000000000..2da5b7d2a55 --- /dev/null +++ b/Themes/default/templates/BoardIndex/bi_board_list.php @@ -0,0 +1,54 @@ + + +
    +
    + hasSubTemplate('bi_' . $board['type'] . '_icon') ? $this->fetchSubTemplate('bi_' . $board['type'] . '_icon', ['board' => $board]) : $this->fetchSubTemplate('bi_board_icon', ['board' => $board]) ?> + +
    +
    + hasSubTemplate('bi_' . $board['type'] . '_info') ? $this->fetchSubTemplate('bi_' . $board['type'] . '_info', ['board' => $board]) : $this->fetchSubTemplate('bi_board_info', ['board' => $board]) ?> + +
    + +
    + hasSubTemplate('bi_' . $board['type'] . '_stats') ? $this->fetchSubTemplate('bi_' . $board['type'] . '_stats', ['board' => $board]) : $this->fetchSubTemplate('bi_board_stats', ['board' => $board]) ?> + +
    + +
    + hasSubTemplate('bi_' . $board['type'] . '_lastpost') ? $this->fetchSubTemplate('bi_' . $board['type'] . '_lastpost', ['board' => $board]) : $this->fetchSubTemplate('bi_board_lastpost', ['board' => $board]) ?> + +
    hasSubTemplate('bi_' . $board['type'] . '_children')): ?>subTemplate('bi_' . $board['type'] . '_children', ['board' => $board]); ?>subTemplate('bi_board_children', ['board' => $board]); ?> + +
    diff --git a/Themes/default/templates/BoardIndex/bi_board_stats.php b/Themes/default/templates/BoardIndex/bi_board_stats.php new file mode 100644 index 00000000000..54915001e55 --- /dev/null +++ b/Themes/default/templates/BoardIndex/bi_board_stats.php @@ -0,0 +1,30 @@ + + +

    + posts], file: 'General') ?>
    topics], file: 'General') ?> + +

    \ No newline at end of file diff --git a/Themes/default/templates/BoardIndex/bi_redirect_icon.php b/Themes/default/templates/BoardIndex/bi_redirect_icon.php new file mode 100644 index 00000000000..cf7ea86483e --- /dev/null +++ b/Themes/default/templates/BoardIndex/bi_redirect_icon.php @@ -0,0 +1,25 @@ + + + > \ No newline at end of file diff --git a/Themes/default/templates/BoardIndex/bi_redirect_stats.php b/Themes/default/templates/BoardIndex/bi_redirect_stats.php new file mode 100644 index 00000000000..89ce7c8cf47 --- /dev/null +++ b/Themes/default/templates/BoardIndex/bi_redirect_stats.php @@ -0,0 +1,30 @@ + + +

    + posts], file: 'General') ?> + +

    \ No newline at end of file diff --git a/Themes/default/templates/BoardIndex/boardindex.php b/Themes/default/templates/BoardIndex/boardindex.php new file mode 100644 index 00000000000..fa25ec4d3f2 --- /dev/null +++ b/Themes/default/templates/BoardIndex/boardindex.php @@ -0,0 +1,55 @@ + + +
    + +
    +
    +

    + + +

    + + ' . $category['description'] . '
    ' : '' ?> + +
    +
    >subTemplate('bi_board_list', ['boards' => $category['boards']]); ?> + +
    +
    + + is_guest && !empty(Utils::$context['categories'])): ?> + +
    + subTemplate('button_strip', ['button_strip' => Utils::$context['mark_read_button'], 'direction' => 'right']); ?> + +
    diff --git a/Themes/default/templates/BoardIndex/ic_block_calendar.php b/Themes/default/templates/BoardIndex/ic_block_calendar.php new file mode 100644 index 00000000000..b6ef19c94ea --- /dev/null +++ b/Themes/default/templates/BoardIndex/ic_block_calendar.php @@ -0,0 +1,53 @@ + + +
    +

    + +

    +
    title . (!empty($holiday->location) ? ' (' . $holiday->location . ')' : ''); ?> + +

    + + +

    + +

    + + + is_today ? '' : '' ?>name ?>is_today ? '' : '' ?>age) ? ' (' . $bday->age . ')' : '' ?>is_last ? '' : ', ' ?> + +

    + +

    + + + can_edit ? ' ' : '' ?>href == '' ? '' : '' ?>is_today ? '' . $event->title . '' : $event->title ?>href == '' ? '' : '' ?>is_last ? '
    ' : ', ' ?> + +

    diff --git a/Themes/default/templates/BoardIndex/ic_block_online.php b/Themes/default/templates/BoardIndex/ic_block_online.php new file mode 100644 index 00000000000..9cb48bb5a72 --- /dev/null +++ b/Themes/default/templates/BoardIndex/ic_block_online.php @@ -0,0 +1,49 @@ + + +
    +

    + ' : '' ?> ' : '' ?> + +

    +
    +

    + ' : '' ?>: ()' : '' ?> + + +  - :  -  + : (format() ?>)
    + + Config::$modSettings['lastActive'], 'list' => Lang::sentenceList(Utils::$context['list_users_online'])], file: 'General') ?>settings['show_group_key']) && !empty(Utils::$context['membergroups'])): ?> + + + +

    \ No newline at end of file diff --git a/Themes/default/templates/BoardIndex/ic_block_recent.php b/Themes/default/templates/BoardIndex/ic_block_recent.php new file mode 100644 index 00000000000..7e7337e0335 --- /dev/null +++ b/Themes/default/templates/BoardIndex/ic_block_recent.php @@ -0,0 +1,65 @@ + + + +
    +

    + +

    +
    +
    + +settings['number_recent_posts'] == 1): ?> + +

    + '"' . Utils::$context['latest_post']['link'] . '"'], file: 'General') ?> ()
    +

    + + + + + + + + + + + + + + + + + + +
    + +
    \ No newline at end of file diff --git a/Themes/default/templates/BoardIndex/ic_block_stats.php b/Themes/default/templates/BoardIndex/ic_block_stats.php new file mode 100644 index 00000000000..1f9280ba931 --- /dev/null +++ b/Themes/default/templates/BoardIndex/ic_block_stats.php @@ -0,0 +1,40 @@ + + + +
    +

    + ' : '' ?> ' : '' ?> + +

    +
    +

    + settings['show_latest_member']) ? ' - ' . Lang::getTxt('latest_member', file: 'General') . ': ' . Utils::$context['common_stats']['latest_member']['link'] . '' : '' ?>
    + "' . Utils::$context['latest_post']['link'] . '" (' . Utils::$context['latest_post']['time'] . ')
    ' : '') ?> + + +

    \ No newline at end of file diff --git a/Themes/default/templates/BoardIndex/index.php b/Themes/default/templates/BoardIndex/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/BoardIndex/index.php @@ -0,0 +1,8 @@ + + +
    + +
    options['collapse_header_ic']) ? '' : ' style="display: none;"' ?>>subTemplate('ic_block_' . $block['tpl']); ?> + +
    +
    + + \ No newline at end of file diff --git a/Themes/default/templates/BoardIndex/newsfader.php b/Themes/default/templates/BoardIndex/newsfader.php new file mode 100644 index 00000000000..535d72fb0f6 --- /dev/null +++ b/Themes/default/templates/BoardIndex/newsfader.php @@ -0,0 +1,38 @@ +settings['show_newsfader']) && !empty(Utils::$context['news_lines'])): ?> + +
      + +
    • + +
    + diff --git a/Themes/default/templates/EventEditor/event_board.php b/Themes/default/templates/EventEditor/event_board.php new file mode 100644 index 00000000000..8fb8c78eb2e --- /dev/null +++ b/Themes/default/templates/EventEditor/event_board.php @@ -0,0 +1,66 @@ +allowedTo('calendar_post')): ?> + categories)): ?> +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/EventEditor/event_link_to.php b/Themes/default/templates/EventEditor/event_link_to.php new file mode 100644 index 00000000000..0b55c77c22c --- /dev/null +++ b/Themes/default/templates/EventEditor/event_link_to.php @@ -0,0 +1,47 @@ +allowedTo('calendar_edit_any') && !User::$me->allowedTo('calendar_edit_own')): ?>allowedTo('calendar_post')): ?> + + \ No newline at end of file diff --git a/Themes/default/templates/EventEditor/event_new.php b/Themes/default/templates/EventEditor/event_new.php new file mode 100644 index 00000000000..fbd9a5100bc --- /dev/null +++ b/Themes/default/templates/EventEditor/event_new.php @@ -0,0 +1,75 @@ +allowedTo('calendar_post')): ?> +
    +
    +
    + > +
    +
    + > +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + allday) ? ' checked' : '' ?>special_rrule) || (!Utils::$context['event']->new && !Utils::$context['event']->selected_occurrence->is_first) ? ' disabled' : '' ?>> + +
    + +
    + +
    +
    + special_rrule) ? ' disabled data-force-disabled' : '' ?>> + allday) || !empty(Utils::$context['event']->special_rrule) ? ' disabled' : '' ?>special_rrule) ? ' data-force-disabled' : '' ?>> +
    + +
    + +
    +
    + special_rrule) ? ' disabled' : '' ?>special_rrule) ? ' data-force-disabled' : '' ?>> + allday) || !empty(Utils::$context['event']->special_rrule) ? ' disabled' : '' ?>special_rrule) ? ' data-force-disabled' : '' ?>> +
    + +
    + +
    +
    subTemplate('timezone_select', ['name' => 'tz', 'selection' => Utils::$context['event']->selected_occurrence->tzid, 'disabled' => !empty(Utils::$context['event']->special_rrule) ? 2 : (int) Utils::$context['event']->allday]); ?> +
    +
    new || Utils::$context['event']->selected_occurrence->is_first): ?>subTemplate('rrule'); ?>subTemplate('occurrence_options'); ?> +
    \ No newline at end of file diff --git a/Themes/default/templates/EventEditor/event_options.php b/Themes/default/templates/EventEditor/event_options.php new file mode 100644 index 00000000000..502119264f7 --- /dev/null +++ b/Themes/default/templates/EventEditor/event_options.php @@ -0,0 +1,42 @@ + +
    + + + + type === Event::TYPE_EVENT + && ( + Utils::$context['event']->new + || Utils::$context['event']->selected_occurrence->is_first + ) + ): +?>topic)): ?>subTemplate('event_board'); ?>topic === (Topic::$topic_id ?? NAN)): ?>subTemplate('event_unlink'); ?>new): ?>subTemplate('event_link_to'); ?>subTemplate('event_new'); ?> +
    \ No newline at end of file diff --git a/Themes/default/templates/EventEditor/event_unlink.php b/Themes/default/templates/EventEditor/event_unlink.php new file mode 100644 index 00000000000..77a1a2f1066 --- /dev/null +++ b/Themes/default/templates/EventEditor/event_unlink.php @@ -0,0 +1,34 @@ +topic) || empty(Config::$modSettings['cal_allow_unlinked'])): ?> +
    +
    + +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/EventEditor/index.php b/Themes/default/templates/EventEditor/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/EventEditor/index.php @@ -0,0 +1,8 @@ + +
    +
      +
    • + title ?>can_edit): ?> can_export): ?> +
      allday)): ?>start->date != $event->end->date) ? ' – ' : '' ?> – ( – ) start->tz_abbrev ?>location)): ?> +
      location ?>getParentEvent()->recurrence_iterator->getRRule()->getDescription($event); ?> +
      +
    • +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/EventEditor/occurrence_options.php b/Themes/default/templates/EventEditor/occurrence_options.php new file mode 100644 index 00000000000..8848aa1c802 --- /dev/null +++ b/Themes/default/templates/EventEditor/occurrence_options.php @@ -0,0 +1,40 @@ +selected_occurrence->can_affect_future): ?> +
    +
    + +
    +
    + +
    + +
    +
    diff --git a/Themes/default/templates/EventEditor/rrule.php b/Themes/default/templates/EventEditor/rrule.php new file mode 100644 index 00000000000..5d428878116 --- /dev/null +++ b/Themes/default/templates/EventEditor/rrule.php @@ -0,0 +1,266 @@ + + + +
    + +
    + +
    +
    + + +special_rrule)): ?> + + + recurrence_iterator->getRRule()->until) ? ' value="' . Utils::$context['event']->recurrence_iterator->getRRule()->until->format('Y-m-d') . '"' : ' disabled' ?>> + recurrence_iterator->getRRule()->count ?? 0) > 1 ? ' value="' . Utils::$context['event']->recurrence_iterator->getRRule()->count . '"' : ' value="1" disabled' ?>> + + +
    +
    +special_rrule) || (Utils::$context['event']->new && Utils::$context['event']->type === Event::TYPE_HOLIDAY)): ?> +
    +
    + + +
    +
    + +
    +
    + +special_rrule)): ?> + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + +
    +
    +
    + + + +
    +
    + + +
    +
    +
    + +
    + +
    + +
    +
    +
    +
    +
    + + + +
    +
    + + +
    +
    +
    +
    + +
    + +
    +
    +
    +byday_items as $byday_item_key => $byday_item): ?> +
    + + +
    + +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    +sorted_weekdays as $weekday): ?> + + +
    +
    + + +
    recurrence_iterator->getRDates()) || !empty(Utils::$context['event']->recurrence_iterator->getEXDates()) ? ' open' : '') ?>> + + +
    +
    + +
    +
    +
    +recurrence_iterator->getRDates() as $key => $rdate): ?> +setTimezone(Utils::$context['event']->start->getTimezone()); +?> +
    + + + +
    + +
    +
    + +
    +
    +
    + +
    +
    + +
    +
    +
    +recurrence_iterator->getExDates() as $key => $exdate): ?> +setTimezone(Utils::$context['event']->start->getTimezone()); +?> +
    + + + +
    + +
    +
    + +
    + +
    +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/ManagePermissions/by_board.php b/Themes/default/templates/ManagePermissions/by_board.php new file mode 100644 index 00000000000..8fb62147655 --- /dev/null +++ b/Themes/default/templates/ManagePermissions/by_board.php @@ -0,0 +1,80 @@ + + +
    +
    +

    +
    +
    + + +
    + +
    +

    + + +

    +
    +
    + +
    +

    +
    + +
      + + +
    • + + + + + + + + + + +
    • + + +
    + + + + + + + + + +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/ManagePermissions/edit_profiles.php b/Themes/default/templates/ManagePermissions/edit_profiles.php new file mode 100644 index 00000000000..4c41987b2e5 --- /dev/null +++ b/Themes/default/templates/ManagePermissions/edit_profiles.php @@ -0,0 +1,100 @@ + + +
    +
    +
    +

    +
    + + + + + + + + + + + + + + + > + > + + + + +
    + + + + + + + + +
    +
    + + + + + + > +
    +
    +
    +
    +
    +

    +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + +
    +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/ManagePermissions/index.php b/Themes/default/templates/ManagePermissions/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/ManagePermissions/index.php @@ -0,0 +1,8 @@ + + + +
    + + +
      + +
      +
      +
      + + + +
      +
      +
      + + + +
      + +
    • + + + > + + > + > + > + + +
    • +
      + > +
      + + > + + + + +
    • + + +
    • +
    + + + +
    + + + + \ No newline at end of file diff --git a/Themes/default/templates/ManagePermissions/modify_group.php b/Themes/default/templates/ManagePermissions/modify_group.php new file mode 100644 index 00000000000..0f022b602e4 --- /dev/null +++ b/Themes/default/templates/ManagePermissions/modify_group.php @@ -0,0 +1,69 @@ + + +
    + Config::$scripturl . '?action=admin;area=permissions;sa=profiles'], file: 'ManagePermissions') ?> + +
    + + + +
    + +
    + + +
    + +
    +

    + + Utils::$context['group']['name'], 'profile' => Utils::$context['profile']['name']], file: 'ManagePermissions') ?> + + Utils::$context['group']['name']], file: 'ManagePermissions') ?> + +

    +
    subTemplate('modify_group_display', ['type' => Utils::$context['permission_type']]); ?> + +
    + +
    + + + + + +
    \ No newline at end of file diff --git a/Themes/default/templates/ManagePermissions/modify_group_display.php b/Themes/default/templates/ManagePermissions/modify_group_display.php new file mode 100644 index 00000000000..b5af14c3b56 --- /dev/null +++ b/Themes/default/templates/ManagePermissions/modify_group_display.php @@ -0,0 +1,93 @@ + + + + + + + class="smalltext"> + + + + + + + + + + + + + + +
    + ' : '' ?> + + + + ' . $permission['note'] . '' : '') ?> + + + + value="on" id="_on" > + + + + + + value="on" > + + + + + + value="on" > + + + +
    + +
    \ No newline at end of file diff --git a/Themes/default/templates/ManagePermissions/permission_index.php b/Themes/default/templates/ManagePermissions/permission_index.php new file mode 100644 index 00000000000..44894c96f69 --- /dev/null +++ b/Themes/default/templates/ManagePermissions/permission_index.php @@ -0,0 +1,220 @@ + + +
    + Config::$scripturl . '?action=admin;area=permissions;sa=profiles'], file: 'ManagePermissions') ?> + +
    + +
    +
    + +
    +

    +
    + +
    +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + ' : '' ?> + +
    + ' : '' . Lang::getTxt('help', file: 'General') . '' ?> + +
    + Lang::sentenceList(array_map(fn($grp) => '"' . $grp . '"', $group['children']))], file: 'ManagePermissions') ?> + +
    > + + + > + + + + ' . Lang::getTxt(Utils::$context['can_modify'] ? 'permissions_modify' : 'permissions_view', file: 'ManagePermissions') . '' : '' ?> + + + ' : '' ?> + +
    +
    + +
    +

    + +

    + +
    +
    +
    + +
    +
    + + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + +
    + + + + + + + + +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/ManagePermissions/postmod_permissions.php b/Themes/default/templates/ManagePermissions/postmod_permissions.php new file mode 100644 index 00000000000..39a854303b2 --- /dev/null +++ b/Themes/default/templates/ManagePermissions/postmod_permissions.php @@ -0,0 +1,171 @@ + + +
    +
    +
    +

    +
    + +
    +
    +
    +
    >
    +
    +
    + + + + +
    + +
    + +
      +
    • +
    • +
    • +
    +


    +

    + + + + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + +
    + + +
    + > + +
    + Lang::sentenceList(array_map(fn($grp) => '"' . $grp . '"', $group['children']))], file: 'ManagePermissions') ?> + +
    + > + + > + + > + + > + + > + + > + + > + + > + + > + + > + + > + + > +
    + + + +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/MessageIndex/index.php b/Themes/default/templates/MessageIndex/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/MessageIndex/index.php @@ -0,0 +1,8 @@ +
    +

    + +

    + +

    count(Utils::$context['link_moderators']), 'list' => Lang::sentenceList(Utils::$context['link_moderators'])], file: 'General') ?>.

    settings['display_who_viewing'])): ?>settings['display_who_viewing'] == 1 || empty(Utils::$context['view_members_list'])): ?> + +

    + Lang::sentenceList(array_values($list_of_viewers)), + 'num_viewing' => count(Utils::$context['view_members_list'] ?? []) + (int) (Utils::$context['view_num_guests'] ?? 0) + (int) (Utils::$context['view_num_hidden'] ?? 0), + ], + file: 'General', + ) ?> + +

    + +
    options['show_children']) || Utils::$context['start'] == 0)): ?> + +
    +
    +

    +
    subTemplate('bi_board_list', ['boards' => Utils::$context['boards']]); ?> + +
    + +
    + + +
    + +
    + + +
    + +
    + + + + subTemplate('button_strip', ['button_strip' => Utils::$context['normal_buttons'], 'direction' => 'right']); ?> + +
    + +
    + +
    options['display_quick_mod'] > 0 && !empty(Utils::$context['topics'])): ?> + +
    + +
    +
    + +
    +
    /
    +
    /
    +
    options['display_quick_mod'] == 1): ?> + +
    + +
    + +
    + +

    + +
    + +
    + +
    +
    + + ' : '' ?> + +
    +
    + > + +
    + + + + + + + + + + + +
    +
    + is_guest ? '' . Lang::getTxt('new', file: 'General') . '' : '' ?> + + + (' . Lang::getTxt('awaiting_approval', file: 'General') . ')' : '') ?> + +
    +

    + $topic['first_post']['member']['link']], file: 'General') ?> + +

    + ' . $topic['pages'] . '' : '' ?> + +
    +
    +
    +


    +
    +
    +

    '' . $topic['last_post']['time'] . '', 'member_link' => $topic['last_post']['member']['link']], file: 'General') ?>

    +
    + +
    options['display_quick_mod'] == 1): ?> + +
    + +
    + +
    + +
    options['display_quick_mod'] == 1 && !empty(Utils::$context['topics'])): ?> + +
    + + + + + +
    + + options['display_quick_mod'] > 0 && !empty(Utils::$context['topics'])): ?> + + +
    + +
    + + + + subTemplate('button_strip', ['button_strip' => Utils::$context['normal_buttons'], 'direction' => 'right']); ?> + +
    + +
    + +
    + + subTemplate('topic_legend'); ?> + + \ No newline at end of file diff --git a/Themes/default/templates/MessageIndex/topic_legend.php b/Themes/default/templates/MessageIndex/topic_legend.php new file mode 100644 index 00000000000..e55d83c7e3d --- /dev/null +++ b/Themes/default/templates/MessageIndex/topic_legend.php @@ -0,0 +1,64 @@ + + +
    +
    +

    + +

    is_guest ? ' + ' . Lang::getTxt('participation_caption', file: 'General') . '
    ' : '' ?> + + ' . Lang::getTxt('poll', file: 'General') . '
    ' : '') ?> + +
    +

    +

    +
    +
    +
    +

    + + + + +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/ModerationCenter/group_requests_block.php b/Themes/default/templates/ModerationCenter/group_requests_block.php new file mode 100644 index 00000000000..11d83587dfa --- /dev/null +++ b/Themes/default/templates/ModerationCenter/group_requests_block.php @@ -0,0 +1,82 @@ + + +
    +

    + +

    + +
    +
    + +
    + + \ No newline at end of file diff --git a/Themes/default/templates/ModerationCenter/index.php b/Themes/default/templates/ModerationCenter/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/ModerationCenter/index.php @@ -0,0 +1,8 @@ +subTemplate('notes'); ?> + +
    + +
    hasSubTemplate($block) ? $this->subTemplate($block) : '' ?>
    + +
    \ No newline at end of file diff --git a/Themes/default/templates/ModerationCenter/moderation_settings.php b/Themes/default/templates/ModerationCenter/moderation_settings.php new file mode 100644 index 00000000000..011e69ebd17 --- /dev/null +++ b/Themes/default/templates/ModerationCenter/moderation_settings.php @@ -0,0 +1,29 @@ + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/ModerationCenter/notes.php b/Themes/default/templates/ModerationCenter/notes.php new file mode 100644 index 00000000000..4aeee01ffd2 --- /dev/null +++ b/Themes/default/templates/ModerationCenter/notes.php @@ -0,0 +1,59 @@ + + +
    + + +
    + +
    +
    +
    +

    +
    +
    + +
      + +
    • + ' : '') ?> : + +
    • + +
    +
    + +
    + +
    + +
    + + +
    + +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/ModerationCenter/reported_posts_block.php b/Themes/default/templates/ModerationCenter/reported_posts_block.php new file mode 100644 index 00000000000..32d35ec4b33 --- /dev/null +++ b/Themes/default/templates/ModerationCenter/reported_posts_block.php @@ -0,0 +1,81 @@ + + +
    +

    + +

    + +
    +
    +
      + +
    • + $post['report_link'], 'author_link' => $post['author']['link']], file: 'ModerationCenter') ?> +
    • + + + +
    • + +
    • + +
    +
    + + \ No newline at end of file diff --git a/Themes/default/templates/ModerationCenter/reported_users_block.php b/Themes/default/templates/ModerationCenter/reported_users_block.php new file mode 100644 index 00000000000..f95ec3a1886 --- /dev/null +++ b/Themes/default/templates/ModerationCenter/reported_users_block.php @@ -0,0 +1,81 @@ + + +
    +

    + +

    + +
    +
    +
      + +
    • + +
    • + + + +
    • + +
    • + +
    +
    + + \ No newline at end of file diff --git a/Themes/default/templates/ModerationCenter/show_notice.php b/Themes/default/templates/ModerationCenter/show_notice.php new file mode 100644 index 00000000000..322513ba6b1 --- /dev/null +++ b/Themes/default/templates/ModerationCenter/show_notice.php @@ -0,0 +1,52 @@ + +> + + + <?= Utils::$context['page_title'] ?> + + + + +
    +

    +
    +
    +

    Utils::$context['notice_subject']], file: 'ModerationCenter') ?>

    +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    + + \ No newline at end of file diff --git a/Themes/default/templates/ModerationCenter/unapproved_posts.php b/Themes/default/templates/ModerationCenter/unapproved_posts.php new file mode 100644 index 00000000000..606940cbbd5 --- /dev/null +++ b/Themes/default/templates/ModerationCenter/unapproved_posts.php @@ -0,0 +1,111 @@ + + + +
    +
    +
    +

    +
    + + +
    +

    + + +

    +
    + +
    + +options['display_quick_mod']) && Theme::$current->options['display_quick_mod'] == 1): ?> +
      +
    • + +
    • +
    + +
    + + + [ + 'label' => Lang::getTxt('approve', file: 'General'), + 'href' => Config::$scripturl . '?action=moderate;area=postmod;sa=' . Utils::$context['current_view'] . ';start=' . Utils::$context['start'] . ';' . Utils::$context['session_var'] . '=' . Utils::$context['session_id'] . ';approve=' . $item['id'], + 'icon' => 'approve', + ], + 'delete' => [ + 'label' => Lang::getTxt('remove', file: 'General'), + 'href' => Config::$scripturl . '?action=moderate;area=postmod;sa=' . Utils::$context['current_view'] . ';start=' . Utils::$context['start'] . ';' . Utils::$context['session_var'] . '=' . Utils::$context['session_id'] . ';delete=' . $item['id'], + 'icon' => 'remove_button', + 'show' => $item['can_delete'], + ], + 'quickmod' => [ + 'class' => 'inline_mod_check', + 'content' => '', + 'show' => !empty(Theme::$current->options['display_quick_mod']) && Theme::$current->options['display_quick_mod'] == 1, + ], +]; +?> +
    +
    #
    +
    +
    + / / +
    + ', ' ', Lang::getTxt('last_post_topic', ['post_link' => $item['time'], 'member_link' => '' . $item['poster']['link'] . ''], file: 'General')) ?> +
    +
    +
    +
    + subTemplate('quickbuttons', ['list_items' => $quickbuttons, 'list_class' => 'unapproved_posts']); ?> + +
    + +
    + + + +options['display_quick_mod']) && Theme::$current->options['display_quick_mod'] == 1): ?> +
    + + +
    + +
    + +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/ModerationCenter/user_watch_post_callback.php b/Themes/default/templates/ModerationCenter/user_watch_post_callback.php new file mode 100644 index 00000000000..52ada7e8a62 --- /dev/null +++ b/Themes/default/templates/ModerationCenter/user_watch_post_callback.php @@ -0,0 +1,59 @@ + [ + 'label' => Lang::getTxt('remove_message', file: 'General'), + 'href' => Config::$scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . Utils::$context['start'] . ';' . Utils::$context['session_var'] . '=' . Utils::$context['session_id'], + 'javascript' => 'data-confirm="' . Lang::getTxt('mc_watched_users_delete_post', file: 'ModerationCenter') . '"', + 'class' => 'you_sure', + 'icon' => 'remove_button', + 'show' => $post['can_delete'], + ], + 'quickmod' => [ + 'class' => 'inline_mod_check', + 'content' => '', + 'show' => $post['can_delete'], + ], +]; +$output_html = ' +
    +
    + ' . Lang::getTxt('mc_post_report', ['report_link' => '' . $post['subject'] . '', 'author_link' => $post['author_link']], file: 'ModerationCenter') . ' +
    +
    +
    +
    + ' . Lang::getTxt('mc_watched_users_posted', ['time' => $post['poster_time']], file: 'ModerationCenter') . ' +
    +
    + ' . $post['body'] . ' +
    '; +?>fetchSubTemplate('quickbuttons', ['list_items' => $quickbuttons, 'list_class' => 'user_watch_post', 'output_method' => 'return']); ?> diff --git a/Themes/default/templates/ModerationCenter/warn_template.php b/Themes/default/templates/ModerationCenter/warn_template.php new file mode 100644 index 00000000000..f6146add5f6 --- /dev/null +++ b/Themes/default/templates/ModerationCenter/warn_template.php @@ -0,0 +1,132 @@ + + +
    +
    +
    +

    +
    +
    + + +
    +
    + + +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    + +
    +
    + + > + +

    + + + +
    + + +
    +
    + + \ No newline at end of file diff --git a/Themes/default/templates/ModerationCenter/watched_users.php b/Themes/default/templates/ModerationCenter/watched_users.php new file mode 100644 index 00000000000..b1afb2a7e4e --- /dev/null +++ b/Themes/default/templates/ModerationCenter/watched_users.php @@ -0,0 +1,81 @@ + + +
    +

    + +

    + +
    +
    +
      + +
    • + +
    • + + + +
    • + +
    • + +
    +
    + + \ No newline at end of file diff --git a/Themes/default/templates/Profile/alert_configuration.php b/Themes/default/templates/Profile/alert_configuration.php new file mode 100644 index 00000000000..916a0200ecc --- /dev/null +++ b/Themes/default/templates/Profile/alert_configuration.php @@ -0,0 +1,133 @@ + +
    +

    + +

    +
    +

    + +

    +
    +
    +

    + +

    +
    +
    +
    +
    + + ' . Lang::getTxt('notify_announcements_desc', file: 'Admin') . '' : '' ?> +
    +
    + + > +
    +
    + +
    +
    + +
    +
    +
    +
    +

    + +

    +
    + $alerts): ?> + + + + + + + + + $alert_details): ?> + + $bitmask): ?> + + +
    + '; + break; + + case 'select': + echo ' + '; + break; + } +?> + +
    + ' : '' ?> + '; + break; + + case 'yes': + echo ' + '; + break; + + case 'never': + echo ' + '; + break; + } +?> +
    +
    +
    + + ' : '' ?> + + +
    +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/alert_notifications_boards.php b/Themes/default/templates/Profile/alert_notifications_boards.php new file mode 100644 index 00000000000..2f3f0b749fd --- /dev/null +++ b/Themes/default/templates/Profile/alert_notifications_boards.php @@ -0,0 +1,30 @@ + +
    +

    + +

    +
    +

    +
    subTemplate('show_list', ['list_id' => 'board_notification_list']); ?> diff --git a/Themes/default/templates/Profile/alert_notifications_topics.php b/Themes/default/templates/Profile/alert_notifications_topics.php new file mode 100644 index 00000000000..dbbab3b6b3d --- /dev/null +++ b/Themes/default/templates/Profile/alert_notifications_topics.php @@ -0,0 +1,32 @@ + + + +
    +

    + +

    +
    +

    +
    subTemplate('show_list', ['list_id' => 'topic_notification_list']); ?> diff --git a/Themes/default/templates/Profile/alerts_all_read.php b/Themes/default/templates/Profile/alerts_all_read.php new file mode 100644 index 00000000000..36c42c369e6 --- /dev/null +++ b/Themes/default/templates/Profile/alerts_all_read.php @@ -0,0 +1,23 @@ +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/alerts_popup.php b/Themes/default/templates/Profile/alerts_popup.php new file mode 100644 index 00000000000..bb40bc8046a --- /dev/null +++ b/Themes/default/templates/Profile/alerts_popup.php @@ -0,0 +1,61 @@ + +
    +
    + + +
    +
    + +
    +
    +
    subTemplate('alerts_all_read'); ?> $details): ?> + < class="unread_notify"> +
    + +
    +
    + - +
    + > +
    + \ No newline at end of file diff --git a/Themes/default/templates/Profile/deleteAccount.php b/Themes/default/templates/Profile/deleteAccount.php new file mode 100644 index 00000000000..f4f7de3de6a --- /dev/null +++ b/Themes/default/templates/Profile/deleteAccount.php @@ -0,0 +1,119 @@ + + + +
    +
    +

    + +

    +
    + +is_me): ?> +

    + +
    + + +
    + + +is_me): ?> +
    +
    + + + + + + +
    +
    + + > + +
    + + + + + + + + + +
    + + +
    + +
    +
    + + + +
    + + +
    + +
    + +
    + + + + + + +
    +
    + + + + + + + +
    + +
    +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/editBuddies.php b/Themes/default/templates/Profile/editBuddies.php new file mode 100644 index 00000000000..e319faf55f1 --- /dev/null +++ b/Themes/default/templates/Profile/editBuddies.php @@ -0,0 +1,94 @@ + +
    is_me ? 'profile_updated_own' : 'profile_updated_else', Utils::$context['member'], file: 'Profile') ?>
    +
    +
    +
    +

    + +

    +
    + + + + + + + + + + + + + + + + + + $column): ?> + + + + +
    + +
    + + + + + +
    +
    +
    +
    +

    +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    + + +
    + \ No newline at end of file diff --git a/Themes/default/templates/Profile/editIgnoreList.php b/Themes/default/templates/Profile/editIgnoreList.php new file mode 100644 index 00000000000..b8422838464 --- /dev/null +++ b/Themes/default/templates/Profile/editIgnoreList.php @@ -0,0 +1,92 @@ + +
    is_me ? 'profile_updated_own' : 'profile_updated_else', Utils::$context['member'], file: 'Profile') ?>
    +
    +
    +
    +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + +
    +
    +
    +
    +

    +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    + + +
    + \ No newline at end of file diff --git a/Themes/default/templates/Profile/edit_options.php b/Themes/default/templates/Profile/edit_options.php new file mode 100644 index 00000000000..d521693dda5 --- /dev/null +++ b/Themes/default/templates/Profile/edit_options.php @@ -0,0 +1,94 @@ + 'https://']) : $url; +?> +
    > +
    +

    + + +

    +
    +

    +
    +
    +
    $field): ?> +
    +
    +
    hasSubTemplate('profile_' . $field['callback_func'])): ?>subTemplate('profile_' . $field['callback_func']); ?> +
    + >' : '' ?>' : '' ?> +
    + +
    +
    + + + value="" > + + value="1" > + + +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    + >
    + +
    +
    + +
    +
    + + + + + + +
    +
    +
    diff --git a/Themes/default/templates/Profile/error_message.php b/Themes/default/templates/Profile/error_message.php new file mode 100644 index 00000000000..0a3f8316f7e --- /dev/null +++ b/Themes/default/templates/Profile/error_message.php @@ -0,0 +1,42 @@ + +
    id="profile_error"> + + +
      + + + + + + + +
    • + +
    + +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/export_profile_data.php b/Themes/default/templates/Profile/export_profile_data.php new file mode 100644 index 00000000000..f0e12f7e613 --- /dev/null +++ b/Themes/default/templates/Profile/export_profile_data.php @@ -0,0 +1,174 @@ + + + [], 'format' => '']; +$dltoken = ''; +// The main containing header. +?> +
    +

    + +

    +
    +
    + +
    +

    +
    +
    + $parts): ?> +
    + +
    +

    +
      + +
    • + +
    +
    + +

    $parts[1]['included_desc'], + 'format' => Utils::$context['export_formats'][$parts[1]['format']]['description'], + ], + file: 'Profile', + ) ?>

    + 10): ?> +
    + + +
      + $file): ?> + + + + + + + +
    • + (, ) +
    • + +
    + 10): ?> +
    + +
    + + + + +
    +
    + +
    + + +
    +

    +
    +
    + + + + + + + + +
    1 ? ' class="descbox"' : '' ?>> +

    $file['included_desc'], + 'format' => Utils::$context['export_formats'][$file['format']]['description'], + ], + file: 'Profile', + ) ?>

    +
    + + + +
    +
    + +
    + +
    +

    +
    +
    +
    +
    + $datatype_settings): ?> + +
    + +
    +
    + > +
    + + +
    +
    +
    + +
    +
    + +
    +
    +
    + + + +
    + + + +
    + + + + + + +
    +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/groupMembership.php b/Themes/default/templates/Profile/groupMembership.php new file mode 100644 index 00000000000..2110d11e4ef --- /dev/null +++ b/Themes/default/templates/Profile/groupMembership.php @@ -0,0 +1,104 @@ + + + +
    +
    +

    + +

    +
    +

    + + +
    + +
    + +
    + + +
    +
    +

    +
    +
    + + +
    + + +
    +
    +
    + +
    +

    +
    + +
    + + > + + + + + + +
    + + +
    + +
    + + + +
    +

    +
    + +
    + ' . $group['name'] . '') ?>' . $group['desc'] . '' : '') ?> + + + + + + + + +
    + + + +
    + + + + + +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/ignoreboards.php b/Themes/default/templates/Profile/ignoreboards.php new file mode 100644 index 00000000000..4824ef5a282 --- /dev/null +++ b/Themes/default/templates/Profile/ignoreboards.php @@ -0,0 +1,62 @@ + +
    +
    +

    + +

    +
    +

    +
    +
    +
      +
    • + +
        $board): ?> +
      • + $curr_child_level): ?> +
          + +
        +
      • +
      +
    • +
    +
    subTemplate('profile_save'); ?> +
    +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/index.php b/Themes/default/templates/Profile/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/Profile/index.php @@ -0,0 +1,8 @@ +subTemplate('load_warning_variables'); ?> + +
    +
    +

    + is_me ? 'profile_warning_level' : 'profile_issue_warning', file: 'Profile') ?> +

    +
    is_me): ?> +

    +
    +
    is_me): ?> +
    + +
    +
    + +
    +
    + +
    + +
    +
    + +
    + : () +
    +
    is_me): ?> +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    + +
    +
    + > +
    +
    + +
    +
    + +
    +
    + +
    +
    + + +
    + +
    +
    +
    + + + + +
    +
    +
    subTemplate('show_list', ['list_id' => 'view_warnings']); ?> diff --git a/Themes/default/templates/Profile/load_warning_variables.php b/Themes/default/templates/Profile/load_warning_variables.php new file mode 100644 index 00000000000..59c7c0257ea --- /dev/null +++ b/Themes/default/templates/Profile/load_warning_variables.php @@ -0,0 +1,34 @@ + 'none', + Config::$modSettings['warning_watch'] => 'watched', + Config::$modSettings['warning_moderate'] => 'moderated', + Config::$modSettings['warning_mute'] => 'muted', +]; +// Work out the starting warning. +Utils::$context['current_warning_mode'] = Utils::$context['warning_mode'][0]; +?> $warning): ?>= $limit): ?> diff --git a/Themes/default/templates/Profile/max_size.php b/Themes/default/templates/Profile/max_size.php new file mode 100644 index 00000000000..8c592c3f498 --- /dev/null +++ b/Themes/default/templates/Profile/max_size.php @@ -0,0 +1,31 @@ + +
    $w, 'h' => $h], file: 'Profile') ?>
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/profile_above.php b/Themes/default/templates/Profile/profile_above.php new file mode 100644 index 00000000000..5a4df939099 --- /dev/null +++ b/Themes/default/templates/Profile/profile_above.php @@ -0,0 +1,32 @@ +is_me): ?> + + subTemplate('error_message'); ?> +
    + +
    diff --git a/Themes/default/templates/Profile/profile_avatar_select.php b/Themes/default/templates/Profile/profile_avatar_select.php new file mode 100644 index 00000000000..b4ae7418ae1 --- /dev/null +++ b/Themes/default/templates/Profile/profile_avatar_select.php @@ -0,0 +1,125 @@ + + + +
    + + + + + > +
    + + + > +
    + + + > +
    + + + > +
    + + + > + + + +
    +
    + + +
    +
    + +
    +
    + +
    +
    + + + +
    +
    ' : '' ?> +
    fetchSubTemplate('max_size', ['type' => 'external']) : '' ?> +
    + + + + +
    +
    ' : '' ?> + subTemplate('max_size', ['type' => 'upload']); ?> + ' : '') ?> + + + + +
    > +
    ' : '' ?> + + +
    + + + + + + + +
    + + + + +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/profile_below.php b/Themes/default/templates/Profile/profile_below.php new file mode 100644 index 00000000000..ae356186437 --- /dev/null +++ b/Themes/default/templates/Profile/profile_below.php @@ -0,0 +1,20 @@ + +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + + + +
    + + +
    + + +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/profile_pm_settings.php b/Themes/default/templates/Profile/profile_pm_settings.php new file mode 100644 index 00000000000..0e73926f16a --- /dev/null +++ b/Themes/default/templates/Profile/profile_pm_settings.php @@ -0,0 +1,75 @@ + +
    + +
    +
    + +
    +
    + +
    +
    + + > +
    + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + + > +
    +
    +
    +
    +
    + +
    +
    + + > +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/profile_popup.php b/Themes/default/templates/Profile/profile_popup.php new file mode 100644 index 00000000000..b393e3dd99d --- /dev/null +++ b/Themes/default/templates/Profile/profile_popup.php @@ -0,0 +1,48 @@ + + + +
    + +
    + + \ No newline at end of file diff --git a/Themes/default/templates/Profile/profile_save.php b/Themes/default/templates/Profile/profile_save.php new file mode 100644 index 00000000000..43820137c13 --- /dev/null +++ b/Themes/default/templates/Profile/profile_save.php @@ -0,0 +1,49 @@ + + + +
    + + +
    +
    + >
    + +
    +
    + +
    +
    + +
    + + + + + + + +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/profile_signature_modify.php b/Themes/default/templates/Profile/profile_signature_modify.php new file mode 100644 index 00000000000..e327be28dee --- /dev/null +++ b/Themes/default/templates/Profile/profile_signature_modify.php @@ -0,0 +1,59 @@ + + + + + + + +
    +
    +
    +
    + + + +
    +
    +
    + + +
    + + + + + + + +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/profile_smiley_pick.php b/Themes/default/templates/Profile/profile_smiley_pick.php new file mode 100644 index 00000000000..3765c1703c8 --- /dev/null +++ b/Themes/default/templates/Profile/profile_smiley_pick.php @@ -0,0 +1,35 @@ + +
    + +
    +
    + + :) +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/profile_tfa.php b/Themes/default/templates/Profile/profile_tfa.php new file mode 100644 index 00000000000..1584b59d3a0 --- /dev/null +++ b/Themes/default/templates/Profile/profile_tfa.php @@ -0,0 +1,41 @@ + +
    +
    +
    +
    +
    +is_me): ?> + + + + + + (!empty(Config::$modSettings['force_ssl']) ? strtr(Config::$scripturl, ['http://' => 'https://']) : Config::$scripturl) . '?action=profile;u=' . Utils::$context['id_member'] . ';area=tfadisable'], file: 'Profile') ?> + + +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/profile_theme_pick.php b/Themes/default/templates/Profile/profile_theme_pick.php new file mode 100644 index 00000000000..704842a159f --- /dev/null +++ b/Themes/default/templates/Profile/profile_theme_pick.php @@ -0,0 +1,31 @@ + +
    + +
    +
    + +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/profile_theme_settings.php b/Themes/default/templates/Profile/profile_theme_settings.php new file mode 100644 index 00000000000..193e1290798 --- /dev/null +++ b/Themes/default/templates/Profile/profile_theme_settings.php @@ -0,0 +1,60 @@ + $setting): ?> +
    +
    +
    +
    +
    +
    + +
    + +
    +
    + + value="1"> + + + + name="default_options[]" id="" value=""> +
    diff --git a/Themes/default/templates/Profile/profile_timeformat_modify.php b/Themes/default/templates/Profile/profile_timeformat_modify.php new file mode 100644 index 00000000000..a076558ddc2 --- /dev/null +++ b/Themes/default/templates/Profile/profile_timeformat_modify.php @@ -0,0 +1,46 @@ + +
    +
    + + + + +
    +
    + + +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/profile_timezone.php b/Themes/default/templates/Profile/profile_timezone.php new file mode 100644 index 00000000000..2fe2ad2a58c --- /dev/null +++ b/Themes/default/templates/Profile/profile_timezone.php @@ -0,0 +1,35 @@ + +
    + + + +
    +
    subTemplate('timezone_select', ['name' => 'timezone', 'selection' => Profile::$member->timezone]); ?> +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/showAlerts.php b/Themes/default/templates/Profile/showAlerts.php new file mode 100644 index 00000000000..f7554c2d387 --- /dev/null +++ b/Themes/default/templates/Profile/showAlerts.php @@ -0,0 +1,73 @@ + +
    + +
    +
    +

    + is_me ? 'alerts_member' : 'alerts', ['member' => Utils::$context['member']['name']], file: 'General') ?> +

    +
    +
    + +
    +
    + $alert): ?> + + + + + + +
    +
    + +
    +
    +
    + +
    + + subTemplate('quickbuttons', ['list_items' => $alert['quickbuttons'], 'list_class' => 'profile_alerts']); ?> +
    +
    + +
    + + + + + + +
    +
    +
    diff --git a/Themes/default/templates/Profile/showDrafts.php b/Themes/default/templates/Profile/showDrafts.php new file mode 100644 index 00000000000..a8856e4819d --- /dev/null +++ b/Themes/default/templates/Profile/showDrafts.php @@ -0,0 +1,56 @@ + +
    +

    + is_me ? Lang::getTxt('drafts_member', ['member' => Utils::$context['member']['name']], file: 'Drafts') : Lang::getTxt('drafts', file: 'Drafts') ?> +

    +
    + + ' : '' ?> +
    + +
    +
    +
    #
    +
    +

    + /     + + +

    + $draft['time']], file: 'Drafts') ?> +
    +
    + +
    +
    subTemplate('quickbuttons', ['list_items' => $draft['quickbuttons'], 'list_class' => 'profile_drafts']); ?> +
    +
    +
    + +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/showPermissions.php b/Themes/default/templates/Profile/showPermissions.php new file mode 100644 index 00000000000..6b6b5d90bef --- /dev/null +++ b/Themes/default/templates/Profile/showPermissions.php @@ -0,0 +1,106 @@ + +
    +

    + +

    +
    +
    +
    +
    +
    +

    +
    +
    Lang::sentenceList(array_map( + fn($brd) => '' . $brd['name'] . '', + Utils::$context['no_access_boards'], + )), + ], + file: 'Profile', + ) ?> +
    +
    +
    +

    +
    + + + + + + + + + + + + + +
    + ' . $permission['name'] . '' : $permission['name'] ?> + + Lang::sentenceList($permission['groups']['denied'])], file: 'Profile') ?> + Lang::sentenceList($permission['groups']['allowed'])], file: 'Profile') ?> +
    +
    +
    +

    +
    +
    +

    + + +

    +
    +
    + + + + + + + + + + + + + +
    + ' . $permission['name'] . '' : $permission['name'] ?> + + Lang::sentenceList($permission['groups']['denied'])], file: 'Profile') ?> + Lang::sentenceList($permission['groups']['allowed'])], file: 'Profile') ?> +
    +

    +
    diff --git a/Themes/default/templates/Profile/showPosts.php b/Themes/default/templates/Profile/showPosts.php new file mode 100644 index 00000000000..62acdd1d412 --- /dev/null +++ b/Themes/default/templates/Profile/showPosts.php @@ -0,0 +1,75 @@ + +
    +

    + is_me ? ' - ' . Utils::$context['member']['name'] : '' ?> +

    +
    + + ' : '' ?> +
    +
    #
    +
    +

    + / +

    + +
    +
    + +
    +
    +
    + +
    +
    subTemplate('quickbuttons', ['list_items' => $post['quickbuttons'], 'list_class' => 'profile_showposts']); ?> +
    subTemplate('show_list', ['list_id' => 'attachments']); ?> +
    + +
    +
    + +
    diff --git a/Themes/default/templates/Profile/statPanel.php b/Themes/default/templates/Profile/statPanel.php new file mode 100644 index 00000000000..f82548238d9 --- /dev/null +++ b/Themes/default/templates/Profile/statPanel.php @@ -0,0 +1,116 @@ + + + +
    +
    +
    + $stat): ?> +
    + +
    + +
    + + +
    +
    + +
    +
    +

    + +

    +
    + + +

    + + +
      + + +
    • +
      +
      + +
      +
      + +
    • + +
    + +
    + +
    +
    +
    +

    + +

    +
    + +

    + +
    + + +
    +
    +
    + +
    + +
    + +
    + +
    +
    +
    +

    + +

    +
    + +

    + +
    + + +
    +
    +
    + +
    + +
    + +
    + +
    +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/summary.php b/Themes/default/templates/Profile/summary.php new file mode 100644 index 00000000000..b8114b6d959 --- /dev/null +++ b/Themes/default/templates/Profile/summary.php @@ -0,0 +1,316 @@ + + + +
    +
    + + + + + +' . $field['output_html'] . ''; +?> + + + +
    +
      +
    +
    + + +
    +

    + + + + + + + + + + + + + + + + + +

    +
    + + + + + + + +' . $field['output_html'] . ''; +?> + + + +
    +
      +
    +
    + + +
      + + +
    • + + + +
    • + + + + + +
    • + + + +
    + + ' : '' ?>' : '' ?> + +is_me): ?> +
    + + +
    +is_me && Utils::$context['can_send_pm']): ?> + + + +is_me && !empty(Config::$modSettings['drafts_post_enabled'])): ?> + + + + + + + + +' . $field['output_html'] . ''; +?> + + + +
    +
      +
    +
    + + +
    + +
    +
    +is_me || User::$me->is_admin): ?> +
    +
    + + +
    +
    ()
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    +
    settings['images_url'] . '/cake.png" alt="">' : '') ?>
    +
    + + + + + + + + + 0): ?> +
    + +
    :
    +
    + +
    + + +
    +
    +
    + + + +
    +
    + + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    + + + + + +' . $field['output_html'] . ''; +?> + + + +
    +
      +
    +
    + + + + +
    +
    + +
    + + + + + + +' . $field['output_html'] . ''; +?> + + + +
    +
      +
    +
    + + + +
    + + +
    +
    + + + + () + +
    + + + + + +
    + +
    +
    + +
    + + +
    +
    + +
    + +
    + +
    +
    + > +
    + + + +
    +   +
    + + + +
    + +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/tfadisable.php b/Themes/default/templates/Profile/tfadisable.php new file mode 100644 index 00000000000..d03426fcff1 --- /dev/null +++ b/Themes/default/templates/Profile/tfadisable.php @@ -0,0 +1,48 @@ + +
    +

    +
    +
    +
    +is_me): ?> +
    + >
    + +
    + +
    + User::$me->name], file: 'Profile') ?> +
    + + + + + +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/tfasetup.php b/Themes/default/templates/Profile/tfasetup.php new file mode 100644 index 00000000000..0a720e0da48 --- /dev/null +++ b/Themes/default/templates/Profile/tfasetup.php @@ -0,0 +1,84 @@ + +
    +

    +
    +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    +
    +
    +
    +
    + +
    + +
    + + > +
    +
    + +
    +
    +
    +
    +
    + +
    + +
    + + > + +
    + + +
    +
    +
    +
    + +
    + +
    + + +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/tfasetup_backup.php b/Themes/default/templates/Profile/tfasetup_backup.php new file mode 100644 index 00000000000..3a41d53a274 --- /dev/null +++ b/Themes/default/templates/Profile/tfasetup_backup.php @@ -0,0 +1,33 @@ + +
    +

    +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/Profile/trackActivity.php b/Themes/default/templates/Profile/trackActivity.php new file mode 100644 index 00000000000..cf8f7c46b49 --- /dev/null +++ b/Themes/default/templates/Profile/trackActivity.php @@ -0,0 +1,53 @@ + +
    +

    Utils::$context['member']['name']], file: 'Profile') ?>

    +
    +
    +
    +
    + + + ' . Lang::getTxt('why_two_ip_address', file: 'Profile') . '') ?> +
    +
    + + , +
    +
    +
    + 0 ? Lang::sentenceList(Utils::$context['ips']) : Lang::getTxt('none', file: 'General')) ?> +
    +
    +
    + 0 ? Lang::sentenceList(Utils::$context['error_ips']) : Lang::getTxt('none', file: 'General')) ?> +
    +
    +
    + 0 ? Lang::sentenceList(Utils::$context['members_in_range']) : Lang::getTxt('none', file: 'General')) ?> +
    +
    +
    subTemplate('show_list', ['list_id' => 'track_user_list']); ?> diff --git a/Themes/default/templates/Profile/trackIP.php b/Themes/default/templates/Profile/trackIP.php new file mode 100644 index 00000000000..dee2aab23f4 --- /dev/null +++ b/Themes/default/templates/Profile/trackIP.php @@ -0,0 +1,72 @@ + +
    +

    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    +

    +
    +
    +
    +
    +
    +
    +

    +
    +

    + +

    + + + + + + + + $memberlist): ?> + + + + + +
    +
    subTemplate('show_list', ['list_id' => 'track_message_list']); ?>
    subTemplate('show_list', ['list_id' => 'track_user_list']); ?>
    subTemplate('show_list', ['list_id' => $list]); ?> diff --git a/Themes/default/templates/Profile/viewWarning.php b/Themes/default/templates/Profile/viewWarning.php new file mode 100644 index 00000000000..5ff9c53cb17 --- /dev/null +++ b/Themes/default/templates/Profile/viewWarning.php @@ -0,0 +1,55 @@ +subTemplate('load_warning_variables'); ?> +
    +

    + +

    +
    +

    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    + % +
    +
    +
    + +
    +
    + +
    +
    +
    subTemplate('show_list', ['list_id' => 'view_warnings']); ?> diff --git a/Themes/default/templates/Recent/replies.php b/Themes/default/templates/Recent/replies.php index f3ec89aabaf..bcdd81e9a38 100644 --- a/Themes/default/templates/Recent/replies.php +++ b/Themes/default/templates/Recent/replies.php @@ -57,7 +57,7 @@ - subTemplate('button_strip', ['button_strip' => Utils::$context['recent_buttons'], 'direction' => 'right']) : '' ?> + fetchSubTemplate('button_strip', ['button_strip' => Utils::$context['recent_buttons'], 'direction' => 'right']) : '' ?>
    @@ -130,7 +130,7 @@
    - subTemplate('button_strip', ['button_strip' => Utils::$context['recent_buttons'], 'direction' => 'right']) : '' ?> + fetchSubTemplate('button_strip', ['button_strip' => Utils::$context['recent_buttons'], 'direction' => 'right']) : '' ?> diff --git a/Themes/default/templates/Recent/unread.php b/Themes/default/templates/Recent/unread.php index 6b235b799ab..8107a20f2ff 100644 --- a/Themes/default/templates/Recent/unread.php +++ b/Themes/default/templates/Recent/unread.php @@ -57,7 +57,7 @@
    - subTemplate('button_strip', ['button_strip' => Utils::$context['recent_buttons'], 'direction' => 'right']) : '' ?> + fetchSubTemplate('button_strip', ['button_strip' => Utils::$context['recent_buttons'], 'direction' => 'right']) : '' ?>
    @@ -132,7 +132,7 @@
    - subTemplate('button_strip', ['button_strip' => Utils::$context['recent_buttons'], 'direction' => 'right']) : '' ?> + fetchSubTemplate('button_strip', ['button_strip' => Utils::$context['recent_buttons'], 'direction' => 'right']) : '' ?> diff --git a/Themes/default/templates/Register/registration_form.php b/Themes/default/templates/Register/registration_form.php index 9620bf63567..4bb29908f32 100644 --- a/Themes/default/templates/Register/registration_form.php +++ b/Themes/default/templates/Register/registration_form.php @@ -37,19 +37,17 @@ function verifyAgree() } var currentAuthMethod = 'passwd'; - - - + +
    -
      - - -
    • - +
        + +
      • +
      -
    - +
    +

    @@ -92,108 +90,64 @@ function verifyAgree()
    >
    -
    - - -
    - - 1): ?> +
    + +
    1): ?> +
    >:
    -
    - - -
    - +
    + + + - - - + +

    -
    - - - - $field): ?> - -hasSubTemplate('profile_' . $field['callback_func'])): ?> -subTemplate('profile_' . $field['callback_func']) ?> - - +
    $field): ?>hasSubTemplate('profile_' . $field['callback_func'])): ?>subTemplate('profile_' . $field['callback_func']); ?> +
    - >: - - - - + >: + + +
    -
    - - - - - - - - - - - - > - - - value="1" > - - - - - - - - - -
    - - - - - - - +
    + + + + + + > + + value="1" > + + + + + +
    +
    >:
    -
    - - - - - +
    +
    -
    - - + +

    @@ -202,17 +156,16 @@ function verifyAgree() subTemplate('control_verification', ['verify_id' => Utils::$context['visual_verification_id'], 'display_type' => 'all']); ?> - - -
    - - +
    + +
    +

    - - - - + + + +
    diff --git a/Themes/default/templates/TimeZoneSelect/index.php b/Themes/default/templates/TimeZoneSelect/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/TimeZoneSelect/index.php @@ -0,0 +1,8 @@ + 0, 'extra' => []], EXTR_SKIP); +?> 1): ?> $value): ?> Utils::entityStrlen($label), $list))); ?> + \ No newline at end of file diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/themes_copy.txt b/tests/Integration/Http/Snapshot/snapshots/admin/themes_copy.txt index 4325305113a..61b74a0a601 100644 --- a/tests/Integration/Http/Snapshot/snapshots/admin/themes_copy.txt +++ b/tests/Integration/Http/Snapshot/snapshots/admin/themes_copy.txt @@ -86,7 +86,7 @@ div#admin_content ul.theme_options li.flow_hidden.windowbg span.floatleft - "Admin.template.php" + "templates/Admin/" span.error "(already exists)" span.floatright @@ -102,7 +102,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "BoardIndex.template.php" + "templates/BoardIndex/" span.error "(already exists)" span.floatright @@ -142,7 +142,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "EventEditor.template.php" + "templates/EventEditor/" span.error "(already exists)" span.floatright @@ -294,7 +294,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "ManagePermissions.template.php" + "templates/ManagePermissions/" span.error "(already exists)" span.floatright @@ -334,7 +334,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "MessageIndex.template.php" + "templates/MessageIndex/" span.error "(already exists)" span.floatright @@ -342,7 +342,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "ModerationCenter.template.php" + "templates/ModerationCenter/" span.error "(already exists)" span.floatright @@ -406,7 +406,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "Profile.template.php" + "templates/Profile/" span.error "(already exists)" span.floatright @@ -502,7 +502,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "TimeZoneSelect.template.php" + "templates/TimeZoneSelect/" span.error "(already exists)" span.floatright From fd2aa262bb28425e2f247694691f8af86c72d0af Mon Sep 17 00:00:00 2001 From: albertlast Date: Wed, 30 Sep 2026 18:25:09 +0200 Subject: [PATCH 17/20] Renders the generic list and controls templates with Plates GenericList and GenericControls, which every other converted template calls into for lists, the editor and the verification controls. Byte for byte the same on every page the snapshot suite covers. template_control_verification() returned whether there was more to show when displaying one item at a time. Nothing in SMF uses that, and a Plates template cannot return a value; the output is the same. Co-Authored-By: Claude Opus 5.5 Signed-off-by: albertlast --- Themes/default/GenericControls.template.php | 211 ------------------ Themes/default/GenericList.template.php | 197 ---------------- .../GenericControls/control_richedit.php | 51 +++++ .../control_richedit_buttons.php | 50 +++++ .../GenericControls/control_verification.php | 87 ++++++++ .../templates/GenericControls/index.php | 8 + .../templates/GenericList/additional_rows.php | 29 +++ .../default/templates/GenericList/index.php | 8 + .../templates/GenericList/show_list.php | 104 +++++++++ .../Snapshot/snapshots/admin/themes_copy.txt | 4 +- 10 files changed, 339 insertions(+), 410 deletions(-) delete mode 100644 Themes/default/GenericControls.template.php delete mode 100644 Themes/default/GenericList.template.php create mode 100644 Themes/default/templates/GenericControls/control_richedit.php create mode 100644 Themes/default/templates/GenericControls/control_richedit_buttons.php create mode 100644 Themes/default/templates/GenericControls/control_verification.php create mode 100644 Themes/default/templates/GenericControls/index.php create mode 100644 Themes/default/templates/GenericList/additional_rows.php create mode 100644 Themes/default/templates/GenericList/index.php create mode 100644 Themes/default/templates/GenericList/show_list.php diff --git a/Themes/default/GenericControls.template.php b/Themes/default/GenericControls.template.php deleted file mode 100644 index da7ee3d3442..00000000000 --- a/Themes/default/GenericControls.template.php +++ /dev/null @@ -1,211 +0,0 @@ -', $editor_context['value'], ' - - '; -} - -/** - * Renders the buttons section below a rich-text editor. - * - * Displays form buttons such as "Post" or "Preview" and integrates - * functionality like auto-saving drafts if enabled. - * - * @param string $editor_id The unique ID of the editor for which buttons are displayed. - */ -function template_control_richedit_buttons(string $editor_id): void -{ - $editor_context = Editor::$loaded[$editor_id]; - - echo ' - - ', Utils::$context['shortcuts_text'], ' - - '; - - foreach (Utils::$context['richedit_buttons'] as $name => $button) { - if ($name == 'preview') { - $button['value'] = $editor_context['labels']['preview_button'] ?? $button['value']; - $button['show'] = $editor_context['preview_type']; - } - - if ($button['show']) { - echo ' - '; - } - } - - echo ' - - '; - - // Include auto-save feature if drafts are enabled. - if (!empty(Utils::$context['drafts_save']) && !empty(Utils::$context['drafts_autosave'])) { - echo ' - - - - '; - } -} - -/** - * Displays a verification form with CAPTCHA or question-based challenges. - * - * Used to validate user input for forms, supporting various verification - * mechanisms such as CAPTCHA images, reCAPTCHA, and custom questions. - * - * @param int|string $verify_id The unique identifier for the verification control. - * @param string $display_type Determines how to display items: - * - `'single'`: Displays one item at a time (e.g., in a loop). - * - `'all'`: Displays all items together. - * @param bool $reset Whether to reset the internal tracking counter. - * - * @return ?bool Returns `false` if no items are left to display, `true` if displaying a single item, and `null` otherwise. - */ -function template_control_verification(int|string $verify_id, string $display_type = 'all', bool $reset = false): ?bool -{ - $verify_context = Verifier::$loaded[$verify_id]; - - // Reset tracking if necessary. - if (empty($verify_context->tracking) || $reset) { - $verify_context->tracking = 0; - } - - $total_items = count($verify_context->questions) + ($verify_context->show_visual || $verify_context->can_recaptcha ? 1 : 0); - - // Stop if all items are processed. - if ($verify_context->tracking > $total_items) { - return false; - } - - // Loop through each item to show them. - for ($i = 0; $i < $total_items; $i++) { - // If we're after a single item only show it if we're in the right place. - if ($display_type == 'single' && $verify_context->tracking != $i) { - continue; - } - - if ($display_type != 'single') { - echo ' -
    '; - } - - // Display empty field, but only if we have one, and it's the first time. - if ($verify_context->empty_field && empty($i)) { - echo ' -
    - ', Lang::getTxt('visual_verification_hidden', file: 'General'), ' - -
    '; - } - - // Do the actual stuff - if ($i == 0 && ($verify_context->show_visual || $verify_context->can_recaptcha)) { - if ($verify_context->show_visual) { - if (Utils::$context['use_graphic_library']) { - echo ' - ', Lang::getTxt('visual_verification_description', file: 'General'), ''; - } else { - echo ' - ', Lang::getTxt('visual_verification_description', file: 'General'), ' - ', Lang::getTxt('visual_verification_description', file: 'General'), ' - ', Lang::getTxt('visual_verification_description', file: 'General'), ' - ', Lang::getTxt('visual_verification_description', file: 'General'), ' - ', Lang::getTxt('visual_verification_description', file: 'General'), ' - ', Lang::getTxt('visual_verification_description', file: 'General'), ''; - } - - echo ' -
    - ', Lang::getTxt('visual_verification_sound', file: 'General'), ' / ', Lang::getTxt('visual_verification_request_new', file: 'General'), '', $display_type != 'quick_reply' ? '
    ' : '', '
    - ', Lang::getTxt('visual_verification_description', file: 'General'), $display_type != 'quick_reply' ? '
    ' : '', ' - -
    '; - } - - if ($verify_context->can_recaptcha) { - $lang = Lang::getTxt(Lang::txtExists('lang_recaptcha', file: 'General') ? 'lang_recaptcha' : 'lang_dictionary', file: 'General'); - echo ' -
    -
    - '; - } - } else { - // Where in the question array is this question? - $qIndex = $verify_context->show_visual || $verify_context->can_recaptcha ? $i - 1 : $i; - - if (isset($verify_context->questions[$qIndex])) { - echo ' -
    - ', $verify_context->questions[$qIndex]['q'], ':
    - questions[$qIndex]['is_error'] ? 'style="border: 1px red solid;"' : '', ' required> -
    '; - } - } - - if ($display_type != 'single') { - echo ' -
    '; - } - - // If we were displaying just one and we did it, break. - if ($display_type == 'single' && $verify_context->tracking == $i) { - break; - } - } - - // Assume we found something, always. - $verify_context->tracking++; - - // Tell something displaying piecemeal to keep going. - if ($display_type == 'single') { - return true; - } - - return null; -} diff --git a/Themes/default/GenericList.template.php b/Themes/default/GenericList.template.php deleted file mode 100644 index 234818f217d..00000000000 --- a/Themes/default/GenericList.template.php +++ /dev/null @@ -1,197 +0,0 @@ -'; - } - - // Show the title of the table (if any). - if (!empty($cur_list['title'])) { - echo ' -
    -

    - ', $cur_list['title'], ' -

    -
    '; - } - - if (isset($cur_list['additional_rows']['after_title'])) { - echo ' -
    '; - - template_additional_rows('after_title', $cur_list); - - echo ' -
    '; - } - - if (isset($cur_list['additional_rows']['top_of_list'])) { - template_additional_rows('top_of_list', $cur_list); - } - - if ((!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) || isset($cur_list['additional_rows']['above_column_headers'])) { - // Show the page index (if this list doesn't intend to show all items). - if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) { - echo ' -
    - -
    '; - } - - if (isset($cur_list['additional_rows']['above_column_headers'])) { - template_additional_rows('above_column_headers', $cur_list); - } - } - - echo ' - '; - - // Show the column headers. - $header_count = count($cur_list['headers']); - - if (!($header_count < 2 && empty($cur_list['headers'][0]['label']))) { - echo ' - - '; - - // Loop through each column and add a table header. - foreach ($cur_list['headers'] as $col_header) { - echo ' - '; - } - - echo ' - - '; - } - - echo ' - '; - - // Show a nice message informing there are no items in this list. - if (empty($cur_list['rows']) && !empty($cur_list['no_items_label'])) { - echo ' - - - '; - } - - // Show the list rows. - elseif (!empty($cur_list['rows'])) { - foreach ($cur_list['rows'] as $id => $row) { - echo ' - '; - - if (!empty($row['data'])) { - foreach ($row['data'] as $row_id => $row_data) { - echo ' - '; - } - } - - echo ' - '; - } - } - - echo ' - -
    - ', empty($col_header['href']) ? '' : '', empty($col_header['label']) ? '' : $col_header['label'], empty($col_header['href']) ? '' : (empty($col_header['sort_image']) ? '' : ' '), ' -
    - ', $cur_list['no_items_label'], ' -
    - ', Utils::adjustHeadingLevels($row_data['value'], 3), ' -
    '; - - if ((!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) || isset($cur_list['additional_rows']['below_table_data'])) { - echo ' -
    '; - - // Show the page index (if this list doesn't intend to show all items). - if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) { - echo ' -
    - -
    '; - } - - - if (isset($cur_list['additional_rows']['below_table_data'])) { - template_additional_rows('below_table_data', $cur_list); - } - echo ' -
    '; - } - - if (isset($cur_list['additional_rows']['bottom_of_list'])) { - template_additional_rows('bottom_of_list', $cur_list); - } - - if (isset($cur_list['form'])) { - foreach ($cur_list['form']['hidden_fields'] as $name => $value) { - echo ' - '; - } - - if (isset($cur_list['form']['token'])) { - echo ' - '; - } - - echo ' - '; - } - - if (isset($cur_list['javascript'])) { - echo ' - '; - } -} - -/** - * This template displays additional rows above or below the list. - * - * @param string $row_position The position ('top', 'bottom', etc.) - * @param array $cur_list An array with the data for the current list - */ -function template_additional_rows($row_position, $cur_list) -{ - foreach ($cur_list['additional_rows'][$row_position] as $row) { - echo ' -
    - ', $row['value'], ' -
    '; - } -} diff --git a/Themes/default/templates/GenericControls/control_richedit.php b/Themes/default/templates/GenericControls/control_richedit.php new file mode 100644 index 00000000000..cdf7d5f4b4a --- /dev/null +++ b/Themes/default/templates/GenericControls/control_richedit.php @@ -0,0 +1,51 @@ + null, 'bbc_container' => null], EXTR_SKIP); +?> + + + + + \ No newline at end of file diff --git a/Themes/default/templates/GenericControls/control_richedit_buttons.php b/Themes/default/templates/GenericControls/control_richedit_buttons.php new file mode 100644 index 00000000000..ac311d2d9c8 --- /dev/null +++ b/Themes/default/templates/GenericControls/control_richedit_buttons.php @@ -0,0 +1,50 @@ + + + + + + + $button): ?> + + name="" value=""> + + + + + + + + diff --git a/Themes/default/templates/GenericControls/control_verification.php b/Themes/default/templates/GenericControls/control_verification.php new file mode 100644 index 00000000000..4b2e6c3f441 --- /dev/null +++ b/Themes/default/templates/GenericControls/control_verification.php @@ -0,0 +1,87 @@ + 'all', 'reset' => false], EXTR_SKIP); +?>tracking) || $reset): ?>tracking = 0; ?>questions) + ($verify_context->show_visual || $verify_context->can_recaptcha ? 1 : 0); +// Stop if all items are processed. +?>tracking > $total_items): ?>tracking != $i): ?> + +
    empty_field && empty($i)): ?> + +
    + + + +
    show_visual || $verify_context->can_recaptcha)): ?>show_visual): ?> + + <?= Lang::getTxt('visual_verification_description', file: 'General') ?> + + <?= Lang::getTxt('visual_verification_description', file: 'General') ?> + <?= Lang::getTxt('visual_verification_description', file: 'General') ?> + <?= Lang::getTxt('visual_verification_description', file: 'General') ?> + <?= Lang::getTxt('visual_verification_description', file: 'General') ?> + <?= Lang::getTxt('visual_verification_description', file: 'General') ?> + <?= Lang::getTxt('visual_verification_description', file: 'General') ?> + +
    + / ' : '' ?>
    + ' : '' ?> + + +
    can_recaptcha): ?> + +
    +
    + show_visual || $verify_context->can_recaptcha ? $i - 1 : $i; +?>questions[$qIndex])): ?> + +
    + questions[$qIndex]['q'] ?>:
    + questions[$qIndex]['is_error'] ? 'style="border: 1px red solid;"' : '' ?> required> +
    + +
    tracking == $i): ?>tracking++; +// Tell something displaying piecemeal to keep going. +?> diff --git a/Themes/default/templates/GenericControls/index.php b/Themes/default/templates/GenericControls/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/GenericControls/index.php @@ -0,0 +1,8 @@ + + +
    > + + +
    diff --git a/Themes/default/templates/GenericList/index.php b/Themes/default/templates/GenericList/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/GenericList/index.php @@ -0,0 +1,8 @@ + null], EXTR_SKIP); +?> + +
    accept-charset="UTF-8"> + +
    +

    + + +

    +
    + +
    subTemplate('additional_rows', ['row_position' => 'after_title', 'cur_list' => $cur_list]); ?> + +
    subTemplate('additional_rows', ['row_position' => 'top_of_list', 'cur_list' => $cur_list]); ?> + +
    + +
    subTemplate('additional_rows', ['row_position' => 'above_column_headers', 'cur_list' => $cur_list]); ?> + + > + + + + + + + + + + + + + + $row): ?> + + id="list__"> $row_data): ?> + + + + + + +
    > + ' ?>' : ' ') ?> + +
    + + +
    > + + +
    + +
    + +
    + +
    subTemplate('additional_rows', ['row_position' => 'below_table_data', 'cur_list' => $cur_list]); ?> + +
    subTemplate('additional_rows', ['row_position' => 'bottom_of_list', 'cur_list' => $cur_list]); ?> $value): ?> + + + + + +
    + + diff --git a/tests/Integration/Http/Snapshot/snapshots/admin/themes_copy.txt b/tests/Integration/Http/Snapshot/snapshots/admin/themes_copy.txt index 61b74a0a601..5cc977aa8a4 100644 --- a/tests/Integration/Http/Snapshot/snapshots/admin/themes_copy.txt +++ b/tests/Integration/Http/Snapshot/snapshots/admin/themes_copy.txt @@ -150,7 +150,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "GenericControls.template.php" + "templates/GenericControls/" span.error "(already exists)" span.floatright @@ -158,7 +158,7 @@ div#admin_content "(can’t copy)" li.flow_hidden.windowbg span.floatleft - "GenericList.template.php" + "templates/GenericList/" span.error "(already exists)" span.floatright From 026acc51b27847299a50a284e220351d032c3940 Mon Sep 17 00:00:00 2001 From: albertlast Date: Wed, 30 Sep 2026 18:34:53 +0200 Subject: [PATCH 18/20] Renders the index and XML templates with Plates The last two. The default theme has no *.template.php left, and every page the snapshot suite covers renders byte for byte what it did. Mods and themes call template_button_strip(), template_quickbuttons(), template_menu(), theme_linktree(), template_show_list() and the editor and verification controls by name, from templates of their own. Loading the Plates template that holds one of them defines that function, rendering the Plates template, unless the name is already taken by a theme that still has the template as a file. The XML template's stand-ins for when there is no index template are defined the same way. theme_linktree() is the sub-template 'linktree'. The quick buttons are always output, and template_quickbuttons() returns them when asked, as it did. The admin panel read a theme's variants out of index.template.php, and checked for that file to tell whether a directory is a theme; both also look at templates/index/init.php. Creating a copy of the default theme copies its index template directory. SSI's menu bar renders the sub-template rather than calling the function. Co-Authored-By: Claude Opus 5.5 Signed-off-by: albertlast --- Sources/Actions/Admin/Themes.php | 12 +- Sources/Actions/ThemeChooser.php | 4 +- Sources/ServerSideIncludes.php | 2 +- Sources/TemplateEngine.php | 20 + Sources/TemplateFunctions.php | 128 +++ Sources/Theme.php | 19 + Themes/default/Xml.template.php | 477 --------- Themes/default/index.template.php | 931 ------------------ Themes/default/templates/Display/main.php | 6 +- .../default/templates/MessageIndex/main.php | 5 +- .../default/templates/Xml/check_username.php | 27 + Themes/default/templates/Xml/generic_xml.php | 23 + .../templates/Xml/generic_xml_recursive.php | 38 + Themes/default/templates/Xml/index.php | 8 + Themes/default/templates/Xml/jump_to.php | 31 + .../default/templates/Xml/message_icons.php | 29 + Themes/default/templates/Xml/modifydone.php | 41 + Themes/default/templates/Xml/modifyfast.php | 29 + .../default/templates/Xml/modifytopicdone.php | 40 + Themes/default/templates/Xml/pm.php | 42 + Themes/default/templates/Xml/post.php | 55 ++ Themes/default/templates/Xml/quotefast.php | 27 + Themes/default/templates/Xml/results.php | 67 ++ Themes/default/templates/Xml/sendbody.php | 27 + Themes/default/templates/Xml/split.php | 38 + Themes/default/templates/Xml/stats.php | 34 + Themes/default/templates/Xml/warning.php | 35 + .../templates/index/banned_warning_above.php | 37 + .../templates/index/banned_warning_below.php | 20 + Themes/default/templates/index/body_above.php | 203 ++++ Themes/default/templates/index/body_below.php | 60 ++ .../default/templates/index/button_strip.php | 55 ++ Themes/default/templates/index/html_above.php | 91 ++ Themes/default/templates/index/html_below.php | 26 + Themes/default/templates/index/index.php | 8 + Themes/default/templates/index/init.php | 91 ++ Themes/default/templates/index/linktree.php | 60 ++ .../templates/index/maint_warning_above.php | 37 + .../templates/index/maint_warning_below.php | 20 + Themes/default/templates/index/menu.php | 60 ++ .../default/templates/index/quickbuttons.php | 67 ++ .../index/security_warning_above.php | 39 + .../index/security_warning_below.php | 20 + .../Snapshot/snapshots/admin/themes_copy.txt | 4 +- tests/Unit/TemplateEngineTest.php | 30 + 45 files changed, 1696 insertions(+), 1427 deletions(-) create mode 100644 Sources/TemplateFunctions.php delete mode 100644 Themes/default/Xml.template.php delete mode 100644 Themes/default/index.template.php create mode 100644 Themes/default/templates/Xml/check_username.php create mode 100644 Themes/default/templates/Xml/generic_xml.php create mode 100644 Themes/default/templates/Xml/generic_xml_recursive.php create mode 100644 Themes/default/templates/Xml/index.php create mode 100644 Themes/default/templates/Xml/jump_to.php create mode 100644 Themes/default/templates/Xml/message_icons.php create mode 100644 Themes/default/templates/Xml/modifydone.php create mode 100644 Themes/default/templates/Xml/modifyfast.php create mode 100644 Themes/default/templates/Xml/modifytopicdone.php create mode 100644 Themes/default/templates/Xml/pm.php create mode 100644 Themes/default/templates/Xml/post.php create mode 100644 Themes/default/templates/Xml/quotefast.php create mode 100644 Themes/default/templates/Xml/results.php create mode 100644 Themes/default/templates/Xml/sendbody.php create mode 100644 Themes/default/templates/Xml/split.php create mode 100644 Themes/default/templates/Xml/stats.php create mode 100644 Themes/default/templates/Xml/warning.php create mode 100644 Themes/default/templates/index/banned_warning_above.php create mode 100644 Themes/default/templates/index/banned_warning_below.php create mode 100644 Themes/default/templates/index/body_above.php create mode 100644 Themes/default/templates/index/body_below.php create mode 100644 Themes/default/templates/index/button_strip.php create mode 100644 Themes/default/templates/index/html_above.php create mode 100644 Themes/default/templates/index/html_below.php create mode 100644 Themes/default/templates/index/index.php create mode 100644 Themes/default/templates/index/init.php create mode 100644 Themes/default/templates/index/linktree.php create mode 100644 Themes/default/templates/index/maint_warning_above.php create mode 100644 Themes/default/templates/index/maint_warning_below.php create mode 100644 Themes/default/templates/index/menu.php create mode 100644 Themes/default/templates/index/quickbuttons.php create mode 100644 Themes/default/templates/index/security_warning_above.php create mode 100644 Themes/default/templates/index/security_warning_below.php diff --git a/Sources/Actions/Admin/Themes.php b/Sources/Actions/Admin/Themes.php index 1242518ed3e..1b45a5db227 100644 --- a/Sources/Actions/Admin/Themes.php +++ b/Sources/Actions/Admin/Themes.php @@ -770,8 +770,8 @@ public function setSettings(): void // Load the variants separately... Theme::$current->settings['theme_variants'] = []; - if (file_exists(Theme::$current->settings['theme_dir'] . '/index.template.php')) { - $file_contents = implode('', file(Theme::$current->settings['theme_dir'] . '/index.template.php')); + if (($init_file = Theme::templateInitFile(Theme::$current->settings['theme_dir'])) !== null) { + $file_contents = implode('', file($init_file)); if (preg_match('~((?:SMF\\\\)?Theme::\$current(?:->|_)|\$)settings\[\'theme_variants\'\]\s*=(.+?);~', $file_contents, $matches)) { eval('use SMF\\Theme; global $settings; ' . $matches[0]); @@ -1056,7 +1056,7 @@ public function edit(): ?string foreach (Utils::$context['themes'] as $key => $theme) { // There has to be a Settings template! - if (!file_exists($theme['theme_dir'] . '/index.template.php') && !file_exists($theme['theme_dir'] . '/css/index.css')) { + if (Theme::templateInitFile($theme['theme_dir']) === null && !file_exists($theme['theme_dir'] . '/css/index.css')) { unset(Utils::$context['themes'][$key]); } else { Utils::$context['themes'][$key]['can_edit_style'] = file_exists($theme['theme_dir'] . '/css/index.css'); @@ -1076,7 +1076,7 @@ public function edit(): ?string Utils::$context['theme_id'] = $currentTheme['id']; Utils::$context['browse_title'] = Lang::getTxt('themeadmin_browsing_theme', $currentTheme, file: 'Themes'); - if (!file_exists($currentTheme['theme_dir'] . '/index.template.php') && !file_exists($currentTheme['theme_dir'] . '/css/index.css')) { + if (Theme::templateInitFile($currentTheme['theme_dir']) === null && !file_exists($currentTheme['theme_dir'] . '/css/index.css')) { ErrorHandler::fatalLang('theme_edit_missing', false); } @@ -1589,7 +1589,6 @@ protected function installCopy(): array // Copy over the default non-theme files. $to_copy = [ '/index.php', - '/index.template.php', '/css/admin.css', '/css/calendar.css', '/css/calendar.rtl.css', @@ -1606,6 +1605,9 @@ protected function installCopy(): array Utils::makeWritable(Utils::$context['to_install']['theme_dir'] . $file, '0777'); } + // And the index template, which holds the layout and the theme's settings. + $this->copyPlatesTemplate('index', Utils::$context['to_install']['theme_dir']); + // And now the entire images directory! PackageUtils::copytree(Theme::$current->settings['default_theme_dir'] . '/images', Utils::$context['to_install']['theme_dir'] . '/images'); PackageUtils::flushCache(); diff --git a/Sources/Actions/ThemeChooser.php b/Sources/Actions/ThemeChooser.php index b442f3f824c..73d7556efca 100644 --- a/Sources/Actions/ThemeChooser.php +++ b/Sources/Actions/ThemeChooser.php @@ -284,8 +284,8 @@ public function execute(): void // Are there any variants? Utils::$context['available_themes'][$id_theme]['variants'] = []; - if (file_exists($theme_data['theme_dir'] . '/index.template.php') && (empty($theme_data['disable_user_variant']) || User::$me->allowedTo('admin_forum'))) { - $file_contents = implode('', file($theme_data['theme_dir'] . '/index.template.php')); + if (($init_file = Theme::templateInitFile($theme_data['theme_dir'])) !== null && (empty($theme_data['disable_user_variant']) || User::$me->allowedTo('admin_forum'))) { + $file_contents = implode('', file($init_file)); if (preg_match('~((?:SMF\\\\)?Theme::\$current(?:->|_)|\$)settings\[\'theme_variants\'\]\s*=(.+?);~', $file_contents, $matches)) { Theme::$current->settings['theme_variants'] = []; diff --git a/Sources/ServerSideIncludes.php b/Sources/ServerSideIncludes.php index 87e22bca887..978cf418ff2 100644 --- a/Sources/ServerSideIncludes.php +++ b/Sources/ServerSideIncludes.php @@ -534,7 +534,7 @@ public static function menubar(string $output_method = 'echo'): ?array } if ($output_method == 'echo') { - template_menu(); + Theme::loadSubTemplate('menu'); return null; } diff --git a/Sources/TemplateEngine.php b/Sources/TemplateEngine.php index 65227db6df2..b2b8dcb9af9 100644 --- a/Sources/TemplateEngine.php +++ b/Sources/TemplateEngine.php @@ -170,6 +170,11 @@ public function addLoaded(string $template, ?string $file = null): void unset($this->loaded[$template]); $this->loaded[$template] = $file; + + // Templates that others call by name get functions of that name. + if ($file === null) { + self::defineFunctions($template); + } } /** @@ -360,4 +365,19 @@ protected function argumentsFor(string $function, array $params): array return array_diff(array_keys($params), $names) === [] ? $params : array_values($params); } + + /************************* + * Internal static methods + *************************/ + + /** + * Defines the template_*() functions that other templates call by name, + * for a template that is now a Plates template. + * + * @param string $template The name of the template that was loaded. + */ + protected static function defineFunctions(string $template): void + { + include __DIR__ . '/TemplateFunctions.php'; + } } diff --git a/Sources/TemplateFunctions.php b/Sources/TemplateFunctions.php new file mode 100644 index 00000000000..d0ceb319331 --- /dev/null +++ b/Sources/TemplateFunctions.php @@ -0,0 +1,128 @@ +render('index/button_strip', get_defined_vars()); + } + } + + if (!function_exists('template_quickbuttons')) { + function template_quickbuttons($list_items, $list_class = null, $output_method = 'echo') + { + $html = TemplateEngine::get()->render('index/quickbuttons', get_defined_vars()); + + // There are a few spots where the result needs to be returned. + if ($output_method != 'echo') { + return $html; + } + + echo $html; + } + } + + if (!function_exists('template_menu')) { + function template_menu() + { + echo TemplateEngine::get()->render('index/menu'); + } + } + + if (!function_exists('theme_linktree')) { + function theme_linktree($force_show = false) + { + echo TemplateEngine::get()->render('index/linktree', get_defined_vars()); + } + } + + break; + + case 'GenericList': + if (!function_exists('template_show_list')) { + function template_show_list($list_id = null) + { + echo TemplateEngine::get()->render('GenericList/show_list', get_defined_vars()); + } + } + + break; + + case 'GenericControls': + if (!function_exists('template_control_richedit')) { + function template_control_richedit(string $editor_id, bool|string|null $smiley_container = null, bool|string|null $bbc_container = null): void + { + echo TemplateEngine::get()->render('GenericControls/control_richedit', get_defined_vars()); + } + } + + if (!function_exists('template_control_richedit_buttons')) { + function template_control_richedit_buttons(string $editor_id): void + { + echo TemplateEngine::get()->render('GenericControls/control_richedit_buttons', get_defined_vars()); + } + } + + // Always returns null: a Plates template cannot say whether there is more to show one item at a time. + if (!function_exists('template_control_verification')) { + function template_control_verification(int|string $verify_id, string $display_type = 'all', bool $reset = false): ?bool + { + echo TemplateEngine::get()->render('GenericControls/control_verification', get_defined_vars()); + + return null; + } + } + + break; + + // An XML response has no index template, so nothing it shows can call these for real. + case 'Xml': + if (!function_exists('template_button_strip')) { + function template_button_strip($button_strip, $direction = 'top', $strip_options = []) {} + } + + if (!function_exists('template_menu')) { + function template_menu() {} + } + + if (!function_exists('theme_linktree')) { + function theme_linktree() {} + } + + break; +} diff --git a/Sources/Theme.php b/Sources/Theme.php index 6631aa66241..23e124d542a 100644 --- a/Sources/Theme.php +++ b/Sources/Theme.php @@ -380,6 +380,25 @@ public static function loadEssential(bool $load_lang = true): void Utils::$context['theme_loaded'] = true; } + /** + * Gets the file that holds a theme's own template_init(). + * + * The admin panel reads a theme's variants out of it without running it. + * + * @param string $theme_dir The theme's directory. + * @return ?string The file, or null if the theme has none of its own. + */ + public static function templateInitFile(string $theme_dir): ?string + { + foreach (['/index.template.php', '/' . TemplateEngine::DIRECTORY . '/index/init.php'] as $file) { + if (file_exists($theme_dir . $file)) { + return $theme_dir . $file; + } + } + + return null; + } + /** * Loads a template - if the theme doesn't include it, uses the default. * diff --git a/Themes/default/Xml.template.php b/Themes/default/Xml.template.php deleted file mode 100644 index 80e8b8f016c..00000000000 --- a/Themes/default/Xml.template.php +++ /dev/null @@ -1,477 +0,0 @@ - - - ', Utils::cleanXml(Utils::$context['message']), ' -'; -} - -/** - * This defines the XML for the AJAX quote feature - */ -function template_quotefast() -{ - echo '<', '?xml version="1.0" encoding="UTF-8"?', '> - - ', Utils::cleanXml(Utils::$context['quote']['xml']), ' -'; -} - -/** - * This defines the XML for the inline edit feature - */ -function template_modifyfast() -{ - echo '<', '?xml version="1.0" encoding="UTF-8"?', '> - - - - -'; - -} - -/** - * The XML for handling things when you're done editing a post inline - */ -function template_modifydone() -{ - echo '<', '?xml version="1.0" encoding="UTF-8"?', '> - - '; - - if (empty(Utils::$context['message']['errors'])) { - // Build our string of info about when and why it was modified - $modified = empty(Utils::$context['message']['modified']['time']) ? '' : Lang::getTxt('last_edit_by', ['time' => Utils::$context['message']['modified']['time'], 'member' => Utils::$context['message']['modified']['name']], file: 'General'); - $modified .= empty(Utils::$context['message']['modified']['reason']) ? '' : ' ' . Lang::getTxt('last_edit_reason', ['reason' => Utils::$context['message']['modified']['reason']], file: 'General'); - - echo ' - - - - '; - } else { - echo ' - ', Utils::$context['message']['errors']), ']]>'; - } - echo ' - -'; -} - -/** - * This handles things when editing a topic's subject from the messageindex. - */ -function template_modifytopicdone() -{ - echo '<', '?xml version="1.0" encoding="UTF-8"?', '> - - '; - - if (empty(Utils::$context['message']['errors'])) { - // Build our string of info about when and why it was modified - $modified = empty(Utils::$context['message']['modified']['time']) ? '' : Lang::getTxt('last_edit_by', ['time' => Utils::$context['message']['modified']['time'], 'member' => Utils::$context['message']['modified']['name']], file: 'General'); - $modified .= empty(Utils::$context['message']['modified']['reason']) ? '' : Lang::getTxt('last_edit_reason', ['reason' => Utils::$context['message']['modified']['reason']], file: 'General'); - - echo ' - ' . $modified . ''), ']]>'; - - if (!empty(Utils::$context['message']['subject'])) { - echo ' - '; - } - } else { - echo ' - ', Utils::$context['message']['errors'])), ']]>'; - } - echo ' - -'; -} - -/** - * The massive XML for previewing posts. - */ -function template_post() -{ - echo '<', '?xml version="1.0" encoding="UTF-8"?', '> - - - - - - '; - - if (!empty(Utils::$context['post_error'])) { - foreach (Utils::$context['post_error'] as $message) { - echo ' - '; - } - } - - echo ' - - - - - ', isset(Utils::$context['post_error']['no_message']) || isset(Utils::$context['post_error']['long_message']) ? ' - ' : '', ' - - ', Utils::$context['topic_last_message'] ?? '0', ''; - - if (!empty(Utils::$context['previous_posts'])) { - echo ' - '; - - foreach (Utils::$context['previous_posts'] as $post) { - echo ' - - - - - ', $post['is_ignored'] ? '1' : '0', ' - '; - } - - echo ' - '; - } - - echo ' -'; -} - -/** - * All the XML for previewing a PM - */ -function template_pm() -{ - // @todo something could be removed...otherwise it can be merged again with template_post - echo '<', '?xml version="1.0" encoding="UTF-8"?', '> - - - !empty(Utils::$context['preview_subject']) ? Utils::$context['preview_subject'] : Lang::getTxt('no_subject', file: 'General')]), ']]> - - - '; - - if (!empty(Utils::$context['post_error']['messages'])) { - foreach (Utils::$context['post_error']['messages'] as $message) { - echo ' - '; - } - } - - echo ' - - - - ', isset(Utils::$context['post_error']['no_message']) || isset(Utils::$context['post_error']['long_message']) ? ' - ' : '', ' - '; - - echo ' -'; -} - -/** - * The XML for previewing a warning - */ -function template_warning() -{ - // @todo something could be removed...otherwise it can be merged again with template_post - echo '<', '?xml version="1.0" encoding="UTF-8"?', '> - - - - - - '; - - if (!empty(Utils::$context['post_error']['messages'])) { - foreach (Utils::$context['post_error']['messages'] as $message) { - echo ' - '; - } - } - - echo ' - '; - - echo ' -'; -} - -/** - * The XML for hiding/showing stats sections via AJAX - */ -function template_stats() -{ - if (empty(Utils::$context['yearly'])) { - return; - } - - echo '<', '?xml version="1.0" encoding="UTF-8"?', '> -'; - - foreach (Utils::$context['yearly'] as $year) { - foreach ($year['months'] as $month) { - echo ' - '; - - foreach ($month['days'] as $day) { - echo ' - '; - } - - echo ' - '; - } - } - - echo ' -'; -} - -/** - * The XML for selecting items to split - */ -function template_split() -{ - echo '<', '?xml version="1.0" encoding="UTF-8"?', '> - - - '; - - foreach (Utils::$context['changes'] as $change) { - if ($change['type'] == 'remove') { - echo ' - '; - } else { - echo ' - - - - - - '; - } - } - echo ' -'; -} - -/* - * This is just to hold off some errors if people are stupid. - */ -if (!function_exists('template_button_strip')) { - function template_button_strip($button_strip, $direction = 'top', $strip_options = []) {} - - function template_menu() {} - - function theme_linktree() {} -} - -/** - * XML for search results - */ -function template_results() -{ - echo '<', '?xml version="1.0" encoding="UTF-8"?', '> -'; - - if (empty(Utils::$context['topics'])) { - echo ' - ', Lang::getTxt('search_no_results', file: 'General'), ''; - } else { - echo ' - '; - - while ($topic = Utils::$context['get_topics']()) { - echo ' - - ', $topic['id'], ' - ', $topic['relevance'], ' - - ', $topic['board']['id'], ' - ', Utils::cleanXml($topic['board']['name']), ' - ', $topic['board']['href'], ' - - - ', $topic['category']['id'], ' - ', Utils::cleanXml($topic['category']['name']), ' - ', $topic['category']['href'], ' - - '; - - foreach ($topic['matches'] as $message) { - echo ' - - ', $message['id'], ' - - - - ', $message['timestamp'], ' - ', $message['start'], ' - - - ', $message['member']['id'], ' - ', Utils::cleanXml($message['member']['name']), ' - ', $message['member']['href'], ' - - '; - } - echo ' - - '; - } - - echo ' - '; - } - - echo ' -'; -} - -/** - * The XML for the Jump To box - */ -function template_jump_to() -{ - echo '<', '?xml version="1.0" encoding="UTF-8"?', '> -'; - - foreach (Utils::$context['jump_to'] as $category) { - echo ' - '; - - foreach ($category['boards'] as $board) { - echo ' - '; - } - } - echo ' -'; -} - -/** - * The XML for displaying a column of message icons and selecting one via AJAX - */ -function template_message_icons() -{ - echo '<', '?xml version="1.0" encoding="UTF-8"?', '> -'; - - foreach (Utils::$context['icons'] as $icon) { - echo ' - '; - } - - echo ' -'; -} - -/** - * The XML for instantly showing whether a username is valid on the registration page - */ -function template_check_username() -{ - echo '<', '?xml version="1.0" encoding="UTF-8"?', '> - - ', Utils::cleanXml(Utils::$context['checked_username']), ' -'; -} - -/** - * This prints XML in its most generic form. - */ -function template_generic_xml() -{ - echo '<', '?xml version="1.0" encoding="UTF-8"?', '>'; - - // Show the data. - template_generic_xml_recursive(Utils::$context['xml_data'], 'smf'); -} - -/** - * Recursive function for displaying well-formed XML data. - * - * @param array $xml_data An array of XML data - * @param string $parent_tag The parent tag - * @param string $child_tag The child tag - * @param int $level How many levels to indent the code - * @param array $parent_attributes Attributes for the parent node - */ -function template_generic_xml_recursive(array $xml_data, string $parent_tag, string $child_tag = '', int $level = 0, array $parent_attributes = []) -{ - $level = max(0, $level); - $indent = str_repeat("\t", $level); - - echo "\n" . $indent . '<' . $parent_tag; - - foreach ($parent_attributes as $attr_key => $attr_value) { - echo ' ' . htmlspecialchars(Utils::cleanXml($attr_key), ENT_XML1, 'UTF-8') . '="' . htmlspecialchars(Utils::cleanXml($attr_value), ENT_XML1, 'UTF-8') . '"'; - } - - echo '>'; - - foreach ($xml_data as $key => $data) { - // Handle nested groups - if (is_array($data) && isset($data['identifier'], $data['children'])) { - $node_attributes = $data['attributes'] ?? []; - template_generic_xml_recursive( - $data['children'], - $key, - $data['identifier'] ?? null, - $level + 1, - $node_attributes, - ); - } // Handle individual elements - elseif (is_array($data) && isset($data['value'])) { - echo "\n" . $indent . "\t<" . ($data['identifier'] ?? $child_tag ?? $key); - - if (isset($data['attributes'])) { - foreach ($data['attributes'] as $attr_key => $attr_value) { - echo ' ' . htmlspecialchars(Utils::cleanXml($attr_key), ENT_XML1, 'UTF-8') . '="' . htmlspecialchars(Utils::cleanXml($attr_value), ENT_XML1, 'UTF-8') . '"'; - } - } - - $escaped_value = Utils::cleanXml($data['value']); - - // Self-closing tag for empty value - if ($escaped_value === '') { - echo ' />'; - } else { - if (preg_match('/[<&>]/', $escaped_value)) { - echo '>'; - } else { - echo '>' . htmlspecialchars($escaped_value, ENT_XML1, 'UTF-8'); - } - echo ''; - } - } - } - - echo "\n" . $indent . ''; -} diff --git a/Themes/default/index.template.php b/Themes/default/index.template.php deleted file mode 100644 index c94c85a005f..00000000000 --- a/Themes/default/index.template.php +++ /dev/null @@ -1,931 +0,0 @@ -settings['theme_version'] = '2.1'; - - /* - * Whether this theme supports a dark mode. - * - * Set this to `false` to disable. - * - * A not so trivial note: - * A 'dark' theme with dark mode is exactly the same as a 'light' - * theme with dark mode. This means the index.css file should - * always contain the light colors. - */ - Theme::$current->settings['has_dark_mode'] = true; - - /* - * Define the theme variants. Each variant has its own CSS file. - * - * Example: - * - index_red.css is loaded when the user selects the `red` variant. - * - * Additionally, a variants.css file is always loaded as well, in - * case you'd rather keep the styles in a single file or they're minimal. - */ - Theme::$current->settings['theme_variants'] = []; - - // Set the following variable to true if this theme wants to display the avatar of the user that posted the last and the first post on the message index and recent pages. - Theme::$current->settings['avatars_on_indexes'] = false; - - // Set the following variable to true if this theme wants to display the avatar of the user that posted the last post on the board index. - Theme::$current->settings['avatars_on_boardIndex'] = false; - - // Set the following variable to true if this theme wants to display the login and register buttons in the main forum menu. - Theme::$current->settings['login_main_menu'] = false; - - // This defines the formatting for the page indexes used throughout the forum. - Theme::$current->settings['page_index'] = [ - 'extra_before' => '' . Lang::getTxt('pages', file: 'General') . '', - 'previous_page' => '', - 'current_page' => '%1$d ', - 'page' => '%2$s ', - 'expand_pages' => ' ... ', - 'next_page' => '', - 'extra_after' => '', - ]; - - // Allow css/js files to be disabled for this specific theme. - // Add the identifier as an array key. IE array('smf_script'); Some external files might not add identifiers, on those cases SMF uses its filename as reference. - if (!isset(Theme::$current->settings['disable_files'])) { - Theme::$current->settings['disable_files'] = []; - } -} - -/** - * The main sub template above the content. - */ -function template_html_above() -{ - // Show right to left, the language code, and the character set for ease of translating. - echo ' -settings['theme_variants']) ? ' data-variant=' . (Utils::$context['theme_variant'] ?: 'default') . '' : '', !empty(Theme::$current->settings['has_dark_mode']) ? ' data-mode=' . (Utils::$context['theme_colormode'] ?? 'light') . '' : '', '> - - '; - - /* - You don't need to manually load index.css, this will be set up for you. - Note that RTL will also be loaded for you. - To load other CSS and JS files you should use the functions - Theme::loadCSSFile() and Theme::loadJavaScriptFile() respectively. - This approach will let you take advantage of SMF's automatic CSS - minimization and other benefits. You can, of course, manually add any - other files you want after Theme::template_css() has been run. - - * Short example: - - CSS: Theme::loadCSSFile('filename.css', array('minimize' => true)); - - JS: Theme::loadJavaScriptFile('filename.js', array('minimize' => true)); - You can also read more detailed usages of the parameters for these - functions on the SMF wiki. - - * Themes: - The most efficient way of writing multi themes is to use a master - index.css plus variant.css files. If you've set them up properly - (through Theme::$current->settings['theme_variants']), the variant files will be loaded - for you automatically. - Additionally, tweaking the CSS for the editor requires you to include - a custom 'jquery.sceditor.theme.css' file in the css folder if you need it. - - * MODs: - If you want to load CSS or JS files in here, the best way is to use the - 'integrate_load_theme' hook for adding multiple files, or using - 'integrate_pre_css_output', 'integrate_pre_javascript_output' for a single file. - */ - - // load in any css from mods or themes so they can overwrite if wanted - Theme::template_css(); - - // load in any javascript files from mods and themes - Theme::template_javascript(); - - echo ' - ', Utils::$context['page_title_html_safe'], ' - '; - - // Content related meta tags, like description, keywords, Open Graph stuff, etc... - foreach (Utils::$context['meta_tags'] as $meta_tag) { - echo ' - $meta_value) { - echo ' ', $meta_key, '="', $meta_value, '"'; - } - - echo '>'; - } - - /* What is your Lollipop's color? - Theme Authors, you can change the color here to make sure your theme's main color gets visible on tab */ - echo ' - '; - - // Please don't index these Mr Robot. - if (!empty(Utils::$context['robot_no_index'])) { - echo ' - '; - } - - // Present a canonical url for search engines to prevent duplicate content in their indices. - if (!empty(Utils::$context['canonical_url'])) { - echo ' - '; - } - - // Show all the relative links, such as help, search, contents, and the like. - echo ' - - ', (Utils::$context['allow_search'] ? ' - ' : ''); - - // If RSS feeds are enabled, advertise the presence of one. - if (!empty(Config::$modSettings['xmlnews_enable']) && (!empty(Config::$modSettings['allow_guestAccess']) || !User::$me->is_guest)) { - echo ' - - '; - } - - // If we're viewing a topic, these should be the previous and next topics, respectively. - if (!empty(Utils::$context['links']['next'])) { - echo ' - '; - } - - if (!empty(Utils::$context['links']['prev'])) { - echo ' - '; - } - - // If we're in a board, or a topic for that matter, the index will be the board's index. - if (!empty(Utils::$context['current_board'])) { - echo ' - '; - } - - // Output any remaining HTML headers. (from mods, maybe?) - echo Utils::$context['html_headers']; - - echo ' - - -
    '; -} - -/** - * The upper part of the main template layer. This is the stuff that shows above the main forum content. - */ -function template_body_above() -{ - // Wrapper div now echoes permanently for better layout options. h1 a is now target for "Go up" links. - echo ' -
    -
    '; - - // If the user is logged in, display some things that might be useful. - if (!User::$me->is_guest) { - // Firstly, the user's menu - echo ' - '; - } - // Otherwise they're a guest. Ask them to either register or login. - elseif (empty(Config::$maintenance)) { - // Some people like to do things the old-fashioned way. - if (!empty(Theme::$current->settings['login_main_menu'])) { - echo ' -
      -
    • ', Lang::getTxt( - Utils::$context['can_register'] ? 'welcome_guest_register' : 'welcome_guest', - [ - 'forum_name' => Utils::$context['forum_name_html_safe'], - 'login_url' => Config::$scripturl . '?action=login', - 'onclick' => 'return reqOverlayDiv(this.href, ' . Utils::escapeJavaScript(Lang::getTxt('login', file: 'General')) . ', \'login\');', - 'register_url' => Config::$scripturl . '?action=signup', - ], - file: 'General', - ), '
    • -
    '; - } else { - echo ' - '; - } - } else { // In maintenance mode, only login is allowed and don't show OverlayDiv - echo ' -
      -
    • ', Lang::getTxt( - 'welcome_guest', - [ - 'forum_name' => Utils::$context['forum_name_html_safe'], - 'login_url' => Config::$scripturl . '?action=login', - 'onclick' => 'return true;', - ], - file: 'General', - ), '
    • -
    '; - } - - if (!empty(Config::$modSettings['userLanguage']) && !empty(Utils::$context['languages']) && count(Utils::$context['languages']) > 1) { - echo ' -
    - - -
    '; - } - - if (Utils::$context['allow_search']) { - echo ' -
    -  '; - - // Using the quick search dropdown? - $selected = !empty(Utils::$context['current_topic']) ? 'current_topic' : (!empty(Utils::$context['current_board']) ? 'current_board' : 'all'); - - echo ' - '; - - // Search within current topic? - if (!empty(Utils::$context['current_topic'])) { - echo ' - '; - } - - // If we're on a certain board, limit it to this board ;). - elseif (!empty(Utils::$context['current_board'])) { - echo ' - '; - } - - echo ' - - -
    '; - } - - echo ' -
    -
    '; - - echo ' - '; - - // The menu is a band of its own across the page, with its contents lined up - // with everything else by the wrapper inside it. - echo ' - -
    -
    is_guest ? ' class="hide_720"' : '', '> -
    - '; - - if (!User::$me->is_guest) { - echo ' - '; - } - - echo ' -
    '; - - // Show a random news item? (or you could pick one from news_lines...) - if (!empty(Theme::$current->settings['enable_news']) && !empty(Utils::$context['random_news_line'])) { - echo ' -
    -

    ', Lang::getTxt('news', file: 'General'), ':

    -

    ', Utils::$context['random_news_line'], '

    -
    '; - } - - echo ' -
    '; - - theme_linktree(); - - // The main content should go here. - echo ' -
    -
    '; -} - -/** - * The stuff shown immediately below the main content, including the footer - */ -function template_body_below() -{ - echo ' -
    -
    -
    -
    '; - - // Show the footer with copyright, terms and help links. - echo ' - '; - -} - -/** - * This shows any deferred JavaScript and closes out the HTML - */ -function template_html_below() -{ - // Load in any javascript that could be deferred to the end of the page - Theme::template_javascript(true); - - echo ' - -'; -} - -/** - * Show a linktree. This is that thing that shows "My Community | General Category | General Discussion".. - * - * @param bool $force_show Whether to force showing it even if settings say otherwise - */ -function theme_linktree($force_show = false) -{ - global $shown_linktree; - - // If linktree is empty, just return - also allow an override. - if (empty(Utils::$context['linktree']) || (!empty(Utils::$context['dont_default_linktree']) && !$force_show)) { - return; - } - - // A breadcrumb trail is a landmark, and it is an ordered list rather than an - // unordered one - "General Category" comes before "General Discussion". - echo ' - '; - - $shown_linktree = true; -} - -/** - * Show the menu up top. Something like [home] [help] [profile] [logout]... - */ -function template_menu() -{ - echo ' - '; -} - -/** - * Generate a strip of buttons. - * - * @param array $button_strip An array with info for displaying the strip - * @param string $direction The direction - * @param array $strip_options Options for the button strip - */ -function template_button_strip($button_strip, $direction = '', $strip_options = []) -{ - if (!is_array($strip_options)) { - $strip_options = []; - } - - // Create the buttons... - $buttons = []; - - foreach ($button_strip as $key => $value) { - // As of 2.1, the 'test' for each button happens while the array is being generated. The extra 'test' check here is deprecated but kept for backward compatibility (update your mods, folks!) - if (!isset($value['test']) || !empty(Utils::$context[$value['test']])) { - if (!isset($value['id'])) { - $value['id'] = $key; - } - - $button = ' - ' . (!empty($value['icon']) ? '' : '') . Lang::getTxt($value['text']) . ''; - - if (!empty($value['sub_buttons'])) { - $button .= ' -
    -
    -
    '; - - foreach ($value['sub_buttons'] as $element) { - if (isset($element['test']) && empty(Utils::$context[$element['test']])) { - continue; - } - - $button .= ' - ' . Lang::getTxt($element['text']) . ''; - - if (Lang::txtExists($element['text'] . '_desc')) { - $button .= '
    ' . Lang::getTxt($element['text'] . '_desc') . ''; - } - - $button .= '
    '; - } - $button .= ' -
    -
    -
    '; - } - - $buttons[] = $button; - } - } - - // No buttons? No button strip either. - if (empty($buttons)) { - return; - } - - echo ' - '; -} - -/** - * Generate a list of quickbuttons. - * - * @param array $list_items An array with info for displaying the strip - * @param string $list_class Used for integration hooks and as a class name - * @param string $output_method The output method. If 'echo', simply displays the buttons, otherwise returns the HTML for them - * @return void|string Returns nothing unless output_method is something other than 'echo' - */ -function template_quickbuttons($list_items, $list_class = null, $output_method = 'echo') -{ - // Enable manipulation with hooks - if (!empty($list_class)) { - IntegrationHook::call('integrate_' . $list_class . '_quickbuttons', [&$list_items]); - } - - // Make sure the list has at least one shown item - foreach ($list_items as $key => $li) { - // Is there a sublist, and does it have any shown items - if ($key == 'more') { - foreach ($li as $subkey => $subli) { - if (isset($subli['show']) && !$subli['show']) { - unset($list_items[$key][$subkey]); - } - } - - if (empty($list_items[$key])) { - unset($list_items[$key]); - } - } - // A normal list item - elseif (isset($li['show']) && !$li['show']) { - unset($list_items[$key]); - } - } - - // Now check if there are any items left - if (empty($list_items)) { - return; - } - - // Print the quickbuttons - $output = ' - '; - - // There are a few spots where the result needs to be returned - if ($output_method == 'echo') { - echo $output; - } else { - return $output; - } -} - -/** - * The upper part of the maintenance warning box - */ -function template_maint_warning_above() -{ - echo ' -
    -
    -
    - ', Lang::getTxt('forum_in_maintenance', file: 'General'), ' -
    -
    - ', Lang::getTxt('maintenance_page', ['url' => Config::$scripturl . '?action=admin;area=serversettings;' . Utils::$context['session_var'] . '=' . Utils::$context['session_id']], file: 'General'), ' -
    -
    -
    '; -} - -/** - * The lower part of the maintenance warning box. - */ -function template_maint_warning_below() {} - -/** - * The upper part of the security warning box - */ -function template_security_warning_above() -{ - echo ' -
    -

    !!

    -

    ', Lang::getTxt(!isset(Utils::$context['warnings']['file']) && empty(Utils::$context['auth_secret_missing']) ? 'generic_warning' : 'security_risk', file: 'General'), '

    '; - - foreach ((Utils::$context['warnings']['file'] ?? []) as $security_file) { - echo ' -

    ', Lang::getTxt($security_file[0], $security_file[1], file: 'General'), '

    '; - } - - for ($i = 0, $n = count(Utils::$context['warnings']) - 1; $i < $n; $i++) { - if (is_string(Utils::$context['warnings'][$i])) { - echo ' -

    ' . Utils::$context['warnings'][$i] . '

    '; - } else { - echo ' -

    ', Lang::getTxt(Utils::$context['warnings'][$i][0], Utils::$context['warnings'][$i][1] ?? [], file: 'General'), '

    '; - } - } - - echo ' -
    '; -} - -/** - * The lower part of the security warning box. - */ -function template_security_warning_below() {} - -/** - * The upper part of the ban warning box - */ -function template_banned_warning_above() -{ - echo ' -
    '; - - echo ' -

    ', Lang::getTxt('you_are_post_banned', ['name' => User::$me->is_guest ? Lang::getTxt('guest_title', file: 'General') : User::$me->name]), '

    '; - - if (!empty($_SESSION['ban']['cannot_post']['reason'])) { - echo ' -

    ', $_SESSION['ban']['cannot_post']['reason'], '

    '; - } - - if (!empty($_SESSION['ban']['expire_time'])) { - echo ' -

    ', Lang::getTxt('your_ban_expires', ['datetime' => Time::create('@' . $_SESSION['ban']['expire_time'])->format(null, false)], file: 'General'), '

    '; - } else { - echo ' -

    ', Lang::getTxt('your_ban_expires_never', file: 'General'), '

    '; - } - - echo ' -
    '; -} - -/** - * The lower part of the ban warning box. - */ -function template_banned_warning_below() {} diff --git a/Themes/default/templates/Display/main.php b/Themes/default/templates/Display/main.php index c4dc4df35c6..2050bcb9abe 100644 --- a/Themes/default/templates/Display/main.php +++ b/Themes/default/templates/Display/main.php @@ -167,11 +167,7 @@ - + subTemplate('linktree'); ?>
    subTemplate('button_strip', ['button_strip' => Utils::$context['mod_buttons'], 'direction' => 'bottom', 'strip_options' => ['id' => 'moderationbuttons_strip']]); ?> diff --git a/Themes/default/templates/MessageIndex/main.php b/Themes/default/templates/MessageIndex/main.php index d74b323748e..a517392b797 100644 --- a/Themes/default/templates/MessageIndex/main.php +++ b/Themes/default/templates/MessageIndex/main.php @@ -194,10 +194,7 @@
    - + subTemplate('linktree'); ?> + + + settings['login_main_menu'])): ?> + +
      +
    • Utils::$context['forum_name_html_safe'], + 'login_url' => Config::$scripturl . '?action=login', + 'onclick' => 'return reqOverlayDiv(this.href, ' . Utils::escapeJavaScript(Lang::getTxt('login', file: 'General')) . ', \'login\');', + 'register_url' => Config::$scripturl . '?action=signup', + ], + file: 'General', + ) ?>
    • +
    + +
      +
    • + Utils::$context['forum_name_html_safe']], file: 'General') ?> + +
    • + + + + +
    + +
      +
    • Utils::$context['forum_name_html_safe'], + 'login_url' => Config::$scripturl . '?action=login', + 'onclick' => 'return true;', + ], + file: 'General', + ) ?>
    • +
    1): ?> + +
    + + +
    + +
    +   + + + + + + + + + +
    + + + + + + +
    +
    is_guest ? ' class="hide_720"' : '' ?>> +
    + is_guest): ?> + + + +
    settings['enable_news']) && !empty(Utils::$context['random_news_line'])): ?> + +
    +

    :

    +

    +
    + +
    subTemplate('linktree'); ?> + +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/index/body_below.php b/Themes/default/templates/index/body_below.php new file mode 100644 index 00000000000..d82fc040166 --- /dev/null +++ b/Themes/default/templates/index/body_below.php @@ -0,0 +1,60 @@ + + +
    +
    +
    + + +
    +
    + +
      + + +
    + + +

    + +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/index/button_strip.php b/Themes/default/templates/index/button_strip.php new file mode 100644 index 00000000000..64a8293950c --- /dev/null +++ b/Themes/default/templates/index/button_strip.php @@ -0,0 +1,55 @@ + '', 'strip_options' => []], EXTR_SKIP); +?> $value): ?>' . (!empty($value['icon']) ? '' : '') . Lang::getTxt($value['text']) . ''; +?> +
    +
    '; +?>' . Lang::getTxt($element['text']) . ''; +?>' . Lang::getTxt($element['text'] . '_desc') . ''; ?>'; ?> +
    +
    '; +?> + + \ No newline at end of file diff --git a/Themes/default/templates/index/html_above.php b/Themes/default/templates/index/html_above.php new file mode 100644 index 00000000000..97d21d93465 --- /dev/null +++ b/Themes/default/templates/index/html_above.php @@ -0,0 +1,91 @@ + +settings['theme_variants']) ? ' data-variant=' . (Utils::$context['theme_variant'] ?: 'default') . '' : '' ?>settings['has_dark_mode']) ? ' data-mode=' . (Utils::$context['theme_colormode'] ?? 'light') . '' : '' ?>> + + true)); + - JS: Theme::loadJavaScriptFile('filename.js', array('minimize' => true)); + You can also read more detailed usages of the parameters for these + functions on the SMF wiki. + + * Themes: + The most efficient way of writing multi themes is to use a master + index.css plus variant.css files. If you've set them up properly + (through Theme::$current->settings['theme_variants']), the variant files will be loaded + for you automatically. + Additionally, tweaking the CSS for the editor requires you to include + a custom 'jquery.sceditor.theme.css' file in the css folder if you need it. + + * MODs: + If you want to load CSS or JS files in here, the best way is to use the + 'integrate_load_theme' hook for adding multiple files, or using + 'integrate_pre_css_output', 'integrate_pre_javascript_output' for a single file. + */ +?> + + <?= Utils::$context['page_title_html_safe'] ?> + + + $meta_value): ?> =""> + + + + + + + + + ' : '') ?>is_guest)): ?> + + + + + + + + + + + + +
    \ No newline at end of file diff --git a/Themes/default/templates/index/html_below.php b/Themes/default/templates/index/html_below.php new file mode 100644 index 00000000000..5125825fe27 --- /dev/null +++ b/Themes/default/templates/index/html_below.php @@ -0,0 +1,26 @@ + + + + \ No newline at end of file diff --git a/Themes/default/templates/index/index.php b/Themes/default/templates/index/index.php new file mode 100644 index 00000000000..2844a3b9e7b --- /dev/null +++ b/Themes/default/templates/index/index.php @@ -0,0 +1,8 @@ +settings['theme_version'] = '2.1'; +/* + * Whether this theme supports a dark mode. + * + * Set this to `false` to disable. + * + * A not so trivial note: + * A 'dark' theme with dark mode is exactly the same as a 'light' + * theme with dark mode. This means the index.css file should + * always contain the light colors. + */ +Theme::$current->settings['has_dark_mode'] = true; +/* + * Define the theme variants. Each variant has its own CSS file. + * + * Example: + * - index_red.css is loaded when the user selects the `red` variant. + * + * Additionally, a variants.css file is always loaded as well, in + * case you'd rather keep the styles in a single file or they're minimal. + */ +Theme::$current->settings['theme_variants'] = []; +// Set the following variable to true if this theme wants to display the avatar of the user that posted the last and the first post on the message index and recent pages. +Theme::$current->settings['avatars_on_indexes'] = false; +// Set the following variable to true if this theme wants to display the avatar of the user that posted the last post on the board index. +Theme::$current->settings['avatars_on_boardIndex'] = false; +// Set the following variable to true if this theme wants to display the login and register buttons in the main forum menu. +Theme::$current->settings['login_main_menu'] = false; +// This defines the formatting for the page indexes used throughout the forum. +Theme::$current->settings['page_index'] = [ + 'extra_before' => '' . Lang::getTxt('pages', file: 'General') . '', + 'previous_page' => '', + 'current_page' => '%1$d ', + 'page' => '%2$s ', + 'expand_pages' => ' ... ', + 'next_page' => '', + 'extra_after' => '', +]; +// Allow css/js files to be disabled for this specific theme. +// Add the identifier as an array key. IE array('smf_script'); Some external files might not add identifiers, on those cases SMF uses its filename as reference. +?>settings['disable_files'])): ?>settings['disable_files'] = []; ?> diff --git a/Themes/default/templates/index/linktree.php b/Themes/default/templates/index/linktree.php new file mode 100644 index 00000000000..120582f4021 --- /dev/null +++ b/Themes/default/templates/index/linktree.php @@ -0,0 +1,60 @@ + false], EXTR_SKIP); +?> + + diff --git a/Themes/default/templates/index/maint_warning_above.php b/Themes/default/templates/index/maint_warning_above.php new file mode 100644 index 00000000000..6a06a9802b0 --- /dev/null +++ b/Themes/default/templates/index/maint_warning_above.php @@ -0,0 +1,37 @@ + + +
    +
    +
    + +
    +
    + Config::$scripturl . '?action=admin;area=serversettings;' . Utils::$context['session_var'] . '=' . Utils::$context['session_id']], file: 'General') ?> + +
    +
    +
    \ No newline at end of file diff --git a/Themes/default/templates/index/maint_warning_below.php b/Themes/default/templates/index/maint_warning_below.php new file mode 100644 index 00000000000..8497e7002e2 --- /dev/null +++ b/Themes/default/templates/index/maint_warning_below.php @@ -0,0 +1,20 @@ + + + \ No newline at end of file diff --git a/Themes/default/templates/index/quickbuttons.php b/Themes/default/templates/index/quickbuttons.php new file mode 100644 index 00000000000..51f26435496 --- /dev/null +++ b/Themes/default/templates/index/quickbuttons.php @@ -0,0 +1,67 @@ + null, 'output_method' => 'echo'], EXTR_SKIP); +?> $li): ?> $subli): ?>'; +// This is used for a list item or a sublist item +$list_item_format = function ($li) { + $html = ' + '; + + if (isset($li['content'])) { + $html .= $li['content']; + } else { + $html .= ' + + ' . (!empty($li['icon']) ? '' : '') . (!empty($li['label']) ? $li['label'] : '') . ' + '; + } + + $html .= ' + '; + + return $html; + }; +?> $li): ?> + ' . Lang::getTxt('post_options', file: 'General') . ' +
      '; +?> + '; +// Ordinary list item +?>'; +// There are a few spots where the result needs to be returned +?> diff --git a/Themes/default/templates/index/security_warning_above.php b/Themes/default/templates/index/security_warning_above.php new file mode 100644 index 00000000000..9a289d8561e --- /dev/null +++ b/Themes/default/templates/index/security_warning_above.php @@ -0,0 +1,39 @@ + + +
      +

      !!

      +

      + +

      + + + +

      + +

      + + +
      \ No newline at end of file diff --git a/Themes/default/templates/index/security_warning_below.php b/Themes/default/templates/index/security_warning_below.php new file mode 100644 index 00000000000..8aa3c47823c --- /dev/null +++ b/Themes/default/templates/index/security_warning_below.php @@ -0,0 +1,20 @@ +assertSame('general?', $engine->fetchSubTemplate('engine_test_names', ['b' => ['name' => 'general'], 'extra' => '?'])); } + /** + * Mods and themes call template_button_strip() and friends from templates + * of their own. Loading the Plates template that holds them defines them. + */ + public function testLoadingThePlatesIndexTemplateDefinesTheFunctionsModsCall(): void + { + $this->write($this->default, 'index/button_strip.php', 'strip |'); + $this->write($this->default, 'index/quickbuttons.php', 'buttons |'); + + $current = Theme::$current; + Theme::$current = (object) ['settings' => ['template_dirs' => [$this->default]]]; + + try { + TemplateEngine::get()->addLoaded('index'); + + ob_start(); + template_button_strip(['home' => [], 'search' => []], 'right'); + $echoed = template_quickbuttons([], 'post'); + $returned = template_quickbuttons([], 'post', 'return'); + $output = ob_get_clean(); + } finally { + Theme::$current = $current; + } + + $this->assertSame('strip home,search right|buttons post|', $output); + $this->assertNull($echoed); + $this->assertSame('buttons post|', $returned); + } + public function testRenderSubTemplateOutputsWhatItFinds(): void { $this->write($this->default, 'Stats/main.php', 'stats page'); From 66797082a5290276d80ba8f7d7fcde8939852143 Mon Sep 17 00:00:00 2001 From: albertlast Date: Wed, 30 Sep 2026 20:46:11 +0200 Subject: [PATCH 19/20] Drops the empty lines doubled after closing tags in templates PHP swallows the newline that follows a closing tag, so the conversion kept each one by leaving an empty line after it. Where the next line is indented, that newline and the indentation collapse to the same single space in HTML, so the empty line only costs readability. Inside diff --git a/Themes/default/templates/Errors/attachment_errors.php b/Themes/default/templates/Errors/attachment_errors.php index 615e6d3d9a1..114c388155c 100644 --- a/Themes/default/templates/Errors/attachment_errors.php +++ b/Themes/default/templates/Errors/attachment_errors.php @@ -23,18 +23,15 @@ * This template handles showing attachment-related errors */ ?> -

      -

      -
      diff --git a/Themes/default/templates/Errors/error_log.php b/Themes/default/templates/Errors/error_log.php index ac9fc941353..58bc6ba37d3 100644 --- a/Themes/default/templates/Errors/error_log.php +++ b/Themes/default/templates/Errors/error_log.php @@ -23,50 +23,38 @@ * This template handles the error log in the admin center. */ ?> -

      -

      - -
      -
      Utils::$context['filter']['entity'], 'value' => Utils::$context['filter']['value']['html']], file: 'ManageMaintenance') ?> -
      -
      ' . Lang::getTxt('clear_filter', file: 'ManageMaintenance') . '' : '') ?> -
      $details): ?> ' : '') . '' . ($details['error_type'] === 'critical' ? '' . $details['label'] . '' : $details['label']) . ''; ?> - implode(' | ', $error_types)], file: 'ManageMaintenance') ?> -
      -
      @@ -75,7 +63,6 @@
      -

      @@ -83,21 +70,16 @@
      -
      -
      -
      -
      '' . $error['file']['file'] . '', 'line' => $error['file']['line']], file: 'ManageMaintenance') ?> -
      @@ -112,20 +94,16 @@
      -
      - - \ No newline at end of file diff --git a/Themes/default/templates/Errors/fatal_error.php b/Themes/default/templates/Errors/fatal_error.php index dd6d9555cbd..c2fde69c03b 100644 --- a/Themes/default/templates/Errors/fatal_error.php +++ b/Themes/default/templates/Errors/fatal_error.php @@ -27,31 +27,24 @@ * THis displays a fatal error message */ ?> - -
      class="padding"> -
      -

      -

      class="padding"> -
      -
      diff --git a/Themes/default/templates/Errors/show_backtrace.php b/Themes/default/templates/Errors/show_backtrace.php index 6e1f82196fc..a47ec56ff96 100644 --- a/Themes/default/templates/Errors/show_backtrace.php +++ b/Themes/default/templates/Errors/show_backtrace.php @@ -28,68 +28,56 @@ <?= Lang::getTxt('backtrace_title', file: 'ManageMaintenance') ?> - -

      -

      - - - - - -
      -

      -

        $value): ?>file)): ?>file = Lang::getTxt('unknown', file: 'General'); ?>line)): ?>line = -1; ?> -
      • file == Lang::getTxt('unknown', file: 'General') && $value->line == -1 ? '_internal_function' : ''), [ @@ -102,9 +90,7 @@ ], file: 'ManageMaintenance', ) ?>
      • -
      - \ No newline at end of file diff --git a/Themes/default/templates/Errors/show_file.php b/Themes/default/templates/Errors/show_file.php index d07c86ac8c6..67e37bb9727 100644 --- a/Themes/default/templates/Errors/show_file.php +++ b/Themes/default/templates/Errors/show_file.php @@ -27,19 +27,16 @@ <?= Utils::$context['file_data']['file'] ?> - $line): ?> - -
      ==>' : '">' ?>: >
      \ No newline at end of file diff --git a/Themes/default/templates/GenericControls/control_richedit_buttons.php b/Themes/default/templates/GenericControls/control_richedit_buttons.php index ac311d2d9c8..9c7743d28a7 100644 --- a/Themes/default/templates/GenericControls/control_richedit_buttons.php +++ b/Themes/default/templates/GenericControls/control_richedit_buttons.php @@ -29,21 +29,16 @@ * @param string $editor_id The unique ID of the editor for which buttons are displayed. */ ?> - - $button): ?> - name="" value=""> - - diff --git a/Themes/default/templates/GenericControls/control_verification.php b/Themes/default/templates/GenericControls/control_verification.php index 4b2e6c3f441..125bc56149d 100644 --- a/Themes/default/templates/GenericControls/control_verification.php +++ b/Themes/default/templates/GenericControls/control_verification.php @@ -43,43 +43,33 @@ $total_items = count($verify_context->questions) + ($verify_context->show_visual || $verify_context->can_recaptcha ? 1 : 0); // Stop if all items are processed. ?>tracking > $total_items): ?>tracking != $i): ?> -
      empty_field && empty($i)): ?> -
      -
      show_visual || $verify_context->can_recaptcha)): ?>show_visual): ?> - <?= Lang::getTxt('visual_verification_description', file: 'General') ?> - <?= Lang::getTxt('visual_verification_description', file: 'General') ?> <?= Lang::getTxt('visual_verification_description', file: 'General') ?> <?= Lang::getTxt('visual_verification_description', file: 'General') ?> <?= Lang::getTxt('visual_verification_description', file: 'General') ?> <?= Lang::getTxt('visual_verification_description', file: 'General') ?> <?= Lang::getTxt('visual_verification_description', file: 'General') ?> -
      / ' : '' ?>
      ' : '' ?> -
      can_recaptcha): ?> -

      show_visual || $verify_context->can_recaptcha ? $i - 1 : $i; ?>questions[$qIndex])): ?> -
      questions[$qIndex]['q'] ?>:
      questions[$qIndex]['is_error'] ? 'style="border: 1px red solid;"' : '' ?> required>
      -
      tracking == $i): ?>tracking++; diff --git a/Themes/default/templates/GenericList/additional_rows.php b/Themes/default/templates/GenericList/additional_rows.php index cbc69e390f1..66680c6020e 100644 --- a/Themes/default/templates/GenericList/additional_rows.php +++ b/Themes/default/templates/GenericList/additional_rows.php @@ -22,8 +22,6 @@ * @param array $cur_list An array with the data for the current list */ ?> -
      > -
      diff --git a/Themes/default/templates/GenericList/show_list.php b/Themes/default/templates/GenericList/show_list.php index d4c75dcc935..2b5c5248bad 100644 --- a/Themes/default/templates/GenericList/show_list.php +++ b/Themes/default/templates/GenericList/show_list.php @@ -29,75 +29,49 @@ // Get a shortcut to the current list. $list_id = $list_id === null ? (!empty(Utils::$context['default_list']) ? Utils::$context['default_list'] : '') : $list_id; ?> -
      accept-charset="UTF-8"> -

      -

      -
      subTemplate('additional_rows', ['row_position' => 'after_title', 'cur_list' => $cur_list]); ?> -
      subTemplate('additional_rows', ['row_position' => 'top_of_list', 'cur_list' => $cur_list]); ?> -
      subTemplate('additional_rows', ['row_position' => 'above_column_headers', 'cur_list' => $cur_list]); ?> - > - - - - - $row): ?> - id="list__"> $row_data): ?> - - -
      > ' ?>' : ' ') ?> -
      -
      > -
      -
      -
      subTemplate('additional_rows', ['row_position' => 'below_table_data', 'cur_list' => $cur_list]); ?> -
      subTemplate('additional_rows', ['row_position' => 'bottom_of_list', 'cur_list' => $cur_list]); ?> $value): ?> - - -
      - -
      -
      \ No newline at end of file diff --git a/Themes/default/templates/GenericMenu/generic_menu_tabs.php b/Themes/default/templates/GenericMenu/generic_menu_tabs.php index 85ca866fc63..a1a25a42190 100644 --- a/Themes/default/templates/GenericMenu/generic_menu_tabs.php +++ b/Themes/default/templates/GenericMenu/generic_menu_tabs.php @@ -29,7 +29,6 @@ // Handy shortcut. $tab_context = $menu_context['tab_data']; ?> -

      $tab): ?> - - - - -

      hasSubTemplate('admin_quick_search')): ?>subTemplate('admin_quick_search'); ?> -
      -

      -

      empty($tab['disabled']) && !empty($tab['label']), ); ?> - $tab_context['title'] ?? ''], file: 'General') ?> @@ -83,20 +73,16 @@ diff --git a/Themes/default/templates/Help/manual.php b/Themes/default/templates/Help/manual.php index 9a70617319c..7cbd00371e2 100644 --- a/Themes/default/templates/Help/manual.php +++ b/Themes/default/templates/Help/manual.php @@ -23,7 +23,6 @@ * The main help page */ ?> -

      diff --git a/Themes/default/templates/Help/popup.php b/Themes/default/templates/Help/popup.php index 2518e4f93be..f73f25a5e3b 100644 --- a/Themes/default/templates/Help/popup.php +++ b/Themes/default/templates/Help/popup.php @@ -27,10 +27,8 @@ // comes back inside an overlay on the page it was called from. There is no // window to close in that case, and no use for a document of its own. ?> -
      -
      > @@ -38,7 +36,6 @@ <?= Utils::$context['page_title'] ?> - diff --git a/Themes/default/templates/Likes/like.php b/Themes/default/templates/Likes/like.php index 115783f87b8..ace1745fee4 100644 --- a/Themes/default/templates/Likes/like.php +++ b/Themes/default/templates/Likes/like.php @@ -23,7 +23,6 @@ * Display a like button and info about how many people liked something */ ?> -
      • diff --git a/Themes/default/templates/Likes/popup.php b/Themes/default/templates/Likes/popup.php index 14077705b40..87631cbff9b 100644 --- a/Themes/default/templates/Likes/popup.php +++ b/Themes/default/templates/Likes/popup.php @@ -29,24 +29,19 @@ <?= Utils::$context['page_title'] ?> -
          $like_details): ?> -
        • -
        • -

        diff --git a/Themes/default/templates/Login/admin_login.php b/Themes/default/templates/Login/admin_login.php index e7f66d88a4d..27f8c75c109 100644 --- a/Themes/default/templates/Login/admin_login.php +++ b/Themes/default/templates/Login/admin_login.php @@ -23,31 +23,25 @@ * This is for the security stuff - makes administrators login every so often. */ ?> -
        - \ No newline at end of file diff --git a/Themes/default/templates/Login/kick_guest.php b/Themes/default/templates/Login/kick_guest.php index bd9a2dbe854..ad50f77d878 100644 --- a/Themes/default/templates/Login/kick_guest.php +++ b/Themes/default/templates/Login/kick_guest.php @@ -23,20 +23,16 @@ * Tell a guest to get lost or login! */ ?> -
      • -
      settings['login_main_menu'])): ?> -
      - -
      1): ?> -
      -
        - - - -
      -
    -