+ // This will make 'foo_bar' to detectFooBar()
+ $functionName = "'detect' . implode('', array_map('ucfirst', explode('_', '" . $serverCmd . "')))";
+
+ // Replace it
+ $code = str_replace($matches[0][$key], "\" . call_user_func(" . $functionName . ") . \"", $code);
+ } elseif (substr($cmd, 0, 4) == 'user') {
+ // Extract user command
+ $userCmdArray = explode(',', $cmd);
+ $userCmd = $userCmdArray[1];
+
+ // Use current userid by default
+ $functionName = 'getMemberId()';
+
+ // User-related data, so is there a userid?
+ if (!empty($matches[4][$key])) {
+ // Do we have a userid or $userid?
+ if ($matches[4][$key] == '$userid') {
+ // Use dynamic call
+ $functionName = "getFetchedUserData('userid', \$userid, '" . $userCmd . "')";
+ } elseif ($matches[4][$key] > 0) {
+ // User data found
+ $functionName = "getFetchedUserData('userid', " . $matches[4][$key] . ", " . $userCmd . "')";
+ } // END - if
+ } // END - if
+
+ // Do we have another function to run (e.g. translations)
+ if (isset($userCmdArray[2])) {
+ // Surround the original function call with it
+ $functionName = $userCmdArray[2] . '(' . $functionName . ')';
+ } // END - if
+
+ // Now replace the code
+ $code = str_replace($matches[0][$key], "\" . " . $functionName . " . \"", $code);
+ } elseif (substr($cmd, 0, 3) == 'ext') {