Copied to clipboard

Flag this post as spam?

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


  • Josh Olson 79 posts 207 karma points
    Mar 30, 2015 @ 15:53
    Josh Olson
    0

    A couple possible additions.

    First off, thanks for the great package! I was looking for something just like this, a simple forum that I can quickly integrate without all the hoopla of something as feature-rich as Dialogue. I just need something simple for an internal forum and Dialogue, for as awesome as it is, is just overkill sometimes.

    Now, there are a couple things I am trying to work out adding that would really complete this project for me and perhaps you have a suggestion or two.

    Search. I figure that I will just create an Examine index and searcher to deal with this, but seeing as how you are already doing work with caching, I wonder if that is the best approach?

    Subscribe. I imagine that an extra textstring property with a comma separated list of user id's could be added that would also get parsed somewhere just before or after the loop that gets all the authors in GetRecipients so that it is returned along with all the participants. Do you have any thoughts on the matter?

    Cheers!

  • Kevin Jump 1447 posts 9347 karma points MVP 3x c-trib
    Mar 30, 2015 @ 20:40
    Kevin Jump
    1

    Hi

    glad you like it, for me it was getting a forum running when you already have the things like users and stuff already done.

    Search

    Yes i would say Examine makes sense, the caching in the forums is really just the counts and last post dates, just so the lists can be shown quickly - examine will do a better job at search than you could hope to do on your own.

    Subscribe

    Yes i would add a property to the post/forum, That could take the membership IDs. Then using the OnPostSaved event you could fire anything you want off. You get passed an IContent object so you can go up the tree to the top post and get any subscribers from your additional property.

    The basics of this are in the notification Manager (see ForumNotificationMgr.cs in app_code) - the thing to note is that the events pass you an IContent object which is the DB back office object. If you are doing any traversing you should swap over to an IPublishedContent object and then it's not hitting the db all the time (NotificationMgr does this) - but it's certainly the way i would go.

    Would be great if you add this and we could add it to the project over on github https://github.com/KevinJump/Jumoo.Simpily

  • keilo 558 posts 1013 karma points
    Jul 23, 2015 @ 05:15
    keilo
    0

    Thanks for sharing this elegant forum package.

    I set it up and gone through create/edit/delete post tests and it works fine, the intial loading of the forum page gets a bit slow but I believe thats not related to the caching logic place but more of the IIS i was testing.

    Regarding the NotificationEmail, does it send any notification at all? There is certainly some functionality thought in NotificationManager but Im not really sure if it sends any notification/email in its current form.

    I was thinking of using a very simple notification email functionality, not well-versed enough to collect comma separated member ids and parse through them (yet), so my question what would be "easiest" way to get a basic notification email working?

    Thanks again!

  • Kevin Jump 1447 posts 9347 karma points MVP 3x c-trib
    Jul 23, 2015 @ 08:45
    Kevin Jump
    1

    Hi, glad you like it so far, and it's working : )

    There is some basic notification stuff and it will send emails to the people in a thread if your site is has the <mailSettings> section setup in your web.config file: basically you need to put a mail server in here.

     <system.net>
        <mailSettings>
          <smtp>
            <network host="127.0.0.1" userName="username" password="password" />
          </smtp>
        </mailSettings>
      </system.net>
    

    If you want to take it further the current notifications in the forums, are in the ForumNotificationMgr.cs file in the app_code/simpilyforums folder, this probably has the code for go through members that you need.

    The notification manager is also an example of how to extend the forums, it hooks into the Forums own OnPostSaved event, which gives you a place to do things when a post is saved on the site.

    there is also a OnNewPost event, which fires before the post is published. this gives you the chance to do stuff like spam check or approvals. (i.e things not built in to the package)

  • keilo 558 posts 1013 karma points
    Jul 23, 2015 @ 09:49
    keilo
    0

    Many thanks for the swift reply and pointing out the OnNewPost event. I really appreciate the source code and comments (like getting member property pre 7.2 - which I faced and found the sln within the tracker and also noticed you've already used that method). I learned a lot from it and events doesnt look that scary all of a sudden : )

    I have the SMTP configured and I wasnt getting any emails, where I had a main post (root) created by user1@acme.com and all the replies underneath was from user2@acme.com - which was being removed (as authour/recipient)in the relevant function you've added.

    When the collect email recipient function is called i think it omits the root node's recipient;

     List<string> GetRecipients(IPublishedContent item, MembershipHelper mbrHelper)
    {
        List<string> recipients = new List<string>();
    
        foreach(var childPost in item.Children().Where(x => x.IsVisible()))
        {
            var postAuthorEmail = GetAuthorEmail(childPost, mbrHelper);
            if (!string.IsNullOrWhiteSpace(postAuthorEmail) && !recipients.Contains(postAuthorEmail))
            {
                LogHelper.Info<ForumNotificationMgr>("Adding: {0}", () => postAuthorEmail);
                recipients.Add(postAuthorEmail);
            }
        }
        return recipients;
    }
    

    In the code above, only children of root node gets parsed and the original poster's address doesnt make to the list (i think); ie. item.Children()

    Regarding adding additional functionality, I really wanted to add profanity filter and added one manually on post display View; based on the code from :

    So if one wants to integrate such call like ProfanityFilter(post.bodyText) to filter certain words with * what would be the most ideal approach in your opinion?

    Cheers!

  • keilo 558 posts 1013 karma points
    Jul 23, 2015 @ 09:52
    keilo
    0

    missed the link of the code i used for profanity filter :

    https://bitbucket.org/vertino/profanity-filter-for-umbraco

  • Kevin Jump 1447 posts 9347 karma points MVP 3x c-trib
    Jul 23, 2015 @ 10:12
    Kevin Jump
    1

    Yeah it does look like it's missing the main author. - thanks I'll update the code in the package.

    For profanity i would create a class similar to the notification manager that listens for the OnNewPost event, then when it fires that you have get the SimpilyForumsPostModel which has a body and title, content, so you can test against profanity etc...

    I suppose it's just a big list of does this string contain any of these words, and substitute them out? you could make your list a dictionary item in umbraco, then call umbracoHelper.GetDictionaryValue(thing) to get it, that way you could control the live via the interface?

    If you really don't like the post you can set the event.cancel value, and the post won't make it to umbraco.

  • keilo 558 posts 1013 karma points
    Aug 27, 2015 @ 07:21
    keilo
    0

    Hi Kevin

    I have re-used the XML-based profanity filter from the code, re-factored, https://bitbucket.org/vertino/profanity-filter-for-umbraco Using Dictionary UI within umbraco may not be practical, but then again i havent used dictionary before so will definitely take a look at your advised approach.

    One of the main possible addition is how to neatly integrate reply to a post or quote a post, as the actions are currently delete or edit. Is there an easy way to activate this? Would love to hear your thoughts on this.

    cheers

  • keilo 558 posts 1013 karma points
    Dec 21, 2015 @ 05:56
    keilo
    0

    Hi Kevin

    In order to include the main author in email notification, I tried to change the line

    foreach(var childPost in item.Children().Where(x => x.IsVisible()))

    to item.DescendantsOrSelf().Where(...)

    but it doesnt seem to fire for the main author, i.e main author still not included in the email notification.

    Any comment on what is the right approach for this?

Please Sign in or register to post replies

Write your reply to:

Draft