Replace Elgg File url
How to replace default url for Elgg File When you uploading files on the Elgg site, it is automatically created the view url:
For changing view url on download link
Open the file
elgg\mod\file\start.php
And edit this code
return "file/view/" . $entity->getGUID() . "/" . $title;
With this
return "file/download/" . $entity->getGUID();





can I replace site.com/profile/username to site.com/username ?
Open the file
.htaccess
After this code
<IfModule mod_rewrite.c>
RewriteEngine on
Add this code
RewriteRule ^([A-Za-z0-9]+)$ profile\/$1
RewriteRule ^([a-zA-Z0-9_-]+)$ profile/$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ profile/$1
now i can't open my elgg pages
ex.
/admin, /activity, /members, etc.
Use this Elgg plugin for rewriting the most page handlers:
and how to use it?
Read the explanation to this mod
404 ERROR
Check it:
Sorry, not quite on the topic. Just wanted to ask if "Register" option can be removed from the login page?
Reason being, is that I am building invitation only network and allowing only invites from existing members – users will be receiving a link and registering through there.
Thank you for taking your time on this!
Best Regards
In first, you can to deactivate User registration setting in Administration -> Settings : Advanced Settings
Another way, removing Register form from your site:
In this file
elgg\views\default\forms\login.php
Delete this code
<ul class="elgg-menu elgg-menu-general mtm">
<?php
if (elgg_get_config('allow_registration')) {
echo '<li><a class="registration_link" href="' . elgg_get_site_url() . 'register">' . elgg_echo('register') . '</a></li>';
}
?>
<li><a class="forgot_link" href="<?php echo elgg_get_site_url(); ?>forgotpassword">
<?php echo elgg_echo('user:password:lost'); ?>
</a></li>
</ul>
Cheers! Thank you very much!
I disabled user registration, however that impedes with invitation registration..:(
Thank you for taking your time on this one!!!
Best Regards!
Just as update, editing login.php worked perfectly. Thank you once again for this!!