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.

Add XML Button to Panel

bradybrady New
edited July 2005 in Vanilla 1.0 Help
/* Extension Name: Feed Button in Panel Extension Url: Description: Adds XML button to the panel Version: 1.0 Author: BJ Author Url: */ if (in_array($Context->SelfUrl, array("index.php"))) { $Panel->AddList("Feeds"); $Panel->AddListItem("Feeds", "<img src=\"\" border=\"0\" />", "./feeds/?Type=atom", "", $Position = "1", $Attributes = ""); }


  • nice one! p.s. - edit your post and set the type to html
  • I had it html, but the image URL didn't appear.

    the image url should probably be changed by the user upon installation, so they host their own XML button

  • Brady, Do you know how to create a link to something external rather than the feed? I need to link my graphic to another web site. Thanks, -TiffanyA
  • if i understand you correctly, you should be able to just modify brady's original code to include an iframe, or just correct the url's to point to the correct address.
  • I'm trying to add a banner advertisement to the left column. This isn't working for me.... I'm too new to PHP to know if this is proper syntax for a URL. CODE: --------------------------------------------------------------- if (in_array($Context->SelfUrl, array("index.php"))) { $Panel->AddList("Sponsors"); $Panel->AddListItem("Sponsors", "<img src=\"../images/ttw.gif\" border=\"0\" />", "\"\"", "", $Position = "1", $Attributes = ""); --------------------------------------------- Thanks for any help!! -TiffanyA
  • $Panel->AddListItem("Sponsors", "image", "", "", $Position = "1", $Attributes = "");

    the difference is your escaping, with the slashes.
  • edited July 2005
    something more like this maybe?
    <?php if (in_array($Context->SelfUrl, array("index.php"))) { $Panel->AddList("Sponsors"); $Panel->AddListItem("Sponsors", "<img src=\"../images/ttw.gif\" border=\"0\" />", "", "", $Position = "1", $Attributes = ""); } ?>
  • and yes, what jsanders said :)
  • or see this:
  • Perfect! THANKS!
This discussion has been closed.