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

Sorting your panel?

edited August 2006 in Vanilla 1.0 Help
Is there a guide or way to sort the order of the things that are in your panel?
«1

Comments

  • Options
    The things are poisitioned in the extension code. You can try disabling the extensions and re-enabling them in the order you want which will mean they come out in that order *if* they all use the same position number but that's not guaranteed.
  • Options
    MarkMark Vanilla Staff
    Mini is right - the extension author has the power to specify where in the panel the items get added, and typically it will be an arbitrary addition. You can, of course, go in and change the indexes yourself if you are brave.

    Better sorting of these things is one of my big hopes for Vanilla 2 (if that ever happens).
  • Options
    What value has the index that I change?
  • Options
    Could an extension be made (I mean, is it technically possible), which allows admins to set the order of panel items, possibly in a drag and drop stylee ala the Categories preference page?
  • Options
    if you look (usually near the bottom) of the extension file, there will be $Panel->Addstring('something here', INTEGER); I believe. If you change the INTEGER value it'l move it up or down the panel. In theory, yes, Lookhere. Assuming the extension could parse other extension files and rewrite that integer.
  • Options
    I wonder if someone could modify the extension that describes what addon's you are using to help that?
  • Options
    edited August 2006
    Also, looking in the default.php for say who's online, there is nothing there of that nature There is, $Panel->AddList($ListName); But i'm not sure, I don't see anything with $Panel and pointing to a function with an integer. *edit* Well, I added an integer to that and it seems to hav edone the trick :)
  • Options
    Hmm. I'm gonna get a shower and some lunch and if i have some time left before work I think i'll read back through php's file reading/writing functions and put some thought into this one. I have tons of other projects on the go (sorry people i've promised stuff for!) but this one seems quite fun.
  • Options
    Right. I've got something together which will run through the extension file and change the order index for extensions using the AddString method. Nearly got it done for AddList but i need to put a bit more thought into it. Then i need to work out how on earth to make something like the category management page so people can set the order. Give me a couple more years.. ;)
  • Options
    Right. I think it now works on any extensions which add stuff to the panel. Unless theyre doing something totally funky which I havent thought about.
    Anyone care to give me a hand making the page to re-order them?
  • Options
    For anyone who's still interested it's now working! Yay! Needs a bit more work before i release it (perhaps tonight) though.
    And it'l have one bug which i still cant quite work out. It wont be able to re-order extensions whose panel->Add method extends over more than 1 line. That's not such a problem cause it's easy enough to change those extensions but that's not an ideal solution and as yet i cant work out what is.

    I'll be looking for some testers later, though. Please.
  • Options
    Nice one. I'll help you test it. Just have your people send over the NDA to mine, I'll sign it and get it back to you, and we'll go from there ; )
  • Options
    Very happy to test / feedback!
  • Options
    Right. It's all working but i've put in some checking stuff to make it not add new extensions to its config file if theyre already there, and for some reason at the moment it's adding them with an index up to the number of total extensions (extensions which use the panel and extensions which dont), then just repeating that index ad infinitum every time you load the page. That probably doesnt make much sense to any of you but that's where i'm at anyway. Then i need to make it remove extensions from its config when someone disables them. Then i'll release a beta.

    For now i'm going to get drunk. I'll probably have a release up tomorrow if all goes well.
  • Options
    Drinking postponed: it's now correctly updating and ordering extensions. I just have to convince it to remove them from its list when they've been disabled.
    *grabs beer and puts thinking cap on.
  • Options
    Mini, is your extension going to provide the same service for the Panel on the settings page? I hate the disorganized mess that has become. If so, I can't wait for this. I can beta test as well, if you want.
  • Options
    Um. I'm not sure. Not at the moment i dont think but i also dont think it'd be a massive amount of extra work. Maybe for v1.5. Let me get the first ver out.
  • Options
    mini, you are awesome! I am opening a bottle of wine here to celebrate the launch of this extension.
  • Options
    So whilst we're on the topic of panels... if I were to do a three column layout, how do I get items into the 3rd column?

    I've looked at Jazzman's post, but it doesn't actually explain it. Or maybe I'm just silly.
  • Options
    I havent even looked at jazzmans stuff yet. I'll take a peek after v1.5 :P
This discussion has been closed.