Copied to clipboard

Flag this post as spam?

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


  • David 57 posts 80 karma points
    Aug 18, 2011 @ 15:21
    David
    0

    Multi-site support

    I have a small install of umbraco at the moment with just a couple sites on on install.   Does uBlogsy support multi site?  Meaning, does the blog piece get added separately for each site on a multi site setup or does the interface for approving comments appear on everyones dashboard?  

    Blog4Umbraco appeared to show on everyones dashboard when I tested the installation of it.  That's not something I want everyone to see. 

    Thanks

  • Anthony Candaele 1197 posts 2049 karma points
    Aug 18, 2011 @ 15:31
    Anthony Candaele
    0

    HI David,

    I integrated uBlogsy without a problem for my multilingual website (www.webmove.be)  (see screenshot). Both blogs, Dutch and English can be edited completely seperated:

    Hope this answers some of your questions,

    greetings,

    Anthony Candaele

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Aug 19, 2011 @ 11:03
    Anthony Dang
    0

    Hi David

    Yes you can use uBlogsy for multi sites. You need the landing node for each site. No guarantee's on the dashboard control however. The next version will have a dropdown to select your root blogs. You should be able to do some clever jquery to hide dropdown items depending on logged in users.

     

     

     

  • Edward Aston 15 posts 35 karma points
    Feb 28, 2012 @ 13:53
    Edward Aston
    0

    Hi,

    I know this is an old post but I was wondering if it is possible to have the comments form work in multiple languages?

    Thanks,

    Ed

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Feb 28, 2012 @ 15:43
    Anthony Dang
    0

    Quick answer is yes.

    Regarding the hardcoded text... they can all be replaced with dictionary items.

    What else did you need to do with it?

     

  • Edward Aston 15 posts 35 karma points
    Feb 28, 2012 @ 15:48
    Edward Aston
    0

    Thanks.

     

    I noticed I could change a lot of the hard coded text to dictionary items but wasn't sure on the comment form labels such as Name etc.

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Feb 28, 2012 @ 16:32
    Anthony Dang
    0

    It's just normal .net

    You can change it all to Dictionary items. In fact, in uBlogsy for U5 i've a done everything with dictionary items.

     

     

  • Edward Aston 15 posts 35 karma points
    Mar 03, 2012 @ 13:59
    Edward Aston
    0

    Thanks Anthony, I figured out that I can just change the usercontrol file without rebuilding the dll.

    The last issue I'm having with my multisite is that the search is returning posts from all blogs? Any advice on how to fix this?

    Thanks,

    Ed

  • elspiko 133 posts 302 karma points
    Mar 05, 2012 @ 13:10
    elspiko
    0

    You could set the IndexParentId attribute on the relevant indexset element in your ExamineIndex.config and search against that index? e.g.

    <IndexSet SetName="PersonIndexSet" IndexPath="~/App_Data/ExamineIndexes/PersonIndex/" IndexParentId="3968">
  • Lennart Stoop 304 posts 842 karma points
    Mar 05, 2012 @ 16:07
    Lennart Stoop
    1

    That would require one index set per website though. Another way of doing it is hooking up into the DocumentWriting event of the indexer, and add the ID of website's root node to the index. When you search you can then simply include the website root node in the search query.

        public class ExamineIndexingEvents : ApplicationBase
        {
            private ILog log = LogManager.GetLogger();
    
            public ExamineIndexingEvents()
            {
                var indexer = (LuceneIndexer)ExamineManager.Instance.IndexProviderCollection["MyIndexer"];
                indexer.DocumentWriting += new EventHandler<Examine.LuceneEngine.DocumentWritingEventArgs>(indexer_DocumentWriting);
            }
    
            void indexer_DocumentWriting(object sender, Examine.LuceneEngine.DocumentWritingEventArgs e)
            {
                if (e.Document != null && e.Fields.ContainsKey("path"))
                {
                    // Extract root node ID from path:
                    try
                    {
                        string rootNodeId = e.Fields["path"].Split(',')[3];
                        e.Document.Add(new Field("rootNodeId", rootNodeId, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    }
                    catch (Exception ex)
                    {
                        log.Error("Failed to add rootNodeId to index", ex);
                    }
                }
            }
        }

     

     

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Mar 05, 2012 @ 22:20
    Anthony Dang
    0

    After much thinking...

    A quick solution without having to recompile anything...

    Find this line in uBlogsyListPosts.cshtml

    posts = PostService.Instance.GetPosts(Model.Id, tag, category, author, searchTerm, commenter, page-1, count);
    

     

    Add these lines directly after


    // get landing node
    var landing = DataService.Instance.GetLanding(Model.Id);

    // only get posts where the path has the landing node's id. posts = posts.Where(x => x.Path.Contains(landing.Id + ","));
     
  • Edward Aston 15 posts 35 karma points
    Mar 06, 2012 @ 14:05
    Edward Aston
    0

    Thanks for all your help, I'll give this a go soon. The blog looks great by the way!

  • Edward Aston 15 posts 35 karma points
    Mar 06, 2012 @ 20:59
    Edward Aston
    0

    Hi,

    I get this error:

     

    Error loading Razor Script /uBlogsy/uBlogsyListPosts.cshtml
    d:\domains\optapro.otbstudio.co.uk\httpdocs\macroScripts\uBlogsy\uBlogsyListPosts.cshtml(51): error CS1977: Cannot use a lambda expression as an argument to a dynamically dispatched operation without first casting it to a delegate or expression tree type

     

    Thanks,

    Ed

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Mar 06, 2012 @ 23:38
    Anthony Dang
    0

    Ah..

    instead of var, use IEnumerable<DynamicNode>

    like this:

    IEnumerable<DynamicNode> posts = PostService.Instance.GetPosts(Model.Id, tag, category, author, searchTerm, commenter, page - 1, count);

Please Sign in or register to post replies

Write your reply to:

Draft