Author |
Topic |
Icaro
Starting Member
3 Posts |
Posted - 06 June 2007 : 11:39:47
|
hi:
Im new for snitz, i implemented lots of mods without problems but im looking for an specific mod that hides some of the content inside a post (a link or a text) by using [hide][/hide] tags, so when a non logged user is viewing the post he will only see a MSG saying "Hidden Content, Please Log in"
I tried to do it myself but i couldnt make it work, i added some lines on inc_func_common.asp i think it have to do something with:
if mlev > 0 then... but i dont know what the following line should be
I was thinking also about a feature that unhides the content (of a topic) only when you post a reply...
Any ideas on how can i do this?
thanks in advance.< |
|
cripto9t
Average Member
USA
881 Posts |
|
Icaro
Starting Member
3 Posts |
Posted - 13 June 2007 : 18:35:41
|
Thanks for your help! Thats what i was looking for...< |
|
|
muzishun
Senior Member
United States
1079 Posts |
Posted - 14 June 2007 : 01:45:59
|
To help consolidate and give you a couple more options, here are three different hide tags that I use on my forum. They are for three different purposes.
[spoiler][/spoiler] This one creates a box around the spoiler text with a button that shows or hides the content of the box dynamically. For longer sections of a page that you want to hide, and for times you want to have other forum code within your hidden text.
[spoiler2][/spoiler2] This one is mostly for hiding a few lines of text. Just creates a shaded box where the text is the same color as the background.
[hidden][/hidden] This one has a check from topic.asp that, if the user isn't logged in (or if a guest visits the page), the text within these tags is replaced with a message that the user needs to log in to see the hidden text.
[modnote][/modnote] Basically the same as the one above, but text is hidden from normal users and guests. Useful for moderators and Admins to make notes to each other about posts.
I can provide you with the code I use for these if you want. Most of it has been posted here in the past, so you should be able to find it with some searching (and also at the link cripto9t mentioned above).< |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
Edited by - muzishun on 14 June 2007 01:47:57 |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 14 June 2007 : 07:38:09
|
go ahead and post it all in one spot - makes it easier to point people to a central location as opposed to "this topic has this bit, and that one has that bit, oh, and that one has part of what you need..." < |
|
|
bobby131313
Senior Member
USA
1163 Posts |
|
muzishun
Senior Member
United States
1079 Posts |
Posted - 15 June 2007 : 00:21:42
|
In inc_func_common.asp, find the extratags function and replace it with this (or just add the spoiler parts to your function) and add the two functions beneath it:
Then, in topic.asp, do a search for the following text: "if Request.QueryString("SearchTerms") <> """. This should happen twice, and it's at the parts of topic.asp that display the text for the posts. Here's how I've got these working with the nested If..Then statements. You may or may not need to tweak it for your own forums.
and
Lastly, wherever you have your CSS information (mine is in a separate CSS file, but the base Snitz has it in inc_header.asp), add the following CSS info.
Again, you'll probably have to tweak this to work with your individual forums. I've got a couple functions that translate the forum values for font sizes and colors into something that will validate and work across different browsers.
If there are any questions, ask away!
Edit: Flippin' forum code. I forgot there was a spoiler tag on this forum... I couldn't figure out for the life of me why the text wasn't showing up right in the post. Fixed now.< |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
Edited by - muzishun on 15 June 2007 00:24:40 |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 15 June 2007 : 08:50:00
|
Thanks. I've got it bookmarked for when I need to point someone to it later on.
Actually, now that I thin about it, I'll probably add the [modnote] tag to my forums.< |
Edited by - AnonJr on 15 June 2007 08:51:05 |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 15 June 2007 : 12:29:23
|
You guys ... my wife has an art site where some of the gals sometimes post anatomically correct images for reference when working on sculptures, so I think I will add a [COPPA][/COPPA] tag to my forums. This will hide "member-deemed" adult content from children who are also members and also from non-forum members.
This will not only be for images but also for adult language and humor. I'll try to figure a way to have the members include this tag when posting as well as educate them on the benefits of becoming more "child-friendly" when making posts.
I'd like to see the SmileManager Plus for Snitz 3.4 (http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=33807) be adapted to custom posting tags like we are talking about in this topic. I'm not available for it at the moment but would be willing to give it a go later as I have time. Anyone interested in helping to see if it is feasible or even possible? < |
Edited by - Etymon on 15 June 2007 12:33:19 |
|
|
muzishun
Senior Member
United States
1079 Posts |
Posted - 16 June 2007 : 23:43:33
|
I like the idea of a COPPA tag, and I don't really think it would be that hard. The only thing that I see becoming a problem is when you start to have too many tags and your users can't figure out which way is up. I've been thinking about reworking the way post.asp is layed out as well as redoing the forum code tutorial page to address some of these issues as I add mods to my forum.< |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
|
|
Icaro
Starting Member
3 Posts |
Posted - 21 June 2007 : 11:54:22
|
Wow!!!... thanks a lot muzishun, i've been trying to implement that reference code but it seems to work only with the response.write line and not on the post itself but with your help, it should be a lot more easier.
Maybe you should publish this on www.snitzbitz.com
Thanks!...< |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 08 May 2008 : 01:22:53
|
Hope you don't mind if I drag this horse back to the water.
I added the functions to inc_func_common.asp and replaced the search terms functions in topic.asp; however, when I preview a topic with the [modnote] attribute, it merely shows [modnote]xxx[/modnote] - it seems to ignore the function altogether. Should the preview act like that?
Well, I used it in a post and it's ignored there too. Guess I must have missed something.< |
Edited by - Carefree on 08 May 2008 01:24:39 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 14 June 2008 : 09:49:04
|
I'm not good with css. Could someone convert this to Response Write format? When I tried to convert it, I got a blank page at default.asp - not exactly what I was hoping for. < |
|
|
leatherlips
Senior Member
USA
1838 Posts |
|
leatherlips
Senior Member
USA
1838 Posts |
|
leatherlips
Senior Member
USA
1838 Posts |
Posted - 21 June 2009 : 21:37:13
|
I'm trying to figure out how to modify the hidden text code. What I want is to make a tag that is hidden from everyone unless they belong to a certain private forum.
The reason I want this is because sometimes my members will mention things in the private forum in the open public forum. I'd like to edit their posts with the hidden tag so that the private forum members will see it but the regular members and visitors will not see it.
I've been trying to add something like this but can't get it to work:
dim isAllowed isAllowed=chkForumAccess(1,MemberID,false) if isAllowed then
function HideText(txt,mode) If mode = 1 Then Set regEx = New RegExp regEx.Pattern = "\[hidden.*?\/hidden\]" regEx.IgnoreCase = True regEx.Global = True Set Matches = regEx.Execute(txt) HideText = regEx.Replace(txt, "<p><strong>This section of text is private.</strong></p>") Else 'mode = 2 txt = Replace(txt,"[hidden]","") txt = Replace(txt,"[/hidden]","") HideText = txt End If end function |
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 |
|
|
Topic |
|