SMF For Free Support Forum
Signup For Free Forum
July 04, 2009, 11:26:05 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1] 2
  Print  
Author Topic: [Code] Hide Posts From Guest  (Read 2906 times)
0 Members and 1 Guest are viewing this topic.
Sarah
SMF For Free Member
*
Offline Offline

Posts: 63


www.creativ.com.net.sc


View Profile WWW
« on: September 29, 2007, 06:00:36 pm »

Modification : Hide Posts from Guests
Author : Sarah , Edited By Agent Moose
Preview: None
Description: Hides the post's content from guests so they don't rip your content.
Location: Footers


Quote
<script type='text/javascript'>
//Hide Posts from Guests by Sarah
//Edited by Agent Moose (smcodes.smfforfree3.com)
//slyvion.co.nr | Don't remove copyright
var hideText = '<span style="color:red;">This post has been protected. Login or register to view</span>';
var hideFind = document.getElementsByTagName('div');
var hideGuest = $('td.titlebg2 span b').not($("td.titlebg2 span b:contains(News)")).html()
for( z=0; z<hideFind.length; z++ ){}else{
if((hideGuest != null) && (hideFind[z].className == "postcolor")){
hideFind[z].innerHTML = hideText;
};};
</script>
« Last Edit: September 29, 2007, 08:18:08 pm by Sarah » Logged

Visit my site ... www.creativ.com.net.sc
Granny1
SMF For Free Sr. Member
*
Offline Offline

Posts: 357



View Profile WWW
« Reply #1 on: October 20, 2007, 12:17:09 pm »

Forum Url: http://pogoinslowmo.smfforfree.com
Moosie, will this code totally hide all posts from guest?  If you view our forum, you can click on "View recent Post" and it will show you everything, even though we only have a "Welcome Guest" board that is suppose to be viewable by guest.  We are having problems with a person that was banned from our forum and they keep using proxies to get in, and we keep banning.  This person is also harassing a member of our forum by being able to view posts.  We could sure use some help in this matter of hiding post.
Logged

Vist us at www.pogojustpogo.smfforfree3.com
Best and Friendliest Pogo FanSite There Is!!
mr_css
SMF For Free Sr. Member
*
Offline Offline

Posts: 257



View Profile
« Reply #2 on: October 20, 2007, 12:54:44 pm »

Very nice!
Logged


            WOLFSCAPE FORUMS
Agent Moose
Moderator
*****
Offline Offline

Posts: 776


Do not PM me for Code Support or Request


View Profile
« Reply #3 on: October 20, 2007, 01:00:25 pm »

Here ya go RedKnight.  I just relised that the first code didn't work so I created my own:

Code:
<script>
var guests = '<span style="color:red;">This post has been protected. Login or register to view</span>';

//Edited by Agent Moose (smcodes.smfforfree3.com)
if($('td.titlebg2 span b').not($("td.titlebg2 span b:contains(News)")).html()){}else{
$("div.post").html(guests)
};
</script>
Logged

Want to know how good your board is?  Why not get it reviewed at Revolution X!
Granny1
SMF For Free Sr. Member
*
Offline Offline

Posts: 357



View Profile WWW
« Reply #4 on: October 20, 2007, 03:34:38 pm »

Forum Url: http://pogoinslowmo.smfforfree.com

Thank you so much Moosie, I am going to put it in right now.  I am assuming the headers is where this goes.  Gonna try it there, and if I have a problem, I will give you a shout.  Thanks again.   smitten


Edit by RedNight:   Cry  Moose it didn't work.  I tried in the headers and the footers and still as a guest I can View Recent Post.  What am I doing wrong?  
« Last Edit: October 20, 2007, 03:39:12 pm by RedNight » Logged

Vist us at www.pogojustpogo.smfforfree3.com
Best and Friendliest Pogo FanSite There Is!!
LaundryLady
Global Moderator
*
Offline Offline

Posts: 3056


Internet Challenged


View Profile
« Reply #5 on: October 20, 2007, 04:08:14 pm »

Moose:

I think what she wants to disable is this link for use by guests:

Code:
http://YourForum.smfforfreeX.com/index.php?action=recent

Can SMF make a true on/off switch for this?



