Hidden Application

classic Classic list List threaded Threaded
68 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

GregChapman
GregChapman wrote
That seems as good as we can get until there a method for remembering where a user logged out from. However, I'll leave it there for now so you can get on with handling other requests.
I think I need to withdraw that! Though I'm not sure about the best solution!

Just had some registration emails indicating suspicious addresses that needed banning. I clicked the link in them that takes me to the profile page and then to the "Ban User" page.

I had forgotten that the Ban User screen is another of those which instantly takes you to the forum root with no way out, given that the root link at the top left has been removed. :-(

Have you any suggestions?
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

Pedro
Ok, but the user who can't go to the root forum has access to the ban page?
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

GregChapman
Yes! I'm the user who can't go to the root page.

I am logged in to the forum as Administrator. I receive an email announcing a new registration. It has an obvious spammers email address so I use the link in the email to go to direct to his profile page and ban him. The Profile page is always associated with the root of the forum, but without the root link I have no way of exiting the "Ban Confirmation" screen to return to the forum home page.

In fact it's difficult to exit from any of the administrator screens and this issue will affect all other users too. For example the only exit from my own Profile page is to open the "Posts in xxxxx" tab and pick one of them. On many screen the only way is to logout and log in again - unless one refreshes the host page in which the forum is embedded.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

Pedro
I understood, but my questions is: since ban users can only be seen by admins, would it be a problem? Can admins see the root forum?
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

GregChapman
I have a special unlinked URL that I use to reach the root page, when I want to get to the menu options that are only available from the root page. In my case, I have two separate embedded sub-forums, so another way out is to click the link to the other page on the main site's menu, but this is hardly ideal.

Part of the reason for being fussy is that I feel I am acting as tester for a generic set of modifications that could easily be plugged into other forums when people ask for a way to embed to separate application that have a common registration/membership system. I have seen a number of such requests over the last year.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

Pedro
Greg, do you remember where have we stopped in this issue?
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

GregChapman
Thanks for bumping this back to the top.

I'm snowed under with other stuff this week.

Hope to to get back to you on this and the "Prev-Next" buttons in a gallery facility early next week. (Forgotten whether I've tested your latest enhancement!)
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

GregChapman
Hi Pedro,

To recap...
The General Aim: is to give forum administrators a way to create a number of separate applications where registration on any one application also registers the user at all the others.

In the case we are implementing this on ( http://www.rustonreaches.plus.com/ ), I have main site which includes main menu options labelled "Blog" (a News application) and "Forum" (a Mixed application). These are both sub-forums of a single application each embedded in their own pages on the main site and so have a common set of registered users.

I have set registered users only to be able to comment on my posts on the Blog but on the Forum also to be able to create new topics. In addition, the Mixed application has sub-forum (a Forum application). This is intended to be invisible to registered users and only accessible to those placed in the "Shareholders" group.

So far, we have added/edited macros to hide the root application from the breadcrumb menu. In most situations this hides the fact that the blog and forum have a common parent application. However, we have found a number situations in which it is possible for users to find themselves at the root level. This is undesirable because it is then possible for users to navigate from blog to forum and vice versa while the main site menu remains static and doesn't reflect their new location within the Nabble application.

So far I am aware that users can access the root application by:
• Logging out
• Visiting a User's Profile page.
There may be other cases that I haven't discovered yet.

Task #1: We need to trap all cases and find a way to return users to the sub-application from which they arrived at the log-out and Profile screens.

In addition, I have discovered that the methods used (Appropriate permissions and the "Smart application pages" option) to fully hide the "Shareholders Area" do not work except when the hidden application is immediately below the root level.

(I have a number of unused sub-forums set up at the root level and these are successfully hidden from all except Administrators - I am also aware that there is another issue connected with Smart application pages - though this doesn't affect my current test case. Smart application pages only work with certain applications. I know it works with "Mixed", but I am not clear which other types accept this option. It would be useful if you could confirm those applications for which it does work. Up till now I have been circumspect when advising people on the Free Support forum).

Task #2: We need to make Smart application pages work at lower levels than sub-forums of the root application.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

Pedro
Greg, please, test this code to fix the logout issue, you can create a file on your advanced editor and paste it:
<override_macro name="js_header_functions" requires="servlet">
    var t_login = "<t>Login</t>";
    var t_register = "<t>Register</t>";
    var t_logout = "<t>Log out</t>";
    var t_my_starred_items = "<t>My starred items</t>";
    var t_my_posts = "<t>My posts</t>";
    var t_account_settings = "<t>Account settings</t>";
    var t_show_nabble_notice = "<t>Show Nabble notice</t>";
    var t_permalink = "<t>Permalink</t>";
    var t_refresh = "<t>Refresh</t>";
    var login_path = "<n.login_path/>";
    var logout_path = "<n.logout_path/>";
    var register_path = "<n.register_path/>";
    var starred_nodes_path = "<n.starred_nodes_path/>";
    var user_profile_path = "<n.user_profile_path/>";
    <![CDATA[
    Nabble.userId = Nabble.getCookie("userId");
    var encodedUsername = Nabble.getCookie("username");
    if (encodedUsername) {
        Nabble.username = decodeURIComponent(encodedUsername)
            .replace(new RegExp('\\+','g'),' ');
    }

    if (!Nabble.userId) {
        Nabble.anonymousId = Nabble.getCookie("anonymousId");
        var encodedName = Nabble.getCookie("anonymousName");
        if (encodedName) {
            Nabble.anonymousName = decodeURIComponent(encodedName)
                .replace(new RegExp('\\+','g'),' ')
                .replace(new RegExp('<','g'),'&lt;')
                .replace(new RegExp('>','g'),'&gt;');
        }
    }

    Nabble.embedPermalink = function(url) {
        if (!Nabble.isEmbedded)
            return url;
        return url.replace(/(;|&)cid=(\d|\-)+/g, '').replace(/\?cid=(\d|\-)+(&)?/g, '?');
    };

    Nabble.getPermalink = function() {
        return Nabble.embedPermalink(
            Nabble.overridePermalink? Nabble.overridePermalink : Nabble.getParent().nabbleiframe.location.href);
    };

    Nabble.permalinkLabel = function() {
        if (!Nabble.isEmbedded)
            return '';
        var p = "<script>function openPermalink() { prompt('Copy this:', Nabble.getPermalink()); };</script>";
        p += "<a href='javascript: void openPermalink();'>"+t_permalink+"</a>&nbsp;&nbsp;";
        return p;
    };

    Nabble.refreshLabel = function() {
        if (Nabble.isEmbedded)
            return "<a href='javascript: location.reload(true);'>"+t_refresh+"</a>&nbsp;&nbsp;";
        return '';
    };

    Nabble.siteHeader = function() {
        var s = Nabble.refreshLabel();
        s += Nabble.permalinkLabel();
        if (!Nabble.userId) {
            var nextUrl = typeof loginNextUrl == 'undefined'? window.location.href : loginNextUrl;
            s += '<a href="'+login_path+'&nextUrl='+encodeURIComponent(nextUrl)+'">'+t_login+'</a>';
            s += '&nbsp;&nbsp;';
            s += '<a href="'+register_path+'&nextUrl='+encodeURIComponent(nextUrl)+'">'+t_register+'</a>';
            if (Nabble.anonymousId && Nabble.anonymousName) {
                s += '&nbsp;&nbsp;';
                s += '<a href="/template/NamlServlet.jtp?macro=user_nodes&user=' + Nabble.anonymousId + '~' + Nabble.anonymousName + '">';
                s += Nabble.anonymousName;
                s += '</a>';
            }
        } else
            s += '<span id="user-dd"></span>';
        return s;
    };

    Nabble.userDropdown = function() {
        var $t = $('#user-dd');
        if ($t.size() == 0)
            return;
        $t.empty();
        var dropdown = new NabbleDropdown('usrdd', Nabble.escapeHTML(Nabble.username));
        dropdown.add('starred','<a href="'+starred_nodes_path+'">'+t_my_starred_items+'</a>');
        dropdown.add('myPosts','<a href="/template/NamlServlet.jtp?macro=user_nodes&user='+Nabble.userId + '">'+t_my_posts+'</a>');
        dropdown.add('personalSettings','<a href="'+user_profile_path+'">'+t_account_settings+'</a>');
        dropdown.add('adminNotice','<a href="javascript: void Nabble.showAdminNotice()">'+t_show_nabble_notice+'</a>','display:none');
        dropdown.add('logout','<a href="javascript: void Nabble.logout()">'+t_logout+'</a>');
        $t.html(dropdown.getHtml());
        dropdownInit('usrdd');
    };

    Nabble.addUserHeaderListener(function() {
        Nabble.userDropdown();
    });

    Nabble.showAdminNotice = function() {
        Nabble.deleteCookie('admin-notice');
        window.location.reload();
    };

    Nabble.logout = function() {
        window.location = '/template/NamlServlet.jtp?macro=logout_page'+'&nextUrl='+ encodeURIComponent(window.location.href) + Nabble.getClientID();
    };
    ]]>
</override_macro>

<override_macro name="logout_page" requires="servlet">
    <n.dont_cache/>
    <n.do_logout/>
    <n.html>
        <head>
            <n.title.><t>You logged out</t></n.title.>
            <script type="text/javascript">
                <n.comment.>
                    If the nabblecookies iframe is available, we have to force a reload of cookies in the parent page.
                    (this is valid only when third-party cookies are disabled)
                </n.comment.>
                if (parent.nabblecookies) {
                    parent.nabblecookies.location = "/util/Empty.jtp";
                    Nabble.deleteCookie('userId');
                    Nabble.deleteCookie('username');
                    Nabble.deleteCookie('password');
                }
                Nabble.setVar('userId', null);
                Nabble.setVar('username', null);
                Nabble.setVar('password', null);

                var loginNextUrl = "<n.get_parameter name='nextUrl'/> ";

            </script>
        </head>
        <body>
            <h1><t>You logged out</t></h1>

            <p><t>If you logged out by mistake, please <a id="login-link" href="[n.get_next_url/]">log in again</a>.</t></p>
            

            <br/>
            <br/>
        </body>
    </n.html>
</override_macro>

<macro name="get_next_url" >
    <n.login_path nextUrl="[n.get_parameter name='nextUrl'/]" />
</macro>
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

Pedro
This post was updated on .
In reply to this post by GregChapman
About the User's profile page, I replaced the root link with a "back button". Please, test it in your embedded site:
<override_macro name="user_nodes" requires="servlet">
    <n.user_page.>
        <n.html>
            <head>
                <script type="text/javascript">
                    $( document ).ready(function() {
                    $('#breadcrumbs').html("<a href='javascript:void(0)' onclick='history.go(-1);'>Back</a>");
                    });                   
                </script>
                
                <n.user_nodes_meta/>
                <n.title.>
                    <t>Profile of <t.author.page_user.name/></t>
                    <n.hide_if_equals. value1="[n.user_nodes_page_number/]" value2="1">
                        | <t>Page <t.number.user_nodes_page_number/></t>
                    </n.hide_if_equals.>
                </n.title.>
                <style type="text/css">
                    table.nodes {
                        width:100%;
                        border-collapse:collapse;
                    }
                    table.nodes td {
                        padding:.3em;
                    }
                    table.nodes td.header {
                        padding: .2em;
                        font-weight:bold;
                    }
                    div.table-title {
                        font-weight:bold;
                        font-size:120%;
                        margin: 1em .1em 1em;
                    }
                </style>
            </head>
            <body>
                <n.page_user.profile_header/>

                <n.user_nodes_search_box/>

                <!-- If this is the profile of the visitor -->
                <n.if.visitor.equals.page_user>
                    <then>
                        <n.horizontal_tab_control.>
                            <n.add_horizontal_tab url="[n.starred_nodes_path/]" text="[n.small_star_icon/] [t]Stars in [t.location.root_node.subject/][/t]" selected="false" details=""/>
                            <n.add_horizontal_tab url="" text="[t]Posts in [t.location.root_node.subject/][/t]" selected="true" details=""/>
                        </n.horizontal_tab_control.>
                    </then>
                    <else>
                        <div class="second-font table-title">
                            <t>Posts in <t.location.root_node.subject/></t>
                        </div>
                    </else>
                </n.if.visitor.equals.page_user>

                <n.user_nodes_table.>
                    <n.date_column width="7em"/>
                    <n.subject_column/>
                    <n.count_column/>
                    <n.location_column/>
                </n.user_nodes_table.>
            </body>
        </n.html>
    </n.user_page.>
</override_macro>
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

GregChapman
In reply to this post by Pedro
Hi Pedro,
Pedro <Nabble> wrote
Greg, please, test this code to fix the logout issue, you can create a file on your advanced editor and paste it:
No problems found so far with the logout code. Thanks!
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

GregChapman
In reply to this post by Pedro
Hi Pedro,
Pedro <Nabble> wrote
About the User's profile page, I replaced the root link with a "back button". Please, test it in your embedded site:
The "Back" link appears when looking at other people's profiles, but not on your own.

There's still no way out should you wish to change your Avatar or Signature, or check your starred posts, etc.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

Pedro
I thought in another approach. Add this to your css:
.breadcrumbs span a:first-child, .breadcrumbs span:nth-child(2) {
display: none;
}
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

GregChapman
Hi Pedro,

That's the wrong way round. It removes the "Back" links that I want, but doesn't add the link when viewing your own profile.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

Pedro
Please, remove this override, and add this one:
<override_macro name="javascript_library" requires="servlet">
    <n.overridden/>
    <n.comment.>
        Adding "Back" Button.
    </n.comment.>
    <n.compress.>
        $( document ).ready(function() {
        var title = document.title;
        
        if(title.search( 'Edit Personal Information' ) >= 0 )
        profileLink();
        if(title.search( 'Change Avatar' ) >= 0 )
        profileLink();
        if(title.search( 'Advanced Settings' ) >= 0 )
        profileLink();
        if(title.search( 'Remove Your Account' ) >= 0 )
        profileLink();
        if(title.search( ' Edit Signature' ) >= 0 )
        profileLink();               
        
        if(title.search( 'Profile of' ) >= 0 )
        backButton ();
        if(title.search( 'Stars in' ) >= 0 )
        backButton ();
        
        function profileLink () {
        $('.breadcrumbs span').html("<a href='/template/NamlServlet.jtp?macro=user_profile' style='display:inline !important;'>Back</a>");
        }
        
        function backButton () {
        $('.breadcrumbs span').html("<a href='javascript:void(0)' onclick='history.go(-1);' style='display:inline !important;'>Back</a>");
        } 
        
});

    </n.compress.>
</override_macro>
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

GregChapman
Thanks Pedro! That version seems to do the trick...

On to Task #2....

 
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

Pedro
Could you remind me the task #2 ?
I'm not sure, but I guess it is when a sub-forum is a smart application it was showing its lower levels sub-forums even though they were private or hidden, is that right?
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

GregChapman
Got it!

As described in this post.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

GregChapman
Hi Pedro,

Since what I think of as the big cock-up upgrade of a couple of weeks back, my forum at:
http://ruston-reaches.1088553.n5.nabble.com/
seems to have repeatedly lost and found various bits of its customisations.

Currently, I don't have the hidden root forum on the breadcrumb menu and regardless of "wide/narrow" setting I always get a sidebar to the sub-forum at:
http://ruston-reaches.1088553.n5.nabble.com/Ruston-House-Blog-f17.html
(I want the sidebar turned off!)

Can you investigate please.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Hidden Application

GregChapman
Hi Pedro,

After some further investigate it seems that if I apply the "Narrow" setting it appears to take but returns the colour scheme to the default setting in grey. If I then re-apply my preferred colour scheme (to match the main site) that takes and retains the "Narrow" view.

However, when I click the "Close" button on the formatting toolbar after making these edits after the "Loading" message disappears the "Narrow" format is lost again, while retaining the colour scheme.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
1234