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.
Including the panel elsewhere?
I'm currently working on a single column theme (almost similar to MiniVanilli or Dreamless) that requires the panel to be included just below the page title.
Here is before and after examples.
Before:
After:
I've tried to include the panel.php file, copy/paste the contents but to no avail
I also tried just hard coding them in, but hit a snag with things like permissions on users' profiles and bookmarking/unbookmarking threads.
So can anyone help me here?
Thanks
Here is before and after examples.
Before:
After:
I've tried to include the panel.php file, copy/paste the contents but to no avail
I also tried just hard coding them in, but hit a snag with things like permissions on users' profiles and bookmarking/unbookmarking threads.
So can anyone help me here?
Thanks
0
This discussion has been closed.
Comments
in vanilla.css, add use this for the links
#Panel a { padding-right: 5px; }
and then use this, though i haven't tested it out yet
<?php // Note: This file is included from the library/Framework/Framework.Control.Panel.php class. echo '<div id="Panel">'; // Add the start button to the panel if ($this->Context->Session->UserID > 0 && $this->Context->Session->User->Permission('PERMISSION_START_DISCUSSION')) { $CategoryID = ForceIncomingInt('CategoryID', 0); if ($CategoryID == 0) $CategoryID = ''; echo '<a href="'.GetUrl($this->Context->Configuration, 'post.php', 'category/', 'CategoryID', $CategoryID).'">' .$this->Context->GetDefinition('StartANewDiscussion') .'</a>'; } $this->CallDelegate('PostStartButtonRender'); while (list($Key, $PanelElement) = each($this->PanelElements)) { $Type = $PanelElement['Type']; $Key = $PanelElement['Key']; if ($Type == 'List') { $sReturn = ''; $Links = $this->Lists[$Key]; if (count($Links) > 0) { ksort($Links); $sReturn .= '<b>'.$Key.'</b> '; while (list($LinkKey, $Link) = each($Links)) { $sReturn .= ' <a '.($Link['Link'] != '' ? 'href="'.$Link['Link'].'"' : '').' '.$Link['LinkAttributes'].'>' .$Link['Item']; if ($Link['Suffix'] != '') $sReturn .= ' <span>'.$this->Context->GetDefinition($Link['Suffix']).'</span>'; $sReturn .= '</a>'; } } echo $sReturn; } elseif ($Type == 'String') { echo strip_tags($this->Strings[$Key], "<b><i><a><strong><span><font>"); } } $this->CallDelegate('PostElementsRender'); echo '</div> <div id="Content">'; ?>
What I meant was that I'm having trouble including the panel in a different place from where it is. If I try to add things such as page title and pagination inside of the panel.php file, I get errors.
As for the css, I just haven't gotten around to styling it yet
Minisweeper: Haha yeah.
Here is a larger shot, so you can see what I mean (right click for larger).
And by pagination I meant "(1 to 4 of 4)".
For now I'll just hardcode the links in, which partially solves my problem.
i was having the same problem and gave up on it.
do you plan on releasing this style???
add this to the bottom of global.js...
function cleanLoad(){ var relocatePanel = document.getElementById("panel").innerHTML; document.getElementById("relocated_panel").innerHTML = relocatePanel; }
open up head.php and you will see this line all the way at the bottom..
<body'.$BodyId.' '.$this->Context->BodyAttributes.'>';
replace that line with this...
<body onload="cleanLoad()" '.$BodyId.' '.$this->Context->BodyAttributes.'>';
now, upload your global.js and head.php - you are now setup to relocate anything within your vanilla environment.
now wrap everything in the panel.php file that you want to relocate like so..
echo '<div id="panel" style="display:none;">'; everything in panel you want to relocate goes here! echo '</div>';
then open up the file where you want this stuff at, and do this..
echo '<div id="relocated_panel"> </div>';
upload everything and there you go.
Outbreak: I wasn't planning on it since I didn't expect anyone to be interested, but if you are I'll release it in a few weeks
Could be a while
Keep up the good work. =o)