Posted on: 03/22/05 12:46pm
By: Anonymous (Mark)
Is there an easy way to hide the links that go to the user profile information?
Basically what I want is for admins to be able to see profiles (even if they have to input a URL directly to the page) but regular users to not be able to see them.
Of course unless there's an easy solution, I guess regular users could type in the direct URL as well.
Ideas?
User profile information
Posted on: 03/22/05 03:01pm
By: knuff
Hi,
By default you can control this with the
following parameter[*1] in config.php
profileloginrequired
Now this will allow it for every logged in user.
If you want to restrict it even further to a certain access group I guess the easiest way would be a slight modification in users.php in following block.
This way you donĀ“t end up with having to edit a lot of layout templates.
/**
* Shows a profile for a user
*
* This grabs the user profile for a given user and displays it
*
* @param int $user User ID of profile to get
* @param int $msg Message to display (if != 0)
* @return string HTML for user profile page
*
*/
function userprofile ($user, $msg = 0)
{
global $_CONF, $_TABLES, $_USER, $LANG01, $LANG04, $LANG_LOGIN;
if (empty ($_USER['username']) &&
(($_CONF['loginrequired'] == 1) || ($_CONF['profileloginrequired'] == 1))) {
...
Best Regards,
Boris
User profile information
Posted on: 03/22/05 03:21pm
By: Dirk
And to get rid of the actual links, have a look at the template files. For example, in storytext.thtml, you'll find
{start_contributedby_anchortag}{contributedby_user}{end_contributedby_anchortag}
The first and last variable provide the link - remove them and only the name will be displayed, without the link to the profile.
Similar variables exist in the comment forms. Only the links in the Who's Online block are hard-coded, so you'd have to change those (or disable the block).
bye, Dirk