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/O Code)
 Adding CSS to links
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

leatherlips
Senior Member

USA
1838 Posts

Posted - 07 June 2008 :  21:35:19  Show Profile  Visit leatherlips's Homepage  Reply with Quote
I'm trying to add some css code to hyperlinks that members may post in my forum.

I'm probaly going about this the wrong way but here is what I am trying to do.

Normally in html, I would do this:

<a href="http://www.link.com" rel="example[width height]"</a>

I'm trying to make a tag that I'm currently calling [tag] [/tag].

I've then in inc_func_common.asp added this line with the other forum code entries:

fString = doCode(fString, "[tag]", "[/tag]", "<a href=", " rel=""example[width height]""></a>")

However, after I put my [tag] [/tag] before and after my hyperlink, the link just disappears.

What would be the proper way to have a tag automatically add the part in red 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 07 June 2008 21:41:32

cripto9t
Average Member

USA
881 Posts

Posted - 09 June 2008 :  13:35:34  Show Profile  Reply with Quote
I think your going about it the wrong way.

I would copy the "ReplaceURLs" function in "inc_func_common" and rename it, "ReplaceTags" or what ever you want. Then change these lines
	oTag = "[ url="""
	c1Tag = """]"
	oTag2 = "[ url ]"
	c2Tag = "[ /url ]"

	roTag = "<a href="""
	rc1Tag = """ target=""_blank"">"
	rc2Tag = "</a>"

and change them to what you need
	oTag = "[tag="""
	c1Tag = """]"
	oTag2 = "[tag]"
	c2Tag = "[/tag]"

	roTag = "<a href="""
	rc1Tag = """ target=""_blank"" add you html here>"
	rc2Tag = "</a>"

I searched through it and you'll need to change this line to
'if the closing url tag is found in the string and
				'[ URL ] is not found in the string then...
				If InStr(1, strArray2(1), c2Tag, 1) And _
					Not InStr(1, UCase(strArray2(1)), "[ URL ]", 1) Then
Change that to [TAG] - uppercase.

Then you can call it in the formatrStr() function
	if strAllowForumCode = "1" then
		fString = ReplaceURLs(fString)
                fString = ReplaceTags(fString)
		fString = ReplaceCodeTags(fString)
		if strIMGInPosts = "1" then
			fString = ReplaceImageTags(fString)
		end if
	end if

that way you'll have 2 functions "ReplaceURLs()" for your regular links and "ReplaceTags()" to deal with you special links.

There may be more to it than this, but it's a start.
<

    _-/Cripto9t\-_

Edited by - cripto9t on 09 June 2008 13:36:56
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.41 seconds. Powered By: Snitz Forums 2000 Version 3.4.07