Author |
Topic  |
bobby131313
Senior Member
   
USA
1163 Posts |
Posted - 22 March 2008 : 16:57:03
|
Kind of like some of those advertising services do... Auto-link certain words to relevant ads.
Except I'm not thinking of ads, more like educational help. I have a pretty extensive site built around my forum and would like to raise awareness and help people learn.
For example, if someone uses the exact phrase large cent in a post, it would be cool if it automatically linked like so, large cent. Perhaps with a slightly different link color or a little arrow next to it (like Wikipedia) so users get accustomed to it being an on-site educational link.
I tried using the bad word filter, but the fields are a little too short. 
Has anyone done anything like this?
< |
Switch the order of your title tags |
|
HuwR
Forum Admin
    
United Kingdom
20593 Posts |
Posted - 22 March 2008 : 19:27:22
|
just create yourself a new table to store the various links/phrases in and just duplicate the badwordfilter function but select the values from your new table, then at the end of the badword filter, just call your new function.< |
 |
|
bobby131313
Senior Member
   
USA
1163 Posts |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
bobby131313
Senior Member
   
USA
1163 Posts |
Posted - 22 April 2008 : 17:06:12
|
Haven't had time to play with this yet, but it has been on my mind.
I have a question. It appears, from my memory , that the bad word filter works 2 ways.
New posts (and edited posts?) it actually changes what's entered into the DB, but posts previous to the BW entry, just being viewed, get changed using server variables.
Is that correct?< |
Switch the order of your title tags |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 22 April 2008 : 17:19:54
|
quote: Originally posted by bobby131313
Haven't had time to play with this yet, but it has been on my mind.
I have a question. It appears, from my memory , that the bad word filter works 2 ways.
New posts (and edited posts?) it actually changes what's entered into the DB, but posts previous to the BW entry, just being viewed, get changed using server variables.
Is that correct?
Actually your mixing up different things. Badwords and replacement words are kept in app variables, no matter what. When a post is created, badwords are replaced and their substitutes stored in the database, as integral part of the post. When a topic is displayed, badword filtering is done again, so even badwords that were not on the list when the post was created get filtered on display. Both when replacing words on a new post creation op or when displaying a existing topic, app variables contents are used, unless they are blank, in which case the app variables get reloaded from the database.< |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
bobby131313
Senior Member
   
USA
1163 Posts |
Posted - 22 April 2008 : 18:24:00
|
OK, I think I understand.
This being the case, I don't think I want to duplicate the Bad Word functionality exactly for this.
I don't think I would want the database entry to be altered. For the simple reason when someone edits a post all the new code would be there and runs the risk of getting butchered.
I'm thinking I would just want these filtered on display, not in the DB.
I'll have to see what it looks like when I get to it.
Thanks! < |
Switch the order of your title tags |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
bobby131313
Senior Member
   
USA
1163 Posts |
|
phy1729
Average Member
  
USA
589 Posts |
Posted - 22 April 2008 : 18:54:14
|
I think there's a function in inc_func_common.asp that only parses from the db not into. You may want to stick this into there.< |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
bobby131313
Senior Member
   
USA
1163 Posts |
Posted - 22 April 2008 : 18:57:39
|
quote: Regarding no changes to the actual post contents in the DB?
Yes. Make sense to you?< |
Switch the order of your title tags |
Edited by - bobby131313 on 22 April 2008 18:58:07 |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
bobby131313
Senior Member
   
USA
1163 Posts |
|
weeweeslap
Senior Member
   
USA
1077 Posts |
Posted - 26 May 2008 : 13:23:03
|
How did this go? I have a need for this on one of my sites and would like to know if it worked out and if you would share the code. Thanks< |
coaster crazy |
 |
|
bobby131313
Senior Member
   
USA
1163 Posts |
|
Topic  |
|