I saw that there was a way to add 'view profile' in 2.0, but I see that that was not implemented by default in 3.0. I'm not sure if I want it on the Account page, but I would like it in the menu_content area. I added a link and put in the wrong URL:
http://fanforge.net/viewuser.php?uid=$useruid
This was what that mod suggested, but that's not a URL i can just put in an 'a href' field. Thanks. (I may have to alter the user.php file, but since it's changed since last time or i looked at the wrong user.php file, I don't see a way to do that now)
edit
<?php
require_once('config.php');
session_start();
header('Location: http://'.$_SERVER ['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'viewuser.php?uid='.$_SESSION[$sitekey.'_useruid']);
exit;
?>
save as profile.php in root folder, add the link via 'page links' relocate via 'panels'
if you have a better way, feel free to update.
I am rebuilding efiction! Join us on irc! #efiction at
I did this on my site. You have to do it in the login block (if I understand what you're saying). I'll post the code tonight or tomorrow.
If you just want a link that you can put in your menu, then go to pagelinks and add it. If you set it to "members" it'll only show up when people log in. After you add it in pagelinks, go to blocks>menu check it so it shows up in your menu. Don't forget to save!
Ah thanks, yes, to clarify JIC, I when logged in would like to have a link in the menu_content area to view my profile. I added the link and saved it and it shows up there, but the link gives me a permission error. So I will need some backend code to support it.
for those interested, i have been researching this further.
<?php
echo '<a href=""mycgi?foo='," urlencode($userinput), '">';
?>
saw this one some site, it prints part of the url, then prints the string, then prints the rest of the of the url. what i lack is a way for this to become a whole url like say the logout script does. I need a solid url that causes the link provided by this method to be enabled and in that way i end up at my profile.
<?php
echo '<a href=""'fanforge.net/'," urlencode($uid), '">';
?>
if i place something like that in a php file say profile.php, would that work? No, now i think of it, that prints html, so i need something different, hmm
I am rebuilding efiction! Join us on irc! #efiction at
Just wanted to add to this bit here, since making the suggested profile.php did not work for me when I tried it out, it probably won't work for more people. However this is how I solved adding a link to the author's own profile. I did it on the "Member Account" page, however. Not sure if I can make it work elsewhere just yet, but at least to add it to the list of user options "Member Account", here's how to do it easy as can be:
open "user.php"
Find the following code:
if(!dbnumrows($panelquery)) $output .= _FATALERROR;
Because we would probably have it on top of the list, rather than at the bottom, we will replace it with this bit here:
if(!dbnumrows($panelquery)){
$output .= _FATALERROR;
}else{
$output .= "<a href=""viewuser.php?uid=".USERUID."">View" My Profile</a><br />n";
}
By my theory we should be able to use the constant USERUID other places in the archive as well, so this should help with adding the link elsewhere as well π