Solved

How to override _buildSefRoute function in router.php through plugin

Posted on 2010-08-18
4
1,153 Views
Last Modified: 2012-05-10
Hi ,

Is it possible to override _buildSefRoute using system plugin..

Thanks
Byteridge
0
Comment
Question by:Byteridge
  • 2
  • 2
4 Comments
 
LVL 13

Expert Comment

by:StormITSolutions
ID: 33464624
You could override it with a custom hack to the router.php, what is it your trying to achieve.

Looking at the function, im sure many of the so components override this to create the url;s so you could look at how they do it and use that, then put that into a plugin if you wished,

you couldd probably do it in a custom php module as well

Storm
0
 
LVL 2

Author Comment

by:Byteridge
ID: 33472222
I dont want to disturb existing router.php file in includes folder ...

I tried to understand shsef component ..they are overriding all the functions in router.php file

My requirement : i want to change the urls of one component ..i am able to achieve this by changing few modifications to the following function _buildSefRoute in router.php file

I want to override the function in my plugin is it possible ?
0
 
LVL 13

Expert Comment

by:StormITSolutions
ID: 33479767
I suppose you could maybe put some kind of if/else statement to not use _buildSefRoute on a specific component, maybe using an id, then have a custom function to change the urls of that one component.

Actually you can disable url for specific components

this link should help

http://webcache.googleusercontent.com/search?q=cache:a92CLv6FVAsJ:www.consult-cts.com/blog/%3Fp%3D22+joomla+_buildSefRoute+on+one+component+only&cd=4&hl=en&ct=clnk&gl=uk

so if you disable it for the component of your choice and then you have in your plugin what you want to do it should technically work.

I noticed that site mentioned editing the router.php file for the component and not the global one.

Hope this helps

Storm
0
 
LVL 2

Accepted Solution

by:
Byteridge earned 0 total points
ID: 33635859
It is not possible to chnage through plug-in i must have to do changes in router.php

Thanks
Byteridge
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Welcome Friends, This is the tutorial for how to create new simple module in joomla 1.5. In the module has two important files. One is XML file and another file is PHP controller file. First you need to create the XML file. (CODE) …
This is our step by step to setting up and configuring a Joomla Install on a Windows 2003 Server. This is the perfect solution for an Intranet Website using Joomla. What you need (only use the following versions) : A fresh copy of Joomla http…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question