(2011-05-23, 01:43 PM)Aries-Belgium Wrote: I hadn't checked out the complete code, but find this:
and add this on a new line below it:function mycode_parse_url($url, $name="") {
global $mybb;
That should work.
However (!!!) there is a much better solution that doesn't require a core modification and that works with all URLs. Add a new MyCode via AdminCP > Configuration > MyCode with these settings:
Title: Open internal links in same window
Regular expression:
Replacement:\<a\ href=\"(http://www.yourdomain.com/.*?)\" target=\"_blank\"
<a href="$1"
Hmm, after adding that new line, now I get this error when loading the page:
Parse error: syntax error, unexpected T_GLOBAL, expecting ';' or '{' in /home2/greatlc9/public_html/testforum/inc/class_parser.php on line 1632
I'm not sure why it's complaining about line 1632 now, as that line is blank:
1631 $code = str_replace("<code>", "<div dir=\"ltr\"><code>", $code);
1632
1633 $code = str_replace("</code>", "</code></div>", $code);
As for your other option, that would be good for general use, but I don't think it will help me make the "Forum Links" open in new windows. You know how you can create a forum as just a link? That is what I want to open in a new window... The links that people post in threads are already opening in new windows, for the most part.
Thanks for your help!