Advertise Here

Author Topic: How to password protect certain post/topic from guest ?  (Read 16735 times)

0 Members and 1 Guest are viewing this topic.

Offline King_Star

  • SMF For Free Member
  • *
  • Posts: 61
    • View Profile

  • Total Badges: 9
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 50 Posts
How to password protect certain post/topic from guest ?
« on: January 30, 2010, 10:42:30 pm »
Yeah frendz I want to keep password protection for certain topic on board specially for the guest. only register user can get access of it. if guest visit that particular post then login/register dialouge box should appear.

So what are the code for that ?

will anyone help me here ?
Please

Offline Seldom Fail

  • Helpers
  • *
  • Posts: 2082
  • Helping for 3 years! :)
    • View Profile
    • My Site!

  • Total Badges: 26
    Badges: (View All)
    Sixth year Anniversary Fifth year Anniversary Apple User Search Poll Voter
Re: How to password protect certain post/topic from guest ?
« Reply #1 on: January 30, 2010, 10:48:41 pm »
You can modify the boards so that guests can't view them. There's also a password protect code in the code index for certain boards.

No way to do it for one specific topic though.
<--- Donate to SMF For Free! :D

Offline King_Star

  • SMF For Free Member
  • *
  • Posts: 61
    • View Profile

  • Total Badges: 9
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 50 Posts
Re: How to password protect certain post/topic from guest ?
« Reply #2 on: January 30, 2010, 11:01:15 pm »
Please give me link of it

Offline Andrew

  • Helpers
  • *
  • Posts: 2060
  • Andrew at your service
    • View Profile
    • Alabama Weather Prediction

  • Total Badges: 32
    Badges: (View All)
    10 Poll Votes Level 6 Eighth year Anniversary Seventh year Anniversary Sixth year Anniversary
Re: How to password protect certain post/topic from guest ?
« Reply #3 on: January 31, 2010, 12:57:47 am »

Offline King_Star

  • SMF For Free Member
  • *
  • Posts: 61
    • View Profile

  • Total Badges: 9
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 50 Posts
Re: How to password protect certain post/topic from guest ?
« Reply #4 on: January 31, 2010, 01:18:10 am »
your help appreciated andrew but see in starting of this post what actully i want. I mean only few post are guest able to see and too  see some of the guest have to register. (a message should appear that to see particular text u must register with loging dialouge box)

Offline simply sibyl

  • Helpers
  • *
  • Posts: 14347
  • On hiatus
    • View Profile
    • The Tent Dwellers

  • Total Badges: 31
    Badges: (View All)
    Level 6 Poll Voter Webmaster Arcade Highscore Windows User
Re: How to password protect certain post/topic from guest ?
« Reply #5 on: January 31, 2010, 01:29:40 am »
There isn't a code here or any way to do that.  Like Seldom said, there is a code to password a Board.   There is not one to password protect a particular thread or post.

Only options are the code Andrew posted or block boards from Guests as Seldom suggested.

Offline Redirect*

  • SMF For Free Newbie
  • *
  • Posts: 8
    • View Profile

  • Total Badges: 5
    Badges: (View All)
    Topic Starter Level 1 First Post Second year Anniversary One year Anniversary
Re: How to password protect certain post/topic from guest ?
« Reply #6 on: March 15, 2010, 07:10:01 am »
You can protect the board from guests viewing it or any other member group.

Simply please go to your administration control panel and then go to the boards section, edit the board and checkout for the permissions.  This method will block the guest or a chosen member group member from viewing all it's board, and they will not be able to see it in the home page of your SMF For Free Forum's.  This is also applied to all Simple Machines Forums.

Offline decoy

  • SMF For Free Member
  • *
  • Posts: 77
    • View Profile
    • Toon Union

  • Total Badges: 13
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: How to password protect certain post/topic from guest ?
« Reply #7 on: May 13, 2010, 09:59:03 am »
love it also wanted to ask with this code can you password protect multiple boards with haveing to add the whole code again

Offline Seldom Fail

  • Helpers
  • *
  • Posts: 2082
  • Helping for 3 years! :)
    • View Profile
    • My Site!

  • Total Badges: 26
    Badges: (View All)
    Sixth year Anniversary Fifth year Anniversary Apple User Search Poll Voter
Re: How to password protect certain post/topic from guest ?
« Reply #8 on: May 13, 2010, 02:28:24 pm »
love it also wanted to ask with this code can you password protect multiple boards with haveing to add the whole code again

Yes. I'm pretty sure the instructions for the code are in the code's originial post.
<--- Donate to SMF For Free! :D

Offline decoy

  • SMF For Free Member
  • *
  • Posts: 77
    • View Profile
    • Toon Union

  • Total Badges: 13
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: How to password protect certain post/topic from guest ?
« Reply #9 on: May 16, 2010, 01:38:17 am »
i clicked the link above and read through it all gives the code just does not say how to do it for extra topics do i put the whole code in for another topic or can i just add something to this code

<script>
var TopicPro = "TOPIC"
var PassPro = "PASSWORD"

var loc = window.location.href.split("/index.php")[0];
//Created by Agent Moose (smcodes.smfforfree3.com)
//Modified by Stewie343
function ChangeThing(){
$("a[name='b"+TopicPro+"']").each(function(){
$(this).parent().parent().next().html("")
});};
function PassProtected(){
if(location.href.match("/topic,"+TopicPro)){
$("#bodyarea").hide()
$("#bodyarea").after("<br><br><div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle; text-align: center; '>Topic Protected</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'><center><br><i>Enter Password:<br>(Password is Case Sensitive)</i><br><input type='text' id='passprotected'/><br><br><input type='button' onclick='PressButton()' value='Enter'/></center></td></tr></table></div></div><br>")
};};
function PressButton(){
password = document.getElementById("passprotected");
if(password.value == PassPro){
window.location.href = loc+"/index.php/Protected/topic,"+TopicPro+".0."+PassPro+".html"
}else if(password.value == ""){
alert("Enter a Password");
}else{
alert("Password is incorrect");
};};
if(location.href.match("/Protected/topic,"+TopicPro+".0."+PassPro+".html")){
}else{
PassProtected();
ChangeThing();
};
</script>

Offline Agent Moose

  • Moderator
  • *****
  • Posts: 836
  • Do not PM me for Code Support or Request
    • View Profile

  • Total Badges: 32
    Badges: (View All)
    Search Level 6 Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary
Re: How to password protect certain post/topic from guest ?
« Reply #10 on: May 16, 2010, 11:29:29 pm »
Just because, I shall update that code :)
Check out Revolution X's Brand new Code Index!

 

Related Topics

  Subject / Started by Replies Last post
8 Replies
2962 Views
Last post January 17, 2008, 06:22:54 am
by LaundryLady
3 Replies
2086 Views
Last post October 16, 2008, 12:37:37 pm
by Josh[y]
1 Replies
1745 Views
Last post October 17, 2008, 07:24:53 pm
by Agent Moose
1 Replies
827 Views
Last post October 23, 2008, 06:45:51 am
by Crasy
55 Replies
22444 Views
Last post September 07, 2012, 04:08:19 am
by clairebear