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.

Differant panel links for each page.

y2kbgy2kbg New
edited November 2006 in Vanilla 1.0 Help
How can I have a differant set lists and links for each page I make using the page manager. I am using the improved panel extension to edit the links but when I try to specify which page, all of the custom pages fall under index.php.

Comments

  • edited November 2006
    The sidepanel extensions only display 1 set of links for all pages or pages that you specify, so maybe there is a way to do what you want to do but I woudln't know how to do it lol. There's a way you could but it's a horrible way that will probably slow down your forum. Install multiple sidepanel extensions that way you have different sets of links for each page you want. I wouldn't recommend it though. Just curious why you want different links for different pages?
  • y2kbgy2kbg New
    edited November 2006
    i am using the panel as a sort of secondary navagation. It would be sublinks of the page it is on currently. Couldnt i revise the sidepanle extension and add another if statment that looks at the, i am not sure what it called but the varible that is stored in the url, and adjust the links by that?
  • The variable you need is $Context->SelfUrl, and yes, you could quite easily :)
  • That works for most pages but... All of the pages created by PageManager all have the same $Context->SelfUrl.
  • In that case check the postbackaction.
  • ok here is what i have: <?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 Copyright 2003 - 2005 Mark O'Sullivan This file is part of Vanilla. Vanilla is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Vanilla is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Vanilla; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA The latest source code for Vanilla is available at www.lussumo.com Contact Mark O'Sullivan at mark [at] lussumo [dot] com */ /* Cut & paste these language definitions into your conf/your_language.php file */ $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['H2L2'] = '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'] = ''; $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"); if(in_array($Context->SelfUrl, array("index.php"))){ $currentpage = $_REQUEST["Page"]; switch ($currentpage) { case "zfiles": $Panel->AddList($Header1, 110); $Panel->AddListItem($Header1, $H1L1, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H1L1, "", "", "", "", ""), "", "", 10); $Panel->AddListItem($Header1, $H1L2, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H1L2, "", "", "", "", ""), "", "", 20); $Panel->AddListItem($Header1, $H1L3, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H1L3, "", "", "", "", ""), "", "", 30); break; case "games": $Panel->AddList($Header2, 120); $Panel->AddListItem($Header2, $H2L1, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H2L1, "", "", "", "", ""), "", "", 40); $Panel->AddListItem($Header2, $H2L2, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H2L2, "", "", "", "", ""), "", "", 50); break; case "videos": $Panel->AddList($Header3, 130); $Panel->AddListItem($Header3, $H3L1, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H3L1, "", "", "", "", ""), "", "", 60); $Panel->AddListItem($Header3, $H3L2, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H3L2, "", "", "", "", ""), "", "", 70); break; case "downloads": $Panel->AddList($Header4, 140); $Panel->AddListItem($Header4, $H4L1, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H4L1, "", "", "", "", ""), "", "", 80); $Panel->AddListItem($Header4, $H4L2, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H4L2, "", "", "", "", ""), "", "", 90); $Panel->AddListItem($Header4, $H4L3, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H4L3, "", "", "", "", ""), "", "", 100); $Panel->AddListItem($Header4, $H4L4, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H4L4, "", "", "", "", ""), "", "", 110); break; }} ?> it works exept when i goto the discussions tab, my web address with not varible to "request so i get this notice at the top of my page: Notice: Undefined index: Page in /www/110mb.com/z/f/i/l/e/s/_/_/zfiles/htdocs/Vanilla/extensions/SidePanelImprovedAgain/default.php on line 63 it doesnt hurt anything, but it looks really bad, how can i get rid of it. i will make this a formal extension asap(acople of days) if i can get that one bug fixed. does anyone even want to use this?
  • so does this extension your working on display different links in the sidepanel on different pages? If so you might want to rename it so it's not misleading, since poeple will think it's just a better version of the sidepanel extension when it's more like a mod of it that does something extra that not everyone will need.
  • yea i have to Change some of the info and replace all of my specific information with generic fill in ones. How hard is it to make it changeable with a visual interface on a page under settings?
  • OK i fixed that one problem no no error at all: <?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 Copyright 2003 - 2005 Mark O'Sullivan This file is part of Vanilla. Vanilla is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Vanilla is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Vanilla; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA The latest source code for Vanilla is available at www.lussumo.com Contact Mark O'Sullivan at mark [at] lussumo [dot] com */ /* Cut & paste these language definitions into your conf/your_language.php file */ $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'] = ''; $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"); 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, "http://zfiles.110mb.com/Vanilla/?Page" . $H1L1, "", "", "", "", ""), "", "", 10); $Panel->AddListItem($Header1, $H1L2, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H1L2, "", "", "", "", ""), "", "", 20); $Panel->AddListItem($Header1, $H1L3, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H1L3, "", "", "", "", ""), "", "", 30); break; case "games": $Panel->AddList($Header2, 120); $Panel->AddListItem($Header2, $H2L1, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H2L1, "", "", "", "", ""), "", "", 40); $Panel->AddListItem($Header2, $H2L2, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H2L2, "", "", "", "", ""), "", "", 50); break; case "videos": $Panel->AddList($Header3, 130); $Panel->AddListItem($Header3, $H3L1, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H3L1, "", "", "", "", ""), "", "", 60); $Panel->AddListItem($Header3, $H3L2, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H3L2, "", "", "", "", ""), "", "", 70); break; case "downloads": $Panel->AddList($Header4, 140); $Panel->AddListItem($Header4, $H4L1, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H4L1, "", "", "", "", ""), "", "", 80); $Panel->AddListItem($Header4, $H4L2, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H4L2, "", "", "", "", ""), "", "", 90); $Panel->AddListItem($Header4, $H4L3, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H4L3, "", "", "", "", ""), "", "", 100); $Panel->AddListItem($Header4, $H4L4, GetUrl($Configuration, "http://zfiles.110mb.com/Vanilla/?Page" . $H4L4, "", "", "", "", ""), "", "", 110); break; }}} ?>
This discussion has been closed.