Author |
Topic |
weeweeslap
Senior Member
USA
1077 Posts |
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 07 June 2008 : 17:13:05
|
I tried all the settings & updates; spaces (and all following the first space in a phrase are eliminated).< |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 08 June 2008 : 19:38:45
|
quote: Originally posted by cripto9t
The original code has been updated with all the bug fixes mentioned so far.
Not quite:
quote: Add this line right after that
"#keywords a {color:yellow;font-weight:bold;background-color:yellow;)" & vbNewLine & _
< |
|
|
bobby131313
Senior Member
USA
1163 Posts |
|
leatherlips
Senior Member
USA
1838 Posts |
|
cripto9t
Average Member
USA
881 Posts |
Posted - 09 June 2008 : 11:56:36
|
Guys, I haven't forgot this . I put a few hours into it this morning. I'll post an update after a little more testing and I get a post wrote up.
Got a new way of checking files so hopefully it should work for everyone. Also put a lot more checks in so it catches a lot more words.
Theres still a link within a link problem, but I haven't give up.
Just noticed this morning that carrage returns and line feeds were being replaced before checking for keywords. So that should solve alot of the problems I was haveing with regex for a future update.
bobby, when (if?) this switched over to regular expressions, maybe I'll be able to fix the letter case problem. But I don't think I can do it using the replace function.< |
_-/Cripto9t\-_ |
Edited by - cripto9t on 09 June 2008 11:58:45 |
|
|
cripto9t
Average Member
USA
881 Posts |
Posted - 09 June 2008 : 15:47:05
|
The code in the topic has been updated.
For those that are using this.
1. In the function FormatStr(), move this line "fString = ChkKeys(fString)" to here
function FormatStr(fString)
on Error resume next
fString = ChkKeys(fString)
2. Replace function ChkKeys() with the new one.
3. Then you'll need to add this line of code to the files you want keywords on.
Dim ShowKeyWords : ShowKeyWords = True Add it somewhere after this "<%". This is "topic.asp".
%>
<!--#INCLUDE FILE="config.asp"-->
<%
Dim ShowKeyWords : ShowKeyWords = True This takes the place of the exclude list and hopefully it will work for everyone.
<edit>6/10/08 Some of the instructions were left out. There all there now</edit>< |
_-/Cripto9t\-_ |
Edited by - cripto9t on 10 June 2008 07:20:05 |
|
|
leatherlips
Senior Member
USA
1838 Posts |
Posted - 09 June 2008 : 17:47:53
|
Seems pretty good so far. I have a couple of questions.
You have it now to open all links in a new window. I would rather not do that. Before you had it open in the same window. I tried removing the part in red from both lines that have it but they still open in a new window:
strReplace = "<a id=""keywords"" href=""" & xmlKeyList.item(iKey).childNodes(1).text & """ target=""blank"">"
Am I removing the correct section of code? Also, I'm wonder if the target frame could be set in the xml file when you specify the url for the phrase?
Another thing I notice is that if I update the xml file with a new phrase it does not seem to take effect. What is causing that?
Thanks again for all your work. I really like this mod!< |
Mangione Magic Forum - The Music of Chuck Mangione
My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD |
|
|
cripto9t
Average Member
USA
881 Posts |
Posted - 09 June 2008 : 19:10:08
|
quote: Am I removing the correct section of code?
Yeah, you need to comment out the "if" and "end if" lines here, leave the center line uncommented.
quote:
'if trim(Application(strCookieURL & "STRKEYWORDS")) = "" or trim(Application(strCookieURL & "STRKEYREPLACE")) = "" then
LoadKeywordApps
'end if That way the apps will reload every refresh or page view. Be sure to uncomment when your through .
That should take care of your problems. quote: Also, I'm wonder if the target frame could be set in the xml file when you specify the url for the phrase?
Thats a good idea and I think I have a good idea on how to do it .< |
_-/Cripto9t\-_ |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 09 June 2008 : 19:46:45
|
Ok - one minor bug that I can live with. If a keyword or key-phrase starts a sentence, it doesn't get selected. If it is at any other point in the sentence, it does.< |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 09 June 2008 : 20:16:01
|
quote: Originally posted by leatherlips
I tried removing the part in red from both lines that have it but they still open in a new window:
strReplace = "<a id=""keywords"" href=""" & xmlKeyList.item(iKey).childNodes(1).text & """ target=""blank"">"
Am I removing the correct section of code?
Yes, but not doing the right thing to the code. Change the word "blank" to "_self" and they'll open in the same window.< |
|
|
leatherlips
Senior Member
USA
1838 Posts |
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 09 June 2008 : 21:32:32
|
Read my response above yours to edit the targets.
I don't think it can be done in the XML file, it will not validate if you modify the format.< |
|
|
weeweeslap
Senior Member
USA
1077 Posts |
Posted - 09 June 2008 : 21:39:17
|
Yeah minor bug same as carefree, if it starts the sentence it doesn't get linked, if it ends the sentence and not followed by a period or another sentence then it doesn't get linked either. Minor but figured I'd post them. Thank you very much for this. It is very much needed and I greatly appreciate your work! -Oscar
http://www.coastercrazy.com/forum/topic.asp?TOPIC_ID=17825 <-- this is the topic so you can see what I am talking about above.
-edit in my reply you can see I just wroe the single word trivia and it did get linked. Sooo not sure why that one worked and the others didn't. Thanks!< |
coaster crazy |
Edited by - weeweeslap on 09 June 2008 21:42:02 |
|
|
leatherlips
Senior Member
USA
1838 Posts |
|
Topic |
|