Page 1 of 1
Patch for functions_entries.inc.php
Posted: Mon Aug 10, 2009 8:01 am
by paddyforan
Currently, there's no way to override the URLs being assigned to categories when an entry is displayed. However, if you add two lines, this functionality is added:
line 1067:
if(!isset($entry['categories'][$k]['category_link'])){
line 1069:
}
Basically, just check to see if the link is already set before resetting it. It would be nice if all the $entry keys behaved this way, come to think of it.
Re: Patch for functions_entries.inc.php
Posted: Mon Aug 10, 2009 3:11 pm
by garvinhicking
Hi!
Can you give an example usage case, for when this can be beneficial? We don't check most of the array keys because of performance reasons, to be able to omit a view hash lookups as well as lines of code. It's not much, but to add those would need a really reason to do that...?
Regards,
Garvin
Re: Patch for functions_entries.inc.php
Posted: Fri Aug 14, 2009 4:08 am
by paddyforan
I use it because I'm doing a bit of work with a multiple-URL mapping plugin, letting you assign URLs to categories. It lets me make sure the links line up with the URL they're supposed to point at.
Really, anything that changes internal links at all would find this useful.
Re: Patch for functions_entries.inc.php
Posted: Fri Aug 14, 2009 1:06 pm
by garvinhicking
Hi!
Ok, even though I still don't really understand what you try to do, I committed your patch to trunk.
Best regards,
Garvin