Logged
Granny1
SMF For Free Sr. Member
*
Offline Offline

Posts: 357



View Profile WWW
« Reply #6 on: October 20, 2007, 06:18:14 pm »

Forum Url: http://pogoinslowmo.smfforfree.com

Here is a thumbnail of what I am talking about, and this is viewed as a Guest.  The Latest Post shows as "Welcome to PogoFinishers", BUT if you click on under that of "View the most recent posts on the forum", a Guest can view all posts and all boards and all topics.  If a Guest clicks on Home or anything they get about not being able to view and the need to register.

We are having a problem with a stalker being able to view all the things by clicking on the "View the most recent posts on the forum".  Anyone visiting our forum can see everything, not that we have anything to hide, but want to protect our member/members from this stalker or anyone else that will cause anyone problems.

Hope that explains it better.

« Last Edit: October 20, 2007, 06:19:48 pm by RedNight » Logged

Vist us at www.pogojustpogo.smfforfree3.com
Best and Friendliest Pogo FanSite There Is!!
mr_css
SMF For Free Sr. Member
*
Offline Offline

Posts: 257



View Profile
« Reply #7 on: October 20, 2007, 06:20:35 pm »

wow cool work Sarah.
Logged


            WOLFSCAPE FORUMS
Agent Moose
Moderator
*****
Offline Offline

Posts: 776


Do not PM me for Code Support or Request


View Profile
« Reply #8 on: October 21, 2007, 06:56:08 am »

Red, it worked for me just fine.  Here, I have created two codes, one is like above, the other is diffrent, but still the same concept:

http://smcodes.smfforfree3.com/index.php/topic,336.0.html
(I have updated this one above)

http://smcodes.smfforfree3.com/index.php/topic,337.0.html
Logged

Want to know how good your board is?  Why not get it reviewed at Revolution X!
Gordie
SMF For Free Hero
*
Offline Offline

Posts: 591


I'm around somewhere!!!


View Profile WWW
« Reply #9 on: October 21, 2007, 07:00:46 am »

Guests can also view recent posts via the rss feed so be careful.Just thought I'd let you know. Wink
Logged

Granny1
SMF For Free Sr. Member
*
Offline Offline

Posts: 357



View Profile WWW
« Reply #10 on: October 21, 2007, 07:18:08 am »

Whooo hoooo Moose, you are awesome.  I did the first one that you had updated, and it works.  Thank you so very much.   smitten
Logged

Vist us at www.pogojustpogo.smfforfree3.com
Best and Friendliest Pogo FanSite There Is!!
LaundryLady
Global Moderator
*
Offline Offline

Posts: 3056


Internet Challenged


View Profile
« Reply #11 on: October 21, 2007, 08:05:28 am »

That's wonderful, Moose.  Works fine on my FF, now off to test it against IE.  Sometimes what works good on FF jams up the IE loading process.
Logged
Granny1
SMF For Free Sr. Member
*
Offline Offline

Posts: 357



View Profile WWW
« Reply #12 on: October 21, 2007, 11:22:24 am »

It worked great on both FF and IE for me.  I know what you mean though about some things working on one and not the other.  I can tell you all of us at PF are so excited about this one.  We feel a lot better knowing our stalker can't see everything. 
Thanks again Moosie.   smitten
Logged

Vist us at www.pogojustpogo.smfforfree3.com
Best and Friendliest Pogo FanSite There Is!!
Agent Moose
Moderator
*****
Offline Offline

Posts: 776


Do not PM me for Code Support or Request


View Profile
« Reply #13 on: October 21, 2007, 11:24:51 am »

Your welcome RedNight.  Thanks LL for testing it on IE Smiley
Logged

Want to know how good your board is?  Why not get it reviewed at Revolution X!
LaundryLady
Global Moderator
*
Offline Offline

Posts: 3056


Internet Challenged


View Profile
« Reply #14 on: October 21, 2007, 02:51:18 pm »

Your welcome, Moose.  Anything I can do, please ask.  This might encourage people to join, read and post also.
Logged


Pages: [1] 2
  Print  
 
Jump to:  

cheap low cost web hosting reviews

Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC
ServerBeach Coupon
Page created in 0.45 seconds with 17 queries.