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.

Moving Sidebar (Error)

edited February 2009 in Vanilla 1.0 Help
http://scrawlfx.com/forums/discussions/

I'm trying to move my sidebar to the right, in order to match the template of my site. However, when doing that, I run into an error. What I do is remove all the code in panel.php and place it in foot.php and change its CSS properties to float: right. However, I get an error after it displays the "Start Discussion" button saying:

Warning: Variable passed to each() is not an array or object in /home/.galled/scrawlfx/scrawlfx.com/forums/themes/foot.php on line 45

This is line 45 of foot.php:

while (list($Key, $PanelElement) = each($this->PanelElements)) {

So what's the problem? Check out the page and help me out: http://scrawlfx.com/forums/discussions/

Comments

  • Just a guess, but maybe you need $this->Context->.
  • edited February 2009
    themes/foot.php does not have direct access to the Panel object. You will need to access it via $GLOBALS['Panel']->PanelElements.

    However, this is not the best solution to your problem. What you really should do is re-arrange the controls via $Configuration['CONTROL_POSITION_*']. Check out the order in which the controls are rendered by looking at appg/settings.php (look there, but don't change them there!). Then, add the overrides to your conf/settings.php and you should be good to go.

    I think all you need to add to your conf/settings.php file is $Configuration['CONTROL_POSITION_PANEL'] = '550'; but I've never done this kind of mod before so you might need to test it some more.
  • You just want to move the panel over? You can do that by editing your CSS (don't touch any of the code).

    go to /themes/vanilla/styles/default/
    copy vanilla.css to vanilla.old.css
    go to /themes/vanilla/styles/default/src/
    copy it to /themes/vanilla/styles/default/
    now open /themes/vanilla/styles/default/vanilla.css

    change (line 151?)#Panel { width:201px; margin-left:18px; float:left; background:url('panelfadetop.gif') top right no-repeat; display: inline; }to
    #Panel { width:201px; margin-right:18px; float:right; background:url('panelfadetop.gif') top right no-repeat; display: inline; }

    and (line 243)#Content { margin:0 18px 0 235px; }to
    #Content { margin:0 238px 0 18px; }
    I think that should to the trick.
Sign In or Register to comment.