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.

PanelHider extension

edited February 2008 in Vanilla 1.0 Help
Hi folks,

If you've expected to find a functional extension extension I must say "sorry". This uploaded version is just a first step into the right direction. I already posted in another thread to find someone who fixes the old panelhider extension from vanilla 0.9.2.

As no one was interested I took the old code and began on my own. I have to add I'm not very skilled with PHP, Javascript and all this things. Nevertheless I started to study the lussumo documentation, other extensions and some php-explaining sites to translate the extension to the new vanilla version. I uploaded my result in the addons section - PanelHider 0.1.1

Now I've reached a point where I lack the skills to continue. Several things in the JS code such as DataManger() are greek to me. Additionally I don't understand why the content container doesn't resize when hiding the panel.

Hopefully someone will come and save us all. :)
«1

Comments

  • edited December 2006
    Ok, the firefox bug is fixed. I just added "px" to Content.style.marginLeft = "18px";. The #Content div should now resize in all browser. So lets continue with the next error.

    I reactivated the lines var dm = new DataManager(); dm.LoadData("/ajax/switch.php?Type=HidePanel&Switch=1"); within panelhide.js to see which errors occur. Firebug keeps telling me self.RequestCompleteEvent is not a function and points to line 21 in ajax.js

    Anyone here who can help?
  • bump... this extension would be very popular on my forum..
  • edited December 2006
    Hi circuit,

    Although I made some progress on some smaller bugs (updated it to version 0.1.2), I'm still looking for someone familiar with PHP and vanilla, who is giving it the final touch. As you can see in the Addon description this extension still holds several bugs which I don't know how to fix.

    e.g. I don't know why 'panelhide.gif' will only be hidden in the discussion grid. The other big thing is the margin of #Content.
    When hiding the panel, #Content gets a new margin of 18px instead of the old 235px. When accessing another page or reloading the discussion grid, the panel is hidden (which is intended) but #Content gets his old margin of 235px from the stylesheet.

    PanelHider v.0.1.2 (Alpha)
  • i enabled the plugin in firefox 2 and it caused a weird layout problem. the header has been pushed down to allow for what should be the panelhider buttons. clicking them doesn't do anything.

    image
  • edited December 2006
    Hi circuit,

    could you please check inside the source code of the HTML page, where <div id="HiddenPanel"> <a href="javascript:RevealPanel();">&nbsp;</a> </div> <div id="HidePanel"> <a href="javascript:HidePanel();">&nbsp;</a> </div>gets added to your page?

    Maybe it helps to increase the "101" in line 43 of default.php $Page->AddRenderControl($PanelHider, 101); to a higher number. e.g. 201
  • not working
  • abramelin, as MySchizoBuddy pointed out in JQMedia # 23, just saying "not working" is not in the slightest bit helpful. Please explain how it is not working, what you have done to try and remedy it not working and give a URL to your forum so the author can take a look for common configuration problems. You cannot reasonably expect someone to help you with the comment you have made so far.
  • i have installed the extension correctly but it messed up my style like circuit said.
  • OK, better, thank you. Did you try what Inkscape said in PanelHider extension # 6?
  • yes i tried, i have the same problem with circuit
  • edited May 2007
    I have this working on my local install but am getting a 404 error on looking for /ajax/switch.php. Everything works fine except for this error. Could I delete this line from the panelhider.js or will this be need when I put the extension on my live site?

    I commented the 2 line out and everything works fine locally.
  • why don't you just try putting this into the head tag via nuggets:


    Body {background-image: none;}
    #Panel {display:none;}
    #Content {margin:0 18px 0 Xpx;}


    as someone has suggested somewhere?
  • It works now just fine. No need to do that.
  • this way you canhide the panel only on certain pages leaving it on others
  • I'll have to make a note to myself if I want to do that. Thank you.
  • edited May 2007
    i changed the number as suggested. it moved the control down as expected, but still no button, and the extension still doesn't work. if anyone can work on this, it would be fantastic. i want to try integrate my forum page with wordpress, but for all users to be able to use it comfortably, they'll need to be able to hide the panel when they need to widen the discussion list.
  • Do you have it installed now? Also, you have some script loading problems on the forum.
    <script type="text/javascript" src="/messageboard/./extensions/SmoothPageJump/prototype.lite.js"></script> <script type="text/javascript" src="/messageboard/./extensions/SmoothPageJump/moo.fx.js"></script> <script type="text/javascript" src="/messageboard/./extensions/SmoothPageJump/functions.js"></script>
  • i got this extension working, but when you navigate to another page, it opens up again. Is it supposed to work like this? or is something going wrong
  • You want to look in the default.php file for an IF statement that controls when the panel will be hidden. The following is what I have.
    if (in_array($Context->SelfUrl, array("account.php", "categories.php", "comments.php", "index.php", "post.php", "search.php", "settings.php")) && $Context->Session->UserID > 0) {
    This says that it will only work for users that are logged in and then only on those pages listed. You might need to adjust what you have.
  • edited February 2008
    i believe i have that correct. I am trying to have it stay closed or stay open when i go to another page. as in, i want it to remember the setting the user choose even when navigating into the thread or other pages.
This discussion has been closed.