• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Why can I not extend some classes?

Marcus

Well-known member
#1
Some classes like XenForo_Link or XenForo_BbCode_TextWrapper can not be extended. Is there a reason behind this like security or performance (the new hint system might help)?
 

Marcus

Well-known member
#4
why would you want to extend XenForo_Link?
I want to extend XenForo_Link::buildPublicLink for my Virtual Forums. When a user is browsing a virtual forum with node_id=5, he is actually viewing node_id=3 and all links on the page include a &real_node_id=3. How could I change the pagination links who are created with XenForo_Link::buildPublicLink?

Christian Discussion
- Abraham Forum (node_id = 5, its just a virtual forum with link to real_node_id = 3)
- Jesus Forum
Jewish Discussion
- Abraham Forum (node_id = 3)
 

digitalpoint

Well-known member
#8
It certainly would be nice if any/all classes could be extended, but some things it's just not practical to be able to extend on the fly. Personally, I still have to hack on 5 files (not a major task) on an upgrade.

These are the ones that I still have to edit the PHP files on...

library/XenForo/Model/Avatar.php
library/XenForo/ViewPublic/Helper/User.php
library/XenForo/ControllerPublic/Abstract.php
library/XenForo/Helper/String.php
library/XenForo/CodeEvent.php