[DEV] Zero and X-Poster Topic Restriction v.0.0.2 (update)

DEV-Area for phpBB 3.0.x

[DEV] Zero and X-Poster Topic Restriction v.0.0.2 (update)

Postby 4seven » Thu 20. May 2010, 04:32 | Userzeit: +1.00 / Do 20. Mai 2010, 05:32

Zero and X-Poster Topic Restricion v.0.0.2

MOD-Title: Zero and X-Poster Topic Restriction
MOD-Version: 0.0.2
MOD-Author: 4seven

Request by: sliar
Request Thread: http://www.phpbb.com/community/viewtopi ... 56&start=0

MOD-Description: prevent the reading, quoting and searching of topics for zero- or x-posters.

MOD-Demo: http://4seven.bplaced.net/phpbb3/index.php
(Login as user: ZatanglE / pw: testtest) restricted is forum-id 10
phpBB-Version: phpBB 3.0.x
phpBB-Languages: en
phpBB-Styles: prosilver, subsilver2

Image

Download:
Download
Zero_and_X-Poster_Topic_Restriction.zip
(32.32 KiB) Downloaded 288 times


Features:
With this Mod you prevent the reading, quoting and searching of topics for zero- or x-posters.
User must post at least one or x posts to have full access.
U can set, which forum is restricted.

Search ist exceptionless highly restricted for zero- or x-posters

All these things are restricted for Guests, too



Working Mode

Search:
- by trying to search trigger error

Post / View:
- by trying to quote trigger error
- by reply topic review is invisible
- posts in viewtopic are hidden, but have info-text



To-Do after Install

Important:

After install, search for

$sql_users['user_posts'] < 1


in posting.php, search.php and viewtopic.php

and change the number from 1 to eg. 5

$sql_users['user_posts'] < 5


to set the amount to 5

and change the number in edits for language/en/common.php also to 5

-------------------------

Also don't forget to enter your forum-id's in posting.php and viewtopic.php:

Code: Select all
// Set here which forum u want to restrict
        $forum_to_restrict = array(10,11);
        // Enter forum-id as given: 10,12,14,17          


Clear all Board-, Style- and Browser-Caches



changes in v.0.0.2:
- fixing little hurry-up's in instruction
- fixing readables by guest
- adding subsilver2

fix #1 for v.0.0.2:
Update for Attachments, which are not insert as inline
viewtopic.php?p=1598#p1598
User avatar
4seven
Administrator
 
Posts: 427
 
Last 3 Topics:
Tabmenu Test
[Snippet] Avatar Ev...
[DEV] Zero and X-P...
 
Joined:
Sun 13. Jan 2008, 23:44
 
Letzter Login:
Mon 1. Aug 2022, 16:40
 
Posted:
Thu 20. May 2010, 04:32 +1.00
Userzeit: Do 20. Mai 2010, 05:32

Re: [DEV] Zero and X-Poster Topic Restriction v.0.0.2 (upda

Postby 4seven » Thu 27. May 2010, 15:19 | Userzeit: +1.00 / Do 20. Mai 2010, 05:32

Update for Attachments, which are not insert as inline

-- package is updated --

open

styles/prosilver/template/viewtopc.body.html

find

Code: Select all
            <!-- IF postrow.S_HAS_ATTACHMENTS -->
                <dl class="attachbox">
                    <dt>{L_ATTACHMENTS}</dt>
                    <!-- BEGIN attachment -->
                        <dd>{postrow.attachment.DISPLAY_ATTACHMENT}</dd>
                    <!-- END attachment -->
                </dl>
            <!-- ENDIF -->     


replace with

Code: Select all
            <!-- IF not postrow.S_TO_LESS_POSTS -->
            <!-- IF postrow.S_HAS_ATTACHMENTS -->
                <dl class="attachbox">
                    <dt>{L_ATTACHMENTS}</dt>
                    <!-- BEGIN attachment -->
                        <dd>{postrow.attachment.DISPLAY_ATTACHMENT}</dd>
                    <!-- END attachment -->
                </dl>
            <!-- ENDIF -->        
            
<!-- ENDIF --> 


open

styles/subsilver2/template/viewtopc.body.html

find

Code: Select all
                    <!-- IF postrow.S_HAS_ATTACHMENTS -->
                        <br clear="all" /><br />

                        <table class="tablebg" width="100%" cellspacing="1">
                        <tr>
                            <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
                        </tr>
                        <!-- BEGIN attachment -->
                            <tr>
                                <!-- IF postrow.attachment.S_ROW_COUNT is even --><td class="row2"><!-- ELSE --><td class="row1"><!-- ENDIF -->{postrow.attachment.DISPLAY_ATTACHMENT}</td>
                            </tr>
                        <!-- END attachment -->
                        </table>
                    <!-- ENDIF --> 


replace with

Code: Select all
                    <!-- IF not postrow.S_TO_LESS_POSTS -->
                    <!-- IF postrow.S_HAS_ATTACHMENTS -->
                        <br clear="all" /><br />

                        <table class="tablebg" width="100%" cellspacing="1">
                        <tr>
                            <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
                        </tr>
                        <!-- BEGIN attachment -->
                            <tr>
                                <!-- IF postrow.attachment.S_ROW_COUNT is even --><td class="row2"><!-- ELSE --><td class="row1"><!-- ENDIF -->{postrow.attachment.DISPLAY_ATTACHMENT}</td>
                            </tr>
                        <!-- END attachment -->
                        </table>
                    <!-- ENDIF -->
                    <!-- ENDIF --> 


clear all board-, style- and browser-caches
User avatar
4seven
Administrator
 
Posts: 427
 
Last 3 Topics:
Tabmenu Test
[Snippet] Avatar Ev...
[DEV] Zero and X-P...
 
Joined:
Sun 13. Jan 2008, 23:44
 
Letzter Login:
Mon 1. Aug 2022, 16:40
 
Posted:
Thu 27. May 2010, 15:19 +1.00
Userzeit: Do 20. Mai 2010, 05:32


Return to [DEV] Mods for 3.0.x



Who is online

Users browsing this forum: No registered users and 0 guests

cron