MyBB Central

Full Version: No Longer Needed - Need help with a code edit, please :)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I did not think about it when I was trying to code this, but it breaks the automedia plugin. So, I will not be trying to make this work.

I know this is probably easy, but I'm not much of a programmer and just cannot figure it out. Can anybody help me out with the correct coding?

I am trying to edit the class_parser.php file, so that if a link is internal it is processed normally, but if it is an external link it is processed differently. I think I need to create an if/else statement, or just 2 if statements. And I don't know to code the $link a href tag correctly either.

The current coding is:
$link = "<a href=\"$fullurl\" target=\"_blank\">$name</a>";
return $link;

And what I am trying to do should be something like this, except coded correctly. Smile
$link = "<a href=\"{$mybb->settings['bburl']}\" target=\"_blank\" rel=\"nofollow\">$name</a>";
return $link;
$link = "<a href=\"/yonlendir.php?url=$fullurl\" rel=\"nofollow\">$name</a>";
        return $link;

I had another issue, but was able to resolve it on my own.