Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (General)
 quote code in db...or not ?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 19 November 2004 :  15:07:46  Show Profile  Visit MarcelG's Homepage
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

Posted - 19 November 2004 :  16:31:51  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
quote:
Can anyone explain me why this decision was made
Probably because it would slow down the page if every tag would have to be converted when a post's message is displayed, especially on high traffic forums.
The way it's implemented now is that certain tags ([code] tag for example) are converted to HTML only once (before the message is saved in the database).

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 20 November 2004 :  04:48:32  Show Profile  Visit MarcelG's Homepage
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
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 20 November 2004 :  05:18:20  Show Profile
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.
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 20 November 2004 :  13:57:10  Show Profile  Visit MarcelG's Homepage
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
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 20 November 2004 :  16:39:36  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.24 seconds. Powered By: Snitz Forums 2000 Version 3.4.07