Author |
Topic |
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 19 November 2004 : 15:07:46
|
I am wondering why the quote code is transformed before it is inserted in the db. I see the [code][/code]-tags in the db, I see the smilies in the db as [:)] etc, but I see the quotes with their full HTML code in the db.
Can anyone explain me why this decision was made, and (perhaps even more important) how I could change it so that the quote-code is also inserted 'as is' in the db, and transformed into HTML by means of INC_FUNC_COMMON.ASP at the moment the topic is actually loaded ? It not only saves data ([quote][/quote] is was less bytes then the bloated code that's now inserted in the db), but I also guess it saves speed. (I load the topic message as keywords meta-tag, and as the keywords tag does not allow html, I need to 'cleancode' it before loading.) |
portfolio - linkshrinker - oxle - twitter |
|
OneWayMule
Dev. Team Member & Support Moderator
Austria
4969 Posts |
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 20 November 2004 : 04:48:32
|
Erm...if I'm not mistaking the [quote][/quote] tags are almost the only ones that are converted to HTML prior to db inserting. The code tags are not (at least not in my code....but I cannot remember (intentionally) changing that.
|
portfolio - linkshrinker - oxle - twitter |
Edited by - MarcelG on 20 November 2004 04:51:01 |
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 20 November 2004 : 05:18:20
|
The code tags used to be, but to get them to work correctly I had to change them.
The reason for converting the tags before inserting them into the database, is to decrease processing time when viewing the topics/replies. But, because some features have changed, it has become necessary to have some of them processed when the topics/replies are viewed.
If you want to change all of the tags to be processed when the topics/replies are viewed on your site, it shouldn't be too difficult to do. |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 20 November 2004 : 13:57:10
|
The thing is that I have to process the topic-content anyway, as I stated in my first post. So, it would be either to process only the topic_message content, or the topic_message content plus the replies... I guess my current method (as is) is faster than the other one..... I'll leave it like this. |
portfolio - linkshrinker - oxle - twitter |
|
|
Da_Stimulator
DEV Team Forum Moderator
USA
3373 Posts |
Posted - 20 November 2004 : 16:39:36
|
I would say just use FormatStr to process the message, then strip the HTML out of it (you could write a simple function to do that) |
-Stim |
|
|
|
Topic |
|