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 MOD-Group
 MOD Add-On Forum (W/Code)
 Keyword Links - Last Update 6/9/08
 New Topic  Reply to Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 7

leatherlips
Senior Member

USA
1838 Posts

Posted - 11 June 2008 :  11:20:01  Show Profile  Visit leatherlips's Homepage  Reply with Quote
I just tried your newer code and there is a problem.

Now when I enter a phrase it adds the keyword link and keeps the original phrase entered by the user.

For example, if my keyword phrase is Snitz Forums and I type:

Snitz Forums

Then it will display the following:

Snitz ForumsSnitz Forums

I've also noticed with the older code and this newer code that if you put a phrase between quotes (double or single) it puts a space between the beginning quote and the key phrase. Also any keywords preceded by or followed by a hyphen will not auto link. These aren't big deals, I just wanted to point them out.

Doing more testing I've found that if a phrase is in a spoiler tag it will still show up.<

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

Edited by - leatherlips on 11 June 2008 11:31:05
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 12 June 2008 :  08:09:41  Show Profile  Reply with Quote
You need to replace the LoadKeywordApps() sub with the one I posted.
The lines that add the keyword from the xml file have been edited out of it.

I noticed the quote space also. I have no idea why it is happening.
I'll give it a closer look.
I'll add a hyphen to the pattern.

The spoiler tag probably runs along the same line as the anchr tag issue.<

    _-/Cripto9t\-_
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 12 June 2008 :  09:22:58  Show Profile  Visit leatherlips's Homepage  Reply with Quote
Your code does work. I know what is causing issue. Because I want the target frames to be different depending on if they point to inside or outside of my site, I used Carefree's code to replace part of your code:

