Print Page | Close Window

Feed first 100 characters

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=21549
Printed Date: 29 March 2026 at 4:24pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Feed first 100 characters
Posted By: suedechaser
Subject: Feed first 100 characters
Date Posted: 10 October 2006 at 8:01am
Hi All,

I think this has been covered here - but I cannot find it anywhere.

Is there a way to modify an RSS post feed to only show the first - say - 100 characters and then (...read more)?

thank you in advance

regards

suede



Replies:
Posted By: Scotty32
Date Posted: 10 October 2006 at 11:42am
just do:

strMessage = Left(sarryRssTopics(7, intCurrentRecord),100)


but if theres code to display a smiley, link or a picture it will cut it in half


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: suedechaser
Date Posted: 10 October 2006 at 8:37pm
Hi Scotty,

Thanks for this.

Looking at the actual feed xml, it appears to count any message formatting into the total character count ( as message formatting appears to prefix the actual post in the xml! )

Do you know of an alternative that will count only the characters in the actual post message?

regards

suede


Posted By: dfrancis
Date Posted: 10 October 2006 at 9:36pm
take out the html before counting.


Posted By: suedechaser
Date Posted: 10 October 2006 at 10:42pm
Hi dfrancis,

Thanks for the tip!

I have to admit, after looking at the code, that I have no odea how to do that one. Is it possible for you to provide an example / hint please?

regards

suede


Posted By: dfrancis
Date Posted: 10 October 2006 at 10:57pm
Actually... there's a function already included in the forum... let me see if I can find it.
 


Posted By: dfrancis
Date Posted: 10 October 2006 at 11:33pm
Correction!!!
 
Bruce has already done the work... all you need to do is this...
 
YourFullText = "long raw text including html"
 
ShortText = removeHTML(YourFullText, 100, False)
 
That's it!!!
 
To see how it works, review the removeHTML function in /functions/functions_filters.asp
 


Posted By: suedechaser
Date Posted: 11 October 2006 at 12:44am
Thanks dfrancis, thanks Bruce!!

...simply perfect.

regards

seude



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net