Erceis.com

Colossal Confusion

Dec
12
Note: For v2.1 only don't know if it exists on other versions

1. Open DasBlog All Solution File from source Directory
2. Open SharedBasePage.cs from newtelligence.DasBlog.Web.Core project
3. Search for private EntryCollection GetEntriesForPage(int pageIndex, int entriesPerPage, string langCode) method
4. Change From:
private EntryCollection GetEntriesForPage(int pageIndex, int entriesPerPage, string langCode)
{
    EntryIdCache cacheToCopy = DataService.GetEntryIdCache();

    //Shallow copy as we're going to modify it...and we don't want to modify THE cache.
    EntryIdCacheEntryCollection cache = (EntryIdCacheEntryCollection)cacheToCopy.Entries.Clone();

    if (pageIndex * entriesPerPage < cache.Count)
    {
        // Remove all entries before the page's first entry.
        for (int i = 0; i < pageIndex * entriesPerPage; i++)
        {
            cache.RemoveAt(0);
        }
        // Remove all entries after the page's last entry.
        if (cache.Count - entriesPerPage > 0)
        {
            cache.RemoveRange(entriesPerPage, cache.Count - entriesPerPage);
        }

        return DataService.GetEntries(null, EntryCollectionFilter.DefaultFilters.IsInEntryIdCacheEntryCollection(cache),
                                      Int32.MaxValue,
                                      Int32.MaxValue);
    }  

    // The page index is out of range (i.e. too large).
    return new EntryCollection();
}
To:
private EntryCollection GetEntriesForPage(int pageIndex, int entriesPerPage, string langCode)
{
    EntryCollection toClone = DataService.GetEntries(null, null, int.MaxValue, int.MaxValue);
    EntryCollection allEntries = (EntryCollection)toClone.Clone();

    if (pageIndex * entriesPerPage < allEntries.Count)
    {
        // Remove all entries before the page's first entry.
        for (int i = 0; i < pageIndex * entriesPerPage; i++)
        {
            allEntries.RemoveAt(0);
        }
        // Remove all entries after the page's last entry.
        if (allEntries.Count - entriesPerPage > 0)
        {
            allEntries.RemoveRange(entriesPerPage, allEntries.Count - entriesPerPage);
        }

        return allEntries;
    }

    // The page index is out of range (i.e. too large).
    return new EntryCollection();
}
5. Update newtelligence.DasBlog.Web.Core.dll in your bin folder

now frontpage paging should work on v2.1

Posted At Wednesday, December 12, 2007 12:07:31 PM (GTB Standard Time, UTC+02:00)
Comments [0] | | Permalink |       |  
Dec
12
1. Open DasBlog All Solution File from source Directory
2. Open Macros.cs from newtelligence.DasBlog.Web.Core project
3. Search for public virtual Control DrawTagCloud() method
4. Change From:
foreach(CategoryCacheEntry category in categories)
{
     EntryCollection entries = requestPage.DataService.GetEntriesForCategory(category.Name,languageFilter);
     catEntryCount.Add(category.Name,entries.Count);
     minCount = Math.Min(minCount,entries.Count);
     maxCount = Math.Max(maxCount,entries.Count);
}
To:
foreach(CategoryCacheEntry category in categories)
{
     //EntryCollection entries = requestPage.DataService.GetEntriesForCategory(category.Name,languageFilter);
     catEntryCount.Add(category.Name, category.EntryDetails.Count);
     minCount = Math.Min(minCount, category.EntryDetails.Count);
     maxCount = Math.Max(maxCount, category.EntryDetails.Count);
}
5. Update newtelligence.DasBlog.Web.Core.dll in your bin folder

now the categories are counted the way they should

Posted At Wednesday, December 12, 2007 11:19:01 AM (GTB Standard Time, UTC+02:00)
Comments [0] | | Permalink |       |  
      

Navigation

Search


Calendar

<August 2008>
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456

Categories


On this page

dasBlog Front Page Paging Fix
dasBlog DrawTagCloud Fix

Be 	a Flockstar

Tag Cloud

About Me (1) Applications (6) dasBlog (2) Download (1) İlişkiler (1) Media (4) MPC (2) Oyun (1) Programming Languages (1) Tv Shows (1) Virus (2)

Archive


Blogroll

RSS 2.0 Atom 1.0 CDF

Send mail to the author(s) E-mail

Sign In

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008, Gürel Erceiş. | The YUI Grid CSS
Page rendered at  Thursday, August 28, 2008 8:52:38 PM (GTB Standard Time, UTC+02:00)