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.

nuggets on one page only

edited February 2008 in Vanilla 1.0 Help
Stupid lazy question, sorry. I just started using the shiny new "BlogThis" extension (works great, btw). On my blog page, there is nothing -- zero -- nada -- in the sidebar except the really nice background image. I'd like to stick some nuggets over there to keep things looking balanced, but I don't want the nuggets anywhere else. How can I accomplish this? Thanks.

Comments

  • edited February 2008
    I don't... *think* that's possible without hacking the Nuggets code.

    But you can use the following code to insert content into the Panel. Just pop it in a file called "default.php", place the file in a folder called "CustomPanelObjects" (or whatever), place that folder in the extensions directory, and enable it like any other extension.

    <?php /* Extension Name: Custom Panel Objects Extension Url: n/a Description: n/a Version: 0.1 Author: Timothy Walters Kleinert Author Url: n/a */ // I'm assuming BlogThis uses "extension.php?PostBackAction=BlogThis". // If I'm wrong, just change the SelfUrl & PostBackAction to the appropriate values. if ($Context->SelfUrl = 'extension.php' && ForceIncomingString('PostBackAction', '') == 'BlogThis') { // Here's where you enter the content you want to render. $EchoContent1 = ''; // This changes the order the object is rendered in relation to other Panel objects. $ObjectPosition1 = 0; $CustomObject1 = $Context->ObjectFactory->NewContextObject($Context, 'CustomPanelContent ', $EchoContent1); $Page->AddRenderControl($CustomObject2, $Configuration['CONTROL_POSITION_PANEL'] + $ObjectPosition1); // You can create more than one object by replicating the the above code. // Just be sure to always give the variables different names. // Note, if all your objects are going to be in a line, you can just string them together in one $EchoContent. // You can use the code below if you remove the comment markers /* */ /* $EchoContent2 = ''; $ObjectPosition2 = 0; $CustomObject2 = $Context->ObjectFactory->NewContextObject($Context, 'CustomPanelContent ', $EchoContent2); $Page->AddRenderControl($CustomObject2, $Configuration['CONTROL_POSITION_PANEL'] + $ObjectPosition2); $EchoContent3 = ''; $ObjectPosition3 = 0; $CustomObject3 = $Context->ObjectFactory->NewContextObject($Context, 'CustomPanelContent ', $EchoContent3); $Page->AddRenderControl($CustomObject3, $Configuration['CONTROL_POSITION_PANEL'] + $ObjectPosition3); */ } class CustomPanelContent extends Control { var $Context; var $EchoContent; function CustomPanelContent(&$Context, $EchoContent) { $this->Context = $Context; $this->$Content = $EchoContent; } function Render() { echo $this->EchoContent; } } ?>
This discussion has been closed.