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)
 Hidden Content for Members Only

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 - 25 July 2009 : 11:53:44
I was wanting to try to add a feature that would only be seen by members only. For example, lets say I only wanted members to see the pictures in the post. The members would see the entire post as normal:

Duis blandit nulla amet ea quis volutpat suscipit exerci eros duis dolore feugiat, commodo, duis vero, velit suscipit enim sed autem odio. Vulputate zzril blandit eum eum facilisi vero feugait iriure, et consequat. Molestie, accumsan velit ipsum praesent accumsan dolore delenit in hendrerit, at enim dolor.



Ea qui ut commodo odio consequat consectetuer augue dignissim ea ut velit sed accumsan veniam. Ut nostrud vulputate, magna nulla exerci eu in illum luptatum autem commodo nibh nibh. Augue tation hendrerit suscipit, consequat nulla enim, suscipit ea velit nulla molestie. In autem, ut consequat, exerci blandit, esse, aliquip dolore, eros veniam aliquip duis, vel.


But a non member would see something like this:

Duis blandit nulla amet ea quis volutpat suscipit exerci eros duis dolore feugiat, commodo, duis vero, velit suscipit enim sed autem odio. Vulputate zzril blandit eum eum facilisi vero feugait iriure, et consequat. Molestie, accumsan velit ipsum praesent accumsan dolore delenit in hendrerit, at enim dolor.

[This picture is for members only]

Ea qui ut commodo odio consequat consectetuer augue dignissim ea ut velit sed accumsan veniam. Ut nostrud vulputate, magna nulla exerci eu in illum luptatum autem commodo nibh nibh. Augue tation hendrerit suscipit, consequat nulla enim, suscipit ea velit nulla molestie. In autem, ut consequat, exerci blandit, esse, aliquip dolore, eros veniam aliquip duis, vel.


If I can be shown how to do that, then I think I can figure out how to make it work with other forum tags.
15   L A T E S T    R E P L I E S    (Newest First)
Carefree Posted - 31 July 2009 : 18:02:54
quote:
Originally posted by leatherlips

Thanks Carefree.

I'm getting this error:

Microsoft VBScript compilation error '800a0410' 

Invalid 'for' loop control variable 

/forum/inc_func_common.asp, line 2092 

for i=1 to len(Request.ServerVariables("URL"))


Here is the whole section of code:

if mLev=0 and inStr(fString,"[mp3") then
         for i = 1 to len(fString)
            if mid(fString,i,5)="[mp3]" then ij=i
            if mid(fString,i,6)="[/mp3]" then
               ik=i

               if inStr(Request.ServerVariables("URL"),"/") then
   for ji=1 to len(Request.ServerVariables("URL"))
      if mid(Request.ServerVariables("URL"),ji,1)="/" then
         strURL = mid(Request.ServerVariables("URL"),ji+1)
      end if
   next
else
   strURL = Request.ServerVariables("URL")
end if
left(fString,ij-1)+"<a href=""login.asp?target="& strURL &"""><img border=""0"" src=""images/members.bmp"" width=""350"" height=""56"" alt=""Members Only""></a>"+mid(fString,ik+6)



            end if
         next
         strTempString=strTextString
      end if






Well, naturally. We are re-using/defining the variable "i" within a loop - can't do that. So simply change the second series of "i" variables to "ji" and the problem will go away.
leatherlips Posted - 31 July 2009 : 17:37:42
Thanks Carefree.

I'm getting this error:

Microsoft VBScript compilation error '800a0410' 

Invalid 'for' loop control variable 

/forum/inc_func_common.asp, line 2092 

for i=1 to len(Request.ServerVariables("URL"))


Here is the whole section of code:

if mLev=0 and inStr(fString,"[mp3") then
         for i = 1 to len(fString)
            if mid(fString,i,5)="[mp3]" then ij=i
            if mid(fString,i,6)="[/mp3]" then
               ik=i

               if inStr(Request.ServerVariables("URL"),"/") then
   for i=1 to len(Request.ServerVariables("URL"))
      if mid(Request.ServerVariables("URL"),i,1)="/" then
         strURL = mid(Request.ServerVariables("URL"),i+1)
      end if
   next
else
   strURL = Request.ServerVariables("URL")
end if
left(fString,ij-1)+"<a href=""login.asp?target="& strURL &"""><img border=""0"" src=""images/members.bmp"" width=""350"" height=""56"" alt=""Members Only""></a>"+mid(fString,ik+6)



            end if
         next
         strTempString=strTextString
      end if


Carefree Posted - 31 July 2009 : 17:24:17
LOL If you say so.

In answer to the return after login, here's how you could do it (this works):


if inStr(Request.ServerVariables("URL"),"/") then
	for i=1 to len(Request.ServerVariables("URL"))
		if mid(Request.ServerVariables("URL"),i,1)="/" then
			strURL = mid(Request.ServerVariables("URL"),i+1)
		end if
	next
