Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Vanity URL

9 years 2 months ago
Licenses:
JomSocial Expired Socialize Expired

Hi,

I would like to prevent my users to change their vanity url.
How can I do that?

Regards
Fernando

9 years 2 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

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 } ?>

and edit this file components/com_community/templates/default/modules/profile/userinfo.php, delete this code :
<?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 }?>

I suggest you use method override template to hack this.

thank you

9 years 2 months ago
Licenses:
JomSocial Expired Socialize Expired

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

9 years 2 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

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" />';
change to :
$inputHTML = '<input id="alias" name="alias" type="text" value="' . $alias . '" class="input-small" disabled />';

2.and this file components/com_community/views/profile/view.html.php, find this code :
$inputHTML = '<input id="alias" name="alias" type="text" value="' . $alias . '" />';
replace to:
$inputHTML = '<input id="alias" name="alias" type="text" value="' . $alias . '" disabled />';

9 years 2 months ago
Licenses:
JomSocial Expired Socialize Expired

Hi Dimas,

Is there another way to do that?
Your solution changes the core files. I was thinking to override it.

Regards
Fernando

9 years 2 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi Fernando,

No there is no way, since the html code is coming from controller file not template file.

Best

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW