32
Quote:
ericktot wrote:
I found the code, sarahmx try...
create username.php in XOOPS root
Quote:
<?php
require_once "mainfile.php";
unset($uname);
if (isset($_GET['uname'])) $uname = $_GET['uname'];
if (isset($uname)) {
$member_handler =& xoops_gethandler('member');
$criteria = new Criteria("uname", $uname);
if ($member_handler->getUserCount($criteria) == 1) {
$user_list =& $member_handler->getUsers($criteria);
list($user) = $user_list;
header('Location: '.XOOPS_URL.'/modules/yogurt/index.php?uid=' . $user->uid()); exit ();
} else {
header('Location: '.XOOPS_URL.'/user.php'); exit ();
}
}
?>
In .htaccess in XOOPS root
Quote:
working for me =)
i changed the line..cause im using the profile module
header('Location: '.XOOPS_URL.'/modules/yogurt/index.php?uid=' . $user->uid()); exit ();
to
header('Location: '.XOOPS_URL.'/modules/profile/userinfo.php?uid=' . $user->uid()); exit ();
this is working
type
http://yourdomain.com/username.php?uname=belia
and it redirects to my profile info but the url in address bar change to the normal one
http://mydomain.com/modules/profile/userinfo.php?uid=82 and not stay as
http://yourdomain.com/username.php?uname=beliai found a XOOPS site
http://www.redhotchilipeppers.lt/rhcp/
take a look at this
the username of the user is zygimantas and uid is 1384
http://www.redhotchilipeppers.lt/rhcp/profile/1384/zygimantas
the original url is
http://www.redhotchilipeppers.lt/rhcp/profile/userinfo.php?uid=1384
the site seems manage to to do this username in url for profile
anyone know how to do somelike in the site above ?