Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to override _buildSefRoute function in router.php through plugin

Posted on 2010-08-18
4
Medium Priority
?
1,189 Views
Last Modified: 2012-05-10
Hi ,

Is it possible to override _buildSefRoute using system plugin..

Thanks
Byteridge
0
Comment
Question by:Byteridge
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 14

Expert Comment

by:Allan Nisbet
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 14

Expert Comment

by:Allan Nisbet
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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) …
Here is a tutorial for making your own Joomla templates. Note before reading, you should have some existing knowledge of web development using HTML and CSS. Design Layout: Design your template in a graphics program like Adobe PhotoShop or Corel…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

688 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