right now if we would like yogurt to be the main userpage, user have to edit userinfo. can we remove this step ? WE should avoid user have to make changes to core files
just like the profile module, when installed it automatically replace the main userpage
Hack to make the yogurt userpage as the main userpage of your site:
Open ROOT_URL/userinfo.php in the root of your site, search at the very beggining of the file for
$uid = intval($_GET['uid']);
if ($uid <= 0) {
redirect_header('index.php', 3, _US_SELECTNG);
exit();
}
Add after this the following lines:
header("Location:".XOOPS_URL."/modules/yogurt/index.php?uid=".$uid);
exit();
If you are using the profile module
Open ROOT_URL/modules/profile/userinfo.php, search at the very beggining of the file for
$uid = isset($_GET['uid']) ? (int)$_GET['uid'] : 0;
if ($uid <= 0) {
if (is_object($GLOBALS['xoopsUser'])) {
$uid = $GLOBALS['xoopsUser']->getVar('uid');
} else {
header('location: ' . XOOPS_URL);
exit();
}
}
Add after this the following lines:
header("Location:".XOOPS_URL."/modules/yogurt/index.php?uid=".$uid);
exit();