This topic was locked 6th Jul 08 at 6:14pm by Michael |
rosebud Junior Member
 
Posts: 73 Status: Offline Joined:
pm | [F] View Threads By Post Count? (18th Jun 08 at 1:36am UTC) | | I wasn't sure what the proper title of this code should be, but is it possible to have a code where a member has to have a certain post count set by the admin in order to view a thread/threads? | |
|
Marc vChat Developer
     I <3 Rossy
Posts: 3,388 Status: Offline Gender: Male Location: Ontario, Canada Age: 33 Joined:
Additional Groups: Coding Team
  
pmwww | Re: View Threads By Post Count? (18th Jun 08 at 1:49am UTC) | | While yes, this would be possible, it would not work perfectly. A member could easily add /noheaders/1/ to the URL and bypass the code, as well as viewing the source code to see what was posted. Also, slower computers will show the topic prior to the code fully loading.
However, if you would like, I'll still code this up for you. | |
rroll.to— Shorten a link, rickroll your friends. |
|
rosebud Junior Member
 
Posts: 73 Status: Offline Joined:
pm | Re: View Threads By Post Count? (18th Jun 08 at 2:06am UTC) | | Is there perhaps another way to go about it to make the code more secure? It'd just be nice to make a topic where only certain members with a certain post count can view it, but the admin can edit the amount of threads and posts and what not.
If not, please code this up for me. Thank-you. | |
|
Marc vChat Developer
     I <3 Rossy
Posts: 3,388 Status: Offline Gender: Male Location: Ontario, Canada Age: 33 Joined:
Additional Groups: Coding Team
  
pmwww | Re: View Threads By Post Count? (18th Jun 08 at 2:19am UTC) | | Is there perhaps another way to go about it to make the code more secure? It'd just be nice to make a topic where only certain members with a certain post count can view it, but the admin can edit the amount of threads and posts and what not.
If not, please code this up for me. Thank-you.
Unfortunately, anyone who knows about the noheaders URL trick would be able to bypass this code; no matter how secure it was made.
However, a code will keep out the majority of general users, so I'll get it coded up for you either in a few minutes if I don't fall asleep, or tomorrow afternoon. | |
rroll.to— Shorten a link, rickroll your friends. |
|
rosebud Junior Member
 
Posts: 73 Status: Offline Joined:
pm | Re: View Threads By Post Count? (18th Jun 08 at 2:23am UTC) | | I think most of them wouldn't know how to break the code or would even think of use "view source."
Thank-you! | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: View Threads By Post Count? (18th Jun 08 at 8:16am UTC) | | You can restrict BOARDS based on posts - so how about doing that? | |
|
rosebud Junior Member
 
Posts: 73 Status: Offline Joined:
pm | Re: View Threads By Post Count? (18th Jun 08 at 4:58pm UTC) | | Except this one is for viewing certain threads, not certain boards. I want my members and guests to see the rest of the threads in the forum. Also, another reason why I want this code is to give members a type of reward, but they'd have to remain active. I don't want the members to join for the sake of seeing them. | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: View Threads By Post Count? (18th Jun 08 at 7:38pm UTC) | | I can code this for you! Have you checked the database just to make sure - as I remember doing something like this in past, I could be wrong though! | |
|
rosebud Junior Member
 
Posts: 73 Status: Offline Joined:
pm | Re: View Threads By Post Count? (18th Jun 08 at 7:51pm UTC) | | I have checked the database. There are a lot of codes, though. I could have easily missed it if it was already made? | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: View Threads By Post Count? (18th Jun 08 at 8:02pm UTC) | | Yup, it's not in the index. I'll get to it later tonight - shower first! | |
|
rosebud Junior Member
 
Posts: 73 Status: Offline Joined:
pm | Re: View Threads By Post Count? (18th Jun 08 at 8:09pm UTC) | | I thought Marc was coding it? o-o | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: View Threads By Post Count? (18th Jun 08 at 8:14pm UTC) | | Psh marc sucks... I'll code it for you!
Marc coded it! | |
|
Marc vChat Developer
     I <3 Rossy
Posts: 3,388 Status: Offline Gender: Male Location: Ontario, Canada Age: 33 Joined:
Additional Groups: Coding Team
  
pmwww | Re: View Threads By Post Count? (18th Jun 08 at 8:32pm UTC) | | I said I'd code it so I did.
<script type="text/javascript"> <!-- /* Restrict Topics By Post Count Coded by Cr0w Copyright 2008 */
var min_posts = 500; var except = "test|admin|test2"; var topic = 1;
// No more edits if(vf_posts<min_posts && !vf_username.match(except) && location.href.match("topic/"+topic)){ get('forum_table','id').style.display = "none"; var tbl = '<table cellspacing="1" cellpadding="3" class="border" align="center" width="' + vf_width + '">'; tbl += '<tr><td class="title1" style="font-weight: bold">'; tbl += 'An Error Has Occurred'; tbl += '</td></tr>'; tbl += '<tr><td class="window1">'; tbl += 'This topic requires a post count of at least ' + min_posts + ' to be viewed.'; tbl += '</td></tr></table>'; document.write(tbl); } //--> </script>
Change the blue to the minimum number of posts required to see the topic.
The green is the users that can see the topic regardless of their post count. Separate each username with a |
The red is simply the ID of the topic that is being restricted.
This goes in the footer of the board that the post is in. | |
rroll.to— Shorten a link, rickroll your friends. |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: View Threads By Post Count? (18th Jun 08 at 8:37pm UTC) | | I would have used an array and had more than one thread!
BUT ... it's smex! | |
|
rosebud Junior Member
 
Posts: 73 Status: Offline Joined:
pm | Re: View Threads By Post Count? (18th Jun 08 at 8:49pm UTC) | | I pictured this differently. Adding users to view the thread just makes it hard on the admin. Isn't there a way to link the thread where the members can just gain a certain post count and when they do the thread will show? | |
|