Largo Posted October 21, 2009 Report Share Posted October 21, 2009 Hello, I've created app and I want to change all of URL's to SEO friendly. That's my furlTemplates.php: <?php /** * DiabloTrade.pl * Forum Gold 2.0.0 * Sets up SEO templates * * @author Largo-W * @copyright (c) 2008 - 2009 DiabloTrade.pl * @package Forum Gold * @version 2.0.0prealpha1 * */ if ( ! defined( 'IN_IPB' ) ) { print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; exit(); } $_SEOTEMPLATES = array( 'app=fg' => array( 'app' => 'fg', 'allowRedirect' => 1, 'out' => array( '#app=fg$#i', 'fg/' ), 'in' => array( 'regex' => "#/fg/?$#i", 'matches' => array( array( 'app', 'fg' ) ) ) ), 'richest' => array( 'app' => 'fg', 'allowRedirect' => 1, 'out' => array( '#app=fg(?:&|&)module=logs(?:&|$)section=richest$#i', 'fg/richest/' ), 'in' => array( 'regex' => "#/fg/richest/?$#i", 'matches' => array( array( 'app', 'fg' ), array( 'module', 'logs' ), array( 'section', 'richest' ) ) ) ), 'security' => array( 'app' => 'fg', 'allowRedirect' => 1, 'out' => array( '#app=fg(?:&|&)module=logs(?:&|$)section=security$#i', 'fg/security/' ), 'in' => array( 'regex' => "#/fg/security/?$#i", 'matches' => array( array( 'app', 'fg' ), array( 'module', 'logs' ), array( 'section', 'security' ) ) ) ), ); And i template I used it like: <a href='{parse url="app=fg&module=logs§ion=security" template="security" base="public"}' title='' alt=''></a> Why URL didn't changed? I rebuild after file change cache :-) Best regards, Largo Link to comment Share on other sites More sharing options...
Sacred Posted October 22, 2009 Report Share Posted October 22, 2009 coreVariable.php Should have this if ( $_REQUEST['showsecurity'] ) { $_RESET['app'] = 'fg'; $_RESET['module'] = 'logs'; $_RESET['section'] = 'security'; } furlTemplate.php 'showsecurity' => array( 'app' => 'fg', 'allowRedirect' => 1, 'out' => array( '#app=fg&showsecurity#i', 'fg/security' ), 'in' => array( 'regex' => "#/fg/security#i", 'matches' => array( array( 'app' , 'fg' ), array( 'module' , 'logs' ), array( 'section' , 'security' ) ) ) ), Then Template <a href='{parse url="showsecurity" seotitle="security" template="showsecurity" base="publicWithApp"}'>Security</a> Final link will be http://ursite.com/fg/security Largo 1 Link to comment Share on other sites More sharing options...
Largo Posted October 22, 2009 Author Report Share Posted October 22, 2009 coreVariable.php Should have this if ( $_REQUEST['showsecurity'] ) { $_RESET['app'] = 'fg'; $_RESET['module'] = 'logs'; $_RESET['section'] = 'security'; } furlTemplate.php 'showsecurity' => array( 'app' => 'fg', 'allowRedirect' => 1, 'out' => array( '#app=fg&showsecurity#i', 'fg/security' ), 'in' => array( 'regex' => "#/fg/security#i", 'matches' => array( array( 'app' , 'fg' ), array( 'module' , 'logs' ), array( 'section' , 'security' ) ) ) ), Then Template <a href='{parse url="showsecurity" seotitle="security" template="showsecurity" base="publicWithApp"}'>Security</a> Final link will be http://ursite.com/fg/security Hello, Thanks Sacred! You have right, I do it now, but in official documentation there is no information about that. I used it for my apps. Best regards, Largo Link to comment Share on other sites More sharing options...
Sacred Posted October 23, 2009 Report Share Posted October 23, 2009 The original issue this topic was opened for has been resolved :) Or there has been no response. If your still having trouble please open a new topic. Link to comment Share on other sites More sharing options...
Recommended Posts