|
9 | 9 | * @package evo |
10 | 10 | * @author Author: Nicola Lambathakis |
11 | 11 | * @internal @events OnManagerWelcomeHome |
12 | | - * @internal @properties &wdgVisibility=Show widget for:;menu;All,AdminOnly,AdminExcluded,ThisRoleOnly,ThisUserOnly;All &ThisRole=Run only for this role:;string;;;(role id) &ThisUser=Run only for this user:;string;;;(username) &DittoVersion=Min Ditto version:;string;2.1.3 &EformVersion=Min eForm version:;string;1.4.9 &AjaxSearchVersion=Min AjaxSearch version:;string;1.11.0 &MtvVersion=Min multiTV version:;string;2.0.12 &badthemes=Outdated Manager Themes:;string;MODxRE2_DropdownMenu,MODxRE2,MODxRE,MODxCarbon,MODxFLAT,wMOD,ScienceStyle |
| 12 | + * @internal @properties &wdgVisibility=Show widget for:;menu;All,AdminOnly,AdminExcluded,ThisRoleOnly,ThisUserOnly;All &ThisRole=Run only for this role:;string;;;(role id) &ThisUser=Run only for this user:;string;;;(username) &DittoVersion=Min Ditto version:;string;2.1.3 &EformVersion=Min eForm version:;string;1.4.9 &AjaxSearchVersion=Min AjaxSearch version:;string;1.11.0 &WayfinderVersion=Min Wayfinder version:;string;2.0.5 &WebLoginVersion=Min WebLogin version:;string;1.2 &WebSignupVersion=Min WebSignup version:;string;1.1.2 &WebChangePwdVersion=Min WebChangePwd version:;string;1.1.2 &BreadcrumbsVersion=Min Breadcrumbs version:;string;1.0.5 &ReflectVersion=Min Reflect version:;string;2.2 &MtvVersion=Min multiTV version:;string;2.0.12 &badthemes=Outdated Manager Themes:;string;MODxRE2_DropdownMenu,MODxRE2,MODxRE,MODxCarbon,MODxFLAT,wMOD,ScienceStyle |
13 | 13 | * @internal @modx_category Manager and Admin |
14 | 14 | * @internal @installset base |
15 | 15 | * @internal @disabled 0 |
@@ -129,7 +129,109 @@ $output .= '<div class="widget-wrapper alert alert-warning"><i class="fa fa-excl |
129 | 129 | } |
130 | 130 | } |
131 | 131 | //end check AjaxSearch |
| 132 | + |
| 133 | +//check Wayfinder |
| 134 | +//get min version from config |
| 135 | +$minWayfinderVersion = $WayfinderVersion; |
| 136 | +//search the snippet by name |
| 137 | +$CheckWayfinder = $modx->db->select( "id, name, description", $table, "name='Wayfinder'" ); |
| 138 | +if($CheckWayfinder != ''){ |
| 139 | +while( $row = $modx->db->getRow( $CheckWayfinder ) ) { |
| 140 | +//extract snippet version from description <strong></strong> tags |
| 141 | +$curr_Wayfinder_version = getver($row['description'],"strong"); |
| 142 | +//check snippet version and return an alert if outdated |
| 143 | +if ($curr_Wayfinder_version < $minWayfinderVersion){ |
| 144 | +$output .= '<div class="widget-wrapper alert alert-warning"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <b>' . $row['name'] . '</b> '.$_lang["snippet"].' (version ' . $curr_Wayfinder_version . ') '.$_oec_lang['isoutdated'].' <b>Evolution '.$EVOversion.'</b>. '.$_oec_lang['please_update'].' <b>' . $row['name'] . '</b> '.$_oec_lang["to_latest"].' ('.$_oec_lang['min _required'].' '.$minWayfinderVersion.') '.$_oec_lang['from'].' <a target="main" href="index.php?a=112&id='.$ExtrasID.'">'.$_oec_lang['extras_module'].'</a>.</div>'; |
| 145 | + } |
| 146 | + } |
| 147 | +} |
| 148 | +//end check Wayfinder |
| 149 | + |
| 150 | +//check WebLogin |
| 151 | +//get min version from config |
| 152 | +$minWebLoginVersion = $WebLoginVersion; |
| 153 | +//search the snippet by name |
| 154 | +$CheckWebLogin = $modx->db->select( "id, name, description", $table, "name='WebLogin'" ); |
| 155 | +if($CheckWebLogin != ''){ |
| 156 | +while( $row = $modx->db->getRow( $CheckWebLogin ) ) { |
| 157 | +//extract snippet version from description <strong></strong> tags |
| 158 | +$curr_WebLogin_version = getver($row['description'],"strong"); |
| 159 | +//check snippet version and return an alert if outdated |
| 160 | +if ($curr_WebLogin_version < $minWebLoginVersion){ |
| 161 | +$output .= '<div class="widget-wrapper alert alert-warning"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <b>' . $row['name'] . '</b> '.$_lang["snippet"].' (version ' . $curr_WebLogin_version . ') '.$_oec_lang['isoutdated'].' <b>Evolution '.$EVOversion.'</b>. '.$_oec_lang['please_update'].' <b>' . $row['name'] . '</b> '.$_oec_lang["to_latest"].' ('.$_oec_lang['min _required'].' '.$minWebLoginVersion.') '.$_oec_lang['from'].' <a target="main" href="index.php?a=112&id='.$ExtrasID.'">'.$_oec_lang['extras_module'].'</a>.</div>'; |
| 162 | + } |
| 163 | + } |
| 164 | +} |
| 165 | +//end check WebLogin |
| 166 | + |
| 167 | +//check WebChangePwd |
| 168 | +//get min version from config |
| 169 | +$minWebChangePwdVersion = $WebChangePwdVersion; |
| 170 | +//search the snippet by name |
| 171 | +$CheckWebChangePwd = $modx->db->select( "id, name, description", $table, "name='WebChangePwd'" ); |
| 172 | +if($CheckWebLogin != ''){ |
| 173 | +while( $row = $modx->db->getRow( $CheckWebChangePwd ) ) { |
| 174 | +//extract snippet version from description <strong></strong> tags |
| 175 | +$curr_WebChangePwd_version = getver($row['description'],"strong"); |
| 176 | +//check snippet version and return an alert if outdated |
| 177 | +if ($curr_WebChangePwd_version < $minWebChangePwdVersion){ |
| 178 | +$output .= '<div class="widget-wrapper alert alert-warning"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <b>' . $row['name'] . '</b> '.$_lang["snippet"].' (version ' . $curr_WebChangePwd_version . ') '.$_oec_lang['isoutdated'].' <b>Evolution '.$EVOversion.'</b>. '.$_oec_lang['please_update'].' <b>' . $row['name'] . '</b> '.$_oec_lang["to_latest"].' ('.$_oec_lang['min _required'].' '.$minWebChangePwdVersion.') '.$_oec_lang['from'].' <a target="main" href="index.php?a=112&id='.$ExtrasID.'">'.$_oec_lang['extras_module'].'</a>.</div>'; |
| 179 | + } |
| 180 | + } |
| 181 | +} |
| 182 | +//end check WebChangePwd |
| 183 | + |
| 184 | +//check WebSignup |
| 185 | +//get min version from config |
| 186 | +$minWebSignupVersion = $WebSignupVersion; |
| 187 | +//search the snippet by name |
| 188 | +$CheckWebSignup = $modx->db->select( "id, name, description", $table, "name='WebSignup'" ); |
| 189 | +if($CheckWebSignup != ''){ |
| 190 | +while( $row = $modx->db->getRow( $CheckWebSignup ) ) { |
| 191 | +//extract snippet version from description <strong></strong> tags |
| 192 | +$curr_WebSignup_version = getver($row['description'],"strong"); |
| 193 | +//check snippet version and return an alert if outdated |
| 194 | +if ($curr_WebSignup_version < $minWebSignupVersion){ |
| 195 | +$output .= '<div class="widget-wrapper alert alert-warning"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <b>' . $row['name'] . '</b> '.$_lang["snippet"].' (version ' . $curr_WebSignup_version . ') '.$_oec_lang['isoutdated'].' <b>Evolution '.$EVOversion.'</b>. '.$_oec_lang['please_update'].' <b>' . $row['name'] . '</b> '.$_oec_lang["to_latest"].' ('.$_oec_lang['min _required'].' '.$minWebSignupVersion.') '.$_oec_lang['from'].' <a target="main" href="index.php?a=112&id='.$ExtrasID.'">'.$_oec_lang['extras_module'].'</a>.</div>'; |
| 196 | + } |
| 197 | + } |
| 198 | +} |
| 199 | +//end check WebSignup |
| 200 | + |
| 201 | +//check Breadcrumbs |
| 202 | +//get min version from config |
| 203 | +$minBreadcrumbsVersion = $BreadcrumbsVersion; |
| 204 | +//search the snippet by name |
| 205 | +$CheckBreadcrumbs = $modx->db->select( "id, name, description", $table, "name='Breadcrumbs'" ); |
| 206 | +if($CheckBreadcrumbs != ''){ |
| 207 | +while( $row = $modx->db->getRow( $CheckBreadcrumbs ) ) { |
| 208 | +//extract snippet version from description <strong></strong> tags |
| 209 | +$curr_Breadcrumbs_version = getver($row['description'],"strong"); |
| 210 | +//check snippet version and return an alert if outdated |
| 211 | +if ($curr_Breadcrumbs_version < $minBreadcrumbsVersion){ |
| 212 | +$output .= '<div class="widget-wrapper alert alert-warning"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <b>' . $row['name'] . '</b> '.$_lang["snippet"].' (version ' . $curr_Breadcrumbs_version . ') '.$_oec_lang['isoutdated'].' <b>Evolution '.$EVOversion.'</b>. '.$_oec_lang['please_update'].' <b>' . $row['name'] . '</b> '.$_oec_lang["to_latest"].' ('.$_oec_lang['min _required'].' '.$minBreadcrumbsVersion.') '.$_oec_lang['from'].' <a target="main" href="index.php?a=112&id='.$ExtrasID.'">'.$_oec_lang['extras_module'].'</a>.</div>'; |
| 213 | + } |
| 214 | + } |
| 215 | +} |
| 216 | +//end check Breadcrumbs |
132 | 217 |
|
| 218 | +//check Reflect |
| 219 | +//get min version from config |
| 220 | +$minReflectVersion = $ReflectVersion; |
| 221 | +//search the snippet by name |
| 222 | +$CheckReflect = $modx->db->select( "id, name, description", $table, "name='Reflect'" ); |
| 223 | +if($CheckReflect != ''){ |
| 224 | +while( $row = $modx->db->getRow( $CheckReflect ) ) { |
| 225 | +//extract snippet version from description <strong></strong> tags |
| 226 | +$curr_Reflect_version = getver($row['description'],"strong"); |
| 227 | +//check snippet version and return an alert if outdated |
| 228 | +if ($curr_Reflect_version < $minReflectVersion){ |
| 229 | +$output .= '<div class="widget-wrapper alert alert-warning"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <b>' . $row['name'] . '</b> '.$_lang["snippet"].' (version ' . $curr_Reflect_version . ') '.$_oec_lang['isoutdated'].' <b>Evolution '.$EVOversion.'</b>. '.$_oec_lang['please_update'].' <b>' . $row['name'] . '</b> '.$_oec_lang["to_latest"].' ('.$_oec_lang['min _required'].' '.$minReflectVersion.') '.$_oec_lang['from'].' <a target="main" href="index.php?a=112&id='.$ExtrasID.'">'.$_oec_lang['extras_module'].'</a>.</div>'; |
| 230 | + } |
| 231 | + } |
| 232 | +} |
| 233 | +//end check Reflect |
| 234 | + |
133 | 235 | //check Multitv |
134 | 236 | //get min version from config |
135 | 237 | $minMtvVersion = $MtvVersion; |
|
0 commit comments