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.

Include static Code elements

edited December 2005 in Vanilla 1.0 Help
Hi another question: I'd like to insert a static code element somewhere in the panel area (an external link for example, or an iframe for including an external calendar, whatever...). I am not exactly sure, where i can place that code. guess it should happen somewehere in the controls/index.php with an [echo "This is my external Link";] somehow, but where exactly do I have to place that, so that it will appear within the div class="Panel DiscussionPanel" thanks ma74


  • MarkMark Vanilla Staff
    Create a new extension following the guidelines in the docs (or the many examples on this forum - do a search panel and I'm sure you'll find a decent example) and do something like this:

    $Panel->AddString("<iframe src=\"\"></iframe>");
  • edited December 2005
    You can add stuff to the control panel by following the documentation here. HOWEVER depending how much it bothers you you'll probably have to change how it works when you upgrade to 0.9.3
  • NickENickE New
    edited December 2005
    From the looks of it the Panel class functions are the same, at least so far they are.
  • will try. hope one doesnt have to be coder for that. thanks
  • Thanks!! That one is perfect.
  • works well so far, but i when commenting it seems to collide with Common.Controls.php and I cant see why. The comment is saved, but this message always shows up. +++Warning Message: ++++++ Warning: Cannot modify header information - headers already sent by (output started at /var/kunden/webs/matthias01/rewolfinger/vanilla/extensions/CustomHTML.php:2) in /var/kunden/webs/matthias01/rewolfinger/vanilla/controls/Common.Controls.php on line 126 +++++++++ this is the extension code I used +++++++++ <?php /* Extension Name: Custom HTML Message in Panel (HEREDOC version) Extension Url: Description: Adds Custon HTML to the panel Version: 1.0 Author: BJ Author Url: */ if(in_array($Context->SelfUrl, array("index.php"))) { $Panel->AddList("htmlblock"); $HTMLBlockTitle = "Kalender"; $HTMLToDisplay = <<< ENDHTML <p> Klick, um den Terminkalender zu öffnen </p> ENDHTML; $Panel->AddListItem($HTMLBlockTitle,"</a>$HTMLToDisplay<a>","","",$Position="1",$Attributes=""); } ?> +++++++++
  • Um. I'm gonna hazard a guess it's because you have that ö and php is thinking the ; is to end the line, then ffen is a standard output. But i could be completely wrong.
  • it went away. dont know why.
  • wasnt the ö the only thing i changed was $Position="1" to $Position="2" seems, that was it
  • i really love this software. thanks to mark & Co for this nice piece. also for your quick support. i read you are working on an email notification for new comments, which is the only thing i would reckon is really missing by now. thanks
This discussion has been closed.