Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
I want to ad links into the Description part of the category, how to?
How can i make/ ad links into the description part of the category? It says html not allowed... thanks, wayne
0
This discussion has been closed.
Comments
I've done it before but found other solutions, I don't like hacking the core files unless it's absolutely necessary.
Posted: Saturday, 10 November 2007 at 11:32AM
Sorry, no idea what I meant.
One way you could get around this would be to write your link with a substitute string, such as normal brackets [ ]. So a link would look like:
... [a href="mysite.com"]mysite[/a] ...
Then, inside the categories theme file, you add a str_replace() that replaces the substitute string for the real < > brackets.
[ln 17] $Category->FormatPropertiesForDisplay(); str_replace('[', '<', $Category->Description); str_replace(']', '>', $Category->Description);
I'm not sure why it would add the site root. I guess I could look a bit deeper into the code...
Try changing your substitution string inside the categories description to something that doesn't include quotes:
... [a href=*http://www.mysite.com*]mysite[/a] ...
Then change the categories theme file appropriately:
[ln 17] $Category->FormatPropertiesForDisplay(); str_replace('[a href=*', '<a href="', $Category->Description); str_replace('*]', '">', $Category->Description); str_replace('[/a]', '</a>', $Category->Description);