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

Panel Order 1.2

edited February 2007 in Vanilla 1.0 Help
Please grab it from here to test it. Note the following:

BACKUP YOUR EXTENSIONS DIRECTORY FIRST. This extension completely rewrites all extension files which contain a $Panel-> method though it only alters 1 line. If something goes wrong in the process it will destroy that extension.

THIS IS A BETA. Sorry if the notes above seem a bit scary or fierce, but i've been testing it all the way through development and it's not messed up any of my extension files for quite a while. That doesnt mean it's impossible though. Let me know how it goes.

Also, if someone who's a better coder than me wants to take a look at the code and see if they can make it any more efficient or whatever I'd be glad to adopt their conversions. I dont think it should be too slow cause it's just reading and writing flat files (i avoided using a database) but it does do an awful lot of reading and writing and I'm convinced it should be possible to cut down the number of file calls but it's been a very much add-it-in-as-i-go-along kind of development with lots of re-thinking things in the process so it might not be the best.
«13

Comments

  • Options
    OK. I've taken marks idea and now (i believe) it works fine with ALL panel extensions.

    One thing to note, and I'm hoping mark can come and explain why cause I'm a bit lost, is that it will place the item with position id 001 above the item with position id 000. Make the 001 extension id 002 and it'l work fine though. Wierd.

    Anyone tried this extension yet?
  • Options
    edited August 2006
    I'm trying it but it makes no sense to me,

    it shows in the settings panel re-order but there's nothign there but the phrase panel re-order nothing to drag
  • Options
    Have you installed it and does it add a 'Panel Re-Order' list under the Administrative Options on your settings tab for the forum?
  • Options
    yes I see the panel re-order link and when I click on it it does not show a list
  • Options
    What are the permissions on your conf/extensions.php file? That's what it reads to get the info.
  • Options
    644 should it be something else ?
  • Options
    In that case i really have no idea what's wrong. It'd help if anyone else who used this extension had reported problems, but since so far it's had ~100 downloads and a 5* rating I can only assume that everyone's thought it's the best thing since sliced bread.

    Anyone with similar problems?
  • Options
    MarkMark Vanilla Staff
    edited August 2006
    screen caps always help when narrowing a problem, btw.

    Sometimes our english can be too easily misinterpretted.
  • Options
    Hi Mini, I installed it, enabled it and gave everything the right permissions, but it only shows the actual Panel-Reorder extension in the list for re-order. No others. Odd. Screen caps?
  • Options
    Yeah, a screenshot of what you see when you go to the extension page. As far as i remember, the extension reads your conf/extensions.php file, reads all those extensions to check for any use of a $Panel-> method, then checks that list against the panelextensions.ini file it creates to make sure they match (i.e. no extensions have been added or removed). Then when you move an extension it orders them from 000 to 00N, and rewrites all the position attributes in all the extensions file so they end up in the correct position. Now i could understand if it didnt manage the writing part, but the reading part shouldnt really be any trouble.

    I guess i aught to have put some error collection into this...
  • Options
    edited August 2006
    image

    image

    this is all that is there
  • Options
    Mini: I only want to move the Who's Online extension to the bottom of the control panel; is there something quick and easy that I can put in the default.php to make sure it is at the bottom, at least until I can troubleshoot your Panel-Order extension?
  • Options
    If you open up the default.php of WhosOnline, and locate where it says $Panel->AddList($something, $Position = 'n', $ForcePosition = '1'); and change n to something like 900 it'l probably do the job. I'm curious about the issue a hand though. Can you delete the panelextensions.ini file that the extension has created (presuming it's created one - let me know if it hasnt) and reload that page please bugsmi0? And try enabling/disabling a few extensions?
  • Options
    @ Minesweeper: That worked for me, thanx. But my extension didn't have that line, so I added the $ForcePosition = '500' bit myself. Why did I need to use such a large number? For instance, I have set it to 16 and it moved it only 1 step down.
  • Options
    Dragan, which line did you add that to?
  • Options
    ForcePosition should be either 1 or 0 (yes or no). I've seen various extensions using other numbers and I'm not sure why.

    What do you have set to 16? The Position attribute? If the rest of the extensions are using 100 200 300 etc then a small number will have no effect.
  • Options
    LoOkHerE: Mine is aded to the line 152, it looks like this now: $Panel->AddList($ListName, $ForcePosition = '500');
  • Options
    You need to use $Position = '500' not $ForcePosition.
  • Options
    ok got it working, what I did was disabled all extensions then one by one re-enabled them along with panel reorder and its working now. I wonder if this is something that will have to be done in the future when something doesn't work it doesn't appear that the extensions get refreshed, something to look into
  • Options
    OK, thanks Minesweeper, I'll change that. Anyways, "on topic", the panel extension never worked for me, it is as if my panel is empty. As if I have nothing to shuffle.
This discussion has been closed.