Spoiler Tag Links

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/67259?pagenum=1
04 November 2025, 20:48

Topic


leatherlips
Spoiler Tag Links
14 June 2008, 07:30


If you place a link inside of a spoiler tag, it is not hidden. I am trying to figure out how to make links hidden like the regular text is. I've tried a couple of things so far but they are not working.
Here is one thing I've tried (the part in red is what I've added():

fString = doCode(fString, "Reveal hidden content", "", "<font color=""" & CColor & """>", "</font id=""" & CColor & """>", "<a:link=""" & CColor & """>")

It doesn't work. Can a link be hidded in a spoiler tag? If so, how can it be done?
Edit: I had to put a space after the two spoiler references above to keep them visible. My code does not have those spaces in them.

 

Replies ...


leatherlips
14 June 2008, 07:58


I've found a variation on Snitz that has a cool spoiler tag feature that hides everything and also includes a Show/Hide button.
The link for it is here:

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=64934&SearchTerms=spoiler
Carefree
14 June 2008, 08:04


Apparently the URL decoding occurs AFTER the spoiler decoding and thus takes precedence.
leatherlips
14 June 2008, 08:20


I'm using a new spoiler tag.
It hides everything. You can see it here:

http://www.mangionemagic.com/forumbeta/topic.asp?TOPIC_ID=893

I've renamed the original spoiler tag to spoiler2 and called the new one spoiler. Now I need to find a good button to place it among the other format code buttons.
Log in is demo/demo
leatherlips
14 June 2008, 08:33


Does anyone already have a spoiler button they have made?
Carefree
14 June 2008, 08:49


The css coding isn't my forte. Has anyone converted the css coding from Leather's link to Response Write standard?
leatherlips
14 June 2008, 09:40


I've made myself a button now:
Now I'm trying to add it along with the other format buttons. I've got it in place but I can't get it to work. I think I am doing the spots in inc_func_common.asp wrong.
Here is what I have:

fString = doCode(fString, "Reveal hidden content", "", "Reveal hidden content", "")

But that doesn't work. What should I do here?
Edit: Turns out I don't need to add any of the above. blush I removed it and now it works.
Carefree
16 June 2008, 11:12


I added the extra tags (RegEx Hidden & ModNote) but they do not function - is there another call I need to add like the one for the keywords md?
Giumer
24 January 2012, 10:21


I'm trying to install the mod spoiler but does not work I tried searching but can not find the mod if someone can help me thanks
Giumer
24 January 2012, 14:53


mate plz
HuwR
24 January 2012, 18:29


Isn't the spoiler tag part of 3.4.07 base code
Carefree
24 January 2012, 19:52


Yes, HuwR, but Giumer uses the Italian form of Image's portal which hasn't been updated by Image probably since it was created.
Giumer
25 January 2012, 02:03


ok now it works I had the problem of code in the file I had to create inc_code.asp the code and put it like this:

spoiler function () {
var text = getText ();
if (helpstat) {
alert ("<% = flange (" strLangInc_Code00250 ") %>");
} Else if (basic) {
AddTxt = "[spoiler]" + text + "[/ spoiler]";
AddText (AddTxt);
Else {}
if (text) {
txt = prompt ("<% = flange (" strLangInc_Code00260 ")%>", text);
Else {}
txt = prompt ("<% = flange (" strLangInc_Code00260 ") %>"," Text");
}
if (txt! = null) {
AddTxt = "[spoiler]" + txt + "[/ spoiler]";
AddText (AddTxt);
}
}
}


and then ask that the function and possible spoilers only registered members can see it? and non-registered bait must register to see the writing! ESS : Response.Write "<a href=""policy.asp""><B>Not registered? Then you're not seeing all there is to see. Register now by clicking HERE!</A></B></DIV></DIV><BR>" & vbNewLine


inc_func_common.asp the code in the file so it included:


extratags function (fstring)
fstring doCode = (fstring, "[spoiler2]", "[/ spoiler2]", "<font color=""" & CColor """> &", "</ font id =" "" & & CColor "" ">")
fstring doCode = (fstring, "[spoiler]", "[/ spoiler]", "<div style=""margin:1em auto; width: 100%;"">" & & vbNewline "<div> <b> spoiler: </ b> <input type = "" button "," value = "" Show "" style = "" width: 45px; font-size: 10px; margin: 0px; padding: 0px; "" onclick = "" if ! ='') {=''; This.innerText =''; this.value = 'Hide';} else {= 'None'; this.innerText =''; this.value = 'show';} "" /> </ div> "& & vbNewline" <div style = "" margin: 0px; padding: 0px; border: 1px solid; border-color: # 333399;"">" vbNewline & & "<div style=""display: none;"">" & vbNewline, "</ div>" & vbNewline & "</ div>" vbNewline & & "</ div>" & vbNewline)
extratags = fstring
end function
Giumer
26 January 2012, 00:45


Can anyone help me please? thanks
Carefree
26 January 2012, 05:26


Thought you had it working, Giumer.
Giumer
26 January 2012, 05:52


Originally posted by Giumer
Can anyone help me please? thanks

I do not finish, I wanted to know if the file inc code.asp and just so the code:

spoiler function () {
var text = getText ();
if (helpstat) {
alert ("<% = flange (" strLangInc_Code00250 ") %>");
} Else if (basic) {
AddTxt = "[spoiler]" + text + "[/ spoiler]";
AddText (AddTxt);
Else {}
if (text) {
txt = prompt ("<% = flange (" strLangInc_Code00260 ")%>", text);
Else {}
txt = prompt ("<% = flange (" strLangInc_Code00260 ") %>"," Text");
}
if (txt! = null) {
AddTxt = "[spoiler]" + txt + "[/ spoiler]";
AddText (AddTxt);
}
}
}


and then if it was possible that this' covering the spoiler and you can make it visible only forum members

ESS: yuo not login and clik show spoiler and then if it was possible that this' covering the spoiler and you can make it visible only forum members




and do not see what they conceal and maybe get out the message that you need to register to see the link
leatherlips
26 January 2012, 06:09


Try this code:

In inc_func_common.asp look for:

extratags = fString
end function

Above that add this:

Code:
if mLev=0 and inStr(fString,"[spoiler") then
for i = 1 to len(fString)
if mid(fString,i,6)="[spoilerCODE]" then ij=i
if mid(fString,i,7)="[/spoilerCODE]" then
ik=i
strTextString=left(fString,ij-1)+"<a href=""register.asp"">You must login or register to see this content.</a>"+mid(fString,ik+7)
end if
next
strTempString=strTextString
end if
A few years ago I was being helped with a similar situation and I was given this code (most likely by Carefree). I've changed it to fit your spoiler code. Hopefully it will work.
Carefree
26 January 2012, 07:34


Originally posted by leatherlips (most likely by Carefree)

LOL - yeah, looks like something I wrote (dual letter variables).
Giumer
26 January 2012, 09:49


might not understand me for my English! I apologize, and the mod works spoilers! and that I wanted to change that so that users do not see are resting and when clicked show the message comes out that you must register!
leatherlips
26 January 2012, 15:43


The code I posted above should hide the spoiler from nonmembers and show them a link to register. Did it not work?
Giumer
26 January 2012, 22:41


exactly does not work! I need the code to hide the spoiler from non-registered and will read them appear you need to register
leatherlips
27 January 2012, 06:04


I had the wrong tag in the code above. Try it again. You will need to change the two sections that say spoilerCODE to spoiler. I had to do that or else it was being hidden.
Carefree
27 January 2012, 09:07


Originally posted by leatherlips
I had the wrong tag in the code above. Try it again. You will need to change the two sections that say spoilerCODE to spoiler. I had to do that or else it was being hidden.

Like this, Giumer (delete the bits in red):

Code:

if mLev=0 and inStr(fString,"[spoiler") then
for i = 1 to len(fString)
if mid(fString,i,6)="[spoilerCODE]" then ij=i
if mid(fString,i,7)="[/spoilerCODE]" then
ik=i
strTextString=left(fString,ij-1)+"<a href=""register.asp"">You must login or register to see this content.</a>"+mid(fString,ik+7)
end if
next
strTempString=strTextString
end if
Giumer
27 January 2012, 09:31


I figured if I insert it so? :

Code:
if mLev=0 and inStr(fString,"[spoiler") then
for i = 1 to len(fString)
if mid(fString,i,6)="[spoilerCODE]" then ij=i
if mid(fString,i,7)="[/spoilerCODE]" then
ik=i
strTextString=left(fString,ij-1)+"<a href=""register.asp"">You must login or register to see this content.</a>"+mid(fString,ik+7)
end if
next
strTempString=strTextString
end if

function extratags(fString)
fString = doCode(fString, "
", "
", "<div class=""quoteboxhead"">" & fLang("strLangI_F_Common00780") & "</div><div class=""quotebox"">", "</div>")
fString = doCode(fString, "[spoiler2]", "[/spoiler2]", "<font color=""" & CColor & """>", "</font id=""" & CColor & """>")
fString = doCode(fString, "Reveal hidden content", "", "<div style=""margin:1em auto; width: 100%;"">" & vbNewline & " <div><b> Spoiler: </b><input type=""button"" value=""Show"" style=""width:45px;font-size:10px;margin:0px;padding:0px;"" onclick=""if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }"" /></div>" & vbNewline & " <div style=""margin: 0px; padding: 0px; border: 1px solid; border-color: #333399;"">" & vbNewline & " <div style=""display: none;"">" & vbNewline, " </div>" & vbNewline & " </div>" & vbNewline & "</div>" & vbNewline)
extratags = fString
end function
Giumer
27 January 2012, 12:22


ok I understand that you must enter the code
here:
Code:
fString = doCode(fString, "Reveal hidden content", "", "<div style=""margin:1em auto; width: 100%;"">" & vbNewline & " <div><b> Spoiler: </b><input type=""button"" value=""Show"" style=""width:45px;font-size:10px;margin:0px;padding:0px;"" onclick=""if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != ''){ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }"" /></div>" & vbNewline & " <div style=""margin: 0px; padding: 0px; border: 1px solid; border-color: #333399;"">" & vbNewline & " <div style=""display: none;"">" & vbNewline, "  </div>" & vbNewline & " </div>" & vbNewline & "</div>" & vbNewline)

and do I integrate this code
Code:
<a href=""register.asp"">You must login or register to see this content.</a> 

I tried in every way by entering what you suggested, but if dislocates comes out the words, but this code and java?
Carefree
27 January 2012, 15:10


Giumer, post a link to your "inc_func_common.asp" in .txt format and we'll edit it for you.
Giumer
27 January 2012, 22:21


http://www.giumer.it/public/filesText/inc_func_common.txt
Giumer
01 February 2012, 07:09


wow mod finish visible oly membner thx ian
Giumer
05 February 2012, 05:53


ok http://www.giumer.it/forum/topic.asp?rand=6760591&TOPIC_ID=292

spoiler visible only member code is this


[code]function extratags(fString)
fString = doCode(fString, "[quote]", "[/quote]", "<div class=""quoteboxhead"">" & fLang("strLangI_F_Common00780") & "</div><div class=""quotebox"">", "</div>")
fString = doCode(fString, "[spoiler2]", "[/spoiler2]", "<font color=""" & CColor & """>", "</font id=""" & CColor & """>")
if mLev >= 1 then
fString = doCode(fString, "[spoiler]", "[/spoiler]", "<div style=""margin:1em auto; width: 100%;"">" & vbNewline & " <div><b> Spoiler: </b><input type=""button"" value=""Show"" style=""width:45px;font-size:10px;margin:0px;padding:0px;"" onclick=""if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != ''){ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }"" /></div>" & vbNewline & " <div style=""margin: 0px; padding: 0px; border: 1px solid; border-color: #333399;"">" & vbNewline & " <div style=""display: none;"">" & vbNewline, " </div>" & vbNewline & " </div>" & vbNewline & "</div>" & vbNewline)
else
fString = doCode(fString, "[spoiler]", "[/spoiler]", "<div style=""margin:1em auto; width: 100%;"">" & vbNewline & " <div><b> Spoiler: </b><a href=""policy.asp""><B>" & fLang("strLangRegister00560") & "</B></div>" & vbNewline & " <div style=""margin: 0px; padding: 0px; border: 1px solid; border-color: #333399;"">" & vbNewline & " <div style=""display: none;"">" & vbNewline, " </div>" & vbNewline & " </div>" & vbNewline & "</div>" & vbNewline)
end if
extratags = fString
end function[/code]
© 2000-2021 Snitz™ Communications