the format problem in excerpts when I use cs2.1 beta1

rated by 0 users
This post has 4 Replies | 1 Follower

Not Ranked
Posts 5
Points 85
levifan Posted: Tue, Jul 18 2006 11:36 AM

I just installed cs2.1 beta1, then configured a my site to support single blog. But some posts are too long, I made the home page in my blog to show excerpts only.  It worked well but lost the html format in the home page.

How can I show html format normally (i.e <p>paragraph) in this excerpts in my home page of blog? but I don't hope it will show the whole content of each post, it is best keep excerpt and html format!

Top 25 Contributor
Posts 2,243
Points 44,790
CS Developers

The CS auto excerpt feature first strips all markup before it truncates the post, so at the moment, it is all or nothing.

HTH,
Scott

  • | Post Points: 20
Not Ranked
Posts 5
Points 85
levifan replied on Tue, Jul 18 2006 9:50 PM

Scott, thanks for you reply!

Yes, it's easy to do by technologoy if you strips all markup in auto exceprt. But sometime I need the feature which the excerpts show html format. because one post in my website have 30k words. It's very slow when the homepage was loaded.

Can I go by editing communityserver.config? Can I wite a plugin module to this? How shall I do now? 

Top 25 Contributor
Posts 2,243
Points 44,790
CS Developers

You would need to change the core code since this is a "built in" feature.

Not exactly sure where to start. There are a lot of rules to consider when writing something like this. For cample, if the first item in the post is <div> do you keep the entire post and do no truncating? Even if it is 30K words? If you keep the first <div> and don't remove the </div> some where at the end your page stop rendering. Since divs and other elements can be nested, most users don't under markup, and various browser/CSS issues, it is a very big and messy task to accomplish.

If you specify an excerpt for the post, CS will use it instead of truncating the post. That may be an easier solution.

HTH,
Scott

  • | Post Points: 20
Not Ranked
Posts 5
Points 85
levifan replied on Fri, Jul 28 2006 1:46 AM

Scott,  thanks for your answer. it's so glad to dicuss with you.

  • | Post Points: 5
Page 1 of 1 (5 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com