The forum is in read only mode.
Hi, I would like to prevent my users to change their vanity url. How can I do that? Regards Fernando
Hi Fernando, You should hack this file components/com_community/templates/default/profile.preferences.php, and delete this code :
<?php if ($jConfig->get('sef')) { ?> <li class="has-seperator"> <label class="form-label"> <?php echo JText::_('COM_COMMUNITY_YOUR_PROFILE_URL'); ?> </label> <div class="form-field show-info"> <?php echo JText::sprintf('COM_COMMUNITY_YOUR_CURRENT_PROFILE_URL', $prefixURL); ?> </div> </li> <?php } ?>
<?php if($isSEFEnabled){?> <li><a tabindex="-1" href="javascript:void(0);" onclick="joms.users.updateURL('<?php echo $profile->id;?>');"><?php echo JText::_('COM_COMMUNITY_PROFILE_CHANGE_ALIAS');?></a></li> <?php }?>
Hi Dimas, With this hack the vanity url don't show on profile page. I want that the users can see it, but don't change it
1. you should open this file components/com_community/controllers/profile.php, find this:
$inputHTML = '<input id="alias" name="alias" type="text" value="' . $alias . '" class="input-small" />';
$inputHTML = '<input id="alias" name="alias" type="text" value="' . $alias . '" class="input-small" disabled />';
$inputHTML = '<input id="alias" name="alias" type="text" value="' . $alias . '" />';
$inputHTML = '<input id="alias" name="alias" type="text" value="' . $alias . '" disabled />';
Hi Dimas, Is there another way to do that? Your solution changes the core files. I was thinking to override it. Regards Fernando
Hi Fernando, No there is no way, since the html code is coming from controller file not template file. Best
JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a full -fledged, social networking site
TRY NOW BUY NOW