Author |
Topic |
|
ayora
Starting Member
37 Posts |
Posted - 11 August 2002 : 06:58:14
|
i use the snitz-syndication on my first page to display the latest topis but i have problem...
it now shows the whole topic subject, that i want to do is to limit it to an amount of characters so it not show the hole topic just the beginning and then for expample some dots....
hope you now wath a mean!! |
Edited by - ruirib on 11 August 2002 06:58:56 |
|
Roland
Advanced Member
Netherlands
9335 Posts |
Posted - 11 August 2002 : 06:58:55
|
I'm going to move this to the Help: MOD Implementation forum as that's where it belongs
Beaten to it |
Edited by - Roland on 11 August 2002 06:59:19 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
Hamlin
Advanced Member
United Kingdom
2386 Posts |
Posted - 11 August 2002 : 07:21:34
|
I dont have the mod, but if you find where the topic subject is displayed and try something like
Left(RSlist("T_MESSAGE"), 50) & "...."
It should cut it and add the dots... |
|
|
Deleted
deleted
4116 Posts |
Posted - 11 August 2002 : 07:38:37
|
quote: Originally posted by Hamlin
I dont have the mod, but if you find where the topic subject is displayed and try something like
Left(RSlist("T_MESSAGE"), 50) & "...."
It should cut it and add the dots...
I also didn't use it but used content manager mod. Better do this:
Const intMaxChars = 50 Dim strMsg strMsg = RSlist("T_MESSAGE") ' ' it will be good to replace here unwanted formatting such as crlf + large fonts etc. ' if len(strMsg > inMaxChars) then strMsg = Left(strMsg, 50) & "...<a href=""topic.asp?..."">read more</a>" 'response.write ChkString(strMsg,"display") <=== use this to have formatted, but you have to make sure that you truncate at a correct pos. response.write strMsg
Worst case is a person who types a lot of linefeeds then writes... |
Stop the WAR! |
|
|
ayora
Starting Member
37 Posts |
Posted - 11 August 2002 : 07:49:44
|
ok thanks guys for the code but i cant find where to put it =) i suck on asp |
|
|
DoraMoon
Average Member
Taiwan
661 Posts |
Posted - 11 August 2002 : 08:44:03
|
i have a "modified" Syndication mod installed, so not sure it's helpful or not.. may u can try it~
in syndication.asp file.. find this line (about line.100) strSubject=objRs("T_SUBJECT")
and just below this line add.. if Len(strSubject) > 20 then strSubject = Left(strSubject,17) & "..." end if (change the red value to fit your need)
|
~......~.~~ |
|
|
ayora
Starting Member
37 Posts |
Posted - 11 August 2002 : 09:28:07
|
hey! thanks DoraMoon
that solved my problem, i o u 1
|
|
|
|
Topic |
|