The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

How do I make users see only their started threads in a forum?

View previous topic View next topic Go down

Solved How do I make users see only their started threads in a forum?

Post by Zellogi on February 24th 2015, 7:08 am

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?


Last edited by Zellogi on February 25th 2015, 11:13 am; edited 1 time in total

Zellogi
Forumember

Male Posts : 38
Reputation : 1
Language : English
Location : USA

http://nogamenostory.userboard.net/

Back to top Go down

Solved Re: How do I make users see only their started threads in a forum?

Post by Zellogi on February 25th 2015, 6:39 am

Bump.. no response yet.

Zellogi
Forumember

Male Posts : 38
Reputation : 1
Language : English
Location : USA

http://nogamenostory.userboard.net/

Back to top Go down

Solved Re: How do I make users see only their started threads in a forum?

Post by _Twisted_Mods_ on February 25th 2015, 7:00 am

i have posted a script for this before just give me time to search threw my post and see if i can find it

_Twisted_Mods_
Helper
Helper

Male Posts : 2020
Reputation : 299
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: How do I make users see only their started threads in a forum?

Post by _Twisted_Mods_ on February 25th 2015, 9:48 am

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
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

_Twisted_Mods_
Helper
Helper

Male Posts : 2020
Reputation : 299
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: How do I make users see only their started threads in a forum?

Post by Zellogi on February 25th 2015, 10:20 am

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?

Zellogi
Forumember

Male Posts : 38
Reputation : 1
Language : English
Location : USA

http://nogamenostory.userboard.net/

Back to top Go down

Solved Re: How do I make users see only their started threads in a forum?

Post by _Twisted_Mods_ on February 25th 2015, 10:43 am

you will have to open a new topic for the html page

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

_Twisted_Mods_
Helper
Helper

Male Posts : 2020
Reputation : 299
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: How do I make users see only their started threads in a forum?

Post by Zellogi on February 25th 2015, 11:12 am

Thank you. This solves my question.

Zellogi
Forumember

Male Posts : 38
Reputation : 1
Language : English
Location : USA

http://nogamenostory.userboard.net/

Back to top Go down

Solved Re: How do I make users see only their started threads in a forum?

Post by Van-Helsing on February 25th 2015, 12:03 pm

Hello @Zellogi,
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>');
    }
    });

Van-Helsing
Hyperactive

Male Posts : 2198
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: How do I make users see only their started threads in a forum?

Post by _Twisted_Mods_ on February 25th 2015, 12:16 pm

thats for post not topics

_Twisted_Mods_
Helper
Helper

Male Posts : 2020
Reputation : 299
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: How do I make users see only their started threads in a forum?

Post by _Twisted_Mods_ on February 25th 2015, 12:16 pm

Topic solved and archived

_Twisted_Mods_
Helper
Helper

Male Posts : 2020
Reputation : 299
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum