Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Adding CSS to links

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
leatherlips Posted - 07 June 2008 : 21:35:19
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?
<
1   L A T E S T    R E P L I E S    (Newest First)
cripto9t Posted - 09 June 2008 : 13:35:34
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.
<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000 Version 3.4.07