for iKey = 0 to cLng(NumOfKeys)
if strKeys = "" then
strKeys = xmlKeyList.item(iKey).childNodes(0).text
strDiv = xmlKeyList.item(iKey).childNodes(1).text
if left(strDiv,4)<> "http" and left(strDiv,3) <> "ftp" then
strReplace = "<a id=""keywords"" href=""" & xmlKeyList.item(iKey).childNodes(1).text & """ target=""_self"">"
else
strReplace = "<a id=""keywords"" href=""" & xmlKeyList.item(iKey).childNodes(1).text & """ target=""_blank"">"
end if
strReplace = strReplace & xmlKeyList.item(iKey).childNodes(0).text & "</a>"
else
strKeys = strKeys & "," & xmlKeyList.item(iKey).childNodes(0).text
strDiv = xmlKeyList.item(iKey).childNodes(1).text
strDiz = xmlKeyList.item(iKey).childNodes(0).text
if left(strDiv,4)= "http" or left(strDiv,3) = "ftp" then
strReplace = strReplace & ", <a id=""keywords"" href=""" & xmlKeyList.item(iKey).childNodes(1).text & """ target=""_blank"">"
else
strReplace = strReplace & ", <a id=""keywords"" href=""" & xmlKeyList.item(iKey).childNodes(1).text & """ target=""_self"">"
end if
strReplace = strReplace & xmlKeyList.item(iKey).childNodes(0).text & "</a>"
end if
next

It worked with the other code but with your newer one it now has the symptom I posted above. <

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

Edited by - leatherlips on 12 June 2008 09:23:15
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 12 June 2008 :  12:28:45  Show Profile  Reply with Quote
Remove this line, its in there twice, so take both of them out.
strReplace = strReplace & xmlKeyList.item(iKey).childNodes(0).text & "</a>"
Thats all I did to the original so it should work .<

    _-/Cripto9t\-_
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 12 June 2008 :  12:54:45  Show Profile  Visit leatherlips's Homepage  Reply with Quote
That did it cripto9t! Thanks!

Any further along with the quote space issue and the spoiler tag?

To add to the list (sorry )...

If any keyword or phrase is in any forum code tag it will not link. Unless a space is put before and after it. Also, if you use the keyword id (which I know is optional) then the forum code tags will not take effect.

Edit: It seems the spoiler tag will not work with any normal link either. I wonder if this could be a mod itself? Or at least revising the spoiler tag to include links to be hidden? I've modified my spoiler tag so this is no longer an issue.

Edit 2: It looks like you can still use the keyword id and have the forum tags work. You just need to remove the font-weight attribute from the id. (It still has to have a space before and after the phrase though.)<

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

Edited by - leatherlips on 14 June 2008 15:33:17
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 12 June 2008 :  22:42:02  Show Profile  Visit leatherlips's Homepage  Reply with Quote
I found a couple more quirks, although they are not a big deal, just thought I'd pass it on.

If you have a keyword phrase that has a comma in it then the links in the xml file below that keyword phrase will be off by one link. They will take the link of the one below them.

Also if you have a phrase that shares the first word, the first link in the xml will be the only one that works for that word.

My keyword phrases are album titles. One is called Together and the other is called Together Forever. The Together Forever will not work. Only the word Together gets linked, but to the other album titles page.<

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

Edited by - leatherlips on 12 June 2008 22:53:08
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 14 June 2008 :  15:32:04  Show Profile  Visit leatherlips's Homepage  Reply with Quote
If you were to add the forum tags to the exclusion list like you did with ", ' ? etc... I think the auto link will work.

Presently if you choose to make a keyword bold, then the forum tags are right next to the phrase which makes it not work.

I've tried adding [b ] and [/b ] to your code but I can't figure it out so it will work. Can you show me how to do that? I would then be able to add the others such as [i] and [u] etc...<

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
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 15 June 2008 :  15:23:09  Show Profile  Visit leatherlips's Homepage  Reply with Quote
Do you think there is a way to have this not work in members signatures? Some of my members use key words and phrases in their signatures and I would like for them to not have the auto links.<

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
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 16 June 2008 :  21:03:17  Show Profile  Visit leatherlips's Homepage  Reply with Quote
Just bumping this up to hopefully get these last few minor bugs to be fixed. It's so close! <

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
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 12 August 2008 :  05:18:26  Show Profile  Reply with Quote
quote:
Originally posted by Carefree

quote:
Originally posted by leatherlips

Each time you upate your xml file or even change the target of the keyword links in the inc_func_common.asp file you must first uncomment the lines you mentioned, save the file and then uncomment the lines and then save again:

'if trim(Application(strCookieURL & "STRKEYWORDS")) = "" or trim(Application(strCookieURL & "STRKEYREPLACE")) = "" then
	LoadKeywordApps
'end if



Not quite, Leather.

To modify "on the fly", you should:

  1. Comment the two lines.

  2. Save the file.

  3. Make your changes.

  4. Test the changes.

  5. Un-comment the two lines.

  6. Save the file again.



That way, your changes will be evident immediately and not contingent on a replacement of your cookie.



The process of having to comment/uncomment the inc_func_common while xml file changes are being made seems a little clumsy. Could this requirement be done by an external file linked from the admin_home, so that you can make the changes to the xml file, upload it as normal. Then with the linked file, it automatically comments the appropriate lines, refreshes and then uncomments to bring the changed xml into affect.

The reason for this suggestion, I made my xml file changes uploaded the file. Then went through the comment process and the changes installed on the keywords.. I am sure it is possible with some if'thens etc..<
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 12 August 2008 :  14:47:35  Show Profile  Reply with Quote
Sorry about the disappearance. Hopefully I'm back for awhile.
quote:
Originally posted by leatherlips

I found a couple more quirks, although they are not a big deal, just thought I'd pass it on.

If you have a keyword phrase that has a comma in it then the links in the xml file below that keyword phrase will be off by one link. They will take the link of the one below them.

Also if you have a phrase that shares the first word, the first link in the xml will be the only one that works for that word.

My keyword phrases are album titles. One is called Together and the other is called Together Forever. The Together Forever will not work. Only the word Together gets linked, but to the other album titles page.


I'll give the comma thing a look. Try Listing "Together Forever" before "Together" in the xml file. I didn't test it but it should work as long as the it's the first or last word in the string.

quote:
If you were to add the forum tags to the exclusion list like you did with ", ' ? etc... I think the auto link will work.

Presently if you choose to make a keyword bold, then the forum tags are right next to the phrase which makes it not work.

I've tried adding [b ] and [/b ] to your code but I can't figure it out so it will work. Can you show me how to do that? I would then be able to add the others such as [i] and [u] etc...
You were on the right track. You need to use html instead of forum code for those tags. <b><i><s><u> I tested this and it worked for me.
quote:
Do you think there is a way to have this not work in members signatures? Some of my members use key words and phrases in their signatures and I would like for them to not have the auto links.
I looked at this and a quick solution would be to add an unmodified "formatStr" function to "inc_func_common" and rename it "formatStr2". Then find the sigs part in "topic.asp" and rename it there. Remember 2 sigs, one for the topic and one for the replies.

quote:
The reason for this suggestion, I made my xml file changes uploaded the file. Then went through the comment process and the changes installed on the keywords.. I am sure it is possible with some if'thens etc..

Andy, assuming you have admin status, try this
if mLev < 3 then
    if trim(Application(strCookieURL & "STRKEYWORDS")) = "" or trim(Application(strCookieURL & "STRKEYREPLACE")) = "" then
	LoadKeywordApps
    end if
else
    LoadKeywordApps
end if




<

    _-/Cripto9t\-_
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 12 August 2008 :  16:58:52  Show Profile  Visit leatherlips's Homepage  Reply with Quote
cripto9t,

Your suggestion of adding the one phrase above the other worked great! Also, doing:

if mLev < 3 then
    if trim(Application(strCookieURL & "STRKEYWORDS")) = "" or trim(Application(strCookieURL & "STRKEYREPLACE")) = "" then
	LoadKeywordApps
    end if
else
    LoadKeywordApps
end if


Works great too! Now it automatically updates the xml files phrases without having to manually uncomment and re-comment those lines!

Your signature idea worked too!

Adding the html for bold, underline, italics and strikethrough worked too!

Thank you sooo much!! <

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

Edited by - leatherlips on 12 August 2008 17:20:11
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 12 August 2008 :  18:10:39  Show Profile  Reply with Quote
cripto9t, spot on and thank you...andy<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 13 August 2008 :  03:45:23  Show Profile  Reply with Quote
Quote: Do you think there is a way to have this not work in members signatures? Some of my members use key words and phrases in their signatures and I would like for them to not have the auto links.
I looked at this and a quick solution would be to add an unmodified "formatStr" function to "inc_func_common" and rename it "formatStr2". Then find the sigs part in "topic.asp" and rename it there. Remember 2 sigs, one for the topic and one for the replies.

I have added a new unmodified "formatStr" as "formatStr2" and I think I have amended the right reply sig's but the sig block still shows the keyword links
This is my formatstr2
function FormatStr2(fString)
on Error resume next
fString = Replace(fString, CHR(13), "")
'fString = Replace(fString, CHR(10) & CHR(10), "<br /><br />")
fString = Replace(fString, CHR(10), "<br />")
if strBadWordFilter = 1 or strBadWordFilter = "1" then
fString = ChkBadWords(fString)
end if

if strAllowForumCode = "1" then
fString = ReplaceURLs(fString)
fString = ReplaceCodeTags(fString)
if strIMGInPosts = "1" then
fString = ReplaceImageTags(fString)
end if
end if

fString = ChkURLs(fString, "http://", 1)
fString = ChkURLs(fString, "https://", 2)
fString = ChkURLs(fString, "www.", 3)
fString = ChkMail(fString)
fString = ChkURLs(fString, "ftp://", 5)
fString = ChkURLs(fString, "file:///", 6)

if strIcons = "1" then
fString = smile(fString)
end if
if strAllowForumCode = "1" then
fString = extratags(fString)
end if
FormatStr2 = fString
on Error goto 0
end function


And the two sig amendments are at lines 692 -698
		Response.Write	"</span id=""msg""></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
if CanShowSignature = 1 and Reply_Sig = 1 and Reply_MemberSig <> "" then
Response.Write " <tr>" & vbNewLine & _
" <td valign=""bottom""><hr noshade size=""" & strFooterFontSize & """><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><span class=""spnMessageText"">" & formatStr2(Reply_MemberSig) & "</span></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if

and lines 918 -924
Response.Write	"</span id=""msg""></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
if CanShowSignature = 1 and Topic_Sig = 1 and Topic_MemberSig <> "" then
Response.Write " <tr>" & vbNewLine & _
" <td valign=""bottom""><hr noshade size=""" & strFooterFontSize & """><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><span class=""spnMessageText"">" & formatStr2(Topic_MemberSig) & "</span></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if


Are these code changes the right ones?<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 13 August 2008 :  09:56:44  Show Profile  Visit leatherlips's Homepage  Reply with Quote
Those changes look right to me. Did you reload the keywords?<

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

Edited by - leatherlips on 13 August 2008 09:59:57
Go to Top of Page
Page: of 7 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.17 seconds. Powered By: Snitz Forums 2000 Version 3.4.07