Configuration Error:
Please add to the SMF file 'Settings.php':
\$scripturl = \$boardurl . '/index.php';
"; # SMF logout calls PmWiki ?action=logout $_SESSION['logout_url'] = $ScriptUrl."?action=logout"; # after SMF logout PmWiki logout is triggered # PmWiki ?action=logout, calls SMF logout if ($action=='logout') { $_SESSION['logout_url'] = $ScriptUrl."?n=".$pagename; # return to current page after logout Redirect($pagename, $scripturl.'?action=logout;sesc='.$sc); HandleLogoutA($pagename); exit; } # SMF auth form called by PmWiki ?action=login # use Site.SMFAuthForm if exists, else SMF ssi_login form $InputTags['smf_auth_form'] = array( ':html' => "
\$PostVars"); if (PageExists('$SiteGroup.SMFAuthForm')) $AuthPromptFmt = array(&$PageStartFmt, 'page:$SiteGroup.SMFAuthForm', "", &$PageEndFmt); else $AuthPromptFmt = array(&$PageStartFmt, ssiFunction('login'), &$PageEndFmt); # Set PmWiki author name as user name used by SMF (realName, not memberName login Id). # Author name will be set to 'Guest' if the // user is not signed in. if ($user_info['username']) $Author = $user_settings['realName']; else $Author = 'Guest'; // Populate variables for AuthUser. Only if the login succeeded, or the user // will appear to AuthUser as an authenticated user named "anonymous". if ($context['user']['is_logged'] == 1) { $AuthId = $user_settings['memberName']; # 1 = SMF Administrator => PmWiki @admin if ($user_settings['ID_GROUP'] == 1) { $AuthList ['@admin'] = 1; } # 2 = SMF Global Moderator => PmWiki @editor if ($user_settings['ID_GROUP'] == 2) { $AuthList ['@editor'] = 1; } } else $AuthId = 'guest'; # add page variables for logged in user's email address and real name ( user name is {$AuthId} ) $FmtPV['$UserEmail'] = 'NoCache($GLOBALS["user_settings"]["emailAddress"])'; $FmtPV['$UserName'] = 'NoCache($GLOBALS["user_settings"]["realName"])'; # Debug: #echo "
"; print_r($context); echo "
"; #echo "
"; print_r($user_settings); echo "
"; // Include AuthUser for authorization require_once ("$FarmD/scripts/authuser.php"); Markup('ssi_function','directives', '/\\(:smf-(.*?)\\s*:\\)/', "mu_ssiFunction"); function mu_ssiFunction($m) { return Keep(ssiFunction($m[1])); } function ssiFunction($args) { global $ScriptUrl; $args = ParseArgs($args, '(?>(\\w+)=)'); $fn = array_shift($args['']); $arg1 = array_shift($args['']); $arg2 = array_shift($args['']); $fn = 'ssi_'.$fn; # call ssi function (from SMF module SSI.php) if (function_exists($fn) ) { # use output buffer to catch echos ob_start(); if (isset($arg1) && isset($arg2)) $fn( $arg1, $arg2); else if (isset($arg1)) $fn( $arg1); else $fn(); $out = ob_get_contents(); ob_end_clean(); return $out; } else return 'ERROR! The ssi function '.$fn.' does not exist!'; }