Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Feed first 100 characters
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Feed first 100 characters

 Post Reply Post Reply
Author
suedechaser View Drop Down
Groupie
Groupie


Joined: 25 February 2006
Location: USA
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote suedechaser Quote  Post ReplyReply Direct Link To This Post Topic: Feed first 100 characters
    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
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post 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 - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
suedechaser View Drop Down
Groupie
Groupie


Joined: 25 February 2006
Location: USA
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote suedechaser Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
dfrancis View Drop Down
Senior Member
Senior Member


Joined: 16 March 2005
Location: United States
Status: Offline
Points: 442
Post Options Post Options   Thanks (0) Thanks(0)   Quote dfrancis Quote  Post ReplyReply Direct Link To This Post Posted: 10 October 2006 at 9:36pm
take out the html before counting.
Back to Top
suedechaser View Drop Down
Groupie
Groupie


Joined: 25 February 2006
Location: USA
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote suedechaser Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
dfrancis View Drop Down
Senior Member
Senior Member


Joined: 16 March 2005
Location: United States
Status: Offline
Points: 442
Post Options Post Options   Thanks (0) Thanks(0)   Quote dfrancis Quote  Post ReplyReply Direct Link To This Post 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.
 


Edited by dfrancis - 10 October 2006 at 11:34pm
Back to Top
dfrancis View Drop Down
Senior Member
Senior Member


Joined: 16 March 2005
Location: United States
Status: Offline
Points: 442
Post Options Post Options   Thanks (0) Thanks(0)   Quote dfrancis Quote  Post ReplyReply Direct Link To This Post 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
 
Back to Top
suedechaser View Drop Down
Groupie
Groupie


Joined: 25 February 2006
Location: USA
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote suedechaser Quote  Post ReplyReply Direct Link To This Post Posted: 11 October 2006 at 12:44am
Thanks dfrancis, thanks Bruce!!

...simply perfect.

regards

seude
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.