How do I make users see only their started threads in a forum?
3 posters
Page 1 of 1
How do I make users see only their started threads in a forum?
Okay, I'm an administrator of a forum, me and my friend (he's the founder) are making it for a game we play, and we have a section where you can report other players for stuff like hacking or glitch abuse. We wanted to make it so threads can be seen by moderators, administrators, and only the user who started it. For example:
We have Admin, Player 1, and Player 2.
Player 1 reports Player 2 for hacking.
Player 1 and Admin can see the thread, Player 2 cannot.
Now, I know you can assign usergroups to prevent viewing, but that's not what I mean. I want the "Player Report" section to be visible, but not the threads inside. I want them to be viewable only by staff members and the user who started it. Kind of like a support ticket is only visible to the staff and person who created it. Is it possible to make a forum like this?
We have Admin, Player 1, and Player 2.
Player 1 reports Player 2 for hacking.
Player 1 and Admin can see the thread, Player 2 cannot.
Now, I know you can assign usergroups to prevent viewing, but that's not what I mean. I want the "Player Report" section to be visible, but not the threads inside. I want them to be viewable only by staff members and the user who started it. Kind of like a support ticket is only visible to the staff and person who created it. Is it possible to make a forum like this?
Last edited by Zellogi on February 25th 2015, 11:13 am; edited 1 time in total
Re: How do I make users see only their started threads in a forum?
i have posted a script for this before just give me time to search threw my post and see if i can find it
Re: How do I make users see only their started threads in a forum?
ok well i never posted it because the issue was solved b4 i could they ended up useing groups
before you decide to do this i just want to let you know this is going to be pointless if someone disables javascript
but anyways goto acp>modules>javascript management
create a name script
title:your choice
placement : in sub forums
copy and paste the code below
replace
with the end of the forum url the topics will be in
then save
also something i would recommend that would be more secure is a html form that the user can fill out and it will send you a pm
before you decide to do this i just want to let you know this is going to be pointless if someone disables javascript
but anyways goto acp>modules>javascript management
create a name script
title:your choice
placement : in sub forums
copy and paste the code below
- Code:
$(function(){
if(_userdata.user_level==1) return;
var forumid = "/f6-spell-list";
if(location.pathname==forumid){
$('.forumline tbody > tr > td >.topictitle').each(function(){
var aname = $(this).parent().parent().find('.name').text();
if(_userdata.username==aname){}else{
$(this).parent().parent().remove();
};
});
};
});
replace
- Code:
/f6-spell-list
with the end of the forum url the topics will be in
then save
also something i would recommend that would be more secure is a html form that the user can fill out and it will send you a pm
Re: How do I make users see only their started threads in a forum?
Thank you for your help, I will give the javascript a try. If you don't mind, can you also post how to create the HTML form, because I'm not sure how to do that. I appreciate your help though!
Edit:
After testing the JavaScript, it works in hiding the topic from the forum, but I can still access the topic I posted through the "Last Posts" section. Is there a way to disable that too?
Edit:
After testing the JavaScript, it works in hiding the topic from the forum, but I can still access the topic I posted through the "Last Posts" section. Is there a way to disable that too?
Re: How do I make users see only their started threads in a forum?
you will have to open a new topic for the html page
but for the last post
create a new script
placement:homepage
replace yourforumtitle with the title of the forum .. its cap sensitive
but for the last post
create a new script
placement:homepage
- Code:
$(function(){
$('.forumline tr:contains(yourforumtitle) td:last').attr('style','display:none');
});
replace yourforumtitle with the title of the forum .. its cap sensitive
Re: How do I make users see only their started threads in a forum?
Thank you. This solves my question.
Re: How do I make users see only their started threads in a forum?
Hello @Zellogi,
Another solution is to create a new javascript as a second solution:
Placement: In the topics
and add the following code:
Another solution is to create a new javascript as a second solution:
Placement: In the topics
and add the following code:
- Code:
$(function(){
var login = _userdata["session_logged_in"];
if(login === 0) {
var message ='<img style="margin-right:6px;vertical-align: middle;" src="http://i.imgur.com/b8PNmbE.png" /><p style="display:inline; position:relative; top:1px;">To view this post you need to <a href="/register">Register</a> or <a href="/login" rel="hideodsigin">Login</a> on your account.</p>';
var p = $('.post').find('.postbody div:eq(0)');
var post1 = $('.post').find('.postbody div:eq(0)')[0];
$(p).not(post1).html('<div style="background-color:rgba(255,217,217,.5); border:1px solid rgba(255,100,100,.7); border-radius:2px; padding:8px 12px;">
'+message+'</div>');
}
});
Similar topics
» Is it possible to have users submit threads but be unable to see other submissions?
» How to make a requirement that new users post in a specific forum before any others?
» How do I make it so users require 10 posts to post in the 'General Discussion' forum?
» Requiring users to be logged in to see threads
» iPad users cannot create threads!?
» How to make a requirement that new users post in a specific forum before any others?
» How do I make it so users require 10 posts to post in the 'General Discussion' forum?
» Requiring users to be logged in to see threads
» iPad users cannot create threads!?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum