From dc43b3b6b51fc6af2d77ee2e149d14dc0415cca4 Mon Sep 17 00:00:00 2001 From: vintagedaddyo Date: Thu, 14 May 2020 21:20:04 -0700 Subject: [PATCH] Update mysupport.php --- files/inc/plugins/mysupport/mysupport.php | 46 +++++++++++++---------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/files/inc/plugins/mysupport/mysupport.php b/files/inc/plugins/mysupport/mysupport.php index b9b285b..8930914 100755 --- a/files/inc/plugins/mysupport/mysupport.php +++ b/files/inc/plugins/mysupport/mysupport.php @@ -65,7 +65,7 @@ function mysupport_do_install() "title" => "MySupport Settings", "description" => "Settings for the MySupport plugin.", "disporder" => "28", - "isdefault" => "no" + "isdefault" => "0" ); $db->insert_query("settinggroups", $settings_group); @@ -448,7 +448,7 @@ function mysupport_insert_task() { global $db, $lang; - $lang->load("mysupport"); + $lang->load("config_mysupport"); include_once MYBB_ROOT . "inc/functions_task.php"; $new_task = array( @@ -896,11 +896,11 @@ function mysupport_do_templates($type, $master_only = false) ); $templates[] = array( "title" => "mysupport_bestanswer", - "template" => " settings['bburl']}/showthread.php?action=bestanswer&pid={\$post['pid']}&my_post_key={\$mybb->post_code}\">settings['bburl']}/{\$theme['imgdir']}/{\$bestanswer_img}.gif\" alt=\"{\$bestanswer_alt}\" title=\"{\$bestanswer_title}\" /> {\$bestanswer_desc}" + "template" => " settings['bburl']}/showthread.php?action=bestanswer&pid={\$post['pid']}&my_post_key={\$mybb->post_code}\">\"{\$bestanswer_alt}\" {\$bestanswer_desc}" ); $templates[] = array( "title" => "mysupport_status_image", - "template" => "settings['bburl']}/{\$theme['imgdir']}/mysupport_{\$status_img}.png\" alt=\"{\$status_title}\" title=\"{\$status_title}\" /> " + "template" => "\"{\$status_title}\" " ); $templates[] = array( "title" => "mysupport_status_text", @@ -923,7 +923,7 @@ function mysupport_do_templates($type, $master_only = false)
{\$thread['profilelink']}
- {\$thread['forumlink']} settings['bburl']}/{\$view_all_forum_link}\">settings['bburl']}/{\$theme['imgdir']}/mysupport_arrow_right.gif\" alt=\"{\$view_all_forum_text}\" title=\"{\$view_all_forum_text}\" /> + {\$thread['forumlink']} settings['bburl']}/{\$view_all_forum_link}\">\"{\$view_all_forum_text}\" {\$status_time} {\$lastpostdate} {\$lastposttime}
@@ -991,7 +991,7 @@ function mysupport_do_templates($type, $master_only = false) - +
{\$solved_row} {\$notsolved_row} @@ -1004,23 +1004,23 @@ function mysupport_do_templates($type, $master_only = false) ); $templates[] = array( "title" => "mysupport_jumpto_bestanswer", - "template" => "settings['bburl']}/{\$jumpto_bestanswer_url}\">settings['bburl']}/{\$theme['imgdir']}/{\$bestanswer_image}\" alt=\"{\$lang->jump_to_bestanswer}\" title=\"{\$lang->jump_to_bestanswer}\" />" + "template" => "settings['bburl']}/{\$jumpto_bestanswer_url}\">\"{\$lang-jump_to_bestanswer}\" title=\"{\$lang->jump_to_bestanswer}\" />" ); $templates[] = array( "title" => "mysupport_assigned", - "template" => "settings['bburl']}/{\$theme['imgdir']}/mysupport_assigned.png\" alt=\"{\$lang->assigned}\" title=\"{\$lang->assigned}\" />" + "template" => "\"{\$lang-assigned}\" title=\"{\$lang->assigned}\" />" ); $templates[] = array( "title" => "mysupport_assigned_toyou", - "template" => "settings['bburl']}/usercp.php?action=assignedthreads\" target=\"_blank\">settings['bburl']}/{\$theme['imgdir']}/mysupport_assigned_toyou.png\" alt=\"{\$lang->assigned_toyou}\" title=\"{\$lang->assigned_toyou}\" />" + "template" => "settings['bburl']}/usercp.php?action=assignedthreads\" target=\"_blank\">\"{\$lang-assigned_toyou}\" title=\"{\$lang->assigned_toyou}\" />" ); $templates[] = array( "title" => "mysupport_deny_support_post", - "template" => "settings['bburl']}/{\$theme['imgdir']}/mysupport_no_support.gif\" alt=\"{\$denied_text_desc}\" title=\"{\$denied_text_desc}\" /> {\$denied_text}" + "template" => "\"{\$denied_text_desc}\" {\$denied_text}" ); $templates[] = array( "title" => "mysupport_deny_support_post_linked", - "template" => "settings['bburl']}/modcp.php?action=supportdenial&do=denysupport&uid={\$post['uid']}&tid={\$post['tid']}\" title=\"{\$denied_text_desc}\">settings['bburl']}/{\$theme['imgdir']}/mysupport_no_support.gif\" alt=\"{\$denied_text_desc}\" title=\"{\$denied_text_desc}\" /> {\$denied_text}" + "template" => "settings['bburl']}/modcp.php?action=supportdenial&do=denysupport&uid={\$post['uid']}&tid={\$post['tid']}\" title=\"{\$denied_text_desc}\">\"{\$denied_text_desc}\" {\$denied_text}" ); $templates[] = array( "title" => "mysupport_deny_support", @@ -1199,15 +1199,18 @@ function mysupport_template_edits($type) { find_replace_templatesets("showthread", "#".preg_quote('{$multipage}')."#i", '{$multipage}{$mysupport_options}'); find_replace_templatesets("showthread", "#".preg_quote('{$footer}')."#i", '{$mysupport_js}{$footer}'); - find_replace_templatesets("postbit", "#".preg_quote('trow1')."#i", 'trow1{$post[\'mysupport_bestanswer_highlight\']}{$post[\'mysupport_staff_highlight\']}'); - find_replace_templatesets("postbit", "#".preg_quote('trow2')."#i", 'trow2{$post[\'mysupport_bestanswer_highlight\']}{$post[\'mysupport_staff_highlight\']}'); - find_replace_templatesets("postbit_classic", "#".preg_quote('{$altbg}')."#i", '{$altbg}{$post[\'mysupport_bestanswer_highlight\']}{$post[\'mysupport_staff_highlight\']}'); + find_replace_templatesets("postbit", "#".preg_quote('{$unapproved_shade}')."#i", '{$unapproved_shade}{$post[\'mysupport_bestanswer_highlight\']}{$post[\'mysupport_staff_highlight\']}'); + find_replace_templatesets("postbit", "#".preg_quote('post_author')."#i", 'post_author{$post[\'mysupport_bestanswer_highlight\']}{$post[\'mysupport_staff_highlight\']}'); + find_replace_templatesets("postbit", "#".preg_quote('post_controls')."#i", 'post_controls{$post[\'mysupport_bestanswer_highlight\']}{$post[\'mysupport_staff_highlight\']}'); + find_replace_templatesets("postbit_classic", "#".preg_quote('post_author')."#i", 'post_author{$post[\'mysupport_bestanswer_highlight\']}{$post[\'mysupport_staff_highlight\']}'); + find_replace_templatesets("postbit_classic", "#".preg_quote('post_controls')."#i", 'post_controls{$post[\'mysupport_bestanswer_highlight\']}{$post[\'mysupport_staff_highlight\']}'); + find_replace_templatesets("postbit_classic", "#".preg_quote('{$unapproved_shade}')."#i", '{$unapproved_shade}{$post[\'mysupport_bestanswer_highlight\']}{$post[\'mysupport_staff_highlight\']}'); find_replace_templatesets("postbit", "#".preg_quote('{$post[\'subject_extra\']}')."#i", '{$post[\'subject_extra\']}
{$post[\'mysupport_bestanswer\']}{$post[\'mysupport_deny_support_post\']}
'); find_replace_templatesets("postbit_classic", "#".preg_quote('{$post[\'subject_extra\']}')."#i", '{$post[\'subject_extra\']}
{$post[\'mysupport_bestanswer\']}{$post[\'mysupport_deny_support_post\']}
'); find_replace_templatesets("postbit", "#".preg_quote('{$post[\'icon\']}')."#i", '{$post[\'mysupport_status\']}{$post[\'icon\']}'); find_replace_templatesets("postbit_classic", "#".preg_quote('{$post[\'icon\']}')."#i", '{$post[\'mysupport_status\']}{$post[\'icon\']}'); - find_replace_templatesets("showthread", "#".preg_quote('{$thread[\'threadprefix\']}')."#i", '{$mysupport_status}{$thread[\'threadprefix\']}'); - find_replace_templatesets("header", "#".preg_quote('{$unreadreports}')."#i", '{$unreadreports}{$mysupport_tech_notice}{$mysupport_assign_notice}'); + find_replace_templatesets("showthread", "#".preg_quote('{$thread[\'displayprefix\']}')."#i", '{$mysupport_status}{$thread[\'displayprefix\']}'); + find_replace_templatesets("header", "#".preg_quote('{$pending_joinrequests}')."#i", '{$pending_joinrequests}{$mysupport_tech_notice}{$mysupport_assign_notice}'); find_replace_templatesets("forumdisplay", "#".preg_quote('{$header}')."#i", '{$header}{$mysupport_priority_classes}'); find_replace_templatesets("search_results_threads ", "#".preg_quote('{$header}')."#i", '{$header}{$mysupport_priority_classes}'); find_replace_templatesets("forumdisplay_thread", "#".preg_quote('{$prefix}')."#i", '{$mysupport_status}{$mysupport_bestanswer}{$mysupport_assigned}{$prefix}'); @@ -1219,7 +1222,7 @@ function mysupport_template_edits($type) find_replace_templatesets("search_results_threads_inlinecheck", "#".preg_quote('{$bgcolor}')."#i", '{$bgcolor}{priority_class}'); find_replace_templatesets("forumdisplay_inlinemoderation", "#".preg_quote('{$customthreadtools}')."#i", '{$customthreadtools}{$mysupport_inline_thread_moderation}'); find_replace_templatesets("search_results_threads_inlinemoderation", "#".preg_quote('{$customthreadtools}')."#i", '{$customthreadtools}{$mysupport_inline_thread_moderation}'); - find_replace_templatesets("modcp_nav", "#".preg_quote('{$lang->mcp_nav_modlogs}')."#i", '{$lang->mcp_nav_modlogs}{mysupport_nav_option}'); + find_replace_templatesets("modcp_nav_modlogs", "#".preg_quote('{$lang->mcp_nav_modlogs}')."#i", '{$lang->mcp_nav_modlogs}{mysupport_nav_option}'); find_replace_templatesets("usercp_nav_misc", "#".preg_quote('{$lang->ucp_nav_forum_subscriptions}')."#i", '{$lang->ucp_nav_forum_subscriptions}{mysupport_nav_option}'); find_replace_templatesets("usercp", "#".preg_quote('{$latest_warnings}')."#i", '{$latest_warnings}
{$threads_list}'); find_replace_templatesets("member_profile", "#".preg_quote('{$profilefields}')."#i", '{$profilefields}{$mysupport_info}'); @@ -1250,7 +1253,7 @@ function mysupport_template_edits($type) find_replace_templatesets("search_results_threads_inlinecheck", "#".preg_quote('{priority_class}')."#i", '', 0); find_replace_templatesets("forumdisplay_inlinemoderation", "#".preg_quote('{$mysupport_inline_thread_moderation}')."#i", '', 0); find_replace_templatesets("search_results_threads_inlinemoderation", "#".preg_quote('{$mysupport_inline_thread_moderation}')."#i", '', 0); - find_replace_templatesets("modcp_nav", "#".preg_quote('{mysupport_nav_option}')."#i", '', 0); + find_replace_templatesets("modcp_nav_modlogs", "#".preg_quote('{mysupport_nav_option}')."#i", '', 0); find_replace_templatesets("usercp_nav_misc", "#".preg_quote('{mysupport_nav_option}')."#i", '', 0); find_replace_templatesets("usercp", "#".preg_quote('
{$threads_list}')."#i", '', 0); find_replace_templatesets("member_profile", "#".preg_quote('{$mysupport_info}')."#i", '', 0); @@ -1368,24 +1371,27 @@ function mysupport_stylesheet($action = 0) .mysupport_bar_solved { background: green; height: 10px; + border-radius: 0px !important; } .mysupport_bar_notsolved { background: red; height: 10px; + border-radius: 0px !important; } .mysupport_bar_technical { background: blue; height: 10px; + border-radius: 0px !important; } .mysupport_bestanswer_highlight { - background: #D6ECA6; + background: #D6ECA6 !important; } .mysupport_staff_highlight { - background: #E6E8FA; + background: #E6E8FA !important; } .usercp_nav_support_threads {