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)
 Hidden Content for Members Only
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

leatherlips
Senior Member

USA
1838 Posts

Posted - 25 July 2009 :  11:53:44  Show Profile  Visit leatherlips's Homepage  Reply with Quote
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.

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 25 July 2009 11:55:19

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 25 July 2009 :  12:07:17  Show Profile  Visit HuwR's Homepage  Reply with Quote
it would be different for different tags, as they are not all parsed by the same function

The code is in inc_func common, the majority of codes are parsed using the docode function, image however are parsed in the ReplaceImageTags function.

I will take a look at the code later and work out where to put your code if you get stuck
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 25 July 2009 :  22:41:54  Show Profile  Visit leatherlips's Homepage  Reply with Quote
OK, I've tried to do something and I kind of have it working. But it does this:

[This picture is for members only]Full URL of the image

It does not show the picture but then it does show the full url of the pictures location. How can I get rid of the URL?

This is what I changed in inc_func_common.asp:

ImgTags(1,1,1) = "[img ]"
ImgTags(1,2,1) = "[/img]"
ImgTags(1,1,2) = "<img name='img' src="""
ImgTags(1,2,2) = """ border=""0"" style='cursor:default'

I changed it to this:

ImgTags(1,1,1) = "[img ]"
ImgTags(1,2,1) = "[/img]"
     if mlev > 0 then
ImgTags(1,1,2) = "<img name='img' src="""
ImgTags(1,2,2) = """ border=""0"" style='cursor:default' onClick='doimage(this,event)'>"
     else
ImgTags(1,1,2) = "<div>[This picture is for members only]"
ImgTags(1,2,2) = "</div>"
     end if

Where is it getting the URL from?

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 25 July 2009 22:43:24
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 26 July 2009 :  03:41:40  Show Profile  Visit HuwR's Homepage  Reply with Quote
you need to do the change where it does the replace rather than where it defines the tags, all you have done is replace the [img] tags, not what was inside them.
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 26 July 2009 :  05:41:08  Show Profile  Reply with Quote
Something like this may do ya ....


Look for the following line (appx: 1281)

	ReplaceImageTags = strTempString



Change it to say:

	if mLev > 0 then
		ReplaceImageTags = strTempString
	else
		if instr(strTempString,"<img") then
			ReplaceImageTags = "<div>[Image for members only!]</div>"
		else
			ReplaceImageTags = strTempString
		end if
	end if

Edited by - Carefree on 26 July 2009 20:18:57
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 26 July 2009 :  09:27:55  Show Profile  Visit leatherlips's Homepage  Reply with Quote
Carefree, I tried what you suggested. It however seems to replace everything with that. I'm not sure why. Take a look at my test forum: www.mangionemagic.com/forumtest

It replaced the forum descriptions, signatures along with the pictures and any other tags in use.

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

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 26 July 2009 :  18:09:27  Show Profile  Reply with Quote
OK, I have had a look at this and very simple to do, around line 999 of of a fresh inc_func_common.asp:

Change the following code:

					If strFirstPart <> "" Then
						If UCase(Left(strFirstPart, 5)) = "[IMG]" Then
							ReplaceURLs = ReplaceURLs & "<a href=""" & strArray2(0) & """ target=""_blank"">" & strFirstPart & "</a>" & strSecondPartf
						ElseIf UCase(Left(strArray2(0), 7)) = "http://" Then


To the following:

					If strFirstPart <> "" Then
						If UCase(Left(strFirstPart, 5)) = "[IMG]" Then
							if mlev > 0 then
								ReplaceURLs = ReplaceURLs & "<a href=""" & strArray2(0) & """ target=""_blank"">" & strFirstPart & "</a>" & strSecondPart
							else
								Response.Write	"<div>[This picture is for members only]</div><br />"
							end if
						ElseIf UCase(Left(strArray2(0), 7)) = "http://" Then


It worked for me. Let me know how you go.

Cheers,

David Greening
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 26 July 2009 :  19:17:23  Show Profile  Visit leatherlips's Homepage  Reply with Quote
Classicmotorcycling,

I don't have any of the code you listed. I think I remember a long time ago changing that to make any link that pointed to a page in my site to open in the same window. Here is the section of code I have that I think resembles what you are referring to. The part in red is what I tried to add according to your directions. It currently does not work for me. The pictures show rather you are logged in or not.

if instr(ucase(strArray2(0)),"MANGIONEMAGIC.COM")>0 then
                     ReplaceURLs=ReplaceURLs&roTag&strArray2(0)&rc3Tag&strFirstPart&rc2Tag&strSecondPart
                  elseif ucase(left(strFirstPart,5))="[IMG]" then
if mlev > 0 then
                     ReplaceURLs=ReplaceURLs&"<a href="""&strArray2(0)&""" target=""_blank"">"&strFirstPart&"</a>"&strSecondPart
else
	Response.Write	"<div>[This picture is for members only]</div><br />"
end if
                  elseif ucase(left(strArray2(0),7))="http://" then

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 26 July 2009 19:23:27
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 26 July 2009 :  20:07:45  Show Profile  Reply with Quote
quote:
Originally posted by leatherlips

Carefree, I tried what you suggested. It however seems to replace everything with that. I'm not sure why. Take a look at my test forum: www.mangionemagic.com/forumtest

It replaced the forum descriptions, signatures along with the pictures and any other tags in use.



OK, I put a condition to check for the presence of a image tag before making the change. Try the new version. It works here.

Edited by - Carefree on 26 July 2009 20:19:35
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 26 July 2009 :  21:57:42  Show Profile  Visit leatherlips's Homepage  Reply with Quote
Carefree,

It works a little better. But it is also hiding my mp3 tags along with the img tags.

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 - 26 July 2009 :  22:06:17  Show Profile  Reply with Quote
quote:
Originally posted by leatherlips

Carefree,

It works a little better. But it is also hiding my mp3 tags along with the img tags.



That shouldn't be possible. It only hides strings which include "<img". Post a link to your "inc_func_common.asp" in .txt for me to look at.

Edited by - Carefree on 26 July 2009 22:10:25
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 26 July 2009 :  22:25:58  Show Profile  Visit leatherlips's Homepage  Reply with Quote
Here it is. Thanks for looking.

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 - 26 July 2009 :  23:41:39  Show Profile  Reply with Quote
The code I wrote isn't in the file. Where did you make the changes?
Here's your "inc_func_common.asp" with the changes applied.


Edited by - Carefree on 26 July 2009 23:56:01
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 27 July 2009 :  07:20:20  Show Profile  Visit leatherlips's Homepage  Reply with Quote
Sorry about that. I removed the code after it wasn't working. I did insert it just like you did though.

I went ahead and uploaded your version and it is doing the same thing.

My biggest thing is to hide the mp3 files from non members. I tried adding your code to the mp3 replace tag section but it doesn't do anything. Maybe my mp3 tag is not correct.

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 July 2009 :  17:12:13  Show Profile  Reply with Quote
I'll look at the mp3 portion to check for you.
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 27 July 2009 :  18:14:45  Show Profile  Reply with Quote
OK I have it working for hiding MP3s on my server. Try the file for yours.
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next 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.29 seconds. Powered By: Snitz Forums 2000 Version 3.4.07