In my elgg site
some page url has .php extention in address bar..
Can i remove that one?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Trajan@Trajan
Trajan - 0 likes
- BEN@benqbbenqb
BEN - 0 likes
- Trajan@Trajan
Trajan - 0 likes
- Cash@costelloc
Cash - 0 likes
- BEN@benqbbenqb
BEN - 0 likes
You must log in to post replies.It is possible to remove these. To do these you need to work with the page_handler to setup correct pages that link to views. Then *.php urls will not appear.
How to setup page_handler?
look in the start.php file of another plugin and see how it is done. It's easy to follow.
http://docs.elgg.org/wiki/Engine/Controllers/PageHandler
I use th page handler in Contact Importer Plugins Start.php but still it shows .php extention
The code in the start.php is given below
<?php
/**
* Contact Importer Plugin (using OpenInviter)
*
* @package ElggContactImporter
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Prashant Juvekar
* @copyright SocialTrak, 2009
* @link http://www.socialtrak.com
*/
// Get config
global $CONFIG;
/**
* Initialisation function
*/
function contact_importer_init() {
// Get config
global $CONFIG;
// Load the language file
register_translations($CONFIG->pluginspath . "contact_importer/languages/");
// Load menu for logged in users
if ( isloggedin() ) {
// Menu options
global $CONFIG;
if (get_context() == "friends" ||
get_context() == "friendsof" ||
get_context() == "collections") {
add_submenu_item(elgg_echo('contact_importer:plugin:name'),$CONFIG->wwwroot."mod/contact_importer/import",'import');
}
}
// Extend CSS
extend_view('css', 'contact_importer/css');
}
// Make sure init is called on initialisation
register_elgg_event_handler('pagesetup','system','contact_importer_init',1000);
// Register a page handler, so we can have nice URLs
register_page_handler('contact_importer','contact_importer_page_handler');
?>