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.

Announcement extension makes crazy links

edited September 2006 in Vanilla 1.0 Help
iambigred, I got your great extension up and running, but am having a problem when inserting HTML into the announcement. I want to use this extension to plug one of my advertisers each month. So I inserted this as the Announcement Message: <b>Gold Sponsor Alert:</b> <a href="" target="_blank">FHE on DVD: Famiy Home Easy</a> The link LOOKS fine, but it actually directs the browser to:"" So the link points BACK to my board and then appends the real link? Any ideas?


  • Options
    Have you got another extension running which automatically changes URLs into links? Maybe it's conflicting?
  • Options
    Yeah I know about that, somewhere it's parsing out the quotation marks breaking the link/image/html that you're inserting. It's 4:15am right now and I'm pretty tired, but I'll check back in the morning and see if I can fix it. :)
  • Options
    Thanks! Look forward to hearing what you work out.
  • Options
    Any progress on this fix, iambigred?
  • Options
    edited July 2006
    I made the huge mistake of trying to put a <BR> tag in my announcement. The whole forum died. You have to hack out the text from the conf/settings.php file to fix it! Is there any scope for including some basic sanity check that disallows stuff that causes carnage?
  • Options
    I had a similar problem trying to include an image link. Whoa, momma. But, hey, I'm learning to correct PHP devastation--something I never even wanted to do! When I include a single line, I'm OK, but the links do now work yet.
  • Options
    I'm gonna have to pull this extension until the links work. Please let us know when the are functinoal. I would really like this feature!
  • Options
    edited September 2006

    If it helps any, I tracked down the culprit. The ConfigurationManager->GetSetting() function replaces all quotes with the HTML entity for double quotes (Framework.Class.ConfigurationManager.php, line 42):

    return str_replace('"', '"', $this->Settings[$SettingName]);

    That's the function the announcement extension is calling to get the announcement message out (default.php, line 44):

    $text = $this->ConfigurationManager->GetSetting('ANNOUNCE_MESSAGE', true);

    An aside: the announcment extension passes two parameters into GetSetting, but it only appears to take one.

    So that's the culprit. Unfortunately I don't know enough about Vanilla to provide a solution. Right now I may just grit my teeth and go with invalid html (e.g. no quotes).
This discussion has been closed.