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)
 Spoiler Tag Links
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

leatherlips
Senior Member

USA
1838 Posts

Posted - 26 January 2012 :  06:09:09  Show Profile  Visit leatherlips's Homepage  Reply with Quote
Try this code:

In inc_func_common.asp look for:

extratags = fString
end function


Above that add this:

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.

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 27 January 2012 17:33:28
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 26 January 2012 :  07:34:58  Show Profile  Reply with Quote
quote:
Originally posted by leatherlips
(most likely by Carefree)



LOL - yeah, looks like something I wrote (dual letter variables).
Go to Top of Page

Giumer
Junior Member

Italy
163 Posts

Posted - 26 January 2012 :  09:49:29  Show Profile  Send Giumer an ICQ Message  Reply with Quote
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!

=======================
http://www.Giumer.it/forum

=======================
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 26 January 2012 :  15:43:03  Show Profile  Visit leatherlips's Homepage  Reply with Quote
The code I posted above should hide the spoiler from nonmembers and show them a link to register. Did it not work?

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

Giumer
Junior Member

Italy
163 Posts

Posted - 26 January 2012 :  22:41:03  Show Profile  Send Giumer an ICQ Message  Reply with Quote
exactly does not work! I need the code to hide the spoiler from non-registered and will read them appear you need to register

=======================
http://www.Giumer.it/forum

=======================
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 27 January 2012 :  06:04:40  Show Profile  Visit leatherlips's Homepage  Reply with Quote
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.

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

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 27 January 2012 :  09:07:47  Show Profile  Reply with Quote
quote:
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):


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

Edited by - Carefree on 27 January 2012 09:09:42
Go to Top of Page

Giumer
Junior Member

Italy
163 Posts

Posted - 27 January 2012 :  09:31:13  Show Profile  Send Giumer an ICQ Message  Reply with Quote
I figured if I insert it so? :

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, "
quote:
", "
", "<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, "", "", "<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

=======================
http://www.Giumer.it/forum

=======================

Edited by - Giumer on 27 January 2012 09:32:46
Go to Top of Page

Giumer
Junior Member

Italy
163 Posts

Posted - 27 January 2012 :  12:22:19  Show Profile  Send Giumer an ICQ Message  Reply with Quote
ok I understand that you must enter the code
here:
fString = doCode(fString, "", "", "<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
<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?

=======================
http://www.Giumer.it/forum

=======================
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 27 January 2012 :  15:10:48  Show Profile  Reply with Quote
Giumer, post a link to your "inc_func_common.asp" in .txt format and we'll edit it for you.
Go to Top of Page

Giumer
Junior Member

Italy
163 Posts

Posted - 27 January 2012 :  22:21:00  Show Profile  Send Giumer an ICQ Message  Reply with Quote
http://www.giumer.it/public/filesText/inc_func_common.txt

=======================
http://www.Giumer.it/forum

=======================
Go to Top of Page

Giumer
Junior Member

Italy
163 Posts

Posted - 01 February 2012 :  07:09:51  Show Profile  Send Giumer an ICQ Message  Reply with Quote
wow mod finish visible oly membner thx ian

=======================
http://www.Giumer.it/forum

=======================
Go to Top of Page

Giumer
Junior Member

Italy
163 Posts

Posted - 05 February 2012 :  05:53:36  Show Profile  Send Giumer an ICQ Message  Reply with Quote
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]

=======================
http://www.Giumer.it/forum

=======================
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous 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.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07