Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Evelyne Schreiner 25 posts 74 karma points
    Apr 22, 2012 @ 09:46
    Evelyne Schreiner
    0

    Topic e-mail subscription/unsubscription button problem

    Hello,

    New to Umbraco, I’ve integrated nForum into my first Umbraco website. In general, it’s working and I’ve been able to personalize it a bit, but I still have some problems and need your help.

    Topic e-mail subscription
    If the user click on the button to “unsubscribe” to the topic, problems arise :
    - It’s not possible to “subscribe” again (clicks on the button have no effect) in IE
    - After clicking on “unsubscribe”, posting a new message is working but one is stuck on the “posting your reply” page in IE and Firefox

    It looks like this error in IE, but with same problem in Firefox in some cases :
    http://our.umbraco.org/projects/website-utilities/nforum/general/29631-Getting-javascript-error-when-in-IE,-when-adding-post-or-topic

    Bex has found a solution for the above problem (many thanks for this !) but I cannot find how to handle the problem with “subscribe/unsubscribe)

    Some info missing
    I’ve noticed that some data are not displayed.  Ie in RepeaterItemTopics.ascx

    <%# GetLastPostInfo(FTopic)%> don’t work at all. Is it normal and do I have to get the open-code version of nForum to “activate” it ?

    Forum in secured pages
    The forum is working fine, until I set a role-based secured access on the page it’s embedded in. It don’t display the categories, when logged in.

    Any way to correct this ? (I know I can make the categories “private” but would prefer to not use this as the whole website is secured).

    Thank you,

  • Evelyne Schreiner 25 posts 74 karma points
    May 02, 2012 @ 07:52
    Evelyne Schreiner
    0

    Any idea ?

  • Bex 444 posts 555 karma points
    Dec 11, 2012 @ 12:34
    Bex
    0

    I know this is an old one, but this is the first post I came across when searching for the problem, as I came aross the same thing. I can't upgrade my nforum so if there are any future fixes I couldn't apply it, so instead I did this:

    In the nforumgneral.js file I replaces the clicks for 

    .notsubscribedtotopic

    and

    .subscribedtotopic

    with:

     // Subscribe to topic subscribedtotopic
        $(".notsubscribedtotopic").on("click", (function () {
            SubscribeUnsubscribe($(this));     
        }));
        // UnSubscribe to topic subscribedtotopic
        $(".subscribedtotopic").on("click", (function () {
            SubscribeUnsubscribe($(this));      
        }));
        function SubscribeUnsubscribe(link) {
            var topicid = link.attr('rel');
            link.slideUp('fast');
            if (link.attr('class') == 'notsubscribedtotopic') {
                link.html('Unsubscribe From Topic');
                link.removeClass('notsubscribedtotopic').addClass('subscribedtotopic');
                link.slideDown();
                $.get("/base/Solution/SubScribeToTopic/" + topicid + ".aspx",
                function (data) {
                    var result = $('value', data).text();
                });
                return false;
            } else {
                link.html('Subscribe To Topic');
                link.removeClass('subscribedtotopic').addClass('notsubscribedtotopic');
                link.slideDown();
                $.get("/base/Solution/UnSubScribeToTopic/" + topicid + ".aspx",
            function (data) {
                var result = $('value', data).text();
            });
                return false;
            }
        };

    I think the reason for it is everything is bound on the document ready, so the click event isnt reattached when the class name changes.
    For this reason everytime you click the subscribe/unsubscribe button it will only fire the click event that was bound when the page loads, there for if you click it once to unsubcribe, then decide to resubscribe again without refreshing the page, nothing appears to happen as it's running the "unsubscribe" event again.

    There is a way of stopping it doing this, but I can't work it out right now and have run out of time so hope this helps someone.

    Bex

     

Please Sign in or register to post replies

Write your reply to:

Draft