• .ssjs question

    From Scottie@VERT/THE to All on Saturday, April 19, 2008 20:38:00
    i have a simple question.

    is it possible to add a piece of script to a .ssjs file that i have made to only allow age, sex, or user config restrictions/exemption?

    i have made another set of menus from an option off the leftnav and i would like to know if there was a line of script that i can insert into the sub menu(s) so that i can restrict access to those .inc pages.

    example:

    <leftnav>
    who's online
    login
    new user
    message area
    file area
    < Chatrooms > -------< chatroom1 > (general)
    -------< chatroom2 > (special) <----this would be protected
    -------< chatroom3 > (special) <----this would be protected

    if there is a way, will someone post it so that i know what to put in the
    .ssjs file?

    scottie
    the.synchro.net



    ---
    Synchronet The Electrical Connection - the.synchro.net
  • From Mindless Automaton@VERT/ELDRITCH to Scottie on Thursday, May 01, 2008 00:16:00
    Scottie wrote:

    only allow age, sex, or user config restrictions/exemption?

    menu(s) so that i can restrict access to those .inc pages.

    lets see.. you could try something like this in leftnav.inc:

    @@JS:if(user.gender==1)'<a href="@@ftp_url@@%%ftpidx%%">File
    Libraries</a>';@@

    Which would theoretically display the File Libraries link if
    the user's gender is male or whatever 1 equals.

    The others restricts would be something like:

    (user.security.restrictions&UFLAG_G)

    (user.age>=18 && user.age<=21)

    I didn't test them out though, so you may need to mangle it some more.

    -Mindless Automaton
    ---
    Synchronet Eldritch Clockwork BBS - eldritch.darktech.org