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="http://www.fhedvd.com/" target="_blank">FHE on DVD: Famiy Home Easy</a> The link LOOKS fine, but it actually directs the browser to: http://www.mormonmomma.com/board/"http://www.fhedvd.com/" So the link points BACK to my board and then appends the real link? Any ideas?

Comments

  • Have you got another extension running which automatically changes URLs into links? Maybe it's conflicting?
  • 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. :)
  • Thanks! Look forward to hearing what you work out.
  • Any progress on this fix, iambigred?
  • 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?
  • 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.
  • 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!
  • edited September 2006
    iambigred,

    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.