else
	strURL = Request.ServerVariables("URL")
end if
left(fString,ij-1)+"<a href=""login.asp?target="& strURL &"""><img border=""0"" src=""images/members.bmp"" width=""350"" height=""56"" alt=""Members Only""></a>"+mid(fString,ik+6)

Etymon Posted - 31 July 2009 : 15:44:29
quote:
Originally posted by leatherlips

Does anyone have any ideas about the two things I mentioned?

1. Getting the login link to redirect back to the post, and
2. Making the hidden content work for multiple instances of the tag being used within the same post?

I'm very appreciative of everything Carefree has done with this. He's probably getting annoyed with this (and me) by now.



Nah, Carefree loves the attention!
leatherlips Posted - 31 July 2009 : 14:09:17
Does anyone have any ideas about the two things I mentioned?

1. Getting the login link to redirect back to the post, and
2. Making the hidden content work for multiple instances of the tag being used within the same post?

I'm very appreciative of everything Carefree has done with this. He's probably getting annoyed with this (and me) by now.
leatherlips Posted - 30 July 2009 : 08:34:38
quote:
Originally posted by leatherlips

I also found a little glitch in the regular code. If more than one mp3 tag is being used in the same post, the first tag displays as text. See this post to see what I mean.


I figured out a workaround for this although it is not very elegant. I created a new mp32 tag and a mp33 tag. In the post I edit the second mp3 file to be mp32 and if there is a third mp3 tag I edit it to mp33.

If a better fix is available I'd appreciate knowing what it is.
leatherlips Posted - 29 July 2009 : 20:03:16
I'm trying to give it one more little tweak. I've made an image that will display in place of the content. My code is this:

strTextString=left(fString,ij-1)+"<a href=""login.asp""><img border=""0"" src=""./images/membersonly.gif"" width=""350"" height=""56"" alt=""Members Only""></a>"+mid(fString,ik+6)

The non member can click the image to go to the login.asp page where they can either login or register. I'm trying to make it so if they are a member and just need to login they will be redirected back to the post. I tried to do this by adding the part in red but it is not working.

strTextString=left(fString,ij-1)+"<a href=""login.asp?target=" & lcase(scriptname(ubound(scriptname))) & """><img border=""0"" src=""./images/membersonly.gif"" width=""350"" height=""56"" alt=""Members Only""></a>"+mid(fString,ik+6)

It ends up killing the tag - meaning it just displays the tag and the tags content as normal text.

I also found a little glitch in the regular code. If more than one mp3 tag is being used in the same post, the first tag displays as text. See this post to see what I mean.
leatherlips Posted - 29 July 2009 : 19:16:25
That fixed it! Thanks!

Also, Carefree, thank you so much for your help with this! You have been incredible in your diligence in getting this to work for me!
iane87 Posted - 29 July 2009 : 18:53:25
Looks like you are chopping off the < in your mid statement try replacing

strTextString=left(fString,ij-1)+"|File for Members Only|"+mid(fString,ik+7)


with


strTextString=left(fString,ij-1)+"|File for Members Only|"+mid(fString,ik+6)



leatherlips Posted - 29 July 2009 : 18:02:34
Hmmm. I did this:

strTextString=left(fString,ij-1)+"|File for Members Only|<"+mid(fString,ik+7)

And it fixed it. Seems weird though.

I added your code to my mp3jw tag and it places an extra ] at the end of the message. I have no idea where it is getting the extra /br > and ] from in those tags.
leatherlips Posted - 29 July 2009 : 17:49:19
quote:
Originally posted by Carefree

Look at your tag definitions:
<div class=""break""></div>


I removed it but it had no effect.
Carefree Posted - 29 July 2009 : 17:45:46
Look at your tag definitions:
<div class=""break""></div>
leatherlips Posted - 29 July 2009 : 17:40:42
Now it is working! It is only hiding the mp3 file! Thanks!

One slight issue...

It is replacing the file with:

|File for Members Only|br />


I can't see why it is putting that unclosed break in:

if mLev=0 and inStr(fString,"[mp3") then
         for i = 1 to len(fString)
            if mid(fString,i,5)="[mp3]" then ij=i
            if mid(fString,i,6)="[/mp3]" then
               ik=i
               strTextString=left(fString,ij-1)+"|File for Members Only|"+mid(fString,ik+7)
            end if
         next
         strTempString=strTextString
      end if
Carefree Posted - 29 July 2009 : 16:10:24
Got it working, only hides the MP3 portion now. Get your file same link.
Carefree Posted - 29 July 2009 : 07:22:22
I know what is happening, Leather. I'll have to do a substring extraction of the mp3 tagged area of a post and only effect that portion. I'll try and do it today for you.

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