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.
Options

Modifying Sidepanel extension to work with Page Manager

edited June 2007 in Vanilla 1.0 Help
Can someone tell me how to modify this line so that the Sidepanel extension panel will appear on custom pages created with the page manager extension? if(in_array($Context->SelfUrl, array("index.php", "categories.php", "discussions.php", "comments.php", "search.php", "post.php", "account.php", "settings.php"))) PS. I am using Friendly URLS, so custom pages appear like: http://www.domain.com/page/Blog . Thanks in advance!

Comments

  • Options
    if(in_array($Context->SelfUrl, array("index.php", "categories.php", "discussions.php", "comments.php", "search.php", "post.php", "account.php", "settings.php", "extension.php"))) should do it i think...
  • Options
    See that's what I thought, but no luck?
  • Options
    You could go for the opposite then and swap the line out for something like: if(!in_array($Context->SelfUrl, array("people.php"))) and include any other pages you *dont* want it to display on in that array...
  • Options
    tryif(isset($Panel))
  • Options
    Weird, both of your codes are working but not if a user is signed-in. Any idea why?
  • Options
    You sure there isnt an if statement somewhere in there checking whether the user is logged in or not?
  • Options
    Hi, another one with same problem. When logged in, sidepanel doesn't appear on pages made with PageManager. Sidepanel shows only when people are not logged. It is interesting, that it works in Vanilla 1.0.1. (I have one not-yet-upgraded Vanilla with same SidePanel and it shows in both cases - logged and not logged) If anyone found a solution, please post it, i would be really thankfull :)
  • Options
    So which if statement combinations are you using at the moment?
  • Options
    edited January 2007
    In my case, I didn't change anything...in default.php (Sidepanel) I have if(in_array($Context->SelfUrl, array("index.php", "categories.php", "discussions.php", "comments.php", "search.php", "post.php", "account.php", "settings.php"))){ $content = <<< ENDCODE and that's it. I have no clue :(
  • Options
    Oh. In that case just swap that if statement out for the one SirNot suggested...
  • Options
    edited January 2007
    thx, but i did't help, same problems... this is current situation: if(isset($Panel)){ $content = <<< ENDCODE <br><font size="-2"> ....
  • Options
    So it works on pagemanager pages for guest users but not members?
  • Options
    yes, so it seems you can check it at http://www.e-participacija.si/kamnik/ (u: test, p: test)
  • Options
    Errr..aside from the fact the wacky language is confusing me it seems to be exactly the same as a member and guest...?
  • Options
    edited January 2007
    hmm, that's weird here are 2 sreenshots taken from my desktop and show the sidepanel difference http://medy.dreamhosters.com/not_logged.png http://medy.dreamhosters.com/logged.png (same page, same sidepanel) @Minisweeper, if i understood you correctly, your computer/browser shows this correctly...?
  • Options
    Ahhh i see...that is a bit strange. Have you tried using the improved sidepanel: http://lussumo.com/addons/?PostBackAction=AddOn&AddOnID=215 ? I dont think there's much difference but it's worth a shot.
  • Options
    i don't know if this will help, but this is an extension i made a while ago for my site, but I never released it. You will have too be able to read threw it and understand it a little to use it.

    <?php /* Extension Name: REImproved Sidepanel Extension Url: http://lussumo.com/docs/ Description: Improved Sidepanel that is fully integrated with the existing Vanilla sidepanel. Based off of Crazyotaku's Improved SidePanel extension. Version: 1.0 Author: y2kbg Author Url: www.zfiles.110mb.com */ $Context->Dictionary['Header1'] = 'ZFiles Home'; $Context->Dictionary['H1L1'] = 'Games'; $Context->Dictionary['H1L2'] = 'Videos'; $Context->Dictionary['H1L3'] = 'Downloads'; $Context->Dictionary['Header2'] = 'Games'; $Context->Dictionary['H2L1'] = 'View All'; $Context->Dictionary['H2L2'] = 'Request Game'; $Context->Dictionary['Header3'] = 'Videos'; $Context->Dictionary['H3L1'] = 'View All'; $Context->Dictionary['H3L2'] = 'Request Video'; $Context->Dictionary['Header4'] = 'Downloads'; $Context->Dictionary['H4L1'] = 'View All'; $Context->Dictionary['H4L2'] = 'My Downloads'; $Context->Dictionary['H4L3'] = 'Linked Downloads'; $Context->Dictionary['H4L4'] = 'Request a Program'; //$Context->Dictionary['Header'] = ''; //$Context->Dictionary['HL'] = ''; $Context->Dictionary['ProfileOptions'] = 'Profile Options'; $Context->Dictionary['Link1'] = 'View Profile'; $Context->Dictionary['Link2'] = 'Personal Info'; $Context->Dictionary['Link3'] = 'Change Password'; $Context->Dictionary['Link4'] = 'MessageBoard Options'; $Header1 = $Context->GetDefinition("Header1"); $H1L1 = $Context->GetDefinition("H1L1"); $H1L2 = $Context->GetDefinition("H1L2"); $H1L3 = $Context->GetDefinition("H1L3"); $Header2 = $Context->GetDefinition("Header2"); $H2L1 = $Context->GetDefinition("H2L1"); $H2L2 = $Context->GetDefinition("H2L2"); $Header3 = $Context->GetDefinition("Header3"); $H3L1 = $Context->GetDefinition("H3L1"); $H3L2 = $Context->GetDefinition("H3L2"); $Header4 = $Context->GetDefinition("Header4"); $H4L1 = $Context->GetDefinition("H4L1"); $H4L2 = $Context->GetDefinition("H4L2"); $H4L3 = $Context->GetDefinition("H4L3"); $H4L4 = $Context->GetDefinition("H4L4"); $ProfileOptions = $Context->GetDefinition("ProfileOptions"); if(in_array($Context->SelfUrl, array("index.php"))){ if(isset($_GET["Page"])){ $currentpage = $_GET["Page"]; switch ($currentpage) { case "zfiles": $Panel->AddList($Header1, 110); $Panel->AddListItem($Header1, $H1L1, GetUrl($Configuration, "?Page=" . strtolower($H1L1), "", "", "", "", ""), "", "", 10); $Panel->AddListItem($Header1, $H1L2, GetUrl($Configuration, "?Page=" . strtolower($H1L2), "", "", "", "", ""), "", "", 20); $Panel->AddListItem($Header1, $H1L3, GetUrl($Configuration, "?Page=" . strtolower($H1L3), "", "", "", "", ""), "", "", 30); break; case "games": $Panel->AddList($Header2, 120); $Panel->AddListItem($Header2, $H2L1, GetUrl($Configuration, "egoryID=5", "", "", "", "", ""), "", "", 40); //$Panel->AddListItem($Header2, $H2L2, GetUrl($Configuration, "?Page=" . strtolower($H2L2), "", "", "", "", ""), "", "", 50); break; case "videos": $Panel->AddList($Header3, 130); $Panel->AddListItem($Header3, $H3L1, GetUrl($Configuration, "?CategoryID=6", "", "", "", "", ""), "", "", 60); //$Panel->AddListItem($Header3, $H3L2, GetUrl($Configuration, "?Page=" . $H3L2, "", "", "", "", ""), "", "", 70); break; case "downloads": $Panel->AddList($Header4, 140); $Panel->AddListItem($Header4, $H4L1, GetUrl($Configuration, "?CategoryID=7", "", "", "", "", ""), "", "", 80); //$Panel->AddListItem($Header4, $H4L4, GetUrl($Configuration, "?Page=" . $H4L4, "", "", "", "", ""), "", "", 110); break; }} else{$Panel->AddList($ProfileOptions, 150); $Panel->AddListItem($ProfileOptions, $Context->GetDefinition("Link1"), GetUrl($Configuration, "account.php", "", "", "", "", ""), "", "", 120); $Panel->AddListItem($ProfileOptions, $Context->GetDefinition("Link2"), GetUrl($Configuration, "account.php?PostBackAction=Identity", "", "", "", "", ""), "", "", 130); $Panel->AddListItem($ProfileOptions, $Context->GetDefinition("Link3"), GetUrl($Configuration, "account.php?PostBackAction=Password", "", "", "", "", ""), "", "", 140); $Panel->AddListItem($ProfileOptions, $Context->GetDefinition("Link4"), GetUrl($Configuration, "account.php?PostBackAction=Functionality", "", "", "", "", ""), "", "", 150); }} ?>
  • Options
    edited June 2007
    Hi, Any updates to this issue? I'm back to using vanilla and still have problems with this combination (side panel and Page manager - side panel doesn't show on custom pages) Vanilla 1.1.2 Side panel version 1.0 Page manger 2.4.5 test forum at: http://www.e-participacija.si/kamnik2/
This discussion has been closed.