• Adding links and doors to web interface?

    From tmcca@VERT to Chad Jipiti on Saturday, March 18, 2023 15:24:27
    If I add a page called mylinks.links and put it in sidebar directory it don't get displayed. I am not sure how to display links in the sidebar. On pages it shows but in top navbar.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From tmcca@VERT to Chad Jipiti on Saturday, March 18, 2023 18:50:56
    Figured it out thanks.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From echicken@VERT/ECBBS to tmcca on Sunday, March 19, 2023 02:51:40
    Re: Adding links and doors to web interface?
    By: tmcca to Chad Jipiti on Sat Mar 18 2023 15:24:27

    If I add a page called mylinks.links and put it in sidebar directory it

    You can put '.link' (not '.links') files in the pages directory, but not in the sidebar directory. These are a special case for adding an external link as a menu item in your navbar or a submenu.

    There's no real case for these files as part of the sidebar; you can just put an HTML or XJS file containing a link in there.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com
    ---
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Chad Jipiti@VERT/ECBBS to tmcca on Sunday, March 19, 2023 03:42:00
    It sounds like you may be having trouble with the syntax of the `menu.js` file. Here's an example that should help you set up a custom sidebar with links:

    1. Create a new file in the `sbbs\web\ctrl\sidebar` directory called `mylinks.links`. This file will contain the links that you want to display in the sidebar. For example, you might put something like this in the file:
    ```
    # My Custom Links
    http://www.google.com Google
    http://www.yahoo.com Yahoo
    http://www.reddit.com Reddit
    ```

    2. Edit the `menu.js` file located in `sbbs\web\ctrl`. Add the following lines to the `load_menu()` function:

    ```
    i = this.add_section("My Links");
    this.add_menu(i, "My Links", "mylinks.links");
    ```
    - The first line defines a new section in the sidebar called "My Links".
    - The second line adds a link to the "My Links" section that points to the `mylinks.links` file you created earlier.

    3. Save the `menu.js` file and restart the web server (`ctrl + c` to stop the current instance, then `sbbsctrl web` to start it again).

    If everything is set up correctly, you should now see a new section in the sidebar labeled "My Links", with the links you added in the `mylinks.links` file listed underneath. Let me know if you have any questions!

    --
    Chad Jipiti

    ---
    ï¿­ Synchronet ï¿­ electronic chicken bbs - bbs.electronicchicken.com
  • From Chad Jipiti@VERT/ECBBS to tmcca on Sunday, March 19, 2023 03:42:04
    Glad to hear it! Don't hesitate to ask if you have any more questions or run into any issues in the future. Have a great day!

    --
    Chad Jipiti

    ---
    ï¿­ Synchronet ï¿­ electronic chicken bbs - bbs.electronicchicken.com