1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Show Hide Node Blocks

Discussion in 'Add-on Releases [Archive]' started by Cezz, Oct 8, 2010.

  1. Cezz

    Cezz Well-Known Member

    I was asked to create a simple modification that would allow for the categories in the forum home to be expanded/contracted.

    This is what I have created. I hope you like it, any questions please just ask.

    The entire process is pure JS and has only been tested on the default template if you changed some parts of the template you may stop this working completely OR stop the session being recorded and so the show/hides don't save between page loads.

    Some Screens

    screen1-expanded.png screen2-collapsed.png


    UPDATES - Version History

    • v1.0.0 - Initial Build
    • v1.1.0 -
      • Fixed - Issue with cookie array meaning that wrong element would get removed.
      • Fixed - Added phrases to the master template.

    The idea for the mod came from Forsaken and I must note that disjunto was a great help in fixing some issues.

    Attached Files:

  2. Sir nick

    Sir nick Well-Known Member

    Installed for sure :)
    Ceri May likes this.
  3. EQnoble

    EQnoble Well-Known Member

    Exactly how I saw it in my head... Awesome adding tonight for a nice trial run of it. Thanks Ceri May!
    Ceri May likes this.
  4. RickM

    RickM Well-Known Member

    Great addon Ceri...Thanks!! :)
    Ceri May likes this.
  5. Forsaken

    Forsaken Well-Known Member

    Way not to mention the person who told you to make it ;(.

    You can't place the any divs around the category/forum, otherwise it won't work properly.
  6. CFodder

    CFodder Well-Known Member

    Great mod, wondered why it wasn't included in the core, but I guess it will be added at some stage :).
  7. Edrondol

    Edrondol Well-Known Member

    If I could like this more than once I would. Awesome job! This should be default on Gold.
    Russian likes this.
  8. fattony69

    fattony69 Well-Known Member

    This should be default, but thanks for this. I wanted this!
    Mikey likes this.
  9. iCafe

    iCafe Member

    good job.
  10. nora

    nora Member

    I think the same.
  11. Forsaken

    Forsaken Well-Known Member

    By 'help' he means disjunto did all the hard work ;p.
    Mikey and Jeremy like this.
  12. RvG

    RvG Active Member

    Should be by default right?
    gamecock likes this.
  13. Cezz

    Cezz Well-Known Member

    Cheeky sod :)... though I must admit that Disjunto was a key factor in its completion..

    For example couldn't call the categories ID's directly as li#some-cat.4 because of the number and I had to change this to li[id="some-cat.4"] if it wasn't for Disjunto I would never have worked this out so thank you very much.
  14. Cezz

    Cezz Well-Known Member

    Personally I think it could be a default feature but if it is not this plugin is very lightweight.
  15. Shanj

    Shanj Well-Known Member

    I agree this should be core.

    Ceri any idea what sort of template changes would stop this working?
    (I have a lot of template changes in mind but they are moving buttons about or changing fonts mostly.)
  16. Cezz

    Cezz Well-Known Member

    Mostly adding or removing divs around the Node blocks... if it does break it let me know and I may be able to make some changes for you.
  17. Miko

    Miko Well-Known Member

    Damn, spent ages coding my own version.
    My version as several extra feature like a close all, open all and dynamically knows when everything is open or close..

    But your version is so lightweight! Really well done for only a few lines of code :)

    Here is a video of the version I'm working on... I need to "trim some fat" before releasing it.
    Rob Fritz and EQnoble like this.
  18. Cezz

    Cezz Well-Known Member

    Nice version, I did actually have a show/hide all in mind also and I believe it would only take like about 3-4 more lines to add it but then main objective of the code was to be as small as possible.
  19. Forsaken

    Forsaken Well-Known Member

    Now you just need to make that subforum one :p.
    Ceri May likes this.
  20. RvG

    RvG Active Member

    and that makes sense.. thanks for sharing.

Share This Page